@eodash/eodash 5.0.0-alpha.2.15 → 5.0.0-alpha.2.17

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.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/core/client/composables/EodashMap.js +296 -0
  3. package/core/client/composables/index.js +15 -4
  4. package/core/client/eodash.js +7 -2
  5. package/core/client/plugins/axios.js +8 -0
  6. package/core/client/store/Actions.js +32 -11
  7. package/core/client/store/States.js +8 -1
  8. package/core/client/store/stac.js +59 -6
  9. package/core/client/types.d.ts +6 -2
  10. package/core/client/utils/createLayers.js +187 -49
  11. package/core/client/utils/eodashSTAC.js +147 -31
  12. package/core/client/utils/helpers.js +259 -13
  13. package/core/client/utils/states.js +17 -0
  14. package/dist/client/{DashboardLayout-DQE4aB6e.js → DashboardLayout-BR1lU9ER.js} +2 -2
  15. package/dist/client/{DynamicWebComponent-TrDsJuF8.js → DynamicWebComponent-7z8VFsrZ.js} +1 -1
  16. package/dist/client/EodashDatePicker-o7ZOYIHL.js +259 -0
  17. package/dist/client/EodashItemFilter-lNjVkidr.js +7651 -0
  18. package/dist/client/EodashLayerControl-B0N8_XmX.js +24485 -0
  19. package/dist/client/{EodashMap--2y6XErO.js → EodashMap-DFT2R2Rk.js} +22298 -24006
  20. package/dist/client/{EodashMapBtns-BSf3iUAb.js → EodashMapBtns-CoGjVl8Y.js} +2 -2
  21. package/dist/client/{ExportState-BTONkMIz.js → ExportState-Dwv37MRw.js} +171 -158
  22. package/dist/client/{Footer-B7JDXdxT.js → Footer-DuScuHSx.js} +59 -57
  23. package/dist/client/{Header-Dlumetq0.js → Header-C4Y0u0E5.js} +70 -70
  24. package/dist/client/{IframeWrapper-DRjSqhFx.js → IframeWrapper-D1TfK4xH.js} +1 -1
  25. package/dist/client/{MobileLayout-9z2X_rmU.js → MobileLayout-C-b8DIFO.js} +43 -41
  26. package/dist/client/{PopUp-CXbMBYGh.js → PopUp-DBMZX3l3.js} +5 -5
  27. package/dist/client/{VImg-Dgk5tryv.js → VImg-bAMQHnMM.js} +33 -31
  28. package/dist/client/VMain-Df5VMG9r.js +38 -0
  29. package/dist/client/VOverlay-D5GzAYRY.js +973 -0
  30. package/dist/client/{WidgetsContainer-CHK_3dlD.js → WidgetsContainer-yZDmY6_u.js} +1 -1
  31. package/dist/client/asWebComponent-DhR2_xlP.js +24492 -0
  32. package/dist/client/eo-dash.js +1 -1
  33. package/dist/client/{forwardRefs-OX_5lLJW.js → forwardRefs-C0MQxvur.js} +1 -1
  34. package/dist/client/{index-B_KfD-iF.js → index-qNWeBhRh.js} +23 -23
  35. package/dist/client/{lerc-B4lXefGh-CplqAh1B.js → lerc-B4lXefGh-CsL-d8wY.js} +1 -1
  36. package/dist/client/{ssrBoot-BZTPJZkq.js → ssrBoot-Xmkz8T49.js} +1 -1
  37. package/dist/client/style.css +2 -2
  38. package/dist/client/{transition-Dq8XIV_D.js → transition-DRzZPWIN.js} +1 -1
  39. package/dist/client/{webfontloader-qotgY98I.js → webfontloader-CqD-lAx-.js} +1 -1
  40. package/dist/node/cli.js +1 -1
  41. package/package.json +27 -22
  42. package/widgets/EodashDatePicker.vue +104 -100
  43. package/widgets/EodashItemFilter.vue +2 -0
  44. package/widgets/EodashLayerControl.vue +69 -2
  45. package/widgets/EodashMap.vue +31 -214
  46. package/widgets/ExportState.vue +12 -9
  47. package/dist/client/EodashDatePicker-CkA9rHp6.js +0 -252
  48. package/dist/client/EodashItemFilter-Bp0lcvbI.js +0 -10121
  49. package/dist/client/EodashLayerControl-lfLYqyeU.js +0 -20963
  50. package/dist/client/VMain-Ubv9jyyL.js +0 -39
  51. package/dist/client/VOverlay-CqZC2CbA.js +0 -972
  52. package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
  53. package/dist/client/asWebComponent-Ddg71BJk.js +0 -20451
  54. package/dist/client/helpers-BCawTwFg.js +0 -1390
@@ -1,1390 +0,0 @@
1
- import { aP as ee, aQ as oe, aH as le } from "./asWebComponent-Ddg71BJk.js";
2
- import { c as W, g as he } from "./_commonjsHelpers-DaMA6jEr.js";
3
- var ce = { exports: {} }, G = { exports: {} };
4
- /*! https://mths.be/punycode v1.4.0 by @mathias */
5
- G.exports;
6
- var ie;
7
- function pe() {
8
- return ie || (ie = 1, function(h, l) {
9
- (function(v) {
10
- var b = l && !l.nodeType && l, p = h && !h.nodeType && h, m = typeof W == "object" && W;
11
- (m.global === m || m.window === m || m.self === m) && (v = m);
12
- var n, d = 2147483647, s = 36, P = 1, z = 26, S = 38, y = 700, M = 72, U = 128, F = "-", E = /^xn--/, N = /[^\x20-\x7E]/, $ = /[\x2E\u3002\uFF0E\uFF61]/g, C = {
13
- overflow: "Overflow: input needs wider integers to process",
14
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
15
- "invalid-input": "Invalid input"
16
- }, L = s - P, j = Math.floor, T = String.fromCharCode, H;
17
- function D(c) {
18
- throw new RangeError(C[c]);
19
- }
20
- function J(c, f) {
21
- for (var g = c.length, w = []; g--; )
22
- w[g] = f(c[g]);
23
- return w;
24
- }
25
- function K(c, f) {
26
- var g = c.split("@"), w = "";
27
- g.length > 1 && (w = g[0] + "@", c = g[1]), c = c.replace($, ".");
28
- var _ = c.split("."), x = J(_, f).join(".");
29
- return w + x;
30
- }
31
- function X(c) {
32
- for (var f = [], g = 0, w = c.length, _, x; g < w; )
33
- _ = c.charCodeAt(g++), _ >= 55296 && _ <= 56319 && g < w ? (x = c.charCodeAt(g++), (x & 64512) == 56320 ? f.push(((_ & 1023) << 10) + (x & 1023) + 65536) : (f.push(_), g--)) : f.push(_);
34
- return f;
35
- }
36
- function Y(c) {
37
- return J(c, function(f) {
38
- var g = "";
39
- return f > 65535 && (f -= 65536, g += T(f >>> 10 & 1023 | 55296), f = 56320 | f & 1023), g += T(f), g;
40
- }).join("");
41
- }
42
- function e(c) {
43
- return c - 48 < 10 ? c - 22 : c - 65 < 26 ? c - 65 : c - 97 < 26 ? c - 97 : s;
44
- }
45
- function r(c, f) {
46
- return c + 22 + 75 * (c < 26) - ((f != 0) << 5);
47
- }
48
- function t(c, f, g) {
49
- var w = 0;
50
- for (c = g ? j(c / y) : c >> 1, c += j(c / f); c > L * z >> 1; w += s)
51
- c = j(c / L);
52
- return j(w + (L + 1) * c / (c + S));
53
- }
54
- function o(c) {
55
- var f = [], g = c.length, w, _ = 0, x = U, k = M, I, q, A, B, Q, R, O, V, Z;
56
- for (I = c.lastIndexOf(F), I < 0 && (I = 0), q = 0; q < I; ++q)
57
- c.charCodeAt(q) >= 128 && D("not-basic"), f.push(c.charCodeAt(q));
58
- for (A = I > 0 ? I + 1 : 0; A < g; ) {
59
- for (B = _, Q = 1, R = s; A >= g && D("invalid-input"), O = e(c.charCodeAt(A++)), (O >= s || O > j((d - _) / Q)) && D("overflow"), _ += O * Q, V = R <= k ? P : R >= k + z ? z : R - k, !(O < V); R += s)
60
- Z = s - V, Q > j(d / Z) && D("overflow"), Q *= Z;
61
- w = f.length + 1, k = t(_ - B, w, B == 0), j(_ / w) > d - x && D("overflow"), x += j(_ / w), _ %= w, f.splice(_++, 0, x);
62
- }
63
- return Y(f);
64
- }
65
- function i(c) {
66
- var f, g, w, _, x, k, I, q, A, B, Q, R = [], O, V, Z, re;
67
- for (c = X(c), O = c.length, f = U, g = 0, x = M, k = 0; k < O; ++k)
68
- Q = c[k], Q < 128 && R.push(T(Q));
69
- for (w = _ = R.length, _ && R.push(F); w < O; ) {
70
- for (I = d, k = 0; k < O; ++k)
71
- Q = c[k], Q >= f && Q < I && (I = Q);
72
- for (V = w + 1, I - f > j((d - g) / V) && D("overflow"), g += (I - f) * V, f = I, k = 0; k < O; ++k)
73
- if (Q = c[k], Q < f && ++g > d && D("overflow"), Q == f) {
74
- for (q = g, A = s; B = A <= x ? P : A >= x + z ? z : A - x, !(q < B); A += s)
75
- re = q - B, Z = s - B, R.push(
76
- T(r(B + re % Z, 0))
77
- ), q = j(re / Z);
78
- R.push(T(r(q, 0))), x = t(g, V, w == _), g = 0, ++w;
79
- }
80
- ++g, ++f;
81
- }
82
- return R.join("");
83
- }
84
- function a(c) {
85
- return K(c, function(f) {
86
- return E.test(f) ? o(f.slice(4).toLowerCase()) : f;
87
- });
88
- }
89
- function u(c) {
90
- return K(c, function(f) {
91
- return N.test(f) ? "xn--" + i(f) : f;
92
- });
93
- }
94
- if (n = {
95
- /**
96
- * A string representing the current Punycode.js version number.
97
- * @memberOf punycode
98
- * @type String
99
- */
100
- version: "1.3.2",
101
- /**
102
- * An object of methods to convert from JavaScript's internal character
103
- * representation (UCS-2) to Unicode code points, and back.
104
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
105
- * @memberOf punycode
106
- * @type Object
107
- */
108
- ucs2: {
109
- decode: X,
110
- encode: Y
111
- },
112
- decode: o,
113
- encode: i,
114
- toASCII: u,
115
- toUnicode: a
116
- }, b && p)
117
- if (h.exports == b)
118
- p.exports = n;
119
- else
120
- for (H in n)
121
- n.hasOwnProperty(H) && (b[H] = n[H]);
122
- else
123
- v.punycode = n;
124
- })(W);
125
- }(G, G.exports)), G.exports;
126
- }
127
- var te = { exports: {} };
128
- /*!
129
- * URI.js - Mutating URLs
130
- * IPv6 Support
131
- *
132
- * Version: 1.19.11
133
- *
134
- * Author: Rodney Rehm
135
- * Web: http://medialize.github.io/URI.js/
136
- *
137
- * Licensed under
138
- * MIT License http://www.opensource.org/licenses/mit-license
139
- *
140
- */
141
- var se;
142
- function de() {
143
- return se || (se = 1, function(h) {
144
- (function(l, v) {
145
- h.exports ? h.exports = v() : l.IPv6 = v(l);
146
- })(W, function(l) {
147
- var v = l && l.IPv6;
148
- function b(m) {
149
- var n = m.toLowerCase(), d = n.split(":"), s = d.length, P = 8;
150
- d[0] === "" && d[1] === "" && d[2] === "" ? (d.shift(), d.shift()) : d[0] === "" && d[1] === "" ? d.shift() : d[s - 1] === "" && d[s - 2] === "" && d.pop(), s = d.length, d[s - 1].indexOf(".") !== -1 && (P = 7);
151
- var z;
152
- for (z = 0; z < s && d[z] !== ""; z++)
153
- ;
154
- if (z < P)
155
- for (d.splice(z, 1, "0000"); d.length < P; )
156
- d.splice(z, 0, "0000");
157
- for (var S, y = 0; y < P; y++) {
158
- S = d[y].split("");
159
- for (var M = 0; M < 3 && (S[0] === "0" && S.length > 1); M++)
160
- S.splice(0, 1);
161
- d[y] = S.join("");
162
- }
163
- var U = -1, F = 0, E = 0, N = -1, $ = !1;
164
- for (y = 0; y < P; y++)
165
- $ ? d[y] === "0" ? E += 1 : ($ = !1, E > F && (U = N, F = E)) : d[y] === "0" && ($ = !0, N = y, E = 1);
166
- E > F && (U = N, F = E), F > 1 && d.splice(U, F, ""), s = d.length;
167
- var C = "";
168
- for (d[0] === "" && (C = ":"), y = 0; y < s && (C += d[y], y !== s - 1); y++)
169
- C += ":";
170
- return d[s - 1] === "" && (C += ":"), C;
171
- }
172
- function p() {
173
- return l.IPv6 === this && (l.IPv6 = v), this;
174
- }
175
- return {
176
- best: b,
177
- noConflict: p
178
- };
179
- });
180
- }(te)), te.exports;
181
- }
182
- var ne = { exports: {} };
183
- /*!
184
- * URI.js - Mutating URLs
185
- * Second Level Domain (SLD) Support
186
- *
187
- * Version: 1.19.11
188
- *
189
- * Author: Rodney Rehm
190
- * Web: http://medialize.github.io/URI.js/
191
- *
192
- * Licensed under
193
- * MIT License http://www.opensource.org/licenses/mit-license
194
- *
195
- */
196
- var ae;
197
- function ge() {
198
- return ae || (ae = 1, function(h) {
199
- (function(l, v) {
200
- h.exports ? h.exports = v() : l.SecondLevelDomains = v(l);
201
- })(W, function(l) {
202
- var v = l && l.SecondLevelDomains, b = {
203
- // list of known Second Level Domains
204
- // converted list of SLDs from https://github.com/gavingmiller/second-level-domains
205
- // ----
206
- // publicsuffix.org is more current and actually used by a couple of browsers internally.
207
- // downside is it also contains domains like "dyndns.org" - which is fine for the security
208
- // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js
209
- // ----
210
- list: {
211
- ac: " com gov mil net org ",
212
- ae: " ac co gov mil name net org pro sch ",
213
- af: " com edu gov net org ",
214
- al: " com edu gov mil net org ",
215
- ao: " co ed gv it og pb ",
216
- ar: " com edu gob gov int mil net org tur ",
217
- at: " ac co gv or ",
218
- au: " asn com csiro edu gov id net org ",
219
- ba: " co com edu gov mil net org rs unbi unmo unsa untz unze ",
220
- bb: " biz co com edu gov info net org store tv ",
221
- bh: " biz cc com edu gov info net org ",
222
- bn: " com edu gov net org ",
223
- bo: " com edu gob gov int mil net org tv ",
224
- br: " adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",
225
- bs: " com edu gov net org ",
226
- bz: " du et om ov rg ",
227
- ca: " ab bc mb nb nf nl ns nt nu on pe qc sk yk ",
228
- ck: " biz co edu gen gov info net org ",
229
- cn: " ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",
230
- co: " com edu gov mil net nom org ",
231
- cr: " ac c co ed fi go or sa ",
232
- cy: " ac biz com ekloges gov ltd name net org parliament press pro tm ",
233
- do: " art com edu gob gov mil net org sld web ",
234
- dz: " art asso com edu gov net org pol ",
235
- ec: " com edu fin gov info med mil net org pro ",
236
- eg: " com edu eun gov mil name net org sci ",
237
- er: " com edu gov ind mil net org rochest w ",
238
- es: " com edu gob nom org ",
239
- et: " biz com edu gov info name net org ",
240
- fj: " ac biz com info mil name net org pro ",
241
- fk: " ac co gov net nom org ",
242
- fr: " asso com f gouv nom prd presse tm ",
243
- gg: " co net org ",
244
- gh: " com edu gov mil org ",
245
- gn: " ac com gov net org ",
246
- gr: " com edu gov mil net org ",
247
- gt: " com edu gob ind mil net org ",
248
- gu: " com edu gov net org ",
249
- hk: " com edu gov idv net org ",
250
- hu: " 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",
251
- id: " ac co go mil net or sch web ",
252
- il: " ac co gov idf k12 muni net org ",
253
- in: " ac co edu ernet firm gen gov i ind mil net nic org res ",
254
- iq: " com edu gov i mil net org ",
255
- ir: " ac co dnssec gov i id net org sch ",
256
- it: " edu gov ",
257
- je: " co net org ",
258
- jo: " com edu gov mil name net org sch ",
259
- jp: " ac ad co ed go gr lg ne or ",
260
- ke: " ac co go info me mobi ne or sc ",
261
- kh: " com edu gov mil net org per ",
262
- ki: " biz com de edu gov info mob net org tel ",
263
- km: " asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",
264
- kn: " edu gov net org ",
265
- kr: " ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",
266
- kw: " com edu gov net org ",
267
- ky: " com edu gov net org ",
268
- kz: " com edu gov mil net org ",
269
- lb: " com edu gov net org ",
270
- lk: " assn com edu gov grp hotel int ltd net ngo org sch soc web ",
271
- lr: " com edu gov net org ",
272
- lv: " asn com conf edu gov id mil net org ",
273
- ly: " com edu gov id med net org plc sch ",
274
- ma: " ac co gov m net org press ",
275
- mc: " asso tm ",
276
- me: " ac co edu gov its net org priv ",
277
- mg: " com edu gov mil nom org prd tm ",
278
- mk: " com edu gov inf name net org pro ",
279
- ml: " com edu gov net org presse ",
280
- mn: " edu gov org ",
281
- mo: " com edu gov net org ",
282
- mt: " com edu gov net org ",
283
- mv: " aero biz com coop edu gov info int mil museum name net org pro ",
284
- mw: " ac co com coop edu gov int museum net org ",
285
- mx: " com edu gob net org ",
286
- my: " com edu gov mil name net org sch ",
287
- nf: " arts com firm info net other per rec store web ",
288
- ng: " biz com edu gov mil mobi name net org sch ",
289
- ni: " ac co com edu gob mil net nom org ",
290
- np: " com edu gov mil net org ",
291
- nr: " biz com edu gov info net org ",
292
- om: " ac biz co com edu gov med mil museum net org pro sch ",
293
- pe: " com edu gob mil net nom org sld ",
294
- ph: " com edu gov i mil net ngo org ",
295
- pk: " biz com edu fam gob gok gon gop gos gov net org web ",
296
- pl: " art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",
297
- pr: " ac biz com edu est gov info isla name net org pro prof ",
298
- ps: " com edu gov net org plo sec ",
299
- pw: " belau co ed go ne or ",
300
- ro: " arts com firm info nom nt org rec store tm www ",
301
- rs: " ac co edu gov in org ",
302
- sb: " com edu gov net org ",
303
- sc: " com edu gov net org ",
304
- sh: " co com edu gov net nom org ",
305
- sl: " com edu gov net org ",
306
- st: " co com consulado edu embaixada gov mil net org principe saotome store ",
307
- sv: " com edu gob org red ",
308
- sz: " ac co org ",
309
- tr: " av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",
310
- tt: " aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",
311
- tw: " club com ebiz edu game gov idv mil net org ",
312
- mu: " ac co com gov net or org ",
313
- mz: " ac co edu gov org ",
314
- na: " co com ",
315
- nz: " ac co cri geek gen govt health iwi maori mil net org parliament school ",
316
- pa: " abo ac com edu gob ing med net nom org sld ",
317
- pt: " com edu gov int net nome org publ ",
318
- py: " com edu gov mil net org ",
319
- qa: " com edu gov mil net org ",
320
- re: " asso com nom ",
321
- ru: " ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",
322
- rw: " ac co com edu gouv gov int mil net ",
323
- sa: " com edu gov med net org pub sch ",
324
- sd: " com edu gov info med net org tv ",
325
- se: " a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",
326
- sg: " com edu gov idn net org per ",
327
- sn: " art com edu gouv org perso univ ",
328
- sy: " com edu gov mil net news org ",
329
- th: " ac co go in mi net or ",
330
- tj: " ac biz co com edu go gov info int mil name net nic org test web ",
331
- tn: " agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",
332
- tz: " ac co go ne or ",
333
- ua: " biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",
334
- ug: " ac co go ne or org sc ",
335
- uk: " ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",
336
- us: " dni fed isa kids nsn ",
337
- uy: " com edu gub mil net org ",
338
- ve: " co com edu gob info mil net org web ",
339
- vi: " co com k12 net org ",
340
- vn: " ac biz com edu gov health info int name net org pro ",
341
- ye: " co com gov ltd me net org plc ",
342
- yu: " ac co edu gov org ",
343
- za: " ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",
344
- zm: " ac co com edu gov net org sch ",
345
- // https://en.wikipedia.org/wiki/CentralNic#Second-level_domains
346
- com: "ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",
347
- net: "gb jp se uk ",
348
- org: "ae",
349
- de: "com "
350
- },
351
- // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost
352
- // in both performance and memory footprint. No initialization required.
353
- // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4
354
- // Following methods use lastIndexOf() rather than array.split() in order
355
- // to avoid any memory allocations.
356
- has: function(p) {
357
- var m = p.lastIndexOf(".");
358
- if (m <= 0 || m >= p.length - 1)
359
- return !1;
360
- var n = p.lastIndexOf(".", m - 1);
361
- if (n <= 0 || n >= m - 1)
362
- return !1;
363
- var d = b.list[p.slice(m + 1)];
364
- return d ? d.indexOf(" " + p.slice(n + 1, m) + " ") >= 0 : !1;
365
- },
366
- is: function(p) {
367
- var m = p.lastIndexOf(".");
368
- if (m <= 0 || m >= p.length - 1)
369
- return !1;
370
- var n = p.lastIndexOf(".", m - 1);
371
- if (n >= 0)
372
- return !1;
373
- var d = b.list[p.slice(m + 1)];
374
- return d ? d.indexOf(" " + p.slice(0, m) + " ") >= 0 : !1;
375
- },
376
- get: function(p) {
377
- var m = p.lastIndexOf(".");
378
- if (m <= 0 || m >= p.length - 1)
379
- return null;
380
- var n = p.lastIndexOf(".", m - 1);
381
- if (n <= 0 || n >= m - 1)
382
- return null;
383
- var d = b.list[p.slice(m + 1)];
384
- return !d || d.indexOf(" " + p.slice(n + 1, m) + " ") < 0 ? null : p.slice(n + 1);
385
- },
386
- noConflict: function() {
387
- return l.SecondLevelDomains === this && (l.SecondLevelDomains = v), this;
388
- }
389
- };
390
- return b;
391
- });
392
- }(ne)), ne.exports;
393
- }
394
- /*!
395
- * URI.js - Mutating URLs
396
- *
397
- * Version: 1.19.11
398
- *
399
- * Author: Rodney Rehm
400
- * Web: http://medialize.github.io/URI.js/
401
- *
402
- * Licensed under
403
- * MIT License http://www.opensource.org/licenses/mit-license
404
- *
405
- */
406
- (function(h) {
407
- (function(l, v) {
408
- h.exports ? h.exports = v(pe(), de(), ge()) : l.URI = v(l.punycode, l.IPv6, l.SecondLevelDomains, l);
409
- })(W, function(l, v, b, p) {
410
- var m = p && p.URI;
411
- function n(e, r) {
412
- var t = arguments.length >= 1, o = arguments.length >= 2;
413
- if (!(this instanceof n))
414
- return t ? o ? new n(e, r) : new n(e) : new n();
415
- if (e === void 0) {
416
- if (t)
417
- throw new TypeError("undefined is not a valid argument for URI");
418
- typeof location < "u" ? e = location.href + "" : e = "";
419
- }
420
- if (e === null && t)
421
- throw new TypeError("null is not a valid argument for URI");
422
- return this.href(e), r !== void 0 ? this.absoluteTo(r) : this;
423
- }
424
- function d(e) {
425
- return /^[0-9]+$/.test(e);
426
- }
427
- n.version = "1.19.11";
428
- var s = n.prototype, P = Object.prototype.hasOwnProperty;
429
- function z(e) {
430
- return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
431
- }
432
- function S(e) {
433
- return e === void 0 ? "Undefined" : String(Object.prototype.toString.call(e)).slice(8, -1);
434
- }
435
- function y(e) {
436
- return S(e) === "Array";
437
- }
438
- function M(e, r) {
439
- var t = {}, o, i;
440
- if (S(r) === "RegExp")
441
- t = null;
442
- else if (y(r))
443
- for (o = 0, i = r.length; o < i; o++)
444
- t[r[o]] = !0;
445
- else
446
- t[r] = !0;
447
- for (o = 0, i = e.length; o < i; o++) {
448
- var a = t && t[e[o]] !== void 0 || !t && r.test(e[o]);
449
- a && (e.splice(o, 1), i--, o--);
450
- }
451
- return e;
452
- }
453
- function U(e, r) {
454
- var t, o;
455
- if (y(r)) {
456
- for (t = 0, o = r.length; t < o; t++)
457
- if (!U(e, r[t]))
458
- return !1;
459
- return !0;
460
- }
461
- var i = S(r);
462
- for (t = 0, o = e.length; t < o; t++)
463
- if (i === "RegExp") {
464
- if (typeof e[t] == "string" && e[t].match(r))
465
- return !0;
466
- } else if (e[t] === r)
467
- return !0;
468
- return !1;
469
- }
470
- function F(e, r) {
471
- if (!y(e) || !y(r) || e.length !== r.length)
472
- return !1;
473
- e.sort(), r.sort();
474
- for (var t = 0, o = e.length; t < o; t++)
475
- if (e[t] !== r[t])
476
- return !1;
477
- return !0;
478
- }
479
- function E(e) {
480
- var r = /^\/+|\/+$/g;
481
- return e.replace(r, "");
482
- }
483
- n._parts = function() {
484
- return {
485
- protocol: null,
486
- username: null,
487
- password: null,
488
- hostname: null,
489
- urn: null,
490
- port: null,
491
- path: null,
492
- query: null,
493
- fragment: null,
494
- // state
495
- preventInvalidHostname: n.preventInvalidHostname,
496
- duplicateQueryParameters: n.duplicateQueryParameters,
497
- escapeQuerySpace: n.escapeQuerySpace
498
- };
499
- }, n.preventInvalidHostname = !1, n.duplicateQueryParameters = !1, n.escapeQuerySpace = !0, n.protocol_expression = /^[a-z][a-z0-9.+-]*$/i, n.idn_expression = /[^a-z0-9\._-]/i, n.punycode_expression = /(xn--)/i, n.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, n.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/, n.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig, n.findUri = {
500
- // valid "scheme://" or "www."
501
- start: /\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,
502
- // everything up to the next whitespace
503
- end: /[\s\r\n]|$/,
504
- // trim trailing punctuation captured by end RegExp
505
- trim: /[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,
506
- // balanced parens inclusion (), [], {}, <>
507
- parens: /(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g
508
- }, n.leading_whitespace_expression = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, n.ascii_tab_whitespace = /[\u0009\u000A\u000D]+/g, n.defaultPorts = {
509
- http: "80",
510
- https: "443",
511
- ftp: "21",
512
- gopher: "70",
513
- ws: "80",
514
- wss: "443"
515
- }, n.hostProtocols = [
516
- "http",
517
- "https"
518
- ], n.invalid_hostname_characters = /[^a-zA-Z0-9\.\-:_]/, n.domAttributes = {
519
- a: "href",
520
- blockquote: "cite",
521
- link: "href",
522
- base: "href",
523
- script: "src",
524
- form: "action",
525
- img: "src",
526
- area: "href",
527
- iframe: "src",
528
- embed: "src",
529
- source: "src",
530
- track: "src",
531
- input: "src",
532
- // but only if type="image"
533
- audio: "src",
534
- video: "src"
535
- }, n.getDomAttribute = function(e) {
536
- if (!(!e || !e.nodeName)) {
537
- var r = e.nodeName.toLowerCase();
538
- if (!(r === "input" && e.type !== "image"))
539
- return n.domAttributes[r];
540
- }
541
- };
542
- function N(e) {
543
- return escape(e);
544
- }
545
- function $(e) {
546
- return encodeURIComponent(e).replace(/[!'()*]/g, N).replace(/\*/g, "%2A");
547
- }
548
- n.encode = $, n.decode = decodeURIComponent, n.iso8859 = function() {
549
- n.encode = escape, n.decode = unescape;
550
- }, n.unicode = function() {
551
- n.encode = $, n.decode = decodeURIComponent;
552
- }, n.characters = {
553
- pathname: {
554
- encode: {
555
- // RFC3986 2.1: For consistency, URI producers and normalizers should
556
- // use uppercase hexadecimal digits for all percent-encodings.
557
- expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,
558
- map: {
559
- // -._~!'()*
560
- "%24": "$",
561
- "%26": "&",
562
- "%2B": "+",
563
- "%2C": ",",
564
- "%3B": ";",
565
- "%3D": "=",
566
- "%3A": ":",
567
- "%40": "@"
568
- }
569
- },
570
- decode: {
571
- expression: /[\/\?#]/g,
572
- map: {
573
- "/": "%2F",
574
- "?": "%3F",
575
- "#": "%23"
576
- }
577
- }
578
- },
579
- reserved: {
580
- encode: {
581
- // RFC3986 2.1: For consistency, URI producers and normalizers should
582
- // use uppercase hexadecimal digits for all percent-encodings.
583
- expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,
584
- map: {
585
- // gen-delims
586
- "%3A": ":",
587
- "%2F": "/",
588
- "%3F": "?",
589
- "%23": "#",
590
- "%5B": "[",
591
- "%5D": "]",
592
- "%40": "@",
593
- // sub-delims
594
- "%21": "!",
595
- "%24": "$",
596
- "%26": "&",
597
- "%27": "'",
598
- "%28": "(",
599
- "%29": ")",
600
- "%2A": "*",
601
- "%2B": "+",
602
- "%2C": ",",
603
- "%3B": ";",
604
- "%3D": "="
605
- }
606
- }
607
- },
608
- urnpath: {
609
- // The characters under `encode` are the characters called out by RFC 2141 as being acceptable
610
- // for usage in a URN. RFC2141 also calls out "-", ".", and "_" as acceptable characters, but
611
- // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also
612
- // note that the colon character is not featured in the encoding map; this is because URI.js
613
- // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it
614
- // should not appear unencoded in a segment itself.
615
- // See also the note above about RFC3986 and capitalalized hex digits.
616
- encode: {
617
- expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,
618
- map: {
619
- "%21": "!",
620
- "%24": "$",
621
- "%27": "'",
622
- "%28": "(",
623
- "%29": ")",
624
- "%2A": "*",
625
- "%2B": "+",
626
- "%2C": ",",
627
- "%3B": ";",
628
- "%3D": "=",
629
- "%40": "@"
630
- }
631
- },
632
- // These characters are the characters called out by RFC2141 as "reserved" characters that
633
- // should never appear in a URN, plus the colon character (see note above).
634
- decode: {
635
- expression: /[\/\?#:]/g,
636
- map: {
637
- "/": "%2F",
638
- "?": "%3F",
639
- "#": "%23",
640
- ":": "%3A"
641
- }
642
- }
643
- }
644
- }, n.encodeQuery = function(e, r) {
645
- var t = n.encode(e + "");
646
- return r === void 0 && (r = n.escapeQuerySpace), r ? t.replace(/%20/g, "+") : t;
647
- }, n.decodeQuery = function(e, r) {
648
- e += "", r === void 0 && (r = n.escapeQuerySpace);
649
- try {
650
- return n.decode(r ? e.replace(/\+/g, "%20") : e);
651
- } catch {
652
- return e;
653
- }
654
- };
655
- var C = { encode: "encode", decode: "decode" }, L, j = function(e, r) {
656
- return function(t) {
657
- try {
658
- return n[r](t + "").replace(n.characters[e][r].expression, function(o) {
659
- return n.characters[e][r].map[o];
660
- });
661
- } catch {
662
- return t;
663
- }
664
- };
665
- };
666
- for (L in C)
667
- n[L + "PathSegment"] = j("pathname", C[L]), n[L + "UrnPathSegment"] = j("urnpath", C[L]);
668
- var T = function(e, r, t) {
669
- return function(o) {
670
- var i;
671
- t ? i = function(f) {
672
- return n[r](n[t](f));
673
- } : i = n[r];
674
- for (var a = (o + "").split(e), u = 0, c = a.length; u < c; u++)
675
- a[u] = i(a[u]);
676
- return a.join(e);
677
- };
678
- };
679
- n.decodePath = T("/", "decodePathSegment"), n.decodeUrnPath = T(":", "decodeUrnPathSegment"), n.recodePath = T("/", "encodePathSegment", "decode"), n.recodeUrnPath = T(":", "encodeUrnPathSegment", "decode"), n.encodeReserved = j("reserved", "encode"), n.parse = function(e, r) {
680
- var t;
681
- return r || (r = {
682
- preventInvalidHostname: n.preventInvalidHostname
683
- }), e = e.replace(n.leading_whitespace_expression, ""), e = e.replace(n.ascii_tab_whitespace, ""), t = e.indexOf("#"), t > -1 && (r.fragment = e.substring(t + 1) || null, e = e.substring(0, t)), t = e.indexOf("?"), t > -1 && (r.query = e.substring(t + 1) || null, e = e.substring(0, t)), e = e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i, "$1://"), e = e.replace(/^[/\\]{2,}/i, "//"), e.substring(0, 2) === "//" ? (r.protocol = null, e = e.substring(2), e = n.parseAuthority(e, r)) : (t = e.indexOf(":"), t > -1 && (r.protocol = e.substring(0, t) || null, r.protocol && !r.protocol.match(n.protocol_expression) ? r.protocol = void 0 : e.substring(t + 1, t + 3).replace(/\\/g, "/") === "//" ? (e = e.substring(t + 3), e = n.parseAuthority(e, r)) : (e = e.substring(t + 1), r.urn = !0))), r.path = e, r;
684
- }, n.parseHost = function(e, r) {
685
- e || (e = ""), e = e.replace(/\\/g, "/");
686
- var t = e.indexOf("/"), o, i;
687
- if (t === -1 && (t = e.length), e.charAt(0) === "[")
688
- o = e.indexOf("]"), r.hostname = e.substring(1, o) || null, r.port = e.substring(o + 2, t) || null, r.port === "/" && (r.port = null);
689
- else {
690
- var a = e.indexOf(":"), u = e.indexOf("/"), c = e.indexOf(":", a + 1);
691
- c !== -1 && (u === -1 || c < u) ? (r.hostname = e.substring(0, t) || null, r.port = null) : (i = e.substring(0, t).split(":"), r.hostname = i[0] || null, r.port = i[1] || null);
692
- }
693
- return r.hostname && e.substring(t).charAt(0) !== "/" && (t++, e = "/" + e), r.preventInvalidHostname && n.ensureValidHostname(r.hostname, r.protocol), r.port && n.ensureValidPort(r.port), e.substring(t) || "/";
694
- }, n.parseAuthority = function(e, r) {
695
- return e = n.parseUserinfo(e, r), n.parseHost(e, r);
696
- }, n.parseUserinfo = function(e, r) {
697
- var t = e, o = e.indexOf("\\");
698
- o !== -1 && (e = e.replace(/\\/g, "/"));
699
- var i = e.indexOf("/"), a = e.lastIndexOf("@", i > -1 ? i : e.length - 1), u;
700
- return a > -1 && (i === -1 || a < i) ? (u = e.substring(0, a).split(":"), r.username = u[0] ? n.decode(u[0]) : null, u.shift(), r.password = u[0] ? n.decode(u.join(":")) : null, e = t.substring(a + 1)) : (r.username = null, r.password = null), e;
701
- }, n.parseQuery = function(e, r) {
702
- if (!e)
703
- return {};
704
- if (e = e.replace(/&+/g, "&").replace(/^\?*&*|&+$/g, ""), !e)
705
- return {};
706
- for (var t = {}, o = e.split("&"), i = o.length, a, u, c, f = 0; f < i; f++)
707
- a = o[f].split("="), u = n.decodeQuery(a.shift(), r), c = a.length ? n.decodeQuery(a.join("="), r) : null, u !== "__proto__" && (P.call(t, u) ? ((typeof t[u] == "string" || t[u] === null) && (t[u] = [t[u]]), t[u].push(c)) : t[u] = c);
708
- return t;
709
- }, n.build = function(e) {
710
- var r = "", t = !1;
711
- return e.protocol && (r += e.protocol + ":"), !e.urn && (r || e.hostname) && (r += "//", t = !0), r += n.buildAuthority(e) || "", typeof e.path == "string" && (e.path.charAt(0) !== "/" && t && (r += "/"), r += e.path), typeof e.query == "string" && e.query && (r += "?" + e.query), typeof e.fragment == "string" && e.fragment && (r += "#" + e.fragment), r;
712
- }, n.buildHost = function(e) {
713
- var r = "";
714
- if (e.hostname)
715
- n.ip6_expression.test(e.hostname) ? r += "[" + e.hostname + "]" : r += e.hostname;
716
- else return "";
717
- return e.port && (r += ":" + e.port), r;
718
- }, n.buildAuthority = function(e) {
719
- return n.buildUserinfo(e) + n.buildHost(e);
720
- }, n.buildUserinfo = function(e) {
721
- var r = "";
722
- return e.username && (r += n.encode(e.username)), e.password && (r += ":" + n.encode(e.password)), r && (r += "@"), r;
723
- }, n.buildQuery = function(e, r, t) {
724
- var o = "", i, a, u, c;
725
- for (a in e)
726
- if (a !== "__proto__" && P.call(e, a))
727
- if (y(e[a]))
728
- for (i = {}, u = 0, c = e[a].length; u < c; u++)
729
- e[a][u] !== void 0 && i[e[a][u] + ""] === void 0 && (o += "&" + n.buildQueryParameter(a, e[a][u], t), r !== !0 && (i[e[a][u] + ""] = !0));
730
- else e[a] !== void 0 && (o += "&" + n.buildQueryParameter(a, e[a], t));
731
- return o.substring(1);
732
- }, n.buildQueryParameter = function(e, r, t) {
733
- return n.encodeQuery(e, t) + (r !== null ? "=" + n.encodeQuery(r, t) : "");
734
- }, n.addQuery = function(e, r, t) {
735
- if (typeof r == "object")
736
- for (var o in r)
737
- P.call(r, o) && n.addQuery(e, o, r[o]);
738
- else if (typeof r == "string") {
739
- if (e[r] === void 0) {
740
- e[r] = t;
741
- return;
742
- } else typeof e[r] == "string" && (e[r] = [e[r]]);
743
- y(t) || (t = [t]), e[r] = (e[r] || []).concat(t);
744
- } else
745
- throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");
746
- }, n.setQuery = function(e, r, t) {
747
- if (typeof r == "object")
748
- for (var o in r)
749
- P.call(r, o) && n.setQuery(e, o, r[o]);
750
- else if (typeof r == "string")
751
- e[r] = t === void 0 ? null : t;
752
- else
753
- throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");
754
- }, n.removeQuery = function(e, r, t) {
755
- var o, i, a;
756
- if (y(r))
757
- for (o = 0, i = r.length; o < i; o++)
758
- e[r[o]] = void 0;
759
- else if (S(r) === "RegExp")
760
- for (a in e)
761
- r.test(a) && (e[a] = void 0);
762
- else if (typeof r == "object")
763
- for (a in r)
764
- P.call(r, a) && n.removeQuery(e, a, r[a]);
765
- else if (typeof r == "string")
766
- t !== void 0 ? S(t) === "RegExp" ? !y(e[r]) && t.test(e[r]) ? e[r] = void 0 : e[r] = M(e[r], t) : e[r] === String(t) && (!y(t) || t.length === 1) ? e[r] = void 0 : y(e[r]) && (e[r] = M(e[r], t)) : e[r] = void 0;
767
- else
768
- throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");
769
- }, n.hasQuery = function(e, r, t, o) {
770
- switch (S(r)) {
771
- case "String":
772
- break;
773
- case "RegExp":
774
- for (var i in e)
775
- if (P.call(e, i) && r.test(i) && (t === void 0 || n.hasQuery(e, i, t)))
776
- return !0;
777
- return !1;
778
- case "Object":
779
- for (var a in r)
780
- if (P.call(r, a) && !n.hasQuery(e, a, r[a]))
781
- return !1;
782
- return !0;
783
- default:
784
- throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");
785
- }
786
- switch (S(t)) {
787
- case "Undefined":
788
- return r in e;
789
- case "Boolean":
790
- var u = !!(y(e[r]) ? e[r].length : e[r]);
791
- return t === u;
792
- case "Function":
793
- return !!t(e[r], r, e);
794
- case "Array":
795
- if (!y(e[r]))
796
- return !1;
797
- var c = o ? U : F;
798
- return c(e[r], t);
799
- case "RegExp":
800
- return y(e[r]) ? o ? U(e[r], t) : !1 : !!(e[r] && e[r].match(t));
801
- case "Number":
802
- t = String(t);
803
- case "String":
804
- return y(e[r]) ? o ? U(e[r], t) : !1 : e[r] === t;
805
- default:
806
- throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");
807
- }
808
- }, n.joinPaths = function() {
809
- for (var e = [], r = [], t = 0, o = 0; o < arguments.length; o++) {
810
- var i = new n(arguments[o]);
811
- e.push(i);
812
- for (var a = i.segment(), u = 0; u < a.length; u++)
813
- typeof a[u] == "string" && r.push(a[u]), a[u] && t++;
814
- }
815
- if (!r.length || !t)
816
- return new n("");
817
- var c = new n("").segment(r);
818
- return (e[0].path() === "" || e[0].path().slice(0, 1) === "/") && c.path("/" + c.path()), c.normalize();
819
- }, n.commonPath = function(e, r) {
820
- var t = Math.min(e.length, r.length), o;
821
- for (o = 0; o < t; o++)
822
- if (e.charAt(o) !== r.charAt(o)) {
823
- o--;
824
- break;
825
- }
826
- return o < 1 ? e.charAt(0) === r.charAt(0) && e.charAt(0) === "/" ? "/" : "" : ((e.charAt(o) !== "/" || r.charAt(o) !== "/") && (o = e.substring(0, o).lastIndexOf("/")), e.substring(0, o + 1));
827
- }, n.withinString = function(e, r, t) {
828
- t || (t = {});
829
- var o = t.start || n.findUri.start, i = t.end || n.findUri.end, a = t.trim || n.findUri.trim, u = t.parens || n.findUri.parens, c = /[a-z0-9-]=["']?$/i;
830
- for (o.lastIndex = 0; ; ) {
831
- var f = o.exec(e);
832
- if (!f)
833
- break;
834
- var g = f.index;
835
- if (t.ignoreHtml) {
836
- var w = e.slice(Math.max(g - 3, 0), g);
837
- if (w && c.test(w))
838
- continue;
839
- }
840
- for (var _ = g + e.slice(g).search(i), x = e.slice(g, _), k = -1; ; ) {
841
- var I = u.exec(x);
842
- if (!I)
843
- break;
844
- var q = I.index + I[0].length;
845
- k = Math.max(k, q);
846
- }
847
- if (k > -1 ? x = x.slice(0, k) + x.slice(k).replace(a, "") : x = x.replace(a, ""), !(x.length <= f[0].length) && !(t.ignore && t.ignore.test(x))) {
848
- _ = g + x.length;
849
- var A = r(x, g, _, e);
850
- if (A === void 0) {
851
- o.lastIndex = _;
852
- continue;
853
- }
854
- A = String(A), e = e.slice(0, g) + A + e.slice(_), o.lastIndex = g + A.length;
855
- }
856
- }
857
- return o.lastIndex = 0, e;
858
- }, n.ensureValidHostname = function(e, r) {
859
- var t = !!e, o = !!r, i = !1;
860
- if (o && (i = U(n.hostProtocols, r)), i && !t)
861
- throw new TypeError("Hostname cannot be empty, if protocol is " + r);
862
- if (e && e.match(n.invalid_hostname_characters)) {
863
- if (!l)
864
- throw new TypeError('Hostname "' + e + '" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');
865
- if (l.toASCII(e).match(n.invalid_hostname_characters))
866
- throw new TypeError('Hostname "' + e + '" contains characters other than [A-Z0-9.-:_]');
867
- }
868
- }, n.ensureValidPort = function(e) {
869
- if (e) {
870
- var r = Number(e);
871
- if (!(d(r) && r > 0 && r < 65536))
872
- throw new TypeError('Port "' + e + '" is not a valid port');
873
- }
874
- }, n.noConflict = function(e) {
875
- if (e) {
876
- var r = {
877
- URI: this.noConflict()
878
- };
879
- return p.URITemplate && typeof p.URITemplate.noConflict == "function" && (r.URITemplate = p.URITemplate.noConflict()), p.IPv6 && typeof p.IPv6.noConflict == "function" && (r.IPv6 = p.IPv6.noConflict()), p.SecondLevelDomains && typeof p.SecondLevelDomains.noConflict == "function" && (r.SecondLevelDomains = p.SecondLevelDomains.noConflict()), r;
880
- } else p.URI === this && (p.URI = m);
881
- return this;
882
- }, s.build = function(e) {
883
- return e === !0 ? this._deferred_build = !0 : (e === void 0 || this._deferred_build) && (this._string = n.build(this._parts), this._deferred_build = !1), this;
884
- }, s.clone = function() {
885
- return new n(this);
886
- }, s.valueOf = s.toString = function() {
887
- return this.build(!1)._string;
888
- };
889
- function H(e) {
890
- return function(r, t) {
891
- return r === void 0 ? this._parts[e] || "" : (this._parts[e] = r || null, this.build(!t), this);
892
- };
893
- }
894
- function D(e, r) {
895
- return function(t, o) {
896
- return t === void 0 ? this._parts[e] || "" : (t !== null && (t = t + "", t.charAt(0) === r && (t = t.substring(1))), this._parts[e] = t, this.build(!o), this);
897
- };
898
- }
899
- s.protocol = H("protocol"), s.username = H("username"), s.password = H("password"), s.hostname = H("hostname"), s.port = H("port"), s.query = D("query", "?"), s.fragment = D("fragment", "#"), s.search = function(e, r) {
900
- var t = this.query(e, r);
901
- return typeof t == "string" && t.length ? "?" + t : t;
902
- }, s.hash = function(e, r) {
903
- var t = this.fragment(e, r);
904
- return typeof t == "string" && t.length ? "#" + t : t;
905
- }, s.pathname = function(e, r) {
906
- if (e === void 0 || e === !0) {
907
- var t = this._parts.path || (this._parts.hostname ? "/" : "");
908
- return e ? (this._parts.urn ? n.decodeUrnPath : n.decodePath)(t) : t;
909
- } else
910
- return this._parts.urn ? this._parts.path = e ? n.recodeUrnPath(e) : "" : this._parts.path = e ? n.recodePath(e) : "/", this.build(!r), this;
911
- }, s.path = s.pathname, s.href = function(e, r) {
912
- var t;
913
- if (e === void 0)
914
- return this.toString();
915
- this._string = "", this._parts = n._parts();
916
- var o = e instanceof n, i = typeof e == "object" && (e.hostname || e.path || e.pathname);
917
- if (e.nodeName) {
918
- var a = n.getDomAttribute(e);
919
- e = e[a] || "", i = !1;
920
- }
921
- if (!o && i && e.pathname !== void 0 && (e = e.toString()), typeof e == "string" || e instanceof String)
922
- this._parts = n.parse(String(e), this._parts);
923
- else if (o || i) {
924
- var u = o ? e._parts : e;
925
- for (t in u)
926
- t !== "query" && P.call(this._parts, t) && (this._parts[t] = u[t]);
927
- u.query && this.query(u.query, !1);
928
- } else
929
- throw new TypeError("invalid input");
930
- return this.build(!r), this;
931
- }, s.is = function(e) {
932
- var r = !1, t = !1, o = !1, i = !1, a = !1, u = !1, c = !1, f = !this._parts.urn;
933
- switch (this._parts.hostname && (f = !1, t = n.ip4_expression.test(this._parts.hostname), o = n.ip6_expression.test(this._parts.hostname), r = t || o, i = !r, a = i && b && b.has(this._parts.hostname), u = i && n.idn_expression.test(this._parts.hostname), c = i && n.punycode_expression.test(this._parts.hostname)), e.toLowerCase()) {
934
- case "relative":
935
- return f;
936
- case "absolute":
937
- return !f;
938
- case "domain":
939
- case "name":
940
- return i;
941
- case "sld":
942
- return a;
943
- case "ip":
944
- return r;
945
- case "ip4":
946
- case "ipv4":
947
- case "inet4":
948
- return t;
949
- case "ip6":
950
- case "ipv6":
951
- case "inet6":
952
- return o;
953
- case "idn":
954
- return u;
955
- case "url":
956
- return !this._parts.urn;
957
- case "urn":
958
- return !!this._parts.urn;
959
- case "punycode":
960
- return c;
961
- }
962
- return null;
963
- };
964
- var J = s.protocol, K = s.port, X = s.hostname;
965
- s.protocol = function(e, r) {
966
- if (e && (e = e.replace(/:(\/\/)?$/, ""), !e.match(n.protocol_expression)))
967
- throw new TypeError('Protocol "' + e + `" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);
968
- return J.call(this, e, r);
969
- }, s.scheme = s.protocol, s.port = function(e, r) {
970
- return this._parts.urn ? e === void 0 ? "" : this : (e !== void 0 && (e === 0 && (e = null), e && (e += "", e.charAt(0) === ":" && (e = e.substring(1)), n.ensureValidPort(e))), K.call(this, e, r));
971
- }, s.hostname = function(e, r) {
972
- if (this._parts.urn)
973
- return e === void 0 ? "" : this;
974
- if (e !== void 0) {
975
- var t = { preventInvalidHostname: this._parts.preventInvalidHostname }, o = n.parseHost(e, t);
976
- if (o !== "/")
977
- throw new TypeError('Hostname "' + e + '" contains characters other than [A-Z0-9.-]');
978
- e = t.hostname, this._parts.preventInvalidHostname && n.ensureValidHostname(e, this._parts.protocol);
979
- }
980
- return X.call(this, e, r);
981
- }, s.origin = function(e, r) {
982
- if (this._parts.urn)
983
- return e === void 0 ? "" : this;
984
- if (e === void 0) {
985
- var t = this.protocol(), o = this.authority();
986
- return o ? (t ? t + "://" : "") + this.authority() : "";
987
- } else {
988
- var i = n(e);
989
- return this.protocol(i.protocol()).authority(i.authority()).build(!r), this;
990
- }
991
- }, s.host = function(e, r) {
992
- if (this._parts.urn)
993
- return e === void 0 ? "" : this;
994
- if (e === void 0)
995
- return this._parts.hostname ? n.buildHost(this._parts) : "";
996
- var t = n.parseHost(e, this._parts);
997
- if (t !== "/")
998
- throw new TypeError('Hostname "' + e + '" contains characters other than [A-Z0-9.-]');
999
- return this.build(!r), this;
1000
- }, s.authority = function(e, r) {
1001
- if (this._parts.urn)
1002
- return e === void 0 ? "" : this;
1003
- if (e === void 0)
1004
- return this._parts.hostname ? n.buildAuthority(this._parts) : "";
1005
- var t = n.parseAuthority(e, this._parts);
1006
- if (t !== "/")
1007
- throw new TypeError('Hostname "' + e + '" contains characters other than [A-Z0-9.-]');
1008
- return this.build(!r), this;
1009
- }, s.userinfo = function(e, r) {
1010
- if (this._parts.urn)
1011
- return e === void 0 ? "" : this;
1012
- if (e === void 0) {
1013
- var t = n.buildUserinfo(this._parts);
1014
- return t && t.substring(0, t.length - 1);
1015
- } else
1016
- return e[e.length - 1] !== "@" && (e += "@"), n.parseUserinfo(e, this._parts), this.build(!r), this;
1017
- }, s.resource = function(e, r) {
1018
- var t;
1019
- return e === void 0 ? this.path() + this.search() + this.hash() : (t = n.parse(e), this._parts.path = t.path, this._parts.query = t.query, this._parts.fragment = t.fragment, this.build(!r), this);
1020
- }, s.subdomain = function(e, r) {
1021
- if (this._parts.urn)
1022
- return e === void 0 ? "" : this;
1023
- if (e === void 0) {
1024
- if (!this._parts.hostname || this.is("IP"))
1025
- return "";
1026
- var t = this._parts.hostname.length - this.domain().length - 1;
1027
- return this._parts.hostname.substring(0, t) || "";
1028
- } else {
1029
- var o = this._parts.hostname.length - this.domain().length, i = this._parts.hostname.substring(0, o), a = new RegExp("^" + z(i));
1030
- if (e && e.charAt(e.length - 1) !== "." && (e += "."), e.indexOf(":") !== -1)
1031
- throw new TypeError("Domains cannot contain colons");
1032
- return e && n.ensureValidHostname(e, this._parts.protocol), this._parts.hostname = this._parts.hostname.replace(a, e), this.build(!r), this;
1033
- }
1034
- }, s.domain = function(e, r) {
1035
- if (this._parts.urn)
1036
- return e === void 0 ? "" : this;
1037
- if (typeof e == "boolean" && (r = e, e = void 0), e === void 0) {
1038
- if (!this._parts.hostname || this.is("IP"))
1039
- return "";
1040
- var t = this._parts.hostname.match(/\./g);
1041
- if (t && t.length < 2)
1042
- return this._parts.hostname;
1043
- var o = this._parts.hostname.length - this.tld(r).length - 1;
1044
- return o = this._parts.hostname.lastIndexOf(".", o - 1) + 1, this._parts.hostname.substring(o) || "";
1045
- } else {
1046
- if (!e)
1047
- throw new TypeError("cannot set domain empty");
1048
- if (e.indexOf(":") !== -1)
1049
- throw new TypeError("Domains cannot contain colons");
1050
- if (n.ensureValidHostname(e, this._parts.protocol), !this._parts.hostname || this.is("IP"))
1051
- this._parts.hostname = e;
1052
- else {
1053
- var i = new RegExp(z(this.domain()) + "$");
1054
- this._parts.hostname = this._parts.hostname.replace(i, e);
1055
- }
1056
- return this.build(!r), this;
1057
- }
1058
- }, s.tld = function(e, r) {
1059
- if (this._parts.urn)
1060
- return e === void 0 ? "" : this;
1061
- if (typeof e == "boolean" && (r = e, e = void 0), e === void 0) {
1062
- if (!this._parts.hostname || this.is("IP"))
1063
- return "";
1064
- var t = this._parts.hostname.lastIndexOf("."), o = this._parts.hostname.substring(t + 1);
1065
- return r !== !0 && b && b.list[o.toLowerCase()] && b.get(this._parts.hostname) || o;
1066
- } else {
1067
- var i;
1068
- if (e)
1069
- if (e.match(/[^a-zA-Z0-9-]/))
1070
- if (b && b.is(e))
1071
- i = new RegExp(z(this.tld()) + "$"), this._parts.hostname = this._parts.hostname.replace(i, e);
1072
- else
1073
- throw new TypeError('TLD "' + e + '" contains characters other than [A-Z0-9]');
1074
- else {
1075
- if (!this._parts.hostname || this.is("IP"))
1076
- throw new ReferenceError("cannot set TLD on non-domain host");
1077
- i = new RegExp(z(this.tld()) + "$"), this._parts.hostname = this._parts.hostname.replace(i, e);
1078
- }
1079
- else throw new TypeError("cannot set TLD empty");
1080
- return this.build(!r), this;
1081
- }
1082
- }, s.directory = function(e, r) {
1083
- if (this._parts.urn)
1084
- return e === void 0 ? "" : this;
1085
- if (e === void 0 || e === !0) {
1086
- if (!this._parts.path && !this._parts.hostname)
1087
- return "";
1088
- if (this._parts.path === "/")
1089
- return "/";
1090
- var t = this._parts.path.length - this.filename().length - 1, o = this._parts.path.substring(0, t) || (this._parts.hostname ? "/" : "");
1091
- return e ? n.decodePath(o) : o;
1092
- } else {
1093
- var i = this._parts.path.length - this.filename().length, a = this._parts.path.substring(0, i), u = new RegExp("^" + z(a));
1094
- return this.is("relative") || (e || (e = "/"), e.charAt(0) !== "/" && (e = "/" + e)), e && e.charAt(e.length - 1) !== "/" && (e += "/"), e = n.recodePath(e), this._parts.path = this._parts.path.replace(u, e), this.build(!r), this;
1095
- }
1096
- }, s.filename = function(e, r) {
1097
- if (this._parts.urn)
1098
- return e === void 0 ? "" : this;
1099
- if (typeof e != "string") {
1100
- if (!this._parts.path || this._parts.path === "/")
1101
- return "";
1102
- var t = this._parts.path.lastIndexOf("/"), o = this._parts.path.substring(t + 1);
1103
- return e ? n.decodePathSegment(o) : o;
1104
- } else {
1105
- var i = !1;
1106
- e.charAt(0) === "/" && (e = e.substring(1)), e.match(/\.?\//) && (i = !0);
1107
- var a = new RegExp(z(this.filename()) + "$");
1108
- return e = n.recodePath(e), this._parts.path = this._parts.path.replace(a, e), i ? this.normalizePath(r) : this.build(!r), this;
1109
- }
1110
- }, s.suffix = function(e, r) {
1111
- if (this._parts.urn)
1112
- return e === void 0 ? "" : this;
1113
- if (e === void 0 || e === !0) {
1114
- if (!this._parts.path || this._parts.path === "/")
1115
- return "";
1116
- var t = this.filename(), o = t.lastIndexOf("."), i, a;
1117
- return o === -1 ? "" : (i = t.substring(o + 1), a = /^[a-z0-9%]+$/i.test(i) ? i : "", e ? n.decodePathSegment(a) : a);
1118
- } else {
1119
- e.charAt(0) === "." && (e = e.substring(1));
1120
- var u = this.suffix(), c;
1121
- if (u)
1122
- e ? c = new RegExp(z(u) + "$") : c = new RegExp(z("." + u) + "$");
1123
- else {
1124
- if (!e)
1125
- return this;
1126
- this._parts.path += "." + n.recodePath(e);
1127
- }
1128
- return c && (e = n.recodePath(e), this._parts.path = this._parts.path.replace(c, e)), this.build(!r), this;
1129
- }
1130
- }, s.segment = function(e, r, t) {
1131
- var o = this._parts.urn ? ":" : "/", i = this.path(), a = i.substring(0, 1) === "/", u = i.split(o);
1132
- if (e !== void 0 && typeof e != "number" && (t = r, r = e, e = void 0), e !== void 0 && typeof e != "number")
1133
- throw new Error('Bad segment "' + e + '", must be 0-based integer');
1134
- if (a && u.shift(), e < 0 && (e = Math.max(u.length + e, 0)), r === void 0)
1135
- return e === void 0 ? u : u[e];
1136
- if (e === null || u[e] === void 0)
1137
- if (y(r)) {
1138
- u = [];
1139
- for (var c = 0, f = r.length; c < f; c++)
1140
- !r[c].length && (!u.length || !u[u.length - 1].length) || (u.length && !u[u.length - 1].length && u.pop(), u.push(E(r[c])));
1141
- } else (r || typeof r == "string") && (r = E(r), u[u.length - 1] === "" ? u[u.length - 1] = r : u.push(r));
1142
- else
1143
- r ? u[e] = E(r) : u.splice(e, 1);
1144
- return a && u.unshift(""), this.path(u.join(o), t);
1145
- }, s.segmentCoded = function(e, r, t) {
1146
- var o, i, a;
1147
- if (typeof e != "number" && (t = r, r = e, e = void 0), r === void 0) {
1148
- if (o = this.segment(e, r, t), !y(o))
1149
- o = o !== void 0 ? n.decode(o) : void 0;
1150
- else
1151
- for (i = 0, a = o.length; i < a; i++)
1152
- o[i] = n.decode(o[i]);
1153
- return o;
1154
- }
1155
- if (!y(r))
1156
- r = typeof r == "string" || r instanceof String ? n.encode(r) : r;
1157
- else
1158
- for (i = 0, a = r.length; i < a; i++)
1159
- r[i] = n.encode(r[i]);
1160
- return this.segment(e, r, t);
1161
- };
1162
- var Y = s.query;
1163
- return s.query = function(e, r) {
1164
- if (e === !0)
1165
- return n.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
1166
- if (typeof e == "function") {
1167
- var t = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace), o = e.call(this, t);
1168
- return this._parts.query = n.buildQuery(o || t, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), this.build(!r), this;
1169
- } else return e !== void 0 && typeof e != "string" ? (this._parts.query = n.buildQuery(e, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), this.build(!r), this) : Y.call(this, e, r);
1170
- }, s.setQuery = function(e, r, t) {
1171
- var o = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
1172
- if (typeof e == "string" || e instanceof String)
1173
- o[e] = r !== void 0 ? r : null;
1174
- else if (typeof e == "object")
1175
- for (var i in e)
1176
- P.call(e, i) && (o[i] = e[i]);
1177
- else
1178
- throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");
1179
- return this._parts.query = n.buildQuery(o, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), typeof e != "string" && (t = r), this.build(!t), this;
1180
- }, s.addQuery = function(e, r, t) {
1181
- var o = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
1182
- return n.addQuery(o, e, r === void 0 ? null : r), this._parts.query = n.buildQuery(o, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), typeof e != "string" && (t = r), this.build(!t), this;
1183
- }, s.removeQuery = function(e, r, t) {
1184
- var o = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
1185
- return n.removeQuery(o, e, r), this._parts.query = n.buildQuery(o, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), typeof e != "string" && (t = r), this.build(!t), this;
1186
- }, s.hasQuery = function(e, r, t) {
1187
- var o = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
1188
- return n.hasQuery(o, e, r, t);
1189
- }, s.setSearch = s.setQuery, s.addSearch = s.addQuery, s.removeSearch = s.removeQuery, s.hasSearch = s.hasQuery, s.normalize = function() {
1190
- return this._parts.urn ? this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build() : this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build();
1191
- }, s.normalizeProtocol = function(e) {
1192
- return typeof this._parts.protocol == "string" && (this._parts.protocol = this._parts.protocol.toLowerCase(), this.build(!e)), this;
1193
- }, s.normalizeHostname = function(e) {
1194
- return this._parts.hostname && (this.is("IDN") && l ? this._parts.hostname = l.toASCII(this._parts.hostname) : this.is("IPv6") && v && (this._parts.hostname = v.best(this._parts.hostname)), this._parts.hostname = this._parts.hostname.toLowerCase(), this.build(!e)), this;
1195
- }, s.normalizePort = function(e) {
1196
- return typeof this._parts.protocol == "string" && this._parts.port === n.defaultPorts[this._parts.protocol] && (this._parts.port = null, this.build(!e)), this;
1197
- }, s.normalizePath = function(e) {
1198
- var r = this._parts.path;
1199
- if (!r)
1200
- return this;
1201
- if (this._parts.urn)
1202
- return this._parts.path = n.recodeUrnPath(this._parts.path), this.build(!e), this;
1203
- if (this._parts.path === "/")
1204
- return this;
1205
- r = n.recodePath(r);
1206
- var t, o = "", i, a;
1207
- for (r.charAt(0) !== "/" && (t = !0, r = "/" + r), (r.slice(-3) === "/.." || r.slice(-2) === "/.") && (r += "/"), r = r.replace(/(\/(\.\/)+)|(\/\.$)/g, "/").replace(/\/{2,}/g, "/"), t && (o = r.substring(1).match(/^(\.\.\/)+/) || "", o && (o = o[0])); i = r.search(/\/\.\.(\/|$)/), i !== -1; ) {
1208
- if (i === 0) {
1209
- r = r.substring(3);
1210
- continue;
1211
- }
1212
- a = r.substring(0, i).lastIndexOf("/"), a === -1 && (a = i), r = r.substring(0, a) + r.substring(i + 3);
1213
- }
1214
- return t && this.is("relative") && (r = o + r.substring(1)), this._parts.path = r, this.build(!e), this;
1215
- }, s.normalizePathname = s.normalizePath, s.normalizeQuery = function(e) {
1216
- return typeof this._parts.query == "string" && (this._parts.query.length ? this.query(n.parseQuery(this._parts.query, this._parts.escapeQuerySpace)) : this._parts.query = null, this.build(!e)), this;
1217
- }, s.normalizeFragment = function(e) {
1218
- return this._parts.fragment || (this._parts.fragment = null, this.build(!e)), this;
1219
- }, s.normalizeSearch = s.normalizeQuery, s.normalizeHash = s.normalizeFragment, s.iso8859 = function() {
1220
- var e = n.encode, r = n.decode;
1221
- n.encode = escape, n.decode = decodeURIComponent;
1222
- try {
1223
- this.normalize();
1224
- } finally {
1225
- n.encode = e, n.decode = r;
1226
- }
1227
- return this;
1228
- }, s.unicode = function() {
1229
- var e = n.encode, r = n.decode;
1230
- n.encode = $, n.decode = unescape;
1231
- try {
1232
- this.normalize();
1233
- } finally {
1234
- n.encode = e, n.decode = r;
1235
- }
1236
- return this;
1237
- }, s.readable = function() {
1238
- var e = this.clone();
1239
- e.username("").password("").normalize();
1240
- var r = "";
1241
- if (e._parts.protocol && (r += e._parts.protocol + "://"), e._parts.hostname && (e.is("punycode") && l ? (r += l.toUnicode(e._parts.hostname), e._parts.port && (r += ":" + e._parts.port)) : r += e.host()), e._parts.hostname && e._parts.path && e._parts.path.charAt(0) !== "/" && (r += "/"), r += e.path(!0), e._parts.query) {
1242
- for (var t = "", o = 0, i = e._parts.query.split("&"), a = i.length; o < a; o++) {
1243
- var u = (i[o] || "").split("=");
1244
- t += "&" + n.decodeQuery(u[0], this._parts.escapeQuerySpace).replace(/&/g, "%26"), u[1] !== void 0 && (t += "=" + n.decodeQuery(u[1], this._parts.escapeQuerySpace).replace(/&/g, "%26"));
1245
- }
1246
- r += "?" + t.substring(1);
1247
- }
1248
- return r += n.decodeQuery(e.hash(), !0), r;
1249
- }, s.absoluteTo = function(e) {
1250
- var r = this.clone(), t = ["protocol", "username", "password", "hostname", "port"], o, i, a;
1251
- if (this._parts.urn)
1252
- throw new Error("URNs do not have any generally defined hierarchical components");
1253
- if (e instanceof n || (e = new n(e)), r._parts.protocol || (r._parts.protocol = e._parts.protocol, this._parts.hostname))
1254
- return r;
1255
- for (i = 0; a = t[i]; i++)
1256
- r._parts[a] = e._parts[a];
1257
- return r._parts.path ? (r._parts.path.substring(-2) === ".." && (r._parts.path += "/"), r.path().charAt(0) !== "/" && (o = e.directory(), o = o || (e.path().indexOf("/") === 0 ? "/" : ""), r._parts.path = (o ? o + "/" : "") + r._parts.path, r.normalizePath())) : (r._parts.path = e._parts.path, r._parts.query || (r._parts.query = e._parts.query)), r.build(), r;
1258
- }, s.relativeTo = function(e) {
1259
- var r = this.clone().normalize(), t, o, i, a, u;
1260
- if (r._parts.urn)
1261
- throw new Error("URNs do not have any generally defined hierarchical components");
1262
- if (e = new n(e).normalize(), t = r._parts, o = e._parts, a = r.path(), u = e.path(), a.charAt(0) !== "/")
1263
- throw new Error("URI is already relative");
1264
- if (u.charAt(0) !== "/")
1265
- throw new Error("Cannot calculate a URI relative to another relative URI");
1266
- if (t.protocol === o.protocol && (t.protocol = null), t.username !== o.username || t.password !== o.password || t.protocol !== null || t.username !== null || t.password !== null)
1267
- return r.build();
1268
- if (t.hostname === o.hostname && t.port === o.port)
1269
- t.hostname = null, t.port = null;
1270
- else
1271
- return r.build();
1272
- if (a === u)
1273
- return t.path = "", r.build();
1274
- if (i = n.commonPath(a, u), !i)
1275
- return r.build();
1276
- var c = o.path.substring(i.length).replace(/[^\/]*$/, "").replace(/.*?\//g, "../");
1277
- return t.path = c + t.path.substring(i.length) || "./", r.build();
1278
- }, s.equals = function(e) {
1279
- var r = this.clone(), t = new n(e), o = {}, i = {}, a = {}, u, c, f;
1280
- if (r.normalize(), t.normalize(), r.toString() === t.toString())
1281
- return !0;
1282
- if (u = r.query(), c = t.query(), r.query(""), t.query(""), r.toString() !== t.toString() || u.length !== c.length)
1283
- return !1;
1284
- o = n.parseQuery(u, this._parts.escapeQuerySpace), i = n.parseQuery(c, this._parts.escapeQuerySpace);
1285
- for (f in o)
1286
- if (P.call(o, f)) {
1287
- if (y(o[f])) {
1288
- if (!F(o[f], i[f]))
1289
- return !1;
1290
- } else if (o[f] !== i[f])
1291
- return !1;
1292
- a[f] = !0;
1293
- }
1294
- for (f in i)
1295
- if (P.call(i, f) && !a[f])
1296
- return !1;
1297
- return !0;
1298
- }, s.preventInvalidHostname = function(e) {
1299
- return this._parts.preventInvalidHostname = !!e, this;
1300
- }, s.duplicateQueryParameters = function(e) {
1301
- return this._parts.duplicateQueryParameters = !!e, this;
1302
- }, s.escapeQuerySpace = function(e) {
1303
- return this._parts.escapeQuerySpace = !!e, this;
1304
- }, n;
1305
- });
1306
- })(ce);
1307
- var me = ce.exports;
1308
- const ue = /* @__PURE__ */ he(me), we = [
1309
- "http",
1310
- "https"
1311
- ];
1312
- function ve(h) {
1313
- return typeof h == "string" && h.startsWith("/vsi") && !h.startsWith("/vsicurl/");
1314
- }
1315
- function fe(h, l, v = !0) {
1316
- return ye(h, l, !1, v);
1317
- }
1318
- function ye(h, l = null, v = !1, b = !0) {
1319
- typeof h == "string" && h.startsWith("/vsicurl/") && (h = h.replace(/^\/vsicurl\//, ""));
1320
- let p = ue(h);
1321
- if (l && p.is("relative") && !ve(h)) {
1322
- let m = ue(l), n = m.path();
1323
- !n.endsWith("/") && !n.endsWith(".json") && m.path(n + "/"), p = p.absoluteTo(m);
1324
- }
1325
- return p.normalize(), v && (p.query(""), p.fragment("")), b ? p.toString() : p;
1326
- }
1327
- function xe(h) {
1328
- const l = [];
1329
- return h?.forEach((b) => {
1330
- if (b.rel === "item" && "latlng" in b) {
1331
- const [p, m] = (
1332
- /** @type {string} */
1333
- b.latlng.split(",").map((n) => Number(n))
1334
- );
1335
- l.push({
1336
- type: "Feature",
1337
- geometry: {
1338
- type: "Point",
1339
- coordinates: [m, p]
1340
- }
1341
- });
1342
- }
1343
- }), {
1344
- type: "FeatureCollection",
1345
- crs: {
1346
- type: "name",
1347
- properties: {
1348
- name: "EPSG:4326"
1349
- }
1350
- },
1351
- features: l
1352
- };
1353
- }
1354
- function ke(h) {
1355
- let l;
1356
- return h?.jsonform && (l = { schema: h.jsonform, type: "style" }, delete h.jsonform), { layerConfig: l, style: h };
1357
- }
1358
- const ze = (h) => {
1359
- h?.["proj:epsg"] ? (ee.value && ee.value !== h?.["proj:epsg"] && oe(
1360
- /** @type {number} */
1361
- h["proj:epsg"]
1362
- ), ee.value = /** @type {string} */
1363
- h["proj:epsg"]) : oe(ee.value = "");
1364
- };
1365
- function Pe(h, l) {
1366
- const v = [];
1367
- return h?.links && h?.links[1].rel === "item" ? v.push(l) : h?.links[1].rel === "child" && h.links.forEach((b) => {
1368
- b.rel === "child" && v.push(fe(b.href, l));
1369
- }), v;
1370
- }
1371
- const Ie = (h, l) => {
1372
- l?.forEach((v) => (v === "visible" && (h.visible = !0), (v === "overlay" || v === "baselayer") && (h.group = v), h));
1373
- }, Ae = async (h, l) => {
1374
- const v = h.links.find((b) => b.rel.includes("style"));
1375
- if (v) {
1376
- let b = "";
1377
- return v.href.startsWith("http") ? b = v.href : b = fe(v.href, l), await le.get(b).then((m) => m.data);
1378
- }
1379
- };
1380
- export {
1381
- ue as U,
1382
- Ie as a,
1383
- we as b,
1384
- ke as c,
1385
- Pe as e,
1386
- Ae as f,
1387
- xe as g,
1388
- ze as s,
1389
- fe as t
1390
- };