@fastr-pro/global-header 1.0.3 → 1.0.5
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +417 -334
- package/dist/index.js.map +1 -1
- package/dist/style.css +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -108,18 +108,18 @@ var R = ({ className: e = "h-9 w-auto cursor-pointer", isDarkMode: n, theme: r,
|
|
|
108
108
|
let n = new Int32Array(e.length);
|
|
109
109
|
for (let r = 0; r < e.length; r++) n[r] = e.charCodeAt(r) - oe - t;
|
|
110
110
|
return n;
|
|
111
|
-
},
|
|
111
|
+
}, se = (e) => {
|
|
112
112
|
let t = new Int32Array(e.length + 1);
|
|
113
113
|
for (let n = 0; n < e.length; n++) t[n + 1] = t[n] + e[n];
|
|
114
114
|
return t;
|
|
115
|
-
},
|
|
115
|
+
}, B = (e) => {
|
|
116
116
|
let t = new Int32Array(e.length), n = 0;
|
|
117
117
|
for (let r = 0; r < e.length; r++) {
|
|
118
118
|
let i = e.charCodeAt(r) - oe;
|
|
119
119
|
n += i >>> 1 ^ -(i & 1), t[r] = n;
|
|
120
120
|
}
|
|
121
121
|
return t;
|
|
122
|
-
},
|
|
122
|
+
}, V = 384, ce = [], H = se(z("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")), le = se(z(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")), ue = "@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom", U = (() => {
|
|
123
123
|
let e = H.length - 1, t = new Int32Array(e);
|
|
124
124
|
for (let n = e - 1; n >= 0; n--) {
|
|
125
125
|
let e = 1, r = n + 1;
|
|
@@ -132,29 +132,29 @@ var R = ({ className: e = "h-9 w-auto cursor-pointer", isDarkMode: n, theme: r,
|
|
|
132
132
|
for (let a = H[i]; a < H[i + 1]; a++) n[r++] = e, e += t[e];
|
|
133
133
|
}
|
|
134
134
|
return n;
|
|
135
|
-
})(), de = z("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000", 1), fe =
|
|
136
|
-
let e = (/* @__PURE__ */ new Int32Array(319)).fill(-1), t =
|
|
135
|
+
})(), de = z("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000", 1), fe = se(z("123333359346463635126536711576")), pe = z("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"), me = z("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"), he = B("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"), ge = (() => {
|
|
136
|
+
let e = (/* @__PURE__ */ new Int32Array(319)).fill(-1), t = B("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"), n = B("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");
|
|
137
137
|
for (let r = 0; r < t.length; r++) e[t[r]] = n[r];
|
|
138
138
|
return e;
|
|
139
139
|
})(), _e = "container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map((e) => {
|
|
140
140
|
let t = e.split(" "), n = t.shift();
|
|
141
141
|
for (let e = 0; e < t.length; e++) t[e] = n + t[e];
|
|
142
142
|
return t;
|
|
143
|
-
}), ve =
|
|
143
|
+
}), ve = B("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"), ye = B("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"), be = B("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±"), xe = /* @__PURE__ */ new Int32Array(995), Se = /* @__PURE__ */ new Int32Array(995), W = /* @__PURE__ */ new Int32Array(995), Ce = "", G = /* @__PURE__ */ new Int32Array(1038);
|
|
144
144
|
{
|
|
145
145
|
let e = /* @__PURE__ */ new Map(), t = 0, n = 0;
|
|
146
146
|
for (let r = 0; r < ve.length; r++) for (let i of _e[be[r]]) {
|
|
147
147
|
let a = e.get(i);
|
|
148
|
-
a === void 0 && (a = t++, e.set(i, a), G[a * 2] =
|
|
148
|
+
a === void 0 && (a = t++, e.set(i, a), G[a * 2] = Ce.length, G[a * 2 + 1] = i.length, Ce += i), xe[n] = ve[r], Se[n] = ye[r], W[n] = a, n++;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
var we =
|
|
152
|
-
GROUP_COUNT:
|
|
151
|
+
var we = B("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = se(z("1::24444432:442:44:44>222222:44:4421322511111311111114")), K = B("24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222"), Ee = z("ij"), De = z(""), Oe = z("1"), ke = {
|
|
152
|
+
GROUP_COUNT: V,
|
|
153
153
|
customValidatorNames: ce,
|
|
154
154
|
edgeStart: H,
|
|
155
|
-
labelStart:
|
|
156
|
-
labelText:
|
|
157
|
-
edgeTarget:
|
|
155
|
+
labelStart: le,
|
|
156
|
+
labelText: ue,
|
|
157
|
+
edgeTarget: U,
|
|
158
158
|
nodeGroup: de,
|
|
159
159
|
nodeVlist: ge,
|
|
160
160
|
vlistPat: fe,
|
|
@@ -163,21 +163,21 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
163
163
|
vlistGroup: he,
|
|
164
164
|
litAnchor: xe,
|
|
165
165
|
litGroup: Se,
|
|
166
|
-
litPool:
|
|
166
|
+
litPool: W,
|
|
167
167
|
poolOffsets: G,
|
|
168
|
-
poolText:
|
|
168
|
+
poolText: Ce,
|
|
169
169
|
adjGid: we,
|
|
170
170
|
adjStart: Te,
|
|
171
|
-
adjTgt:
|
|
172
|
-
patGid:
|
|
173
|
-
patTgt:
|
|
174
|
-
postfixLookupGroups:
|
|
171
|
+
adjTgt: K,
|
|
172
|
+
patGid: Ee,
|
|
173
|
+
patTgt: De,
|
|
174
|
+
postfixLookupGroups: Oe,
|
|
175
175
|
orderSensitiveModifiers: "* ** after backdrop before details-content file first-letter first-line marker placeholder selection"
|
|
176
|
-
},
|
|
176
|
+
}, Ae = "line" in /* @__PURE__ */ Error(), q = -1, je = -1, Me = (e, t, n) => {
|
|
177
177
|
let r = 2166136261;
|
|
178
178
|
for (let i = t; i < n; i++) r = Math.imul(r ^ e.charCodeAt(i), 16777619);
|
|
179
179
|
return r;
|
|
180
|
-
},
|
|
180
|
+
}, Ne = (e, t, n) => {
|
|
181
181
|
let r = n - t, i = Math.imul(r, 2654435761) ^ e.charCodeAt(t);
|
|
182
182
|
if (r > 3) {
|
|
183
183
|
let a = r >> 2, o = r >> 1;
|
|
@@ -185,7 +185,7 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
185
185
|
for (let r = t + 3, a = n - 4; r < t + 8 && r < a; r++, a--) i = Math.imul(i ^ e.charCodeAt(r) ^ e.charCodeAt(a) << 8, 16777619);
|
|
186
186
|
}
|
|
187
187
|
return i ^ i >>> 15 | 0;
|
|
188
|
-
},
|
|
188
|
+
}, Pe = (e, t, n = {}) => {
|
|
189
189
|
let { GROUP_COUNT: r, edgeStart: i, labelStart: a, labelText: o, edgeTarget: s, nodeGroup: c, nodeVlist: l, vlistPat: u, vlistOps: d, vlistRef: f, vlistGroup: p, litAnchor: m, litGroup: h, litPool: g, poolOffsets: _, poolText: v, adjGid: y, adjStart: b, adjTgt: ee, patGid: te, patTgt: x, postfixLookupGroups: S, customValidatorNames: C, orderSensitiveModifiers: w } = e, T = new Int32Array(r).fill(-1);
|
|
190
190
|
for (let e = 0; e < y.length; e++) T[y[e]] = e;
|
|
191
191
|
let E = 0;
|
|
@@ -211,12 +211,12 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
211
211
|
for (; j < m.length * 2;) j <<= 1;
|
|
212
212
|
let M = new Int32Array(j).fill(-1);
|
|
213
213
|
for (let e = 0; e < m.length; e++) {
|
|
214
|
-
let t = _[g[e] * 2], n = (
|
|
214
|
+
let t = _[g[e] * 2], n = (Me(v, t, t + _[g[e] * 2 + 1]) ^ Math.imul(m[e], 2654435761) | 0) & j - 1;
|
|
215
215
|
for (; M[n] !== -1;) n = n + 1 & j - 1;
|
|
216
216
|
M[n] = e;
|
|
217
217
|
}
|
|
218
218
|
let N = (e, t, n, r) => {
|
|
219
|
-
let i = (
|
|
219
|
+
let i = (Me(t, n, r) ^ Math.imul(e, 2654435761) | 0) & j - 1, a = r - n;
|
|
220
220
|
for (;;) {
|
|
221
221
|
let r = M[i];
|
|
222
222
|
if (r === -1) return -1;
|
|
@@ -234,21 +234,21 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
234
234
|
let n = t && t[e];
|
|
235
235
|
if (!n) throw Error("cn: missing validator " + e);
|
|
236
236
|
return n;
|
|
237
|
-
}), R = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, oe = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, z = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,
|
|
238
|
-
if (
|
|
237
|
+
}), R = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, oe = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, z = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, se = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, B = 0, V = -1, ce = -1, H = -1, le = -1, ue = (e) => e >= 97 && e <= 122 || e >= 65 && e <= 90 || e >= 48 && e <= 57 || e === 95, U = (e) => /\s/.test(String.fromCharCode(e)), de = (e, t, n) => {
|
|
238
|
+
if (B = 0, V = -1, n - t < 3) return;
|
|
239
239
|
let r = e.charCodeAt(t), i = e.charCodeAt(n - 1);
|
|
240
|
-
if (r === 91 && i === 93)
|
|
241
|
-
else if (r === 40 && i === 41)
|
|
240
|
+
if (r === 91 && i === 93) B = 1;
|
|
241
|
+
else if (r === 40 && i === 41) B = 2;
|
|
242
242
|
else return;
|
|
243
|
-
H = t + 1,
|
|
243
|
+
H = t + 1, le = n - 1;
|
|
244
244
|
let a = t + 1;
|
|
245
|
-
if (
|
|
245
|
+
if (ue(e.charCodeAt(a))) {
|
|
246
246
|
for (a++; a < n - 1;) {
|
|
247
247
|
let t = e.charCodeAt(a);
|
|
248
|
-
if (!
|
|
248
|
+
if (!ue(t) && t !== 45) break;
|
|
249
249
|
a++;
|
|
250
250
|
}
|
|
251
|
-
a < n - 2 && e.charCodeAt(a) === 58 && (
|
|
251
|
+
a < n - 2 && e.charCodeAt(a) === 58 && (V = t + 1, ce = a, H = a + 1);
|
|
252
252
|
}
|
|
253
253
|
}, fe = (e, t, n, r) => {
|
|
254
254
|
if (n - t !== r.length) return !1;
|
|
@@ -295,28 +295,28 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
295
295
|
if (e >= 10) {
|
|
296
296
|
if (e >= 25) return L[e - 25](t.slice(n, r));
|
|
297
297
|
let i = e - 10;
|
|
298
|
-
if (
|
|
299
|
-
if (
|
|
300
|
-
for (let e of ve[i]) if (fe(t,
|
|
298
|
+
if (B !== _e[i]) return !1;
|
|
299
|
+
if (V >= 0) {
|
|
300
|
+
for (let e of ve[i]) if (fe(t, V, ce, e)) return !0;
|
|
301
301
|
return !1;
|
|
302
302
|
}
|
|
303
303
|
switch (ye[i]) {
|
|
304
304
|
case 0: return !1;
|
|
305
305
|
case 1: return !0;
|
|
306
306
|
case 2: {
|
|
307
|
-
let e = t.slice(H,
|
|
307
|
+
let e = t.slice(H, le);
|
|
308
308
|
return R.test(e) && !oe.test(e);
|
|
309
309
|
}
|
|
310
|
-
case 3: return he(t.slice(H,
|
|
311
|
-
case 4: return
|
|
312
|
-
default: return z.test(t.slice(H,
|
|
310
|
+
case 3: return he(t.slice(H, le));
|
|
311
|
+
case 4: return se.test(t.slice(H, le));
|
|
312
|
+
default: return z.test(t.slice(H, le));
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
switch (e) {
|
|
316
316
|
case 0: return !0;
|
|
317
|
-
case 1: return
|
|
318
|
-
case 2: return
|
|
319
|
-
case 3: return
|
|
317
|
+
case 1: return B === 0;
|
|
318
|
+
case 2: return B === 1;
|
|
319
|
+
case 3: return B === 2;
|
|
320
320
|
case 4: return pe.test(t.slice(n, r));
|
|
321
321
|
case 5: return he(t.slice(n, r));
|
|
322
322
|
case 6: {
|
|
@@ -328,7 +328,7 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
328
328
|
default: return ge(t, n, r);
|
|
329
329
|
}
|
|
330
330
|
}, xe = new Set(typeof w == "string" ? w.split(" ") : w), Se = (e, t, n, r, i, a) => {
|
|
331
|
-
let o =
|
|
331
|
+
let o = Me(t, n, r) ^ (i ? 2654435769 : 0) | 0, s = e.get(o);
|
|
332
332
|
if (s !== void 0) outer: for (let e = 0; e < s.length; e++) {
|
|
333
333
|
let a = s[e];
|
|
334
334
|
if (a.imp === i && a.k.length === r - n) {
|
|
@@ -343,7 +343,7 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
343
343
|
imp: i,
|
|
344
344
|
id: l
|
|
345
345
|
}), l;
|
|
346
|
-
},
|
|
346
|
+
}, W = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), G = 2, we = 4096, Te = (e, t) => {
|
|
347
347
|
let n = [], r = 0, i = 0, a = 0;
|
|
348
348
|
for (let t = 0; t < e.length; t++) {
|
|
349
349
|
let o = e.charCodeAt(t);
|
|
@@ -356,34 +356,34 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
356
356
|
for (let r of n) r.charCodeAt(0) === 91 || xe.has(r) ? (t.length && (e.push(...t.sort()), t = []), e.push(r)) : t.push(r);
|
|
357
357
|
t.length && e.push(...t.sort()), o = e.join(":");
|
|
358
358
|
}
|
|
359
|
-
let s = t ? o + " !" : o, c =
|
|
360
|
-
return c === void 0 &&
|
|
361
|
-
},
|
|
359
|
+
let s = t ? o + " !" : o, c = Ce.get(s);
|
|
360
|
+
return c === void 0 && Ce.set(s, c = G++), c;
|
|
361
|
+
}, K = /* @__PURE__ */ new Map(), Ee = r, De = r + 4096, Oe = () => Ee++, ke = 2097152, Pe = 8192, Fe = new Int32Array(Pe), J = Array(Pe).fill(null), Le = new Int32Array(Pe), Re = new Int32Array(Pe), ze = new Uint8Array(Pe), Be = 0, Ve = (e, t, n, r, i, a, o, s) => {
|
|
362
362
|
let c = e;
|
|
363
|
-
if (
|
|
364
|
-
if (
|
|
365
|
-
else if (!(
|
|
363
|
+
if (J[e] !== null) {
|
|
364
|
+
if (J[e | 1] === null) c = e | 1;
|
|
365
|
+
else if (!(Be++ & 3)) c = e | Be >> 2 & 1;
|
|
366
366
|
else return;
|
|
367
367
|
}
|
|
368
|
-
|
|
369
|
-
},
|
|
370
|
-
new Int32Array(
|
|
371
|
-
new Int32Array(
|
|
372
|
-
new Int32Array(
|
|
373
|
-
new Int32Array(
|
|
374
|
-
], [Ge, Ke, qe
|
|
375
|
-
|
|
376
|
-
let t = new Int32Array(
|
|
368
|
+
J[c] = t.slice(n, r), Fe[c] = i, Le[c] = a, Re[c] = o, ze[c] = s;
|
|
369
|
+
}, He = () => J.fill(null), Y = 256, Ue = [
|
|
370
|
+
new Int32Array(Y),
|
|
371
|
+
new Int32Array(Y),
|
|
372
|
+
new Int32Array(Y),
|
|
373
|
+
new Int32Array(Y)
|
|
374
|
+
], [We, Ge, Ke, qe] = Ue, Je = new Uint8Array(Y), Ye = new Uint8Array(Y), Xe = () => {
|
|
375
|
+
Y *= 2, Ue = Ue.map((e) => {
|
|
376
|
+
let t = new Int32Array(Y);
|
|
377
377
|
return t.set(e), t;
|
|
378
|
-
}), [Ge, Ke, qe
|
|
379
|
-
let e = new Uint8Array(
|
|
380
|
-
e.set(
|
|
381
|
-
},
|
|
382
|
-
if (e === 0 && t < r) return
|
|
378
|
+
}), [We, Ge, Ke, qe] = Ue;
|
|
379
|
+
let e = new Uint8Array(Y);
|
|
380
|
+
e.set(Je), Je = e, Ye = new Uint8Array(Y);
|
|
381
|
+
}, Ze = 64, Qe = new Int32Array(Ze), $e = new Int32Array(Ze), et = new Int32Array(r), tt = 2048, nt = 21, rt = new Float64Array(tt), it = new Int32Array(tt), at = 0, ot = (e, t) => {
|
|
382
|
+
if (e === 0 && t < r) return et[t] === at ? 1 : (et[t] = at, 0);
|
|
383
383
|
let n = e * 2097152 + t + 1, i = Math.imul(n, 2654435761) >>> nt;
|
|
384
384
|
for (; it[i] === at;) {
|
|
385
385
|
if (rt[i] === n) return 1;
|
|
386
|
-
i = i + 1 &
|
|
386
|
+
i = i + 1 & tt - 1;
|
|
387
387
|
}
|
|
388
388
|
return rt[i] = n, it[i] = at, 0;
|
|
389
389
|
}, st = (e, t, n, r, i) => {
|
|
@@ -393,13 +393,13 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
393
393
|
r = i;
|
|
394
394
|
break;
|
|
395
395
|
}
|
|
396
|
-
return r === -1 || r === t + 1 ?
|
|
396
|
+
return r === -1 || r === t + 1 ? q : Se(K, e, t + 1, r, 0, Oe);
|
|
397
397
|
}
|
|
398
398
|
if (r >= 0 && c[r] >= 0) return c[r];
|
|
399
399
|
for (let t = i - 1; t >= 0; t--) {
|
|
400
|
-
let r =
|
|
400
|
+
let r = $e[t];
|
|
401
401
|
if (r > n) continue;
|
|
402
|
-
let i =
|
|
402
|
+
let i = Qe[t], a = n - r;
|
|
403
403
|
if (ie[i] === 1 && a > 0 && a <= k) {
|
|
404
404
|
let t = e.charCodeAt(r);
|
|
405
405
|
if (A === !1 || t !== 91 && t !== 40) {
|
|
@@ -415,14 +415,14 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
415
415
|
let h = O[o] - c;
|
|
416
416
|
for (let t = c; t < m; t++) if (be(d[t], e, r, n)) return p[h + t];
|
|
417
417
|
}
|
|
418
|
-
return
|
|
418
|
+
return q;
|
|
419
419
|
}, ct = (e) => {
|
|
420
420
|
let t = e.length, n = 0, c = 0, u = !1;
|
|
421
|
-
(G > we ||
|
|
421
|
+
(G > we || W.size > we) && (W = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), G = 2, He()), Ee > De && (K = /* @__PURE__ */ new Map(), Ee = r, He());
|
|
422
422
|
let d = 0;
|
|
423
423
|
for (; d < t;) {
|
|
424
424
|
let f = e.charCodeAt(d);
|
|
425
|
-
if (f === 32 || f >= 9 && f <= 13 || f >= 160 &&
|
|
425
|
+
if (f === 32 || f >= 9 && f <= 13 || f >= 160 && U(f)) {
|
|
426
426
|
f !== 32 && (u = !0), d++;
|
|
427
427
|
continue;
|
|
428
428
|
}
|
|
@@ -434,27 +434,27 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
434
434
|
u = !0;
|
|
435
435
|
break;
|
|
436
436
|
}
|
|
437
|
-
} else if (f >= 160 &&
|
|
437
|
+
} else if (f >= 160 && U(f)) {
|
|
438
438
|
u = !0;
|
|
439
439
|
break;
|
|
440
440
|
}
|
|
441
441
|
m = Math.imul(m ^ f, 16777619), d++;
|
|
442
442
|
}
|
|
443
443
|
let h = d, g = h - p;
|
|
444
|
-
n ===
|
|
444
|
+
n === Y && Xe();
|
|
445
445
|
let _ = n++;
|
|
446
|
-
|
|
446
|
+
We[_] = p, Ge[_] = h, c += g, m ^= Math.imul(g, 2654435761);
|
|
447
447
|
let v = m ^ m >>> 15 | 0, y = v & 8190;
|
|
448
448
|
{
|
|
449
449
|
let t = -1;
|
|
450
|
-
if (
|
|
451
|
-
let n =
|
|
450
|
+
if (Fe[y] === v && J[y] !== null && J[y].length === g ? t = y : Fe[y | 1] === v && J[y | 1] !== null && J[y | 1].length === g && (t = y | 1), t >= 0) {
|
|
451
|
+
let n = J[t], r = !0;
|
|
452
452
|
for (let t = 0; t < g; t++) if (n.charCodeAt(t) !== e.charCodeAt(p + t)) {
|
|
453
453
|
r = !1;
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
456
|
if (r) {
|
|
457
|
-
|
|
457
|
+
Ke[_] = Le[t], qe[_] = Re[t], Je[_] = ze[t];
|
|
458
458
|
continue;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
@@ -462,7 +462,7 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
462
462
|
let b = p;
|
|
463
463
|
if (I !== 0) {
|
|
464
464
|
if (h - p <= I || !e.startsWith(ae, p)) {
|
|
465
|
-
|
|
465
|
+
Ke[_] = q, Ve(y, e, p, h, v, q, 0, 0);
|
|
466
466
|
continue;
|
|
467
467
|
}
|
|
468
468
|
b = p + I;
|
|
@@ -489,13 +489,13 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
489
489
|
let re = w;
|
|
490
490
|
T - w > 1 && e.charCodeAt(w) === 45 && (re = w + 1);
|
|
491
491
|
let k = 0, A = 0, j = 0, M = -1, N = 0;
|
|
492
|
-
(l[0] >= 0 || ie[0] === 1) && (
|
|
493
|
-
let P =
|
|
494
|
-
for (let t = re; t < T; t++) if (t === O && (P = A < j ?
|
|
492
|
+
(l[0] >= 0 || ie[0] === 1) && (Qe[0] = 0, $e[0] = re, N = 1);
|
|
493
|
+
let P = je, F = 0;
|
|
494
|
+
for (let t = re; t < T; t++) if (t === O && (P = A < j ? je : k, F = N), k !== je) {
|
|
495
495
|
let n = e.charCodeAt(t), r = -1;
|
|
496
|
-
if (A < j) o.charCodeAt(A) === n ? (A++, A === j && (r = k = M)) : k =
|
|
496
|
+
if (A < j) o.charCodeAt(A) === n ? (A++, A === j && (r = k = M)) : k = je;
|
|
497
497
|
else {
|
|
498
|
-
let e = i[k], t = i[k + 1], c =
|
|
498
|
+
let e = i[k], t = i[k + 1], c = je;
|
|
499
499
|
for (let i = e; i < t; i++) {
|
|
500
500
|
let e = a[i];
|
|
501
501
|
if (o.charCodeAt(e) === n) {
|
|
@@ -506,62 +506,62 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
506
506
|
k = c;
|
|
507
507
|
}
|
|
508
508
|
if (r >= 0 && (l[r] >= 0 || ie[r] === 1) && t + 1 < T && e.charCodeAt(t + 1) === 45) {
|
|
509
|
-
if (N ===
|
|
510
|
-
|
|
511
|
-
let e = new Int32Array(
|
|
512
|
-
e.set(
|
|
513
|
-
let t = new Int32Array(
|
|
514
|
-
t.set(
|
|
509
|
+
if (N === Ze) {
|
|
510
|
+
Ze *= 2;
|
|
511
|
+
let e = new Int32Array(Ze);
|
|
512
|
+
e.set(Qe), Qe = e;
|
|
513
|
+
let t = new Int32Array(Ze);
|
|
514
|
+
t.set($e), $e = t;
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
Qe[N] = r, $e[N] = t + 2, N++;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
O === T && (P = A < j ?
|
|
520
|
-
let L = A < j ?
|
|
519
|
+
O === T && (P = A < j ? je : k, F = N);
|
|
520
|
+
let L = A < j ? je : k, R, oe = !1;
|
|
521
521
|
if (O >= 0) {
|
|
522
|
-
if (oe = !0, R = st(e, w, O, P, F), R !==
|
|
522
|
+
if (oe = !0, R = st(e, w, O, P, F), R !== q && R < r && ne[R]) {
|
|
523
523
|
let t = st(e, w, T, L, N);
|
|
524
|
-
t !==
|
|
525
|
-
} else R ===
|
|
524
|
+
t !== q && t !== R && (R = t, oe = !1);
|
|
525
|
+
} else R === q && (R = st(e, w, T, L, N), oe = !1);
|
|
526
526
|
} else R = st(e, w, T, L, N);
|
|
527
|
-
let z = 0,
|
|
528
|
-
R ===
|
|
527
|
+
let z = 0, se = 0;
|
|
528
|
+
R === q ? Ke[_] = q : (se = +!!oe, z = b >= x ? +!!E : Se(W, e, b, x, +!!E, (e) => Te(e, E)), Ke[_] = R, Je[_] = se, qe[_] = z), Ve(y, e, p, h, v, R, z, se);
|
|
529
529
|
}
|
|
530
530
|
if (n === 0) return "";
|
|
531
|
-
if (n === 1) return
|
|
532
|
-
if (n * D >
|
|
533
|
-
for (; n * D >
|
|
534
|
-
rt = new Float64Array(
|
|
531
|
+
if (n === 1) return We[0] === 0 && Ge[0] === t ? e : e.slice(We[0], Ge[0]);
|
|
532
|
+
if (n * D > tt) {
|
|
533
|
+
for (; n * D > tt;) tt <<= 1, nt--;
|
|
534
|
+
rt = new Float64Array(tt), it = new Int32Array(tt);
|
|
535
535
|
}
|
|
536
|
-
if (G >=
|
|
537
|
-
at = at + 1 | 0, at === 0 && (
|
|
536
|
+
if (G >= ke || Ee >= ke) throw Error("cn: too many distinct classes in one merge");
|
|
537
|
+
at = at + 1 | 0, at === 0 && (et.fill(0), it.fill(0), at = 1);
|
|
538
538
|
let f = !1;
|
|
539
539
|
for (let e = n - 1; e >= 0; e--) {
|
|
540
|
-
let t =
|
|
541
|
-
if (t ===
|
|
542
|
-
|
|
540
|
+
let t = Ke[e];
|
|
541
|
+
if (t === q) {
|
|
542
|
+
Ye[e] = 1;
|
|
543
543
|
continue;
|
|
544
544
|
}
|
|
545
|
-
let n =
|
|
545
|
+
let n = qe[e];
|
|
546
546
|
if (ot(n, t) === 1) {
|
|
547
|
-
|
|
547
|
+
Ye[e] = 0, f = !0;
|
|
548
548
|
continue;
|
|
549
549
|
}
|
|
550
|
-
if (
|
|
550
|
+
if (Ye[e] = 1, t < r) {
|
|
551
551
|
let r = T[t];
|
|
552
552
|
if (r >= 0) for (let e = b[r]; e < b[r + 1]; e++) ot(n, ee[e]);
|
|
553
|
-
if (
|
|
553
|
+
if (Je[e] & 1) for (let e = 0; e < te.length; e++) te[e] === t && ot(n, x[e]);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
if (!f && !u && t === c + n - 1) return e;
|
|
557
557
|
let p = "", m = 0;
|
|
558
558
|
for (; m < n;) {
|
|
559
|
-
if (!
|
|
559
|
+
if (!Ye[m]) {
|
|
560
560
|
m++;
|
|
561
561
|
continue;
|
|
562
562
|
}
|
|
563
|
-
let t =
|
|
564
|
-
for (; i < n &&
|
|
563
|
+
let t = We[m], r = Ge[m], i = m + 1;
|
|
564
|
+
for (; i < n && Ye[i] && We[i] === r + 1 && e.charCodeAt(r) === 32;) r = Ge[i], i++;
|
|
565
565
|
p.length > 0 && (p += " "), p += e.slice(t, r), m = i;
|
|
566
566
|
}
|
|
567
567
|
return p;
|
|
@@ -570,29 +570,29 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
570
570
|
}, gt = (e) => {
|
|
571
571
|
let t = dt[e];
|
|
572
572
|
if (t !== void 0) return t;
|
|
573
|
-
let n =
|
|
573
|
+
let n = Ne(e, 0, e.length), r = (n & 16383) + ut, i = X[r] === (n ^ Z) || X[r ^ lt] === (n ^ Z - 1);
|
|
574
574
|
return i && (t = ft[e], t !== void 0) ? (dt[e] = t, t) : (t = ct(e), i ? (dt[e] = t, ++Q > P && (Q = 0, ft = dt, dt = Object.create(null), $())) : (X[r] = n ^ Z, ++ht > lt && $()), t);
|
|
575
575
|
}, _t = (e) => {
|
|
576
576
|
let t = pt.get(e);
|
|
577
577
|
if (t !== void 0) return t;
|
|
578
|
-
let n =
|
|
578
|
+
let n = Ne(e, 0, e.length), r = (n & 16383) + ut, i = X[r] === (n ^ Z) || X[r ^ lt] === (n ^ Z - 1);
|
|
579
579
|
return i && (t = mt.get(e), t !== void 0) ? (pt.set(e, t), t) : (t = ct(e), i ? (pt.set(e, t), ++Q > P && (Q = 0, mt = pt, pt = /* @__PURE__ */ new Map(), $())) : (X[r] = n ^ Z, ++ht > lt && $()), t);
|
|
580
580
|
}, vt = (e) => {
|
|
581
|
-
let t =
|
|
581
|
+
let t = Ne(e, 0, e.length), n = (t & 16383) + ut;
|
|
582
582
|
return X[n] === (t ^ Z) || X[n ^ lt] === (t ^ Z - 1) || (X[n] = t ^ Z, ++ht > lt && $(), !1);
|
|
583
|
-
}, yt = P === 0 ? ct :
|
|
583
|
+
}, yt = P === 0 ? ct : Ae ? (e) => {
|
|
584
584
|
let t = pt.get(e);
|
|
585
585
|
return t === void 0 ? _t(e) : t;
|
|
586
586
|
} : gt;
|
|
587
587
|
return {
|
|
588
588
|
merge: function() {
|
|
589
|
-
return arguments.length === 1 && typeof arguments[0] == "string" ? yt(arguments[0]) : yt(
|
|
589
|
+
return arguments.length === 1 && typeof arguments[0] == "string" ? yt(arguments[0]) : yt(Ie.apply(null, arguments));
|
|
590
590
|
},
|
|
591
591
|
mergeString: yt,
|
|
592
592
|
seenBefore: P === 0 ? () => !1 : vt,
|
|
593
593
|
mergeUncached: ct
|
|
594
594
|
};
|
|
595
|
-
},
|
|
595
|
+
}, Fe = (e, t) => {
|
|
596
596
|
if (!e) return "";
|
|
597
597
|
if (typeof e == "string") return e;
|
|
598
598
|
let n = "";
|
|
@@ -601,7 +601,7 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
601
601
|
for (let e = 0; e < r.length; e++) {
|
|
602
602
|
let i = r[e];
|
|
603
603
|
if (!i) continue;
|
|
604
|
-
let a = typeof i == "string" ? i :
|
|
604
|
+
let a = typeof i == "string" ? i : Fe(i, t);
|
|
605
605
|
a && (n && (n += " "), n += a);
|
|
606
606
|
}
|
|
607
607
|
return n;
|
|
@@ -611,21 +611,21 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
611
611
|
if (typeof e == "object") for (let t in e) e[t] && (n && (n += " "), n += t);
|
|
612
612
|
}
|
|
613
613
|
return n;
|
|
614
|
-
},
|
|
614
|
+
}, J = (e, t) => {
|
|
615
615
|
let n = "";
|
|
616
616
|
for (let r = 0; r < e.length; r++) {
|
|
617
617
|
let i = e[r];
|
|
618
618
|
if (!i) continue;
|
|
619
|
-
let a = typeof i == "string" ? i :
|
|
619
|
+
let a = typeof i == "string" ? i : Fe(i, t);
|
|
620
620
|
a && (n && (n += " "), n += a);
|
|
621
621
|
}
|
|
622
622
|
return n;
|
|
623
|
-
},
|
|
624
|
-
return
|
|
625
|
-
},
|
|
623
|
+
}, Ie = function() {
|
|
624
|
+
return J(arguments, !1);
|
|
625
|
+
}, Le = 256, Re = 16, ze = 1024, Be = 4096, Ve = (e, t) => {
|
|
626
626
|
let n = t === void 0 ? () => !0 : t.seenBefore, r = t === void 0 ? e : t.mergeUncached, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = 0, s = null, c = null, l = [], u = [], d = 0, f = (t, n, r) => {
|
|
627
|
-
c === null && (c = Array(
|
|
628
|
-
let i =
|
|
627
|
+
c === null && (c = Array(Be).fill(""), l = Array(Be).fill(""), u = Array(Be).fill(""));
|
|
628
|
+
let i = Ne(t, 0, t.length) & 4094;
|
|
629
629
|
if (c[i] === t && l[i] === n) return u[i];
|
|
630
630
|
if (c[i | 1] === t && l[i | 1] === n) return u[i | 1];
|
|
631
631
|
let a = e(r ? n + " " + t : t), o = c[i] === "" ? i : i | (c[i | 1] === "" ? 1 : d++ & 1);
|
|
@@ -666,7 +666,7 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
666
666
|
let n = t[e];
|
|
667
667
|
if (n) {
|
|
668
668
|
if (typeof n != "string") {
|
|
669
|
-
if (n = t[e] =
|
|
669
|
+
if (n = t[e] = Fe(n, !0), !n) continue;
|
|
670
670
|
g = !0;
|
|
671
671
|
}
|
|
672
672
|
p < 0 && (d = n, p = e), h++;
|
|
@@ -725,12 +725,12 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
725
725
|
miss: 0,
|
|
726
726
|
skip: 0,
|
|
727
727
|
at: 0
|
|
728
|
-
}) : ++_.miss >
|
|
728
|
+
}) : ++_.miss > Re && (_.miss = Re, _.skip = ze, _.e.length = 0, _.at = 0);
|
|
729
729
|
let u = _.e;
|
|
730
|
-
u.length <
|
|
730
|
+
u.length < Le ? u.push(v) : (u[_.at] = v, _.at = _.at + 1 & 255), ++o > 1e3 && (o = 0, a = i, i = /* @__PURE__ */ new Map());
|
|
731
731
|
}
|
|
732
732
|
return s !== null && s !== v && (s.n = v), s = v, v.r;
|
|
733
|
-
}, g = (t) => Array.isArray(t) ? h(t.slice(), !1) : e(
|
|
733
|
+
}, g = (t) => Array.isArray(t) ? h(t.slice(), !1) : e(Fe(t, !0));
|
|
734
734
|
return function(t, n, r) {
|
|
735
735
|
let a = arguments.length;
|
|
736
736
|
if ((a | 1) == 3) {
|
|
@@ -787,144 +787,153 @@ var we = V("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"), Te = B(z
|
|
|
787
787
|
for (let e = 0; e < a; e++) c.push(arguments[e]);
|
|
788
788
|
return h(c, !0);
|
|
789
789
|
};
|
|
790
|
-
},
|
|
791
|
-
|
|
790
|
+
}, He = /* @__PURE__ */ Pe(ke), Y = /* @__PURE__ */ Ve(He.mergeString, He);
|
|
791
|
+
He.merge;
|
|
792
792
|
//#endregion
|
|
793
793
|
//#region src/components/ui/dropdown-menu.jsx
|
|
794
|
-
function
|
|
794
|
+
function Ue({ ...e }) {
|
|
795
795
|
return /* @__PURE__ */ a(s.Root, {
|
|
796
796
|
"data-slot": "dropdown-menu",
|
|
797
797
|
...e
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function We({ ...e }) {
|
|
801
801
|
return /* @__PURE__ */ a(s.Portal, {
|
|
802
802
|
"data-slot": "dropdown-menu-portal",
|
|
803
803
|
...e
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Ge({ ...e }) {
|
|
807
807
|
return /* @__PURE__ */ a(s.Trigger, {
|
|
808
808
|
"data-slot": "dropdown-menu-trigger",
|
|
809
809
|
...e
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
return /* @__PURE__ */ a(s.Portal, {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
812
|
+
function Ke({ align: e = "start", alignOffset: t = 0, side: n = "bottom", sideOffset: r = 4, className: i, ...o }) {
|
|
813
|
+
return /* @__PURE__ */ a(s.Portal, {
|
|
814
|
+
"data-slot": "dropdown-menu-portal",
|
|
815
|
+
children: /* @__PURE__ */ a(s.Positioner, {
|
|
816
|
+
"data-slot": "dropdown-menu-positioner",
|
|
817
|
+
className: "isolate z-1000000 bg-transparent outline-none",
|
|
818
|
+
align: e,
|
|
819
|
+
alignOffset: t,
|
|
820
|
+
side: n,
|
|
821
|
+
sideOffset: r,
|
|
822
|
+
children: /* @__PURE__ */ a(s.Popup, {
|
|
823
|
+
"data-fastr-popup": "",
|
|
824
|
+
"data-slot": "dropdown-menu-content",
|
|
825
|
+
className: Y("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden", i),
|
|
826
|
+
...o
|
|
827
|
+
})
|
|
823
828
|
})
|
|
824
|
-
})
|
|
829
|
+
});
|
|
825
830
|
}
|
|
826
|
-
function
|
|
831
|
+
function qe({ ...e }) {
|
|
827
832
|
return /* @__PURE__ */ a(s.Group, {
|
|
828
833
|
"data-slot": "dropdown-menu-group",
|
|
829
834
|
...e
|
|
830
835
|
});
|
|
831
836
|
}
|
|
832
|
-
function
|
|
837
|
+
function Je({ className: e, inset: t, ...n }) {
|
|
833
838
|
return /* @__PURE__ */ a(s.GroupLabel, {
|
|
834
839
|
"data-slot": "dropdown-menu-label",
|
|
835
840
|
"data-inset": t,
|
|
836
|
-
className:
|
|
841
|
+
className: Y("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7", e),
|
|
837
842
|
...n
|
|
838
843
|
});
|
|
839
844
|
}
|
|
840
|
-
function
|
|
845
|
+
function Ye({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
841
846
|
return /* @__PURE__ */ a(s.Item, {
|
|
842
847
|
"data-slot": "dropdown-menu-item",
|
|
843
848
|
"data-inset": t,
|
|
844
849
|
"data-variant": n,
|
|
845
|
-
className:
|
|
850
|
+
className: Y("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded px-2 py-1 text-xs outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", e),
|
|
846
851
|
...r
|
|
847
852
|
});
|
|
848
853
|
}
|
|
849
|
-
function
|
|
854
|
+
function Xe({ className: e, ...t }) {
|
|
850
855
|
return /* @__PURE__ */ a(s.Separator, {
|
|
851
856
|
"data-slot": "dropdown-menu-separator",
|
|
852
|
-
className:
|
|
857
|
+
className: Y("bg-border -mx-1 my-1 h-px", e),
|
|
853
858
|
...t
|
|
854
859
|
});
|
|
855
860
|
}
|
|
856
861
|
//#endregion
|
|
857
862
|
//#region src/components/ui/navigation-menu.jsx
|
|
858
|
-
function
|
|
863
|
+
function Ze({ align: e = "start", className: t, children: n, ...r }) {
|
|
859
864
|
return /* @__PURE__ */ o(c.Root, {
|
|
860
865
|
"data-slot": "navigation-menu",
|
|
861
|
-
className:
|
|
866
|
+
className: Y("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", t),
|
|
862
867
|
...r,
|
|
863
868
|
children: [n, /* @__PURE__ */ a(rt, { align: e })]
|
|
864
869
|
});
|
|
865
870
|
}
|
|
866
|
-
function
|
|
871
|
+
function Qe({ className: e, ...t }) {
|
|
867
872
|
return /* @__PURE__ */ a(c.List, {
|
|
868
873
|
"data-slot": "navigation-menu-list",
|
|
869
|
-
className:
|
|
874
|
+
className: Y("group flex flex-1 list-none items-center justify-center gap-1", e),
|
|
870
875
|
...t
|
|
871
876
|
});
|
|
872
877
|
}
|
|
873
|
-
function
|
|
878
|
+
function $e({ className: e, ...t }) {
|
|
874
879
|
return /* @__PURE__ */ a(c.Item, {
|
|
875
880
|
"data-slot": "navigation-menu-item",
|
|
876
|
-
className:
|
|
881
|
+
className: Y("relative", e),
|
|
877
882
|
...t
|
|
878
883
|
});
|
|
879
884
|
}
|
|
880
|
-
var
|
|
881
|
-
function
|
|
885
|
+
var et = l("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center gap-1.5 rounded-lg px-2.5 py-1.5 text-sm font-medium transition-colors outline-none hover:bg-muted focus:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted data-open:bg-muted cursor-pointer text-foreground select-none");
|
|
886
|
+
function tt({ className: e, children: t, ...n }) {
|
|
882
887
|
return /* @__PURE__ */ o(c.Trigger, {
|
|
883
888
|
"data-slot": "navigation-menu-trigger",
|
|
884
|
-
className:
|
|
889
|
+
className: Y(et(), "group", e),
|
|
885
890
|
...n,
|
|
886
|
-
children: [
|
|
887
|
-
|
|
888
|
-
" "
|
|
889
|
-
|
|
890
|
-
className: "relative top-px ml-1 size-5 -mr-1 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
|
|
891
|
-
"aria-hidden": "true"
|
|
892
|
-
})
|
|
893
|
-
]
|
|
891
|
+
children: [t, /* @__PURE__ */ a(g, {
|
|
892
|
+
className: "size-3.5 shrink-0 opacity-70 transition-transform duration-200 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
|
|
893
|
+
"aria-hidden": "true"
|
|
894
|
+
})]
|
|
894
895
|
});
|
|
895
896
|
}
|
|
896
897
|
function nt({ className: e, ...t }) {
|
|
897
898
|
return /* @__PURE__ */ a(c.Content, {
|
|
898
899
|
"data-slot": "navigation-menu-content",
|
|
899
|
-
className:
|
|
900
|
+
className: Y("h-full w-auto p-0 rounded-xl overflow-hidden", e),
|
|
900
901
|
...t
|
|
901
902
|
});
|
|
902
903
|
}
|
|
903
904
|
function rt({ className: e, side: t = "bottom", sideOffset: n = 8, align: r = "start", alignOffset: i = 0, ...o }) {
|
|
904
|
-
return /* @__PURE__ */ a(c.Portal, {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
className: "
|
|
913
|
-
|
|
905
|
+
return /* @__PURE__ */ a(c.Portal, {
|
|
906
|
+
"data-slot": "navigation-menu-portal",
|
|
907
|
+
children: /* @__PURE__ */ a(c.Positioner, {
|
|
908
|
+
"data-slot": "navigation-menu-positioner",
|
|
909
|
+
side: t,
|
|
910
|
+
sideOffset: n,
|
|
911
|
+
align: r,
|
|
912
|
+
alignOffset: i,
|
|
913
|
+
className: Y("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) bg-transparent transition-[top,left,right,bottom] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:-top-2.5 data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", e),
|
|
914
|
+
...o,
|
|
915
|
+
children: /* @__PURE__ */ a(c.Popup, {
|
|
916
|
+
"data-slot": "navigation-menu-popup",
|
|
917
|
+
className: "xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-xl bg-transparent text-popover-foreground outline-none transition-[width,height] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
918
|
+
children: /* @__PURE__ */ a(c.Viewport, {
|
|
919
|
+
"data-slot": "navigation-menu-viewport",
|
|
920
|
+
className: "relative size-full rounded-xl bg-transparent overflow-hidden"
|
|
921
|
+
})
|
|
922
|
+
})
|
|
914
923
|
})
|
|
915
|
-
})
|
|
924
|
+
});
|
|
916
925
|
}
|
|
917
926
|
function it({ className: e, ...t }) {
|
|
918
927
|
return /* @__PURE__ */ a(c.Link, {
|
|
919
928
|
"data-slot": "navigation-menu-link",
|
|
920
|
-
className:
|
|
929
|
+
className: Y("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", e),
|
|
921
930
|
...t
|
|
922
931
|
});
|
|
923
932
|
}
|
|
924
933
|
function at({ className: e, ...t }) {
|
|
925
934
|
return /* @__PURE__ */ a(c.Icon, {
|
|
926
935
|
"data-slot": "navigation-menu-indicator",
|
|
927
|
-
className:
|
|
936
|
+
className: Y("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", e),
|
|
928
937
|
...t,
|
|
929
938
|
children: /* @__PURE__ */ a("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
930
939
|
});
|
|
@@ -940,42 +949,47 @@ function ot({ ...e }) {
|
|
|
940
949
|
function st({ className: e, ...t }) {
|
|
941
950
|
return /* @__PURE__ */ a(L.Trigger, {
|
|
942
951
|
"data-slot": "popover-trigger",
|
|
943
|
-
className:
|
|
952
|
+
className: Y("w-full", e),
|
|
944
953
|
...t
|
|
945
954
|
});
|
|
946
955
|
}
|
|
947
956
|
function ct({ className: e, align: t = "center", alignOffset: n = 0, side: r = "bottom", sideOffset: i = 4, ...o }) {
|
|
948
|
-
return /* @__PURE__ */ a(L.Portal, {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
className:
|
|
957
|
-
|
|
957
|
+
return /* @__PURE__ */ a(L.Portal, {
|
|
958
|
+
"data-slot": "popover-portal",
|
|
959
|
+
children: /* @__PURE__ */ a(L.Positioner, {
|
|
960
|
+
"data-slot": "popover-positioner",
|
|
961
|
+
align: t,
|
|
962
|
+
alignOffset: n,
|
|
963
|
+
side: r,
|
|
964
|
+
sideOffset: i,
|
|
965
|
+
className: "isolate z-[1000000] bg-transparent outline-none",
|
|
966
|
+
children: /* @__PURE__ */ a(L.Popup, {
|
|
967
|
+
"data-fastr-popup": "",
|
|
968
|
+
"data-slot": "popover-content",
|
|
969
|
+
className: Y("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-[1000000] flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-xl p-1 text-xs shadow-md ring-1 outline-hidden duration-100 overflow-hidden", e),
|
|
970
|
+
...o
|
|
971
|
+
})
|
|
958
972
|
})
|
|
959
|
-
})
|
|
973
|
+
});
|
|
960
974
|
}
|
|
961
975
|
function lt({ className: e, ...t }) {
|
|
962
976
|
return /* @__PURE__ */ a("div", {
|
|
963
977
|
"data-slot": "popover-header",
|
|
964
|
-
className:
|
|
978
|
+
className: Y("flex flex-col gap-0.5 text-xs", e),
|
|
965
979
|
...t
|
|
966
980
|
});
|
|
967
981
|
}
|
|
968
982
|
function X({ className: e, ...t }) {
|
|
969
983
|
return /* @__PURE__ */ a(L.Title, {
|
|
970
984
|
"data-slot": "popover-title",
|
|
971
|
-
className:
|
|
985
|
+
className: Y("font-heading font-medium", e),
|
|
972
986
|
...t
|
|
973
987
|
});
|
|
974
988
|
}
|
|
975
989
|
function ut({ className: e, ...t }) {
|
|
976
990
|
return /* @__PURE__ */ a(L.Description, {
|
|
977
991
|
"data-slot": "popover-description",
|
|
978
|
-
className:
|
|
992
|
+
className: Y("text-muted-foreground", e),
|
|
979
993
|
...t
|
|
980
994
|
});
|
|
981
995
|
}
|
|
@@ -3227,7 +3241,9 @@ function vt({ app: e, type: r = "macro", config: s, currentApp: c = "derivatives
|
|
|
3227
3241
|
}
|
|
3228
3242
|
}, I = M && (M.sections || M.items) || [];
|
|
3229
3243
|
return /* @__PURE__ */ a("div", {
|
|
3230
|
-
|
|
3244
|
+
"data-fastr-popup": "",
|
|
3245
|
+
"data-theme": l ? "dark" : "light",
|
|
3246
|
+
className: "bg-popover text-popover-foreground border-border w-285 max-w-[96vw] rounded-xl border p-4 shadow-2xl transition-all overflow-hidden",
|
|
3231
3247
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3232
3248
|
children: /* @__PURE__ */ o("div", {
|
|
3233
3249
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-[1fr_1fr_3fr]",
|
|
@@ -3290,11 +3306,11 @@ function vt({ app: e, type: r = "macro", config: s, currentApp: c = "derivatives
|
|
|
3290
3306
|
href: n,
|
|
3291
3307
|
onClick: (t) => ae(t, n, e.onClick, e),
|
|
3292
3308
|
onMouseEnter: () => N(e),
|
|
3293
|
-
className:
|
|
3309
|
+
className: Y("flex w-full cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-left text-xs font-medium transition-all select-none sm:text-sm", t ? "bg-primary text-primary-foreground font-semibold shadow-xs" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground"),
|
|
3294
3310
|
children: [/* @__PURE__ */ o("div", {
|
|
3295
3311
|
className: "flex items-center gap-2.5",
|
|
3296
|
-
children: [$(e.icon, { className:
|
|
3297
|
-
}), /* @__PURE__ */ a(_, { className:
|
|
3312
|
+
children: [$(e.icon, { className: Y("size-4 shrink-0", t ? "text-primary-foreground" : "text-muted-foreground group-hover:text-foreground") }), /* @__PURE__ */ a("span", { children: e.label || e.title || e.name })]
|
|
3313
|
+
}), /* @__PURE__ */ a(_, { className: Y("size-3.5 transition-transform", t ? "opacity-100" : "opacity-0") })]
|
|
3298
3314
|
}, e.id);
|
|
3299
3315
|
})
|
|
3300
3316
|
})] })
|
|
@@ -3325,11 +3341,11 @@ function vt({ app: e, type: r = "macro", config: s, currentApp: c = "derivatives
|
|
|
3325
3341
|
return /* @__PURE__ */ o("a", {
|
|
3326
3342
|
href: t,
|
|
3327
3343
|
onClick: (n) => ae(n, t, e.onClick, e),
|
|
3328
|
-
className: "group border-border bg-card hover:bg-accent/
|
|
3344
|
+
className: "group border-border bg-card hover:bg-accent/70 hover:border-primary/50 flex min-h-18 cursor-pointer flex-col justify-between rounded-lg border p-3 text-left shadow-xs transition-all hover:shadow-sm",
|
|
3329
3345
|
children: [/* @__PURE__ */ o("div", {
|
|
3330
3346
|
className: "mb-1.5 flex items-start justify-between gap-1.5",
|
|
3331
3347
|
children: [/* @__PURE__ */ a("span", {
|
|
3332
|
-
className: "text-card-foreground group-hover:text-
|
|
3348
|
+
className: "text-card-foreground group-hover:text-primary line-clamp-2 text-xs leading-snug font-semibold transition-colors",
|
|
3333
3349
|
children: e.title || e.name || e.label
|
|
3334
3350
|
}), /* @__PURE__ */ a(d, { className: "text-muted-foreground group-hover:text-primary mt-0.5 size-3 shrink-0 transition-all group-hover:translate-x-0.5" })]
|
|
3335
3351
|
}), /* @__PURE__ */ a("span", {
|
|
@@ -3360,16 +3376,16 @@ function yt(e) {
|
|
|
3360
3376
|
return e;
|
|
3361
3377
|
}
|
|
3362
3378
|
}
|
|
3363
|
-
function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, uiTheme:
|
|
3364
|
-
let
|
|
3379
|
+
function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, uiTheme: f, apps: p, user: g, logout: v, theme: y, setTheme: b, currentApp: x, navigate: S, onNavigate: C, urls: D = {}, logo: O, onLogoClick: ne, categoryData: re = [], chartingCallbacks: ie = {}, products: k, extraRightContent: A, className: j }) {
|
|
3380
|
+
let M = n(() => {
|
|
3365
3381
|
let t = {
|
|
3366
3382
|
...s ? { authApiUrl: s } : {},
|
|
3367
3383
|
...l ? { authRedirectUrl: l } : {},
|
|
3368
3384
|
...u ? { profileGetter: u } : {},
|
|
3369
|
-
...
|
|
3370
|
-
...
|
|
3371
|
-
...
|
|
3372
|
-
...
|
|
3385
|
+
...f ? { uiTheme: f } : {},
|
|
3386
|
+
...p ? { apps: p } : {},
|
|
3387
|
+
...x ? { currentApp: x } : {},
|
|
3388
|
+
...D && Object.keys(D).length > 0 ? { urls: D } : {}
|
|
3373
3389
|
};
|
|
3374
3390
|
return ht({
|
|
3375
3391
|
...e || {},
|
|
@@ -3380,52 +3396,94 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3380
3396
|
s,
|
|
3381
3397
|
l,
|
|
3382
3398
|
u,
|
|
3383
|
-
d,
|
|
3384
3399
|
f,
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3400
|
+
p,
|
|
3401
|
+
x,
|
|
3402
|
+
D
|
|
3403
|
+
]), N = x || M.currentApp || "derivatives", F = (M.authApiUrl || "https://sso-api.datatokenapi.com/api").replace(/\/+$/, ""), I = (M.authRedirectUrl || M.urls?.sso || "https://sso.datatokenapi.com").replace(/\/+$/, ""), L = u || M.profileGetter, [oe, z] = i(null), [se, B] = i(!1);
|
|
3388
3404
|
t(() => {
|
|
3389
|
-
if (
|
|
3390
|
-
if (typeof
|
|
3391
|
-
|
|
3405
|
+
if (g === void 0 && M.user === void 0) {
|
|
3406
|
+
if (typeof L == "function") B(!0), Promise.resolve(L()).then((e) => {
|
|
3407
|
+
z(e?.data || e?.user || e);
|
|
3392
3408
|
}).catch((e) => {
|
|
3393
3409
|
console.warn("[GlobalHeader] profileGetter error:", e);
|
|
3394
3410
|
}).finally(() => {
|
|
3395
3411
|
B(!1);
|
|
3396
3412
|
});
|
|
3397
|
-
else if (
|
|
3413
|
+
else if (F && typeof window < "u") {
|
|
3398
3414
|
B(!0);
|
|
3399
|
-
let e =
|
|
3415
|
+
let e = F.endsWith("/api") ? `${F}/auth/me` : `${F}/api/auth/me`, t = F.endsWith("/api") ? `${F}/auth/profile` : `${F}/api/auth/profile`;
|
|
3400
3416
|
fetch(e, { credentials: "include" }).then((e) => e.ok ? e.json() : fetch(t, { credentials: "include" }).then((e) => e.ok ? e.json() : null)).then((e) => {
|
|
3401
|
-
e &&
|
|
3417
|
+
e && z(e?.data || e?.user || e);
|
|
3402
3418
|
}).catch(() => {}).finally(() => B(!1));
|
|
3403
3419
|
}
|
|
3404
3420
|
}
|
|
3405
3421
|
}, [
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3422
|
+
g,
|
|
3423
|
+
M.user,
|
|
3424
|
+
L,
|
|
3425
|
+
F
|
|
3410
3426
|
]);
|
|
3411
|
-
let V =
|
|
3412
|
-
let t = V?.
|
|
3413
|
-
return t.find((
|
|
3414
|
-
let
|
|
3415
|
-
return n.includes("scanner") && (
|
|
3427
|
+
let V = g === void 0 ? M.user === void 0 ? oe : M.user : g, ce = (e) => {
|
|
3428
|
+
let t = V?.all_apps || V?.apps || [], n = (e || "").toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
3429
|
+
return t.find((t) => {
|
|
3430
|
+
let r = (t.code || "").toLowerCase().replace(/[^a-z0-9]/g, ""), i = (t.name || "").toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
3431
|
+
return n.includes("scanner") && (r.includes("scanner") || i.includes("scanner")) || n.includes("chart") && (r.includes("chart") || i.includes("chart")) || n.includes("deriv") && (r.includes("deriv") || i.includes("deriv")) || n.includes("macro") && (r.includes("macro") || i.includes("macro")) || n.includes("xray") && (r.includes("xray") || i.includes("xray") || i.includes("stockxray") || i.includes("stock-x-ray")) || i === n || r === n || t.id === e;
|
|
3416
3432
|
});
|
|
3417
|
-
},
|
|
3418
|
-
|
|
3419
|
-
|
|
3433
|
+
}, H = () => {
|
|
3434
|
+
if (typeof window > "u") return !1;
|
|
3435
|
+
let e = document.documentElement, t = document.body;
|
|
3436
|
+
if (e.classList.contains("dark") || t?.classList.contains("dark")) return !0;
|
|
3437
|
+
if (e.classList.contains("light") || t?.classList.contains("light")) return !1;
|
|
3438
|
+
let n = e.getAttribute("data-theme") || e.getAttribute("data-mode") || e.getAttribute("data-color-mode") || t?.getAttribute("data-theme") || t?.getAttribute("data-mode");
|
|
3439
|
+
if (n === "dark") return !0;
|
|
3440
|
+
if (n === "light") return !1;
|
|
3441
|
+
if (t) {
|
|
3442
|
+
let e = window.getComputedStyle(t).backgroundColor;
|
|
3443
|
+
if (e && e !== "rgba(0, 0, 0, 0)" && e !== "transparent") {
|
|
3444
|
+
let t = e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
3445
|
+
if (t) {
|
|
3446
|
+
let e = parseInt(t[1], 10), n = parseInt(t[2], 10), r = parseInt(t[3], 10);
|
|
3447
|
+
return (e * 299 + n * 587 + r * 114) / 1e3 < 128;
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
3452
|
+
}, [le, ue] = i(() => typeof window < "u" ? localStorage.getItem("theme") || M.uiTheme || "system" : M.uiTheme || "system"), U = y === void 0 ? le : y, de = (e) => {
|
|
3453
|
+
b ? b(e) : (ue(e), typeof window < "u" && (localStorage.setItem("theme", e), e === "dark" ? document.documentElement.classList.add("dark") : e === "light" ? document.documentElement.classList.remove("dark") : H() ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark")));
|
|
3454
|
+
}, [fe, pe] = i(() => H());
|
|
3420
3455
|
t(() => {
|
|
3421
3456
|
if (typeof window > "u") return;
|
|
3422
|
-
let e =
|
|
3423
|
-
|
|
3457
|
+
let e = () => pe(H());
|
|
3458
|
+
e();
|
|
3459
|
+
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3460
|
+
t.addEventListener("change", e);
|
|
3461
|
+
let n = new MutationObserver(e);
|
|
3462
|
+
return n.observe(document.documentElement, {
|
|
3463
|
+
attributes: !0,
|
|
3464
|
+
attributeFilter: [
|
|
3465
|
+
"class",
|
|
3466
|
+
"data-theme",
|
|
3467
|
+
"data-mode",
|
|
3468
|
+
"data-color-mode",
|
|
3469
|
+
"style"
|
|
3470
|
+
]
|
|
3471
|
+
}), document.body && n.observe(document.body, {
|
|
3472
|
+
attributes: !0,
|
|
3473
|
+
attributeFilter: [
|
|
3474
|
+
"class",
|
|
3475
|
+
"data-theme",
|
|
3476
|
+
"data-mode",
|
|
3477
|
+
"style"
|
|
3478
|
+
]
|
|
3479
|
+
}), () => {
|
|
3480
|
+
t.removeEventListener("change", e), n.disconnect();
|
|
3481
|
+
};
|
|
3424
3482
|
}, []);
|
|
3425
|
-
let
|
|
3426
|
-
let t =
|
|
3427
|
-
return t && t.id ? `${
|
|
3428
|
-
},
|
|
3483
|
+
let me = U === "dark" || U !== "light" && fe, [he, ge] = i(!1), [_e, ve] = i(""), [ye, be] = i(null), xe = r(null), Se = M.urls?.profile || `${I}/profile`, W = M.urls?.purchase || `${I}/purchase`, Ce = M.urls?.landing || "http://localhost:3005", G = (e) => {
|
|
3484
|
+
let t = ce(e);
|
|
3485
|
+
return t && t.id ? `${W}?app_id=${t.id}` : `${W}?app=${e}`;
|
|
3486
|
+
}, we = (e) => {
|
|
3429
3487
|
if (!V || V?.role === "superadmin" || V?.is_superadmin) return !0;
|
|
3430
3488
|
let t = (e || "").toLowerCase().replace(/[^a-z0-9]/g, ""), n = V?.subscriptions;
|
|
3431
3489
|
if (n && !Array.isArray(n) && typeof n == "object") for (let [e, r] of Object.entries(n)) {
|
|
@@ -3442,13 +3500,13 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3442
3500
|
if (t === "active" || t === "expiring_soon") return !0;
|
|
3443
3501
|
}
|
|
3444
3502
|
}
|
|
3445
|
-
let r =
|
|
3503
|
+
let r = ce(e);
|
|
3446
3504
|
return r ? [
|
|
3447
3505
|
"superadmin",
|
|
3448
3506
|
"admin",
|
|
3449
3507
|
"staff"
|
|
3450
3508
|
].includes(r.role) ? !0 : r.subscription_status === "active" || r.subscription_status === "expiring_soon" || r.is_subscribed === !0 : V?.subscription?.status === "active" || V?.subscription?.status === "expiring_soon";
|
|
3451
|
-
},
|
|
3509
|
+
}, Te = () => {
|
|
3452
3510
|
let e = V?.fullName || V?.full_name || V?.name;
|
|
3453
3511
|
if (e && typeof e == "string" && e.trim() && !e.includes("@")) return e.trim();
|
|
3454
3512
|
if (V?.email && typeof V.email == "string") {
|
|
@@ -3456,34 +3514,53 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3456
3514
|
if (e) return e.split(/\s+/).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
|
|
3457
3515
|
}
|
|
3458
3516
|
return e || "User";
|
|
3459
|
-
},
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
e
|
|
3464
|
-
|
|
3465
|
-
if (
|
|
3466
|
-
|
|
3517
|
+
}, K = n(() => {
|
|
3518
|
+
if (Array.isArray(V?.subscriptions) && V.subscriptions.length > 0) return V.subscriptions.find((e) => {
|
|
3519
|
+
let t = (e.app_name || e.name || "").toLowerCase().replace(/[^a-z0-9]/g, ""), n = (N || "").toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
3520
|
+
return n.includes("scanner") && t.includes("scanner") || n.includes("chart") && t.includes("chart") || n.includes("deriv") && t.includes("deriv") || n.includes("macro") && t.includes("macro") || n.includes("xray") && (t.includes("xray") || t.includes("stockxray")) || t === n;
|
|
3521
|
+
}) || V.subscriptions.find((e) => e.status === "active") || V.subscriptions[0];
|
|
3522
|
+
if (V?.subscription) return V.subscription;
|
|
3523
|
+
if (Array.isArray(V?.all_apps) && V.all_apps.length > 0) {
|
|
3524
|
+
let e = V.all_apps.find((e) => {
|
|
3525
|
+
let t = (e.name || "").toLowerCase().replace(/[^a-z0-9]/g, ""), n = (N || "").toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
3526
|
+
return (n.includes("scanner") && t.includes("scanner") || n.includes("chart") && t.includes("chart") || n.includes("deriv") && t.includes("deriv") || n.includes("macro") && t.includes("macro") || n.includes("xray") && (t.includes("xray") || t.includes("stockxray")) || t === n) && e.is_subscribed;
|
|
3527
|
+
}) || V.all_apps.find((e) => e.is_subscribed);
|
|
3528
|
+
if (e) return {
|
|
3529
|
+
plan_name: e.plan_name,
|
|
3530
|
+
status: e.subscription_status || (e.is_subscribed ? "active" : "inactive"),
|
|
3531
|
+
expiry_date: e.subscription_expiry,
|
|
3532
|
+
app_name: e.name
|
|
3533
|
+
};
|
|
3534
|
+
}
|
|
3535
|
+
return null;
|
|
3536
|
+
}, [V, N]), Ee = (e, t, n) => {
|
|
3537
|
+
C ? C(e, t, n) : S ? S(e) : window.location.assign(e);
|
|
3538
|
+
}, De = () => {
|
|
3539
|
+
let e = v || M.logout;
|
|
3540
|
+
e ? e() : window.location.assign(`${I}/logout`);
|
|
3541
|
+
}, Oe = n(() => {
|
|
3542
|
+
if (k) return k;
|
|
3543
|
+
let e = M.apps || {};
|
|
3467
3544
|
return (Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => ({
|
|
3468
3545
|
id: e,
|
|
3469
3546
|
...t
|
|
3470
3547
|
}))).map((e) => {
|
|
3471
|
-
let t = e.id, n = e.name || e.label || t, r = e.hasMegaMenu !== !1 && !!(e.pages?.length || e.categories?.length), i =
|
|
3548
|
+
let t = e.id, n = e.name || e.label || t, r = e.hasMegaMenu !== !1 && !!(e.pages?.length || e.categories?.length), i = ce(t), a = e.url || M.urls?.[t] || i?.app_url || "", o = gt({
|
|
3472
3549
|
baseUrl: a,
|
|
3473
3550
|
route: e.route || "/",
|
|
3474
3551
|
href: e.href,
|
|
3475
3552
|
queryParams: e.queryParams,
|
|
3476
3553
|
params: e.params,
|
|
3477
3554
|
currentTheme: U,
|
|
3478
|
-
appendTheme:
|
|
3479
|
-
themeParamName:
|
|
3480
|
-
isCurrentApp: t ===
|
|
3555
|
+
appendTheme: M.appendThemeParam !== !1,
|
|
3556
|
+
themeParamName: M.themeParamName || "theme",
|
|
3557
|
+
isCurrentApp: t === N
|
|
3481
3558
|
});
|
|
3482
3559
|
return {
|
|
3483
3560
|
id: t,
|
|
3484
3561
|
name: n,
|
|
3485
3562
|
icon: e.icon,
|
|
3486
|
-
isActive: t ===
|
|
3563
|
+
isActive: t === N,
|
|
3487
3564
|
hasMegaMenu: r,
|
|
3488
3565
|
href: o,
|
|
3489
3566
|
rawApp: {
|
|
@@ -3493,107 +3570,110 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3493
3570
|
};
|
|
3494
3571
|
});
|
|
3495
3572
|
}, [
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3573
|
+
k,
|
|
3574
|
+
M.apps,
|
|
3575
|
+
M.urls,
|
|
3576
|
+
M.appendThemeParam,
|
|
3577
|
+
M.themeParamName,
|
|
3578
|
+
N,
|
|
3502
3579
|
U,
|
|
3503
3580
|
V
|
|
3504
|
-
]),
|
|
3581
|
+
]), ke = (e, t) => {
|
|
3505
3582
|
let n = t.rawApp || {};
|
|
3506
3583
|
if (n.onClick) {
|
|
3507
3584
|
e.preventDefault(), n.onClick(n);
|
|
3508
3585
|
return;
|
|
3509
3586
|
}
|
|
3510
|
-
if (t.id !==
|
|
3511
|
-
e.preventDefault(),
|
|
3587
|
+
if (t.id !== N && !we(t.id)) {
|
|
3588
|
+
e.preventDefault(), ve(""), window.location.assign(G(t.id));
|
|
3512
3589
|
return;
|
|
3513
3590
|
}
|
|
3514
|
-
t.id === "derivatives" ? (e.preventDefault(),
|
|
3591
|
+
t.id === "derivatives" ? (e.preventDefault(), ve((e) => e === "derivatives" ? "" : "derivatives"), Ee("/positions", n, t)) : t.id === N && (C || S) && (e.preventDefault(), ve(""), Ee(t.href, n, t));
|
|
3515
3592
|
};
|
|
3516
3593
|
return /* @__PURE__ */ o("header", {
|
|
3517
|
-
|
|
3594
|
+
"data-fastr-header": "",
|
|
3595
|
+
"data-theme": me ? "dark" : "light",
|
|
3596
|
+
className: Y("bg-background sticky top-0 z-50 w-full border-b", j),
|
|
3518
3597
|
children: [/* @__PURE__ */ o("div", {
|
|
3519
3598
|
className: "relative flex h-10 w-full items-center justify-between gap-4 px-3 sm:h-12 sm:px-4",
|
|
3520
3599
|
children: [/* @__PURE__ */ o("div", {
|
|
3521
3600
|
className: "no-scrollbar flex items-center gap-4 overflow-x-auto py-1 lg:gap-6",
|
|
3522
3601
|
children: [/* @__PURE__ */ a("a", {
|
|
3523
|
-
href:
|
|
3602
|
+
href: Ce,
|
|
3524
3603
|
className: "mr-1 flex shrink-0 cursor-pointer items-center gap-1.5 select-none",
|
|
3525
3604
|
onClick: (e) => {
|
|
3526
|
-
e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1 ||
|
|
3605
|
+
e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1 || ne && (e.preventDefault(), ne());
|
|
3527
3606
|
},
|
|
3528
|
-
children:
|
|
3607
|
+
children: O || /* @__PURE__ */ a(R, {
|
|
3529
3608
|
className: "h-9 w-auto sm:h-10",
|
|
3530
|
-
isDarkMode:
|
|
3609
|
+
isDarkMode: me
|
|
3531
3610
|
})
|
|
3532
3611
|
}), /* @__PURE__ */ o(c.Root, {
|
|
3533
|
-
value:
|
|
3534
|
-
onValueChange:
|
|
3612
|
+
value: _e,
|
|
3613
|
+
onValueChange: ve,
|
|
3535
3614
|
"data-slot": "navigation-menu",
|
|
3536
3615
|
className: "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
3537
|
-
children: [/* @__PURE__ */ a(
|
|
3616
|
+
children: [/* @__PURE__ */ a(Qe, {
|
|
3538
3617
|
className: "gap-0",
|
|
3539
|
-
children:
|
|
3618
|
+
children: Oe.map((e, t) => {
|
|
3540
3619
|
let n = e.rawApp || e;
|
|
3541
|
-
return e.hasMegaMenu ? /* @__PURE__ */ o(
|
|
3620
|
+
return e.hasMegaMenu ? /* @__PURE__ */ o($e, {
|
|
3542
3621
|
value: e.id,
|
|
3543
|
-
children: [/* @__PURE__ */ o(
|
|
3544
|
-
ref: t === 0 ?
|
|
3545
|
-
className:
|
|
3546
|
-
children: [$(e.icon, { className: "size-4" }), /* @__PURE__ */ a("span", { children: e.name })]
|
|
3622
|
+
children: [/* @__PURE__ */ o(tt, {
|
|
3623
|
+
ref: t === 0 ? xe : void 0,
|
|
3624
|
+
className: Y(e.isActive && "bg-primary text-primary-foreground font-semibold hover:bg-primary/90 hover:text-primary-foreground data-popup-open:bg-primary data-popup-open:text-primary-foreground data-open:bg-primary data-open:text-primary-foreground"),
|
|
3625
|
+
children: [$(e.icon, { className: "size-4 shrink-0" }), /* @__PURE__ */ a("span", { children: e.name })]
|
|
3547
3626
|
}), /* @__PURE__ */ a(nt, {
|
|
3548
3627
|
className: "p-0 rounded-xl overflow-hidden",
|
|
3549
3628
|
children: /* @__PURE__ */ a(vt, {
|
|
3550
3629
|
app: n,
|
|
3551
3630
|
type: e.id,
|
|
3552
|
-
config:
|
|
3553
|
-
currentApp:
|
|
3554
|
-
isDarkMode:
|
|
3555
|
-
isSubscribed:
|
|
3556
|
-
purchaseUrl:
|
|
3557
|
-
categoryData:
|
|
3631
|
+
config: M,
|
|
3632
|
+
currentApp: N,
|
|
3633
|
+
isDarkMode: me,
|
|
3634
|
+
isSubscribed: we(e.id),
|
|
3635
|
+
purchaseUrl: G(e.id),
|
|
3636
|
+
categoryData: re,
|
|
3558
3637
|
theme: U,
|
|
3559
|
-
onClose: () =>
|
|
3560
|
-
onNavigate:
|
|
3561
|
-
urls:
|
|
3562
|
-
...
|
|
3638
|
+
onClose: () => ve(""),
|
|
3639
|
+
onNavigate: Ee,
|
|
3640
|
+
urls: M.urls,
|
|
3641
|
+
...ie
|
|
3563
3642
|
})
|
|
3564
3643
|
})]
|
|
3565
|
-
}, e.id) : /* @__PURE__ */ a(
|
|
3644
|
+
}, e.id) : /* @__PURE__ */ a($e, {
|
|
3566
3645
|
value: e.id,
|
|
3567
3646
|
children: /* @__PURE__ */ a(it, {
|
|
3568
3647
|
asChild: !0,
|
|
3569
3648
|
children: /* @__PURE__ */ o("a", {
|
|
3570
|
-
ref: t === 0 ?
|
|
3649
|
+
ref: t === 0 ? xe : void 0,
|
|
3571
3650
|
href: e.href || "/",
|
|
3572
3651
|
onClick: (t) => {
|
|
3573
|
-
t.metaKey || t.ctrlKey || t.shiftKey || t.button === 1 ||
|
|
3652
|
+
t.metaKey || t.ctrlKey || t.shiftKey || t.button === 1 || ke(t, e);
|
|
3574
3653
|
},
|
|
3575
|
-
className:
|
|
3576
|
-
children: [$(e.icon, { className: "size-4" }), /* @__PURE__ */ a("span", { children: e.name })]
|
|
3654
|
+
className: Y(et(), "cursor-pointer", e.isActive && "bg-primary text-primary-foreground font-semibold hover:bg-primary/90 hover:text-primary-foreground"),
|
|
3655
|
+
children: [$(e.icon, { className: "size-4 shrink-0" }), /* @__PURE__ */ a("span", { children: e.name })]
|
|
3577
3656
|
})
|
|
3578
3657
|
})
|
|
3579
3658
|
}, e.id);
|
|
3580
3659
|
})
|
|
3581
3660
|
}), /* @__PURE__ */ a(rt, {
|
|
3582
3661
|
align: "start",
|
|
3583
|
-
anchor:
|
|
3662
|
+
anchor: xe
|
|
3584
3663
|
})]
|
|
3585
3664
|
})]
|
|
3586
3665
|
}), /* @__PURE__ */ o("div", {
|
|
3587
3666
|
className: "flex shrink-0 items-center gap-2",
|
|
3588
3667
|
children: [
|
|
3589
|
-
|
|
3590
|
-
/* @__PURE__ */ o(
|
|
3668
|
+
A,
|
|
3669
|
+
/* @__PURE__ */ o(Ue, { children: [/* @__PURE__ */ a(Ge, {
|
|
3591
3670
|
className: "hover:bg-accent hover:text-accent-foreground text-muted-foreground flex size-8 cursor-pointer items-center justify-center rounded-lg transition-colors sm:size-8.5",
|
|
3592
3671
|
title: `Theme: ${U === "system" ? "System Default" : U === "dark" ? "Dark" : "Light"}`,
|
|
3593
|
-
children: a(U === "system" ? T :
|
|
3594
|
-
}), /* @__PURE__ */ a(
|
|
3672
|
+
children: a(U === "system" ? T : me ? P : E, { className: "size-4.5" })
|
|
3673
|
+
}), /* @__PURE__ */ a(Ke, {
|
|
3595
3674
|
align: "end",
|
|
3596
3675
|
className: "w-44",
|
|
3676
|
+
"data-theme": me ? "dark" : "light",
|
|
3597
3677
|
children: [
|
|
3598
3678
|
{
|
|
3599
3679
|
id: "light",
|
|
@@ -3612,8 +3692,8 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3612
3692
|
}
|
|
3613
3693
|
].map((e) => {
|
|
3614
3694
|
let t = e.icon, n = U === e.id;
|
|
3615
|
-
return /* @__PURE__ */ o(
|
|
3616
|
-
onClick: () =>
|
|
3695
|
+
return /* @__PURE__ */ o(Ye, {
|
|
3696
|
+
onClick: () => de(e.id),
|
|
3617
3697
|
className: "cursor-pointer justify-between",
|
|
3618
3698
|
children: [/* @__PURE__ */ o("div", {
|
|
3619
3699
|
className: "flex items-center gap-2",
|
|
@@ -3623,8 +3703,8 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3623
3703
|
})
|
|
3624
3704
|
})] }),
|
|
3625
3705
|
/* @__PURE__ */ o(ot, {
|
|
3626
|
-
open:
|
|
3627
|
-
onOpenChange:
|
|
3706
|
+
open: he,
|
|
3707
|
+
onOpenChange: ge,
|
|
3628
3708
|
children: [/* @__PURE__ */ a(st, {
|
|
3629
3709
|
className: "hover:bg-accent hover:text-accent-foreground text-foreground flex cursor-pointer justify-center items-center size-10! gap-2 rounded-full p-0 transition-colors select-none",
|
|
3630
3710
|
children: /* @__PURE__ */ o("div", {
|
|
@@ -3633,7 +3713,7 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3633
3713
|
className: "border-border/60 bg-muted flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-full border",
|
|
3634
3714
|
children: V?.profile_image_url ? /* @__PURE__ */ a("img", {
|
|
3635
3715
|
src: V.profile_image_url,
|
|
3636
|
-
alt:
|
|
3716
|
+
alt: Te(),
|
|
3637
3717
|
className: "size-full object-cover",
|
|
3638
3718
|
referrerPolicy: "no-referrer",
|
|
3639
3719
|
onError: (e) => {
|
|
@@ -3643,8 +3723,9 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3643
3723
|
}), V && /* @__PURE__ */ a("span", { className: "border-background absolute bottom-0 right-0 size-2.5 rounded-full border-2 bg-emerald-500" })]
|
|
3644
3724
|
})
|
|
3645
3725
|
}), /* @__PURE__ */ o(ct, {
|
|
3646
|
-
className: "border-border bg-popover text-popover-foreground w-84 gap-0! rounded-xl p-0 shadow-2xl",
|
|
3726
|
+
className: "border-border bg-popover text-popover-foreground w-84 gap-0! rounded-xl p-0 shadow-2xl overflow-hidden",
|
|
3647
3727
|
align: "end",
|
|
3728
|
+
"data-theme": me ? "dark" : "light",
|
|
3648
3729
|
children: [
|
|
3649
3730
|
/* @__PURE__ */ o("div", {
|
|
3650
3731
|
className: "border-border/60 bg-muted/20 border-b p-3",
|
|
@@ -3656,7 +3737,7 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3656
3737
|
className: "border-border bg-muted flex size-14 items-center justify-center overflow-hidden rounded-full border shadow-xs",
|
|
3657
3738
|
children: V?.profile_image_url ? /* @__PURE__ */ a("img", {
|
|
3658
3739
|
src: V.profile_image_url,
|
|
3659
|
-
alt:
|
|
3740
|
+
alt: Te(),
|
|
3660
3741
|
className: "size-full object-cover",
|
|
3661
3742
|
referrerPolicy: "no-referrer"
|
|
3662
3743
|
}) : /* @__PURE__ */ a(ae, { className: "text-muted-foreground size-6" })
|
|
@@ -3667,7 +3748,7 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3667
3748
|
className: "flex items-center justify-between gap-1.5",
|
|
3668
3749
|
children: [/* @__PURE__ */ a("p", {
|
|
3669
3750
|
className: "text-foreground truncate text-sm font-bold tracking-tight",
|
|
3670
|
-
children:
|
|
3751
|
+
children: Te()
|
|
3671
3752
|
}), /* @__PURE__ */ a("span", {
|
|
3672
3753
|
className: "border-border bg-muted text-muted-foreground shrink-0 rounded-md border px-1.5 py-0.5 text-[10px] font-semibold capitalize",
|
|
3673
3754
|
children: V?.is_superadmin ? "Superadmin" : V?.role || "User"
|
|
@@ -3678,32 +3759,32 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3678
3759
|
})]
|
|
3679
3760
|
})]
|
|
3680
3761
|
}), /* @__PURE__ */ o("div", {
|
|
3681
|
-
className: " bg-primary/5 mt-3 rounded-lg p-3",
|
|
3762
|
+
className: "border-border/60 bg-primary/5 mt-3 rounded-lg border p-3",
|
|
3682
3763
|
children: [/* @__PURE__ */ o("div", {
|
|
3683
3764
|
className: "flex items-center justify-between",
|
|
3684
3765
|
children: [/* @__PURE__ */ a("div", {
|
|
3685
3766
|
className: "flex items-center gap-1.5",
|
|
3686
3767
|
children: /* @__PURE__ */ a("span", {
|
|
3687
3768
|
className: "text-foreground text-xs font-bold",
|
|
3688
|
-
children:
|
|
3769
|
+
children: K?.plan_name ? `${K.plan_name} Plan` : V?.is_superadmin ? "Superadmin Access" : "Fastr Pro Member"
|
|
3689
3770
|
})
|
|
3690
3771
|
}), /* @__PURE__ */ o("span", {
|
|
3691
3772
|
className: "inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] text-emerald-600 dark:text-emerald-400",
|
|
3692
|
-
children: [/* @__PURE__ */ a(h, { className: "size-3 text-emerald-500" }),
|
|
3773
|
+
children: [/* @__PURE__ */ a(h, { className: "size-3 text-emerald-500" }), K?.status ? K.status.toUpperCase() : "ACTIVE"]
|
|
3693
3774
|
})]
|
|
3694
|
-
}),
|
|
3775
|
+
}), (K?.expiry_date || K?.expiry) && /* @__PURE__ */ o("div", {
|
|
3695
3776
|
className: "text-muted-foreground mt-2 flex items-center justify-between text-[11px]",
|
|
3696
3777
|
children: [/* @__PURE__ */ o("span", {
|
|
3697
3778
|
className: "flex items-center gap-1",
|
|
3698
3779
|
children: [
|
|
3699
3780
|
/* @__PURE__ */ a(m, { className: "text-muted-foreground/70 size-3" }),
|
|
3700
3781
|
"Renews: ",
|
|
3701
|
-
yt(
|
|
3782
|
+
yt(K.expiry_date || K.expiry)
|
|
3702
3783
|
]
|
|
3703
|
-
}), /* @__PURE__ */
|
|
3704
|
-
href:
|
|
3784
|
+
}), /* @__PURE__ */ o("a", {
|
|
3785
|
+
href: W,
|
|
3705
3786
|
className: "text-primary hover:text-primary/80 font-semibold transition-colors hover:underline",
|
|
3706
|
-
children: "Manage
|
|
3787
|
+
children: ["Manage ", /* @__PURE__ */ a(d, { className: "size-2.5 inline" })]
|
|
3707
3788
|
})]
|
|
3708
3789
|
})]
|
|
3709
3790
|
})]
|
|
@@ -3718,31 +3799,31 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3718
3799
|
}), /* @__PURE__ */ o("span", {
|
|
3719
3800
|
className: "text-muted-foreground text-[10px]",
|
|
3720
3801
|
children: [
|
|
3721
|
-
|
|
3802
|
+
Oe.filter((e) => we(e.id)).length,
|
|
3722
3803
|
"/",
|
|
3723
|
-
|
|
3804
|
+
Oe.length,
|
|
3724
3805
|
" Active"
|
|
3725
3806
|
]
|
|
3726
3807
|
})]
|
|
3727
3808
|
}), /* @__PURE__ */ a("div", {
|
|
3728
3809
|
className: "grid grid-cols-2 gap-1.5",
|
|
3729
|
-
children:
|
|
3730
|
-
let t =
|
|
3810
|
+
children: Oe.map((e) => {
|
|
3811
|
+
let t = we(e.id);
|
|
3731
3812
|
return /* @__PURE__ */ o("a", {
|
|
3732
3813
|
href: e.href,
|
|
3733
3814
|
onClick: (n) => {
|
|
3734
3815
|
if (!(n.metaKey || n.ctrlKey || n.shiftKey || n.button === 1)) {
|
|
3735
|
-
if (e.id ===
|
|
3736
|
-
n.preventDefault(),
|
|
3816
|
+
if (e.id === N) {
|
|
3817
|
+
n.preventDefault(), ge(!1);
|
|
3737
3818
|
return;
|
|
3738
3819
|
}
|
|
3739
|
-
t || (n.preventDefault(),
|
|
3820
|
+
t || (n.preventDefault(), ge(!1), window.location.assign(G(e.id)));
|
|
3740
3821
|
}
|
|
3741
3822
|
},
|
|
3742
|
-
className:
|
|
3823
|
+
className: Y("flex items-center justify-between rounded-lg border p-2 text-xs transition-all", e.isActive ? "border-primary/10 bg-primary/10 text-primary shadow-2xs font-bold" : t ? "border-border/50 bg-card text-foreground hover:bg-accent hover:border-border" : "border-border/60 bg-muted/30 text-muted-foreground hover:bg-muted/60 border-dashed"),
|
|
3743
3824
|
children: [/* @__PURE__ */ o("div", {
|
|
3744
3825
|
className: "flex min-w-0 items-center gap-1.5",
|
|
3745
|
-
children: [$(e.icon, { className:
|
|
3826
|
+
children: [$(e.icon, { className: Y("size-3.5 shrink-0", e.isActive ? "text-primary" : t ? "text-foreground" : "text-muted-foreground") }), /* @__PURE__ */ a("span", {
|
|
3746
3827
|
className: "truncate",
|
|
3747
3828
|
children: e.name
|
|
3748
3829
|
})]
|
|
@@ -3757,14 +3838,14 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3757
3838
|
/* @__PURE__ */ o("div", {
|
|
3758
3839
|
className: "space-y-1 p-2",
|
|
3759
3840
|
children: [/* @__PURE__ */ o("a", {
|
|
3760
|
-
href:
|
|
3841
|
+
href: Se,
|
|
3761
3842
|
className: "hover:bg-accent hover:text-accent-foreground text-foreground group flex w-full items-center justify-between rounded-lg px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
3762
3843
|
children: [/* @__PURE__ */ o("div", {
|
|
3763
3844
|
className: "flex items-center gap-2",
|
|
3764
3845
|
children: [/* @__PURE__ */ a(ae, { className: "text-muted-foreground group-hover:text-foreground size-4 transition-colors" }), /* @__PURE__ */ a("span", { children: "Profile & Account Settings" })]
|
|
3765
3846
|
}), /* @__PURE__ */ a(_, { className: "text-muted-foreground/60 group-hover:text-foreground size-3.5 transition-transform group-hover:translate-x-0.5" })]
|
|
3766
3847
|
}), /* @__PURE__ */ o("a", {
|
|
3767
|
-
href:
|
|
3848
|
+
href: W,
|
|
3768
3849
|
className: "hover:bg-accent hover:text-accent-foreground text-foreground group flex w-full items-center justify-between rounded-lg px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
3769
3850
|
children: [/* @__PURE__ */ o("div", {
|
|
3770
3851
|
className: "flex items-center gap-2",
|
|
@@ -3775,7 +3856,7 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3775
3856
|
/* @__PURE__ */ a("div", {
|
|
3776
3857
|
className: "border-border/60 my-1 border-t p-2",
|
|
3777
3858
|
children: /* @__PURE__ */ a("button", {
|
|
3778
|
-
onClick:
|
|
3859
|
+
onClick: De,
|
|
3779
3860
|
className: "text-destructive hover:bg-destructive/10 flex w-full cursor-pointer items-center justify-between rounded-lg px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
3780
3861
|
children: /* @__PURE__ */ o("div", {
|
|
3781
3862
|
className: "flex items-center gap-2",
|
|
@@ -3788,9 +3869,11 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3788
3869
|
})
|
|
3789
3870
|
]
|
|
3790
3871
|
})]
|
|
3791
|
-
}),
|
|
3872
|
+
}), ye && /* @__PURE__ */ a("div", {
|
|
3873
|
+
"data-fastr-popup": "",
|
|
3874
|
+
"data-theme": me ? "dark" : "light",
|
|
3792
3875
|
className: "animate-in fade-in fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4 backdrop-blur-xs duration-200",
|
|
3793
|
-
onClick: () =>
|
|
3876
|
+
onClick: () => be(null),
|
|
3794
3877
|
children: /* @__PURE__ */ o("div", {
|
|
3795
3878
|
className: "animate-in zoom-in-95 bg-card text-card-foreground border-border flex w-full max-w-md transform flex-col items-center rounded-xl border p-8 text-center shadow-2xl transition-all duration-200 sm:max-w-lg sm:p-10",
|
|
3796
3879
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -3818,20 +3901,20 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3818
3901
|
}),
|
|
3819
3902
|
/* @__PURE__ */ o("h2", {
|
|
3820
3903
|
className: "text-foreground mb-2 text-xl font-bold tracking-tight sm:text-2xl",
|
|
3821
|
-
children: [
|
|
3904
|
+
children: [ye.name, " isn't included in your current subscription."]
|
|
3822
3905
|
}),
|
|
3823
3906
|
/* @__PURE__ */ o("p", {
|
|
3824
3907
|
className: "text-muted-foreground mb-8 max-w-sm text-sm sm:text-base",
|
|
3825
3908
|
children: [
|
|
3826
3909
|
"Add ",
|
|
3827
|
-
|
|
3910
|
+
ye.name,
|
|
3828
3911
|
" to your subscription to unlock full access."
|
|
3829
3912
|
]
|
|
3830
3913
|
}),
|
|
3831
3914
|
/* @__PURE__ */ a("button", {
|
|
3832
3915
|
type: "button",
|
|
3833
3916
|
onClick: () => {
|
|
3834
|
-
let e = V?.apps?.find((e) => (e.code || "").toLowerCase().includes(
|
|
3917
|
+
let e = V?.apps?.find((e) => (e.code || "").toLowerCase().includes(ye.id.toLowerCase()) || (e.name || "").toLowerCase().includes(ye.name.toLowerCase())), t = e?.id ? `${W}?app_id=${e.id}` : `${W}?app=${ye.id}`;
|
|
3835
3918
|
window.location.assign(t);
|
|
3836
3919
|
},
|
|
3837
3920
|
className: "bg-primary text-primary-foreground hover:bg-primary/90 w-full max-w-xs cursor-pointer rounded-xl px-6 py-3 text-sm font-medium shadow-sm transition-all sm:text-base",
|
|
@@ -3839,7 +3922,7 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3839
3922
|
}),
|
|
3840
3923
|
/* @__PURE__ */ a("button", {
|
|
3841
3924
|
type: "button",
|
|
3842
|
-
onClick: () =>
|
|
3925
|
+
onClick: () => be(null),
|
|
3843
3926
|
className: "text-muted-foreground hover:text-foreground mt-5 cursor-pointer text-sm font-medium transition-colors",
|
|
3844
3927
|
children: "Maybe Later"
|
|
3845
3928
|
})
|
|
@@ -3852,6 +3935,6 @@ function bt({ config: e, authApiUrl: s, authRedirectUrl: l, profileGetter: u, ui
|
|
|
3852
3935
|
//#region src/index.js
|
|
3853
3936
|
var xt = bt;
|
|
3854
3937
|
//#endregion
|
|
3855
|
-
export {
|
|
3938
|
+
export { Ue as DropdownMenu, Ke as DropdownMenuContent, qe as DropdownMenuGroup, Ye as DropdownMenuItem, Je as DropdownMenuLabel, We as DropdownMenuPortal, Xe as DropdownMenuSeparator, Ge as DropdownMenuTrigger, R as FasterProLogo, bt as GlobalHeader, vt as GlobalMegaMenu, Ze as NavigationMenu, nt as NavigationMenuContent, at as NavigationMenuIndicator, $e as NavigationMenuItem, it as NavigationMenuLink, Qe as NavigationMenuList, rt as NavigationMenuPositioner, tt as NavigationMenuTrigger, ot as Popover, ct as PopoverContent, ut as PopoverDescription, lt as PopoverHeader, X as PopoverTitle, st as PopoverTrigger, gt as buildItemUrl, dt as chartingCategories, Y as cn, ht as createHeaderConfig, xt as default, Q as defaultHeaderConfig, mt as derivativesCategories, pt as macroPulseCategories, et as navigationMenuTriggerStyle, $ as renderIcon, ft as scannerCategories, Z as stockXRayCategories, _t as withThemeParam };
|
|
3856
3939
|
|
|
3857
3940
|
//# sourceMappingURL=index.js.map
|