spell 0.8.7 → 0.8.8
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/README-epics.md +96 -36
- package/app/package.json +25 -1
- package/dist/cli/publish/PublishedPackage.d.ts +2 -1
- package/dist/cli/publish/PublishedPackage.js +6 -3
- package/dist/cli/publish/ScratchInstall.d.ts +14 -3
- package/dist/cli/publish/ScratchInstall.js +69 -8
- package/dist/epic/cli/EpicProgram.js +7 -1
- package/dist/epic/cli/epicGroups.js +2 -1
- package/dist/epic/command/BaseBranch.d.ts +35 -0
- package/dist/epic/command/BaseBranch.js +58 -0
- package/dist/epic/command/EpicCheckout.d.ts +1 -1
- package/dist/epic/command/EpicCheckout.js +4 -4
- package/dist/epic/command/EpicGuide.js +3 -2
- package/dist/epic/command/EpicTools.d.ts +5 -0
- package/dist/epic/command/EpicTools.js +14 -3
- package/dist/epic/command/MainMerge.d.ts +26 -15
- package/dist/epic/command/MainMerge.js +60 -16
- package/dist/epic/command/RepoInit.d.ts +116 -8
- package/dist/epic/command/RepoInit.js +308 -13
- package/dist/epic/command/Requests.d.ts +1 -0
- package/dist/epic/command/Requests.js +6 -1
- package/dist/epic/command/SessionMoves.js +2 -1
- package/dist/epic/command/SkillsCheck.js +3 -2
- package/dist/epic/command/Stock.js +3 -1
- package/dist/epic/command/TurnEnd.d.ts +1 -1
- package/dist/epic/command/TurnEnd.js +4 -3
- package/dist/epic/command/Worktrees.d.ts +18 -3
- package/dist/epic/command/Worktrees.js +38 -7
- package/dist/epic/command/command.types.d.ts +3 -0
- package/dist/epic/components/__pack/epics.entry.js +43 -43
- package/dist/epic/components/__pack/epics.pack.js +36 -12794
- package/dist/epic/config/EngineFiles.mjs +60 -0
- package/dist/epic/config/EpicConfig.d.ts +12 -2
- package/dist/epic/config/EpicConfig.js +9 -1
- package/dist/epic/config/GitHub.d.ts +41 -1
- package/dist/epic/config/GitHub.js +75 -3
- package/dist/epic/config/LayeredSettings.js +3 -2
- package/dist/epic/server/EpicServer.d.ts +1 -1
- package/dist/epic/server/EpicServer.js +26 -12
- package/dist/epic/tool/InboxPoller.mjs +2 -1
- package/dist/epic/tool/MigrateCommands.js +6 -8
- package/dist/epic/tool/PlanDocFiles.js +3 -2
- package/dist/epic/tool/ServedFolders.d.ts +1 -1
- package/dist/epic/tool/ServedFolders.js +4 -4
- package/dist/epic/tools/PageInboxes.js +3 -3
- package/dist/epic/tools/_assets/commands.entry.js +149 -68
- package/dist/epic/tools/_assets/commands.js +20 -2073
- package/dist/epic/tools/_assets/core-reference.entry.js +244 -124
- package/dist/epic/tools/_assets/core-reference.js +20 -2142
- package/dist/epic/tools/_assets/emoji/cldr/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/z.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/q.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/z.js +2 -2
- package/dist/epic/tools/_assets/goals-live.js +318 -210
- package/dist/epic/tools/_assets/highlight.min.js +5764 -5269
- package/dist/epic/tools/_assets/lazy/code-engine.js +5 -1270
- package/dist/epic/tools/_assets/lazy/markdown-engine.js +67 -1513
- package/dist/epic/tools/_assets/lazy/markdown-sanitizer.js +3 -753
- package/dist/epic/tools/_assets/spell-comments.entry.js +282 -159
- package/dist/epic/tools/_assets/spell-comments.js +24 -3716
- package/dist/epic/tools/_assets/spell-doc-comments.js +1243 -816
- package/dist/epic/tools/_assets/spell-doc-helpers.js +298 -165
- package/dist/epic/tools/_assets/spell-doc-runtime.js +2760 -1415
- package/dist/epic/tools/_assets/spell-doc-toolbar.js +396 -227
- package/dist/epic/tools/_assets/spell-syntax.entry.js +505 -285
- package/dist/epic/tools/_assets/spell-syntax.js +22 -2916
- package/dist/epic/tools/_assets/spell-ui-sources.js +102 -60
- package/dist/epic/tools/_assets/spell-ui.entry.js +108 -40
- package/dist/epic/tools/_assets/spell-ui.js +3131 -46465
- package/dist/epic/tools/pages.d.ts +5 -6
- package/dist/epic/tools/pages.js +7 -6
- package/dist/epic/window.mjs +2 -3
- package/dist/ui/components/ui-accordion/UIAccordion.d.ts +1 -0
- package/dist/ui/components/ui-ad/UIAd.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
- package/dist/ui/components/ui-button/UIButton.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButton.fallback.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButtons.d.ts +1 -0
- package/dist/ui/components/ui-button/UIOr.d.ts +1 -0
- package/dist/ui/components/ui-calendar/UICalendar.d.ts +6 -0
- package/dist/ui/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
- package/dist/ui/components/ui-card/UICards.d.ts +31 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.d.ts +7 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
- package/dist/ui/components/ui-comment/UIComment.d.ts +1 -0
- package/dist/ui/components/ui-comment/UIComments.d.ts +1 -0
- package/dist/ui/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/ui/components/ui-dimmer/UIDimmer.d.ts +1 -0
- package/dist/ui/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/ui/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/ui/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/ui/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/ui/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/ui/components/ui-form/UIFields.d.ts +1 -0
- package/dist/ui/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/ui/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/ui/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/ui/components/ui-image/UIImages.d.ts +1 -0
- package/dist/ui/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/ui/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/ui/components/ui-items/UIItems.d.ts +1 -0
- package/dist/ui/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/ui/components/ui-label/UILabel.d.ts +2 -0
- package/dist/ui/components/ui-label/UILabels.d.ts +1 -0
- package/dist/ui/components/ui-list/UIList.d.ts +2 -0
- package/dist/ui/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/ui/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/ui/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/ui/components/ui-nag/UINag.d.ts +1 -0
- package/dist/ui/components/ui-page/UIPage.d.ts +15 -0
- package/dist/ui/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIHeader.d.ts +3 -1
- package/dist/ui/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/ui/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/ui/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/ui/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/ui/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/ui/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/ui/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/ui/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/ui/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/ui/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/ui/components/ui-section/UISections.d.ts +1 -0
- package/dist/ui/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/ui/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/ui/components/ui-select/UISelect.d.ts +6 -0
- package/dist/ui/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/ui/components/ui-shape/UISide.d.ts +4 -0
- package/dist/ui/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/ui/components/ui-sides/UISides.d.ts +6 -0
- package/dist/ui/components/ui-sides/UISides.fallback.d.ts +6 -0
- package/dist/ui/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/ui/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/ui/components/ui-space/UISpace.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/ui/components/ui-step/UIStep.d.ts +1 -0
- package/dist/ui/components/ui-step/UISteps.d.ts +1 -0
- package/dist/ui/components/ui-table/UICell.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/ui/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/ui/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/ui/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/ui/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/ui/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/ui/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/ui/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/util/spell/constants.js +1 -1
- package/epic/.claude-plugin/plugin.json +1 -1
- package/epic/.codex-plugin/plugin.json +1 -1
- package/epic/hooks/handoff.mjs +4 -3
- package/epic/hooks/worktree.mjs +22 -3
- package/epic/package.json +41 -2
- package/epic/skills/details/SKILL.md +2 -1
- package/epic/skills/epic/SKILL.md +7 -1
- package/epic/skills/epic/guide.md +4 -0
- package/epic/skills/isolate/SKILL.md +35 -0
- package/epic/src/AGENTS.md +6 -2
- package/epic/templates/durable.html +1 -1
- package/epic/vscode/package.json +1 -1
- package/epic/vscode/spell-epic.vsix +0 -0
- package/package.json +1 -1
- package/parser/package.json +1 -1
- package/ui/package.json +15 -2
|
@@ -1,2917 +1,23 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(()
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return t;
|
|
21
|
-
}, "eo");
|
|
22
|
-
var Oe = /* @__PURE__ */ __name((t, e, n) => (n = t != null ? Yi(Xi(t)) : {}, eo(e || !t || !t.__esModule ? Qt(n, "default", { value: t, enumerable: true }) : n, t)), "Oe");
|
|
23
|
-
var Ye = p((dl, rn) => {
|
|
24
|
-
var oo = Array.isArray;
|
|
25
|
-
rn.exports = oo;
|
|
26
|
-
});
|
|
27
|
-
var on = p((fl, sn) => {
|
|
28
|
-
var uo = typeof global == "object" && global && global.Object === Object && global;
|
|
29
|
-
sn.exports = uo;
|
|
30
|
-
});
|
|
31
|
-
var Je = p((pl, un) => {
|
|
32
|
-
var ao = on(), co = typeof self == "object" && self && self.Object === Object && self, lo = ao || co || Function("return this")();
|
|
33
|
-
un.exports = lo;
|
|
34
|
-
});
|
|
35
|
-
var Qe = p((hl, an) => {
|
|
36
|
-
var fo = Je(), po = fo.Symbol;
|
|
37
|
-
an.exports = po;
|
|
38
|
-
});
|
|
39
|
-
var fn = p((gl, dn) => {
|
|
40
|
-
var cn = Qe(), ln = Object.prototype, ho = ln.hasOwnProperty, go = ln.toString, _e = cn ? cn.toStringTag : void 0;
|
|
41
|
-
function Do(t) {
|
|
42
|
-
var e = ho.call(t, _e), n = t[_e];
|
|
43
|
-
try {
|
|
44
|
-
t[_e] = void 0;
|
|
45
|
-
var r = true;
|
|
46
|
-
} catch {
|
|
47
|
-
}
|
|
48
|
-
var s = go.call(t);
|
|
49
|
-
return r && (e ? t[_e] = n : delete t[_e]), s;
|
|
50
|
-
}
|
|
51
|
-
__name(Do, "Do");
|
|
52
|
-
dn.exports = Do;
|
|
53
|
-
});
|
|
54
|
-
var hn = p((Dl, pn) => {
|
|
55
|
-
var mo = Object.prototype, yo = mo.toString;
|
|
56
|
-
function Ao(t) {
|
|
57
|
-
return yo.call(t);
|
|
58
|
-
}
|
|
59
|
-
__name(Ao, "Ao");
|
|
60
|
-
pn.exports = Ao;
|
|
61
|
-
});
|
|
62
|
-
var Ct = p((ml, mn) => {
|
|
63
|
-
var gn = Qe(), Eo = fn(), wo = hn(), Co = "[object Null]", vo = "[object Undefined]", Dn = gn ? gn.toStringTag : void 0;
|
|
64
|
-
function Fo(t) {
|
|
65
|
-
return t == null ? t === void 0 ? vo : Co : Dn && Dn in Object(t) ? Eo(t) : wo(t);
|
|
66
|
-
}
|
|
67
|
-
__name(Fo, "Fo");
|
|
68
|
-
mn.exports = Fo;
|
|
69
|
-
});
|
|
70
|
-
var An = p((yl, yn) => {
|
|
71
|
-
function bo(t) {
|
|
72
|
-
return t != null && typeof t == "object";
|
|
73
|
-
}
|
|
74
|
-
__name(bo, "bo");
|
|
75
|
-
yn.exports = bo;
|
|
76
|
-
});
|
|
77
|
-
var Xe = p((Al, En) => {
|
|
78
|
-
var xo = Ct(), So = An(), ko = "[object Symbol]";
|
|
79
|
-
function Po(t) {
|
|
80
|
-
return typeof t == "symbol" || So(t) && xo(t) == ko;
|
|
81
|
-
}
|
|
82
|
-
__name(Po, "Po");
|
|
83
|
-
En.exports = Po;
|
|
84
|
-
});
|
|
85
|
-
var Cn = p((El, wn) => {
|
|
86
|
-
var To = Ye(), Bo = Xe(), Oo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Io = /^\w*$/;
|
|
87
|
-
function No(t, e) {
|
|
88
|
-
if (To(t)) return false;
|
|
89
|
-
var n = typeof t;
|
|
90
|
-
return n == "number" || n == "symbol" || n == "boolean" || t == null || Bo(t) ? true : Io.test(t) || !Oo.test(t) || e != null && t in Object(e);
|
|
91
|
-
}
|
|
92
|
-
__name(No, "No");
|
|
93
|
-
wn.exports = No;
|
|
94
|
-
});
|
|
95
|
-
var Ze = p((wl, vn) => {
|
|
96
|
-
function _o(t) {
|
|
97
|
-
var e = typeof t;
|
|
98
|
-
return t != null && (e == "object" || e == "function");
|
|
99
|
-
}
|
|
100
|
-
__name(_o, "_o");
|
|
101
|
-
vn.exports = _o;
|
|
102
|
-
});
|
|
103
|
-
var bn = p((Cl, Fn) => {
|
|
104
|
-
var $o = Ct(), Ro = Ze(), Lo = "[object AsyncFunction]", Mo = "[object Function]", jo = "[object GeneratorFunction]", qo = "[object Proxy]";
|
|
105
|
-
function Uo(t) {
|
|
106
|
-
if (!Ro(t)) return false;
|
|
107
|
-
var e = $o(t);
|
|
108
|
-
return e == Mo || e == jo || e == Lo || e == qo;
|
|
109
|
-
}
|
|
110
|
-
__name(Uo, "Uo");
|
|
111
|
-
Fn.exports = Uo;
|
|
112
|
-
});
|
|
113
|
-
var Sn = p((vl, xn) => {
|
|
114
|
-
var Wo = Je(), Vo = Wo["__core-js_shared__"];
|
|
115
|
-
xn.exports = Vo;
|
|
116
|
-
});
|
|
117
|
-
var Tn = p((Fl, Pn) => {
|
|
118
|
-
var vt = Sn(), kn = (function() {
|
|
119
|
-
var t = /[^.]+$/.exec(vt && vt.keys && vt.keys.IE_PROTO || "");
|
|
120
|
-
return t ? "Symbol(src)_1." + t : "";
|
|
121
|
-
})();
|
|
122
|
-
function Ko(t) {
|
|
123
|
-
return !!kn && kn in t;
|
|
124
|
-
}
|
|
125
|
-
__name(Ko, "Ko");
|
|
126
|
-
Pn.exports = Ko;
|
|
127
|
-
});
|
|
128
|
-
var On = p((bl, Bn) => {
|
|
129
|
-
var Ho = Function.prototype, zo = Ho.toString;
|
|
130
|
-
function Go(t) {
|
|
131
|
-
if (t != null) {
|
|
132
|
-
try {
|
|
133
|
-
return zo.call(t);
|
|
134
|
-
} catch {
|
|
135
|
-
}
|
|
136
|
-
try {
|
|
137
|
-
return t + "";
|
|
138
|
-
} catch {
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return "";
|
|
142
|
-
}
|
|
143
|
-
__name(Go, "Go");
|
|
144
|
-
Bn.exports = Go;
|
|
145
|
-
});
|
|
146
|
-
var Nn = p((xl, In) => {
|
|
147
|
-
var Yo = bn(), Jo = Tn(), Qo = Ze(), Xo = On(), Zo = /[\\^$.*+?()[\]{}|]/g, eu = /^\[object .+?Constructor\]$/, tu = Function.prototype, nu = Object.prototype, ru = tu.toString, su = nu.hasOwnProperty, iu = RegExp("^" + ru.call(su).replace(Zo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
148
|
-
function ou(t) {
|
|
149
|
-
if (!Qo(t) || Jo(t)) return false;
|
|
150
|
-
var e = Yo(t) ? iu : eu;
|
|
151
|
-
return e.test(Xo(t));
|
|
152
|
-
}
|
|
153
|
-
__name(ou, "ou");
|
|
154
|
-
In.exports = ou;
|
|
155
|
-
});
|
|
156
|
-
var $n = p((Sl, _n) => {
|
|
157
|
-
function uu(t, e) {
|
|
158
|
-
return t?.[e];
|
|
159
|
-
}
|
|
160
|
-
__name(uu, "uu");
|
|
161
|
-
_n.exports = uu;
|
|
162
|
-
});
|
|
163
|
-
var et = p((kl, Rn) => {
|
|
164
|
-
var au = Nn(), cu = $n();
|
|
165
|
-
function lu(t, e) {
|
|
166
|
-
var n = cu(t, e);
|
|
167
|
-
return au(n) ? n : void 0;
|
|
168
|
-
}
|
|
169
|
-
__name(lu, "lu");
|
|
170
|
-
Rn.exports = lu;
|
|
171
|
-
});
|
|
172
|
-
var $e = p((Pl, Ln) => {
|
|
173
|
-
var du = et(), fu = du(Object, "create");
|
|
174
|
-
Ln.exports = fu;
|
|
175
|
-
});
|
|
176
|
-
var qn = p((Tl, jn) => {
|
|
177
|
-
var Mn = $e();
|
|
178
|
-
function pu() {
|
|
179
|
-
this.__data__ = Mn ? Mn(null) : {}, this.size = 0;
|
|
180
|
-
}
|
|
181
|
-
__name(pu, "pu");
|
|
182
|
-
jn.exports = pu;
|
|
183
|
-
});
|
|
184
|
-
var Wn = p((Bl, Un) => {
|
|
185
|
-
function hu(t) {
|
|
186
|
-
var e = this.has(t) && delete this.__data__[t];
|
|
187
|
-
return this.size -= e ? 1 : 0, e;
|
|
188
|
-
}
|
|
189
|
-
__name(hu, "hu");
|
|
190
|
-
Un.exports = hu;
|
|
191
|
-
});
|
|
192
|
-
var Kn = p((Ol, Vn) => {
|
|
193
|
-
var gu = $e(), Du = "__lodash_hash_undefined__", mu = Object.prototype, yu = mu.hasOwnProperty;
|
|
194
|
-
function Au(t) {
|
|
195
|
-
var e = this.__data__;
|
|
196
|
-
if (gu) {
|
|
197
|
-
var n = e[t];
|
|
198
|
-
return n === Du ? void 0 : n;
|
|
199
|
-
}
|
|
200
|
-
return yu.call(e, t) ? e[t] : void 0;
|
|
201
|
-
}
|
|
202
|
-
__name(Au, "Au");
|
|
203
|
-
Vn.exports = Au;
|
|
204
|
-
});
|
|
205
|
-
var zn = p((Il, Hn) => {
|
|
206
|
-
var Eu = $e(), wu = Object.prototype, Cu = wu.hasOwnProperty;
|
|
207
|
-
function vu(t) {
|
|
208
|
-
var e = this.__data__;
|
|
209
|
-
return Eu ? e[t] !== void 0 : Cu.call(e, t);
|
|
210
|
-
}
|
|
211
|
-
__name(vu, "vu");
|
|
212
|
-
Hn.exports = vu;
|
|
213
|
-
});
|
|
214
|
-
var Yn = p((Nl, Gn) => {
|
|
215
|
-
var Fu = $e(), bu = "__lodash_hash_undefined__";
|
|
216
|
-
function xu(t, e) {
|
|
217
|
-
var n = this.__data__;
|
|
218
|
-
return this.size += this.has(t) ? 0 : 1, n[t] = Fu && e === void 0 ? bu : e, this;
|
|
219
|
-
}
|
|
220
|
-
__name(xu, "xu");
|
|
221
|
-
Gn.exports = xu;
|
|
222
|
-
});
|
|
223
|
-
var Qn = p((_l, Jn) => {
|
|
224
|
-
var Su = qn(), ku = Wn(), Pu = Kn(), Tu = zn(), Bu = Yn();
|
|
225
|
-
function ve(t) {
|
|
226
|
-
var e = -1, n = t == null ? 0 : t.length;
|
|
227
|
-
for (this.clear(); ++e < n; ) {
|
|
228
|
-
var r = t[e];
|
|
229
|
-
this.set(r[0], r[1]);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
__name(ve, "ve");
|
|
233
|
-
ve.prototype.clear = Su;
|
|
234
|
-
ve.prototype.delete = ku;
|
|
235
|
-
ve.prototype.get = Pu;
|
|
236
|
-
ve.prototype.has = Tu;
|
|
237
|
-
ve.prototype.set = Bu;
|
|
238
|
-
Jn.exports = ve;
|
|
239
|
-
});
|
|
240
|
-
var Zn = p(($l, Xn) => {
|
|
241
|
-
function Ou() {
|
|
242
|
-
this.__data__ = [], this.size = 0;
|
|
243
|
-
}
|
|
244
|
-
__name(Ou, "Ou");
|
|
245
|
-
Xn.exports = Ou;
|
|
246
|
-
});
|
|
247
|
-
var Ft = p((Rl, er) => {
|
|
248
|
-
function Iu(t, e) {
|
|
249
|
-
return t === e || t !== t && e !== e;
|
|
250
|
-
}
|
|
251
|
-
__name(Iu, "Iu");
|
|
252
|
-
er.exports = Iu;
|
|
253
|
-
});
|
|
254
|
-
var Re = p((Ll, tr) => {
|
|
255
|
-
var Nu = Ft();
|
|
256
|
-
function _u(t, e) {
|
|
257
|
-
for (var n = t.length; n--; ) if (Nu(t[n][0], e)) return n;
|
|
258
|
-
return -1;
|
|
259
|
-
}
|
|
260
|
-
__name(_u, "_u");
|
|
261
|
-
tr.exports = _u;
|
|
262
|
-
});
|
|
263
|
-
var rr = p((Ml, nr) => {
|
|
264
|
-
var $u = Re(), Ru = Array.prototype, Lu = Ru.splice;
|
|
265
|
-
function Mu(t) {
|
|
266
|
-
var e = this.__data__, n = $u(e, t);
|
|
267
|
-
if (n < 0) return false;
|
|
268
|
-
var r = e.length - 1;
|
|
269
|
-
return n == r ? e.pop() : Lu.call(e, n, 1), --this.size, true;
|
|
270
|
-
}
|
|
271
|
-
__name(Mu, "Mu");
|
|
272
|
-
nr.exports = Mu;
|
|
273
|
-
});
|
|
274
|
-
var ir = p((jl, sr) => {
|
|
275
|
-
var ju = Re();
|
|
276
|
-
function qu(t) {
|
|
277
|
-
var e = this.__data__, n = ju(e, t);
|
|
278
|
-
return n < 0 ? void 0 : e[n][1];
|
|
279
|
-
}
|
|
280
|
-
__name(qu, "qu");
|
|
281
|
-
sr.exports = qu;
|
|
282
|
-
});
|
|
283
|
-
var ur = p((ql, or) => {
|
|
284
|
-
var Uu = Re();
|
|
285
|
-
function Wu(t) {
|
|
286
|
-
return Uu(this.__data__, t) > -1;
|
|
287
|
-
}
|
|
288
|
-
__name(Wu, "Wu");
|
|
289
|
-
or.exports = Wu;
|
|
290
|
-
});
|
|
291
|
-
var cr = p((Ul, ar) => {
|
|
292
|
-
var Vu = Re();
|
|
293
|
-
function Ku(t, e) {
|
|
294
|
-
var n = this.__data__, r = Vu(n, t);
|
|
295
|
-
return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
|
|
296
|
-
}
|
|
297
|
-
__name(Ku, "Ku");
|
|
298
|
-
ar.exports = Ku;
|
|
299
|
-
});
|
|
300
|
-
var dr = p((Wl, lr) => {
|
|
301
|
-
var Hu = Zn(), zu = rr(), Gu = ir(), Yu = ur(), Ju = cr();
|
|
302
|
-
function Fe(t) {
|
|
303
|
-
var e = -1, n = t == null ? 0 : t.length;
|
|
304
|
-
for (this.clear(); ++e < n; ) {
|
|
305
|
-
var r = t[e];
|
|
306
|
-
this.set(r[0], r[1]);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
__name(Fe, "Fe");
|
|
310
|
-
Fe.prototype.clear = Hu;
|
|
311
|
-
Fe.prototype.delete = zu;
|
|
312
|
-
Fe.prototype.get = Gu;
|
|
313
|
-
Fe.prototype.has = Yu;
|
|
314
|
-
Fe.prototype.set = Ju;
|
|
315
|
-
lr.exports = Fe;
|
|
316
|
-
});
|
|
317
|
-
var pr = p((Vl, fr) => {
|
|
318
|
-
var Qu = et(), Xu = Je(), Zu = Qu(Xu, "Map");
|
|
319
|
-
fr.exports = Zu;
|
|
320
|
-
});
|
|
321
|
-
var Dr = p((Kl, gr) => {
|
|
322
|
-
var hr = Qn(), ea = dr(), ta = pr();
|
|
323
|
-
function na() {
|
|
324
|
-
this.size = 0, this.__data__ = { hash: new hr(), map: new (ta || ea)(), string: new hr() };
|
|
325
|
-
}
|
|
326
|
-
__name(na, "na");
|
|
327
|
-
gr.exports = na;
|
|
328
|
-
});
|
|
329
|
-
var yr = p((Hl, mr) => {
|
|
330
|
-
function ra(t) {
|
|
331
|
-
var e = typeof t;
|
|
332
|
-
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
333
|
-
}
|
|
334
|
-
__name(ra, "ra");
|
|
335
|
-
mr.exports = ra;
|
|
336
|
-
});
|
|
337
|
-
var Le = p((zl, Ar) => {
|
|
338
|
-
var sa = yr();
|
|
339
|
-
function ia(t, e) {
|
|
340
|
-
var n = t.__data__;
|
|
341
|
-
return sa(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
342
|
-
}
|
|
343
|
-
__name(ia, "ia");
|
|
344
|
-
Ar.exports = ia;
|
|
345
|
-
});
|
|
346
|
-
var wr = p((Gl, Er) => {
|
|
347
|
-
var oa = Le();
|
|
348
|
-
function ua(t) {
|
|
349
|
-
var e = oa(this, t).delete(t);
|
|
350
|
-
return this.size -= e ? 1 : 0, e;
|
|
351
|
-
}
|
|
352
|
-
__name(ua, "ua");
|
|
353
|
-
Er.exports = ua;
|
|
354
|
-
});
|
|
355
|
-
var vr = p((Yl, Cr) => {
|
|
356
|
-
var aa = Le();
|
|
357
|
-
function ca(t) {
|
|
358
|
-
return aa(this, t).get(t);
|
|
359
|
-
}
|
|
360
|
-
__name(ca, "ca");
|
|
361
|
-
Cr.exports = ca;
|
|
362
|
-
});
|
|
363
|
-
var br = p((Jl, Fr) => {
|
|
364
|
-
var la = Le();
|
|
365
|
-
function da(t) {
|
|
366
|
-
return la(this, t).has(t);
|
|
367
|
-
}
|
|
368
|
-
__name(da, "da");
|
|
369
|
-
Fr.exports = da;
|
|
370
|
-
});
|
|
371
|
-
var Sr = p((Ql, xr) => {
|
|
372
|
-
var fa = Le();
|
|
373
|
-
function pa(t, e) {
|
|
374
|
-
var n = fa(this, t), r = n.size;
|
|
375
|
-
return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
|
|
376
|
-
}
|
|
377
|
-
__name(pa, "pa");
|
|
378
|
-
xr.exports = pa;
|
|
379
|
-
});
|
|
380
|
-
var Pr = p((Xl, kr) => {
|
|
381
|
-
var ha = Dr(), ga = wr(), Da = vr(), ma = br(), ya = Sr();
|
|
382
|
-
function be(t) {
|
|
383
|
-
var e = -1, n = t == null ? 0 : t.length;
|
|
384
|
-
for (this.clear(); ++e < n; ) {
|
|
385
|
-
var r = t[e];
|
|
386
|
-
this.set(r[0], r[1]);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
__name(be, "be");
|
|
390
|
-
be.prototype.clear = ha;
|
|
391
|
-
be.prototype.delete = ga;
|
|
392
|
-
be.prototype.get = Da;
|
|
393
|
-
be.prototype.has = ma;
|
|
394
|
-
be.prototype.set = ya;
|
|
395
|
-
kr.exports = be;
|
|
396
|
-
});
|
|
397
|
-
var Or = p((Zl, Br) => {
|
|
398
|
-
var Tr = Pr(), Aa = "Expected a function";
|
|
399
|
-
function bt(t, e) {
|
|
400
|
-
if (typeof t != "function" || e != null && typeof e != "function") throw new TypeError(Aa);
|
|
401
|
-
var n = /* @__PURE__ */ __name(function() {
|
|
402
|
-
var r = arguments, s = e ? e.apply(this, r) : r[0], o = n.cache;
|
|
403
|
-
if (o.has(s)) return o.get(s);
|
|
404
|
-
var u = t.apply(this, r);
|
|
405
|
-
return n.cache = o.set(s, u) || o, u;
|
|
406
|
-
}, "n");
|
|
407
|
-
return n.cache = new (bt.Cache || Tr)(), n;
|
|
408
|
-
}
|
|
409
|
-
__name(bt, "bt");
|
|
410
|
-
bt.Cache = Tr;
|
|
411
|
-
Br.exports = bt;
|
|
412
|
-
});
|
|
413
|
-
var Nr = p((ed, Ir) => {
|
|
414
|
-
var Ea = Or(), wa = 500;
|
|
415
|
-
function Ca(t) {
|
|
416
|
-
var e = Ea(t, function(r) {
|
|
417
|
-
return n.size === wa && n.clear(), r;
|
|
418
|
-
}), n = e.cache;
|
|
419
|
-
return e;
|
|
420
|
-
}
|
|
421
|
-
__name(Ca, "Ca");
|
|
422
|
-
Ir.exports = Ca;
|
|
423
|
-
});
|
|
424
|
-
var $r = p((td, _r) => {
|
|
425
|
-
var va = Nr(), Fa = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ba = /\\(\\)?/g, xa = va(function(t) {
|
|
426
|
-
var e = [];
|
|
427
|
-
return t.charCodeAt(0) === 46 && e.push(""), t.replace(Fa, function(n, r, s, o) {
|
|
428
|
-
e.push(s ? o.replace(ba, "$1") : r || n);
|
|
429
|
-
}), e;
|
|
430
|
-
});
|
|
431
|
-
_r.exports = xa;
|
|
432
|
-
});
|
|
433
|
-
var Lr = p((nd, Rr) => {
|
|
434
|
-
function Sa(t, e) {
|
|
435
|
-
for (var n = -1, r = t == null ? 0 : t.length, s = Array(r); ++n < r; ) s[n] = e(t[n], n, t);
|
|
436
|
-
return s;
|
|
437
|
-
}
|
|
438
|
-
__name(Sa, "Sa");
|
|
439
|
-
Rr.exports = Sa;
|
|
440
|
-
});
|
|
441
|
-
var Vr = p((rd, Wr) => {
|
|
442
|
-
var Mr = Qe(), ka = Lr(), Pa = Ye(), Ta = Xe(), Ba = 1 / 0, jr = Mr ? Mr.prototype : void 0, qr = jr ? jr.toString : void 0;
|
|
443
|
-
function Ur(t) {
|
|
444
|
-
if (typeof t == "string") return t;
|
|
445
|
-
if (Pa(t)) return ka(t, Ur) + "";
|
|
446
|
-
if (Ta(t)) return qr ? qr.call(t) : "";
|
|
447
|
-
var e = t + "";
|
|
448
|
-
return e == "0" && 1 / t == -Ba ? "-0" : e;
|
|
449
|
-
}
|
|
450
|
-
__name(Ur, "Ur");
|
|
451
|
-
Wr.exports = Ur;
|
|
452
|
-
});
|
|
453
|
-
var Hr = p((sd, Kr) => {
|
|
454
|
-
var Oa = Vr();
|
|
455
|
-
function Ia(t) {
|
|
456
|
-
return t == null ? "" : Oa(t);
|
|
457
|
-
}
|
|
458
|
-
__name(Ia, "Ia");
|
|
459
|
-
Kr.exports = Ia;
|
|
460
|
-
});
|
|
461
|
-
var xt = p((id, zr) => {
|
|
462
|
-
var Na = Ye(), _a = Cn(), $a = $r(), Ra = Hr();
|
|
463
|
-
function La(t, e) {
|
|
464
|
-
return Na(t) ? t : _a(t, e) ? [t] : $a(Ra(t));
|
|
465
|
-
}
|
|
466
|
-
__name(La, "La");
|
|
467
|
-
zr.exports = La;
|
|
468
|
-
});
|
|
469
|
-
var St = p((od, Gr) => {
|
|
470
|
-
var Ma = Xe(), ja = 1 / 0;
|
|
471
|
-
function qa(t) {
|
|
472
|
-
if (typeof t == "string" || Ma(t)) return t;
|
|
473
|
-
var e = t + "";
|
|
474
|
-
return e == "0" && 1 / t == -ja ? "-0" : e;
|
|
475
|
-
}
|
|
476
|
-
__name(qa, "qa");
|
|
477
|
-
Gr.exports = qa;
|
|
478
|
-
});
|
|
479
|
-
var Jr = p((ud, Yr) => {
|
|
480
|
-
var Ua = xt(), Wa = St();
|
|
481
|
-
function Va(t, e) {
|
|
482
|
-
e = Ua(e, t);
|
|
483
|
-
for (var n = 0, r = e.length; t != null && n < r; ) t = t[Wa(e[n++])];
|
|
484
|
-
return n && n == r ? t : void 0;
|
|
485
|
-
}
|
|
486
|
-
__name(Va, "Va");
|
|
487
|
-
Yr.exports = Va;
|
|
488
|
-
});
|
|
489
|
-
var Xr = p((ad, Qr) => {
|
|
490
|
-
var Ka = Jr();
|
|
491
|
-
function Ha(t, e, n) {
|
|
492
|
-
var r = t == null ? void 0 : Ka(t, e);
|
|
493
|
-
return r === void 0 ? n : r;
|
|
494
|
-
}
|
|
495
|
-
__name(Ha, "Ha");
|
|
496
|
-
Qr.exports = Ha;
|
|
497
|
-
});
|
|
498
|
-
var es = p((cd, Zr) => {
|
|
499
|
-
var za = et(), Ga = (function() {
|
|
500
|
-
try {
|
|
501
|
-
var t = za(Object, "defineProperty");
|
|
502
|
-
return t({}, "", {}), t;
|
|
503
|
-
} catch {
|
|
504
|
-
}
|
|
505
|
-
})();
|
|
506
|
-
Zr.exports = Ga;
|
|
507
|
-
});
|
|
508
|
-
var rs = p((ld, ns) => {
|
|
509
|
-
var ts = es();
|
|
510
|
-
function Ya(t, e, n) {
|
|
511
|
-
e == "__proto__" && ts ? ts(t, e, { configurable: true, enumerable: true, value: n, writable: true }) : t[e] = n;
|
|
512
|
-
}
|
|
513
|
-
__name(Ya, "Ya");
|
|
514
|
-
ns.exports = Ya;
|
|
515
|
-
});
|
|
516
|
-
var is = p((dd, ss) => {
|
|
517
|
-
var Ja = rs(), Qa = Ft(), Xa = Object.prototype, Za = Xa.hasOwnProperty;
|
|
518
|
-
function ec(t, e, n) {
|
|
519
|
-
var r = t[e];
|
|
520
|
-
(!(Za.call(t, e) && Qa(r, n)) || n === void 0 && !(e in t)) && Ja(t, e, n);
|
|
521
|
-
}
|
|
522
|
-
__name(ec, "ec");
|
|
523
|
-
ss.exports = ec;
|
|
524
|
-
});
|
|
525
|
-
var us = p((fd, os) => {
|
|
526
|
-
var tc = 9007199254740991, nc = /^(?:0|[1-9]\d*)$/;
|
|
527
|
-
function rc(t, e) {
|
|
528
|
-
var n = typeof t;
|
|
529
|
-
return e = e ?? tc, !!e && (n == "number" || n != "symbol" && nc.test(t)) && t > -1 && t % 1 == 0 && t < e;
|
|
530
|
-
}
|
|
531
|
-
__name(rc, "rc");
|
|
532
|
-
os.exports = rc;
|
|
533
|
-
});
|
|
534
|
-
var ls = p((pd, cs) => {
|
|
535
|
-
var sc = is(), ic = xt(), oc = us(), as = Ze(), uc = St();
|
|
536
|
-
function ac(t, e, n, r) {
|
|
537
|
-
if (!as(t)) return t;
|
|
538
|
-
e = ic(e, t);
|
|
539
|
-
for (var s = -1, o = e.length, u = o - 1, l = t; l != null && ++s < o; ) {
|
|
540
|
-
var d = uc(e[s]), v = n;
|
|
541
|
-
if (d === "__proto__" || d === "constructor" || d === "prototype") return t;
|
|
542
|
-
if (s != u) {
|
|
543
|
-
var N = l[d];
|
|
544
|
-
v = r ? r(N, d, l) : void 0, v === void 0 && (v = as(N) ? N : oc(e[s + 1]) ? [] : {});
|
|
545
|
-
}
|
|
546
|
-
sc(l, d, v), l = l[d];
|
|
547
|
-
}
|
|
548
|
-
return t;
|
|
549
|
-
}
|
|
550
|
-
__name(ac, "ac");
|
|
551
|
-
cs.exports = ac;
|
|
552
|
-
});
|
|
553
|
-
var fs = p((hd, ds) => {
|
|
554
|
-
var cc = ls();
|
|
555
|
-
function lc(t, e, n) {
|
|
556
|
-
return t == null ? t : cc(t, e, n);
|
|
557
|
-
}
|
|
558
|
-
__name(lc, "lc");
|
|
559
|
-
ds.exports = lc;
|
|
560
|
-
});
|
|
561
|
-
var hs = p((gd, ps) => {
|
|
562
|
-
"use strict";
|
|
563
|
-
ps.exports = (t) => encodeURIComponent(t).replace(/[!'()*]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
564
|
-
});
|
|
565
|
-
var As = p((Dd, ys) => {
|
|
566
|
-
"use strict";
|
|
567
|
-
var ms = "%[a-f0-9]{2}", gs = new RegExp("(" + ms + ")|([^%]+?)", "gi"), Ds = new RegExp("(" + ms + ")+", "gi");
|
|
568
|
-
function kt(t, e) {
|
|
569
|
-
try {
|
|
570
|
-
return [decodeURIComponent(t.join(""))];
|
|
571
|
-
} catch {
|
|
572
|
-
}
|
|
573
|
-
if (t.length === 1) return t;
|
|
574
|
-
e = e || 1;
|
|
575
|
-
var n = t.slice(0, e), r = t.slice(e);
|
|
576
|
-
return Array.prototype.concat.call([], kt(n), kt(r));
|
|
577
|
-
}
|
|
578
|
-
__name(kt, "kt");
|
|
579
|
-
function dc(t) {
|
|
580
|
-
try {
|
|
581
|
-
return decodeURIComponent(t);
|
|
582
|
-
} catch {
|
|
583
|
-
for (var e = t.match(gs) || [], n = 1; n < e.length; n++) t = kt(e, n).join(""), e = t.match(gs) || [];
|
|
584
|
-
return t;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
__name(dc, "dc");
|
|
588
|
-
function fc(t) {
|
|
589
|
-
for (var e = { "%FE%FF": "��", "%FF%FE": "��" }, n = Ds.exec(t); n; ) {
|
|
590
|
-
try {
|
|
591
|
-
e[n[0]] = decodeURIComponent(n[0]);
|
|
592
|
-
} catch {
|
|
593
|
-
var r = dc(n[0]);
|
|
594
|
-
r !== n[0] && (e[n[0]] = r);
|
|
595
|
-
}
|
|
596
|
-
n = Ds.exec(t);
|
|
597
|
-
}
|
|
598
|
-
e["%C2"] = "�";
|
|
599
|
-
for (var s = Object.keys(e), o = 0; o < s.length; o++) {
|
|
600
|
-
var u = s[o];
|
|
601
|
-
t = t.replace(new RegExp(u, "g"), e[u]);
|
|
602
|
-
}
|
|
603
|
-
return t;
|
|
604
|
-
}
|
|
605
|
-
__name(fc, "fc");
|
|
606
|
-
ys.exports = function(t) {
|
|
607
|
-
if (typeof t != "string") throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof t + "`");
|
|
608
|
-
try {
|
|
609
|
-
return t = t.replace(/\+/g, " "), decodeURIComponent(t);
|
|
610
|
-
} catch {
|
|
611
|
-
return fc(t);
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
});
|
|
615
|
-
var ws = p((md, Es) => {
|
|
616
|
-
"use strict";
|
|
617
|
-
Es.exports = (t, e) => {
|
|
618
|
-
if (!(typeof t == "string" && typeof e == "string")) throw new TypeError("Expected the arguments to be of type `string`");
|
|
619
|
-
if (e === "") return [t];
|
|
620
|
-
let n = t.indexOf(e);
|
|
621
|
-
return n === -1 ? [t] : [t.slice(0, n), t.slice(n + e.length)];
|
|
622
|
-
};
|
|
623
|
-
});
|
|
624
|
-
var vs = p((yd, Cs) => {
|
|
625
|
-
"use strict";
|
|
626
|
-
Cs.exports = function(t, e) {
|
|
627
|
-
for (var n = {}, r = Object.keys(t), s = Array.isArray(e), o = 0; o < r.length; o++) {
|
|
628
|
-
var u = r[o], l = t[u];
|
|
629
|
-
(s ? e.indexOf(u) !== -1 : e(u, l, t)) && (n[u] = l);
|
|
630
|
-
}
|
|
631
|
-
return n;
|
|
632
|
-
};
|
|
633
|
-
});
|
|
634
|
-
var Bs = p((q) => {
|
|
635
|
-
"use strict";
|
|
636
|
-
var pc = hs(), hc = As(), bs = ws(), gc = vs(), Dc = /* @__PURE__ */ __name((t) => t == null, "Dc");
|
|
637
|
-
function mc(t) {
|
|
638
|
-
switch (t.arrayFormat) {
|
|
639
|
-
case "index":
|
|
640
|
-
return (e) => (n, r) => {
|
|
641
|
-
let s = n.length;
|
|
642
|
-
return r === void 0 || t.skipNull && r === null || t.skipEmptyString && r === "" ? n : r === null ? [...n, [O(e, t), "[", s, "]"].join("")] : [...n, [O(e, t), "[", O(s, t), "]=", O(r, t)].join("")];
|
|
643
|
-
};
|
|
644
|
-
case "bracket":
|
|
645
|
-
return (e) => (n, r) => r === void 0 || t.skipNull && r === null || t.skipEmptyString && r === "" ? n : r === null ? [...n, [O(e, t), "[]"].join("")] : [...n, [O(e, t), "[]=", O(r, t)].join("")];
|
|
646
|
-
case "comma":
|
|
647
|
-
case "separator":
|
|
648
|
-
return (e) => (n, r) => r == null || r.length === 0 ? n : n.length === 0 ? [[O(e, t), "=", O(r, t)].join("")] : [[n, O(r, t)].join(t.arrayFormatSeparator)];
|
|
649
|
-
default:
|
|
650
|
-
return (e) => (n, r) => r === void 0 || t.skipNull && r === null || t.skipEmptyString && r === "" ? n : r === null ? [...n, O(e, t)] : [...n, [O(e, t), "=", O(r, t)].join("")];
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
__name(mc, "mc");
|
|
654
|
-
function yc(t) {
|
|
655
|
-
let e;
|
|
656
|
-
switch (t.arrayFormat) {
|
|
657
|
-
case "index":
|
|
658
|
-
return (n, r, s) => {
|
|
659
|
-
if (e = /\[(\d*)\]$/.exec(n), n = n.replace(/\[\d*\]$/, ""), !e) {
|
|
660
|
-
s[n] = r;
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
s[n] === void 0 && (s[n] = {}), s[n][e[1]] = r;
|
|
664
|
-
};
|
|
665
|
-
case "bracket":
|
|
666
|
-
return (n, r, s) => {
|
|
667
|
-
if (e = /(\[\])$/.exec(n), n = n.replace(/\[\]$/, ""), !e) {
|
|
668
|
-
s[n] = r;
|
|
669
|
-
return;
|
|
670
|
-
}
|
|
671
|
-
if (s[n] === void 0) {
|
|
672
|
-
s[n] = [r];
|
|
673
|
-
return;
|
|
674
|
-
}
|
|
675
|
-
s[n] = [].concat(s[n], r);
|
|
676
|
-
};
|
|
677
|
-
case "comma":
|
|
678
|
-
case "separator":
|
|
679
|
-
return (n, r, s) => {
|
|
680
|
-
let o = typeof r == "string" && r.includes(t.arrayFormatSeparator), u = typeof r == "string" && !o && me(r, t).includes(t.arrayFormatSeparator);
|
|
681
|
-
r = u ? me(r, t) : r;
|
|
682
|
-
let l = o || u ? r.split(t.arrayFormatSeparator).map((d) => me(d, t)) : r === null ? r : me(r, t);
|
|
683
|
-
s[n] = l;
|
|
684
|
-
};
|
|
685
|
-
default:
|
|
686
|
-
return (n, r, s) => {
|
|
687
|
-
if (s[n] === void 0) {
|
|
688
|
-
s[n] = r;
|
|
689
|
-
return;
|
|
690
|
-
}
|
|
691
|
-
s[n] = [].concat(s[n], r);
|
|
692
|
-
};
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
__name(yc, "yc");
|
|
696
|
-
function xs(t) {
|
|
697
|
-
if (typeof t != "string" || t.length !== 1) throw new TypeError("arrayFormatSeparator must be single character string");
|
|
698
|
-
}
|
|
699
|
-
__name(xs, "xs");
|
|
700
|
-
function O(t, e) {
|
|
701
|
-
return e.encode ? e.strict ? pc(t) : encodeURIComponent(t) : t;
|
|
702
|
-
}
|
|
703
|
-
__name(O, "O");
|
|
704
|
-
function me(t, e) {
|
|
705
|
-
return e.decode ? hc(t) : t;
|
|
706
|
-
}
|
|
707
|
-
__name(me, "me");
|
|
708
|
-
function Ss(t) {
|
|
709
|
-
return Array.isArray(t) ? t.sort() : typeof t == "object" ? Ss(Object.keys(t)).sort((e, n) => Number(e) - Number(n)).map((e) => t[e]) : t;
|
|
710
|
-
}
|
|
711
|
-
__name(Ss, "Ss");
|
|
712
|
-
function ks(t) {
|
|
713
|
-
let e = t.indexOf("#");
|
|
714
|
-
return e !== -1 && (t = t.slice(0, e)), t;
|
|
715
|
-
}
|
|
716
|
-
__name(ks, "ks");
|
|
717
|
-
function Ac(t) {
|
|
718
|
-
let e = "", n = t.indexOf("#");
|
|
719
|
-
return n !== -1 && (e = t.slice(n)), e;
|
|
720
|
-
}
|
|
721
|
-
__name(Ac, "Ac");
|
|
722
|
-
function Ps(t) {
|
|
723
|
-
t = ks(t);
|
|
724
|
-
let e = t.indexOf("?");
|
|
725
|
-
return e === -1 ? "" : t.slice(e + 1);
|
|
726
|
-
}
|
|
727
|
-
__name(Ps, "Ps");
|
|
728
|
-
function Fs(t, e) {
|
|
729
|
-
return e.parseNumbers && !Number.isNaN(Number(t)) && typeof t == "string" && t.trim() !== "" ? t = Number(t) : e.parseBooleans && t !== null && (t.toLowerCase() === "true" || t.toLowerCase() === "false") && (t = t.toLowerCase() === "true"), t;
|
|
730
|
-
}
|
|
731
|
-
__name(Fs, "Fs");
|
|
732
|
-
function Ts(t, e) {
|
|
733
|
-
e = Object.assign({ decode: true, sort: true, arrayFormat: "none", arrayFormatSeparator: ",", parseNumbers: false, parseBooleans: false }, e), xs(e.arrayFormatSeparator);
|
|
734
|
-
let n = yc(e), r = /* @__PURE__ */ Object.create(null);
|
|
735
|
-
if (typeof t != "string" || (t = t.trim().replace(/^[?#&]/, ""), !t)) return r;
|
|
736
|
-
for (let s of t.split("&")) {
|
|
737
|
-
if (s === "") continue;
|
|
738
|
-
let [o, u] = bs(e.decode ? s.replace(/\+/g, " ") : s, "=");
|
|
739
|
-
u = u === void 0 ? null : ["comma", "separator"].includes(e.arrayFormat) ? u : me(u, e), n(me(o, e), u, r);
|
|
740
|
-
}
|
|
741
|
-
for (let s of Object.keys(r)) {
|
|
742
|
-
let o = r[s];
|
|
743
|
-
if (typeof o == "object" && o !== null) for (let u of Object.keys(o)) o[u] = Fs(o[u], e);
|
|
744
|
-
else r[s] = Fs(o, e);
|
|
745
|
-
}
|
|
746
|
-
return e.sort === false ? r : (e.sort === true ? Object.keys(r).sort() : Object.keys(r).sort(e.sort)).reduce((s, o) => {
|
|
747
|
-
let u = r[o];
|
|
748
|
-
return u && typeof u == "object" && !Array.isArray(u) ? s[o] = Ss(u) : s[o] = u, s;
|
|
749
|
-
}, /* @__PURE__ */ Object.create(null));
|
|
750
|
-
}
|
|
751
|
-
__name(Ts, "Ts");
|
|
752
|
-
q.extract = Ps;
|
|
753
|
-
q.parse = Ts;
|
|
754
|
-
q.stringify = (t, e) => {
|
|
755
|
-
if (!t) return "";
|
|
756
|
-
e = Object.assign({ encode: true, strict: true, arrayFormat: "none", arrayFormatSeparator: "," }, e), xs(e.arrayFormatSeparator);
|
|
757
|
-
let n = /* @__PURE__ */ __name((u) => e.skipNull && Dc(t[u]) || e.skipEmptyString && t[u] === "", "n"), r = mc(e), s = {};
|
|
758
|
-
for (let u of Object.keys(t)) n(u) || (s[u] = t[u]);
|
|
759
|
-
let o = Object.keys(s);
|
|
760
|
-
return e.sort !== false && o.sort(e.sort), o.map((u) => {
|
|
761
|
-
let l = t[u];
|
|
762
|
-
return l === void 0 ? "" : l === null ? O(u, e) : Array.isArray(l) ? l.reduce(r(u), []).join("&") : O(u, e) + "=" + O(l, e);
|
|
763
|
-
}).filter((u) => u.length > 0).join("&");
|
|
764
|
-
};
|
|
765
|
-
q.parseUrl = (t, e) => {
|
|
766
|
-
e = Object.assign({ decode: true }, e);
|
|
767
|
-
let [n, r] = bs(t, "#");
|
|
768
|
-
return Object.assign({ url: n.split("?")[0] || "", query: Ts(Ps(t), e) }, e && e.parseFragmentIdentifier && r ? { fragmentIdentifier: me(r, e) } : {});
|
|
769
|
-
};
|
|
770
|
-
q.stringifyUrl = (t, e) => {
|
|
771
|
-
e = Object.assign({ encode: true, strict: true }, e);
|
|
772
|
-
let n = ks(t.url).split("?")[0] || "", r = q.extract(t.url), s = q.parse(r, { sort: false }), o = Object.assign(s, t.query), u = q.stringify(o, e);
|
|
773
|
-
u && (u = `?${u}`);
|
|
774
|
-
let l = Ac(t.url);
|
|
775
|
-
return t.fragmentIdentifier && (l = `#${O(t.fragmentIdentifier, e)}`), `${n}${u}${l}`;
|
|
776
|
-
};
|
|
777
|
-
q.pick = (t, e, n) => {
|
|
778
|
-
n = Object.assign({ parseFragmentIdentifier: true }, n);
|
|
779
|
-
let { url: r, query: s, fragmentIdentifier: o } = q.parseUrl(t, n);
|
|
780
|
-
return q.stringifyUrl({ url: r, query: gc(s, e), fragmentIdentifier: o }, n);
|
|
781
|
-
};
|
|
782
|
-
q.exclude = (t, e, n) => {
|
|
783
|
-
let r = Array.isArray(e) ? (s) => !e.includes(s) : (s, o) => !e(s, o);
|
|
784
|
-
return q.pick(t, r, n);
|
|
785
|
-
};
|
|
786
|
-
});
|
|
787
|
-
var Os = p((Pt, Tt) => {
|
|
788
|
-
(function(t, e) {
|
|
789
|
-
typeof Pt == "object" && typeof Tt < "u" ? Tt.exports = e() : typeof define == "function" && define.amd ? define(e) : t.JSON5 = e();
|
|
790
|
-
})(Pt, (function() {
|
|
791
|
-
"use strict";
|
|
792
|
-
function t(i, a) {
|
|
793
|
-
return a = { exports: {} }, i(a, a.exports), a.exports;
|
|
794
|
-
}
|
|
795
|
-
__name(t, "t");
|
|
796
|
-
var e = t(function(i) {
|
|
797
|
-
var a = i.exports = typeof window < "u" && window.Math == Math ? window : typeof self < "u" && self.Math == Math ? self : Function("return this")();
|
|
798
|
-
typeof __g == "number" && (__g = a);
|
|
799
|
-
}), n = t(function(i) {
|
|
800
|
-
var a = i.exports = { version: "2.6.5" };
|
|
801
|
-
typeof __e == "number" && (__e = a);
|
|
802
|
-
}), r = n.version, s = /* @__PURE__ */ __name(function(i) {
|
|
803
|
-
return typeof i == "object" ? i !== null : typeof i == "function";
|
|
804
|
-
}, "s"), o = /* @__PURE__ */ __name(function(i) {
|
|
805
|
-
if (!s(i)) throw TypeError(i + " is not an object!");
|
|
806
|
-
return i;
|
|
807
|
-
}, "o"), u = /* @__PURE__ */ __name(function(i) {
|
|
808
|
-
try {
|
|
809
|
-
return !!i();
|
|
810
|
-
} catch {
|
|
811
|
-
return true;
|
|
812
|
-
}
|
|
813
|
-
}, "u"), l = !u(function() {
|
|
814
|
-
return Object.defineProperty({}, "a", { get: /* @__PURE__ */ __name(function() {
|
|
815
|
-
return 7;
|
|
816
|
-
}, "get") }).a != 7;
|
|
817
|
-
}), d = e.document, v = s(d) && s(d.createElement), N = /* @__PURE__ */ __name(function(i) {
|
|
818
|
-
return v ? d.createElement(i) : {};
|
|
819
|
-
}, "N"), U = !l && !u(function() {
|
|
820
|
-
return Object.defineProperty(N("div"), "a", { get: /* @__PURE__ */ __name(function() {
|
|
821
|
-
return 7;
|
|
822
|
-
}, "get") }).a != 7;
|
|
823
|
-
}), oe = /* @__PURE__ */ __name(function(i, a) {
|
|
824
|
-
if (!s(i)) return i;
|
|
825
|
-
var h, f;
|
|
826
|
-
if (a && typeof (h = i.toString) == "function" && !s(f = h.call(i)) || typeof (h = i.valueOf) == "function" && !s(f = h.call(i)) || !a && typeof (h = i.toString) == "function" && !s(f = h.call(i))) return f;
|
|
827
|
-
throw TypeError("Can't convert object to primitive value");
|
|
828
|
-
}, "oe"), lt = Object.defineProperty, dt = l ? Object.defineProperty : function(a, h, f) {
|
|
829
|
-
if (o(a), h = oe(h, true), o(f), U) try {
|
|
830
|
-
return lt(a, h, f);
|
|
831
|
-
} catch {
|
|
832
|
-
}
|
|
833
|
-
if ("get" in f || "set" in f) throw TypeError("Accessors not supported!");
|
|
834
|
-
return "value" in f && (a[h] = f.value), a;
|
|
835
|
-
}, ft = { f: dt }, W = /* @__PURE__ */ __name(function(i, a) {
|
|
836
|
-
return { enumerable: !(i & 1), configurable: !(i & 2), writable: !(i & 4), value: a };
|
|
837
|
-
}, "W"), X = l ? function(i, a, h) {
|
|
838
|
-
return ft.f(i, a, W(1, h));
|
|
839
|
-
} : function(i, a, h) {
|
|
840
|
-
return i[a] = h, i;
|
|
841
|
-
}, K = {}.hasOwnProperty, Wt = /* @__PURE__ */ __name(function(i, a) {
|
|
842
|
-
return K.call(i, a);
|
|
843
|
-
}, "Wt"), mi = 0, yi = Math.random(), Ai = /* @__PURE__ */ __name(function(i) {
|
|
844
|
-
return "Symbol(".concat(i === void 0 ? "" : i, ")_", (++mi + yi).toString(36));
|
|
845
|
-
}, "Ai"), Ei = false, wi = t(function(i) {
|
|
846
|
-
var a = "__core-js_shared__", h = e[a] || (e[a] = {});
|
|
847
|
-
(i.exports = function(f, D) {
|
|
848
|
-
return h[f] || (h[f] = D !== void 0 ? D : {});
|
|
849
|
-
})("versions", []).push({ version: n.version, mode: Ei ? "pure" : "global", copyright: "© 2019 Denis Pushkarev (zloirock.ru)" });
|
|
850
|
-
}), pt = wi("native-function-to-string", Function.toString), Ci = t(function(i) {
|
|
851
|
-
var a = Ai("src"), h = "toString", f = ("" + pt).split(h);
|
|
852
|
-
n.inspectSource = function(D) {
|
|
853
|
-
return pt.call(D);
|
|
854
|
-
}, (i.exports = function(D, E, C, M) {
|
|
855
|
-
var k = typeof C == "function";
|
|
856
|
-
k && (Wt(C, "name") || X(C, "name", E)), D[E] !== C && (k && (Wt(C, a) || X(C, a, D[E] ? "" + D[E] : f.join(String(E)))), D === e ? D[E] = C : M ? D[E] ? D[E] = C : X(D, E, C) : (delete D[E], X(D, E, C)));
|
|
857
|
-
})(Function.prototype, h, function() {
|
|
858
|
-
return typeof this == "function" && this[a] || pt.call(this);
|
|
859
|
-
});
|
|
860
|
-
}), vi = /* @__PURE__ */ __name(function(i) {
|
|
861
|
-
if (typeof i != "function") throw TypeError(i + " is not a function!");
|
|
862
|
-
return i;
|
|
863
|
-
}, "vi"), Vt = /* @__PURE__ */ __name(function(i, a, h) {
|
|
864
|
-
if (vi(i), a === void 0) return i;
|
|
865
|
-
switch (h) {
|
|
866
|
-
case 1:
|
|
867
|
-
return function(f) {
|
|
868
|
-
return i.call(a, f);
|
|
869
|
-
};
|
|
870
|
-
case 2:
|
|
871
|
-
return function(f, D) {
|
|
872
|
-
return i.call(a, f, D);
|
|
873
|
-
};
|
|
874
|
-
case 3:
|
|
875
|
-
return function(f, D, E) {
|
|
876
|
-
return i.call(a, f, D, E);
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
return function() {
|
|
880
|
-
return i.apply(a, arguments);
|
|
881
|
-
};
|
|
882
|
-
}, "Vt"), ht = "prototype", R = /* @__PURE__ */ __name(function(i, a, h) {
|
|
883
|
-
var f = i & R.F, D = i & R.G, E = i & R.S, C = i & R.P, M = i & R.B, k = D ? e : E ? e[a] || (e[a] = {}) : (e[a] || {})[ht], he = D ? n : n[a] || (n[a] = {}), Ee = he[ht] || (he[ht] = {}), z, Z, j, we;
|
|
884
|
-
D && (h = a);
|
|
885
|
-
for (z in h) Z = !f && k && k[z] !== void 0, j = (Z ? k : h)[z], we = M && Z ? Vt(j, e) : C && typeof j == "function" ? Vt(Function.call, j) : j, k && Ci(k, z, j, i & R.U), he[z] != j && X(he, z, we), C && Ee[z] != j && (Ee[z] = j);
|
|
886
|
-
}, "R");
|
|
887
|
-
e.core = n, R.F = 1, R.G = 2, R.S = 4, R.P = 8, R.B = 16, R.W = 32, R.U = 64, R.R = 128;
|
|
888
|
-
var Pe = R, Fi = Math.ceil, bi = Math.floor, Kt = /* @__PURE__ */ __name(function(i) {
|
|
889
|
-
return isNaN(i = +i) ? 0 : (i > 0 ? bi : Fi)(i);
|
|
890
|
-
}, "Kt"), xi = /* @__PURE__ */ __name(function(i) {
|
|
891
|
-
if (i == null) throw TypeError("Can't call method on " + i);
|
|
892
|
-
return i;
|
|
893
|
-
}, "xi"), Si = /* @__PURE__ */ __name(function(i) {
|
|
894
|
-
return function(a, h) {
|
|
895
|
-
var f = String(xi(a)), D = Kt(h), E = f.length, C, M;
|
|
896
|
-
return D < 0 || D >= E ? i ? "" : void 0 : (C = f.charCodeAt(D), C < 55296 || C > 56319 || D + 1 === E || (M = f.charCodeAt(D + 1)) < 56320 || M > 57343 ? i ? f.charAt(D) : C : i ? f.slice(D, D + 2) : (C - 55296 << 10) + (M - 56320) + 65536);
|
|
897
|
-
};
|
|
898
|
-
}, "Si"), ki = Si(false);
|
|
899
|
-
Pe(Pe.P, "String", { codePointAt: /* @__PURE__ */ __name(function(a) {
|
|
900
|
-
return ki(this, a);
|
|
901
|
-
}, "codePointAt") });
|
|
902
|
-
var rl = n.String.codePointAt, Pi = Math.max, Ti = Math.min, Bi = /* @__PURE__ */ __name(function(i, a) {
|
|
903
|
-
return i = Kt(i), i < 0 ? Pi(i + a, 0) : Ti(i, a);
|
|
904
|
-
}, "Bi"), Ht = String.fromCharCode, zt = String.fromCodePoint;
|
|
905
|
-
Pe(Pe.S + Pe.F * (!!zt && zt.length != 1), "String", { fromCodePoint: /* @__PURE__ */ __name(function(a) {
|
|
906
|
-
for (var h = arguments, f = [], D = arguments.length, E = 0, C; D > E; ) {
|
|
907
|
-
if (C = +h[E++], Bi(C, 1114111) !== C) throw RangeError(C + " is not a valid code point");
|
|
908
|
-
f.push(C < 65536 ? Ht(C) : Ht(((C -= 65536) >> 10) + 55296, C % 1024 + 56320));
|
|
909
|
-
}
|
|
910
|
-
return f.join("");
|
|
911
|
-
}, "fromCodePoint") });
|
|
912
|
-
var sl = n.String.fromCodePoint, Oi = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/, Ii = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/, Ni = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/, gt = { Space_Separator: Oi, ID_Start: Ii, ID_Continue: Ni }, S = { isSpaceSeparator: /* @__PURE__ */ __name(function(a) {
|
|
913
|
-
return typeof a == "string" && gt.Space_Separator.test(a);
|
|
914
|
-
}, "isSpaceSeparator"), isIdStartChar: /* @__PURE__ */ __name(function(a) {
|
|
915
|
-
return typeof a == "string" && (a >= "a" && a <= "z" || a >= "A" && a <= "Z" || a === "$" || a === "_" || gt.ID_Start.test(a));
|
|
916
|
-
}, "isIdStartChar"), isIdContinueChar: /* @__PURE__ */ __name(function(a) {
|
|
917
|
-
return typeof a == "string" && (a >= "a" && a <= "z" || a >= "A" && a <= "Z" || a >= "0" && a <= "9" || a === "$" || a === "_" || a === "" || a === "" || gt.ID_Continue.test(a));
|
|
918
|
-
}, "isIdContinueChar"), isDigit: /* @__PURE__ */ __name(function(a) {
|
|
919
|
-
return typeof a == "string" && /[0-9]/.test(a);
|
|
920
|
-
}, "isDigit"), isHexDigit: /* @__PURE__ */ __name(function(a) {
|
|
921
|
-
return typeof a == "string" && /[0-9A-Fa-f]/.test(a);
|
|
922
|
-
}, "isHexDigit") }, Dt, L, ee, We, ue, H, P, mt, Te, _i = /* @__PURE__ */ __name(function(a, h) {
|
|
923
|
-
Dt = String(a), L = "start", ee = [], We = 0, ue = 1, H = 0, P = void 0, mt = void 0, Te = void 0;
|
|
924
|
-
do
|
|
925
|
-
P = $i(), Mi[L]();
|
|
926
|
-
while (P.type !== "eof");
|
|
927
|
-
return typeof h == "function" ? yt({ "": Te }, "", h) : Te;
|
|
928
|
-
}, "_i");
|
|
929
|
-
function yt(i, a, h) {
|
|
930
|
-
var f = i[a];
|
|
931
|
-
if (f != null && typeof f == "object") if (Array.isArray(f)) for (var D = 0; D < f.length; D++) {
|
|
932
|
-
var E = String(D), C = yt(f, E, h);
|
|
933
|
-
C === void 0 ? delete f[E] : Object.defineProperty(f, E, { value: C, writable: true, enumerable: true, configurable: true });
|
|
934
|
-
}
|
|
935
|
-
else for (var M in f) {
|
|
936
|
-
var k = yt(f, M, h);
|
|
937
|
-
k === void 0 ? delete f[M] : Object.defineProperty(f, M, { value: k, writable: true, enumerable: true, configurable: true });
|
|
938
|
-
}
|
|
939
|
-
return h.call(i, a, f);
|
|
940
|
-
}
|
|
941
|
-
__name(yt, "yt");
|
|
942
|
-
var A, m, Be, te, w;
|
|
943
|
-
function $i() {
|
|
944
|
-
for (A = "default", m = "", Be = false, te = 1; ; ) {
|
|
945
|
-
w = ne();
|
|
946
|
-
var i = Gt[A]();
|
|
947
|
-
if (i) return i;
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
__name($i, "$i");
|
|
951
|
-
function ne() {
|
|
952
|
-
if (Dt[We]) return String.fromCodePoint(Dt.codePointAt(We));
|
|
953
|
-
}
|
|
954
|
-
__name(ne, "ne");
|
|
955
|
-
function c() {
|
|
956
|
-
var i = ne();
|
|
957
|
-
return i === `
|
|
958
|
-
` ? (ue++, H = 0) : i ? H += i.length : H++, i && (We += i.length), i;
|
|
959
|
-
}
|
|
960
|
-
__name(c, "c");
|
|
961
|
-
var Gt = { default: /* @__PURE__ */ __name(function() {
|
|
962
|
-
switch (w) {
|
|
963
|
-
case " ":
|
|
964
|
-
case "\v":
|
|
965
|
-
case "\f":
|
|
966
|
-
case " ":
|
|
967
|
-
case " ":
|
|
968
|
-
case "\uFEFF":
|
|
969
|
-
case `
|
|
970
|
-
`:
|
|
971
|
-
case "\r":
|
|
972
|
-
case "\u2028":
|
|
973
|
-
case "\u2029":
|
|
974
|
-
c();
|
|
975
|
-
return;
|
|
976
|
-
case "/":
|
|
977
|
-
c(), A = "comment";
|
|
978
|
-
return;
|
|
979
|
-
case void 0:
|
|
980
|
-
return c(), b("eof");
|
|
981
|
-
}
|
|
982
|
-
if (S.isSpaceSeparator(w)) {
|
|
983
|
-
c();
|
|
984
|
-
return;
|
|
985
|
-
}
|
|
986
|
-
return Gt[L]();
|
|
987
|
-
}, "default"), comment: /* @__PURE__ */ __name(function() {
|
|
988
|
-
switch (w) {
|
|
989
|
-
case "*":
|
|
990
|
-
c(), A = "multiLineComment";
|
|
991
|
-
return;
|
|
992
|
-
case "/":
|
|
993
|
-
c(), A = "singleLineComment";
|
|
994
|
-
return;
|
|
995
|
-
}
|
|
996
|
-
throw x(c());
|
|
997
|
-
}, "comment"), multiLineComment: /* @__PURE__ */ __name(function() {
|
|
998
|
-
switch (w) {
|
|
999
|
-
case "*":
|
|
1000
|
-
c(), A = "multiLineCommentAsterisk";
|
|
1001
|
-
return;
|
|
1002
|
-
case void 0:
|
|
1003
|
-
throw x(c());
|
|
1004
|
-
}
|
|
1005
|
-
c();
|
|
1006
|
-
}, "multiLineComment"), multiLineCommentAsterisk: /* @__PURE__ */ __name(function() {
|
|
1007
|
-
switch (w) {
|
|
1008
|
-
case "*":
|
|
1009
|
-
c();
|
|
1010
|
-
return;
|
|
1011
|
-
case "/":
|
|
1012
|
-
c(), A = "default";
|
|
1013
|
-
return;
|
|
1014
|
-
case void 0:
|
|
1015
|
-
throw x(c());
|
|
1016
|
-
}
|
|
1017
|
-
c(), A = "multiLineComment";
|
|
1018
|
-
}, "multiLineCommentAsterisk"), singleLineComment: /* @__PURE__ */ __name(function() {
|
|
1019
|
-
switch (w) {
|
|
1020
|
-
case `
|
|
1021
|
-
`:
|
|
1022
|
-
case "\r":
|
|
1023
|
-
case "\u2028":
|
|
1024
|
-
case "\u2029":
|
|
1025
|
-
c(), A = "default";
|
|
1026
|
-
return;
|
|
1027
|
-
case void 0:
|
|
1028
|
-
return c(), b("eof");
|
|
1029
|
-
}
|
|
1030
|
-
c();
|
|
1031
|
-
}, "singleLineComment"), value: /* @__PURE__ */ __name(function() {
|
|
1032
|
-
switch (w) {
|
|
1033
|
-
case "{":
|
|
1034
|
-
case "[":
|
|
1035
|
-
return b("punctuator", c());
|
|
1036
|
-
case "n":
|
|
1037
|
-
return c(), fe("ull"), b("null", null);
|
|
1038
|
-
case "t":
|
|
1039
|
-
return c(), fe("rue"), b("boolean", true);
|
|
1040
|
-
case "f":
|
|
1041
|
-
return c(), fe("alse"), b("boolean", false);
|
|
1042
|
-
case "-":
|
|
1043
|
-
case "+":
|
|
1044
|
-
c() === "-" && (te = -1), A = "sign";
|
|
1045
|
-
return;
|
|
1046
|
-
case ".":
|
|
1047
|
-
m = c(), A = "decimalPointLeading";
|
|
1048
|
-
return;
|
|
1049
|
-
case "0":
|
|
1050
|
-
m = c(), A = "zero";
|
|
1051
|
-
return;
|
|
1052
|
-
case "1":
|
|
1053
|
-
case "2":
|
|
1054
|
-
case "3":
|
|
1055
|
-
case "4":
|
|
1056
|
-
case "5":
|
|
1057
|
-
case "6":
|
|
1058
|
-
case "7":
|
|
1059
|
-
case "8":
|
|
1060
|
-
case "9":
|
|
1061
|
-
m = c(), A = "decimalInteger";
|
|
1062
|
-
return;
|
|
1063
|
-
case "I":
|
|
1064
|
-
return c(), fe("nfinity"), b("numeric", 1 / 0);
|
|
1065
|
-
case "N":
|
|
1066
|
-
return c(), fe("aN"), b("numeric", NaN);
|
|
1067
|
-
case '"':
|
|
1068
|
-
case "'":
|
|
1069
|
-
Be = c() === '"', m = "", A = "string";
|
|
1070
|
-
return;
|
|
1071
|
-
}
|
|
1072
|
-
throw x(c());
|
|
1073
|
-
}, "value"), identifierNameStartEscape: /* @__PURE__ */ __name(function() {
|
|
1074
|
-
if (w !== "u") throw x(c());
|
|
1075
|
-
c();
|
|
1076
|
-
var a = At();
|
|
1077
|
-
switch (a) {
|
|
1078
|
-
case "$":
|
|
1079
|
-
case "_":
|
|
1080
|
-
break;
|
|
1081
|
-
default:
|
|
1082
|
-
if (!S.isIdStartChar(a)) throw Yt();
|
|
1083
|
-
break;
|
|
1084
|
-
}
|
|
1085
|
-
m += a, A = "identifierName";
|
|
1086
|
-
}, "identifierNameStartEscape"), identifierName: /* @__PURE__ */ __name(function() {
|
|
1087
|
-
switch (w) {
|
|
1088
|
-
case "$":
|
|
1089
|
-
case "_":
|
|
1090
|
-
case "":
|
|
1091
|
-
case "":
|
|
1092
|
-
m += c();
|
|
1093
|
-
return;
|
|
1094
|
-
case "\\":
|
|
1095
|
-
c(), A = "identifierNameEscape";
|
|
1096
|
-
return;
|
|
1097
|
-
}
|
|
1098
|
-
if (S.isIdContinueChar(w)) {
|
|
1099
|
-
m += c();
|
|
1100
|
-
return;
|
|
1101
|
-
}
|
|
1102
|
-
return b("identifier", m);
|
|
1103
|
-
}, "identifierName"), identifierNameEscape: /* @__PURE__ */ __name(function() {
|
|
1104
|
-
if (w !== "u") throw x(c());
|
|
1105
|
-
c();
|
|
1106
|
-
var a = At();
|
|
1107
|
-
switch (a) {
|
|
1108
|
-
case "$":
|
|
1109
|
-
case "_":
|
|
1110
|
-
case "":
|
|
1111
|
-
case "":
|
|
1112
|
-
break;
|
|
1113
|
-
default:
|
|
1114
|
-
if (!S.isIdContinueChar(a)) throw Yt();
|
|
1115
|
-
break;
|
|
1116
|
-
}
|
|
1117
|
-
m += a, A = "identifierName";
|
|
1118
|
-
}, "identifierNameEscape"), sign: /* @__PURE__ */ __name(function() {
|
|
1119
|
-
switch (w) {
|
|
1120
|
-
case ".":
|
|
1121
|
-
m = c(), A = "decimalPointLeading";
|
|
1122
|
-
return;
|
|
1123
|
-
case "0":
|
|
1124
|
-
m = c(), A = "zero";
|
|
1125
|
-
return;
|
|
1126
|
-
case "1":
|
|
1127
|
-
case "2":
|
|
1128
|
-
case "3":
|
|
1129
|
-
case "4":
|
|
1130
|
-
case "5":
|
|
1131
|
-
case "6":
|
|
1132
|
-
case "7":
|
|
1133
|
-
case "8":
|
|
1134
|
-
case "9":
|
|
1135
|
-
m = c(), A = "decimalInteger";
|
|
1136
|
-
return;
|
|
1137
|
-
case "I":
|
|
1138
|
-
return c(), fe("nfinity"), b("numeric", te * (1 / 0));
|
|
1139
|
-
case "N":
|
|
1140
|
-
return c(), fe("aN"), b("numeric", NaN);
|
|
1141
|
-
}
|
|
1142
|
-
throw x(c());
|
|
1143
|
-
}, "sign"), zero: /* @__PURE__ */ __name(function() {
|
|
1144
|
-
switch (w) {
|
|
1145
|
-
case ".":
|
|
1146
|
-
m += c(), A = "decimalPoint";
|
|
1147
|
-
return;
|
|
1148
|
-
case "e":
|
|
1149
|
-
case "E":
|
|
1150
|
-
m += c(), A = "decimalExponent";
|
|
1151
|
-
return;
|
|
1152
|
-
case "x":
|
|
1153
|
-
case "X":
|
|
1154
|
-
m += c(), A = "hexadecimal";
|
|
1155
|
-
return;
|
|
1156
|
-
}
|
|
1157
|
-
return b("numeric", te * 0);
|
|
1158
|
-
}, "zero"), decimalInteger: /* @__PURE__ */ __name(function() {
|
|
1159
|
-
switch (w) {
|
|
1160
|
-
case ".":
|
|
1161
|
-
m += c(), A = "decimalPoint";
|
|
1162
|
-
return;
|
|
1163
|
-
case "e":
|
|
1164
|
-
case "E":
|
|
1165
|
-
m += c(), A = "decimalExponent";
|
|
1166
|
-
return;
|
|
1167
|
-
}
|
|
1168
|
-
if (S.isDigit(w)) {
|
|
1169
|
-
m += c();
|
|
1170
|
-
return;
|
|
1171
|
-
}
|
|
1172
|
-
return b("numeric", te * Number(m));
|
|
1173
|
-
}, "decimalInteger"), decimalPointLeading: /* @__PURE__ */ __name(function() {
|
|
1174
|
-
if (S.isDigit(w)) {
|
|
1175
|
-
m += c(), A = "decimalFraction";
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
throw x(c());
|
|
1179
|
-
}, "decimalPointLeading"), decimalPoint: /* @__PURE__ */ __name(function() {
|
|
1180
|
-
switch (w) {
|
|
1181
|
-
case "e":
|
|
1182
|
-
case "E":
|
|
1183
|
-
m += c(), A = "decimalExponent";
|
|
1184
|
-
return;
|
|
1185
|
-
}
|
|
1186
|
-
if (S.isDigit(w)) {
|
|
1187
|
-
m += c(), A = "decimalFraction";
|
|
1188
|
-
return;
|
|
1189
|
-
}
|
|
1190
|
-
return b("numeric", te * Number(m));
|
|
1191
|
-
}, "decimalPoint"), decimalFraction: /* @__PURE__ */ __name(function() {
|
|
1192
|
-
switch (w) {
|
|
1193
|
-
case "e":
|
|
1194
|
-
case "E":
|
|
1195
|
-
m += c(), A = "decimalExponent";
|
|
1196
|
-
return;
|
|
1197
|
-
}
|
|
1198
|
-
if (S.isDigit(w)) {
|
|
1199
|
-
m += c();
|
|
1200
|
-
return;
|
|
1201
|
-
}
|
|
1202
|
-
return b("numeric", te * Number(m));
|
|
1203
|
-
}, "decimalFraction"), decimalExponent: /* @__PURE__ */ __name(function() {
|
|
1204
|
-
switch (w) {
|
|
1205
|
-
case "+":
|
|
1206
|
-
case "-":
|
|
1207
|
-
m += c(), A = "decimalExponentSign";
|
|
1208
|
-
return;
|
|
1209
|
-
}
|
|
1210
|
-
if (S.isDigit(w)) {
|
|
1211
|
-
m += c(), A = "decimalExponentInteger";
|
|
1212
|
-
return;
|
|
1213
|
-
}
|
|
1214
|
-
throw x(c());
|
|
1215
|
-
}, "decimalExponent"), decimalExponentSign: /* @__PURE__ */ __name(function() {
|
|
1216
|
-
if (S.isDigit(w)) {
|
|
1217
|
-
m += c(), A = "decimalExponentInteger";
|
|
1218
|
-
return;
|
|
1219
|
-
}
|
|
1220
|
-
throw x(c());
|
|
1221
|
-
}, "decimalExponentSign"), decimalExponentInteger: /* @__PURE__ */ __name(function() {
|
|
1222
|
-
if (S.isDigit(w)) {
|
|
1223
|
-
m += c();
|
|
1224
|
-
return;
|
|
1225
|
-
}
|
|
1226
|
-
return b("numeric", te * Number(m));
|
|
1227
|
-
}, "decimalExponentInteger"), hexadecimal: /* @__PURE__ */ __name(function() {
|
|
1228
|
-
if (S.isHexDigit(w)) {
|
|
1229
|
-
m += c(), A = "hexadecimalInteger";
|
|
1230
|
-
return;
|
|
1231
|
-
}
|
|
1232
|
-
throw x(c());
|
|
1233
|
-
}, "hexadecimal"), hexadecimalInteger: /* @__PURE__ */ __name(function() {
|
|
1234
|
-
if (S.isHexDigit(w)) {
|
|
1235
|
-
m += c();
|
|
1236
|
-
return;
|
|
1237
|
-
}
|
|
1238
|
-
return b("numeric", te * Number(m));
|
|
1239
|
-
}, "hexadecimalInteger"), string: /* @__PURE__ */ __name(function() {
|
|
1240
|
-
switch (w) {
|
|
1241
|
-
case "\\":
|
|
1242
|
-
c(), m += Ri();
|
|
1243
|
-
return;
|
|
1244
|
-
case '"':
|
|
1245
|
-
if (Be) return c(), b("string", m);
|
|
1246
|
-
m += c();
|
|
1247
|
-
return;
|
|
1248
|
-
case "'":
|
|
1249
|
-
if (!Be) return c(), b("string", m);
|
|
1250
|
-
m += c();
|
|
1251
|
-
return;
|
|
1252
|
-
case `
|
|
1253
|
-
`:
|
|
1254
|
-
case "\r":
|
|
1255
|
-
throw x(c());
|
|
1256
|
-
case "\u2028":
|
|
1257
|
-
case "\u2029":
|
|
1258
|
-
ji(w);
|
|
1259
|
-
break;
|
|
1260
|
-
case void 0:
|
|
1261
|
-
throw x(c());
|
|
1262
|
-
}
|
|
1263
|
-
m += c();
|
|
1264
|
-
}, "string"), start: /* @__PURE__ */ __name(function() {
|
|
1265
|
-
switch (w) {
|
|
1266
|
-
case "{":
|
|
1267
|
-
case "[":
|
|
1268
|
-
return b("punctuator", c());
|
|
1269
|
-
}
|
|
1270
|
-
A = "value";
|
|
1271
|
-
}, "start"), beforePropertyName: /* @__PURE__ */ __name(function() {
|
|
1272
|
-
switch (w) {
|
|
1273
|
-
case "$":
|
|
1274
|
-
case "_":
|
|
1275
|
-
m = c(), A = "identifierName";
|
|
1276
|
-
return;
|
|
1277
|
-
case "\\":
|
|
1278
|
-
c(), A = "identifierNameStartEscape";
|
|
1279
|
-
return;
|
|
1280
|
-
case "}":
|
|
1281
|
-
return b("punctuator", c());
|
|
1282
|
-
case '"':
|
|
1283
|
-
case "'":
|
|
1284
|
-
Be = c() === '"', A = "string";
|
|
1285
|
-
return;
|
|
1286
|
-
}
|
|
1287
|
-
if (S.isIdStartChar(w)) {
|
|
1288
|
-
m += c(), A = "identifierName";
|
|
1289
|
-
return;
|
|
1290
|
-
}
|
|
1291
|
-
throw x(c());
|
|
1292
|
-
}, "beforePropertyName"), afterPropertyName: /* @__PURE__ */ __name(function() {
|
|
1293
|
-
if (w === ":") return b("punctuator", c());
|
|
1294
|
-
throw x(c());
|
|
1295
|
-
}, "afterPropertyName"), beforePropertyValue: /* @__PURE__ */ __name(function() {
|
|
1296
|
-
A = "value";
|
|
1297
|
-
}, "beforePropertyValue"), afterPropertyValue: /* @__PURE__ */ __name(function() {
|
|
1298
|
-
switch (w) {
|
|
1299
|
-
case ",":
|
|
1300
|
-
case "}":
|
|
1301
|
-
return b("punctuator", c());
|
|
1302
|
-
}
|
|
1303
|
-
throw x(c());
|
|
1304
|
-
}, "afterPropertyValue"), beforeArrayValue: /* @__PURE__ */ __name(function() {
|
|
1305
|
-
if (w === "]") return b("punctuator", c());
|
|
1306
|
-
A = "value";
|
|
1307
|
-
}, "beforeArrayValue"), afterArrayValue: /* @__PURE__ */ __name(function() {
|
|
1308
|
-
switch (w) {
|
|
1309
|
-
case ",":
|
|
1310
|
-
case "]":
|
|
1311
|
-
return b("punctuator", c());
|
|
1312
|
-
}
|
|
1313
|
-
throw x(c());
|
|
1314
|
-
}, "afterArrayValue"), end: /* @__PURE__ */ __name(function() {
|
|
1315
|
-
throw x(c());
|
|
1316
|
-
}, "end") };
|
|
1317
|
-
function b(i, a) {
|
|
1318
|
-
return { type: i, value: a, line: ue, column: H };
|
|
1319
|
-
}
|
|
1320
|
-
__name(b, "b");
|
|
1321
|
-
function fe(i) {
|
|
1322
|
-
for (var a = 0, h = i; a < h.length; a += 1) {
|
|
1323
|
-
var f = h[a], D = ne();
|
|
1324
|
-
if (D !== f) throw x(c());
|
|
1325
|
-
c();
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
__name(fe, "fe");
|
|
1329
|
-
function Ri() {
|
|
1330
|
-
var i = ne();
|
|
1331
|
-
switch (i) {
|
|
1332
|
-
case "b":
|
|
1333
|
-
return c(), "\b";
|
|
1334
|
-
case "f":
|
|
1335
|
-
return c(), "\f";
|
|
1336
|
-
case "n":
|
|
1337
|
-
return c(), `
|
|
1338
|
-
`;
|
|
1339
|
-
case "r":
|
|
1340
|
-
return c(), "\r";
|
|
1341
|
-
case "t":
|
|
1342
|
-
return c(), " ";
|
|
1343
|
-
case "v":
|
|
1344
|
-
return c(), "\v";
|
|
1345
|
-
case "0":
|
|
1346
|
-
if (c(), S.isDigit(ne())) throw x(c());
|
|
1347
|
-
return "\0";
|
|
1348
|
-
case "x":
|
|
1349
|
-
return c(), Li();
|
|
1350
|
-
case "u":
|
|
1351
|
-
return c(), At();
|
|
1352
|
-
case `
|
|
1353
|
-
`:
|
|
1354
|
-
case "\u2028":
|
|
1355
|
-
case "\u2029":
|
|
1356
|
-
return c(), "";
|
|
1357
|
-
case "\r":
|
|
1358
|
-
return c(), ne() === `
|
|
1359
|
-
` && c(), "";
|
|
1360
|
-
case "1":
|
|
1361
|
-
case "2":
|
|
1362
|
-
case "3":
|
|
1363
|
-
case "4":
|
|
1364
|
-
case "5":
|
|
1365
|
-
case "6":
|
|
1366
|
-
case "7":
|
|
1367
|
-
case "8":
|
|
1368
|
-
case "9":
|
|
1369
|
-
throw x(c());
|
|
1370
|
-
case void 0:
|
|
1371
|
-
throw x(c());
|
|
1372
|
-
}
|
|
1373
|
-
return c();
|
|
1374
|
-
}
|
|
1375
|
-
__name(Ri, "Ri");
|
|
1376
|
-
function Li() {
|
|
1377
|
-
var i = "", a = ne();
|
|
1378
|
-
if (!S.isHexDigit(a) || (i += c(), a = ne(), !S.isHexDigit(a))) throw x(c());
|
|
1379
|
-
return i += c(), String.fromCodePoint(parseInt(i, 16));
|
|
1380
|
-
}
|
|
1381
|
-
__name(Li, "Li");
|
|
1382
|
-
function At() {
|
|
1383
|
-
for (var i = "", a = 4; a-- > 0; ) {
|
|
1384
|
-
var h = ne();
|
|
1385
|
-
if (!S.isHexDigit(h)) throw x(c());
|
|
1386
|
-
i += c();
|
|
1387
|
-
}
|
|
1388
|
-
return String.fromCodePoint(parseInt(i, 16));
|
|
1389
|
-
}
|
|
1390
|
-
__name(At, "At");
|
|
1391
|
-
var Mi = { start: /* @__PURE__ */ __name(function() {
|
|
1392
|
-
if (P.type === "eof") throw pe();
|
|
1393
|
-
Et();
|
|
1394
|
-
}, "start"), beforePropertyName: /* @__PURE__ */ __name(function() {
|
|
1395
|
-
switch (P.type) {
|
|
1396
|
-
case "identifier":
|
|
1397
|
-
case "string":
|
|
1398
|
-
mt = P.value, L = "afterPropertyName";
|
|
1399
|
-
return;
|
|
1400
|
-
case "punctuator":
|
|
1401
|
-
Ve();
|
|
1402
|
-
return;
|
|
1403
|
-
case "eof":
|
|
1404
|
-
throw pe();
|
|
1405
|
-
}
|
|
1406
|
-
}, "beforePropertyName"), afterPropertyName: /* @__PURE__ */ __name(function() {
|
|
1407
|
-
if (P.type === "eof") throw pe();
|
|
1408
|
-
L = "beforePropertyValue";
|
|
1409
|
-
}, "afterPropertyName"), beforePropertyValue: /* @__PURE__ */ __name(function() {
|
|
1410
|
-
if (P.type === "eof") throw pe();
|
|
1411
|
-
Et();
|
|
1412
|
-
}, "beforePropertyValue"), beforeArrayValue: /* @__PURE__ */ __name(function() {
|
|
1413
|
-
if (P.type === "eof") throw pe();
|
|
1414
|
-
if (P.type === "punctuator" && P.value === "]") {
|
|
1415
|
-
Ve();
|
|
1416
|
-
return;
|
|
1417
|
-
}
|
|
1418
|
-
Et();
|
|
1419
|
-
}, "beforeArrayValue"), afterPropertyValue: /* @__PURE__ */ __name(function() {
|
|
1420
|
-
if (P.type === "eof") throw pe();
|
|
1421
|
-
switch (P.value) {
|
|
1422
|
-
case ",":
|
|
1423
|
-
L = "beforePropertyName";
|
|
1424
|
-
return;
|
|
1425
|
-
case "}":
|
|
1426
|
-
Ve();
|
|
1427
|
-
}
|
|
1428
|
-
}, "afterPropertyValue"), afterArrayValue: /* @__PURE__ */ __name(function() {
|
|
1429
|
-
if (P.type === "eof") throw pe();
|
|
1430
|
-
switch (P.value) {
|
|
1431
|
-
case ",":
|
|
1432
|
-
L = "beforeArrayValue";
|
|
1433
|
-
return;
|
|
1434
|
-
case "]":
|
|
1435
|
-
Ve();
|
|
1436
|
-
}
|
|
1437
|
-
}, "afterArrayValue"), end: /* @__PURE__ */ __name(function() {
|
|
1438
|
-
}, "end") };
|
|
1439
|
-
function Et() {
|
|
1440
|
-
var i;
|
|
1441
|
-
switch (P.type) {
|
|
1442
|
-
case "punctuator":
|
|
1443
|
-
switch (P.value) {
|
|
1444
|
-
case "{":
|
|
1445
|
-
i = {};
|
|
1446
|
-
break;
|
|
1447
|
-
case "[":
|
|
1448
|
-
i = [];
|
|
1449
|
-
break;
|
|
1450
|
-
}
|
|
1451
|
-
break;
|
|
1452
|
-
case "null":
|
|
1453
|
-
case "boolean":
|
|
1454
|
-
case "numeric":
|
|
1455
|
-
case "string":
|
|
1456
|
-
i = P.value;
|
|
1457
|
-
break;
|
|
1458
|
-
}
|
|
1459
|
-
if (Te === void 0) Te = i;
|
|
1460
|
-
else {
|
|
1461
|
-
var a = ee[ee.length - 1];
|
|
1462
|
-
Array.isArray(a) ? a.push(i) : Object.defineProperty(a, mt, { value: i, writable: true, enumerable: true, configurable: true });
|
|
1463
|
-
}
|
|
1464
|
-
if (i !== null && typeof i == "object") ee.push(i), Array.isArray(i) ? L = "beforeArrayValue" : L = "beforePropertyName";
|
|
1465
|
-
else {
|
|
1466
|
-
var h = ee[ee.length - 1];
|
|
1467
|
-
h == null ? L = "end" : Array.isArray(h) ? L = "afterArrayValue" : L = "afterPropertyValue";
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
__name(Et, "Et");
|
|
1471
|
-
function Ve() {
|
|
1472
|
-
ee.pop();
|
|
1473
|
-
var i = ee[ee.length - 1];
|
|
1474
|
-
i == null ? L = "end" : Array.isArray(i) ? L = "afterArrayValue" : L = "afterPropertyValue";
|
|
1475
|
-
}
|
|
1476
|
-
__name(Ve, "Ve");
|
|
1477
|
-
function x(i) {
|
|
1478
|
-
return Ke(i === void 0 ? "JSON5: invalid end of input at " + ue + ":" + H : "JSON5: invalid character '" + Jt(i) + "' at " + ue + ":" + H);
|
|
1479
|
-
}
|
|
1480
|
-
__name(x, "x");
|
|
1481
|
-
function pe() {
|
|
1482
|
-
return Ke("JSON5: invalid end of input at " + ue + ":" + H);
|
|
1483
|
-
}
|
|
1484
|
-
__name(pe, "pe");
|
|
1485
|
-
function Yt() {
|
|
1486
|
-
return H -= 5, Ke("JSON5: invalid identifier character at " + ue + ":" + H);
|
|
1487
|
-
}
|
|
1488
|
-
__name(Yt, "Yt");
|
|
1489
|
-
function ji(i) {
|
|
1490
|
-
console.warn("JSON5: '" + Jt(i) + "' in strings is not valid ECMAScript; consider escaping");
|
|
1491
|
-
}
|
|
1492
|
-
__name(ji, "ji");
|
|
1493
|
-
function Jt(i) {
|
|
1494
|
-
var a = { "'": "\\'", '"': '\\"', "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\v": "\\v", "\0": "\\0", "\u2028": "\\u2028", "\u2029": "\\u2029" };
|
|
1495
|
-
if (a[i]) return a[i];
|
|
1496
|
-
if (i < " ") {
|
|
1497
|
-
var h = i.charCodeAt(0).toString(16);
|
|
1498
|
-
return "\\x" + ("00" + h).substring(h.length);
|
|
1499
|
-
}
|
|
1500
|
-
return i;
|
|
1501
|
-
}
|
|
1502
|
-
__name(Jt, "Jt");
|
|
1503
|
-
function Ke(i) {
|
|
1504
|
-
var a = new SyntaxError(i);
|
|
1505
|
-
return a.lineNumber = ue, a.columnNumber = H, a;
|
|
1506
|
-
}
|
|
1507
|
-
__name(Ke, "Ke");
|
|
1508
|
-
var qi = /* @__PURE__ */ __name(function(a, h, f) {
|
|
1509
|
-
var D = [], E = "", C, M, k = "", he;
|
|
1510
|
-
if (h != null && typeof h == "object" && !Array.isArray(h) && (f = h.space, he = h.quote, h = h.replacer), typeof h == "function") M = h;
|
|
1511
|
-
else if (Array.isArray(h)) {
|
|
1512
|
-
C = [];
|
|
1513
|
-
for (var Ee = 0, z = h; Ee < z.length; Ee += 1) {
|
|
1514
|
-
var Z = z[Ee], j = void 0;
|
|
1515
|
-
typeof Z == "string" ? j = Z : (typeof Z == "number" || Z instanceof String || Z instanceof Number) && (j = String(Z)), j !== void 0 && C.indexOf(j) < 0 && C.push(j);
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
return f instanceof Number ? f = Number(f) : f instanceof String && (f = String(f)), typeof f == "number" ? f > 0 && (f = Math.min(10, Math.floor(f)), k = " ".substr(0, f)) : typeof f == "string" && (k = f.substr(0, 10)), we("", { "": a });
|
|
1519
|
-
function we(F, _) {
|
|
1520
|
-
var y = _[F];
|
|
1521
|
-
switch (y != null && (typeof y.toJSON5 == "function" ? y = y.toJSON5(F) : typeof y.toJSON == "function" && (y = y.toJSON(F))), M && (y = M.call(_, F, y)), y instanceof Number ? y = Number(y) : y instanceof String ? y = String(y) : y instanceof Boolean && (y = y.valueOf()), y) {
|
|
1522
|
-
case null:
|
|
1523
|
-
return "null";
|
|
1524
|
-
case true:
|
|
1525
|
-
return "true";
|
|
1526
|
-
case false:
|
|
1527
|
-
return "false";
|
|
1528
|
-
}
|
|
1529
|
-
if (typeof y == "string") return He(y, false);
|
|
1530
|
-
if (typeof y == "number") return String(y);
|
|
1531
|
-
if (typeof y == "object") return Array.isArray(y) ? zi(y) : Ki(y);
|
|
1532
|
-
}
|
|
1533
|
-
__name(we, "we");
|
|
1534
|
-
function He(F) {
|
|
1535
|
-
for (var _ = { "'": 0.1, '"': 0.2 }, y = { "'": "\\'", '"': '\\"', "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\v": "\\v", "\0": "\\0", "\u2028": "\\u2028", "\u2029": "\\u2029" }, B = "", G = 0; G < F.length; G++) {
|
|
1536
|
-
var $ = F[G];
|
|
1537
|
-
switch ($) {
|
|
1538
|
-
case "'":
|
|
1539
|
-
case '"':
|
|
1540
|
-
_[$]++, B += $;
|
|
1541
|
-
continue;
|
|
1542
|
-
case "\0":
|
|
1543
|
-
if (S.isDigit(F[G + 1])) {
|
|
1544
|
-
B += "\\x00";
|
|
1545
|
-
continue;
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
if (y[$]) {
|
|
1549
|
-
B += y[$];
|
|
1550
|
-
continue;
|
|
1551
|
-
}
|
|
1552
|
-
if ($ < " ") {
|
|
1553
|
-
var ge = $.charCodeAt(0).toString(16);
|
|
1554
|
-
B += "\\x" + ("00" + ge).substring(ge.length);
|
|
1555
|
-
continue;
|
|
1556
|
-
}
|
|
1557
|
-
B += $;
|
|
1558
|
-
}
|
|
1559
|
-
var re = he || Object.keys(_).reduce(function(ae, De) {
|
|
1560
|
-
return _[ae] < _[De] ? ae : De;
|
|
1561
|
-
});
|
|
1562
|
-
return B = B.replace(new RegExp(re, "g"), y[re]), re + B + re;
|
|
1563
|
-
}
|
|
1564
|
-
__name(He, "He");
|
|
1565
|
-
function Ki(F) {
|
|
1566
|
-
if (D.indexOf(F) >= 0) throw TypeError("Converting circular structure to JSON5");
|
|
1567
|
-
D.push(F);
|
|
1568
|
-
var _ = E;
|
|
1569
|
-
E = E + k;
|
|
1570
|
-
for (var y = C || Object.keys(F), B = [], G = 0, $ = y; G < $.length; G += 1) {
|
|
1571
|
-
var ge = $[G], re = we(ge, F);
|
|
1572
|
-
if (re !== void 0) {
|
|
1573
|
-
var ae = Hi(ge) + ":";
|
|
1574
|
-
k !== "" && (ae += " "), ae += re, B.push(ae);
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
var De;
|
|
1578
|
-
if (B.length === 0) De = "{}";
|
|
1579
|
-
else {
|
|
1580
|
-
var ze;
|
|
1581
|
-
if (k === "") ze = B.join(","), De = "{" + ze + "}";
|
|
1582
|
-
else {
|
|
1583
|
-
var Gi = `,
|
|
1584
|
-
` + E;
|
|
1585
|
-
ze = B.join(Gi), De = `{
|
|
1586
|
-
` + E + ze + `,
|
|
1587
|
-
` + _ + "}";
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
return D.pop(), E = _, De;
|
|
1591
|
-
}
|
|
1592
|
-
__name(Ki, "Ki");
|
|
1593
|
-
function Hi(F) {
|
|
1594
|
-
if (F.length === 0) return He(F, true);
|
|
1595
|
-
var _ = String.fromCodePoint(F.codePointAt(0));
|
|
1596
|
-
if (!S.isIdStartChar(_)) return He(F, true);
|
|
1597
|
-
for (var y = _.length; y < F.length; y++) if (!S.isIdContinueChar(String.fromCodePoint(F.codePointAt(y)))) return He(F, true);
|
|
1598
|
-
return F;
|
|
1599
|
-
}
|
|
1600
|
-
__name(Hi, "Hi");
|
|
1601
|
-
function zi(F) {
|
|
1602
|
-
if (D.indexOf(F) >= 0) throw TypeError("Converting circular structure to JSON5");
|
|
1603
|
-
D.push(F);
|
|
1604
|
-
var _ = E;
|
|
1605
|
-
E = E + k;
|
|
1606
|
-
for (var y = [], B = 0; B < F.length; B++) {
|
|
1607
|
-
var G = we(String(B), F);
|
|
1608
|
-
y.push(G !== void 0 ? G : "null");
|
|
1609
|
-
}
|
|
1610
|
-
var $;
|
|
1611
|
-
if (y.length === 0) $ = "[]";
|
|
1612
|
-
else if (k === "") {
|
|
1613
|
-
var ge = y.join(",");
|
|
1614
|
-
$ = "[" + ge + "]";
|
|
1615
|
-
} else {
|
|
1616
|
-
var re = `,
|
|
1617
|
-
` + E, ae = y.join(re);
|
|
1618
|
-
$ = `[
|
|
1619
|
-
` + E + ae + `,
|
|
1620
|
-
` + _ + "]";
|
|
1621
|
-
}
|
|
1622
|
-
return D.pop(), E = _, $;
|
|
1623
|
-
}
|
|
1624
|
-
__name(zi, "zi");
|
|
1625
|
-
}, "qi"), Ui = { parse: _i, stringify: qi }, Wi = Ui, Vi = Wi;
|
|
1626
|
-
return Vi;
|
|
1627
|
-
}));
|
|
1628
|
-
});
|
|
1629
|
-
var Rs = p((wd, $s) => {
|
|
1630
|
-
var Me;
|
|
1631
|
-
typeof window < "u" ? Me = window : typeof global < "u" ? Me = global : typeof self < "u" ? Me = self : Me = {};
|
|
1632
|
-
$s.exports = Me;
|
|
1633
|
-
});
|
|
1634
|
-
function wt(t, { as: e = "id", fallback: n = "" } = {}) {
|
|
1635
|
-
return (e === "github" ? t.trim().toLowerCase().replace(/[^\p{L}\p{M}\p{N}\p{Pc}\- ]/gu, "").replace(/ /g, "-") : to(t.normalize("NFKD")).toLowerCase().replace(/['’]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")) || n;
|
|
1636
|
-
}
|
|
1637
|
-
__name(wt, "wt");
|
|
1638
|
-
function to(t, { keep: e = "" } = {}) {
|
|
1639
|
-
let n = e.normalize("NFC").toLowerCase();
|
|
1640
|
-
return t.normalize("NFC").replace(/\P{ASCII}/gu, (r) => n.includes(r.toLowerCase()) ? r : r.normalize("NFD").replace(/\p{M}+/gu, ""));
|
|
1641
|
-
}
|
|
1642
|
-
__name(to, "to");
|
|
1643
|
-
function Ie(t = /* @__PURE__ */ new Date()) {
|
|
1644
|
-
return `${Xt(t.getHours())}:${Xt(t.getMinutes())}`;
|
|
1645
|
-
}
|
|
1646
|
-
__name(Ie, "Ie");
|
|
1647
|
-
function Xt(t) {
|
|
1648
|
-
return String(t).padStart(2, "0");
|
|
1649
|
-
}
|
|
1650
|
-
__name(Xt, "Xt");
|
|
1651
|
-
var Zt = /\/(?:packages\/docs\/content\/)?epics\/([^/]+)\/\1\.plan\.html$/, en = /\/sagas\/([^/]+)\/\1\.saga\.html$/;
|
|
1652
|
-
var tn = 4e3;
|
|
1653
|
-
var no = ro() ? "Airplane mode: queued for when you land (/airplane land)" : "No Claude session is reviewing this doc: Send wakes one";
|
|
1654
|
-
function ro() {
|
|
1655
|
-
return typeof window < "u" && !!window.SPELL_SERVER?.airplane;
|
|
1656
|
-
}
|
|
1657
|
-
__name(ro, "ro");
|
|
1658
|
-
var nn = /window\.SPELL_SERVER = (\{.*?\})<\/script>/;
|
|
1659
|
-
var so = 8 * 1024 * 1024;
|
|
1660
|
-
function Ge(t) {
|
|
1661
|
-
return (typeof t == "function" ? t() : t) ?? void 0;
|
|
1662
|
-
}
|
|
1663
|
-
__name(Ge, "Ge");
|
|
1664
|
-
var Ce = class extends Error {
|
|
1665
|
-
static {
|
|
1666
|
-
__name(this, "Ce");
|
|
1667
|
-
}
|
|
1668
|
-
};
|
|
1669
|
-
Ce.prototype.name = "ServerWriteError";
|
|
1670
|
-
var io = "see my comments in its text: ", cl = new RegExp(`(?:^|\\n+)${io}[^\\n]*$`);
|
|
1671
|
-
function Y(t) {
|
|
1672
|
-
let e = t ? new Date(t) : null;
|
|
1673
|
-
return !e || isNaN(e.getTime()) ? "" : Ie(e);
|
|
1674
|
-
}
|
|
1675
|
-
__name(Y, "Y");
|
|
1676
|
-
function Ne(t) {
|
|
1677
|
-
return t ? `${t[0].toUpperCase()}${t.slice(1)}${/[.!?]$/.test(t) ? "" : "."}` : "";
|
|
1678
|
-
}
|
|
1679
|
-
__name(Ne, "Ne");
|
|
1680
|
-
var Ec = Oe(Xr()), wc = Oe(fs()), Us = Oe(Bs());
|
|
1681
|
-
var Is = Oe(Os(), 1);
|
|
1682
|
-
function Ns(t, e = "random text", n) {
|
|
1683
|
-
try {
|
|
1684
|
-
return JSON.parse(t);
|
|
1685
|
-
} catch (r) {
|
|
1686
|
-
let o = (r instanceof Error ? r.message : String(r)).match(/at position (\d+)/);
|
|
1687
|
-
if (o) {
|
|
1688
|
-
let u = parseInt(o[1], 10), l = t.substring(0, u), d = Math.max(0, l.split(`
|
|
1689
|
-
`).length - 2);
|
|
1690
|
-
console.error(`Error parsing JSON near line ${d} of ${e}`);
|
|
1691
|
-
let v = Math.max(0, d - 3), N = v + 6;
|
|
1692
|
-
console.log(t.split(`
|
|
1693
|
-
`).slice(v, N).join(`
|
|
1694
|
-
`));
|
|
1695
|
-
}
|
|
1696
|
-
if (!n) throw r;
|
|
1697
|
-
return;
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
__name(Ns, "Ns");
|
|
1701
|
-
function _s(t, e = "random text", n) {
|
|
1702
|
-
try {
|
|
1703
|
-
return Is.default.parse(t);
|
|
1704
|
-
} catch (r) {
|
|
1705
|
-
let o = (r instanceof Error ? r.message : String(r)).match(/at position (\d+)/);
|
|
1706
|
-
if (o) {
|
|
1707
|
-
let u = parseInt(o[1], 10), l = t.substring(0, u), d = Math.max(0, l.split(`
|
|
1708
|
-
`).length - 2);
|
|
1709
|
-
console.error(`Error parsing JSON near line ${d} of ${e}`);
|
|
1710
|
-
let v = Math.max(0, d - 3), N = v + 6;
|
|
1711
|
-
console.log(t.split(`
|
|
1712
|
-
`).slice(v, N).join(`
|
|
1713
|
-
`));
|
|
1714
|
-
}
|
|
1715
|
-
if (!n) throw r;
|
|
1716
|
-
return;
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
__name(_s, "_s");
|
|
1720
|
-
var Ls = Oe(Rs(), 1);
|
|
1721
|
-
function Ms(t) {
|
|
1722
|
-
return t.name === "AbortError";
|
|
1723
|
-
}
|
|
1724
|
-
__name(Ms, "Ms");
|
|
1725
|
-
function js(t, e = {}, n = fetch) {
|
|
1726
|
-
let r = false, s = new Ls.default.AbortController();
|
|
1727
|
-
function o(l) {
|
|
1728
|
-
return Object.assign(l, { cancel() {
|
|
1729
|
-
return r || (console.warn(`Cancelling abortable fetch to ${t}:`), s.abort()), this;
|
|
1730
|
-
}, then(d, v) {
|
|
1731
|
-
return o(Promise.prototype.then.apply(this, [d, v]));
|
|
1732
|
-
}, catch(d) {
|
|
1733
|
-
return o(Promise.prototype.catch.apply(this, [d]));
|
|
1734
|
-
}, finally(d) {
|
|
1735
|
-
return o(Promise.prototype.finally.apply(this, [d]));
|
|
1736
|
-
} });
|
|
1737
|
-
}
|
|
1738
|
-
__name(o, "o");
|
|
1739
|
-
e.signal = s.signal;
|
|
1740
|
-
let u = n(t, e);
|
|
1741
|
-
return u.finally(() => {
|
|
1742
|
-
r = true;
|
|
1743
|
-
}), o(u);
|
|
1744
|
-
}
|
|
1745
|
-
__name(js, "js");
|
|
1746
|
-
var ye = { text: "text/plain", json: "application/json", json5: "application/json5", gif: "image/gif", png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg", svg: "image/svg+xml", binary: "binary" }, qs = ["binary", "blob", ye.gif, ye.png, ye.jpeg, ye.binary];
|
|
1747
|
-
var tt = class extends Error {
|
|
1748
|
-
static {
|
|
1749
|
-
__name(this, "tt");
|
|
1750
|
-
}
|
|
1751
|
-
props;
|
|
1752
|
-
constructor(e, n) {
|
|
1753
|
-
typeof e == "string" ? (super(e), this.props = { message: e }) : (super(e.message), this.props = e);
|
|
1754
|
-
let { captureStackTrace: r } = Error;
|
|
1755
|
-
r && r(this, n || this.constructor), Object.setPrototypeOf(this, new.target.prototype);
|
|
1756
|
-
}
|
|
1757
|
-
get name() {
|
|
1758
|
-
return this.constructor.name;
|
|
1759
|
-
}
|
|
1760
|
-
get header() {
|
|
1761
|
-
return this.props.activity ? `${this.name} ${this.props.activity}` : this.name;
|
|
1762
|
-
}
|
|
1763
|
-
};
|
|
1764
|
-
var J = class extends tt {
|
|
1765
|
-
static {
|
|
1766
|
-
__name(this, "J");
|
|
1767
|
-
}
|
|
1768
|
-
get status() {
|
|
1769
|
-
if (this.props.response) return this.props.response.status;
|
|
1770
|
-
}
|
|
1771
|
-
}, nt = class extends J {
|
|
1772
|
-
static {
|
|
1773
|
-
__name(this, "nt");
|
|
1774
|
-
}
|
|
1775
|
-
constructor(e) {
|
|
1776
|
-
super({ message: "You must be online to do this.", ...e });
|
|
1777
|
-
}
|
|
1778
|
-
}, xe = class extends J {
|
|
1779
|
-
static {
|
|
1780
|
-
__name(this, "xe");
|
|
1781
|
-
}
|
|
1782
|
-
constructor(e) {
|
|
1783
|
-
super({ message: "There was a problem loading this thing.", ...e });
|
|
1784
|
-
}
|
|
1785
|
-
}, rt = class extends J {
|
|
1786
|
-
static {
|
|
1787
|
-
__name(this, "rt");
|
|
1788
|
-
}
|
|
1789
|
-
constructor(e) {
|
|
1790
|
-
super({ message: "You are not authorized to do this.", ...e });
|
|
1791
|
-
}
|
|
1792
|
-
}, st = class extends J {
|
|
1793
|
-
static {
|
|
1794
|
-
__name(this, "st");
|
|
1795
|
-
}
|
|
1796
|
-
constructor(e) {
|
|
1797
|
-
super({ message: "There was an error understanding the response.", ...e });
|
|
1798
|
-
}
|
|
1799
|
-
}, it = class extends J {
|
|
1800
|
-
static {
|
|
1801
|
-
__name(this, "it");
|
|
1802
|
-
}
|
|
1803
|
-
constructor(e) {
|
|
1804
|
-
super({ message: "The action was cancelled.", ...e });
|
|
1805
|
-
}
|
|
1806
|
-
};
|
|
1807
|
-
function Ws(t) {
|
|
1808
|
-
let { url: e, query: n, contents: r, method: s = r != null ? "POST" : "GET", headers: o = {}, requestFormat: u, format: l = "text/plain", defaultContents: d, cache: v, fetch: N } = t, U = { method: s, ...v && { cache: v } };
|
|
1809
|
-
u && (o["Content-Type"] = u), U.headers = o, r != null && (U.body = typeof r == "string" ? r : JSON.stringify(r));
|
|
1810
|
-
let oe = e;
|
|
1811
|
-
typeof n == "string" ? oe += `?${n}` : n && (oe += `?${Us.default.stringify(n)}`);
|
|
1812
|
-
let lt = js(oe, U, N);
|
|
1813
|
-
async function dt(W) {
|
|
1814
|
-
let X = { url: e, status: W.status, ...U };
|
|
1815
|
-
if (!W.ok) {
|
|
1816
|
-
let K = await W.text();
|
|
1817
|
-
switch (W.status) {
|
|
1818
|
-
case 404:
|
|
1819
|
-
if (d !== void 0) return d;
|
|
1820
|
-
throw new xe({ ...X, message: K });
|
|
1821
|
-
case 401:
|
|
1822
|
-
case 403:
|
|
1823
|
-
throw new rt({ ...X, message: K });
|
|
1824
|
-
default:
|
|
1825
|
-
throw new J({ ...X, message: K });
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
try {
|
|
1829
|
-
if (qs.includes(l)) return await W.blob();
|
|
1830
|
-
let K = await W.text();
|
|
1831
|
-
return l === ye.json || l.toLowerCase() === "json" ? Ns(K) : l === ye.json5 || l.toLowerCase() === "json5" ? _s(K) : K;
|
|
1832
|
-
} catch (K) {
|
|
1833
|
-
throw new st({ ...X, error: K });
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
__name(dt, "dt");
|
|
1837
|
-
async function ft(W) {
|
|
1838
|
-
if (d !== void 0) return d;
|
|
1839
|
-
throw Ms(W) ? new it({ url: e, error: W, ...U }) : new nt({ url: e, error: W, ...U });
|
|
1840
|
-
}
|
|
1841
|
-
__name(ft, "ft");
|
|
1842
|
-
return lt.then(dt, ft);
|
|
1843
|
-
}
|
|
1844
|
-
__name(Ws, "Ws");
|
|
1845
|
-
var T = class t {
|
|
1846
|
-
static {
|
|
1847
|
-
__name(this, "t");
|
|
1848
|
-
}
|
|
1849
|
-
constructor(e) {
|
|
1850
|
-
this.options = e;
|
|
1851
|
-
this.info = e.server ? { ...e.server } : void 0;
|
|
1852
|
-
}
|
|
1853
|
-
options;
|
|
1854
|
-
info;
|
|
1855
|
-
static current;
|
|
1856
|
-
static forPage() {
|
|
1857
|
-
return t.current ??= new t(t.pageOptions()), t.current;
|
|
1858
|
-
}
|
|
1859
|
-
static pageOptions() {
|
|
1860
|
-
return { page: location.pathname, server: window.SPELL_SERVER, protocol: location.protocol, fetch: /* @__PURE__ */ __name((e, n) => window.fetch(e, n), "fetch"), readServed: /* @__PURE__ */ __name((e) => t.readInFrame(window.document, e), "readServed") };
|
|
1861
|
-
}
|
|
1862
|
-
static readInFrame(e, n, r = Cc) {
|
|
1863
|
-
return new Promise((s, o) => {
|
|
1864
|
-
let u = e.createElement("iframe");
|
|
1865
|
-
u.setAttribute("sandbox", "allow-same-origin"), u.setAttribute("aria-hidden", "true"), u.hidden = true;
|
|
1866
|
-
let l = /* @__PURE__ */ __name((N) => {
|
|
1867
|
-
clearTimeout(v);
|
|
1868
|
-
try {
|
|
1869
|
-
s(N());
|
|
1870
|
-
} catch (U) {
|
|
1871
|
-
o(U);
|
|
1872
|
-
} finally {
|
|
1873
|
-
u.remove();
|
|
1874
|
-
}
|
|
1875
|
-
}, "l"), d = /* @__PURE__ */ __name(() => {
|
|
1876
|
-
throw new Error("the page didn't load");
|
|
1877
|
-
}, "d"), v = setTimeout(() => l(d), r);
|
|
1878
|
-
u.addEventListener("load", () => {
|
|
1879
|
-
u.contentDocument?.URL !== "about:blank" && l(() => u.contentDocument.documentElement.outerHTML);
|
|
1880
|
-
}), u.src = `${n}${n.includes("?") ? "&" : "?"}spell-token=${Date.now()}`, e.body.append(u);
|
|
1881
|
-
});
|
|
1882
|
-
}
|
|
1883
|
-
static isServed(e = globalThis.SPELL_SERVER, n = globalThis.location?.protocol) {
|
|
1884
|
-
return !!e?.token && t.canRead(n);
|
|
1885
|
-
}
|
|
1886
|
-
static canRead(e = globalThis.location?.protocol) {
|
|
1887
|
-
return e !== "file:";
|
|
1888
|
-
}
|
|
1889
|
-
get isServed() {
|
|
1890
|
-
return t.isServed(this.info, this.options.protocol);
|
|
1891
|
-
}
|
|
1892
|
-
get servesPlanDoc() {
|
|
1893
|
-
return this.isServed && Zt.test(this.options.page);
|
|
1894
|
-
}
|
|
1895
|
-
get servesReviews() {
|
|
1896
|
-
return this.servesPlanDoc ? true : this.isServed && en.test(this.options.page);
|
|
1897
|
-
}
|
|
1898
|
-
get file() {
|
|
1899
|
-
return this.info?.file ?? this.options.page;
|
|
1900
|
-
}
|
|
1901
|
-
async get(e, { query: n, missing: r, format: s = "json" } = {}) {
|
|
1902
|
-
if (!t.canRead(this.options.protocol)) return r;
|
|
1903
|
-
try {
|
|
1904
|
-
let o = n && new URLSearchParams(n).toString();
|
|
1905
|
-
return await Ws({ url: e, query: o, format: s, cache: "no-store", fetch: this.options.fetch }) ?? r;
|
|
1906
|
-
} catch (o) {
|
|
1907
|
-
if (o instanceof xe) return r;
|
|
1908
|
-
throw o instanceof J && (o.message = vc(o.message) ?? o.message), o;
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
async getFile(e, { format: n = "json" } = {}) {
|
|
1912
|
-
for (let r of typeof e == "string" ? [e] : e) {
|
|
1913
|
-
let s;
|
|
1914
|
-
try {
|
|
1915
|
-
s = await this.get(r, { format: n });
|
|
1916
|
-
} catch (o) {
|
|
1917
|
-
throw new Error(`${r.split("/").pop()}: ${o.message}`, { cause: o });
|
|
1918
|
-
}
|
|
1919
|
-
if (s !== void 0) return s;
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
static dataFileNames(e) {
|
|
1923
|
-
let n = e.replace(/\.json5?$/, "");
|
|
1924
|
-
return n === e ? [e] : [`${n}.json5`, `${n}.json`];
|
|
1925
|
-
}
|
|
1926
|
-
getForPage(e, { missing: n } = {}) {
|
|
1927
|
-
return this.get(e, { query: { page: this.options.page }, missing: n });
|
|
1928
|
-
}
|
|
1929
|
-
async post(e, n, { keepalive: r = false } = {}) {
|
|
1930
|
-
for (let s = 0; ; s++) {
|
|
1931
|
-
let o;
|
|
1932
|
-
try {
|
|
1933
|
-
o = await this.options.fetch(e, { method: "POST", headers: { "content-type": "application/json", "x-server-token": this.info?.token ?? "" }, body: JSON.stringify(n), keepalive: r });
|
|
1934
|
-
} catch (d) {
|
|
1935
|
-
throw new Ce(`couldn't reach the page server (${d.message})`);
|
|
1936
|
-
}
|
|
1937
|
-
let u = await o.json().catch(() => ({}));
|
|
1938
|
-
if (o.ok) return u;
|
|
1939
|
-
let l = o.status === 403 && /token/i.test(u.error ?? "");
|
|
1940
|
-
if (!(l && s === 0 && await this.refreshToken())) throw new Ce(l ? "the page server restarted since this page loaded: reload the page" : u.error ?? `couldn't save (${o.status})`);
|
|
1941
|
-
}
|
|
1942
|
-
}
|
|
1943
|
-
static watch(e, n, r, { every: s = tn, polls: o } = {}) {
|
|
1944
|
-
let { document: u } = e, l = typeof n == "function" ? n : Fc(n), d = s ? e.setInterval(() => {
|
|
1945
|
-
u.visibilityState === "visible" && (o?.() ?? true) && r();
|
|
1946
|
-
}, s) : void 0, v = /* @__PURE__ */ __name(() => {
|
|
1947
|
-
u.visibilityState === "visible" && r();
|
|
1948
|
-
}, "v"), N = /* @__PURE__ */ __name((U) => {
|
|
1949
|
-
let oe = U.detail?.path;
|
|
1950
|
-
oe && l(decodeURIComponent(oe)) && r();
|
|
1951
|
-
}, "N");
|
|
1952
|
-
return u.addEventListener("visibilitychange", v), e.addEventListener("spell-server:changed", N), () => {
|
|
1953
|
-
d !== void 0 && e.clearInterval(d), u.removeEventListener("visibilitychange", v), e.removeEventListener("spell-server:changed", N);
|
|
1954
|
-
};
|
|
1955
|
-
}
|
|
1956
|
-
async refreshToken() {
|
|
1957
|
-
try {
|
|
1958
|
-
let { page: e, readServed: n } = this.options, r = n ? await n(e) : await (await this.options.fetch(e, { cache: "no-store" })).text(), s = JSON.parse(nn.exec(r)?.[1] ?? "null")?.token;
|
|
1959
|
-
return !s || !this.info || s === this.info.token ? false : (this.info.token = s, true);
|
|
1960
|
-
} catch {
|
|
1961
|
-
return false;
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
}, Cc = 1e4;
|
|
1965
|
-
function vc(t) {
|
|
1966
|
-
try {
|
|
1967
|
-
let e = JSON.parse(t)?.error;
|
|
1968
|
-
return typeof e == "string" ? e : void 0;
|
|
1969
|
-
} catch {
|
|
1970
|
-
return;
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
__name(vc, "vc");
|
|
1974
|
-
function Fc(t) {
|
|
1975
|
-
if (!t) return () => false;
|
|
1976
|
-
let e = T.dataFileNames(t);
|
|
1977
|
-
return (n) => e.includes(n);
|
|
1978
|
-
}
|
|
1979
|
-
__name(Fc, "Fc");
|
|
1980
|
-
var se = class t {
|
|
1981
|
-
static {
|
|
1982
|
-
__name(this, "t");
|
|
1983
|
-
}
|
|
1984
|
-
version = 0;
|
|
1985
|
-
listeners = /* @__PURE__ */ new Set();
|
|
1986
|
-
subscribe(e) {
|
|
1987
|
-
return this.listeners.add(e), () => this.listeners.delete(e);
|
|
1988
|
-
}
|
|
1989
|
-
changed() {
|
|
1990
|
-
this.version++;
|
|
1991
|
-
for (let e of this.listeners) e();
|
|
1992
|
-
}
|
|
1993
|
-
static onePerPage(e, n = () => true) {
|
|
1994
|
-
let r = t.pageStores.get(this);
|
|
1995
|
-
if (r && n(r)) return r;
|
|
1996
|
-
let s = e();
|
|
1997
|
-
return t.pageStores.set(this, s), s;
|
|
1998
|
-
}
|
|
1999
|
-
static adopt(e) {
|
|
2000
|
-
e ? t.pageStores.set(this, e) : t.pageStores.delete(this);
|
|
2001
|
-
}
|
|
2002
|
-
static pageStores = /* @__PURE__ */ new Map();
|
|
2003
|
-
};
|
|
2004
|
-
var Se = class {
|
|
2005
|
-
static {
|
|
2006
|
-
__name(this, "Se");
|
|
2007
|
-
}
|
|
2008
|
-
values = /* @__PURE__ */ new Map();
|
|
2009
|
-
get length() {
|
|
2010
|
-
return this.values.size;
|
|
2011
|
-
}
|
|
2012
|
-
key(e) {
|
|
2013
|
-
return [...this.values.keys()][e] ?? null;
|
|
2014
|
-
}
|
|
2015
|
-
getItem(e) {
|
|
2016
|
-
return this.values.get(e) ?? null;
|
|
2017
|
-
}
|
|
2018
|
-
setItem(e, n) {
|
|
2019
|
-
this.values.set(e, String(n));
|
|
2020
|
-
}
|
|
2021
|
-
removeItem(e) {
|
|
2022
|
-
this.values.delete(e);
|
|
2023
|
-
}
|
|
2024
|
-
};
|
|
2025
|
-
var ke = class {
|
|
2026
|
-
static {
|
|
2027
|
-
__name(this, "ke");
|
|
2028
|
-
}
|
|
2029
|
-
async load(e, n) {
|
|
2030
|
-
return this.read(e, n);
|
|
2031
|
-
}
|
|
2032
|
-
async save(e, n, r) {
|
|
2033
|
-
r === void 0 ? this.remove(e, n) : this.write(e, n, r);
|
|
2034
|
-
}
|
|
2035
|
-
async loadKeys(e) {
|
|
2036
|
-
return this.keys(e);
|
|
2037
|
-
}
|
|
2038
|
-
async update(e, n, r) {
|
|
2039
|
-
let s = r(await this.load(e, n));
|
|
2040
|
-
return await this.save(e, n, s), s;
|
|
2041
|
-
}
|
|
2042
|
-
async removeUnder(e, n) {
|
|
2043
|
-
for (let r of this.keys(e)) r.startsWith(n) && this.remove(e, r);
|
|
2044
|
-
}
|
|
2045
|
-
};
|
|
2046
|
-
var Vs = /^(?:["{[]|-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$|true$|false$|null$)/;
|
|
2047
|
-
function Ks(t) {
|
|
2048
|
-
if (typeof t == "string" && !Vs.test(t)) return t;
|
|
2049
|
-
let e = JSON.stringify(t);
|
|
2050
|
-
if (e === void 0) throw new TypeError(`textForValue(): can't keep a ${typeof t} as text; pass plain data`);
|
|
2051
|
-
return e;
|
|
2052
|
-
}
|
|
2053
|
-
__name(Ks, "Ks");
|
|
2054
|
-
function Hs(t) {
|
|
2055
|
-
return Vs.test(t) ? JSON.parse(t) : t;
|
|
2056
|
-
}
|
|
2057
|
-
__name(Hs, "Hs");
|
|
2058
|
-
var bc = /* @__PURE__ */ new Map([["number", 0], ["text", ""], ["choice", false]]), xc = /* @__PURE__ */ new Map([["number", "number"], ["text", "string"], ["choice", "boolean"]]);
|
|
2059
|
-
function Bt(t) {
|
|
2060
|
-
if (!t) return;
|
|
2061
|
-
if (t.default !== void 0) return t.default;
|
|
2062
|
-
let e = ot(t);
|
|
2063
|
-
return e?.length ? e[0] : t.type === void 0 ? void 0 : bc.get(t.type);
|
|
2064
|
-
}
|
|
2065
|
-
__name(Bt, "Bt");
|
|
2066
|
-
function Ot(t, e) {
|
|
2067
|
-
if (!t) return true;
|
|
2068
|
-
let n = ot(t);
|
|
2069
|
-
if (n && !n.includes(e)) return false;
|
|
2070
|
-
let r = t.type === void 0 ? void 0 : xc.get(t.type);
|
|
2071
|
-
return r === void 0 || typeof e === r;
|
|
2072
|
-
}
|
|
2073
|
-
__name(Ot, "Ot");
|
|
2074
|
-
function ot(t) {
|
|
2075
|
-
return typeof t.oneOf == "function" ? t.oneOf() : t.oneOf;
|
|
2076
|
-
}
|
|
2077
|
-
__name(ot, "ot");
|
|
2078
|
-
var ie = class extends ke {
|
|
2079
|
-
static {
|
|
2080
|
-
__name(this, "ie");
|
|
2081
|
-
}
|
|
2082
|
-
isAsync = false;
|
|
2083
|
-
description;
|
|
2084
|
-
constructor({ storage: e, description: n }) {
|
|
2085
|
-
super(), this.findStorage = typeof e == "function" ? e : () => e, this.description = n;
|
|
2086
|
-
}
|
|
2087
|
-
read(e, n) {
|
|
2088
|
-
let r = this.attempt("read", e, n, (s) => s.getItem(Ae(e, n)));
|
|
2089
|
-
if (r != null) try {
|
|
2090
|
-
return Hs(r);
|
|
2091
|
-
} catch (s) {
|
|
2092
|
-
console.error(`StoragePlace.read(): \`${Ae(e, n)}\` holds no value it can read; answering none:`, r), console.error(s);
|
|
2093
|
-
return;
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
write(e, n, r) {
|
|
2097
|
-
let s = Ks(r);
|
|
2098
|
-
this.attempt("write", e, n, (o) => o.setItem(Ae(e, n), s));
|
|
2099
|
-
}
|
|
2100
|
-
remove(e, n) {
|
|
2101
|
-
this.attempt("remove", e, n, (r) => r.removeItem(Ae(e, n)));
|
|
2102
|
-
}
|
|
2103
|
-
keys(e) {
|
|
2104
|
-
let n = `${e}:`;
|
|
2105
|
-
return this.attempt("keys", e, "", (s) => {
|
|
2106
|
-
let o = [];
|
|
2107
|
-
for (let u = 0; u < s.length; u++) {
|
|
2108
|
-
let l = s.key(u);
|
|
2109
|
-
l?.startsWith(n) && o.push(l.slice(n.length));
|
|
2110
|
-
}
|
|
2111
|
-
return o;
|
|
2112
|
-
}) ?? [];
|
|
2113
|
-
}
|
|
2114
|
-
moveText(e, n, r) {
|
|
2115
|
-
this.attempt("moveText", n, r, (s) => {
|
|
2116
|
-
let o = s.getItem(e);
|
|
2117
|
-
o !== null && (s.getItem(Ae(n, r)) === null && s.setItem(Ae(n, r), o), s.removeItem(e));
|
|
2118
|
-
});
|
|
2119
|
-
}
|
|
2120
|
-
get storage() {
|
|
2121
|
-
return this._storage ??= this.storageOrMemory();
|
|
2122
|
-
}
|
|
2123
|
-
_storage;
|
|
2124
|
-
findStorage;
|
|
2125
|
-
storageOrMemory() {
|
|
2126
|
-
try {
|
|
2127
|
-
let e = this.findStorage();
|
|
2128
|
-
if (e) return e;
|
|
2129
|
-
} catch (e) {
|
|
2130
|
-
console.error(`StoragePlace: ${this.description} is blocked; keeping its values in memory for this visit:`), console.error(e);
|
|
2131
|
-
}
|
|
2132
|
-
return new Se();
|
|
2133
|
-
}
|
|
2134
|
-
attempt(e, n, r, s) {
|
|
2135
|
-
try {
|
|
2136
|
-
return s(this.storage);
|
|
2137
|
-
} catch (o) {
|
|
2138
|
-
console.error(`StoragePlace.${e}(): ${this.description} refused \`${Ae(n, r)}\`:`), console.error(o);
|
|
2139
|
-
return;
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
};
|
|
2143
|
-
function Ae(t, e) {
|
|
2144
|
-
return `${t}:${e}`;
|
|
2145
|
-
}
|
|
2146
|
-
__name(Ae, "Ae");
|
|
2147
|
-
var V = class t {
|
|
2148
|
-
static {
|
|
2149
|
-
__name(this, "t");
|
|
2150
|
-
}
|
|
2151
|
-
name;
|
|
2152
|
-
place;
|
|
2153
|
-
constructor(e, { place: n = "local" } = {}) {
|
|
2154
|
-
if (!e || e.includes(":")) throw new TypeError(`new PrefStore(): \`${e}\` can't name a store; give it a name with no colon, e.g. "spell-site"`);
|
|
2155
|
-
this.name = e, this.place = Gs(n);
|
|
2156
|
-
}
|
|
2157
|
-
static splitKey(e) {
|
|
2158
|
-
let n = e.indexOf(":");
|
|
2159
|
-
if (n < 1) throw new TypeError(`PrefStore.splitKey(): \`${e}\` has no store; name it "<store>:<key>"`);
|
|
2160
|
-
return [e.slice(0, n), e.slice(n + 1)];
|
|
2161
|
-
}
|
|
2162
|
-
static getAt(e, n = "local") {
|
|
2163
|
-
let [r, s] = t.splitKey(e);
|
|
2164
|
-
return new t(r, { place: n }).get(s);
|
|
2165
|
-
}
|
|
2166
|
-
static moveOldKey(e, n, r = "local") {
|
|
2167
|
-
let [s, o] = t.splitKey(n);
|
|
2168
|
-
Gs(r).moveText(e, s, o);
|
|
2169
|
-
}
|
|
2170
|
-
static setAt(e, n, r = "local") {
|
|
2171
|
-
let [s, o] = t.splitKey(e);
|
|
2172
|
-
new t(s, { place: r }).set(o, n);
|
|
2173
|
-
}
|
|
2174
|
-
declare(e, n) {
|
|
2175
|
-
return this.checkKey("declare", e), this.declared.set(e, n), this;
|
|
2176
|
-
}
|
|
2177
|
-
defaultFor(e) {
|
|
2178
|
-
return Bt(this.declared.get(e));
|
|
2179
|
-
}
|
|
2180
|
-
has(e) {
|
|
2181
|
-
return this.checkQuickRead("has", e), this.place.read(this.name, e) !== void 0;
|
|
2182
|
-
}
|
|
2183
|
-
get(e, n) {
|
|
2184
|
-
return this.checkQuickRead("get", e), this.keptOrDefault("get", e, this.place.read(this.name, e), n);
|
|
2185
|
-
}
|
|
2186
|
-
set(e, n) {
|
|
2187
|
-
return this.checkWrite("set", e, n), n === void 0 ? this.place.remove(this.name, e) : this.place.write(this.name, e, n), n;
|
|
2188
|
-
}
|
|
2189
|
-
forget(e) {
|
|
2190
|
-
this.set(e, void 0);
|
|
2191
|
-
}
|
|
2192
|
-
keysUnder(e = "") {
|
|
2193
|
-
return this.checkQuickRead("keysUnder"), this.place.keys(this.name).filter((n) => n.startsWith(e));
|
|
2194
|
-
}
|
|
2195
|
-
forgetUnder(e) {
|
|
2196
|
-
return this.place.removeUnder(this.name, e);
|
|
2197
|
-
}
|
|
2198
|
-
forgetAll() {
|
|
2199
|
-
return this.forgetUnder("");
|
|
2200
|
-
}
|
|
2201
|
-
rename(e, n) {
|
|
2202
|
-
this.checkQuickRead("rename", e), this.checkKey("rename", n);
|
|
2203
|
-
let r = this.place.read(this.name, e);
|
|
2204
|
-
return r === void 0 ? this : (this.place.read(this.name, n) === void 0 && this.place.write(this.name, n, r), this.place.remove(this.name, e), this);
|
|
2205
|
-
}
|
|
2206
|
-
async load(e, n) {
|
|
2207
|
-
return this.checkKey("load", e), this.keptOrDefault("load", e, await this.place.load(this.name, e), n);
|
|
2208
|
-
}
|
|
2209
|
-
async save(e, n) {
|
|
2210
|
-
return this.checkWrite("save", e, n), await this.place.save(this.name, e, n), n;
|
|
2211
|
-
}
|
|
2212
|
-
update(e, n) {
|
|
2213
|
-
this.checkKey("update", e);
|
|
2214
|
-
let s = (this.updating.get(e) ?? Promise.resolve()).then(async () => await this.place.update(this.name, e, (u) => {
|
|
2215
|
-
let l = n(this.keptOrDefault("update", e, u, void 0));
|
|
2216
|
-
return this.checkWrite("update", e, l), l;
|
|
2217
|
-
})), o = s.then(() => {
|
|
2218
|
-
}, () => {
|
|
2219
|
-
});
|
|
2220
|
-
return this.updating.set(e, o), o.then(() => {
|
|
2221
|
-
this.updating.get(e) === o && this.updating.delete(e);
|
|
2222
|
-
}), s;
|
|
2223
|
-
}
|
|
2224
|
-
async loadKeysUnder(e = "") {
|
|
2225
|
-
return (await this.place.loadKeys(this.name)).filter((n) => n.startsWith(e));
|
|
2226
|
-
}
|
|
2227
|
-
keptOrDefault(e, n, r, s) {
|
|
2228
|
-
let o = this.declared.get(n);
|
|
2229
|
-
if (r !== void 0) {
|
|
2230
|
-
if (Ot(o, r)) return r;
|
|
2231
|
-
console.error(`PrefStore.${e}(): \`${this.name}:${n}\` isn't ${Ys(o)}; answering its default:`, r);
|
|
2232
|
-
}
|
|
2233
|
-
return s !== void 0 ? s : Bt(o);
|
|
2234
|
-
}
|
|
2235
|
-
checkKey(e, n) {
|
|
2236
|
-
if (!n) throw new TypeError(`PrefStore.${e}(): no key; pass the pref's name, e.g. "scheme"`);
|
|
2237
|
-
}
|
|
2238
|
-
checkQuickRead(e, n) {
|
|
2239
|
-
if (n !== void 0 && this.checkKey(e, n), !!this.place.isAsync) throw new TypeError(`PrefStore.${e}(): \`${this.name}\` keeps its values in ${this.place.description}, which must be waited on; use \`load()\` or \`loadKeysUnder()\``);
|
|
2240
|
-
}
|
|
2241
|
-
checkWrite(e, n, r) {
|
|
2242
|
-
this.checkKey(e, n);
|
|
2243
|
-
let s = this.declared.get(n);
|
|
2244
|
-
if (!(r === void 0 || Ot(s, r))) throw new TypeError(`PrefStore.${e}(): \`${n}\` is ${Ys(s)}; not \`${Js(r)}\``);
|
|
2245
|
-
}
|
|
2246
|
-
declared = /* @__PURE__ */ new Map();
|
|
2247
|
-
updating = /* @__PURE__ */ new Map();
|
|
2248
|
-
}, Sc = { local: { storage: /* @__PURE__ */ __name(() => globalThis.localStorage, "storage"), description: "the browser's storage" }, session: { storage: /* @__PURE__ */ __name(() => globalThis.sessionStorage, "storage"), description: "the browser's per-tab storage" } }, zs = /* @__PURE__ */ new Map();
|
|
2249
|
-
function Gs(t) {
|
|
2250
|
-
if (t instanceof ke) return t;
|
|
2251
|
-
if (t === "memory") return new ie({ storage: new Se(), description: "memory" });
|
|
2252
|
-
let e = zs.get(t);
|
|
2253
|
-
return e || zs.set(t, e = new ie(Sc[t])), e;
|
|
2254
|
-
}
|
|
2255
|
-
__name(Gs, "Gs");
|
|
2256
|
-
function Ys(t) {
|
|
2257
|
-
let e = t && ot(t);
|
|
2258
|
-
return e ? `one of ${e.map(Js).join(", ")}` : t?.type ? `a ${t.type}` : "anything";
|
|
2259
|
-
}
|
|
2260
|
-
__name(Ys, "Ys");
|
|
2261
|
-
function Js(t) {
|
|
2262
|
-
return typeof t == "string" ? t : typeof t == "object" && JSON.stringify(t) || String(t);
|
|
2263
|
-
}
|
|
2264
|
-
__name(Js, "Js");
|
|
2265
|
-
var ce = "/api/docs/choices";
|
|
2266
|
-
var Qs = "spell-choices-draft:", Xs = /\/details\/[^/]+\.html$/;
|
|
2267
|
-
var Zs = "spell-folds:";
|
|
2268
|
-
function ei(t) {
|
|
2269
|
-
return t.value.includes(`
|
|
2270
|
-
`) && (t.value = t.value.replace(/\s*\n\s*/g, " ")), t.value;
|
|
2271
|
-
}
|
|
2272
|
-
__name(ei, "ei");
|
|
2273
|
-
function ti(t) {
|
|
2274
|
-
t.key === "Enter" && t.preventDefault();
|
|
2275
|
-
}
|
|
2276
|
-
__name(ti, "ti");
|
|
2277
|
-
var kc = 3e3, It = class {
|
|
2278
|
-
static {
|
|
2279
|
-
__name(this, "It");
|
|
2280
|
-
}
|
|
2281
|
-
constructor(e) {
|
|
2282
|
-
this.props = e;
|
|
2283
|
-
}
|
|
2284
|
-
props;
|
|
2285
|
-
keep(e) {
|
|
2286
|
-
this.props.key && V.setAt(this.props.key, e, this.place);
|
|
2287
|
-
}
|
|
2288
|
-
kept() {
|
|
2289
|
-
return this.props.key ? V.getAt(this.props.key, this.place) : void 0;
|
|
2290
|
-
}
|
|
2291
|
-
drop() {
|
|
2292
|
-
this.props.key && V.setAt(this.props.key, void 0, this.place);
|
|
2293
|
-
}
|
|
2294
|
-
place = new ie({ storage: /* @__PURE__ */ __name(() => this.props.storage ? this.props.storage() : globalThis.localStorage, "storage"), description: "this browser" });
|
|
2295
|
-
}, ut = class {
|
|
2296
|
-
static {
|
|
2297
|
-
__name(this, "ut");
|
|
2298
|
-
}
|
|
2299
|
-
constructor(e) {
|
|
2300
|
-
this.props = e;
|
|
2301
|
-
this.copy = new It({ ...e.key !== void 0 && { key: e.key }, ...e.storage && { storage: e.storage } });
|
|
2302
|
-
}
|
|
2303
|
-
props;
|
|
2304
|
-
state = { kind: "idle" };
|
|
2305
|
-
isUnsaved = false;
|
|
2306
|
-
timer;
|
|
2307
|
-
retryTimer;
|
|
2308
|
-
saving = Promise.resolve(true);
|
|
2309
|
-
inFlight = 0;
|
|
2310
|
-
round = 0;
|
|
2311
|
-
copy;
|
|
2312
|
-
changed({ now: e = false } = {}) {
|
|
2313
|
-
if (this.isUnsaved = true, this.cancelTimer(), e) {
|
|
2314
|
-
this.save();
|
|
2315
|
-
return;
|
|
2316
|
-
}
|
|
2317
|
-
this.timer = setTimeout(() => {
|
|
2318
|
-
this.save();
|
|
2319
|
-
}, this.props.wait), this.state.kind !== "failed" && this.state.kind !== "off server" && this.setState({ kind: "unsaved" });
|
|
2320
|
-
}
|
|
2321
|
-
save({ keepalive: e = false } = {}) {
|
|
2322
|
-
this.cancelTimer();
|
|
2323
|
-
let n = /* @__PURE__ */ __name(() => this.saveQueued(e), "n"), r = this.inFlight ? this.saving.then(n) : n();
|
|
2324
|
-
return this.inFlight++, r.finally(() => this.inFlight--), this.saving = r, r;
|
|
2325
|
-
}
|
|
2326
|
-
get settled() {
|
|
2327
|
-
return this.saving;
|
|
2328
|
-
}
|
|
2329
|
-
get isPending() {
|
|
2330
|
-
return !!this.timer || this.state.kind === "saving";
|
|
2331
|
-
}
|
|
2332
|
-
done() {
|
|
2333
|
-
this.round++, this.stop(), this.isUnsaved = false, this.drop(), this.setState({ kind: "idle" });
|
|
2334
|
-
}
|
|
2335
|
-
stop() {
|
|
2336
|
-
this.cancelTimer(), this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = void 0;
|
|
2337
|
-
}
|
|
2338
|
-
tell(e, { isError: n = false } = {}) {
|
|
2339
|
-
this.setState({ kind: "told", text: e, ...n && { isError: n } });
|
|
2340
|
-
}
|
|
2341
|
-
watch(e) {
|
|
2342
|
-
let n = /* @__PURE__ */ __name(() => {
|
|
2343
|
-
this.save({ keepalive: true });
|
|
2344
|
-
}, "n"), r = /* @__PURE__ */ __name(() => {
|
|
2345
|
-
e.document.visibilityState === "hidden" && n();
|
|
2346
|
-
}, "r");
|
|
2347
|
-
return e.addEventListener("pagehide", n), e.document.addEventListener("visibilitychange", r), () => {
|
|
2348
|
-
e.removeEventListener("pagehide", n), e.document.removeEventListener("visibilitychange", r), this.stop();
|
|
2349
|
-
};
|
|
2350
|
-
}
|
|
2351
|
-
keep(e) {
|
|
2352
|
-
this.copy.keep(e);
|
|
2353
|
-
}
|
|
2354
|
-
kept() {
|
|
2355
|
-
return this.copy.kept();
|
|
2356
|
-
}
|
|
2357
|
-
drop() {
|
|
2358
|
-
this.copy.drop();
|
|
2359
|
-
}
|
|
2360
|
-
get text() {
|
|
2361
|
-
let e = this.state;
|
|
2362
|
-
switch (e.kind) {
|
|
2363
|
-
case "idle":
|
|
2364
|
-
return "";
|
|
2365
|
-
case "unsaved":
|
|
2366
|
-
return "not saved yet";
|
|
2367
|
-
case "saving":
|
|
2368
|
-
return "saving…";
|
|
2369
|
-
case "saved":
|
|
2370
|
-
return `saved ${Pc(e.at)}`;
|
|
2371
|
-
case "told":
|
|
2372
|
-
return e.text;
|
|
2373
|
-
case "off server":
|
|
2374
|
-
return "kept in this browser only: this page isn't on the page server";
|
|
2375
|
-
default:
|
|
2376
|
-
return `kept in this browser only: ${e.why}; trying again every ${this.retry / 1e3}s`;
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
get isError() {
|
|
2380
|
-
let e = this.state;
|
|
2381
|
-
return e.kind === "failed" || e.kind === "off server" || e.kind === "told" && !!e.isError;
|
|
2382
|
-
}
|
|
2383
|
-
async saveQueued(e) {
|
|
2384
|
-
if (this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = void 0, !this.isUnsaved) return true;
|
|
2385
|
-
if (this.props.isOffServer?.()) return this.setState({ kind: "off server" }), false;
|
|
2386
|
-
let n = this.round;
|
|
2387
|
-
this.isUnsaved = false, this.state.kind !== "failed" && this.setState({ kind: "saving" });
|
|
2388
|
-
try {
|
|
2389
|
-
let r = await this.props.save({ keepalive: e });
|
|
2390
|
-
return n !== this.round ? true : (this.setState({ kind: "saved", at: r ?? (/* @__PURE__ */ new Date()).toISOString() }), !this.isUnsaved);
|
|
2391
|
-
} catch (r) {
|
|
2392
|
-
return n !== this.round ? true : (this.isUnsaved = true, this.setState({ kind: "failed", why: r.message.replace(/[.!]$/, "") }), this.retryTimer = setTimeout(() => {
|
|
2393
|
-
this.save();
|
|
2394
|
-
}, this.retry), false);
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
get retry() {
|
|
2398
|
-
return this.props.retry ?? kc;
|
|
2399
|
-
}
|
|
2400
|
-
cancelTimer() {
|
|
2401
|
-
this.timer && clearTimeout(this.timer), this.timer = void 0;
|
|
2402
|
-
}
|
|
2403
|
-
setState(e) {
|
|
2404
|
-
this.state = e, this.props.onChange?.();
|
|
2405
|
-
}
|
|
2406
|
-
};
|
|
2407
|
-
function Pc(t) {
|
|
2408
|
-
let e = new Date(t);
|
|
2409
|
-
return isNaN(e.getTime()) ? "" : Ie(e);
|
|
2410
|
-
}
|
|
2411
|
-
__name(Pc, "Pc");
|
|
2412
|
-
var le = class extends ut {
|
|
2413
|
-
static {
|
|
2414
|
-
__name(this, "le");
|
|
2415
|
-
}
|
|
2416
|
-
constructor(e) {
|
|
2417
|
-
let { link: n, storage: r, retry: s = 3e3, ...o } = e;
|
|
2418
|
-
super({ ...o, retry: s, ...n && { isOffServer: /* @__PURE__ */ __name(() => !n.isServed, "isOffServer") }, storage: /* @__PURE__ */ __name(() => "storage" in e ? Ge(r) : globalThis.localStorage, "storage") });
|
|
2419
|
-
}
|
|
2420
|
-
};
|
|
2421
|
-
var Ep = 1440 * 60 * 1e3;
|
|
2422
|
-
var je = class t extends se {
|
|
2423
|
-
static {
|
|
2424
|
-
__name(this, "t");
|
|
2425
|
-
}
|
|
2426
|
-
constructor(n) {
|
|
2427
|
-
super();
|
|
2428
|
-
this.options = n;
|
|
2429
|
-
this.link = new T(n), this.drafts = new le({ save: /* @__PURE__ */ __name(async ({ keepalive: r }) => (await this.post("draft", r)).draft.saved, "save"), wait: 500, key: `${Qs}${n.page}`, storage: n.storage, link: this.link, onChange: /* @__PURE__ */ __name(() => this.changed(), "onChange") });
|
|
2430
|
-
}
|
|
2431
|
-
options;
|
|
2432
|
-
feedback = "";
|
|
2433
|
-
sent;
|
|
2434
|
-
isStale = false;
|
|
2435
|
-
error = "";
|
|
2436
|
-
isSending = false;
|
|
2437
|
-
rows = /* @__PURE__ */ new Map();
|
|
2438
|
-
restored = {};
|
|
2439
|
-
restoredComments = {};
|
|
2440
|
-
restoredOrder = {};
|
|
2441
|
-
link;
|
|
2442
|
-
drafts;
|
|
2443
|
-
note = "";
|
|
2444
|
-
static forPage() {
|
|
2445
|
-
return t.onePerPage(() => new t({ ...T.pageOptions(), storage: /* @__PURE__ */ __name(() => window.localStorage, "storage") }));
|
|
2446
|
-
}
|
|
2447
|
-
add(n) {
|
|
2448
|
-
this.rows.set(n.rowName, n);
|
|
2449
|
-
let r = this.restored[n.rowName];
|
|
2450
|
-
r !== void 0 && n.showValue(r);
|
|
2451
|
-
let s = this.restoredComments[n.rowName];
|
|
2452
|
-
return s !== void 0 && n.showComment(s), this.changed(), () => {
|
|
2453
|
-
this.rows.get(n.rowName) === n && this.rows.delete(n.rowName), this.changed();
|
|
2454
|
-
};
|
|
2455
|
-
}
|
|
2456
|
-
get counts() {
|
|
2457
|
-
let n = [...this.rows.values()];
|
|
2458
|
-
return { rows: n.length, changed: n.filter((r) => r.isChanged).length, commented: n.filter((r) => ni(r)).length };
|
|
2459
|
-
}
|
|
2460
|
-
collect() {
|
|
2461
|
-
let n = {};
|
|
2462
|
-
for (let r of this.rows.values()) r.isChanged && (n[r.rowName] = r.value);
|
|
2463
|
-
return n;
|
|
2464
|
-
}
|
|
2465
|
-
collectComments() {
|
|
2466
|
-
let n = {};
|
|
2467
|
-
for (let r of this.rows.values()) ni(r) && (n[r.rowName] = r.comment);
|
|
2468
|
-
return n;
|
|
2469
|
-
}
|
|
2470
|
-
collectOrder() {
|
|
2471
|
-
let n = /* @__PURE__ */ new Map();
|
|
2472
|
-
for (let s of this.rows.values()) s.orderKey !== void 0 && (n.has(s.orderKey) || n.set(s.orderKey, []), n.get(s.orderKey).push(s));
|
|
2473
|
-
let r = {};
|
|
2474
|
-
for (let [s, o] of n) r[s] = o.sort((u, l) => u.orderIndex - l.orderIndex).map((u) => u.rowName);
|
|
2475
|
-
return r;
|
|
2476
|
-
}
|
|
2477
|
-
edited() {
|
|
2478
|
-
this.keepsDrafts && (this.writeLocal(), this.saveSoon()), this.sent && (this.isStale = true), this.changed();
|
|
2479
|
-
}
|
|
2480
|
-
setFeedback(n) {
|
|
2481
|
-
this.feedback = n, this.edited();
|
|
2482
|
-
}
|
|
2483
|
-
watch(n) {
|
|
2484
|
-
return this.drafts.watch(n);
|
|
2485
|
-
}
|
|
2486
|
-
async save({ keepalive: n = false } = {}) {
|
|
2487
|
-
await this.drafts.save({ keepalive: n });
|
|
2488
|
-
}
|
|
2489
|
-
get savedText() {
|
|
2490
|
-
return this.note ? this.note : this.isSaveError ? Ne(this.drafts.text) : this.drafts.text;
|
|
2491
|
-
}
|
|
2492
|
-
get isSaveError() {
|
|
2493
|
-
return this.drafts.isError;
|
|
2494
|
-
}
|
|
2495
|
-
saveSoon() {
|
|
2496
|
-
this.drafts.changed();
|
|
2497
|
-
}
|
|
2498
|
-
async send() {
|
|
2499
|
-
if (!this.isSending) {
|
|
2500
|
-
this.error = "", this.isSending = true, this.changed();
|
|
2501
|
-
try {
|
|
2502
|
-
let { answer: n } = await this.post("answer");
|
|
2503
|
-
this.sent = n, this.isStale = false, this.drafts.done(), this.drafts.tell(`saved ${Y(n.answered)}`);
|
|
2504
|
-
} catch (n) {
|
|
2505
|
-
this.error = `Not sent: ${n.message}`;
|
|
2506
|
-
} finally {
|
|
2507
|
-
this.isSending = false, this.changed();
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
get sentText() {
|
|
2512
|
-
let n = this.sent;
|
|
2513
|
-
if (!n) return "";
|
|
2514
|
-
let r = Object.keys(n.values ?? {}).length, s = Object.keys(n.comments ?? {}).length, o = n.changes ? ` (sent ${n.changes + 1} times)` : "", u = Y(n.answered);
|
|
2515
|
-
if (this.isStale) return `Sent at ${u}${o}; changed since: press Do it again to send the new ones.`;
|
|
2516
|
-
let l = [...this.rows.values()].every((v) => v.blank) ? "left as they are" : "as recommended", d = `${r} changed, ${s ? `${s} commented, ` : ""}${this.rows.size - r} ${l}`;
|
|
2517
|
-
return `Sent to Claude at ${u}${o}: ${d}. Change anything and press Do it again to resend.`;
|
|
2518
|
-
}
|
|
2519
|
-
async restore() {
|
|
2520
|
-
let n = this.link.isServed;
|
|
2521
|
-
if (!this.keepsDrafts) return n ? (this.note = "a template: nothing here is saved", this.changed()) : void 0;
|
|
2522
|
-
let r, s;
|
|
2523
|
-
try {
|
|
2524
|
-
n && ([r, s] = await Promise.all([this.fetchJson("draft"), this.fetchJson("answer")]));
|
|
2525
|
-
} catch (l) {
|
|
2526
|
-
this.drafts.tell(`can't load what you typed: ${l.message}`, { isError: true });
|
|
2527
|
-
}
|
|
2528
|
-
let o = this.readLocal(), u = Oc(r, o, s);
|
|
2529
|
-
if (u) {
|
|
2530
|
-
this.restored = u.values ?? {};
|
|
2531
|
-
for (let [l, d] of Object.entries(this.restored)) this.rows.get(l)?.showValue(d);
|
|
2532
|
-
this.restoredComments = u.comments ?? {};
|
|
2533
|
-
for (let [l, d] of Object.entries(this.restoredComments)) this.rows.get(l)?.showComment(d);
|
|
2534
|
-
this.feedback = u.feedback ?? "", this.restoredOrder = u.order ?? {};
|
|
2535
|
-
}
|
|
2536
|
-
r && !this.isSaveError && this.drafts.tell(`saved ${Y(r.saved)}`), s && (this.sent = s), u && u === o && this.saveSoon(), this.changed();
|
|
2537
|
-
}
|
|
2538
|
-
copyText() {
|
|
2539
|
-
return JSON.stringify(this.draftNow(), null, 2);
|
|
2540
|
-
}
|
|
2541
|
-
static fileUrl(n, r, { root: s, worktrees: o, pathname: u }) {
|
|
2542
|
-
if (!s) return "#";
|
|
2543
|
-
let l = /^\/worktrees\/([^/]+)\//.exec(u)?.[1], d = l && o ? `${o}/${l}` : s;
|
|
2544
|
-
return `vscode://file${encodeURI(`${d}/${n}`)}:${r}`;
|
|
2545
|
-
}
|
|
2546
|
-
static fileUrlHere(n, r) {
|
|
2547
|
-
let s = window.SPELL_SERVER;
|
|
2548
|
-
return t.fileUrl(n, r, { root: s?.root, worktrees: s?.worktrees, pathname: location.pathname });
|
|
2549
|
-
}
|
|
2550
|
-
static openFile(n, r, s = globalThis.window) {
|
|
2551
|
-
s.parent !== s && (n.preventDefault(), s.parent.postMessage({ spell: "open", url: r, kind: "external" }, "*"));
|
|
2552
|
-
}
|
|
2553
|
-
static expandAll(n) {
|
|
2554
|
-
let r = t.sectionsOf(n), s = t.isAllOpen(n);
|
|
2555
|
-
for (let d of r) d.open = !s;
|
|
2556
|
-
let o = `${Zs}${n.location.pathname}`, u = V.getAt(o), l = u && typeof u == "object" ? u : {};
|
|
2557
|
-
for (let d of r) l[d.id] = s;
|
|
2558
|
-
return V.setAt(o, l), !s;
|
|
2559
|
-
}
|
|
2560
|
-
static isAllOpen(n) {
|
|
2561
|
-
return t.sectionsOf(n).every((r) => r.open);
|
|
2562
|
-
}
|
|
2563
|
-
static sectionsOf(n) {
|
|
2564
|
-
return [...n.querySelectorAll("ui-section:has(> epic-choice-rows)")];
|
|
2565
|
-
}
|
|
2566
|
-
get keepsDrafts() {
|
|
2567
|
-
return Xs.test(this.options.page);
|
|
2568
|
-
}
|
|
2569
|
-
draftNow() {
|
|
2570
|
-
return { page: this.options.page, saved: (/* @__PURE__ */ new Date()).toISOString(), ...this.body() };
|
|
2571
|
-
}
|
|
2572
|
-
writeLocal() {
|
|
2573
|
-
this.drafts.keep(this.draftNow());
|
|
2574
|
-
}
|
|
2575
|
-
readLocal() {
|
|
2576
|
-
let n = this.drafts.kept();
|
|
2577
|
-
return n && typeof n.saved == "string" && n.values && typeof n.values == "object" ? n : void 0;
|
|
2578
|
-
}
|
|
2579
|
-
body() {
|
|
2580
|
-
let n = this.collectOrder(), r = this.collectComments();
|
|
2581
|
-
return { values: this.collect(), ...Object.keys(r).length > 0 && { comments: r }, feedback: this.feedback.trim(), ...Object.keys(n).length > 0 && { order: n } };
|
|
2582
|
-
}
|
|
2583
|
-
async post(n, r = false) {
|
|
2584
|
-
if (!this.link.isServed) throw new Error("this page isn't on the page server: open it with `epic choices show`");
|
|
2585
|
-
let s = { page: this.options.page, ...this.body() };
|
|
2586
|
-
return this.link.post(`${ce}/${n}`, s, { keepalive: r });
|
|
2587
|
-
}
|
|
2588
|
-
async fetchJson(n) {
|
|
2589
|
-
let r = await this.link.getForPage(`${ce}/${n}`, { missing: null }).catch(() => {
|
|
2590
|
-
});
|
|
2591
|
-
if (r === null) throw new Error("page server too old, restart it");
|
|
2592
|
-
return r?.[n] ?? void 0;
|
|
2593
|
-
}
|
|
2594
|
-
};
|
|
2595
|
-
function ni(t) {
|
|
2596
|
-
return t.comment.trim() !== "";
|
|
2597
|
-
}
|
|
2598
|
-
__name(ni, "ni");
|
|
2599
|
-
function Oc(t, e, n) {
|
|
2600
|
-
let r = [[n, n?.answered], [t, t?.saved], [e, e?.saved]], s, o = -1 / 0;
|
|
2601
|
-
for (let [u, l] of r) {
|
|
2602
|
-
let d = Date.parse(l ?? "") || 0;
|
|
2603
|
-
u && d > o && ([s, o] = [u, d]);
|
|
2604
|
-
}
|
|
2605
|
-
return s;
|
|
2606
|
-
}
|
|
2607
|
-
__name(Oc, "Oc");
|
|
2608
|
-
function at(t, e = "button") {
|
|
2609
|
-
let n = /* @__PURE__ */ __name(() => {
|
|
2610
|
-
let r = t.shadowRoot?.querySelector(`[part~="${e}"]`);
|
|
2611
|
-
return r && (r.title = t.title), !!r;
|
|
2612
|
-
}, "n");
|
|
2613
|
-
n() || customElements.whenDefined(t.localName).then(() => requestAnimationFrame(n));
|
|
2614
|
-
}
|
|
2615
|
-
__name(at, "at");
|
|
2616
|
-
function g(t, e = {}, ...n) {
|
|
2617
|
-
let r = document.createElement(t);
|
|
2618
|
-
for (let [s, o] of Object.entries(e)) o !== void 0 && o !== false && r.setAttribute(s, o === true ? "" : String(o));
|
|
2619
|
-
return r.append(...n.filter((s) => s != null && s !== false && s !== "")), r;
|
|
2620
|
-
}
|
|
2621
|
-
__name(g, "g");
|
|
2622
|
-
function ri({ load: t, draw: e, holder: n, header: r, offServer: s, failure: o }) {
|
|
2623
|
-
let u = new URL("spell-ui.js", document.currentScript?.src ?? location.href).href;
|
|
2624
|
-
return (async () => {
|
|
2625
|
-
let d;
|
|
2626
|
-
try {
|
|
2627
|
-
T.canRead() ? d = await t() : l(`${s}: open it through the page server, e.g. \`epic pages open ${Ic()}\`.`), d && e(d);
|
|
2628
|
-
} catch (v) {
|
|
2629
|
-
l(`${o}: ${v.message}`), d = void 0;
|
|
2630
|
-
}
|
|
2631
|
-
return document.body.append(g("script", { src: u })), d;
|
|
2632
|
-
})();
|
|
2633
|
-
function l(d) {
|
|
2634
|
-
(document.querySelector(n) ?? document.querySelector("main"))?.prepend(g("ui-message", { state: "warning", heading: r }, g("p", {}, ...Nt(d))));
|
|
2635
|
-
}
|
|
2636
|
-
__name(l, "l");
|
|
2637
|
-
}
|
|
2638
|
-
__name(ri, "ri");
|
|
2639
|
-
function Nt(t, e = (n) => [n]) {
|
|
2640
|
-
return String(t).split("`").flatMap((n, r) => r % 2 ? [g("code", {}, n)] : e(n)).filter((n) => n !== "");
|
|
2641
|
-
}
|
|
2642
|
-
__name(Nt, "Nt");
|
|
2643
|
-
function si(t) {
|
|
2644
|
-
return /^\s*(\d+(?:\.\d+)*)\.?\s/.exec(t?.getAttribute("label") ?? "")?.[1] ?? "";
|
|
2645
|
-
}
|
|
2646
|
-
__name(si, "si");
|
|
2647
|
-
function Ic() {
|
|
2648
|
-
return decodeURIComponent(location.pathname).replace(/^.*\/(?=(?:guides|epics|templates|pages)\/)/, "");
|
|
2649
|
-
}
|
|
2650
|
-
__name(Ic, "Ic");
|
|
2651
|
-
var oi = "/api/docs/comments", Nc = ["agent", "claude"], _c = 5e3, $c = "spell-syntax-draft:", Rc = ["js", "ts", "py"], qe = "Provide more details here", Lc = "(no docstring yet)", Mc = 80, de = /* @__PURE__ */ new Map(), jt = /* @__PURE__ */ new Map(), ct = {}, I, $t, Q = new le({ save: /* @__PURE__ */ __name(async ({ keepalive: t }) => (await di(ce, "draft", { keepalive: t })).draft.saved, "save"), wait: _c, key: `${$c}${location.pathname}`, onChange: /* @__PURE__ */ __name(() => Zc(Q.text, { isError: Q.isError }), "onChange") });
|
|
2652
|
-
ri({ load: jc, draw: qc, holder: "[data-syntax-modules]", header: "Rules not drawn", offServer: "This page draws its rules from the checkout serving it, and saves what you type", failure: "Couldn't draw the rules" }).then((t) => t && Xc());
|
|
2653
|
-
async function jc() {
|
|
2654
|
-
let t = document.body.dataset.choicesRows;
|
|
2655
|
-
if (!t) throw new Error("the page's `<body>` has no `data-choices-rows`");
|
|
2656
|
-
let e = await T.forPage().getFile(t);
|
|
2657
|
-
if (e === void 0) throw new Error(`${t.split("/").pop()}: not found`);
|
|
2658
|
-
return e;
|
|
2659
|
-
}
|
|
2660
|
-
__name(jc, "jc");
|
|
2661
|
-
function qc(t) {
|
|
2662
|
-
let e = t.modules ?? [], n = e.flatMap((u) => u.rules);
|
|
2663
|
-
document.querySelector("[data-syntax-stats]")?.replaceChildren(g("ui-statistic", { value: String(e.length), label: "modules" }), g("ui-statistic", { value: String(n.filter((u) => !u.internal).length), label: "rule classes" }), g("ui-statistic", { value: String(n.filter((u) => u.internal).length), label: "internal" }));
|
|
2664
|
-
let s = document.querySelector("[data-syntax-modules]"), o = si(s.closest("ui-section"));
|
|
2665
|
-
s.replaceWith(...e.map((u, l) => Uc(u, o ? `${o}.${l + 1} ` : ""))), I = Yc(), Jc(), qt();
|
|
2666
|
-
}
|
|
2667
|
-
__name(qc, "qc");
|
|
2668
|
-
function Uc({ module: t, rules: e }, n) {
|
|
2669
|
-
let r = e.filter((l) => l.internal).length, s = e.length - r, o = [s ? `${s} ${s === 1 ? "rule" : "rules"}` : "", r ? `${r} internal` : ""].filter(Boolean), u = g("table", {}, g("thead", {}, g("tr", {}, g("th", {}, "Rule name"), g("th", {}, "Syntax"), g("th", {}, "Purpose"))), g("tbody", {}, ...e.map(Wc)));
|
|
2670
|
-
return g("ui-section", { id: `module-${wt(t)}`, label: `${n}${t}`, badge: o.join(" · "), sticky: "", collapsible: "", dividing: "" }, g("ui-table", { id: `rules-${wt(t)}`, class: "spell-syntax-table", celled: "", padding: "compact", unstackable: "" }, u));
|
|
2671
|
-
}
|
|
2672
|
-
__name(Uc, "Uc");
|
|
2673
|
-
function Wc(t) {
|
|
2674
|
-
return g("tr", { id: `rule-${t.className}`, "data-rule": t.className }, Vc(t), Kc(t), zc(t));
|
|
2675
|
-
}
|
|
2676
|
-
__name(Wc, "Wc");
|
|
2677
|
-
function Vc(t) {
|
|
2678
|
-
let e = t.ruleNames.length ? t.ruleNames.join(", ") : "no rule name of its own", n = g(t.file ? "a" : "span", { class: "spell-syntax-source", title: e }, t.className);
|
|
2679
|
-
t.file && (n.href = je.fileUrlHere(t.file, t.line));
|
|
2680
|
-
let r = ai("spell-syntax-rename", "pen to square", `Suggest another name for ${t.className}`, `Suggest another name for ${t.className}`), s = ui(t, "name", t.className, `Class name of ${t.className}`);
|
|
2681
|
-
s.hidden = true;
|
|
2682
|
-
let o = t.syntaxes.filter((d) => d.syntax), u = o.length ? g("ul", { class: "spell-syntax-syntaxes" }, ...o.map((d) => g("li", {}, g("code", {}, d.syntax)))) : t.internal ? "" : g("p", { class: "spell-syntax-none" }, "matched by its code: no syntax of its own"), l = t.aliases.length ? g("p", { class: "spell-syntax-aka" }, g("em", {}, "aka"), ": ", ...t.aliases.flatMap((d, v) => [v ? ", " : "", g("code", {}, d)])) : "";
|
|
2683
|
-
return g("td", { class: "spell-syntax-name" }, g("div", { class: "spell-syntax-class" }, n, r), s, u, l);
|
|
2684
|
-
}
|
|
2685
|
-
__name(Vc, "Vc");
|
|
2686
|
-
function Kc(t) {
|
|
2687
|
-
let e = t.syntaxes.filter((n) => n.example);
|
|
2688
|
-
return e.length ? g("td", { class: "spell-syntax-outputs" }, ...e.map((n, r) => Hc(t, n, r))) : g("td", { class: "spell-syntax-outputs" }, g("em", { class: "spell-syntax-none" }, t.internal ? "no syntax of its own" : "no test to show it with yet"));
|
|
2689
|
-
}
|
|
2690
|
-
__name(Kc, "Kc");
|
|
2691
|
-
function Hc(t, e, n) {
|
|
2692
|
-
let r = n ? `.${n + 1}` : "", s = Rc.map((u) => {
|
|
2693
|
-
let l = e.outputs[u], d = "code" in l ? ui(t, `${u}${r}`, l.code, `${u} for ${e.example}`) : g("em", { class: "spell-syntax-none" }, `(${l.error})`);
|
|
2694
|
-
return g("li", {}, g("b", {}, u), d);
|
|
2695
|
-
}), o = e.syntax ? `Matches: ${e.syntax}` : "Matched by the rule's own code";
|
|
2696
|
-
return g("ul", { class: "spell-syntax-writers" }, g("li", { class: "spell-syntax-input" }, g("b", {}, "e.g."), g("code", { title: o }, e.example)), ...s);
|
|
2697
|
-
}
|
|
2698
|
-
__name(Hc, "Hc");
|
|
2699
|
-
function zc(t) {
|
|
2700
|
-
let e = g("span", { class: "spell-syntax-purpose-text" }, ...t.internal ? [g("b", {}, "internal"), " "] : [], ...Nt(t.purpose || Lc)), n = `${qe}: ask Claude, in a comment here`, r = g("ui-button", { class: "spell-syntax-wand", appearance: "circular basic", size: "mini", icon: "wand magic sparkles", title: n, "aria-label": `${qe}: ${t.className}` });
|
|
2701
|
-
return at(r), r.addEventListener("click", () => {
|
|
2702
|
-
el(t, r, e);
|
|
2703
|
-
}), jt.set(t.className, r), g("td", { class: "spell-syntax-purpose" }, g("p", {}, e, " ", r));
|
|
2704
|
-
}
|
|
2705
|
-
__name(zc, "zc");
|
|
2706
|
-
function ui(t, e, n, r) {
|
|
2707
|
-
let s = `${t.className}.${e}`, o = g("textarea", { class: "spell-choice-input", rows: "1", spellcheck: "false", autocomplete: "off", "aria-label": r, ...e === "name" && { "data-one-line": "" } });
|
|
2708
|
-
o.value = n;
|
|
2709
|
-
let u = g("div", { class: "spell-choice-field spell-syntax-box", "data-box": s }, o);
|
|
2710
|
-
return de.set(s, { key: s, input: o, reset: void 0, holder: u, generated: n }), u;
|
|
2711
|
-
}
|
|
2712
|
-
__name(ui, "ui");
|
|
2713
|
-
function Gc(t) {
|
|
2714
|
-
let { generated: e } = t, n = ai("spell-choice-reset", "clock rotate left", `Back to ${e.split(`
|
|
1
|
+
"use strict";(()=>{var Yi=Object.create;var Qt=Object.defineProperty;var Ji=Object.getOwnPropertyDescriptor;var Qi=Object.getOwnPropertyNames;var Xi=Object.getPrototypeOf,Zi=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}};var eo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Qi(e))!Zi.call(t,s)&&s!==n&&Qt(t,s,{get:()=>e[s],enumerable:!(r=Ji(e,s))||r.enumerable});return t};var Oe=(t,e,n)=>(n=t!=null?Yi(Xi(t)):{},eo(e||!t||!t.__esModule?Qt(n,"default",{value:t,enumerable:!0}):n,t));var Ye=p((dl,rn)=>{var oo=Array.isArray;rn.exports=oo});var on=p((fl,sn)=>{var uo=typeof global=="object"&&global&&global.Object===Object&&global;sn.exports=uo});var Je=p((pl,un)=>{var ao=on(),co=typeof self=="object"&&self&&self.Object===Object&&self,lo=ao||co||Function("return this")();un.exports=lo});var Qe=p((hl,an)=>{var fo=Je(),po=fo.Symbol;an.exports=po});var fn=p((gl,dn)=>{var cn=Qe(),ln=Object.prototype,ho=ln.hasOwnProperty,go=ln.toString,_e=cn?cn.toStringTag:void 0;function Do(t){var e=ho.call(t,_e),n=t[_e];try{t[_e]=void 0;var r=!0}catch{}var s=go.call(t);return r&&(e?t[_e]=n:delete t[_e]),s}dn.exports=Do});var hn=p((Dl,pn)=>{var mo=Object.prototype,yo=mo.toString;function Ao(t){return yo.call(t)}pn.exports=Ao});var Ct=p((ml,mn)=>{var gn=Qe(),Eo=fn(),wo=hn(),Co="[object Null]",vo="[object Undefined]",Dn=gn?gn.toStringTag:void 0;function Fo(t){return t==null?t===void 0?vo:Co:Dn&&Dn in Object(t)?Eo(t):wo(t)}mn.exports=Fo});var An=p((yl,yn)=>{function bo(t){return t!=null&&typeof t=="object"}yn.exports=bo});var Xe=p((Al,En)=>{var xo=Ct(),So=An(),ko="[object Symbol]";function Po(t){return typeof t=="symbol"||So(t)&&xo(t)==ko}En.exports=Po});var Cn=p((El,wn)=>{var To=Ye(),Bo=Xe(),Oo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Io=/^\w*$/;function No(t,e){if(To(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Bo(t)?!0:Io.test(t)||!Oo.test(t)||e!=null&&t in Object(e)}wn.exports=No});var Ze=p((wl,vn)=>{function _o(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}vn.exports=_o});var bn=p((Cl,Fn)=>{var $o=Ct(),Ro=Ze(),Lo="[object AsyncFunction]",Mo="[object Function]",jo="[object GeneratorFunction]",qo="[object Proxy]";function Uo(t){if(!Ro(t))return!1;var e=$o(t);return e==Mo||e==jo||e==Lo||e==qo}Fn.exports=Uo});var Sn=p((vl,xn)=>{var Wo=Je(),Ko=Wo["__core-js_shared__"];xn.exports=Ko});var Tn=p((Fl,Pn)=>{var vt=Sn(),kn=(function(){var t=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Vo(t){return!!kn&&kn in t}Pn.exports=Vo});var On=p((bl,Bn)=>{var Ho=Function.prototype,zo=Ho.toString;function Go(t){if(t!=null){try{return zo.call(t)}catch{}try{return t+""}catch{}}return""}Bn.exports=Go});var Nn=p((xl,In)=>{var Yo=bn(),Jo=Tn(),Qo=Ze(),Xo=On(),Zo=/[\\^$.*+?()[\]{}|]/g,eu=/^\[object .+?Constructor\]$/,tu=Function.prototype,nu=Object.prototype,ru=tu.toString,su=nu.hasOwnProperty,iu=RegExp("^"+ru.call(su).replace(Zo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ou(t){if(!Qo(t)||Jo(t))return!1;var e=Yo(t)?iu:eu;return e.test(Xo(t))}In.exports=ou});var $n=p((Sl,_n)=>{function uu(t,e){return t?.[e]}_n.exports=uu});var et=p((kl,Rn)=>{var au=Nn(),cu=$n();function lu(t,e){var n=cu(t,e);return au(n)?n:void 0}Rn.exports=lu});var $e=p((Pl,Ln)=>{var du=et(),fu=du(Object,"create");Ln.exports=fu});var qn=p((Tl,jn)=>{var Mn=$e();function pu(){this.__data__=Mn?Mn(null):{},this.size=0}jn.exports=pu});var Wn=p((Bl,Un)=>{function hu(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}Un.exports=hu});var Vn=p((Ol,Kn)=>{var gu=$e(),Du="__lodash_hash_undefined__",mu=Object.prototype,yu=mu.hasOwnProperty;function Au(t){var e=this.__data__;if(gu){var n=e[t];return n===Du?void 0:n}return yu.call(e,t)?e[t]:void 0}Kn.exports=Au});var zn=p((Il,Hn)=>{var Eu=$e(),wu=Object.prototype,Cu=wu.hasOwnProperty;function vu(t){var e=this.__data__;return Eu?e[t]!==void 0:Cu.call(e,t)}Hn.exports=vu});var Yn=p((Nl,Gn)=>{var Fu=$e(),bu="__lodash_hash_undefined__";function xu(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Fu&&e===void 0?bu:e,this}Gn.exports=xu});var Qn=p((_l,Jn)=>{var Su=qn(),ku=Wn(),Pu=Vn(),Tu=zn(),Bu=Yn();function ve(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ve.prototype.clear=Su;ve.prototype.delete=ku;ve.prototype.get=Pu;ve.prototype.has=Tu;ve.prototype.set=Bu;Jn.exports=ve});var Zn=p(($l,Xn)=>{function Ou(){this.__data__=[],this.size=0}Xn.exports=Ou});var Ft=p((Rl,er)=>{function Iu(t,e){return t===e||t!==t&&e!==e}er.exports=Iu});var Re=p((Ll,tr)=>{var Nu=Ft();function _u(t,e){for(var n=t.length;n--;)if(Nu(t[n][0],e))return n;return-1}tr.exports=_u});var rr=p((Ml,nr)=>{var $u=Re(),Ru=Array.prototype,Lu=Ru.splice;function Mu(t){var e=this.__data__,n=$u(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Lu.call(e,n,1),--this.size,!0}nr.exports=Mu});var ir=p((jl,sr)=>{var ju=Re();function qu(t){var e=this.__data__,n=ju(e,t);return n<0?void 0:e[n][1]}sr.exports=qu});var ur=p((ql,or)=>{var Uu=Re();function Wu(t){return Uu(this.__data__,t)>-1}or.exports=Wu});var cr=p((Ul,ar)=>{var Ku=Re();function Vu(t,e){var n=this.__data__,r=Ku(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}ar.exports=Vu});var dr=p((Wl,lr)=>{var Hu=Zn(),zu=rr(),Gu=ir(),Yu=ur(),Ju=cr();function Fe(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Fe.prototype.clear=Hu;Fe.prototype.delete=zu;Fe.prototype.get=Gu;Fe.prototype.has=Yu;Fe.prototype.set=Ju;lr.exports=Fe});var pr=p((Kl,fr)=>{var Qu=et(),Xu=Je(),Zu=Qu(Xu,"Map");fr.exports=Zu});var Dr=p((Vl,gr)=>{var hr=Qn(),ea=dr(),ta=pr();function na(){this.size=0,this.__data__={hash:new hr,map:new(ta||ea),string:new hr}}gr.exports=na});var yr=p((Hl,mr)=>{function ra(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}mr.exports=ra});var Le=p((zl,Ar)=>{var sa=yr();function ia(t,e){var n=t.__data__;return sa(e)?n[typeof e=="string"?"string":"hash"]:n.map}Ar.exports=ia});var wr=p((Gl,Er)=>{var oa=Le();function ua(t){var e=oa(this,t).delete(t);return this.size-=e?1:0,e}Er.exports=ua});var vr=p((Yl,Cr)=>{var aa=Le();function ca(t){return aa(this,t).get(t)}Cr.exports=ca});var br=p((Jl,Fr)=>{var la=Le();function da(t){return la(this,t).has(t)}Fr.exports=da});var Sr=p((Ql,xr)=>{var fa=Le();function pa(t,e){var n=fa(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}xr.exports=pa});var Pr=p((Xl,kr)=>{var ha=Dr(),ga=wr(),Da=vr(),ma=br(),ya=Sr();function be(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}be.prototype.clear=ha;be.prototype.delete=ga;be.prototype.get=Da;be.prototype.has=ma;be.prototype.set=ya;kr.exports=be});var Or=p((Zl,Br)=>{var Tr=Pr(),Aa="Expected a function";function bt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Aa);var n=function(){var r=arguments,s=e?e.apply(this,r):r[0],o=n.cache;if(o.has(s))return o.get(s);var u=t.apply(this,r);return n.cache=o.set(s,u)||o,u};return n.cache=new(bt.Cache||Tr),n}bt.Cache=Tr;Br.exports=bt});var Nr=p((ed,Ir)=>{var Ea=Or(),wa=500;function Ca(t){var e=Ea(t,function(r){return n.size===wa&&n.clear(),r}),n=e.cache;return e}Ir.exports=Ca});var $r=p((td,_r)=>{var va=Nr(),Fa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ba=/\\(\\)?/g,xa=va(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Fa,function(n,r,s,o){e.push(s?o.replace(ba,"$1"):r||n)}),e});_r.exports=xa});var Lr=p((nd,Rr)=>{function Sa(t,e){for(var n=-1,r=t==null?0:t.length,s=Array(r);++n<r;)s[n]=e(t[n],n,t);return s}Rr.exports=Sa});var Kr=p((rd,Wr)=>{var Mr=Qe(),ka=Lr(),Pa=Ye(),Ta=Xe(),Ba=1/0,jr=Mr?Mr.prototype:void 0,qr=jr?jr.toString:void 0;function Ur(t){if(typeof t=="string")return t;if(Pa(t))return ka(t,Ur)+"";if(Ta(t))return qr?qr.call(t):"";var e=t+"";return e=="0"&&1/t==-Ba?"-0":e}Wr.exports=Ur});var Hr=p((sd,Vr)=>{var Oa=Kr();function Ia(t){return t==null?"":Oa(t)}Vr.exports=Ia});var xt=p((id,zr)=>{var Na=Ye(),_a=Cn(),$a=$r(),Ra=Hr();function La(t,e){return Na(t)?t:_a(t,e)?[t]:$a(Ra(t))}zr.exports=La});var St=p((od,Gr)=>{var Ma=Xe(),ja=1/0;function qa(t){if(typeof t=="string"||Ma(t))return t;var e=t+"";return e=="0"&&1/t==-ja?"-0":e}Gr.exports=qa});var Jr=p((ud,Yr)=>{var Ua=xt(),Wa=St();function Ka(t,e){e=Ua(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Wa(e[n++])];return n&&n==r?t:void 0}Yr.exports=Ka});var Xr=p((ad,Qr)=>{var Va=Jr();function Ha(t,e,n){var r=t==null?void 0:Va(t,e);return r===void 0?n:r}Qr.exports=Ha});var es=p((cd,Zr)=>{var za=et(),Ga=(function(){try{var t=za(Object,"defineProperty");return t({},"",{}),t}catch{}})();Zr.exports=Ga});var rs=p((ld,ns)=>{var ts=es();function Ya(t,e,n){e=="__proto__"&&ts?ts(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}ns.exports=Ya});var is=p((dd,ss)=>{var Ja=rs(),Qa=Ft(),Xa=Object.prototype,Za=Xa.hasOwnProperty;function ec(t,e,n){var r=t[e];(!(Za.call(t,e)&&Qa(r,n))||n===void 0&&!(e in t))&&Ja(t,e,n)}ss.exports=ec});var us=p((fd,os)=>{var tc=9007199254740991,nc=/^(?:0|[1-9]\d*)$/;function rc(t,e){var n=typeof t;return e=e??tc,!!e&&(n=="number"||n!="symbol"&&nc.test(t))&&t>-1&&t%1==0&&t<e}os.exports=rc});var ls=p((pd,cs)=>{var sc=is(),ic=xt(),oc=us(),as=Ze(),uc=St();function ac(t,e,n,r){if(!as(t))return t;e=ic(e,t);for(var s=-1,o=e.length,u=o-1,l=t;l!=null&&++s<o;){var d=uc(e[s]),v=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return t;if(s!=u){var N=l[d];v=r?r(N,d,l):void 0,v===void 0&&(v=as(N)?N:oc(e[s+1])?[]:{})}sc(l,d,v),l=l[d]}return t}cs.exports=ac});var fs=p((hd,ds)=>{var cc=ls();function lc(t,e,n){return t==null?t:cc(t,e,n)}ds.exports=lc});var hs=p((gd,ps)=>{"use strict";ps.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)});var As=p((Dd,ys)=>{"use strict";var ms="%[a-f0-9]{2}",gs=new RegExp("("+ms+")|([^%]+?)","gi"),Ds=new RegExp("("+ms+")+","gi");function kt(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],kt(n),kt(r))}function dc(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(gs)||[],n=1;n<e.length;n++)t=kt(e,n).join(""),e=t.match(gs)||[];return t}}function fc(t){for(var e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},n=Ds.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch{var r=dc(n[0]);r!==n[0]&&(e[n[0]]=r)}n=Ds.exec(t)}e["%C2"]="\uFFFD";for(var s=Object.keys(e),o=0;o<s.length;o++){var u=s[o];t=t.replace(new RegExp(u,"g"),e[u])}return t}ys.exports=function(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return fc(t)}}});var ws=p((md,Es)=>{"use strict";Es.exports=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];let n=t.indexOf(e);return n===-1?[t]:[t.slice(0,n),t.slice(n+e.length)]}});var vs=p((yd,Cs)=>{"use strict";Cs.exports=function(t,e){for(var n={},r=Object.keys(t),s=Array.isArray(e),o=0;o<r.length;o++){var u=r[o],l=t[u];(s?e.indexOf(u)!==-1:e(u,l,t))&&(n[u]=l)}return n}});var Bs=p(q=>{"use strict";var pc=hs(),hc=As(),bs=ws(),gc=vs(),Dc=t=>t==null;function mc(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{let s=n.length;return r===void 0||t.skipNull&&r===null||t.skipEmptyString&&r===""?n:r===null?[...n,[O(e,t),"[",s,"]"].join("")]:[...n,[O(e,t),"[",O(s,t),"]=",O(r,t)].join("")]};case"bracket":return e=>(n,r)=>r===void 0||t.skipNull&&r===null||t.skipEmptyString&&r===""?n:r===null?[...n,[O(e,t),"[]"].join("")]:[...n,[O(e,t),"[]=",O(r,t)].join("")];case"comma":case"separator":return e=>(n,r)=>r==null||r.length===0?n:n.length===0?[[O(e,t),"=",O(r,t)].join("")]:[[n,O(r,t)].join(t.arrayFormatSeparator)];default:return e=>(n,r)=>r===void 0||t.skipNull&&r===null||t.skipEmptyString&&r===""?n:r===null?[...n,O(e,t)]:[...n,[O(e,t),"=",O(r,t)].join("")]}}function yc(t){let e;switch(t.arrayFormat){case"index":return(n,r,s)=>{if(e=/\[(\d*)\]$/.exec(n),n=n.replace(/\[\d*\]$/,""),!e){s[n]=r;return}s[n]===void 0&&(s[n]={}),s[n][e[1]]=r};case"bracket":return(n,r,s)=>{if(e=/(\[\])$/.exec(n),n=n.replace(/\[\]$/,""),!e){s[n]=r;return}if(s[n]===void 0){s[n]=[r];return}s[n]=[].concat(s[n],r)};case"comma":case"separator":return(n,r,s)=>{let o=typeof r=="string"&&r.includes(t.arrayFormatSeparator),u=typeof r=="string"&&!o&&De(r,t).includes(t.arrayFormatSeparator);r=u?De(r,t):r;let l=o||u?r.split(t.arrayFormatSeparator).map(d=>De(d,t)):r===null?r:De(r,t);s[n]=l};default:return(n,r,s)=>{if(s[n]===void 0){s[n]=r;return}s[n]=[].concat(s[n],r)}}}function xs(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function O(t,e){return e.encode?e.strict?pc(t):encodeURIComponent(t):t}function De(t,e){return e.decode?hc(t):t}function Ss(t){return Array.isArray(t)?t.sort():typeof t=="object"?Ss(Object.keys(t)).sort((e,n)=>Number(e)-Number(n)).map(e=>t[e]):t}function ks(t){let e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function Ac(t){let e="",n=t.indexOf("#");return n!==-1&&(e=t.slice(n)),e}function Ps(t){t=ks(t);let e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function Fs(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function Ts(t,e){e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e),xs(e.arrayFormatSeparator);let n=yc(e),r=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return r;for(let s of t.split("&")){if(s==="")continue;let[o,u]=bs(e.decode?s.replace(/\+/g," "):s,"=");u=u===void 0?null:["comma","separator"].includes(e.arrayFormat)?u:De(u,e),n(De(o,e),u,r)}for(let s of Object.keys(r)){let o=r[s];if(typeof o=="object"&&o!==null)for(let u of Object.keys(o))o[u]=Fs(o[u],e);else r[s]=Fs(o,e)}return e.sort===!1?r:(e.sort===!0?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((s,o)=>{let u=r[o];return u&&typeof u=="object"&&!Array.isArray(u)?s[o]=Ss(u):s[o]=u,s},Object.create(null))}q.extract=Ps;q.parse=Ts;q.stringify=(t,e)=>{if(!t)return"";e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e),xs(e.arrayFormatSeparator);let n=u=>e.skipNull&&Dc(t[u])||e.skipEmptyString&&t[u]==="",r=mc(e),s={};for(let u of Object.keys(t))n(u)||(s[u]=t[u]);let o=Object.keys(s);return e.sort!==!1&&o.sort(e.sort),o.map(u=>{let l=t[u];return l===void 0?"":l===null?O(u,e):Array.isArray(l)?l.reduce(r(u),[]).join("&"):O(u,e)+"="+O(l,e)}).filter(u=>u.length>0).join("&")};q.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[n,r]=bs(t,"#");return Object.assign({url:n.split("?")[0]||"",query:Ts(Ps(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:De(r,e)}:{})};q.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0},e);let n=ks(t.url).split("?")[0]||"",r=q.extract(t.url),s=q.parse(r,{sort:!1}),o=Object.assign(s,t.query),u=q.stringify(o,e);u&&(u=`?${u}`);let l=Ac(t.url);return t.fragmentIdentifier&&(l=`#${O(t.fragmentIdentifier,e)}`),`${n}${u}${l}`};q.pick=(t,e,n)=>{n=Object.assign({parseFragmentIdentifier:!0},n);let{url:r,query:s,fragmentIdentifier:o}=q.parseUrl(t,n);return q.stringifyUrl({url:r,query:gc(s,e),fragmentIdentifier:o},n)};q.exclude=(t,e,n)=>{let r=Array.isArray(e)?s=>!e.includes(s):(s,o)=>!e(s,o);return q.pick(t,r,n)}});var Os=p((Pt,Tt)=>{(function(t,e){typeof Pt=="object"&&typeof Tt<"u"?Tt.exports=e():typeof define=="function"&&define.amd?define(e):t.JSON5=e()})(Pt,(function(){"use strict";function t(i,a){return a={exports:{}},i(a,a.exports),a.exports}var e=t(function(i){var a=i.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=a)}),n=t(function(i){var a=i.exports={version:"2.6.5"};typeof __e=="number"&&(__e=a)}),r=n.version,s=function(i){return typeof i=="object"?i!==null:typeof i=="function"},o=function(i){if(!s(i))throw TypeError(i+" is not an object!");return i},u=function(i){try{return!!i()}catch{return!0}},l=!u(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),d=e.document,v=s(d)&&s(d.createElement),N=function(i){return v?d.createElement(i):{}},W=!l&&!u(function(){return Object.defineProperty(N("div"),"a",{get:function(){return 7}}).a!=7}),ie=function(i,a){if(!s(i))return i;var h,f;if(a&&typeof(h=i.toString)=="function"&&!s(f=h.call(i))||typeof(h=i.valueOf)=="function"&&!s(f=h.call(i))||!a&&typeof(h=i.toString)=="function"&&!s(f=h.call(i)))return f;throw TypeError("Can't convert object to primitive value")},lt=Object.defineProperty,dt=l?Object.defineProperty:function(a,h,f){if(o(a),h=ie(h,!0),o(f),W)try{return lt(a,h,f)}catch{}if("get"in f||"set"in f)throw TypeError("Accessors not supported!");return"value"in f&&(a[h]=f.value),a},ft={f:dt},K=function(i,a){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:a}},X=l?function(i,a,h){return ft.f(i,a,K(1,h))}:function(i,a,h){return i[a]=h,i},V={}.hasOwnProperty,Wt=function(i,a){return V.call(i,a)},mi=0,yi=Math.random(),Ai=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++mi+yi).toString(36))},Ei=!1,wi=t(function(i){var a="__core-js_shared__",h=e[a]||(e[a]={});(i.exports=function(f,D){return h[f]||(h[f]=D!==void 0?D:{})})("versions",[]).push({version:n.version,mode:Ei?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),pt=wi("native-function-to-string",Function.toString),Ci=t(function(i){var a=Ai("src"),h="toString",f=(""+pt).split(h);n.inspectSource=function(D){return pt.call(D)},(i.exports=function(D,E,C,M){var k=typeof C=="function";k&&(Wt(C,"name")||X(C,"name",E)),D[E]!==C&&(k&&(Wt(C,a)||X(C,a,D[E]?""+D[E]:f.join(String(E)))),D===e?D[E]=C:M?D[E]?D[E]=C:X(D,E,C):(delete D[E],X(D,E,C)))})(Function.prototype,h,function(){return typeof this=="function"&&this[a]||pt.call(this)})}),vi=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i},Kt=function(i,a,h){if(vi(i),a===void 0)return i;switch(h){case 1:return function(f){return i.call(a,f)};case 2:return function(f,D){return i.call(a,f,D)};case 3:return function(f,D,E){return i.call(a,f,D,E)}}return function(){return i.apply(a,arguments)}},ht="prototype",R=function(i,a,h){var f=i&R.F,D=i&R.G,E=i&R.S,C=i&R.P,M=i&R.B,k=D?e:E?e[a]||(e[a]={}):(e[a]||{})[ht],pe=D?n:n[a]||(n[a]={}),Ee=pe[ht]||(pe[ht]={}),z,Z,j,we;D&&(h=a);for(z in h)Z=!f&&k&&k[z]!==void 0,j=(Z?k:h)[z],we=M&&Z?Kt(j,e):C&&typeof j=="function"?Kt(Function.call,j):j,k&&Ci(k,z,j,i&R.U),pe[z]!=j&&X(pe,z,we),C&&Ee[z]!=j&&(Ee[z]=j)};e.core=n,R.F=1,R.G=2,R.S=4,R.P=8,R.B=16,R.W=32,R.U=64,R.R=128;var Pe=R,Fi=Math.ceil,bi=Math.floor,Vt=function(i){return isNaN(i=+i)?0:(i>0?bi:Fi)(i)},xi=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i},Si=function(i){return function(a,h){var f=String(xi(a)),D=Vt(h),E=f.length,C,M;return D<0||D>=E?i?"":void 0:(C=f.charCodeAt(D),C<55296||C>56319||D+1===E||(M=f.charCodeAt(D+1))<56320||M>57343?i?f.charAt(D):C:i?f.slice(D,D+2):(C-55296<<10)+(M-56320)+65536)}},ki=Si(!1);Pe(Pe.P,"String",{codePointAt:function(a){return ki(this,a)}});var rl=n.String.codePointAt,Pi=Math.max,Ti=Math.min,Bi=function(i,a){return i=Vt(i),i<0?Pi(i+a,0):Ti(i,a)},Ht=String.fromCharCode,zt=String.fromCodePoint;Pe(Pe.S+Pe.F*(!!zt&&zt.length!=1),"String",{fromCodePoint:function(a){for(var h=arguments,f=[],D=arguments.length,E=0,C;D>E;){if(C=+h[E++],Bi(C,1114111)!==C)throw RangeError(C+" is not a valid code point");f.push(C<65536?Ht(C):Ht(((C-=65536)>>10)+55296,C%1024+56320))}return f.join("")}});var sl=n.String.fromCodePoint,Oi=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ii=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Ni=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,gt={Space_Separator:Oi,ID_Start:Ii,ID_Continue:Ni},S={isSpaceSeparator:function(a){return typeof a=="string"&>.Space_Separator.test(a)},isIdStartChar:function(a){return typeof a=="string"&&(a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="$"||a==="_"||gt.ID_Start.test(a))},isIdContinueChar:function(a){return typeof a=="string"&&(a>="a"&&a<="z"||a>="A"&&a<="Z"||a>="0"&&a<="9"||a==="$"||a==="_"||a==="\u200C"||a==="\u200D"||gt.ID_Continue.test(a))},isDigit:function(a){return typeof a=="string"&&/[0-9]/.test(a)},isHexDigit:function(a){return typeof a=="string"&&/[0-9A-Fa-f]/.test(a)}},Dt,L,ee,We,oe,H,P,mt,Te,_i=function(a,h){Dt=String(a),L="start",ee=[],We=0,oe=1,H=0,P=void 0,mt=void 0,Te=void 0;do P=$i(),Mi[L]();while(P.type!=="eof");return typeof h=="function"?yt({"":Te},"",h):Te};function yt(i,a,h){var f=i[a];if(f!=null&&typeof f=="object")if(Array.isArray(f))for(var D=0;D<f.length;D++){var E=String(D),C=yt(f,E,h);C===void 0?delete f[E]:Object.defineProperty(f,E,{value:C,writable:!0,enumerable:!0,configurable:!0})}else for(var M in f){var k=yt(f,M,h);k===void 0?delete f[M]:Object.defineProperty(f,M,{value:k,writable:!0,enumerable:!0,configurable:!0})}return h.call(i,a,f)}var A,m,Be,te,w;function $i(){for(A="default",m="",Be=!1,te=1;;){w=ne();var i=Gt[A]();if(i)return i}}function ne(){if(Dt[We])return String.fromCodePoint(Dt.codePointAt(We))}function c(){var i=ne();return i===`
|
|
2
|
+
`?(oe++,H=0):i?H+=i.length:H++,i&&(We+=i.length),i}var Gt={default:function(){switch(w){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
3
|
+
`:case"\r":case"\u2028":case"\u2029":c();return;case"/":c(),A="comment";return;case void 0:return c(),b("eof")}if(S.isSpaceSeparator(w)){c();return}return Gt[L]()},comment:function(){switch(w){case"*":c(),A="multiLineComment";return;case"/":c(),A="singleLineComment";return}throw x(c())},multiLineComment:function(){switch(w){case"*":c(),A="multiLineCommentAsterisk";return;case void 0:throw x(c())}c()},multiLineCommentAsterisk:function(){switch(w){case"*":c();return;case"/":c(),A="default";return;case void 0:throw x(c())}c(),A="multiLineComment"},singleLineComment:function(){switch(w){case`
|
|
4
|
+
`:case"\r":case"\u2028":case"\u2029":c(),A="default";return;case void 0:return c(),b("eof")}c()},value:function(){switch(w){case"{":case"[":return b("punctuator",c());case"n":return c(),de("ull"),b("null",null);case"t":return c(),de("rue"),b("boolean",!0);case"f":return c(),de("alse"),b("boolean",!1);case"-":case"+":c()==="-"&&(te=-1),A="sign";return;case".":m=c(),A="decimalPointLeading";return;case"0":m=c(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=c(),A="decimalInteger";return;case"I":return c(),de("nfinity"),b("numeric",1/0);case"N":return c(),de("aN"),b("numeric",NaN);case'"':case"'":Be=c()==='"',m="",A="string";return}throw x(c())},identifierNameStartEscape:function(){if(w!=="u")throw x(c());c();var a=At();switch(a){case"$":case"_":break;default:if(!S.isIdStartChar(a))throw Yt();break}m+=a,A="identifierName"},identifierName:function(){switch(w){case"$":case"_":case"\u200C":case"\u200D":m+=c();return;case"\\":c(),A="identifierNameEscape";return}if(S.isIdContinueChar(w)){m+=c();return}return b("identifier",m)},identifierNameEscape:function(){if(w!=="u")throw x(c());c();var a=At();switch(a){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!S.isIdContinueChar(a))throw Yt();break}m+=a,A="identifierName"},sign:function(){switch(w){case".":m=c(),A="decimalPointLeading";return;case"0":m=c(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=c(),A="decimalInteger";return;case"I":return c(),de("nfinity"),b("numeric",te*(1/0));case"N":return c(),de("aN"),b("numeric",NaN)}throw x(c())},zero:function(){switch(w){case".":m+=c(),A="decimalPoint";return;case"e":case"E":m+=c(),A="decimalExponent";return;case"x":case"X":m+=c(),A="hexadecimal";return}return b("numeric",te*0)},decimalInteger:function(){switch(w){case".":m+=c(),A="decimalPoint";return;case"e":case"E":m+=c(),A="decimalExponent";return}if(S.isDigit(w)){m+=c();return}return b("numeric",te*Number(m))},decimalPointLeading:function(){if(S.isDigit(w)){m+=c(),A="decimalFraction";return}throw x(c())},decimalPoint:function(){switch(w){case"e":case"E":m+=c(),A="decimalExponent";return}if(S.isDigit(w)){m+=c(),A="decimalFraction";return}return b("numeric",te*Number(m))},decimalFraction:function(){switch(w){case"e":case"E":m+=c(),A="decimalExponent";return}if(S.isDigit(w)){m+=c();return}return b("numeric",te*Number(m))},decimalExponent:function(){switch(w){case"+":case"-":m+=c(),A="decimalExponentSign";return}if(S.isDigit(w)){m+=c(),A="decimalExponentInteger";return}throw x(c())},decimalExponentSign:function(){if(S.isDigit(w)){m+=c(),A="decimalExponentInteger";return}throw x(c())},decimalExponentInteger:function(){if(S.isDigit(w)){m+=c();return}return b("numeric",te*Number(m))},hexadecimal:function(){if(S.isHexDigit(w)){m+=c(),A="hexadecimalInteger";return}throw x(c())},hexadecimalInteger:function(){if(S.isHexDigit(w)){m+=c();return}return b("numeric",te*Number(m))},string:function(){switch(w){case"\\":c(),m+=Ri();return;case'"':if(Be)return c(),b("string",m);m+=c();return;case"'":if(!Be)return c(),b("string",m);m+=c();return;case`
|
|
5
|
+
`:case"\r":throw x(c());case"\u2028":case"\u2029":ji(w);break;case void 0:throw x(c())}m+=c()},start:function(){switch(w){case"{":case"[":return b("punctuator",c())}A="value"},beforePropertyName:function(){switch(w){case"$":case"_":m=c(),A="identifierName";return;case"\\":c(),A="identifierNameStartEscape";return;case"}":return b("punctuator",c());case'"':case"'":Be=c()==='"',A="string";return}if(S.isIdStartChar(w)){m+=c(),A="identifierName";return}throw x(c())},afterPropertyName:function(){if(w===":")return b("punctuator",c());throw x(c())},beforePropertyValue:function(){A="value"},afterPropertyValue:function(){switch(w){case",":case"}":return b("punctuator",c())}throw x(c())},beforeArrayValue:function(){if(w==="]")return b("punctuator",c());A="value"},afterArrayValue:function(){switch(w){case",":case"]":return b("punctuator",c())}throw x(c())},end:function(){throw x(c())}};function b(i,a){return{type:i,value:a,line:oe,column:H}}function de(i){for(var a=0,h=i;a<h.length;a+=1){var f=h[a],D=ne();if(D!==f)throw x(c());c()}}function Ri(){var i=ne();switch(i){case"b":return c(),"\b";case"f":return c(),"\f";case"n":return c(),`
|
|
6
|
+
`;case"r":return c(),"\r";case"t":return c()," ";case"v":return c(),"\v";case"0":if(c(),S.isDigit(ne()))throw x(c());return"\0";case"x":return c(),Li();case"u":return c(),At();case`
|
|
7
|
+
`:case"\u2028":case"\u2029":return c(),"";case"\r":return c(),ne()===`
|
|
8
|
+
`&&c(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw x(c());case void 0:throw x(c())}return c()}function Li(){var i="",a=ne();if(!S.isHexDigit(a)||(i+=c(),a=ne(),!S.isHexDigit(a)))throw x(c());return i+=c(),String.fromCodePoint(parseInt(i,16))}function At(){for(var i="",a=4;a-- >0;){var h=ne();if(!S.isHexDigit(h))throw x(c());i+=c()}return String.fromCodePoint(parseInt(i,16))}var Mi={start:function(){if(P.type==="eof")throw fe();Et()},beforePropertyName:function(){switch(P.type){case"identifier":case"string":mt=P.value,L="afterPropertyName";return;case"punctuator":Ke();return;case"eof":throw fe()}},afterPropertyName:function(){if(P.type==="eof")throw fe();L="beforePropertyValue"},beforePropertyValue:function(){if(P.type==="eof")throw fe();Et()},beforeArrayValue:function(){if(P.type==="eof")throw fe();if(P.type==="punctuator"&&P.value==="]"){Ke();return}Et()},afterPropertyValue:function(){if(P.type==="eof")throw fe();switch(P.value){case",":L="beforePropertyName";return;case"}":Ke()}},afterArrayValue:function(){if(P.type==="eof")throw fe();switch(P.value){case",":L="beforeArrayValue";return;case"]":Ke()}},end:function(){}};function Et(){var i;switch(P.type){case"punctuator":switch(P.value){case"{":i={};break;case"[":i=[];break}break;case"null":case"boolean":case"numeric":case"string":i=P.value;break}if(Te===void 0)Te=i;else{var a=ee[ee.length-1];Array.isArray(a)?a.push(i):Object.defineProperty(a,mt,{value:i,writable:!0,enumerable:!0,configurable:!0})}if(i!==null&&typeof i=="object")ee.push(i),Array.isArray(i)?L="beforeArrayValue":L="beforePropertyName";else{var h=ee[ee.length-1];h==null?L="end":Array.isArray(h)?L="afterArrayValue":L="afterPropertyValue"}}function Ke(){ee.pop();var i=ee[ee.length-1];i==null?L="end":Array.isArray(i)?L="afterArrayValue":L="afterPropertyValue"}function x(i){return Ve(i===void 0?"JSON5: invalid end of input at "+oe+":"+H:"JSON5: invalid character '"+Jt(i)+"' at "+oe+":"+H)}function fe(){return Ve("JSON5: invalid end of input at "+oe+":"+H)}function Yt(){return H-=5,Ve("JSON5: invalid identifier character at "+oe+":"+H)}function ji(i){console.warn("JSON5: '"+Jt(i)+"' in strings is not valid ECMAScript; consider escaping")}function Jt(i){var a={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(a[i])return a[i];if(i<" "){var h=i.charCodeAt(0).toString(16);return"\\x"+("00"+h).substring(h.length)}return i}function Ve(i){var a=new SyntaxError(i);return a.lineNumber=oe,a.columnNumber=H,a}var qi=function(a,h,f){var D=[],E="",C,M,k="",pe;if(h!=null&&typeof h=="object"&&!Array.isArray(h)&&(f=h.space,pe=h.quote,h=h.replacer),typeof h=="function")M=h;else if(Array.isArray(h)){C=[];for(var Ee=0,z=h;Ee<z.length;Ee+=1){var Z=z[Ee],j=void 0;typeof Z=="string"?j=Z:(typeof Z=="number"||Z instanceof String||Z instanceof Number)&&(j=String(Z)),j!==void 0&&C.indexOf(j)<0&&C.push(j)}}return f instanceof Number?f=Number(f):f instanceof String&&(f=String(f)),typeof f=="number"?f>0&&(f=Math.min(10,Math.floor(f)),k=" ".substr(0,f)):typeof f=="string"&&(k=f.substr(0,10)),we("",{"":a});function we(F,_){var y=_[F];switch(y!=null&&(typeof y.toJSON5=="function"?y=y.toJSON5(F):typeof y.toJSON=="function"&&(y=y.toJSON(F))),M&&(y=M.call(_,F,y)),y instanceof Number?y=Number(y):y instanceof String?y=String(y):y instanceof Boolean&&(y=y.valueOf()),y){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof y=="string")return He(y,!1);if(typeof y=="number")return String(y);if(typeof y=="object")return Array.isArray(y)?zi(y):Vi(y)}function He(F){for(var _={"'":.1,'"':.2},y={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},B="",G=0;G<F.length;G++){var $=F[G];switch($){case"'":case'"':_[$]++,B+=$;continue;case"\0":if(S.isDigit(F[G+1])){B+="\\x00";continue}}if(y[$]){B+=y[$];continue}if($<" "){var he=$.charCodeAt(0).toString(16);B+="\\x"+("00"+he).substring(he.length);continue}B+=$}var re=pe||Object.keys(_).reduce(function(ue,ge){return _[ue]<_[ge]?ue:ge});return B=B.replace(new RegExp(re,"g"),y[re]),re+B+re}function Vi(F){if(D.indexOf(F)>=0)throw TypeError("Converting circular structure to JSON5");D.push(F);var _=E;E=E+k;for(var y=C||Object.keys(F),B=[],G=0,$=y;G<$.length;G+=1){var he=$[G],re=we(he,F);if(re!==void 0){var ue=Hi(he)+":";k!==""&&(ue+=" "),ue+=re,B.push(ue)}}var ge;if(B.length===0)ge="{}";else{var ze;if(k==="")ze=B.join(","),ge="{"+ze+"}";else{var Gi=`,
|
|
9
|
+
`+E;ze=B.join(Gi),ge=`{
|
|
10
|
+
`+E+ze+`,
|
|
11
|
+
`+_+"}"}}return D.pop(),E=_,ge}function Hi(F){if(F.length===0)return He(F,!0);var _=String.fromCodePoint(F.codePointAt(0));if(!S.isIdStartChar(_))return He(F,!0);for(var y=_.length;y<F.length;y++)if(!S.isIdContinueChar(String.fromCodePoint(F.codePointAt(y))))return He(F,!0);return F}function zi(F){if(D.indexOf(F)>=0)throw TypeError("Converting circular structure to JSON5");D.push(F);var _=E;E=E+k;for(var y=[],B=0;B<F.length;B++){var G=we(String(B),F);y.push(G!==void 0?G:"null")}var $;if(y.length===0)$="[]";else if(k===""){var he=y.join(",");$="["+he+"]"}else{var re=`,
|
|
12
|
+
`+E,ue=y.join(re);$=`[
|
|
13
|
+
`+E+ue+`,
|
|
14
|
+
`+_+"]"}return D.pop(),E=_,$}},Ui={parse:_i,stringify:qi},Wi=Ui,Ki=Wi;return Ki}))});var Rs=p((wd,$s)=>{var Me;typeof window<"u"?Me=window:typeof global<"u"?Me=global:typeof self<"u"?Me=self:Me={};$s.exports=Me});function wt(t,{as:e="id",fallback:n=""}={}){return(e==="github"?t.trim().toLowerCase().replace(/[^\p{L}\p{M}\p{N}\p{Pc}\- ]/gu,"").replace(/ /g,"-"):to(t.normalize("NFKD")).toLowerCase().replace(/['’]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""))||n}function to(t,{keep:e=""}={}){let n=e.normalize("NFC").toLowerCase();return t.normalize("NFC").replace(/\P{ASCII}/gu,r=>n.includes(r.toLowerCase())?r:r.normalize("NFD").replace(/\p{M}+/gu,""))}function Ie(t=new Date){return`${Xt(t.getHours())}:${Xt(t.getMinutes())}`}function Xt(t){return String(t).padStart(2,"0")}var Zt=/\/(?:packages\/docs\/content\/)?epics\/([^/]+)\/\1\.plan\.html$/,en=/\/sagas\/([^/]+)\/\1\.saga\.html$/;var tn=4e3;var no=ro()?"Airplane mode: queued for when you land (/airplane land)":"No Claude session is reviewing this doc: Send wakes one";function ro(){return typeof window<"u"&&!!window.SPELL_SERVER?.airplane}var nn=/window\.SPELL_SERVER = (\{.*?\})<\/script>/;var so=8*1024*1024;function Ge(t){return(typeof t=="function"?t():t)??void 0}var Ce=class extends Error{};Ce.prototype.name="ServerWriteError";var io="see my comments in its text: ",cl=new RegExp(`(?:^|\\n+)${io}[^\\n]*$`);function Y(t){let e=t?new Date(t):null;return!e||isNaN(e.getTime())?"":Ie(e)}function Ne(t){return t?`${t[0].toUpperCase()}${t.slice(1)}${/[.!?]$/.test(t)?"":"."}`:""}var Ec=Oe(Xr()),wc=Oe(fs()),Us=Oe(Bs());var Is=Oe(Os(),1);function Ns(t,e="random text",n){try{return JSON.parse(t)}catch(r){let o=(r instanceof Error?r.message:String(r)).match(/at position (\d+)/);if(o){let u=parseInt(o[1],10),l=t.substring(0,u),d=Math.max(0,l.split(`
|
|
15
|
+
`).length-2);console.error(`Error parsing JSON near line ${d} of ${e}`);let v=Math.max(0,d-3),N=v+6;console.log(t.split(`
|
|
16
|
+
`).slice(v,N).join(`
|
|
17
|
+
`))}if(!n)throw r;return}}function _s(t,e="random text",n){try{return Is.default.parse(t)}catch(r){let o=(r instanceof Error?r.message:String(r)).match(/at position (\d+)/);if(o){let u=parseInt(o[1],10),l=t.substring(0,u),d=Math.max(0,l.split(`
|
|
18
|
+
`).length-2);console.error(`Error parsing JSON near line ${d} of ${e}`);let v=Math.max(0,d-3),N=v+6;console.log(t.split(`
|
|
19
|
+
`).slice(v,N).join(`
|
|
20
|
+
`))}if(!n)throw r;return}}var Ls=Oe(Rs(),1);function Ms(t){return t.name==="AbortError"}function js(t,e={},n=fetch){let r=!1,s=new Ls.default.AbortController;function o(l){return Object.assign(l,{cancel(){return r||(console.warn(`Cancelling abortable fetch to ${t}:`),s.abort()),this},then(d,v){return o(Promise.prototype.then.apply(this,[d,v]))},catch(d){return o(Promise.prototype.catch.apply(this,[d]))},finally(d){return o(Promise.prototype.finally.apply(this,[d]))}})}e.signal=s.signal;let u=n(t,e);return u.finally(()=>{r=!0}),o(u)}var me={text:"text/plain",json:"application/json",json5:"application/json5",gif:"image/gif",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",svg:"image/svg+xml",binary:"binary"},qs=["binary","blob",me.gif,me.png,me.jpeg,me.binary];var tt=class extends Error{props;constructor(e,n){typeof e=="string"?(super(e),this.props={message:e}):(super(e.message),this.props=e);let{captureStackTrace:r}=Error;r&&r(this,n||this.constructor),Object.setPrototypeOf(this,new.target.prototype)}get name(){return this.constructor.name}get header(){return this.props.activity?`${this.name} ${this.props.activity}`:this.name}};var J=class extends tt{get status(){if(this.props.response)return this.props.response.status}},nt=class extends J{constructor(e){super({message:"You must be online to do this.",...e})}},xe=class extends J{constructor(e){super({message:"There was a problem loading this thing.",...e})}},rt=class extends J{constructor(e){super({message:"You are not authorized to do this.",...e})}},st=class extends J{constructor(e){super({message:"There was an error understanding the response.",...e})}},it=class extends J{constructor(e){super({message:"The action was cancelled.",...e})}};function Ws(t){let{url:e,query:n,contents:r,method:s=r!=null?"POST":"GET",headers:o={},requestFormat:u,format:l="text/plain",defaultContents:d,cache:v,fetch:N}=t,W={method:s,...v&&{cache:v}};u&&(o["Content-Type"]=u),W.headers=o,r!=null&&(W.body=typeof r=="string"?r:JSON.stringify(r));let ie=e;typeof n=="string"?ie+=`?${n}`:n&&(ie+=`?${Us.default.stringify(n)}`);let lt=js(ie,W,N);async function dt(K){let X={url:e,status:K.status,...W};if(!K.ok){let V=await K.text();switch(K.status){case 404:if(d!==void 0)return d;throw new xe({...X,message:V});case 401:case 403:throw new rt({...X,message:V});default:throw new J({...X,message:V})}}try{if(qs.includes(l))return await K.blob();let V=await K.text();return l===me.json||l.toLowerCase()==="json"?Ns(V):l===me.json5||l.toLowerCase()==="json5"?_s(V):V}catch(V){throw new st({...X,error:V})}}async function ft(K){if(d!==void 0)return d;throw Ms(K)?new it({url:e,error:K,...W}):new nt({url:e,error:K,...W})}return lt.then(dt,ft)}var T=class t{constructor(e){this.options=e;this.info=e.server?{...e.server}:void 0}options;info;static current;static forPage(){return t.current??=new t(t.pageOptions()),t.current}static pageOptions(){return{page:location.pathname,server:window.SPELL_SERVER,protocol:location.protocol,fetch:(e,n)=>window.fetch(e,n),readServed:e=>t.readInFrame(window.document,e)}}static readInFrame(e,n,r=Cc){return new Promise((s,o)=>{let u=e.createElement("iframe");u.setAttribute("sandbox","allow-same-origin"),u.setAttribute("aria-hidden","true"),u.hidden=!0;let l=N=>{clearTimeout(v);try{s(N())}catch(W){o(W)}finally{u.remove()}},d=()=>{throw new Error("the page didn't load")},v=setTimeout(()=>l(d),r);u.addEventListener("load",()=>{u.contentDocument?.URL!=="about:blank"&&l(()=>u.contentDocument.documentElement.outerHTML)}),u.src=`${n}${n.includes("?")?"&":"?"}spell-token=${Date.now()}`,e.body.append(u)})}static isServed(e=globalThis.SPELL_SERVER,n=globalThis.location?.protocol){return!!e?.token&&t.canRead(n)}static canRead(e=globalThis.location?.protocol){return e!=="file:"}get isServed(){return t.isServed(this.info,this.options.protocol)}get servesPlanDoc(){return this.isServed&&Zt.test(this.options.page)}get servesReviews(){return this.servesPlanDoc?!0:this.isServed&&en.test(this.options.page)}get file(){return this.info?.file??this.options.page}async get(e,{query:n,missing:r,format:s="json"}={}){if(!t.canRead(this.options.protocol))return r;try{let o=n&&new URLSearchParams(n).toString();return await Ws({url:e,query:o,format:s,cache:"no-store",fetch:this.options.fetch})??r}catch(o){if(o instanceof xe)return r;throw o instanceof J&&(o.message=vc(o.message)??o.message),o}}async getFile(e,{format:n="json"}={}){for(let r of typeof e=="string"?[e]:e){let s;try{s=await this.get(r,{format:n})}catch(o){throw new Error(`${r.split("/").pop()}: ${o.message}`,{cause:o})}if(s!==void 0)return s}}static dataFileNames(e){let n=e.replace(/\.json5?$/,"");return n===e?[e]:[`${n}.json5`,`${n}.json`]}getForPage(e,{missing:n}={}){return this.get(e,{query:{page:this.options.page},missing:n})}async post(e,n,{keepalive:r=!1}={}){for(let s=0;;s++){let o;try{o=await this.options.fetch(e,{method:"POST",headers:{"content-type":"application/json","x-server-token":this.info?.token??""},body:JSON.stringify(n),keepalive:r})}catch(d){throw new Ce(`couldn't reach the page server (${d.message})`)}let u=await o.json().catch(()=>({}));if(o.ok)return u;let l=o.status===403&&/token/i.test(u.error??"");if(!(l&&s===0&&await this.refreshToken()))throw new Ce(l?"the page server restarted since this page loaded: reload the page":u.error??`couldn't save (${o.status})`)}}static watch(e,n,r,{every:s=tn,polls:o}={}){let{document:u}=e,l=typeof n=="function"?n:Fc(n),d=s?e.setInterval(()=>{u.visibilityState==="visible"&&(o?.()??!0)&&r()},s):void 0,v=()=>{u.visibilityState==="visible"&&r()},N=W=>{let ie=W.detail?.path;ie&&l(decodeURIComponent(ie))&&r()};return u.addEventListener("visibilitychange",v),e.addEventListener("spell-server:changed",N),()=>{d!==void 0&&e.clearInterval(d),u.removeEventListener("visibilitychange",v),e.removeEventListener("spell-server:changed",N)}}async refreshToken(){try{let{page:e,readServed:n}=this.options,r=n?await n(e):await(await this.options.fetch(e,{cache:"no-store"})).text(),s=JSON.parse(nn.exec(r)?.[1]??"null")?.token;return!s||!this.info||s===this.info.token?!1:(this.info.token=s,!0)}catch{return!1}}},Cc=1e4;function vc(t){try{let e=JSON.parse(t)?.error;return typeof e=="string"?e:void 0}catch{return}}function Fc(t){if(!t)return()=>!1;let e=T.dataFileNames(t);return n=>e.includes(n)}var se=class t{version=0;listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}changed(){this.version++;for(let e of this.listeners)e()}static onePerPage(e,n=()=>!0){let r=t.pageStores.get(this);if(r&&n(r))return r;let s=e();return t.pageStores.set(this,s),s}static adopt(e){e?t.pageStores.set(this,e):t.pageStores.delete(this)}static pageStores=new Map};var Se=class{values=new Map;get length(){return this.values.size}key(e){return[...this.values.keys()][e]??null}getItem(e){return this.values.get(e)??null}setItem(e,n){this.values.set(e,String(n))}removeItem(e){this.values.delete(e)}};var ke=class{async load(e,n){return this.read(e,n)}async save(e,n,r){r===void 0?this.remove(e,n):this.write(e,n,r)}async loadKeys(e){return this.keys(e)}async update(e,n,r){let s=r(await this.load(e,n));return await this.save(e,n,s),s}async removeUnder(e,n){for(let r of this.keys(e))r.startsWith(n)&&this.remove(e,r)}};var Ks=/^(?:["{[]|-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$|true$|false$|null$)/;function Vs(t){if(typeof t=="string"&&!Ks.test(t))return t;let e=JSON.stringify(t);if(e===void 0)throw new TypeError(`textForValue(): can't keep a ${typeof t} as text; pass plain data`);return e}function Hs(t){return Ks.test(t)?JSON.parse(t):t}var bc=new Map([["number",0],["text",""],["choice",!1]]),xc=new Map([["number","number"],["text","string"],["choice","boolean"]]);function Bt(t){if(!t)return;if(t.default!==void 0)return t.default;let e=ot(t);return e?.length?e[0]:t.type===void 0?void 0:bc.get(t.type)}function Ot(t,e){if(!t)return!0;let n=ot(t);if(n&&!n.includes(e))return!1;let r=t.type===void 0?void 0:xc.get(t.type);return r===void 0||typeof e===r}function ot(t){return typeof t.oneOf=="function"?t.oneOf():t.oneOf}var Ae=class extends ke{isAsync=!1;description;constructor({storage:e,description:n}){super(),this.findStorage=typeof e=="function"?e:()=>e,this.description=n}read(e,n){let r=this.attempt("read",e,n,s=>s.getItem(ye(e,n)));if(r!=null)try{return Hs(r)}catch(s){console.error(`StoragePlace.read(): \`${ye(e,n)}\` holds no value it can read; answering none:`,r),console.error(s);return}}write(e,n,r){let s=Vs(r);this.attempt("write",e,n,o=>o.setItem(ye(e,n),s))}remove(e,n){this.attempt("remove",e,n,r=>r.removeItem(ye(e,n)))}keys(e){let n=`${e}:`;return this.attempt("keys",e,"",s=>{let o=[];for(let u=0;u<s.length;u++){let l=s.key(u);l?.startsWith(n)&&o.push(l.slice(n.length))}return o})??[]}moveText(e,n,r){this.attempt("moveText",n,r,s=>{let o=s.getItem(e);o!==null&&(s.getItem(ye(n,r))===null&&s.setItem(ye(n,r),o),s.removeItem(e))})}get storage(){return this._storage??=this.storageOrMemory()}_storage;findStorage;storageOrMemory(){try{let e=this.findStorage();if(e)return e}catch(e){console.error(`StoragePlace: ${this.description} is blocked; keeping its values in memory for this visit:`),console.error(e)}return new Se}attempt(e,n,r,s){try{return s(this.storage)}catch(o){console.error(`StoragePlace.${e}(): ${this.description} refused \`${ye(n,r)}\`:`),console.error(o);return}}};function ye(t,e){return`${t}:${e}`}var U=class t{name;place;constructor(e,{place:n="local"}={}){if(!e||e.includes(":"))throw new TypeError(`new PrefStore(): \`${e}\` can't name a store; give it a name with no colon, e.g. "spell-site"`);this.name=e,this.place=Gs(n)}static splitKey(e){let n=e.indexOf(":");if(n<1)throw new TypeError(`PrefStore.splitKey(): \`${e}\` has no store; name it "<store>:<key>"`);return[e.slice(0,n),e.slice(n+1)]}static getAt(e,n="local"){let[r,s]=t.splitKey(e);return new t(r,{place:n}).get(s)}static moveOldKey(e,n,r="local"){let[s,o]=t.splitKey(n);Gs(r).moveText(e,s,o)}static setAt(e,n,r="local"){let[s,o]=t.splitKey(e);new t(s,{place:r}).set(o,n)}declare(e,n){return this.checkKey("declare",e),this.declared.set(e,n),this}defaultFor(e){return Bt(this.declared.get(e))}has(e){return this.checkQuickRead("has",e),this.place.read(this.name,e)!==void 0}get(e,n){return this.checkQuickRead("get",e),this.keptOrDefault("get",e,this.place.read(this.name,e),n)}set(e,n){return this.checkWrite("set",e,n),n===void 0?this.place.remove(this.name,e):this.place.write(this.name,e,n),n}forget(e){this.set(e,void 0)}keysUnder(e=""){return this.checkQuickRead("keysUnder"),this.place.keys(this.name).filter(n=>n.startsWith(e))}forgetUnder(e){return this.place.removeUnder(this.name,e)}forgetAll(){return this.forgetUnder("")}rename(e,n){this.checkQuickRead("rename",e),this.checkKey("rename",n);let r=this.place.read(this.name,e);return r===void 0?this:(this.place.read(this.name,n)===void 0&&this.place.write(this.name,n,r),this.place.remove(this.name,e),this)}async load(e,n){return this.checkKey("load",e),this.keptOrDefault("load",e,await this.place.load(this.name,e),n)}async save(e,n){return this.checkWrite("save",e,n),await this.place.save(this.name,e,n),n}update(e,n){this.checkKey("update",e);let s=(this.updating.get(e)??Promise.resolve()).then(async()=>await this.place.update(this.name,e,u=>{let l=n(this.keptOrDefault("update",e,u,void 0));return this.checkWrite("update",e,l),l})),o=s.then(()=>{},()=>{});return this.updating.set(e,o),o.then(()=>{this.updating.get(e)===o&&this.updating.delete(e)}),s}async loadKeysUnder(e=""){return(await this.place.loadKeys(this.name)).filter(n=>n.startsWith(e))}keptOrDefault(e,n,r,s){let o=this.declared.get(n);if(r!==void 0){if(Ot(o,r))return r;console.error(`PrefStore.${e}(): \`${this.name}:${n}\` isn't ${Ys(o)}; answering its default:`,r)}return s!==void 0?s:Bt(o)}checkKey(e,n){if(!n)throw new TypeError(`PrefStore.${e}(): no key; pass the pref's name, e.g. "scheme"`)}checkQuickRead(e,n){if(n!==void 0&&this.checkKey(e,n),!!this.place.isAsync)throw new TypeError(`PrefStore.${e}(): \`${this.name}\` keeps its values in ${this.place.description}, which must be waited on; use \`load()\` or \`loadKeysUnder()\``)}checkWrite(e,n,r){this.checkKey(e,n);let s=this.declared.get(n);if(!(r===void 0||Ot(s,r)))throw new TypeError(`PrefStore.${e}(): \`${n}\` is ${Ys(s)}; not \`${Js(r)}\``)}declared=new Map;updating=new Map},Sc={local:{storage:()=>globalThis.localStorage,description:"the browser's storage"},session:{storage:()=>globalThis.sessionStorage,description:"the browser's per-tab storage"}},zs=new Map;function Gs(t){if(t instanceof ke)return t;if(t==="memory")return new Ae({storage:new Se,description:"memory"});let e=zs.get(t);return e||zs.set(t,e=new Ae(Sc[t])),e}function Ys(t){let e=t&&ot(t);return e?`one of ${e.map(Js).join(", ")}`:t?.type?`a ${t.type}`:"anything"}function Js(t){return typeof t=="string"?t:typeof t=="object"&&JSON.stringify(t)||String(t)}var ae="/api/docs/choices";var Qs="spell-choices-draft:",Xs=/\/details\/[^/]+\.html$/;var Zs="spell-folds:";function ei(t){return t.value.includes(`
|
|
21
|
+
`)&&(t.value=t.value.replace(/\s*\n\s*/g," ")),t.value}function ti(t){t.key==="Enter"&&t.preventDefault()}var kc=3e3,It=class{constructor(e){this.props=e}props;keep(e){this.props.key&&U.setAt(this.props.key,e,this.place)}kept(){return this.props.key?U.getAt(this.props.key,this.place):void 0}drop(){this.props.key&&U.setAt(this.props.key,void 0,this.place)}keysStartingHere(){if(!this.props.key)return[];let[e,n]=U.splitKey(this.props.key);return new U(e,{place:this.place}).keysUnder(n).map(r=>`${e}:${r}`)}place=new Ae({storage:()=>this.props.storage?this.props.storage():globalThis.localStorage,description:"this browser"})},ut=class{constructor(e){this.props=e;this.copy=new It({...e.key!==void 0&&{key:e.key},...e.storage&&{storage:e.storage}})}props;state={kind:"idle"};isUnsaved=!1;timer;retryTimer;saving=Promise.resolve(!0);inFlight=0;round=0;copy;changed({now:e=!1}={}){if(this.isUnsaved=!0,this.cancelTimer(),e){this.save();return}this.timer=setTimeout(()=>{this.save()},this.props.wait),this.state.kind!=="failed"&&this.state.kind!=="off server"&&this.setState({kind:"unsaved"})}save({keepalive:e=!1}={}){this.cancelTimer();let n=()=>this.saveQueued(e),r=this.inFlight?this.saving.then(n):n();return this.inFlight++,r.finally(()=>this.inFlight--),this.saving=r,r}get settled(){return this.saving}get isPending(){return!!this.timer||this.state.kind==="saving"}done(){this.round++,this.stop(),this.isUnsaved=!1,this.drop(),this.setState({kind:"idle"})}stop(){this.cancelTimer(),this.retryTimer&&clearTimeout(this.retryTimer),this.retryTimer=void 0}tell(e,{isError:n=!1}={}){this.setState({kind:"told",text:e,...n&&{isError:n}})}watch(e){let n=()=>{this.save({keepalive:!0})},r=()=>{e.document.visibilityState==="hidden"&&n()};return e.addEventListener("pagehide",n),e.document.addEventListener("visibilitychange",r),()=>{e.removeEventListener("pagehide",n),e.document.removeEventListener("visibilitychange",r),this.stop()}}keep(e){this.copy.keep(e)}kept(){return this.copy.kept()}drop(){this.copy.drop()}get text(){let e=this.state;switch(e.kind){case"idle":return"";case"unsaved":return"not saved yet";case"saving":return"saving\u2026";case"saved":return`saved ${Pc(e.at)}`;case"told":return e.text;case"off server":return"kept in this browser only: this page isn't on the page server";default:return`kept in this browser only: ${e.why}; trying again every ${this.retry/1e3}s`}}get isError(){let e=this.state;return e.kind==="failed"||e.kind==="off server"||e.kind==="told"&&!!e.isError}async saveQueued(e){if(this.retryTimer&&clearTimeout(this.retryTimer),this.retryTimer=void 0,!this.isUnsaved)return!0;if(this.props.isOffServer?.())return this.setState({kind:"off server"}),!1;let n=this.round;this.isUnsaved=!1,this.state.kind!=="failed"&&this.setState({kind:"saving"});try{let r=await this.props.save({keepalive:e});return n!==this.round?!0:(this.setState({kind:"saved",at:r??new Date().toISOString()}),!this.isUnsaved)}catch(r){return n!==this.round?!0:(this.isUnsaved=!0,this.setState({kind:"failed",why:r.message.replace(/[.!]$/,"")}),this.retryTimer=setTimeout(()=>{this.save()},this.retry),!1)}}get retry(){return this.props.retry??kc}cancelTimer(){this.timer&&clearTimeout(this.timer),this.timer=void 0}setState(e){this.state=e,this.props.onChange?.()}};function Pc(t){let e=new Date(t);return isNaN(e.getTime())?"":Ie(e)}var ce=class extends ut{constructor(e){let{link:n,storage:r,retry:s=3e3,...o}=e;super({...o,retry:s,...n&&{isOffServer:()=>!n.isServed},storage:()=>"storage"in e?Ge(r):globalThis.localStorage})}};var yp=1440*60*1e3;var je=class t extends se{constructor(n){super();this.options=n;this.link=new T(n),this.drafts=new ce({save:async({keepalive:r})=>(await this.post("draft",r)).draft.saved,wait:500,key:`${Qs}${n.page}`,storage:n.storage,link:this.link,onChange:()=>this.changed()})}options;feedback="";sent;isStale=!1;error="";isSending=!1;rows=new Map;restored={};restoredComments={};restoredOrder={};link;drafts;note="";static forPage(){return t.onePerPage(()=>new t({...T.pageOptions(),storage:()=>window.localStorage}))}add(n){this.rows.set(n.rowName,n);let r=this.restored[n.rowName];r!==void 0&&n.showValue(r);let s=this.restoredComments[n.rowName];return s!==void 0&&n.showComment(s),this.changed(),()=>{this.rows.get(n.rowName)===n&&this.rows.delete(n.rowName),this.changed()}}get counts(){let n=[...this.rows.values()];return{rows:n.length,changed:n.filter(r=>r.isChanged).length,commented:n.filter(r=>ni(r)).length}}collect(){let n={};for(let r of this.rows.values())r.isChanged&&(n[r.rowName]=r.value);return n}collectComments(){let n={};for(let r of this.rows.values())ni(r)&&(n[r.rowName]=r.comment);return n}collectOrder(){let n=new Map;for(let s of this.rows.values())s.orderKey!==void 0&&(n.has(s.orderKey)||n.set(s.orderKey,[]),n.get(s.orderKey).push(s));let r={};for(let[s,o]of n)r[s]=o.sort((u,l)=>u.orderIndex-l.orderIndex).map(u=>u.rowName);return r}edited(){this.keepsDrafts&&(this.writeLocal(),this.saveSoon()),this.sent&&(this.isStale=!0),this.changed()}setFeedback(n){this.feedback=n,this.edited()}watch(n){return this.drafts.watch(n)}async save({keepalive:n=!1}={}){await this.drafts.save({keepalive:n})}get savedText(){return this.note?this.note:this.isSaveError?Ne(this.drafts.text):this.drafts.text}get isSaveError(){return this.drafts.isError}saveSoon(){this.drafts.changed()}async send(){if(!this.isSending){this.error="",this.isSending=!0,this.changed();try{let{answer:n}=await this.post("answer");this.sent=n,this.isStale=!1,this.drafts.done(),this.drafts.tell(`saved ${Y(n.answered)}`)}catch(n){this.error=`Not sent: ${n.message}`}finally{this.isSending=!1,this.changed()}}}get sentText(){let n=this.sent;if(!n)return"";let r=Object.keys(n.values??{}).length,s=Object.keys(n.comments??{}).length,o=n.changes?` (sent ${n.changes+1} times)`:"",u=Y(n.answered);if(this.isStale)return`Sent at ${u}${o}; changed since: press Do it again to send the new ones.`;let l=[...this.rows.values()].every(v=>v.blank)?"left as they are":"as recommended",d=`${r} changed, ${s?`${s} commented, `:""}${this.rows.size-r} ${l}`;return`Sent to Claude at ${u}${o}: ${d}. Change anything and press Do it again to resend.`}async restore(){let n=this.link.isServed;if(!this.keepsDrafts)return n?(this.note="a template: nothing here is saved",this.changed()):void 0;let r,s;try{n&&([r,s]=await Promise.all([this.fetchJson("draft"),this.fetchJson("answer")]))}catch(l){this.drafts.tell(`can't load what you typed: ${l.message}`,{isError:!0})}let o=this.readLocal(),u=Oc(r,o,s);if(u){this.restored=u.values??{};for(let[l,d]of Object.entries(this.restored))this.rows.get(l)?.showValue(d);this.restoredComments=u.comments??{};for(let[l,d]of Object.entries(this.restoredComments))this.rows.get(l)?.showComment(d);this.feedback=u.feedback??"",this.restoredOrder=u.order??{}}r&&!this.isSaveError&&this.drafts.tell(`saved ${Y(r.saved)}`),s&&(this.sent=s),u&&u===o&&this.saveSoon(),this.changed()}copyText(){return JSON.stringify(this.draftNow(),null,2)}static fileUrl(n,r,{root:s,worktrees:o,pathname:u}){if(!s)return"#";let l=/^\/worktrees\/([^/]+)\//.exec(u)?.[1],d=l&&o?`${o}/${l}`:s;return`vscode://file${encodeURI(`${d}/${n}`)}:${r}`}static fileUrlHere(n,r){let s=window.SPELL_SERVER;return t.fileUrl(n,r,{root:s?.root,worktrees:s?.worktrees,pathname:location.pathname})}static openFile(n,r,s=globalThis.window){s.parent!==s&&(n.preventDefault(),s.parent.postMessage({spell:"open",url:r,kind:"external"},"*"))}static expandAll(n){let r=t.sectionsOf(n),s=t.isAllOpen(n);for(let d of r)d.open=!s;let o=`${Zs}${n.location.pathname}`,u=U.getAt(o),l=u&&typeof u=="object"?u:{};for(let d of r)l[d.id]=s;return U.setAt(o,l),!s}static isAllOpen(n){return t.sectionsOf(n).every(r=>r.open)}static sectionsOf(n){return[...n.querySelectorAll("ui-section:has(> epic-choice-rows)")]}get keepsDrafts(){return Xs.test(this.options.page)}draftNow(){return{page:this.options.page,saved:new Date().toISOString(),...this.body()}}writeLocal(){this.drafts.keep(this.draftNow())}readLocal(){let n=this.drafts.kept();return n&&typeof n.saved=="string"&&n.values&&typeof n.values=="object"?n:void 0}body(){let n=this.collectOrder(),r=this.collectComments();return{values:this.collect(),...Object.keys(r).length>0&&{comments:r},feedback:this.feedback.trim(),...Object.keys(n).length>0&&{order:n}}}async post(n,r=!1){if(!this.link.isServed)throw new Error("this page isn't on the page server: open it with `epic choices show`");let s={page:this.options.page,...this.body()};return this.link.post(`${ae}/${n}`,s,{keepalive:r})}async fetchJson(n){let r=await this.link.getForPage(`${ae}/${n}`,{missing:null}).catch(()=>{});if(r===null)throw new Error("page server too old, restart it");return r?.[n]??void 0}};function ni(t){return t.comment.trim()!==""}function Oc(t,e,n){let r=[[n,n?.answered],[t,t?.saved],[e,e?.saved]],s,o=-1/0;for(let[u,l]of r){let d=Date.parse(l??"")||0;u&&d>o&&([s,o]=[u,d])}return s}function at(t,e="button"){let n=()=>{let r=t.shadowRoot?.querySelector(`[part~="${e}"]`);return r&&(r.title=t.title),!!r};n()||customElements.whenDefined(t.localName).then(()=>requestAnimationFrame(n))}function g(t,e={},...n){let r=document.createElement(t);for(let[s,o]of Object.entries(e))o!==void 0&&o!==!1&&r.setAttribute(s,o===!0?"":String(o));return r.append(...n.filter(s=>s!=null&&s!==!1&&s!=="")),r}function ri({load:t,draw:e,holder:n,header:r,offServer:s,failure:o}){let u=new URL("spell-ui.js",document.currentScript?.src??location.href).href;return(async()=>{let d;try{T.canRead()?d=await t():l(`${s}: open it through the page server, e.g. \`epic pages open ${Ic()}\`.`),d&&e(d)}catch(v){l(`${o}: ${v.message}`),d=void 0}return document.body.append(g("script",{src:u})),d})();function l(d){(document.querySelector(n)??document.querySelector("main"))?.prepend(g("ui-message",{state:"warning",heading:r},g("p",{},...Nt(d))))}}function Nt(t,e=n=>[n]){return String(t).split("`").flatMap((n,r)=>r%2?[g("code",{},n)]:e(n)).filter(n=>n!=="")}function si(t){return/^\s*(\d+(?:\.\d+)*)\.?\s/.exec(t?.getAttribute("label")??"")?.[1]??""}function Ic(){return decodeURIComponent(location.pathname).replace(/^.*\/(?=(?:guides|epics|templates|pages)\/)/,"")}var oi="/api/docs/comments",Nc=["agent","claude"],_c=5e3,$c="spell-syntax-draft:",Rc=["js","ts","py"],qe="Provide more details here",Lc="(no docstring yet)",Mc=80,le=new Map,jt=new Map,ct={},I,$t,Q=new ce({save:async({keepalive:t})=>(await di(ae,"draft",{keepalive:t})).draft.saved,wait:_c,key:`${$c}${location.pathname}`,onChange:()=>Zc(Q.text,{isError:Q.isError})});ri({load:jc,draw:qc,holder:"[data-syntax-modules]",header:"Rules not drawn",offServer:"This page draws its rules from the checkout serving it, and saves what you type",failure:"Couldn't draw the rules"}).then(t=>t&&Xc());async function jc(){let t=document.body.dataset.choicesRows;if(!t)throw new Error("the page's `<body>` has no `data-choices-rows`");let e=await T.forPage().getFile(t);if(e===void 0)throw new Error(`${t.split("/").pop()}: not found`);return e}function qc(t){let e=t.modules??[],n=e.flatMap(u=>u.rules);document.querySelector("[data-syntax-stats]")?.replaceChildren(g("ui-statistic",{value:String(e.length),label:"modules"}),g("ui-statistic",{value:String(n.filter(u=>!u.internal).length),label:"rule classes"}),g("ui-statistic",{value:String(n.filter(u=>u.internal).length),label:"internal"}));let s=document.querySelector("[data-syntax-modules]"),o=si(s.closest("ui-section"));s.replaceWith(...e.map((u,l)=>Uc(u,o?`${o}.${l+1} `:""))),I=Yc(),Jc(),qt()}function Uc({module:t,rules:e},n){let r=e.filter(l=>l.internal).length,s=e.length-r,o=[s?`${s} ${s===1?"rule":"rules"}`:"",r?`${r} internal`:""].filter(Boolean),u=g("table",{},g("thead",{},g("tr",{},g("th",{},"Rule name"),g("th",{},"Syntax"),g("th",{},"Purpose"))),g("tbody",{},...e.map(Wc)));return g("ui-section",{id:`module-${wt(t)}`,label:`${n}${t}`,badge:o.join(" \xB7 "),sticky:"",collapsible:"",dividing:""},g("ui-table",{id:`rules-${wt(t)}`,class:"spell-syntax-table",celled:"",padding:"compact",unstackable:""},u))}function Wc(t){return g("tr",{id:`rule-${t.className}`,"data-rule":t.className},Kc(t),Vc(t),zc(t))}function Kc(t){let e=t.ruleNames.length?t.ruleNames.join(", "):"no rule name of its own",n=g(t.file?"a":"span",{class:"spell-syntax-source",title:e},t.className);t.file&&(n.href=je.fileUrlHere(t.file,t.line));let r=ai("spell-syntax-rename","pen to square",`Suggest another name for ${t.className}`,`Suggest another name for ${t.className}`),s=ui(t,"name",t.className,`Class name of ${t.className}`);s.hidden=!0;let o=t.syntaxes.filter(d=>d.syntax),u=o.length?g("ul",{class:"spell-syntax-syntaxes"},...o.map(d=>g("li",{},g("code",{},d.syntax)))):t.internal?"":g("p",{class:"spell-syntax-none"},"matched by its code: no syntax of its own"),l=t.aliases.length?g("p",{class:"spell-syntax-aka"},g("em",{},"aka"),": ",...t.aliases.flatMap((d,v)=>[v?", ":"",g("code",{},d)])):"";return g("td",{class:"spell-syntax-name"},g("div",{class:"spell-syntax-class"},n,r),s,u,l)}function Vc(t){let e=t.syntaxes.filter(n=>n.example);return e.length?g("td",{class:"spell-syntax-outputs"},...e.map((n,r)=>Hc(t,n,r))):g("td",{class:"spell-syntax-outputs"},g("em",{class:"spell-syntax-none"},t.internal?"no syntax of its own":"no test to show it with yet"))}function Hc(t,e,n){let r=n?`.${n+1}`:"",s=Rc.map(u=>{let l=e.outputs[u],d="code"in l?ui(t,`${u}${r}`,l.code,`${u} for ${e.example}`):g("em",{class:"spell-syntax-none"},`(${l.error})`);return g("li",{},g("b",{},u),d)}),o=e.syntax?`Matches: ${e.syntax}`:"Matched by the rule's own code";return g("ul",{class:"spell-syntax-writers"},g("li",{class:"spell-syntax-input"},g("b",{},"e.g."),g("code",{title:o},e.example)),...s)}function zc(t){let e=g("span",{class:"spell-syntax-purpose-text"},...t.internal?[g("b",{},"internal")," "]:[],...Nt(t.purpose||Lc)),n=`${qe}: ask Claude, in a comment here`,r=g("ui-button",{class:"spell-syntax-wand",appearance:"circular basic",size:"mini",icon:"wand magic sparkles",title:n,"aria-label":`${qe}: ${t.className}`});return at(r),r.addEventListener("click",()=>{el(t,r,e)}),jt.set(t.className,r),g("td",{class:"spell-syntax-purpose"},g("p",{},e," ",r))}function ui(t,e,n,r){let s=`${t.className}.${e}`,o=g("textarea",{class:"spell-choice-input",rows:"1",spellcheck:"false",autocomplete:"off","aria-label":r,...e==="name"&&{"data-one-line":""}});o.value=n;let u=g("div",{class:"spell-choice-field spell-syntax-box","data-box":s},o);return le.set(s,{key:s,input:o,reset:void 0,holder:u,generated:n}),u}function Gc(t){let{generated:e}=t,n=ai("spell-choice-reset","clock rotate left",`Back to ${e.split(`
|
|
2715
22
|
`)[0]}${e.includes(`
|
|
2716
|
-
`) ? " ..." : ""}`, "
|
|
2717
|
-
return t.holder.append(n), n;
|
|
2718
|
-
}
|
|
2719
|
-
__name(Gc, "Gc");
|
|
2720
|
-
function ai(t, e, n, r) {
|
|
2721
|
-
let s = g("ui-button", { class: t, appearance: "circular basic", size: "tiny", icon: e, title: n, "aria-label": r });
|
|
2722
|
-
return at(s), s;
|
|
2723
|
-
}
|
|
2724
|
-
__name(ai, "ai");
|
|
2725
|
-
function Yc() {
|
|
2726
|
-
let t = g("ui-textarea", { class: "spell-choices-feedback", name: "feedback", grow: "", placeholder: "Feedback for Claude: anything the boxes don't say", fluid: "" }), e = g("ui-button", { class: "spell-choices-send", color: "primary", appearance: "circular", icon: "paper plane", title: "Send every changed box, and the feedback, to Claude" }, "Send"), n = g("span", { class: "spell-choices-saved" }), r = g("ui-message", { class: "spell-choices-error", state: "negative", size: "small", hidden: "" }), s = g("ui-message", { class: "spell-choices-sent", state: "positive", size: "small", hidden: "" });
|
|
2727
|
-
return document.querySelector("main").append(g("div", { id: "choices-bar", class: "spell-choices-bar" }, g("div", { class: "spell-choices-row" }, t, e), g("div", { class: "spell-choices-meta" }, n), r, s)), { feedback: t, send: e, saved: n, error: r, done: s };
|
|
2728
|
-
}
|
|
2729
|
-
__name(Yc, "Yc");
|
|
2730
|
-
function Jc() {
|
|
2731
|
-
let t = document.querySelector("main");
|
|
2732
|
-
t.addEventListener("input", (e) => {
|
|
2733
|
-
let n = e.target.closest?.(".spell-syntax-box");
|
|
2734
|
-
n && (e.target.hasAttribute("data-one-line") && ei(e.target), Rt(de.get(n.dataset.box)), _t());
|
|
2735
|
-
}), t.addEventListener("keydown", (e) => {
|
|
2736
|
-
e.target.hasAttribute?.("data-one-line") && ti(e);
|
|
2737
|
-
}), t.addEventListener("click", (e) => {
|
|
2738
|
-
let n = e.target.closest?.(".spell-syntax-rename");
|
|
2739
|
-
if (n) {
|
|
2740
|
-
ci(de.get(`${n.closest("tr").dataset.rule}.name`), "toggle");
|
|
2741
|
-
return;
|
|
2742
|
-
}
|
|
2743
|
-
let s = e.target.closest?.(".spell-choice-reset")?.closest(".spell-syntax-box");
|
|
2744
|
-
if (s) {
|
|
2745
|
-
let u = de.get(s.dataset.box);
|
|
2746
|
-
u.input.value = u.generated, Rt(u), _t(), u.input.focus();
|
|
2747
|
-
return;
|
|
2748
|
-
}
|
|
2749
|
-
let o = e.target.closest?.("a.spell-syntax-source");
|
|
2750
|
-
o && je.openFile(e, o.href);
|
|
2751
|
-
}), I.feedback.addEventListener("ui-typed", _t), I.send.addEventListener("click", () => {
|
|
2752
|
-
Qc();
|
|
2753
|
-
}), Q.watch(window);
|
|
2754
|
-
}
|
|
2755
|
-
__name(Jc, "Jc");
|
|
2756
|
-
function Rt(t) {
|
|
2757
|
-
let e = Ue(t);
|
|
2758
|
-
t.holder.toggleAttribute("data-changed", e), e && (t.reset ??= Gc(t)), t.reset && (t.reset.hidden = !e), e && t.key.endsWith(".name") && ci(t, "show");
|
|
2759
|
-
let n = t.holder.closest("tr");
|
|
2760
|
-
n.toggleAttribute("data-edited", !!n.querySelector(".spell-syntax-box[data-changed]"));
|
|
2761
|
-
}
|
|
2762
|
-
__name(Rt, "Rt");
|
|
2763
|
-
function ci(t, e) {
|
|
2764
|
-
let n = e === "show" || t.holder.hidden || Ue(t);
|
|
2765
|
-
t.holder.hidden = !n, t.holder.closest("td").querySelector(".spell-syntax-rename").toggleAttribute("data-open", n), n && e === "toggle" && t.input.focus();
|
|
2766
|
-
}
|
|
2767
|
-
__name(ci, "ci");
|
|
2768
|
-
function Ue(t) {
|
|
2769
|
-
return t.input.value.trim() !== t.generated.trim();
|
|
2770
|
-
}
|
|
2771
|
-
__name(Ue, "Ue");
|
|
2772
|
-
function _t() {
|
|
2773
|
-
qt(), Q.keep({ values: li(), feedback: fi(), saved: (/* @__PURE__ */ new Date()).toISOString() }), Q.changed(), $t && Ut($t, { isStale: true });
|
|
2774
|
-
}
|
|
2775
|
-
__name(_t, "_t");
|
|
2776
|
-
function qt() {
|
|
2777
|
-
let t = [...de.values()].filter(Ue).length, e = Object.keys(ct).length, n = new Set([...de.values()].filter(Ue).map((r) => r.key.split(".")[0])).size;
|
|
2778
|
-
I.send.title = `Send ${t} changed ${t === 1 ? "box" : "boxes"}, in ${n} ${n === 1 ? "rule" : "rules"}` + (e ? ` (and ${e} kept for rules no longer here)` : "") + ", and the feedback, to Claude";
|
|
2779
|
-
}
|
|
2780
|
-
__name(qt, "qt");
|
|
2781
|
-
function li() {
|
|
2782
|
-
let t = { ...ct };
|
|
2783
|
-
for (let e of de.values()) Ue(e) && (t[e.key] = e.input.value);
|
|
2784
|
-
return t;
|
|
2785
|
-
}
|
|
2786
|
-
__name(li, "li");
|
|
2787
|
-
async function Qc() {
|
|
2788
|
-
I.error.hidden = true, I.send.setAttribute("loading", "");
|
|
2789
|
-
try {
|
|
2790
|
-
let { answer: t } = await di(ce, "answer");
|
|
2791
|
-
Q.done(), Q.tell(`saved ${Y(t.answered)}`), Ut(t);
|
|
2792
|
-
} catch (t) {
|
|
2793
|
-
hi(`Not sent: ${t.message}`);
|
|
2794
|
-
} finally {
|
|
2795
|
-
I.send.removeAttribute("loading");
|
|
2796
|
-
}
|
|
2797
|
-
}
|
|
2798
|
-
__name(Qc, "Qc");
|
|
2799
|
-
async function di(t, e, { keepalive: n = false } = {}) {
|
|
2800
|
-
return pi(`${t}/${e}`, { page: location.pathname, values: li(), feedback: fi() }, { keepalive: n });
|
|
2801
|
-
}
|
|
2802
|
-
__name(di, "di");
|
|
2803
|
-
function fi() {
|
|
2804
|
-
return String(I.feedback.value ?? "").trim();
|
|
2805
|
-
}
|
|
2806
|
-
__name(fi, "fi");
|
|
2807
|
-
async function pi(t, e, { keepalive: n = false } = {}) {
|
|
2808
|
-
if (!T.isServed()) throw new Error("this page isn't on the page server: open it with `epic pages open <page>`");
|
|
2809
|
-
return T.forPage().post(t, e, { keepalive: n });
|
|
2810
|
-
}
|
|
2811
|
-
__name(pi, "pi");
|
|
2812
|
-
async function Xc() {
|
|
2813
|
-
if (T.isServed()) {
|
|
2814
|
-
try {
|
|
2815
|
-
let [t, e] = await Promise.all([Lt(`${ce}/draft`), Lt(`${ce}/answer`)]), n = Q.kept(), r = n?.saved && n.saved > (t?.draft?.saved ?? e?.answer?.answered ?? ""), s = r ? n : t?.draft ?? e?.answer;
|
|
2816
|
-
if (s) {
|
|
2817
|
-
ct = {};
|
|
2818
|
-
for (let [o, u] of Object.entries(s.values ?? {})) {
|
|
2819
|
-
let l = de.get(o);
|
|
2820
|
-
if (!l) {
|
|
2821
|
-
ct[o] = u;
|
|
2822
|
-
continue;
|
|
2823
|
-
}
|
|
2824
|
-
l.input.value = u, Rt(l);
|
|
2825
|
-
}
|
|
2826
|
-
await customElements.whenDefined("ui-textarea"), I.feedback.value = s.feedback ?? "", qt();
|
|
2827
|
-
}
|
|
2828
|
-
t?.draft && Q.tell(`saved ${Y(t.draft.saved)}`), e?.answer && Ut(e.answer), r && Q.changed();
|
|
2829
|
-
} catch (t) {
|
|
2830
|
-
Q.tell(`can't load what you typed: ${t.message}`, { isError: true });
|
|
2831
|
-
}
|
|
2832
|
-
await tl();
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
__name(Xc, "Xc");
|
|
2836
|
-
async function Lt(t) {
|
|
2837
|
-
let e = await T.forPage().get(t, { query: { page: location.pathname }, missing: null }).catch(() => {
|
|
2838
|
-
});
|
|
2839
|
-
if (e === null) throw new Error("page server too old, restart it");
|
|
2840
|
-
return e;
|
|
2841
|
-
}
|
|
2842
|
-
__name(Lt, "Lt");
|
|
2843
|
-
function Zc(t, { isError: e = false } = {}) {
|
|
2844
|
-
I.saved.textContent = t, I.saved.classList.toggle("spell-choices-failed", e);
|
|
2845
|
-
}
|
|
2846
|
-
__name(Zc, "Zc");
|
|
2847
|
-
function hi(t) {
|
|
2848
|
-
I.error.replaceChildren(g("p", {}, t)), I.error.hidden = false;
|
|
2849
|
-
}
|
|
2850
|
-
__name(hi, "hi");
|
|
2851
|
-
function Ut(t, { isStale: e = false } = {}) {
|
|
2852
|
-
$t = t;
|
|
2853
|
-
let n = Object.keys(t.values ?? {}).length, r = t.changes ? ` (sent ${t.changes + 1} times)` : "", s = e ? `Sent at ${Y(t.answered)}${r}; changed since: press Send again to send the new ones.` : `Sent to Claude at ${Y(t.answered)}${r}: ${n} ${n === 1 ? "box" : "boxes"}. Change anything and press Send again to resend.`;
|
|
2854
|
-
I.done.setAttribute("state", e ? "warning" : "positive"), I.done.replaceChildren(g("p", {}, s)), I.done.hidden = false;
|
|
2855
|
-
}
|
|
2856
|
-
__name(Ut, "Ut");
|
|
2857
|
-
async function el(t, e, n) {
|
|
2858
|
-
if (!e.hasAttribute("data-asked")) {
|
|
2859
|
-
I.error.hidden = true, e.setAttribute("loading", "");
|
|
2860
|
-
try {
|
|
2861
|
-
let r = e.closest("ui-table"), s = r.closest("ui-section");
|
|
2862
|
-
await pi(oi, { page: location.pathname, action: "add", anchor: r.id, kind: "table", label: s?.getAttribute("label") ?? "", excerpt: Mt(ii(r)).slice(0, Mc).trim(), quote: Mt(ii(n)), offset: nl(r, n), text: `${qe}: \`${t.className}\`.` }), gi(t.className, true);
|
|
2863
|
-
} catch (r) {
|
|
2864
|
-
hi(`Not asked: ${r.message}`);
|
|
2865
|
-
} finally {
|
|
2866
|
-
e.removeAttribute("loading");
|
|
2867
|
-
}
|
|
2868
|
-
}
|
|
2869
|
-
}
|
|
2870
|
-
__name(el, "el");
|
|
2871
|
-
async function tl() {
|
|
2872
|
-
try {
|
|
2873
|
-
let t = await Lt(oi), e = /* @__PURE__ */ new Set();
|
|
2874
|
-
for (let n of t?.comments ?? []) {
|
|
2875
|
-
let r = new RegExp(`^${qe}: \`([^\`]+)\``).exec(n.text ?? "")?.[1];
|
|
2876
|
-
r && Nc.includes(n.turn) && e.add(r);
|
|
2877
|
-
}
|
|
2878
|
-
for (let n of jt.keys()) gi(n, e.has(n));
|
|
2879
|
-
} catch {
|
|
2880
|
-
}
|
|
2881
|
-
}
|
|
2882
|
-
__name(tl, "tl");
|
|
2883
|
-
function gi(t, e) {
|
|
2884
|
-
let n = jt.get(t);
|
|
2885
|
-
n && (n.toggleAttribute("data-asked", e), e ? n.setAttribute("color", "primary") : n.removeAttribute("color"), n.setAttribute("appearance", e ? "circular" : "circular basic"), n.title = e ? "Asked Claude for more details: the thread is below" : `${qe}: ask Claude, in a comment here`, at(n));
|
|
2886
|
-
}
|
|
2887
|
-
__name(gi, "gi");
|
|
2888
|
-
function ii(t) {
|
|
2889
|
-
return Di(t).map((e) => e.text).join("");
|
|
2890
|
-
}
|
|
2891
|
-
__name(ii, "ii");
|
|
2892
|
-
function nl(t, e) {
|
|
2893
|
-
let n = "";
|
|
2894
|
-
for (let r of Di(t)) {
|
|
2895
|
-
if (r.node === e) return Mt(`${n}x`).length - 1;
|
|
2896
|
-
n += r.text;
|
|
2897
|
-
}
|
|
2898
|
-
return 0;
|
|
2899
|
-
}
|
|
2900
|
-
__name(nl, "nl");
|
|
2901
|
-
function Di(t) {
|
|
2902
|
-
let e = [], n = /* @__PURE__ */ __name((r) => {
|
|
2903
|
-
if (r.nodeType === 3) return e.push({ node: null, text: r.textContent });
|
|
2904
|
-
if (!(r.nodeType !== 1 || r !== t && r.matches("[data-spell-added]"))) {
|
|
2905
|
-
e.push({ node: r, text: "" });
|
|
2906
|
-
for (let s of r.childNodes) n(s);
|
|
2907
|
-
e.push({ node: null, text: " " });
|
|
2908
|
-
}
|
|
2909
|
-
}, "n");
|
|
2910
|
-
return n(t), e;
|
|
2911
|
-
}
|
|
2912
|
-
__name(Di, "Di");
|
|
2913
|
-
function Mt(t) {
|
|
2914
|
-
return String(t ?? "").replace(/\s+/g, " ").trim();
|
|
2915
|
-
}
|
|
2916
|
-
__name(Mt, "Mt");
|
|
2917
|
-
})();
|
|
23
|
+
`)?" ...":""}`,"Back to what the code has");return t.holder.append(n),n}function ai(t,e,n,r){let s=g("ui-button",{class:t,appearance:"circular basic",size:"tiny",icon:e,title:n,"aria-label":r});return at(s),s}function Yc(){let t=g("ui-textarea",{class:"spell-choices-feedback",name:"feedback",grow:"",placeholder:"Feedback for Claude: anything the boxes don't say",fluid:""}),e=g("ui-button",{class:"spell-choices-send",color:"primary",appearance:"circular",icon:"paper plane",title:"Send every changed box, and the feedback, to Claude"},"Send"),n=g("span",{class:"spell-choices-saved"}),r=g("ui-message",{class:"spell-choices-error",state:"negative",size:"small",hidden:""}),s=g("ui-message",{class:"spell-choices-sent",state:"positive",size:"small",hidden:""});return document.querySelector("main").append(g("div",{id:"choices-bar",class:"spell-choices-bar"},g("div",{class:"spell-choices-row"},t,e),g("div",{class:"spell-choices-meta"},n),r,s)),{feedback:t,send:e,saved:n,error:r,done:s}}function Jc(){let t=document.querySelector("main");t.addEventListener("input",e=>{let n=e.target.closest?.(".spell-syntax-box");n&&(e.target.hasAttribute("data-one-line")&&ei(e.target),Rt(le.get(n.dataset.box)),_t())}),t.addEventListener("keydown",e=>{e.target.hasAttribute?.("data-one-line")&&ti(e)}),t.addEventListener("click",e=>{let n=e.target.closest?.(".spell-syntax-rename");if(n){ci(le.get(`${n.closest("tr").dataset.rule}.name`),"toggle");return}let s=e.target.closest?.(".spell-choice-reset")?.closest(".spell-syntax-box");if(s){let u=le.get(s.dataset.box);u.input.value=u.generated,Rt(u),_t(),u.input.focus();return}let o=e.target.closest?.("a.spell-syntax-source");o&&je.openFile(e,o.href)}),I.feedback.addEventListener("ui-typed",_t),I.send.addEventListener("click",()=>{Qc()}),Q.watch(window)}function Rt(t){let e=Ue(t);t.holder.toggleAttribute("data-changed",e),e&&(t.reset??=Gc(t)),t.reset&&(t.reset.hidden=!e),e&&t.key.endsWith(".name")&&ci(t,"show");let n=t.holder.closest("tr");n.toggleAttribute("data-edited",!!n.querySelector(".spell-syntax-box[data-changed]"))}function ci(t,e){let n=e==="show"||t.holder.hidden||Ue(t);t.holder.hidden=!n,t.holder.closest("td").querySelector(".spell-syntax-rename").toggleAttribute("data-open",n),n&&e==="toggle"&&t.input.focus()}function Ue(t){return t.input.value.trim()!==t.generated.trim()}function _t(){qt(),Q.keep({values:li(),feedback:fi(),saved:new Date().toISOString()}),Q.changed(),$t&&Ut($t,{isStale:!0})}function qt(){let t=[...le.values()].filter(Ue).length,e=Object.keys(ct).length,n=new Set([...le.values()].filter(Ue).map(r=>r.key.split(".")[0])).size;I.send.title=`Send ${t} changed ${t===1?"box":"boxes"}, in ${n} ${n===1?"rule":"rules"}`+(e?` (and ${e} kept for rules no longer here)`:"")+", and the feedback, to Claude"}function li(){let t={...ct};for(let e of le.values())Ue(e)&&(t[e.key]=e.input.value);return t}async function Qc(){I.error.hidden=!0,I.send.setAttribute("loading","");try{let{answer:t}=await di(ae,"answer");Q.done(),Q.tell(`saved ${Y(t.answered)}`),Ut(t)}catch(t){hi(`Not sent: ${t.message}`)}finally{I.send.removeAttribute("loading")}}async function di(t,e,{keepalive:n=!1}={}){return pi(`${t}/${e}`,{page:location.pathname,values:li(),feedback:fi()},{keepalive:n})}function fi(){return String(I.feedback.value??"").trim()}async function pi(t,e,{keepalive:n=!1}={}){if(!T.isServed())throw new Error("this page isn't on the page server: open it with `epic pages open <page>`");return T.forPage().post(t,e,{keepalive:n})}async function Xc(){if(T.isServed()){try{let[t,e]=await Promise.all([Lt(`${ae}/draft`),Lt(`${ae}/answer`)]),n=Q.kept(),r=n?.saved&&n.saved>(t?.draft?.saved??e?.answer?.answered??""),s=r?n:t?.draft??e?.answer;if(s){ct={};for(let[o,u]of Object.entries(s.values??{})){let l=le.get(o);if(!l){ct[o]=u;continue}l.input.value=u,Rt(l)}await customElements.whenDefined("ui-textarea"),I.feedback.value=s.feedback??"",qt()}t?.draft&&Q.tell(`saved ${Y(t.draft.saved)}`),e?.answer&&Ut(e.answer),r&&Q.changed()}catch(t){Q.tell(`can't load what you typed: ${t.message}`,{isError:!0})}await tl()}}async function Lt(t){let e=await T.forPage().get(t,{query:{page:location.pathname},missing:null}).catch(()=>{});if(e===null)throw new Error("page server too old, restart it");return e}function Zc(t,{isError:e=!1}={}){I.saved.textContent=t,I.saved.classList.toggle("spell-choices-failed",e)}function hi(t){I.error.replaceChildren(g("p",{},t)),I.error.hidden=!1}function Ut(t,{isStale:e=!1}={}){$t=t;let n=Object.keys(t.values??{}).length,r=t.changes?` (sent ${t.changes+1} times)`:"",s=e?`Sent at ${Y(t.answered)}${r}; changed since: press Send again to send the new ones.`:`Sent to Claude at ${Y(t.answered)}${r}: ${n} ${n===1?"box":"boxes"}. Change anything and press Send again to resend.`;I.done.setAttribute("state",e?"warning":"positive"),I.done.replaceChildren(g("p",{},s)),I.done.hidden=!1}async function el(t,e,n){if(!e.hasAttribute("data-asked")){I.error.hidden=!0,e.setAttribute("loading","");try{let r=e.closest("ui-table"),s=r.closest("ui-section");await pi(oi,{page:location.pathname,action:"add",anchor:r.id,kind:"table",label:s?.getAttribute("label")??"",excerpt:Mt(ii(r)).slice(0,Mc).trim(),quote:Mt(ii(n)),offset:nl(r,n),text:`${qe}: \`${t.className}\`.`}),gi(t.className,!0)}catch(r){hi(`Not asked: ${r.message}`)}finally{e.removeAttribute("loading")}}}async function tl(){try{let t=await Lt(oi),e=new Set;for(let n of t?.comments??[]){let r=new RegExp(`^${qe}: \`([^\`]+)\``).exec(n.text??"")?.[1];r&&Nc.includes(n.turn)&&e.add(r)}for(let n of jt.keys())gi(n,e.has(n))}catch{}}function gi(t,e){let n=jt.get(t);n&&(n.toggleAttribute("data-asked",e),e?n.setAttribute("color","primary"):n.removeAttribute("color"),n.setAttribute("appearance",e?"circular":"circular basic"),n.title=e?"Asked Claude for more details: the thread is below":`${qe}: ask Claude, in a comment here`,at(n))}function ii(t){return Di(t).map(e=>e.text).join("")}function nl(t,e){let n="";for(let r of Di(t)){if(r.node===e)return Mt(`${n}x`).length-1;n+=r.text}return 0}function Di(t){let e=[],n=r=>{if(r.nodeType===3)return e.push({node:null,text:r.textContent});if(!(r.nodeType!==1||r!==t&&r.matches("[data-spell-added]"))){e.push({node:r,text:""});for(let s of r.childNodes)n(s);e.push({node:null,text:" "})}};return n(t),e}function Mt(t){return String(t??"").replace(/\s+/g," ").trim()}})();
|