@cfx-dev/ui-components 0.0.19 → 0.0.21
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/Combination-Dp_plIQU.js +793 -0
- package/dist/{Icons-B26SczGZ.js → Icons-BlBKvJD8.js} +40 -98
- package/dist/{Rail-BCY3h7eP.js → Rail-CCuyJpf6.js} +11 -11
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/assets/InputDropzone.css +1 -0
- package/dist/assets/ItemPreview.css +1 -0
- package/dist/assets/Table.css +1 -0
- package/dist/components/BackdropPortal/BackdropPortal.d.ts +1 -0
- package/dist/components/BackdropPortal/BackdropPortal.js +9 -7
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Button/Button.js +27 -25
- package/dist/components/Button/ButtonBar.d.ts +0 -1
- package/dist/components/Button/LinkButton.js +13 -13
- package/dist/components/Flyout/Flyout.d.ts +1 -0
- package/dist/components/Flyout/Flyout.js +28 -27
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/RichInput.js +2 -2
- package/dist/components/InputDropzone/InputDropzone.d.ts +14 -0
- package/dist/components/InputDropzone/InputDropzone.js +1103 -0
- package/dist/components/InputDropzone/ItemPreview.d.ts +8 -0
- package/dist/components/InputDropzone/ItemPreview.js +24 -0
- package/dist/components/Layout/Scrollable/Rail.js +3 -3
- package/dist/components/Layout/Scrollable/Scrollable.js +2 -2
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +3 -4
- package/dist/components/Modal/Modal.d.ts +0 -2
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/NavList/NavList.js +5 -5
- package/dist/components/OnScreenSensor.js +6 -6
- package/dist/components/Overlay/Overlay.d.ts +1 -0
- package/dist/components/Overlay/Overlay.js +16 -15
- package/dist/components/Select/Select.js +652 -663
- package/dist/components/Shroud/Shroud.js +20 -19
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.d.ts +17 -0
- package/dist/components/Table/Table.js +61 -0
- package/dist/components/Tabular/Tabular.d.ts +1 -1
- package/dist/components/Text/Text.types.d.ts +0 -1
- package/dist/components/Title/Title.d.ts +1 -0
- package/dist/components/Title/Title.js +26 -25
- package/dist/{extends-Dk_bSU3E.js → extends-hS2Bh-Yp.js} +1 -2
- package/dist/{index-C75OpfGQ.js → index-2hJuj4UN.js} +2018 -2526
- package/dist/index-DQMInta3.js +663 -0
- package/dist/index.esm-BkynlSN6.js +72 -0
- package/dist/main.d.ts +17 -26
- package/dist/main.js +145 -122
- package/dist/{medium-Dc7QRuE0.js → medium-JVtzoF2c.js} +3 -3
- package/dist/style-guide/Colours/DarkThemeSwatches.d.ts +2 -0
- package/dist/style-guide/Colours/DarkThemeSwatches.js +110 -0
- package/dist/style-guide/Colours/LightThemeSwatches.d.ts +2 -0
- package/dist/style-guide/Colours/LightThemeSwatches.js +105 -0
- package/dist/style-guide/Colours/Swatches.d.ts +6 -0
- package/dist/style-guide/Colours/Swatches.js +48 -0
- package/dist/style-guide/Icons/IconDisplayGrid.d.ts +2 -0
- package/dist/style-guide/Icons/IconDisplayGrid.js +42 -0
- package/dist/style-guide/Icons/Icons.js +7 -0
- package/dist/tslib.es6-CBKHJX9H.js +151 -0
- package/dist/utils/functional.js +19 -6
- package/dist/utils/hooks.d.ts +2 -1
- package/dist/utils/hooks.js +77 -10
- package/dist/utils/links.js +1128 -12
- package/dist/utils/math.js +8 -3
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +2 -2
- package/dist/utils/outlet.js +19 -4
- package/dist/utils/string.js +42 -7
- package/package.json +7 -13
- package/dist/Combination-Dj-a6dCZ.js +0 -1462
- package/dist/components/Icons.js +0 -6
- package/dist/functional-C0pE183N.js +0 -30
- package/dist/hooks-GAujvL7d.js +0 -86
- package/dist/links-CgOD-Vfj.js +0 -1142
- package/dist/math-i2ceybzU.js +0 -16
- package/dist/outlet-B11a3Kgw.js +0 -27
- package/dist/string-NVxCUbqk.js +0 -54
- package/dist/tslib.es6-Dd_EkEfR.js +0 -48
- /package/dist/{components → style-guide/Icons}/Icons.d.ts +0 -0
package/dist/utils/links.js
CHANGED
|
@@ -1,14 +1,1130 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import "react";
|
|
4
|
-
import "
|
|
1
|
+
import { jsx as le, Fragment as Be } from "react/jsx-runtime";
|
|
2
|
+
import { e as z, _ as C } from "../tslib.es6-CBKHJX9H.js";
|
|
3
|
+
import De from "react";
|
|
4
|
+
import { splitByIndices as Ee } from "./string.js";
|
|
5
|
+
var ke = "3.16.2";
|
|
6
|
+
function Me(n, e) {
|
|
7
|
+
for (var t in e)
|
|
8
|
+
e.hasOwnProperty(t) && n[t] === void 0 && (n[t] = e[t]);
|
|
9
|
+
return n;
|
|
10
|
+
}
|
|
11
|
+
function Te(n, e, t) {
|
|
12
|
+
var u;
|
|
13
|
+
return n.length > e && (t == null ? (t = "…", u = 3) : u = t.length, n = n.substring(0, e - u) + t), n;
|
|
14
|
+
}
|
|
15
|
+
function ee(n, e) {
|
|
16
|
+
if (Array.prototype.indexOf)
|
|
17
|
+
return n.indexOf(e);
|
|
18
|
+
for (var t = 0, u = n.length; t < u; t++)
|
|
19
|
+
if (n[t] === e)
|
|
20
|
+
return t;
|
|
21
|
+
return -1;
|
|
22
|
+
}
|
|
23
|
+
function S(n, e) {
|
|
24
|
+
for (var t = n.length - 1; t >= 0; t--)
|
|
25
|
+
e(n[t]) === !0 && n.splice(t, 1);
|
|
26
|
+
}
|
|
27
|
+
function Re(n, e) {
|
|
28
|
+
if (!e.global)
|
|
29
|
+
throw new Error("`splitRegex` must have the 'g' flag set");
|
|
30
|
+
for (var t = [], u = 0, r; r = e.exec(n); )
|
|
31
|
+
t.push(n.substring(u, r.index)), t.push(r[0]), u = r.index + r[0].length;
|
|
32
|
+
return t.push(n.substring(u)), t;
|
|
33
|
+
}
|
|
34
|
+
function X(n) {
|
|
35
|
+
throw new Error("Unhandled case for value: '".concat(n, "'"));
|
|
36
|
+
}
|
|
37
|
+
var K = (
|
|
38
|
+
/** @class */
|
|
39
|
+
function() {
|
|
40
|
+
function n(e) {
|
|
41
|
+
e === void 0 && (e = {}), this.tagName = "", this.attrs = {}, this.innerHTML = "", this.whitespaceRegex = /\s+/, this.tagName = e.tagName || "", this.attrs = e.attrs || {}, this.innerHTML = e.innerHtml || e.innerHTML || "";
|
|
42
|
+
}
|
|
43
|
+
return n.prototype.setTagName = function(e) {
|
|
44
|
+
return this.tagName = e, this;
|
|
45
|
+
}, n.prototype.getTagName = function() {
|
|
46
|
+
return this.tagName || "";
|
|
47
|
+
}, n.prototype.setAttr = function(e, t) {
|
|
48
|
+
var u = this.getAttrs();
|
|
49
|
+
return u[e] = t, this;
|
|
50
|
+
}, n.prototype.getAttr = function(e) {
|
|
51
|
+
return this.getAttrs()[e];
|
|
52
|
+
}, n.prototype.setAttrs = function(e) {
|
|
53
|
+
return Object.assign(this.getAttrs(), e), this;
|
|
54
|
+
}, n.prototype.getAttrs = function() {
|
|
55
|
+
return this.attrs || (this.attrs = {});
|
|
56
|
+
}, n.prototype.setClass = function(e) {
|
|
57
|
+
return this.setAttr("class", e);
|
|
58
|
+
}, n.prototype.addClass = function(e) {
|
|
59
|
+
for (var t = this.getClass(), u = this.whitespaceRegex, r = t ? t.split(u) : [], h = e.split(u), o; o = h.shift(); )
|
|
60
|
+
ee(r, o) === -1 && r.push(o);
|
|
61
|
+
return this.getAttrs().class = r.join(" "), this;
|
|
62
|
+
}, n.prototype.removeClass = function(e) {
|
|
63
|
+
for (var t = this.getClass(), u = this.whitespaceRegex, r = t ? t.split(u) : [], h = e.split(u), o; r.length && (o = h.shift()); ) {
|
|
64
|
+
var g = ee(r, o);
|
|
65
|
+
g !== -1 && r.splice(g, 1);
|
|
66
|
+
}
|
|
67
|
+
return this.getAttrs().class = r.join(" "), this;
|
|
68
|
+
}, n.prototype.getClass = function() {
|
|
69
|
+
return this.getAttrs().class || "";
|
|
70
|
+
}, n.prototype.hasClass = function(e) {
|
|
71
|
+
return (" " + this.getClass() + " ").indexOf(" " + e + " ") !== -1;
|
|
72
|
+
}, n.prototype.setInnerHTML = function(e) {
|
|
73
|
+
return this.innerHTML = e, this;
|
|
74
|
+
}, n.prototype.setInnerHtml = function(e) {
|
|
75
|
+
return this.setInnerHTML(e);
|
|
76
|
+
}, n.prototype.getInnerHTML = function() {
|
|
77
|
+
return this.innerHTML || "";
|
|
78
|
+
}, n.prototype.getInnerHtml = function() {
|
|
79
|
+
return this.getInnerHTML();
|
|
80
|
+
}, n.prototype.toAnchorString = function() {
|
|
81
|
+
var e = this.getTagName(), t = this.buildAttrsStr();
|
|
82
|
+
return t = t ? " " + t : "", ["<", e, t, ">", this.getInnerHtml(), "</", e, ">"].join("");
|
|
83
|
+
}, n.prototype.buildAttrsStr = function() {
|
|
84
|
+
if (!this.attrs)
|
|
85
|
+
return "";
|
|
86
|
+
var e = this.getAttrs(), t = [];
|
|
87
|
+
for (var u in e)
|
|
88
|
+
e.hasOwnProperty(u) && t.push(u + '="' + e[u] + '"');
|
|
89
|
+
return t.join(" ");
|
|
90
|
+
}, n;
|
|
91
|
+
}()
|
|
92
|
+
);
|
|
93
|
+
function Pe(n, e, t) {
|
|
94
|
+
var u, r;
|
|
95
|
+
t == null ? (t = "…", r = 3, u = 8) : (r = t.length, u = t.length);
|
|
96
|
+
var h = function(A) {
|
|
97
|
+
var v = {}, b = A, m = b.match(/^([a-z]+):\/\//i);
|
|
98
|
+
return m && (v.scheme = m[1], b = b.substr(m[0].length)), m = b.match(/^(.*?)(?=(\?|#|\/|$))/i), m && (v.host = m[1], b = b.substr(m[0].length)), m = b.match(/^\/(.*?)(?=(\?|#|$))/i), m && (v.path = m[1], b = b.substr(m[0].length)), m = b.match(/^\?(.*?)(?=(#|$))/i), m && (v.query = m[1], b = b.substr(m[0].length)), m = b.match(/^#(.*?)$/i), m && (v.fragment = m[1]), v;
|
|
99
|
+
}, o = function(A) {
|
|
100
|
+
var v = "";
|
|
101
|
+
return A.scheme && A.host && (v += A.scheme + "://"), A.host && (v += A.host), A.path && (v += "/" + A.path), A.query && (v += "?" + A.query), A.fragment && (v += "#" + A.fragment), v;
|
|
102
|
+
}, g = function(A, v) {
|
|
103
|
+
var b = v / 2, m = Math.ceil(b), D = -1 * Math.floor(b), y = "";
|
|
104
|
+
return D < 0 && (y = A.substr(D)), A.substr(0, m) + t + y;
|
|
105
|
+
};
|
|
106
|
+
if (n.length <= e)
|
|
107
|
+
return n;
|
|
108
|
+
var l = e - r, f = h(n);
|
|
109
|
+
if (f.query) {
|
|
110
|
+
var s = f.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);
|
|
111
|
+
s && (f.query = f.query.substr(0, s[1].length), n = o(f));
|
|
112
|
+
}
|
|
113
|
+
if (n.length <= e || (f.host && (f.host = f.host.replace(/^www\./, ""), n = o(f)), n.length <= e))
|
|
114
|
+
return n;
|
|
115
|
+
var c = "";
|
|
116
|
+
if (f.host && (c += f.host), c.length >= l)
|
|
117
|
+
return f.host.length == e ? (f.host.substr(0, e - r) + t).substr(0, l + u) : g(c, l).substr(0, l + u);
|
|
118
|
+
var a = "";
|
|
119
|
+
if (f.path && (a += "/" + f.path), f.query && (a += "?" + f.query), a)
|
|
120
|
+
if ((c + a).length >= l) {
|
|
121
|
+
if ((c + a).length == e)
|
|
122
|
+
return (c + a).substr(0, e);
|
|
123
|
+
var p = l - c.length;
|
|
124
|
+
return (c + g(a, p)).substr(0, l + u);
|
|
125
|
+
} else
|
|
126
|
+
c += a;
|
|
127
|
+
if (f.fragment) {
|
|
128
|
+
var B = "#" + f.fragment;
|
|
129
|
+
if ((c + B).length >= l) {
|
|
130
|
+
if ((c + B).length == e)
|
|
131
|
+
return (c + B).substr(0, e);
|
|
132
|
+
var k = l - c.length;
|
|
133
|
+
return (c + g(B, k)).substr(0, l + u);
|
|
134
|
+
} else
|
|
135
|
+
c += B;
|
|
136
|
+
}
|
|
137
|
+
if (f.scheme && f.host) {
|
|
138
|
+
var x = f.scheme + "://";
|
|
139
|
+
if ((c + x).length < l)
|
|
140
|
+
return (x + c).substr(0, e);
|
|
141
|
+
}
|
|
142
|
+
if (c.length <= e)
|
|
143
|
+
return c;
|
|
144
|
+
var F = "";
|
|
145
|
+
return l > 0 && (F = c.substr(-1 * Math.floor(l / 2))), (c.substr(0, Math.ceil(l / 2)) + t + F).substr(0, l + u);
|
|
146
|
+
}
|
|
147
|
+
function Ne(n, e, t) {
|
|
148
|
+
if (n.length <= e)
|
|
149
|
+
return n;
|
|
150
|
+
var u, r;
|
|
151
|
+
t == null ? (t = "…", u = 8, r = 3) : (u = t.length, r = t.length);
|
|
152
|
+
var h = e - r, o = "";
|
|
153
|
+
return h > 0 && (o = n.substr(-1 * Math.floor(h / 2))), (n.substr(0, Math.ceil(h / 2)) + t + o).substr(0, h + u);
|
|
154
|
+
}
|
|
155
|
+
function ze(n, e, t) {
|
|
156
|
+
return Te(n, e, t);
|
|
157
|
+
}
|
|
158
|
+
var te = (
|
|
159
|
+
/** @class */
|
|
160
|
+
function() {
|
|
161
|
+
function n(e) {
|
|
162
|
+
e === void 0 && (e = {}), this.newWindow = !1, this.truncate = {}, this.className = "", this.newWindow = e.newWindow || !1, this.truncate = e.truncate || {}, this.className = e.className || "";
|
|
163
|
+
}
|
|
164
|
+
return n.prototype.build = function(e) {
|
|
165
|
+
return new K({
|
|
166
|
+
tagName: "a",
|
|
167
|
+
attrs: this.createAttrs(e),
|
|
168
|
+
innerHtml: this.processAnchorText(e.getAnchorText())
|
|
169
|
+
});
|
|
170
|
+
}, n.prototype.createAttrs = function(e) {
|
|
171
|
+
var t = {
|
|
172
|
+
href: e.getAnchorHref()
|
|
173
|
+
// we'll always have the `href` attribute
|
|
174
|
+
}, u = this.createCssClass(e);
|
|
175
|
+
return u && (t.class = u), this.newWindow && (t.target = "_blank", t.rel = "noopener noreferrer"), this.truncate && this.truncate.length && this.truncate.length < e.getAnchorText().length && (t.title = e.getAnchorHref()), t;
|
|
176
|
+
}, n.prototype.createCssClass = function(e) {
|
|
177
|
+
var t = this.className;
|
|
178
|
+
if (t) {
|
|
179
|
+
for (var u = [t], r = e.getCssClassSuffixes(), h = 0, o = r.length; h < o; h++)
|
|
180
|
+
u.push(t + "-" + r[h]);
|
|
181
|
+
return u.join(" ");
|
|
182
|
+
} else
|
|
183
|
+
return "";
|
|
184
|
+
}, n.prototype.processAnchorText = function(e) {
|
|
185
|
+
return e = this.doTruncate(e), e;
|
|
186
|
+
}, n.prototype.doTruncate = function(e) {
|
|
187
|
+
var t = this.truncate;
|
|
188
|
+
if (!t || !t.length)
|
|
189
|
+
return e;
|
|
190
|
+
var u = t.length, r = t.location;
|
|
191
|
+
return r === "smart" ? Pe(e, u) : r === "middle" ? Ne(e, u) : ze(e, u);
|
|
192
|
+
}, n;
|
|
193
|
+
}()
|
|
194
|
+
), q = (
|
|
195
|
+
/** @class */
|
|
196
|
+
function() {
|
|
197
|
+
function n(e) {
|
|
198
|
+
this.__jsduckDummyDocProp = null, this.matchedText = "", this.offset = 0, this.tagBuilder = e.tagBuilder, this.matchedText = e.matchedText, this.offset = e.offset;
|
|
199
|
+
}
|
|
200
|
+
return n.prototype.getMatchedText = function() {
|
|
201
|
+
return this.matchedText;
|
|
202
|
+
}, n.prototype.setOffset = function(e) {
|
|
203
|
+
this.offset = e;
|
|
204
|
+
}, n.prototype.getOffset = function() {
|
|
205
|
+
return this.offset;
|
|
206
|
+
}, n.prototype.getCssClassSuffixes = function() {
|
|
207
|
+
return [this.getType()];
|
|
208
|
+
}, n.prototype.buildTag = function() {
|
|
209
|
+
return this.tagBuilder.build(this);
|
|
210
|
+
}, n;
|
|
211
|
+
}()
|
|
212
|
+
), ce = (
|
|
213
|
+
/** @class */
|
|
214
|
+
function(n) {
|
|
215
|
+
z(e, n);
|
|
216
|
+
function e(t) {
|
|
217
|
+
var u = n.call(this, t) || this;
|
|
218
|
+
return u.email = "", u.email = t.email, u;
|
|
219
|
+
}
|
|
220
|
+
return e.prototype.getType = function() {
|
|
221
|
+
return "email";
|
|
222
|
+
}, e.prototype.getEmail = function() {
|
|
223
|
+
return this.email;
|
|
224
|
+
}, e.prototype.getAnchorHref = function() {
|
|
225
|
+
return "mailto:" + this.email;
|
|
226
|
+
}, e.prototype.getAnchorText = function() {
|
|
227
|
+
return this.email;
|
|
228
|
+
}, e;
|
|
229
|
+
}(q)
|
|
230
|
+
), he = (
|
|
231
|
+
/** @class */
|
|
232
|
+
function(n) {
|
|
233
|
+
z(e, n);
|
|
234
|
+
function e(t) {
|
|
235
|
+
var u = n.call(this, t) || this;
|
|
236
|
+
return u.serviceName = "", u.hashtag = "", u.serviceName = t.serviceName, u.hashtag = t.hashtag, u;
|
|
237
|
+
}
|
|
238
|
+
return e.prototype.getType = function() {
|
|
239
|
+
return "hashtag";
|
|
240
|
+
}, e.prototype.getServiceName = function() {
|
|
241
|
+
return this.serviceName;
|
|
242
|
+
}, e.prototype.getHashtag = function() {
|
|
243
|
+
return this.hashtag;
|
|
244
|
+
}, e.prototype.getAnchorHref = function() {
|
|
245
|
+
var t = this.serviceName, u = this.hashtag;
|
|
246
|
+
switch (t) {
|
|
247
|
+
case "twitter":
|
|
248
|
+
return "https://twitter.com/hashtag/" + u;
|
|
249
|
+
case "facebook":
|
|
250
|
+
return "https://www.facebook.com/hashtag/" + u;
|
|
251
|
+
case "instagram":
|
|
252
|
+
return "https://instagram.com/explore/tags/" + u;
|
|
253
|
+
case "tiktok":
|
|
254
|
+
return "https://www.tiktok.com/tag/" + u;
|
|
255
|
+
default:
|
|
256
|
+
throw new Error("Unknown service name to point hashtag to: " + t);
|
|
257
|
+
}
|
|
258
|
+
}, e.prototype.getAnchorText = function() {
|
|
259
|
+
return "#" + this.hashtag;
|
|
260
|
+
}, e;
|
|
261
|
+
}(q)
|
|
262
|
+
), fe = (
|
|
263
|
+
/** @class */
|
|
264
|
+
function(n) {
|
|
265
|
+
z(e, n);
|
|
266
|
+
function e(t) {
|
|
267
|
+
var u = n.call(this, t) || this;
|
|
268
|
+
return u.serviceName = "twitter", u.mention = "", u.mention = t.mention, u.serviceName = t.serviceName, u;
|
|
269
|
+
}
|
|
270
|
+
return e.prototype.getType = function() {
|
|
271
|
+
return "mention";
|
|
272
|
+
}, e.prototype.getMention = function() {
|
|
273
|
+
return this.mention;
|
|
274
|
+
}, e.prototype.getServiceName = function() {
|
|
275
|
+
return this.serviceName;
|
|
276
|
+
}, e.prototype.getAnchorHref = function() {
|
|
277
|
+
switch (this.serviceName) {
|
|
278
|
+
case "twitter":
|
|
279
|
+
return "https://twitter.com/" + this.mention;
|
|
280
|
+
case "instagram":
|
|
281
|
+
return "https://instagram.com/" + this.mention;
|
|
282
|
+
case "soundcloud":
|
|
283
|
+
return "https://soundcloud.com/" + this.mention;
|
|
284
|
+
case "tiktok":
|
|
285
|
+
return "https://www.tiktok.com/@" + this.mention;
|
|
286
|
+
default:
|
|
287
|
+
throw new Error("Unknown service name to point mention to: " + this.serviceName);
|
|
288
|
+
}
|
|
289
|
+
}, e.prototype.getAnchorText = function() {
|
|
290
|
+
return "@" + this.mention;
|
|
291
|
+
}, e.prototype.getCssClassSuffixes = function() {
|
|
292
|
+
var t = n.prototype.getCssClassSuffixes.call(this), u = this.getServiceName();
|
|
293
|
+
return u && t.push(u), t;
|
|
294
|
+
}, e;
|
|
295
|
+
}(q)
|
|
296
|
+
), ge = (
|
|
297
|
+
/** @class */
|
|
298
|
+
function(n) {
|
|
299
|
+
z(e, n);
|
|
300
|
+
function e(t) {
|
|
301
|
+
var u = n.call(this, t) || this;
|
|
302
|
+
return u.number = "", u.plusSign = !1, u.number = t.number, u.plusSign = t.plusSign, u;
|
|
303
|
+
}
|
|
304
|
+
return e.prototype.getType = function() {
|
|
305
|
+
return "phone";
|
|
306
|
+
}, e.prototype.getPhoneNumber = function() {
|
|
307
|
+
return this.number;
|
|
308
|
+
}, e.prototype.getNumber = function() {
|
|
309
|
+
return this.getPhoneNumber();
|
|
310
|
+
}, e.prototype.getAnchorHref = function() {
|
|
311
|
+
return "tel:" + (this.plusSign ? "+" : "") + this.number;
|
|
312
|
+
}, e.prototype.getAnchorText = function() {
|
|
313
|
+
return this.matchedText;
|
|
314
|
+
}, e;
|
|
315
|
+
}(q)
|
|
316
|
+
), pe = (
|
|
317
|
+
/** @class */
|
|
318
|
+
function(n) {
|
|
319
|
+
z(e, n);
|
|
320
|
+
function e(t) {
|
|
321
|
+
var u = n.call(this, t) || this;
|
|
322
|
+
return u.url = "", u.urlMatchType = "scheme", u.protocolUrlMatch = !1, u.protocolRelativeMatch = !1, u.stripPrefix = {
|
|
323
|
+
scheme: !0,
|
|
324
|
+
www: !0
|
|
325
|
+
}, u.stripTrailingSlash = !0, u.decodePercentEncoding = !0, u.schemePrefixRegex = /^(https?:\/\/)?/i, u.wwwPrefixRegex = /^(https?:\/\/)?(www\.)?/i, u.protocolRelativeRegex = /^\/\//, u.protocolPrepended = !1, u.urlMatchType = t.urlMatchType, u.url = t.url, u.protocolUrlMatch = t.protocolUrlMatch, u.protocolRelativeMatch = t.protocolRelativeMatch, u.stripPrefix = t.stripPrefix, u.stripTrailingSlash = t.stripTrailingSlash, u.decodePercentEncoding = t.decodePercentEncoding, u;
|
|
326
|
+
}
|
|
327
|
+
return e.prototype.getType = function() {
|
|
328
|
+
return "url";
|
|
329
|
+
}, e.prototype.getUrlMatchType = function() {
|
|
330
|
+
return this.urlMatchType;
|
|
331
|
+
}, e.prototype.getUrl = function() {
|
|
332
|
+
var t = this.url;
|
|
333
|
+
return !this.protocolRelativeMatch && !this.protocolUrlMatch && !this.protocolPrepended && (t = this.url = "http://" + t, this.protocolPrepended = !0), t;
|
|
334
|
+
}, e.prototype.getAnchorHref = function() {
|
|
335
|
+
var t = this.getUrl();
|
|
336
|
+
return t.replace(/&/g, "&");
|
|
337
|
+
}, e.prototype.getAnchorText = function() {
|
|
338
|
+
var t = this.getMatchedText();
|
|
339
|
+
return this.protocolRelativeMatch && (t = this.stripProtocolRelativePrefix(t)), this.stripPrefix.scheme && (t = this.stripSchemePrefix(t)), this.stripPrefix.www && (t = this.stripWwwPrefix(t)), this.stripTrailingSlash && (t = this.removeTrailingSlash(t)), this.decodePercentEncoding && (t = this.removePercentEncoding(t)), t;
|
|
340
|
+
}, e.prototype.stripSchemePrefix = function(t) {
|
|
341
|
+
return t.replace(this.schemePrefixRegex, "");
|
|
342
|
+
}, e.prototype.stripWwwPrefix = function(t) {
|
|
343
|
+
return t.replace(this.wwwPrefixRegex, "$1");
|
|
344
|
+
}, e.prototype.stripProtocolRelativePrefix = function(t) {
|
|
345
|
+
return t.replace(this.protocolRelativeRegex, "");
|
|
346
|
+
}, e.prototype.removeTrailingSlash = function(t) {
|
|
347
|
+
return t.charAt(t.length - 1) === "/" && (t = t.slice(0, -1)), t;
|
|
348
|
+
}, e.prototype.removePercentEncoding = function(t) {
|
|
349
|
+
var u = t.replace(/%22/gi, """).replace(/%26/gi, "&").replace(/%27/gi, "'").replace(/%3C/gi, "<").replace(/%3E/gi, ">");
|
|
350
|
+
try {
|
|
351
|
+
return decodeURIComponent(u);
|
|
352
|
+
} catch {
|
|
353
|
+
return u;
|
|
354
|
+
}
|
|
355
|
+
}, e;
|
|
356
|
+
}(q)
|
|
357
|
+
), H = (
|
|
358
|
+
/** @class */
|
|
359
|
+
/* @__PURE__ */ function() {
|
|
360
|
+
function n(e) {
|
|
361
|
+
this.__jsduckDummyDocProp = null, this.tagBuilder = e.tagBuilder;
|
|
362
|
+
}
|
|
363
|
+
return n;
|
|
364
|
+
}()
|
|
365
|
+
), Y = /[A-Za-z]/, Se = /[\d]/, je = /[\D]/, j = /\s/, G = /['"]/, qe = /[\x00-\x1F\x7F]/, de = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, He = /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source, Ue = /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, me = de + He + Ue, W = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, Oe = me + W, w = me + W, U = new RegExp("[".concat(w, "]")), Ie = "(?:[" + W + "]{1,3}\\.){3}[" + W + "]{1,3}", We = "[" + w + "](?:[" + w + "\\-_]{0,61}[" + w + "])?", ue = function(n) {
|
|
366
|
+
return "(?=(" + We + "))\\" + n;
|
|
367
|
+
}, J = function(n) {
|
|
368
|
+
return "(?:" + ue(n) + "(?:\\." + ue(n + 1) + "){0,126}|" + Ie + ")";
|
|
369
|
+
}, O = U, Ae = /(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/, _e = new RegExp("[".concat(w, "!#$%&'*+/=?^_`{|}~-]")), Ve = new RegExp("^".concat(Ae.source, "$")), ne = (
|
|
370
|
+
/** @class */
|
|
371
|
+
function(n) {
|
|
372
|
+
z(e, n);
|
|
373
|
+
function e() {
|
|
374
|
+
var t = n !== null && n.apply(this, arguments) || this;
|
|
375
|
+
return t.localPartCharRegex = _e, t.strictTldRegex = Ve, t;
|
|
376
|
+
}
|
|
377
|
+
return e.prototype.parseMatches = function(t) {
|
|
378
|
+
for (var u = this.tagBuilder, r = this.localPartCharRegex, h = this.strictTldRegex, o = [], g = t.length, l = new I(), f = {
|
|
379
|
+
m: "a",
|
|
380
|
+
a: "i",
|
|
381
|
+
i: "l",
|
|
382
|
+
l: "t",
|
|
383
|
+
t: "o",
|
|
384
|
+
o: ":"
|
|
385
|
+
}, s = 0, c = 0, a = l; s < g; ) {
|
|
386
|
+
var p = t.charAt(s);
|
|
387
|
+
switch (c) {
|
|
388
|
+
case 0:
|
|
389
|
+
B(p);
|
|
390
|
+
break;
|
|
391
|
+
case 1:
|
|
392
|
+
k(t.charAt(s - 1), p);
|
|
393
|
+
break;
|
|
394
|
+
case 2:
|
|
395
|
+
x(p);
|
|
396
|
+
break;
|
|
397
|
+
case 3:
|
|
398
|
+
F(p);
|
|
399
|
+
break;
|
|
400
|
+
case 4:
|
|
401
|
+
A(p);
|
|
402
|
+
break;
|
|
403
|
+
case 5:
|
|
404
|
+
v(p);
|
|
405
|
+
break;
|
|
406
|
+
case 6:
|
|
407
|
+
b(p);
|
|
408
|
+
break;
|
|
409
|
+
case 7:
|
|
410
|
+
m(p);
|
|
411
|
+
break;
|
|
412
|
+
default:
|
|
413
|
+
X(c);
|
|
414
|
+
}
|
|
415
|
+
s++;
|
|
416
|
+
}
|
|
417
|
+
return M(), o;
|
|
418
|
+
function B(d) {
|
|
419
|
+
d === "m" ? D(
|
|
420
|
+
1
|
|
421
|
+
/* Mailto */
|
|
422
|
+
) : r.test(d) && D();
|
|
423
|
+
}
|
|
424
|
+
function k(d, T) {
|
|
425
|
+
d === ":" ? r.test(T) ? (c = 2, a = new I(C(C({}, a), { hasMailtoPrefix: !0 }))) : y() : f[d] === T || (r.test(T) ? c = 2 : T === "." ? c = 3 : T === "@" ? c = 4 : y());
|
|
426
|
+
}
|
|
427
|
+
function x(d) {
|
|
428
|
+
d === "." ? c = 3 : d === "@" ? c = 4 : r.test(d) || y();
|
|
429
|
+
}
|
|
430
|
+
function F(d) {
|
|
431
|
+
d === "." || d === "@" ? y() : r.test(d) ? c = 2 : y();
|
|
432
|
+
}
|
|
433
|
+
function A(d) {
|
|
434
|
+
O.test(d) ? c = 5 : y();
|
|
435
|
+
}
|
|
436
|
+
function v(d) {
|
|
437
|
+
d === "." ? c = 7 : d === "-" ? c = 6 : O.test(d) || M();
|
|
438
|
+
}
|
|
439
|
+
function b(d) {
|
|
440
|
+
d === "-" || d === "." ? M() : O.test(d) ? c = 5 : M();
|
|
441
|
+
}
|
|
442
|
+
function m(d) {
|
|
443
|
+
d === "." || d === "-" ? M() : O.test(d) ? (c = 5, a = new I(C(C({}, a), { hasDomainDot: !0 }))) : M();
|
|
444
|
+
}
|
|
445
|
+
function D(d) {
|
|
446
|
+
d === void 0 && (d = 2), c = d, a = new I({ idx: s });
|
|
447
|
+
}
|
|
448
|
+
function y() {
|
|
449
|
+
c = 0, a = l;
|
|
450
|
+
}
|
|
451
|
+
function M() {
|
|
452
|
+
if (a.hasDomainDot) {
|
|
453
|
+
var d = t.slice(a.idx, s);
|
|
454
|
+
/[-.]$/.test(d) && (d = d.slice(0, -1));
|
|
455
|
+
var T = a.hasMailtoPrefix ? d.slice(7) : d;
|
|
456
|
+
_(T) && o.push(new ce({
|
|
457
|
+
tagBuilder: u,
|
|
458
|
+
matchedText: d,
|
|
459
|
+
offset: a.idx,
|
|
460
|
+
email: T
|
|
461
|
+
}));
|
|
462
|
+
}
|
|
463
|
+
y();
|
|
464
|
+
function _(V) {
|
|
465
|
+
var L = V.split(".").pop() || "", $ = L.toLowerCase(), Z = h.test($);
|
|
466
|
+
return Z;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}, e;
|
|
470
|
+
}(H)
|
|
471
|
+
), I = (
|
|
472
|
+
/** @class */
|
|
473
|
+
/* @__PURE__ */ function() {
|
|
474
|
+
function n(e) {
|
|
475
|
+
e === void 0 && (e = {}), this.idx = e.idx !== void 0 ? e.idx : -1, this.hasMailtoPrefix = !!e.hasMailtoPrefix, this.hasDomainDot = !!e.hasDomainDot;
|
|
476
|
+
}
|
|
477
|
+
return n;
|
|
478
|
+
}()
|
|
479
|
+
), Le = (
|
|
480
|
+
/** @class */
|
|
481
|
+
function() {
|
|
482
|
+
function n() {
|
|
483
|
+
}
|
|
484
|
+
return n.isValid = function(e, t) {
|
|
485
|
+
return !(t && !this.isValidUriScheme(t) || this.urlMatchDoesNotHaveProtocolOrDot(e, t) || // At least one period ('.') must exist in the URL match for us to consider it an actual URL, *unless* it was a full protocol match (like 'http://localhost')
|
|
486
|
+
this.urlMatchDoesNotHaveAtLeastOneWordChar(e, t) && // At least one letter character must exist in the domain name after a protocol match. Ex: skip over something like "git:1.0"
|
|
487
|
+
!this.isValidIpAddress(e) || // Except if it's an IP address
|
|
488
|
+
this.containsMultipleDots(e));
|
|
489
|
+
}, n.isValidIpAddress = function(e) {
|
|
490
|
+
var t = new RegExp(this.hasFullProtocolRegex.source + this.ipRegex.source), u = e.match(t);
|
|
491
|
+
return u !== null;
|
|
492
|
+
}, n.containsMultipleDots = function(e) {
|
|
493
|
+
var t = e;
|
|
494
|
+
return this.hasFullProtocolRegex.test(e) && (t = e.split("://")[1]), t.split("/")[0].indexOf("..") > -1;
|
|
495
|
+
}, n.isValidUriScheme = function(e) {
|
|
496
|
+
var t = e.match(this.uriSchemeRegex), u = t && t[0].toLowerCase();
|
|
497
|
+
return u !== "javascript:" && u !== "vbscript:";
|
|
498
|
+
}, n.urlMatchDoesNotHaveProtocolOrDot = function(e, t) {
|
|
499
|
+
return !!e && (!t || !this.hasFullProtocolRegex.test(t)) && e.indexOf(".") === -1;
|
|
500
|
+
}, n.urlMatchDoesNotHaveAtLeastOneWordChar = function(e, t) {
|
|
501
|
+
return e && t ? !this.hasFullProtocolRegex.test(t) && !this.hasWordCharAfterProtocolRegex.test(e) : !1;
|
|
502
|
+
}, n.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//, n.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/, n.hasWordCharAfterProtocolRegex = new RegExp(":[^\\s]*?[" + de + "]"), n.ipRegex = /[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/, n;
|
|
503
|
+
}()
|
|
504
|
+
), $e = function() {
|
|
505
|
+
var n = /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/, e = /(?:www\.)/, t = new RegExp("[/?#](?:[" + w + "\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*[" + w + "\\-+&@#/%=~_()|'$*\\[\\]{}✓])?");
|
|
506
|
+
return new RegExp([
|
|
507
|
+
"(?:",
|
|
508
|
+
"(",
|
|
509
|
+
n.source,
|
|
510
|
+
J(2),
|
|
511
|
+
")",
|
|
512
|
+
"|",
|
|
513
|
+
"(",
|
|
514
|
+
"(//)?",
|
|
515
|
+
e.source,
|
|
516
|
+
J(6),
|
|
517
|
+
")",
|
|
518
|
+
"|",
|
|
519
|
+
"(",
|
|
520
|
+
"(//)?",
|
|
521
|
+
J(10) + "\\.",
|
|
522
|
+
Ae.source,
|
|
523
|
+
"(?![-" + Oe + "])",
|
|
524
|
+
")",
|
|
525
|
+
")",
|
|
526
|
+
"(?::[0-9]+)?",
|
|
527
|
+
"(?:" + t.source + ")?"
|
|
528
|
+
// match for path, query string, and/or hash anchor - optional
|
|
529
|
+
].join(""), "gi");
|
|
530
|
+
}(), Ze = new RegExp("[" + w + "]"), ie = (
|
|
531
|
+
/** @class */
|
|
532
|
+
function(n) {
|
|
533
|
+
z(e, n);
|
|
534
|
+
function e(t) {
|
|
535
|
+
var u = n.call(this, t) || this;
|
|
536
|
+
return u.stripPrefix = {
|
|
537
|
+
scheme: !0,
|
|
538
|
+
www: !0
|
|
539
|
+
}, u.stripTrailingSlash = !0, u.decodePercentEncoding = !0, u.matcherRegex = $e, u.wordCharRegExp = Ze, u.stripPrefix = t.stripPrefix, u.stripTrailingSlash = t.stripTrailingSlash, u.decodePercentEncoding = t.decodePercentEncoding, u;
|
|
540
|
+
}
|
|
541
|
+
return e.prototype.parseMatches = function(t) {
|
|
542
|
+
for (var u = this.matcherRegex, r = this.stripPrefix, h = this.stripTrailingSlash, o = this.decodePercentEncoding, g = this.tagBuilder, l = [], f, s = function() {
|
|
543
|
+
var a = f[0], p = f[1], B = f[4], k = f[5], x = f[9], F = f.index, A = k || x, v = t.charAt(F - 1);
|
|
544
|
+
if (!Le.isValid(a, p) || F > 0 && v === "@" || F > 0 && A && c.wordCharRegExp.test(v))
|
|
545
|
+
return "continue";
|
|
546
|
+
if (/\?$/.test(a) && (a = a.substr(0, a.length - 1)), c.matchHasUnbalancedClosingParen(a))
|
|
547
|
+
a = a.substr(0, a.length - 1);
|
|
548
|
+
else {
|
|
549
|
+
var b = c.matchHasInvalidCharAfterTld(a, p);
|
|
550
|
+
b > -1 && (a = a.substr(0, b));
|
|
551
|
+
}
|
|
552
|
+
var m = ["http://", "https://"].find(function(d) {
|
|
553
|
+
return !!p && p.indexOf(d) !== -1;
|
|
554
|
+
});
|
|
555
|
+
if (m) {
|
|
556
|
+
var D = a.indexOf(m);
|
|
557
|
+
a = a.substr(D), p = p.substr(D), F = F + D;
|
|
558
|
+
}
|
|
559
|
+
var y = p ? "scheme" : B ? "www" : "tld", M = !!p;
|
|
560
|
+
l.push(new pe({
|
|
561
|
+
tagBuilder: g,
|
|
562
|
+
matchedText: a,
|
|
563
|
+
offset: F,
|
|
564
|
+
urlMatchType: y,
|
|
565
|
+
url: a,
|
|
566
|
+
protocolUrlMatch: M,
|
|
567
|
+
protocolRelativeMatch: !!A,
|
|
568
|
+
stripPrefix: r,
|
|
569
|
+
stripTrailingSlash: h,
|
|
570
|
+
decodePercentEncoding: o
|
|
571
|
+
}));
|
|
572
|
+
}, c = this; (f = u.exec(t)) !== null; )
|
|
573
|
+
s();
|
|
574
|
+
return l;
|
|
575
|
+
}, e.prototype.matchHasUnbalancedClosingParen = function(t) {
|
|
576
|
+
var u = t.charAt(t.length - 1), r;
|
|
577
|
+
if (u === ")")
|
|
578
|
+
r = "(";
|
|
579
|
+
else if (u === "]")
|
|
580
|
+
r = "[";
|
|
581
|
+
else if (u === "}")
|
|
582
|
+
r = "{";
|
|
583
|
+
else
|
|
584
|
+
return !1;
|
|
585
|
+
for (var h = 0, o = 0, g = t.length - 1; o < g; o++) {
|
|
586
|
+
var l = t.charAt(o);
|
|
587
|
+
l === r ? h++ : l === u && (h = Math.max(h - 1, 0));
|
|
588
|
+
}
|
|
589
|
+
return h === 0;
|
|
590
|
+
}, e.prototype.matchHasInvalidCharAfterTld = function(t, u) {
|
|
591
|
+
if (!t)
|
|
592
|
+
return -1;
|
|
593
|
+
var r = 0;
|
|
594
|
+
u && (r = t.indexOf(":"), t = t.slice(r));
|
|
595
|
+
var h = new RegExp("^((.?//)?[-." + w + "]*[-" + w + "]\\.[-" + w + "]+)"), o = h.exec(t);
|
|
596
|
+
return o === null ? -1 : (r += o[1].length, t = t.slice(o[1].length), /^[^-.A-Za-z0-9:\/?#]/.test(t) ? r : -1);
|
|
597
|
+
}, e;
|
|
598
|
+
}(H)
|
|
599
|
+
), re = new RegExp("[_".concat(w, "]")), ae = (
|
|
600
|
+
/** @class */
|
|
601
|
+
function(n) {
|
|
602
|
+
z(e, n);
|
|
603
|
+
function e(t) {
|
|
604
|
+
var u = n.call(this, t) || this;
|
|
605
|
+
return u.serviceName = "twitter", u.serviceName = t.serviceName, u;
|
|
606
|
+
}
|
|
607
|
+
return e.prototype.parseMatches = function(t) {
|
|
608
|
+
for (var u = this.tagBuilder, r = this.serviceName, h = [], o = t.length, g = 0, l = -1, f = 0; g < o; ) {
|
|
609
|
+
var s = t.charAt(g);
|
|
610
|
+
switch (f) {
|
|
611
|
+
case 0:
|
|
612
|
+
c(s);
|
|
613
|
+
break;
|
|
614
|
+
case 1:
|
|
615
|
+
a(s);
|
|
616
|
+
break;
|
|
617
|
+
case 2:
|
|
618
|
+
p(s);
|
|
619
|
+
break;
|
|
620
|
+
case 3:
|
|
621
|
+
B(s);
|
|
622
|
+
break;
|
|
623
|
+
default:
|
|
624
|
+
X(f);
|
|
625
|
+
}
|
|
626
|
+
g++;
|
|
627
|
+
}
|
|
628
|
+
return k(), h;
|
|
629
|
+
function c(x) {
|
|
630
|
+
x === "#" ? (f = 2, l = g) : U.test(x) && (f = 1);
|
|
631
|
+
}
|
|
632
|
+
function a(x) {
|
|
633
|
+
U.test(x) || (f = 0);
|
|
634
|
+
}
|
|
635
|
+
function p(x) {
|
|
636
|
+
re.test(x) ? f = 3 : U.test(x) ? f = 1 : f = 0;
|
|
637
|
+
}
|
|
638
|
+
function B(x) {
|
|
639
|
+
re.test(x) || (k(), l = -1, U.test(x) ? f = 1 : f = 0);
|
|
640
|
+
}
|
|
641
|
+
function k() {
|
|
642
|
+
if (l > -1 && g - l <= 140) {
|
|
643
|
+
var x = t.slice(l, g), F = new he({
|
|
644
|
+
tagBuilder: u,
|
|
645
|
+
matchedText: x,
|
|
646
|
+
offset: l,
|
|
647
|
+
serviceName: r,
|
|
648
|
+
hashtag: x.slice(1)
|
|
649
|
+
});
|
|
650
|
+
h.push(F);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}, e;
|
|
654
|
+
}(H)
|
|
655
|
+
), Qe = ["twitter", "facebook", "instagram", "tiktok"], Ye = /(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/, Ge = /(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/, Je = new RegExp("".concat(Ye.source, "|").concat(Ge.source), "g"), se = (
|
|
656
|
+
/** @class */
|
|
657
|
+
function(n) {
|
|
658
|
+
z(e, n);
|
|
659
|
+
function e() {
|
|
660
|
+
var t = n !== null && n.apply(this, arguments) || this;
|
|
661
|
+
return t.matcherRegex = Je, t;
|
|
662
|
+
}
|
|
663
|
+
return e.prototype.parseMatches = function(t) {
|
|
664
|
+
for (var u = this.matcherRegex, r = this.tagBuilder, h = [], o; (o = u.exec(t)) !== null; ) {
|
|
665
|
+
var g = o[0], l = g.replace(/[^0-9,;#]/g, ""), f = !!(o[1] || o[2]), s = o.index == 0 ? "" : t.substr(o.index - 1, 1), c = t.substr(o.index + g.length, 1), a = !s.match(/\d/) && !c.match(/\d/);
|
|
666
|
+
this.testMatch(o[3]) && this.testMatch(g) && a && h.push(new ge({
|
|
667
|
+
tagBuilder: r,
|
|
668
|
+
matchedText: g,
|
|
669
|
+
offset: o.index,
|
|
670
|
+
number: l,
|
|
671
|
+
plusSign: f
|
|
672
|
+
}));
|
|
673
|
+
}
|
|
674
|
+
return h;
|
|
675
|
+
}, e.prototype.testMatch = function(t) {
|
|
676
|
+
return je.test(t);
|
|
677
|
+
}, e;
|
|
678
|
+
}(H)
|
|
679
|
+
), Ke = new RegExp("@[_".concat(w, "]{1,50}(?![_").concat(w, "])"), "g"), Xe = new RegExp("@[_.".concat(w, "]{1,30}(?![_").concat(w, "])"), "g"), et = new RegExp("@[-_.".concat(w, "]{1,50}(?![-_").concat(w, "])"), "g"), tt = new RegExp("@[_.".concat(w, "]{1,23}[_").concat(w, "](?![_").concat(w, "])"), "g"), ut = new RegExp("[^" + w + "]"), oe = (
|
|
680
|
+
/** @class */
|
|
681
|
+
function(n) {
|
|
682
|
+
z(e, n);
|
|
683
|
+
function e(t) {
|
|
684
|
+
var u = n.call(this, t) || this;
|
|
685
|
+
return u.serviceName = "twitter", u.matcherRegexes = {
|
|
686
|
+
twitter: Ke,
|
|
687
|
+
instagram: Xe,
|
|
688
|
+
soundcloud: et,
|
|
689
|
+
tiktok: tt
|
|
690
|
+
}, u.nonWordCharRegex = ut, u.serviceName = t.serviceName, u;
|
|
691
|
+
}
|
|
692
|
+
return e.prototype.parseMatches = function(t) {
|
|
693
|
+
var u = this.serviceName, r = this.matcherRegexes[this.serviceName], h = this.nonWordCharRegex, o = this.tagBuilder, g = [], l;
|
|
694
|
+
if (!r)
|
|
695
|
+
return g;
|
|
696
|
+
for (; (l = r.exec(t)) !== null; ) {
|
|
697
|
+
var f = l.index, s = t.charAt(f - 1);
|
|
698
|
+
if (f === 0 || h.test(s)) {
|
|
699
|
+
var c = l[0].replace(/\.+$/g, ""), a = c.slice(1);
|
|
700
|
+
g.push(new fe({
|
|
701
|
+
tagBuilder: o,
|
|
702
|
+
matchedText: c,
|
|
703
|
+
offset: f,
|
|
704
|
+
serviceName: u,
|
|
705
|
+
mention: a
|
|
706
|
+
}));
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return g;
|
|
710
|
+
}, e;
|
|
711
|
+
}(H)
|
|
712
|
+
);
|
|
713
|
+
function nt(n, e) {
|
|
714
|
+
for (var t = e.onOpenTag, u = e.onCloseTag, r = e.onText, h = e.onComment, o = e.onDoctype, g = new N(), l = 0, f = n.length, s = 0, c = 0, a = g; l < f; ) {
|
|
715
|
+
var p = n.charAt(l);
|
|
716
|
+
switch (s) {
|
|
717
|
+
case 0:
|
|
718
|
+
B(p);
|
|
719
|
+
break;
|
|
720
|
+
case 1:
|
|
721
|
+
k(p);
|
|
722
|
+
break;
|
|
723
|
+
case 2:
|
|
724
|
+
F(p);
|
|
725
|
+
break;
|
|
726
|
+
case 3:
|
|
727
|
+
x(p);
|
|
728
|
+
break;
|
|
729
|
+
case 4:
|
|
730
|
+
A(p);
|
|
731
|
+
break;
|
|
732
|
+
case 5:
|
|
733
|
+
v(p);
|
|
734
|
+
break;
|
|
735
|
+
case 6:
|
|
736
|
+
b(p);
|
|
737
|
+
break;
|
|
738
|
+
case 7:
|
|
739
|
+
m(p);
|
|
740
|
+
break;
|
|
741
|
+
case 8:
|
|
742
|
+
D(p);
|
|
743
|
+
break;
|
|
744
|
+
case 9:
|
|
745
|
+
y(p);
|
|
746
|
+
break;
|
|
747
|
+
case 10:
|
|
748
|
+
M(p);
|
|
749
|
+
break;
|
|
750
|
+
case 11:
|
|
751
|
+
d(p);
|
|
752
|
+
break;
|
|
753
|
+
case 12:
|
|
754
|
+
T(p);
|
|
755
|
+
break;
|
|
756
|
+
case 13:
|
|
757
|
+
_();
|
|
758
|
+
break;
|
|
759
|
+
case 14:
|
|
760
|
+
V(p);
|
|
761
|
+
break;
|
|
762
|
+
case 15:
|
|
763
|
+
L(p);
|
|
764
|
+
break;
|
|
765
|
+
case 16:
|
|
766
|
+
$(p);
|
|
767
|
+
break;
|
|
768
|
+
case 17:
|
|
769
|
+
Z(p);
|
|
770
|
+
break;
|
|
771
|
+
case 18:
|
|
772
|
+
ve(p);
|
|
773
|
+
break;
|
|
774
|
+
case 19:
|
|
775
|
+
we(p);
|
|
776
|
+
break;
|
|
777
|
+
case 20:
|
|
778
|
+
Ce(p);
|
|
779
|
+
break;
|
|
780
|
+
default:
|
|
781
|
+
X(s);
|
|
782
|
+
}
|
|
783
|
+
l++;
|
|
784
|
+
}
|
|
785
|
+
c < l && Fe();
|
|
786
|
+
function B(i) {
|
|
787
|
+
i === "<" && R();
|
|
788
|
+
}
|
|
789
|
+
function k(i) {
|
|
790
|
+
i === "!" ? s = 13 : i === "/" ? (s = 2, a = new N(C(C({}, a), { isClosing: !0 }))) : i === "<" ? R() : Y.test(i) ? (s = 3, a = new N(C(C({}, a), { isOpening: !0 }))) : (s = 0, a = g);
|
|
791
|
+
}
|
|
792
|
+
function x(i) {
|
|
793
|
+
j.test(i) ? (a = new N(C(C({}, a), { name: Q() })), s = 4) : i === "<" ? R() : i === "/" ? (a = new N(C(C({}, a), { name: Q() })), s = 12) : i === ">" ? (a = new N(C(C({}, a), { name: Q() })), P()) : !Y.test(i) && !Se.test(i) && i !== ":" && E();
|
|
794
|
+
}
|
|
795
|
+
function F(i) {
|
|
796
|
+
i === ">" ? E() : Y.test(i) ? s = 3 : E();
|
|
797
|
+
}
|
|
798
|
+
function A(i) {
|
|
799
|
+
j.test(i) || (i === "/" ? s = 12 : i === ">" ? P() : i === "<" ? R() : i === "=" || G.test(i) || qe.test(i) ? E() : s = 5);
|
|
800
|
+
}
|
|
801
|
+
function v(i) {
|
|
802
|
+
j.test(i) ? s = 6 : i === "/" ? s = 12 : i === "=" ? s = 7 : i === ">" ? P() : i === "<" ? R() : G.test(i) && E();
|
|
803
|
+
}
|
|
804
|
+
function b(i) {
|
|
805
|
+
j.test(i) || (i === "/" ? s = 12 : i === "=" ? s = 7 : i === ">" ? P() : i === "<" ? R() : G.test(i) ? E() : s = 5);
|
|
806
|
+
}
|
|
807
|
+
function m(i) {
|
|
808
|
+
j.test(i) || (i === '"' ? s = 8 : i === "'" ? s = 9 : /[>=`]/.test(i) ? E() : i === "<" ? R() : s = 10);
|
|
809
|
+
}
|
|
810
|
+
function D(i) {
|
|
811
|
+
i === '"' && (s = 11);
|
|
812
|
+
}
|
|
813
|
+
function y(i) {
|
|
814
|
+
i === "'" && (s = 11);
|
|
815
|
+
}
|
|
816
|
+
function M(i) {
|
|
817
|
+
j.test(i) ? s = 4 : i === ">" ? P() : i === "<" && R();
|
|
818
|
+
}
|
|
819
|
+
function d(i) {
|
|
820
|
+
j.test(i) ? s = 4 : i === "/" ? s = 12 : i === ">" ? P() : i === "<" ? R() : (s = 4, ye());
|
|
821
|
+
}
|
|
822
|
+
function T(i) {
|
|
823
|
+
i === ">" ? (a = new N(C(C({}, a), { isClosing: !0 })), P()) : s = 4;
|
|
824
|
+
}
|
|
825
|
+
function _(i) {
|
|
826
|
+
n.substr(l, 2) === "--" ? (l += 2, a = new N(C(C({}, a), { type: "comment" })), s = 14) : n.substr(l, 7).toUpperCase() === "DOCTYPE" ? (l += 7, a = new N(C(C({}, a), { type: "doctype" })), s = 20) : E();
|
|
827
|
+
}
|
|
828
|
+
function V(i) {
|
|
829
|
+
i === "-" ? s = 15 : i === ">" ? E() : s = 16;
|
|
830
|
+
}
|
|
831
|
+
function L(i) {
|
|
832
|
+
i === "-" ? s = 18 : i === ">" ? E() : s = 16;
|
|
833
|
+
}
|
|
834
|
+
function $(i) {
|
|
835
|
+
i === "-" && (s = 17);
|
|
836
|
+
}
|
|
837
|
+
function Z(i) {
|
|
838
|
+
i === "-" ? s = 18 : s = 16;
|
|
839
|
+
}
|
|
840
|
+
function ve(i) {
|
|
841
|
+
i === ">" ? P() : i === "!" ? s = 19 : i === "-" || (s = 16);
|
|
842
|
+
}
|
|
843
|
+
function we(i) {
|
|
844
|
+
i === "-" ? s = 17 : i === ">" ? P() : s = 16;
|
|
845
|
+
}
|
|
846
|
+
function Ce(i) {
|
|
847
|
+
i === ">" ? P() : i === "<" && R();
|
|
848
|
+
}
|
|
849
|
+
function E() {
|
|
850
|
+
s = 0, a = g;
|
|
851
|
+
}
|
|
852
|
+
function R() {
|
|
853
|
+
s = 1, a = new N({ idx: l });
|
|
854
|
+
}
|
|
855
|
+
function P() {
|
|
856
|
+
var i = n.slice(c, a.idx);
|
|
857
|
+
i && r(i, c), a.type === "comment" ? h(a.idx) : a.type === "doctype" ? o(a.idx) : (a.isOpening && t(a.name, a.idx), a.isClosing && u(a.name, a.idx)), E(), c = l + 1;
|
|
858
|
+
}
|
|
859
|
+
function Fe() {
|
|
860
|
+
var i = n.slice(c, l);
|
|
861
|
+
r(i, c), c = l + 1;
|
|
862
|
+
}
|
|
863
|
+
function Q() {
|
|
864
|
+
var i = a.idx + (a.isClosing ? 2 : 1);
|
|
865
|
+
return n.slice(i, l).toLowerCase();
|
|
866
|
+
}
|
|
867
|
+
function ye() {
|
|
868
|
+
l--;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
var N = (
|
|
872
|
+
/** @class */
|
|
873
|
+
/* @__PURE__ */ function() {
|
|
874
|
+
function n(e) {
|
|
875
|
+
e === void 0 && (e = {}), this.idx = e.idx !== void 0 ? e.idx : -1, this.type = e.type || "tag", this.name = e.name || "", this.isOpening = !!e.isOpening, this.isClosing = !!e.isClosing;
|
|
876
|
+
}
|
|
877
|
+
return n;
|
|
878
|
+
}()
|
|
879
|
+
), it = (
|
|
880
|
+
/** @class */
|
|
881
|
+
function() {
|
|
882
|
+
function n(e) {
|
|
883
|
+
e === void 0 && (e = {}), this.version = n.version, this.urls = {}, this.email = !0, this.phone = !0, this.hashtag = !1, this.mention = !1, this.newWindow = !0, this.stripPrefix = {
|
|
884
|
+
scheme: !0,
|
|
885
|
+
www: !0
|
|
886
|
+
}, this.stripTrailingSlash = !0, this.decodePercentEncoding = !0, this.truncate = {
|
|
887
|
+
length: 0,
|
|
888
|
+
location: "end"
|
|
889
|
+
}, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.matchers = null, this.tagBuilder = null, this.urls = this.normalizeUrlsCfg(e.urls), this.email = typeof e.email == "boolean" ? e.email : this.email, this.phone = typeof e.phone == "boolean" ? e.phone : this.phone, this.hashtag = e.hashtag || this.hashtag, this.mention = e.mention || this.mention, this.newWindow = typeof e.newWindow == "boolean" ? e.newWindow : this.newWindow, this.stripPrefix = this.normalizeStripPrefixCfg(e.stripPrefix), this.stripTrailingSlash = typeof e.stripTrailingSlash == "boolean" ? e.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = typeof e.decodePercentEncoding == "boolean" ? e.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = e.sanitizeHtml || !1;
|
|
890
|
+
var t = this.mention;
|
|
891
|
+
if (t !== !1 && ["twitter", "instagram", "soundcloud", "tiktok"].indexOf(t) === -1)
|
|
892
|
+
throw new Error("invalid `mention` cfg '".concat(t, "' - see docs"));
|
|
893
|
+
var u = this.hashtag;
|
|
894
|
+
if (u !== !1 && Qe.indexOf(u) === -1)
|
|
895
|
+
throw new Error("invalid `hashtag` cfg '".concat(u, "' - see docs"));
|
|
896
|
+
this.truncate = this.normalizeTruncateCfg(e.truncate), this.className = e.className || this.className, this.replaceFn = e.replaceFn || this.replaceFn, this.context = e.context || this;
|
|
897
|
+
}
|
|
898
|
+
return n.link = function(e, t) {
|
|
899
|
+
var u = new n(t);
|
|
900
|
+
return u.link(e);
|
|
901
|
+
}, n.parse = function(e, t) {
|
|
902
|
+
var u = new n(t);
|
|
903
|
+
return u.parse(e);
|
|
904
|
+
}, n.prototype.normalizeUrlsCfg = function(e) {
|
|
905
|
+
return e == null && (e = !0), typeof e == "boolean" ? { schemeMatches: e, wwwMatches: e, tldMatches: e } : {
|
|
906
|
+
schemeMatches: typeof e.schemeMatches == "boolean" ? e.schemeMatches : !0,
|
|
907
|
+
wwwMatches: typeof e.wwwMatches == "boolean" ? e.wwwMatches : !0,
|
|
908
|
+
tldMatches: typeof e.tldMatches == "boolean" ? e.tldMatches : !0
|
|
909
|
+
};
|
|
910
|
+
}, n.prototype.normalizeStripPrefixCfg = function(e) {
|
|
911
|
+
return e == null && (e = !0), typeof e == "boolean" ? { scheme: e, www: e } : {
|
|
912
|
+
scheme: typeof e.scheme == "boolean" ? e.scheme : !0,
|
|
913
|
+
www: typeof e.www == "boolean" ? e.www : !0
|
|
914
|
+
};
|
|
915
|
+
}, n.prototype.normalizeTruncateCfg = function(e) {
|
|
916
|
+
return typeof e == "number" ? { length: e, location: "end" } : Me(e || {}, {
|
|
917
|
+
length: Number.POSITIVE_INFINITY,
|
|
918
|
+
location: "end"
|
|
919
|
+
});
|
|
920
|
+
}, n.prototype.parse = function(e) {
|
|
921
|
+
var t = this, u = ["a", "style", "script"], r = 0, h = [];
|
|
922
|
+
return nt(e, {
|
|
923
|
+
onOpenTag: function(o) {
|
|
924
|
+
u.indexOf(o) >= 0 && r++;
|
|
925
|
+
},
|
|
926
|
+
onText: function(o, g) {
|
|
927
|
+
if (r === 0) {
|
|
928
|
+
var l = /( | |<|<|>|>|"|"|')/gi, f = Re(o, l), s = g;
|
|
929
|
+
f.forEach(function(c, a) {
|
|
930
|
+
if (a % 2 === 0) {
|
|
931
|
+
var p = t.parseText(c, s);
|
|
932
|
+
h.push.apply(h, p);
|
|
933
|
+
}
|
|
934
|
+
s += c.length;
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
onCloseTag: function(o) {
|
|
939
|
+
u.indexOf(o) >= 0 && (r = Math.max(r - 1, 0));
|
|
940
|
+
},
|
|
941
|
+
onComment: function(o) {
|
|
942
|
+
},
|
|
943
|
+
onDoctype: function(o) {
|
|
944
|
+
}
|
|
945
|
+
// no need to process doctype nodes
|
|
946
|
+
}), h = this.compactMatches(h), h = this.removeUnwantedMatches(h), h;
|
|
947
|
+
}, n.prototype.compactMatches = function(e) {
|
|
948
|
+
e.sort(function(l, f) {
|
|
949
|
+
return l.getOffset() - f.getOffset();
|
|
950
|
+
});
|
|
951
|
+
for (var t = 0; t < e.length - 1; ) {
|
|
952
|
+
var u = e[t], r = u.getOffset(), h = u.getMatchedText().length, o = r + h;
|
|
953
|
+
if (t + 1 < e.length) {
|
|
954
|
+
if (e[t + 1].getOffset() === r) {
|
|
955
|
+
var g = e[t + 1].getMatchedText().length > h ? t : t + 1;
|
|
956
|
+
e.splice(g, 1);
|
|
957
|
+
continue;
|
|
958
|
+
}
|
|
959
|
+
if (e[t + 1].getOffset() < o) {
|
|
960
|
+
e.splice(t + 1, 1);
|
|
961
|
+
continue;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
t++;
|
|
965
|
+
}
|
|
966
|
+
return e;
|
|
967
|
+
}, n.prototype.removeUnwantedMatches = function(e) {
|
|
968
|
+
return this.hashtag || S(e, function(t) {
|
|
969
|
+
return t.getType() === "hashtag";
|
|
970
|
+
}), this.email || S(e, function(t) {
|
|
971
|
+
return t.getType() === "email";
|
|
972
|
+
}), this.phone || S(e, function(t) {
|
|
973
|
+
return t.getType() === "phone";
|
|
974
|
+
}), this.mention || S(e, function(t) {
|
|
975
|
+
return t.getType() === "mention";
|
|
976
|
+
}), this.urls.schemeMatches || S(e, function(t) {
|
|
977
|
+
return t.getType() === "url" && t.getUrlMatchType() === "scheme";
|
|
978
|
+
}), this.urls.wwwMatches || S(e, function(t) {
|
|
979
|
+
return t.getType() === "url" && t.getUrlMatchType() === "www";
|
|
980
|
+
}), this.urls.tldMatches || S(e, function(t) {
|
|
981
|
+
return t.getType() === "url" && t.getUrlMatchType() === "tld";
|
|
982
|
+
}), e;
|
|
983
|
+
}, n.prototype.parseText = function(e, t) {
|
|
984
|
+
t === void 0 && (t = 0), t = t || 0;
|
|
985
|
+
for (var u = this.getMatchers(), r = [], h = 0, o = u.length; h < o; h++) {
|
|
986
|
+
for (var g = u[h].parseMatches(e), l = 0, f = g.length; l < f; l++)
|
|
987
|
+
g[l].setOffset(t + g[l].getOffset());
|
|
988
|
+
r.push.apply(r, g);
|
|
989
|
+
}
|
|
990
|
+
return r;
|
|
991
|
+
}, n.prototype.link = function(e) {
|
|
992
|
+
if (!e)
|
|
993
|
+
return "";
|
|
994
|
+
this.sanitizeHtml && (e = e.replace(/</g, "<").replace(/>/g, ">"));
|
|
995
|
+
for (var t = this.parse(e), u = [], r = 0, h = 0, o = t.length; h < o; h++) {
|
|
996
|
+
var g = t[h];
|
|
997
|
+
u.push(e.substring(r, g.getOffset())), u.push(this.createMatchReturnVal(g)), r = g.getOffset() + g.getMatchedText().length;
|
|
998
|
+
}
|
|
999
|
+
return u.push(e.substring(r)), u.join("");
|
|
1000
|
+
}, n.prototype.createMatchReturnVal = function(e) {
|
|
1001
|
+
var t;
|
|
1002
|
+
if (this.replaceFn && (t = this.replaceFn.call(this.context, e)), typeof t == "string")
|
|
1003
|
+
return t;
|
|
1004
|
+
if (t === !1)
|
|
1005
|
+
return e.getMatchedText();
|
|
1006
|
+
if (t instanceof K)
|
|
1007
|
+
return t.toAnchorString();
|
|
1008
|
+
var u = e.buildTag();
|
|
1009
|
+
return u.toAnchorString();
|
|
1010
|
+
}, n.prototype.getMatchers = function() {
|
|
1011
|
+
if (this.matchers)
|
|
1012
|
+
return this.matchers;
|
|
1013
|
+
var e = this.getTagBuilder(), t = [
|
|
1014
|
+
new ae({
|
|
1015
|
+
tagBuilder: e,
|
|
1016
|
+
serviceName: this.hashtag
|
|
1017
|
+
}),
|
|
1018
|
+
new ne({ tagBuilder: e }),
|
|
1019
|
+
new se({ tagBuilder: e }),
|
|
1020
|
+
new oe({
|
|
1021
|
+
tagBuilder: e,
|
|
1022
|
+
serviceName: this.mention
|
|
1023
|
+
}),
|
|
1024
|
+
new ie({
|
|
1025
|
+
tagBuilder: e,
|
|
1026
|
+
stripPrefix: this.stripPrefix,
|
|
1027
|
+
stripTrailingSlash: this.stripTrailingSlash,
|
|
1028
|
+
decodePercentEncoding: this.decodePercentEncoding
|
|
1029
|
+
})
|
|
1030
|
+
];
|
|
1031
|
+
return this.matchers = t;
|
|
1032
|
+
}, n.prototype.getTagBuilder = function() {
|
|
1033
|
+
var e = this.tagBuilder;
|
|
1034
|
+
return e || (e = this.tagBuilder = new te({
|
|
1035
|
+
newWindow: this.newWindow,
|
|
1036
|
+
truncate: this.truncate,
|
|
1037
|
+
className: this.className
|
|
1038
|
+
})), e;
|
|
1039
|
+
}, n.version = ke, n.AnchorTagBuilder = te, n.HtmlTag = K, n.matcher = {
|
|
1040
|
+
Email: ne,
|
|
1041
|
+
Hashtag: ae,
|
|
1042
|
+
Matcher: H,
|
|
1043
|
+
Mention: oe,
|
|
1044
|
+
Phone: se,
|
|
1045
|
+
Url: ie
|
|
1046
|
+
}, n.match = {
|
|
1047
|
+
Email: ce,
|
|
1048
|
+
Hashtag: he,
|
|
1049
|
+
Match: q,
|
|
1050
|
+
Mention: fe,
|
|
1051
|
+
Phone: ge,
|
|
1052
|
+
Url: pe
|
|
1053
|
+
}, n;
|
|
1054
|
+
}()
|
|
1055
|
+
);
|
|
1056
|
+
function gt(n) {
|
|
1057
|
+
return !!(n.startsWith("http") || n.startsWith("file://"));
|
|
1058
|
+
}
|
|
1059
|
+
const rt = new it();
|
|
1060
|
+
function at(n) {
|
|
1061
|
+
return rt.parse(n).map((t) => ({
|
|
1062
|
+
indices: [
|
|
1063
|
+
t.getOffset(),
|
|
1064
|
+
t.getOffset() + t.getMatchedText().length
|
|
1065
|
+
],
|
|
1066
|
+
url: t.getAnchorHref()
|
|
1067
|
+
}));
|
|
1068
|
+
}
|
|
1069
|
+
function* be(n) {
|
|
1070
|
+
const e = at(n), t = [], u = {};
|
|
1071
|
+
e.forEach((r) => {
|
|
1072
|
+
t.push(...r.indices), u[r.indices[0]] = r.url;
|
|
1073
|
+
});
|
|
1074
|
+
for (const [r, h] of Ee(n, t)) {
|
|
1075
|
+
const o = u[r];
|
|
1076
|
+
o ? yield {
|
|
1077
|
+
key: r + h + o,
|
|
1078
|
+
text: h,
|
|
1079
|
+
url: o
|
|
1080
|
+
} : yield h;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
function xe(n, e, t) {
|
|
1084
|
+
return /* @__PURE__ */ le("a", { href: t, children: e }, n);
|
|
1085
|
+
}
|
|
1086
|
+
function st(n, e) {
|
|
1087
|
+
return `<a href="${e}">${n}</a>`;
|
|
1088
|
+
}
|
|
1089
|
+
function ot(n, e = xe) {
|
|
1090
|
+
const t = [];
|
|
1091
|
+
for (const u of be(n)) {
|
|
1092
|
+
if (typeof u == "string") {
|
|
1093
|
+
t.push(u);
|
|
1094
|
+
continue;
|
|
1095
|
+
}
|
|
1096
|
+
t.push(e(u.key, u.text, u.url));
|
|
1097
|
+
}
|
|
1098
|
+
return t;
|
|
1099
|
+
}
|
|
1100
|
+
function pt(n, e = st) {
|
|
1101
|
+
const t = [];
|
|
1102
|
+
for (const u of be(n)) {
|
|
1103
|
+
if (typeof u == "string") {
|
|
1104
|
+
t.push(u);
|
|
1105
|
+
continue;
|
|
1106
|
+
}
|
|
1107
|
+
t.push(e(u.text, u.url));
|
|
1108
|
+
}
|
|
1109
|
+
return t.join("");
|
|
1110
|
+
}
|
|
1111
|
+
function dt(n) {
|
|
1112
|
+
const {
|
|
1113
|
+
text: e,
|
|
1114
|
+
replacer: t = xe
|
|
1115
|
+
} = n, u = De.useMemo(() => ot(e, t), [e, t]);
|
|
1116
|
+
return (
|
|
1117
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
1118
|
+
/* @__PURE__ */ le(Be, { children: u })
|
|
1119
|
+
);
|
|
1120
|
+
}
|
|
5
1121
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1122
|
+
dt as Linkify,
|
|
1123
|
+
st as defaultLinkReplacer,
|
|
1124
|
+
xe as defaultLinkReplacerx,
|
|
1125
|
+
gt as isExternalUrl,
|
|
1126
|
+
pt as linkify,
|
|
1127
|
+
ot as linkifyx,
|
|
1128
|
+
be as matchLinkNodes,
|
|
1129
|
+
at as matchLinks
|
|
14
1130
|
};
|