@spscommerce/ds-web-components 8.33.1 → 8.33.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.js +1082 -1101
- package/dist/lib/index.umd.cjs +50 -50
- package/dist/package.json +1 -1
- package/lib/index.js +1082 -1101
- package/lib/index.umd.cjs +50 -50
- package/package.json +4 -4
package/dist/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { noI18nI18n as
|
|
2
|
-
import { parseFileSize as
|
|
3
|
-
const
|
|
1
|
+
import { noI18nI18n as $t, SpsIcon as Te, SpsInsightCardKind as Bt, SpsInsightCardIcons as jt } from "@spscommerce/ds-shared";
|
|
2
|
+
import { parseFileSize as Tt, code as u } from "@spscommerce/utils";
|
|
3
|
+
const rs = {
|
|
4
4
|
/*
|
|
5
5
|
* 'Insight Cards': {
|
|
6
6
|
* components: [SpsInsightCardComponent, SpsInsightsComponent],
|
|
@@ -18,758 +18,739 @@ const ds = {
|
|
|
18
18
|
*},
|
|
19
19
|
*/
|
|
20
20
|
};
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
function st(e, t) {
|
|
63
|
-
return tt.call(e, t);
|
|
64
|
-
}
|
|
65
|
-
function Ae() {
|
|
66
|
-
return new Se();
|
|
67
|
-
}
|
|
68
|
-
function le(e, t) {
|
|
69
|
-
for (; e.length > t; )
|
|
70
|
-
e.pop();
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* @license
|
|
74
|
-
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
75
|
-
*
|
|
76
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
77
|
-
* you may not use this file except in compliance with the License.
|
|
78
|
-
* You may obtain a copy of the License at
|
|
79
|
-
*
|
|
80
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
81
|
-
*
|
|
82
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
83
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
84
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
85
|
-
* See the License for the specific language governing permissions and
|
|
86
|
-
* limitations under the License.
|
|
87
|
-
*/
|
|
88
|
-
function nt(e) {
|
|
89
|
-
if (e.lastIndexOf("xml:", 0) === 0)
|
|
90
|
-
return "http://www.w3.org/XML/1998/namespace";
|
|
91
|
-
if (e.lastIndexOf("xlink:", 0) === 0)
|
|
92
|
-
return "http://www.w3.org/1999/xlink";
|
|
93
|
-
}
|
|
94
|
-
function Oe(e, t, s) {
|
|
95
|
-
if (s == null)
|
|
96
|
-
e.removeAttribute(t);
|
|
97
|
-
else {
|
|
98
|
-
var n = nt(t);
|
|
99
|
-
n ? e.setAttributeNS(n, t, String(s)) : e.setAttribute(t, String(s));
|
|
21
|
+
var g = {}, Ue;
|
|
22
|
+
function Ut() {
|
|
23
|
+
if (Ue) return g;
|
|
24
|
+
Ue = 1, Object.defineProperty(g, "__esModule", { value: !0 });
|
|
25
|
+
/**
|
|
26
|
+
* @license
|
|
27
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
28
|
+
*
|
|
29
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
30
|
+
* you may not use this file except in compliance with the License.
|
|
31
|
+
* You may obtain a copy of the License at
|
|
32
|
+
*
|
|
33
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
34
|
+
*
|
|
35
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
36
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
37
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
38
|
+
* See the License for the specific language governing permissions and
|
|
39
|
+
* limitations under the License.
|
|
40
|
+
*/
|
|
41
|
+
var e = {
|
|
42
|
+
default: "__default"
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
47
|
+
*
|
|
48
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
49
|
+
* you may not use this file except in compliance with the License.
|
|
50
|
+
* You may obtain a copy of the License at
|
|
51
|
+
*
|
|
52
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
53
|
+
*
|
|
54
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
55
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
56
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
57
|
+
* See the License for the specific language governing permissions and
|
|
58
|
+
* limitations under the License.
|
|
59
|
+
*/
|
|
60
|
+
var s = Object.prototype.hasOwnProperty;
|
|
61
|
+
function i() {
|
|
100
62
|
}
|
|
101
|
-
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
function it(e, t, s) {
|
|
106
|
-
t.indexOf("-") >= 0 ? e.setProperty(t, s) : e[t] = s;
|
|
107
|
-
}
|
|
108
|
-
function rt(e, t, s) {
|
|
109
|
-
if (typeof s == "string")
|
|
110
|
-
e.style.cssText = s;
|
|
111
|
-
else {
|
|
112
|
-
e.style.cssText = "";
|
|
113
|
-
var n = e.style;
|
|
114
|
-
for (var i in s)
|
|
115
|
-
st(s, i) && it(n, i, s[i]);
|
|
63
|
+
i.prototype = /* @__PURE__ */ Object.create(null);
|
|
64
|
+
function o(t, n) {
|
|
65
|
+
return s.call(t, n);
|
|
116
66
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
var n = typeof s;
|
|
120
|
-
n === "object" || n === "function" ? De(e, t, s) : Oe(e, t, s);
|
|
121
|
-
}
|
|
122
|
-
var V = Ae();
|
|
123
|
-
V[oe.default] = at;
|
|
124
|
-
V.style = rt;
|
|
125
|
-
function z(e, t, s) {
|
|
126
|
-
var n = V[t] || V[oe.default];
|
|
127
|
-
n(e, t, s);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @license
|
|
131
|
-
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
132
|
-
*
|
|
133
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
134
|
-
* you may not use this file except in compliance with the License.
|
|
135
|
-
* You may obtain a copy of the License at
|
|
136
|
-
*
|
|
137
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
138
|
-
*
|
|
139
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
140
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
141
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
142
|
-
* See the License for the specific language governing permissions and
|
|
143
|
-
* limitations under the License.
|
|
144
|
-
*/
|
|
145
|
-
var W = !1, te = !1;
|
|
146
|
-
function Pe(e, t) {
|
|
147
|
-
if (!t)
|
|
148
|
-
throw new Error("Cannot call " + e + "() unless in patch.");
|
|
149
|
-
}
|
|
150
|
-
function ot(e, t) {
|
|
151
|
-
if (e !== t) {
|
|
152
|
-
for (var s = e, n = []; s && s !== t; )
|
|
153
|
-
n.push(s.nodeName.toLowerCase()), s = s.parentNode;
|
|
154
|
-
throw new Error(`One or more tags were not closed:
|
|
155
|
-
` + n.join(`
|
|
156
|
-
`));
|
|
67
|
+
function r() {
|
|
68
|
+
return new i();
|
|
157
69
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
function
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
throw new Error("There must be exactly one top level call corresponding to the patched element.");
|
|
191
|
-
}
|
|
192
|
-
function K(e) {
|
|
193
|
-
var t = W;
|
|
194
|
-
return W = e, t;
|
|
195
|
-
}
|
|
196
|
-
function Q(e) {
|
|
197
|
-
var t = te;
|
|
198
|
-
return te = e, t;
|
|
199
|
-
}
|
|
200
|
-
function Z(e) {
|
|
201
|
-
if (process.env.NODE_ENV !== "production" && !e)
|
|
202
|
-
throw new Error("Expected value to be defined");
|
|
203
|
-
return e;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* @license
|
|
207
|
-
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
208
|
-
*
|
|
209
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
210
|
-
* you may not use this file except in compliance with the License.
|
|
211
|
-
* You may obtain a copy of the License at
|
|
212
|
-
*
|
|
213
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
214
|
-
*
|
|
215
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
216
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
217
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
218
|
-
* See the License for the specific language governing permissions and
|
|
219
|
-
* limitations under the License.
|
|
220
|
-
*/
|
|
221
|
-
var U = {
|
|
222
|
-
nodesCreated: null,
|
|
223
|
-
nodesDeleted: null
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* @license
|
|
227
|
-
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
228
|
-
*
|
|
229
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
230
|
-
* you may not use this file except in compliance with the License.
|
|
231
|
-
* You may obtain a copy of the License at
|
|
232
|
-
*
|
|
233
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
234
|
-
*
|
|
235
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
236
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
237
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
238
|
-
* See the License for the specific language governing permissions and
|
|
239
|
-
* limitations under the License.
|
|
240
|
-
*/
|
|
241
|
-
var ht = (
|
|
242
|
-
/** @class */
|
|
243
|
-
function() {
|
|
244
|
-
function e() {
|
|
245
|
-
this.created = [], this.deleted = [];
|
|
70
|
+
function c(t, n) {
|
|
71
|
+
for (; t.length > n; )
|
|
72
|
+
t.pop();
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @license
|
|
76
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
77
|
+
*
|
|
78
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
79
|
+
* you may not use this file except in compliance with the License.
|
|
80
|
+
* You may obtain a copy of the License at
|
|
81
|
+
*
|
|
82
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
83
|
+
*
|
|
84
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
85
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
86
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
87
|
+
* See the License for the specific language governing permissions and
|
|
88
|
+
* limitations under the License.
|
|
89
|
+
*/
|
|
90
|
+
function f(t) {
|
|
91
|
+
if (t.lastIndexOf("xml:", 0) === 0)
|
|
92
|
+
return "http://www.w3.org/XML/1998/namespace";
|
|
93
|
+
if (t.lastIndexOf("xlink:", 0) === 0)
|
|
94
|
+
return "http://www.w3.org/1999/xlink";
|
|
95
|
+
}
|
|
96
|
+
function $(t, n, a) {
|
|
97
|
+
if (a == null)
|
|
98
|
+
t.removeAttribute(n);
|
|
99
|
+
else {
|
|
100
|
+
var l = f(n);
|
|
101
|
+
l ? t.setAttributeNS(l, n, String(a)) : t.setAttribute(n, String(a));
|
|
246
102
|
}
|
|
247
|
-
return e.prototype.markCreated = function(t) {
|
|
248
|
-
this.created.push(t);
|
|
249
|
-
}, e.prototype.markDeleted = function(t) {
|
|
250
|
-
this.deleted.push(t);
|
|
251
|
-
}, e.prototype.notifyChanges = function() {
|
|
252
|
-
U.nodesCreated && this.created.length > 0 && U.nodesCreated(this.created), U.nodesDeleted && this.deleted.length > 0 && U.nodesDeleted(this.deleted);
|
|
253
|
-
}, e;
|
|
254
|
-
}()
|
|
255
|
-
);
|
|
256
|
-
/**
|
|
257
|
-
* @license
|
|
258
|
-
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
259
|
-
*
|
|
260
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
261
|
-
* you may not use this file except in compliance with the License.
|
|
262
|
-
* You may obtain a copy of the License at
|
|
263
|
-
*
|
|
264
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
265
|
-
*
|
|
266
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
267
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
268
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
269
|
-
* See the License for the specific language governing permissions and
|
|
270
|
-
* limitations under the License.
|
|
271
|
-
*/
|
|
272
|
-
function ft(e) {
|
|
273
|
-
return e.nodeType === 11 || e.nodeType === 9;
|
|
274
|
-
}
|
|
275
|
-
function ee(e) {
|
|
276
|
-
return e.nodeType === 1;
|
|
277
|
-
}
|
|
278
|
-
function gt(e) {
|
|
279
|
-
return e.nodeType === 3;
|
|
280
|
-
}
|
|
281
|
-
function mt(e, t) {
|
|
282
|
-
for (var s = [], n = e; n !== t; ) {
|
|
283
|
-
var i = n;
|
|
284
|
-
s.push(i), n = i.parentNode;
|
|
285
103
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
104
|
+
function Ne(t, n, a) {
|
|
105
|
+
t[n] = a;
|
|
106
|
+
}
|
|
107
|
+
function Ye(t, n, a) {
|
|
108
|
+
n.indexOf("-") >= 0 ? t.setProperty(n, a) : t[n] = a;
|
|
109
|
+
}
|
|
110
|
+
function Je(t, n, a) {
|
|
111
|
+
if (typeof a == "string")
|
|
112
|
+
t.style.cssText = a;
|
|
113
|
+
else {
|
|
114
|
+
t.style.cssText = "";
|
|
115
|
+
var l = t.style;
|
|
116
|
+
for (var d in a)
|
|
117
|
+
o(a, d) && Ye(l, d, a[d]);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function Me(t, n, a) {
|
|
121
|
+
var l = typeof a;
|
|
122
|
+
l === "object" || l === "function" ? Ne(t, n, a) : $(t, n, a);
|
|
123
|
+
}
|
|
124
|
+
var Q = r();
|
|
125
|
+
Q[e.default] = Me, Q.style = Je;
|
|
126
|
+
function Z(t, n, a) {
|
|
127
|
+
var l = Q[n] || Q[e.default];
|
|
128
|
+
l(t, n, a);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @license
|
|
132
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
133
|
+
*
|
|
134
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
135
|
+
* you may not use this file except in compliance with the License.
|
|
136
|
+
* You may obtain a copy of the License at
|
|
137
|
+
*
|
|
138
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
139
|
+
*
|
|
140
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
141
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
142
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
143
|
+
* See the License for the specific language governing permissions and
|
|
144
|
+
* limitations under the License.
|
|
145
|
+
*/
|
|
146
|
+
var Y = !1, ce = !1;
|
|
147
|
+
function xe(t, n) {
|
|
148
|
+
if (!n)
|
|
149
|
+
throw new Error("Cannot call " + t + "() unless in patch.");
|
|
150
|
+
}
|
|
151
|
+
function et(t, n) {
|
|
152
|
+
if (t !== n) {
|
|
153
|
+
for (var a = t, l = []; a && a !== n; )
|
|
154
|
+
l.push(a.nodeName.toLowerCase()), a = a.parentNode;
|
|
155
|
+
throw new Error(`One or more tags were not closed:
|
|
156
|
+
` + l.join(`
|
|
157
|
+
`));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function tt(t) {
|
|
161
|
+
t || console.warn("patchOuter requires the node have a parent if there is a key.");
|
|
162
|
+
}
|
|
163
|
+
function V(t) {
|
|
164
|
+
if (Y)
|
|
165
|
+
throw new Error(t + "() can not be called between elementOpenStart() and elementOpenEnd().");
|
|
166
|
+
}
|
|
167
|
+
function ye(t) {
|
|
168
|
+
if (ce)
|
|
169
|
+
throw new Error(t + "() may not be called inside an element that has called skip().");
|
|
170
|
+
}
|
|
171
|
+
function pe(t) {
|
|
172
|
+
if (!Y)
|
|
173
|
+
throw new Error(t + "() can only be called after calling elementOpenStart().");
|
|
174
|
+
}
|
|
175
|
+
function st() {
|
|
176
|
+
if (Y)
|
|
177
|
+
throw new Error("elementOpenEnd() must be called after calling elementOpenStart().");
|
|
178
|
+
}
|
|
179
|
+
function nt(t, n) {
|
|
180
|
+
if (t !== n)
|
|
181
|
+
throw new Error('Received a call to close "' + n + '" but "' + t + '" was open.');
|
|
182
|
+
}
|
|
183
|
+
function it(t, n) {
|
|
184
|
+
if (n !== null)
|
|
185
|
+
throw new Error(t + "() must come before any child declarations inside the current element.");
|
|
186
|
+
}
|
|
187
|
+
function rt(t, n, a, l) {
|
|
188
|
+
se(t);
|
|
189
|
+
var d = t, h = n, y = h.nextSibling === a && h.previousSibling === l, C = h.nextSibling === d.nextSibling && h.previousSibling === l, S = h === d;
|
|
190
|
+
if (!y && !C && !S)
|
|
191
|
+
throw new Error("There must be exactly one top level call corresponding to the patched element.");
|
|
192
|
+
}
|
|
193
|
+
function ee(t) {
|
|
194
|
+
var n = Y;
|
|
195
|
+
return Y = t, n;
|
|
196
|
+
}
|
|
197
|
+
function te(t) {
|
|
198
|
+
var n = ce;
|
|
199
|
+
return ce = t, n;
|
|
200
|
+
}
|
|
201
|
+
function se(t) {
|
|
202
|
+
if (process.env.NODE_ENV !== "production" && !t)
|
|
203
|
+
throw new Error("Expected value to be defined");
|
|
293
204
|
return t;
|
|
294
205
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
206
|
+
/**
|
|
207
|
+
* @license
|
|
208
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
209
|
+
*
|
|
210
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
211
|
+
* you may not use this file except in compliance with the License.
|
|
212
|
+
* You may obtain a copy of the License at
|
|
213
|
+
*
|
|
214
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
215
|
+
*
|
|
216
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
217
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
218
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
219
|
+
* See the License for the specific language governing permissions and
|
|
220
|
+
* limitations under the License.
|
|
221
|
+
*/
|
|
222
|
+
var J = {
|
|
223
|
+
nodesCreated: null,
|
|
224
|
+
nodesDeleted: null
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* @license
|
|
228
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
229
|
+
*
|
|
230
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
231
|
+
* you may not use this file except in compliance with the License.
|
|
232
|
+
* You may obtain a copy of the License at
|
|
233
|
+
*
|
|
234
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
235
|
+
*
|
|
236
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
237
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
238
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
239
|
+
* See the License for the specific language governing permissions and
|
|
240
|
+
* limitations under the License.
|
|
241
|
+
*/
|
|
242
|
+
var at = (
|
|
243
|
+
/** @class */
|
|
244
|
+
function() {
|
|
245
|
+
function t() {
|
|
246
|
+
this.created = [], this.deleted = [];
|
|
247
|
+
}
|
|
248
|
+
return t.prototype.markCreated = function(n) {
|
|
249
|
+
this.created.push(n);
|
|
250
|
+
}, t.prototype.markDeleted = function(n) {
|
|
251
|
+
this.deleted.push(n);
|
|
252
|
+
}, t.prototype.notifyChanges = function() {
|
|
253
|
+
J.nodesCreated && this.created.length > 0 && J.nodesCreated(this.created), J.nodesDeleted && this.deleted.length > 0 && J.nodesDeleted(this.deleted);
|
|
254
|
+
}, t;
|
|
255
|
+
}()
|
|
256
|
+
);
|
|
257
|
+
/**
|
|
258
|
+
* @license
|
|
259
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
260
|
+
*
|
|
261
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
262
|
+
* you may not use this file except in compliance with the License.
|
|
263
|
+
* You may obtain a copy of the License at
|
|
264
|
+
*
|
|
265
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
266
|
+
*
|
|
267
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
268
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
269
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
270
|
+
* See the License for the specific language governing permissions and
|
|
271
|
+
* limitations under the License.
|
|
272
|
+
*/
|
|
273
|
+
function ot(t) {
|
|
274
|
+
return t.nodeType === 11 || t.nodeType === 9;
|
|
308
275
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
*
|
|
320
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
321
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
322
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
323
|
-
* See the License for the specific language governing permissions and
|
|
324
|
-
* limitations under the License.
|
|
325
|
-
*/
|
|
326
|
-
var _t = (
|
|
327
|
-
/** @class */
|
|
328
|
-
function() {
|
|
329
|
-
function e(t, s, n) {
|
|
330
|
-
this._attrsArr = null, this.staticsApplied = !1, this.nameOrCtor = t, this.key = s, this.text = n;
|
|
276
|
+
function de(t) {
|
|
277
|
+
return t.nodeType === 1;
|
|
278
|
+
}
|
|
279
|
+
function lt(t) {
|
|
280
|
+
return t.nodeType === 3;
|
|
281
|
+
}
|
|
282
|
+
function ct(t, n) {
|
|
283
|
+
for (var a = [], l = t; l !== n; ) {
|
|
284
|
+
var d = l;
|
|
285
|
+
a.push(d), l = d.parentNode;
|
|
331
286
|
}
|
|
332
|
-
return
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
function pe(e, t, s, n) {
|
|
341
|
-
var i = new _t(t, s, n);
|
|
342
|
-
return e.__incrementalDOMData = i, i;
|
|
343
|
-
}
|
|
344
|
-
function B(e, t) {
|
|
345
|
-
return ke(e, t);
|
|
346
|
-
}
|
|
347
|
-
function Nt(e) {
|
|
348
|
-
return !!e.__incrementalDOMData;
|
|
349
|
-
}
|
|
350
|
-
function xt(e) {
|
|
351
|
-
return Z(e.__incrementalDOMData), B(e).key;
|
|
352
|
-
}
|
|
353
|
-
function ke(e, t) {
|
|
354
|
-
if (e.__incrementalDOMData)
|
|
355
|
-
return e.__incrementalDOMData;
|
|
356
|
-
var s = ee(e) ? e.localName : e.nodeName, n = ee(e) ? e.getAttribute("key") || t : null, i = gt(e) ? e.data : void 0, r = pe(e, s, n, i);
|
|
357
|
-
return ee(e) && yt(e, r), r;
|
|
358
|
-
}
|
|
359
|
-
function Ie(e) {
|
|
360
|
-
ke(e);
|
|
361
|
-
for (var t = e.firstChild; t; t = t.nextSibling)
|
|
362
|
-
Ie(t);
|
|
363
|
-
}
|
|
364
|
-
function Le(e) {
|
|
365
|
-
e.__incrementalDOMData = null;
|
|
366
|
-
for (var t = e.firstChild; t; t = t.nextSibling)
|
|
367
|
-
Le(t);
|
|
368
|
-
}
|
|
369
|
-
function yt(e, t) {
|
|
370
|
-
var s = e.attributes, n = s.length;
|
|
371
|
-
if (n)
|
|
372
|
-
for (var i = t.getAttrsArr(n), r = 0, o = 0; r < n; r += 1, o += 2) {
|
|
373
|
-
var p = s[r], b = p.name, f = p.value;
|
|
374
|
-
i[o] = b, i[o + 1] = f;
|
|
287
|
+
return a;
|
|
288
|
+
}
|
|
289
|
+
var pt = (
|
|
290
|
+
// tslint:disable-next-line:no-any b/79476176
|
|
291
|
+
Node.prototype.getRootNode || function() {
|
|
292
|
+
for (var t = this, n = t; t; )
|
|
293
|
+
n = t, t = t.parentNode;
|
|
294
|
+
return n;
|
|
375
295
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
var
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
return
|
|
437
|
-
|
|
438
|
-
|
|
296
|
+
);
|
|
297
|
+
function dt(t) {
|
|
298
|
+
var n = pt.call(t);
|
|
299
|
+
return ot(n) ? n.activeElement : null;
|
|
300
|
+
}
|
|
301
|
+
function ut(t, n) {
|
|
302
|
+
var a = dt(t);
|
|
303
|
+
return !a || !t.contains(a) ? [] : ct(a, n);
|
|
304
|
+
}
|
|
305
|
+
function ht(t, n, a) {
|
|
306
|
+
for (var l = n.nextSibling, d = a; d !== null && d !== n; ) {
|
|
307
|
+
var h = d.nextSibling;
|
|
308
|
+
t.insertBefore(d, l), d = h;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* @license
|
|
313
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
314
|
+
*
|
|
315
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
316
|
+
* you may not use this file except in compliance with the License.
|
|
317
|
+
* You may obtain a copy of the License at
|
|
318
|
+
*
|
|
319
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
320
|
+
*
|
|
321
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
322
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
323
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
324
|
+
* See the License for the specific language governing permissions and
|
|
325
|
+
* limitations under the License.
|
|
326
|
+
*/
|
|
327
|
+
var ft = (
|
|
328
|
+
/** @class */
|
|
329
|
+
function() {
|
|
330
|
+
function t(n, a, l) {
|
|
331
|
+
this._attrsArr = null, this.staticsApplied = !1, this.nameOrCtor = n, this.key = a, this.text = l;
|
|
332
|
+
}
|
|
333
|
+
return t.prototype.hasEmptyAttrsArr = function() {
|
|
334
|
+
var n = this._attrsArr;
|
|
335
|
+
return !n || !n.length;
|
|
336
|
+
}, t.prototype.getAttrsArr = function(n) {
|
|
337
|
+
return this._attrsArr || (this._attrsArr = new Array(n));
|
|
338
|
+
}, t;
|
|
339
|
+
}()
|
|
340
|
+
);
|
|
341
|
+
function ue(t, n, a, l) {
|
|
342
|
+
var d = new ft(n, a, l);
|
|
343
|
+
return t.__incrementalDOMData = d, d;
|
|
344
|
+
}
|
|
345
|
+
function W(t, n) {
|
|
346
|
+
return Se(t, n);
|
|
347
|
+
}
|
|
348
|
+
function gt(t) {
|
|
349
|
+
return !!t.__incrementalDOMData;
|
|
350
|
+
}
|
|
351
|
+
function mt(t) {
|
|
352
|
+
return se(t.__incrementalDOMData), W(t).key;
|
|
353
|
+
}
|
|
354
|
+
function Se(t, n) {
|
|
355
|
+
if (t.__incrementalDOMData)
|
|
356
|
+
return t.__incrementalDOMData;
|
|
357
|
+
var a = de(t) ? t.localName : t.nodeName, l = de(t) ? t.getAttribute("key") || n : null, d = lt(t) ? t.data : void 0, h = ue(t, a, l, d);
|
|
358
|
+
return de(t) && vt(t, h), h;
|
|
359
|
+
}
|
|
360
|
+
function Ae(t) {
|
|
361
|
+
Se(t);
|
|
362
|
+
for (var n = t.firstChild; n; n = n.nextSibling)
|
|
363
|
+
Ae(n);
|
|
364
|
+
}
|
|
365
|
+
function Oe(t) {
|
|
366
|
+
t.__incrementalDOMData = null;
|
|
367
|
+
for (var n = t.firstChild; n; n = n.nextSibling)
|
|
368
|
+
Oe(n);
|
|
369
|
+
}
|
|
370
|
+
function vt(t, n) {
|
|
371
|
+
var a = t.attributes, l = a.length;
|
|
372
|
+
if (l)
|
|
373
|
+
for (var d = n.getAttrsArr(l), h = 0, y = 0; h < l; h += 1, y += 2) {
|
|
374
|
+
var C = a[h], S = C.name, w = C.value;
|
|
375
|
+
d[y] = S, d[y + 1] = w;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* @license
|
|
380
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
381
|
+
*
|
|
382
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
383
|
+
* you may not use this file except in compliance with the License.
|
|
384
|
+
* You may obtain a copy of the License at
|
|
385
|
+
*
|
|
386
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
387
|
+
*
|
|
388
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
389
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
390
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
391
|
+
* See the License for the specific language governing permissions and
|
|
392
|
+
* limitations under the License.
|
|
393
|
+
*/
|
|
394
|
+
function bt(t, n) {
|
|
395
|
+
return t === "svg" ? "http://www.w3.org/2000/svg" : t === "math" ? "http://www.w3.org/1998/Math/MathML" : n == null || W(n).nameOrCtor === "foreignObject" ? null : n.namespaceURI;
|
|
396
|
+
}
|
|
397
|
+
function Ct(t, n, a, l) {
|
|
398
|
+
var d;
|
|
399
|
+
if (typeof a == "function")
|
|
400
|
+
d = new a();
|
|
401
|
+
else {
|
|
402
|
+
var h = bt(a, n);
|
|
403
|
+
h ? d = t.createElementNS(h, a) : d = t.createElement(a);
|
|
404
|
+
}
|
|
405
|
+
return ue(d, a, l), d;
|
|
406
|
+
}
|
|
407
|
+
function wt(t) {
|
|
408
|
+
var n = t.createTextNode("");
|
|
409
|
+
return ue(n, "#text", null), n;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* @license
|
|
413
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
414
|
+
*
|
|
415
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
416
|
+
* you may not use this file except in compliance with the License.
|
|
417
|
+
* You may obtain a copy of the License at
|
|
418
|
+
*
|
|
419
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
420
|
+
*
|
|
421
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
422
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
423
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
424
|
+
* See the License for the specific language governing permissions and
|
|
425
|
+
* limitations under the License.
|
|
426
|
+
*/
|
|
427
|
+
var H = null, v = null, x = null, T = null, ne = [], ie = [];
|
|
428
|
+
function re() {
|
|
429
|
+
return ie;
|
|
430
|
+
}
|
|
431
|
+
function De(t) {
|
|
432
|
+
var n = function(a, l, d) {
|
|
433
|
+
var h = H, y = T, C = ne, S = ie, w = v, O = x, L = !1, oe = !1;
|
|
434
|
+
H = new at(), T = a.ownerDocument, ie = [], x = a.parentNode, ne = ut(a, x), process.env.NODE_ENV !== "production" && (L = ee(!1), oe = te(!1));
|
|
435
|
+
try {
|
|
436
|
+
var Rt = t(a, l, d);
|
|
437
|
+
return process.env.NODE_ENV !== "production" && st(), Rt;
|
|
438
|
+
} finally {
|
|
439
|
+
T = y, ie = S, v = w, x = O, ne = C, H.notifyChanges(), ee(L), te(oe), H = h;
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
return n;
|
|
443
|
+
}
|
|
444
|
+
var Pe = De(function(t, n, a) {
|
|
445
|
+
return v = t, Le(), n(a), Fe(), process.env.NODE_ENV !== "production" && et(v, t), t;
|
|
446
|
+
}), _t = De(function(t, n, a) {
|
|
447
|
+
var l = { nextSibling: t }, d = null, h = null;
|
|
448
|
+
return process.env.NODE_ENV !== "production" && (d = t.nextSibling, h = t.previousSibling), v = l, n(a), process.env.NODE_ENV !== "production" && (tt(x), rt(l, v, d, h)), x && Ie(x, ae(), t.nextSibling), l === v ? null : v;
|
|
449
|
+
});
|
|
450
|
+
function Ee(t, n, a) {
|
|
451
|
+
var l = W(t, a);
|
|
452
|
+
return n == l.nameOrCtor && a == l.key;
|
|
453
|
+
}
|
|
454
|
+
function Nt(t, n, a) {
|
|
455
|
+
if (!t)
|
|
456
|
+
return null;
|
|
457
|
+
if (Ee(t, n, a))
|
|
458
|
+
return t;
|
|
459
|
+
if (a) {
|
|
460
|
+
for (; t = t.nextSibling; )
|
|
461
|
+
if (Ee(t, n, a))
|
|
462
|
+
return t;
|
|
439
463
|
}
|
|
440
|
-
};
|
|
441
|
-
return t;
|
|
442
|
-
}
|
|
443
|
-
var Re = Fe(function(e, t, s) {
|
|
444
|
-
return u = e, je(), t(s), Te(), process.env.NODE_ENV !== "production" && ot(u, e), e;
|
|
445
|
-
}), Dt = Fe(function(e, t, s) {
|
|
446
|
-
var n = { nextSibling: e }, i = null, r = null;
|
|
447
|
-
return process.env.NODE_ENV !== "production" && (i = e.nextSibling, r = e.previousSibling), u = n, t(s), process.env.NODE_ENV !== "production" && (lt(v), ut(n, u, i, r)), v && Be(v, J(), e.nextSibling), n === u ? null : u;
|
|
448
|
-
});
|
|
449
|
-
function Ce(e, t, s) {
|
|
450
|
-
var n = B(e, s);
|
|
451
|
-
return t == n.nameOrCtor && s == n.key;
|
|
452
|
-
}
|
|
453
|
-
function Pt(e, t, s) {
|
|
454
|
-
if (!e)
|
|
455
464
|
return null;
|
|
456
|
-
if (Ce(e, t, s))
|
|
457
|
-
return e;
|
|
458
|
-
if (s) {
|
|
459
|
-
for (; e = e.nextSibling; )
|
|
460
|
-
if (Ce(e, t, s))
|
|
461
|
-
return e;
|
|
462
465
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
var s;
|
|
467
|
-
return e === "#text" ? s = Ot(k) : s = At(k, v, e, t), L.markCreated(s), s;
|
|
468
|
-
}
|
|
469
|
-
function $e(e, t) {
|
|
470
|
-
var s = Pt(u, e, t), n = s || Et(e, t);
|
|
471
|
-
n !== u && (G.indexOf(n) >= 0 ? wt(v, n, u) : v.insertBefore(n, u), u = n);
|
|
472
|
-
}
|
|
473
|
-
function Be(e, t, s) {
|
|
474
|
-
for (var n = e, i = t; i !== s; ) {
|
|
475
|
-
var r = i.nextSibling;
|
|
476
|
-
n.removeChild(i), L.markDeleted(i), i = r;
|
|
466
|
+
function xt(t, n) {
|
|
467
|
+
var a;
|
|
468
|
+
return t === "#text" ? a = wt(T) : a = Ct(T, x, t, n), H.markCreated(a), a;
|
|
477
469
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
function
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
u = J();
|
|
487
|
-
}
|
|
488
|
-
function Te() {
|
|
489
|
-
Be(v, J(), null), u = v, v = v.parentNode;
|
|
490
|
-
}
|
|
491
|
-
function Ue(e, t) {
|
|
492
|
-
return de(), $e(e, t), je(), v;
|
|
493
|
-
}
|
|
494
|
-
function ze() {
|
|
495
|
-
return process.env.NODE_ENV !== "production" && Q(!1), Te(), u;
|
|
496
|
-
}
|
|
497
|
-
function kt() {
|
|
498
|
-
return de(), $e("#text", null), u;
|
|
499
|
-
}
|
|
500
|
-
function It() {
|
|
501
|
-
return process.env.NODE_ENV !== "production" && (Pe("currentElement", k), $("currentElement")), v;
|
|
502
|
-
}
|
|
503
|
-
function Lt() {
|
|
504
|
-
return process.env.NODE_ENV !== "production" && (Pe("currentPointer", k), $("currentPointer")), J();
|
|
505
|
-
}
|
|
506
|
-
function Ft() {
|
|
507
|
-
process.env.NODE_ENV !== "production" && (dt("skip", u), Q(!0)), u = v.lastChild;
|
|
508
|
-
}
|
|
509
|
-
/**
|
|
510
|
-
* @license
|
|
511
|
-
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
512
|
-
*
|
|
513
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
514
|
-
* you may not use this file except in compliance with the License.
|
|
515
|
-
* You may obtain a copy of the License at
|
|
516
|
-
*
|
|
517
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
518
|
-
*
|
|
519
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
520
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
521
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
522
|
-
* See the License for the specific language governing permissions and
|
|
523
|
-
* limitations under the License.
|
|
524
|
-
*/
|
|
525
|
-
var we = 3, x = Ae();
|
|
526
|
-
function Rt(e, t, s) {
|
|
527
|
-
if (t.staticsApplied = !0, !(!s || !s.length)) {
|
|
528
|
-
if (t.hasEmptyAttrsArr()) {
|
|
529
|
-
for (var n = 0; n < s.length; n += 2)
|
|
530
|
-
z(e, s[n], s[n + 1]);
|
|
531
|
-
return;
|
|
470
|
+
function ke(t, n) {
|
|
471
|
+
var a = Nt(v, t, n), l = a || xt(t, n);
|
|
472
|
+
l !== v && (ne.indexOf(l) >= 0 ? ht(x, l, v) : x.insertBefore(l, v), v = l);
|
|
473
|
+
}
|
|
474
|
+
function Ie(t, n, a) {
|
|
475
|
+
for (var l = t, d = n; d !== a; ) {
|
|
476
|
+
var h = d.nextSibling;
|
|
477
|
+
l.removeChild(d), H.markDeleted(d), d = h;
|
|
532
478
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
479
|
+
}
|
|
480
|
+
function Le() {
|
|
481
|
+
x = v, v = null;
|
|
482
|
+
}
|
|
483
|
+
function ae() {
|
|
484
|
+
return v ? v.nextSibling : x.firstChild;
|
|
485
|
+
}
|
|
486
|
+
function he() {
|
|
487
|
+
v = ae();
|
|
488
|
+
}
|
|
489
|
+
function Fe() {
|
|
490
|
+
Ie(x, ae(), null), v = x, x = x.parentNode;
|
|
491
|
+
}
|
|
492
|
+
function Re(t, n) {
|
|
493
|
+
return he(), ke(t, n), Le(), x;
|
|
494
|
+
}
|
|
495
|
+
function $e() {
|
|
496
|
+
return process.env.NODE_ENV !== "production" && te(!1), Fe(), v;
|
|
497
|
+
}
|
|
498
|
+
function yt() {
|
|
499
|
+
return he(), ke("#text", null), v;
|
|
500
|
+
}
|
|
501
|
+
function St() {
|
|
502
|
+
return process.env.NODE_ENV !== "production" && (xe("currentElement", T), V("currentElement")), x;
|
|
503
|
+
}
|
|
504
|
+
function At() {
|
|
505
|
+
return process.env.NODE_ENV !== "production" && (xe("currentPointer", T), V("currentPointer")), ae();
|
|
506
|
+
}
|
|
507
|
+
function Ot() {
|
|
508
|
+
process.env.NODE_ENV !== "production" && (it("skip", v), te(!0)), v = x.lastChild;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* @license
|
|
512
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
513
|
+
*
|
|
514
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
515
|
+
* you may not use this file except in compliance with the License.
|
|
516
|
+
* You may obtain a copy of the License at
|
|
517
|
+
*
|
|
518
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
519
|
+
*
|
|
520
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
521
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
522
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
523
|
+
* See the License for the specific language governing permissions and
|
|
524
|
+
* limitations under the License.
|
|
525
|
+
*/
|
|
526
|
+
var Be = 3, k = r();
|
|
527
|
+
function Dt(t, n, a) {
|
|
528
|
+
if (n.staticsApplied = !0, !(!a || !a.length)) {
|
|
529
|
+
if (n.hasEmptyAttrsArr()) {
|
|
530
|
+
for (var l = 0; l < a.length; l += 2)
|
|
531
|
+
Z(t, a[l], a[l + 1]);
|
|
532
|
+
return;
|
|
540
533
|
}
|
|
541
|
-
|
|
534
|
+
for (var l = 0; l < a.length; l += 2)
|
|
535
|
+
k[a[l]] = l + 1;
|
|
536
|
+
for (var d = n.getAttrsArr(0), h = 0, l = 0; l < d.length; l += 2) {
|
|
537
|
+
var y = d[l], C = d[l + 1], S = k[y];
|
|
538
|
+
if (S) {
|
|
539
|
+
a[S] === C && delete k[y];
|
|
540
|
+
continue;
|
|
541
|
+
}
|
|
542
|
+
d[h] = y, d[h + 1] = C, h += 2;
|
|
543
|
+
}
|
|
544
|
+
c(d, h);
|
|
545
|
+
for (var y in k)
|
|
546
|
+
Z(t, y, a[k[y]]), delete k[y];
|
|
542
547
|
}
|
|
543
|
-
le(i, r);
|
|
544
|
-
for (var o in x)
|
|
545
|
-
z(e, o, s[x[o]]), delete x[o];
|
|
546
548
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
549
|
+
function fe(t, n, a) {
|
|
550
|
+
process.env.NODE_ENV !== "production" && (V("elementOpen"), ye("elementOpen"));
|
|
551
|
+
var l = Re(t, n), d = W(l);
|
|
552
|
+
d.staticsApplied || Dt(l, d, a);
|
|
553
|
+
var h = Math.max(0, arguments.length - Be), y = d.hasEmptyAttrsArr();
|
|
554
|
+
if (!h && y)
|
|
555
|
+
return l;
|
|
556
|
+
for (var C = d.getAttrsArr(h), S = Be, w = 0; S < arguments.length; S += 2, w += 2) {
|
|
557
|
+
var O = arguments[S];
|
|
558
|
+
if (y)
|
|
559
|
+
C[w] = O;
|
|
560
|
+
else if (C[w] !== O)
|
|
561
|
+
break;
|
|
562
|
+
var L = arguments[S + 1];
|
|
563
|
+
(y || C[w + 1] !== L) && (C[w + 1] = L, Z(l, O, L));
|
|
564
|
+
}
|
|
565
|
+
if (S < arguments.length || w < C.length) {
|
|
566
|
+
for (var oe = w; w < C.length; w += 2)
|
|
567
|
+
k[C[w]] = C[w + 1];
|
|
568
|
+
for (w = oe; S < arguments.length; S += 2, w += 2) {
|
|
569
|
+
var O = arguments[S], L = arguments[S + 1];
|
|
570
|
+
k[O] !== L && Z(l, O, L), C[w] = O, C[w + 1] = L, delete k[O];
|
|
571
|
+
}
|
|
572
|
+
c(C, w);
|
|
573
|
+
for (var O in k)
|
|
574
|
+
Z(l, O, void 0), delete k[O];
|
|
570
575
|
}
|
|
571
|
-
|
|
572
|
-
for (var C in x)
|
|
573
|
-
z(n, C, void 0), delete x[C];
|
|
576
|
+
return l;
|
|
574
577
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
n =
|
|
578
|
+
function Pt(t, n, a) {
|
|
579
|
+
var l = re();
|
|
580
|
+
process.env.NODE_ENV !== "production" && (V("elementOpenStart"), ee(!0)), l[0] = t, l[1] = n, l[2] = a;
|
|
581
|
+
}
|
|
582
|
+
function Et(t) {
|
|
583
|
+
var n = re();
|
|
584
|
+
process.env.NODE_ENV !== "production" && (pe("key"), se(n)), n[1] = t;
|
|
585
|
+
}
|
|
586
|
+
function kt(t, n) {
|
|
587
|
+
var a = re();
|
|
588
|
+
process.env.NODE_ENV !== "production" && pe("attr"), a.push(t), a.push(n);
|
|
589
|
+
}
|
|
590
|
+
function It() {
|
|
591
|
+
var t = re();
|
|
592
|
+
process.env.NODE_ENV !== "production" && (pe("elementOpenEnd"), ee(!1)), se(t);
|
|
593
|
+
var n = fe.apply(null, t);
|
|
594
|
+
return c(t, 0), n;
|
|
595
|
+
}
|
|
596
|
+
function je(t) {
|
|
597
|
+
process.env.NODE_ENV !== "production" && V("elementClose");
|
|
598
|
+
var n = $e();
|
|
599
|
+
return process.env.NODE_ENV !== "production" && nt(W(n).nameOrCtor, t), n;
|
|
600
|
+
}
|
|
601
|
+
function Lt(t, n, a) {
|
|
602
|
+
return fe.apply(null, arguments), je(t);
|
|
603
|
+
}
|
|
604
|
+
function Ft(t) {
|
|
605
|
+
process.env.NODE_ENV !== "production" && (V("text"), ye("text"));
|
|
606
|
+
var n = yt(), a = W(n);
|
|
607
|
+
if (a.text !== t) {
|
|
608
|
+
a.text = t;
|
|
609
|
+
for (var l = t, d = 1; d < arguments.length; d += 1) {
|
|
610
|
+
var h = arguments[d];
|
|
611
|
+
l = h(l);
|
|
612
|
+
}
|
|
613
|
+
n.data = l;
|
|
611
614
|
}
|
|
612
|
-
|
|
615
|
+
return n;
|
|
613
616
|
}
|
|
614
|
-
|
|
617
|
+
/**
|
|
618
|
+
* @license
|
|
619
|
+
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
|
|
620
|
+
*
|
|
621
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
622
|
+
* you may not use this file except in compliance with the License.
|
|
623
|
+
* You may obtain a copy of the License at
|
|
624
|
+
*
|
|
625
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
626
|
+
*
|
|
627
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
628
|
+
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
629
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
630
|
+
* See the License for the specific language governing permissions and
|
|
631
|
+
* limitations under the License.
|
|
632
|
+
*/
|
|
633
|
+
return g.applyAttr = $, g.applyProp = Ne, g.attributes = Q, g.close = $e, g.currentElement = St, g.currentPointer = At, g.open = Re, g.patch = Pe, g.patchInner = Pe, g.patchOuter = _t, g.skip = Ot, g.skipNode = he, g.getKey = mt, g.clearCache = Oe, g.importNode = Ae, g.isDataInitialized = gt, g.notifications = J, g.symbols = e, g.attr = kt, g.elementClose = je, g.elementOpen = fe, g.elementOpenEnd = It, g.elementOpenStart = Pt, g.elementVoid = Lt, g.text = Ft, g.key = Et, g;
|
|
615
634
|
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
621
|
-
* you may not use this file except in compliance with the License.
|
|
622
|
-
* You may obtain a copy of the License at
|
|
623
|
-
*
|
|
624
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
625
|
-
*
|
|
626
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
627
|
-
* distributed under the License is distributed on an "AS-IS" BASIS,
|
|
628
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
629
|
-
* See the License for the specific language governing permissions and
|
|
630
|
-
* limitations under the License.
|
|
631
|
-
*/
|
|
632
|
-
d.applyAttr = Oe;
|
|
633
|
-
d.applyProp = De;
|
|
634
|
-
d.attributes = V;
|
|
635
|
-
d.close = ze;
|
|
636
|
-
var he = d.currentElement = It, se = d.currentPointer = Lt;
|
|
637
|
-
d.open = Ue;
|
|
638
|
-
var Vt = d.patch = Re;
|
|
639
|
-
d.patchInner = Re;
|
|
640
|
-
d.patchOuter = Dt;
|
|
641
|
-
d.skip = Ft;
|
|
642
|
-
var ne = d.skipNode = de;
|
|
643
|
-
d.getKey = xt;
|
|
644
|
-
d.clearCache = Le;
|
|
645
|
-
d.importNode = Ie;
|
|
646
|
-
d.isDataInitialized = Nt;
|
|
647
|
-
d.notifications = U;
|
|
648
|
-
d.symbols = oe;
|
|
649
|
-
var _e = d.attr = jt, Wt = d.elementClose = Ve;
|
|
650
|
-
d.elementOpen = ue;
|
|
651
|
-
var Ht = d.elementOpenEnd = Tt, qt = d.elementOpenStart = $t;
|
|
652
|
-
d.elementVoid = Ut;
|
|
653
|
-
var Gt = d.text = zt;
|
|
654
|
-
d.key = Bt;
|
|
655
|
-
function Ne(e) {
|
|
656
|
-
let t = se();
|
|
657
|
-
return t instanceof Comment && t.data !== e ? t.data = e : (t = document.createComment(e), he().appendChild(t)), ne(), t;
|
|
635
|
+
var A = Ut();
|
|
636
|
+
function ze(e) {
|
|
637
|
+
let s = A.currentPointer();
|
|
638
|
+
return s instanceof Comment && s.data !== e ? s.data = e : (s = document.createComment(e), A.currentElement().appendChild(s)), A.skipNode(), s;
|
|
658
639
|
}
|
|
659
|
-
let
|
|
660
|
-
function
|
|
661
|
-
|
|
640
|
+
let He = $t;
|
|
641
|
+
function as(e) {
|
|
642
|
+
He = e;
|
|
662
643
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
644
|
+
function zt() {
|
|
645
|
+
return He;
|
|
665
646
|
}
|
|
666
|
-
const
|
|
667
|
-
has(e,
|
|
668
|
-
return !!(e[
|
|
647
|
+
const U = Symbol("ComponentMetadata"), P = Object.freeze({
|
|
648
|
+
has(e, s) {
|
|
649
|
+
return !!(e[U] && Object.prototype.hasOwnProperty.call(e[U], s));
|
|
669
650
|
},
|
|
670
|
-
add(e,
|
|
671
|
-
e[
|
|
651
|
+
add(e, s) {
|
|
652
|
+
e[U] ? Object.assign(e[U], s) : e[U] = s;
|
|
672
653
|
},
|
|
673
|
-
get(e,
|
|
674
|
-
return e[
|
|
675
|
-
}
|
|
676
|
-
}),
|
|
677
|
-
function
|
|
678
|
-
for (const
|
|
679
|
-
if (typeof
|
|
680
|
-
|
|
681
|
-
else if (typeof
|
|
682
|
-
|
|
683
|
-
else if (
|
|
684
|
-
|
|
685
|
-
else if (Array.isArray(
|
|
686
|
-
let
|
|
687
|
-
if (
|
|
688
|
-
const
|
|
689
|
-
for (let
|
|
690
|
-
|
|
654
|
+
get(e, s, i) {
|
|
655
|
+
return e[U] && e[U][s] || i;
|
|
656
|
+
}
|
|
657
|
+
}), Ve = Symbol("ds-web-components:pragma:listeners-attached"), qe = "idom-pragma:content-begin", ge = "idom-pragma:content-end";
|
|
658
|
+
function me(e) {
|
|
659
|
+
for (const s of e)
|
|
660
|
+
if (typeof s == "function")
|
|
661
|
+
s();
|
|
662
|
+
else if (typeof s == "string")
|
|
663
|
+
A.text(s);
|
|
664
|
+
else if (s instanceof Set)
|
|
665
|
+
me(Array.from(s));
|
|
666
|
+
else if (Array.isArray(s) && s.length > 0) {
|
|
667
|
+
let i = A.currentPointer();
|
|
668
|
+
if (ze(qe), i === null) {
|
|
669
|
+
const o = A.currentElement();
|
|
670
|
+
for (let r = 0; r < s.length; r += 1)
|
|
671
|
+
o.contains(s[r]) || o.appendChild(s[r]), A.skipNode();
|
|
691
672
|
}
|
|
692
|
-
for (;
|
|
693
|
-
|
|
694
|
-
|
|
673
|
+
for (; i && i.data !== ge; )
|
|
674
|
+
A.skipNode(), i = A.currentPointer();
|
|
675
|
+
ze(ge);
|
|
695
676
|
}
|
|
696
677
|
}
|
|
697
|
-
function
|
|
698
|
-
if (
|
|
699
|
-
for (const
|
|
700
|
-
if (
|
|
701
|
-
return () =>
|
|
678
|
+
function p(e, s, ...i) {
|
|
679
|
+
if (s) {
|
|
680
|
+
for (const o of Object.keys(s))
|
|
681
|
+
if (o.toUpperCase() === "DATA-FRAGMENT")
|
|
682
|
+
return () => me(i);
|
|
702
683
|
}
|
|
703
684
|
return () => {
|
|
704
|
-
|
|
705
|
-
const
|
|
706
|
-
if (
|
|
707
|
-
for (const
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
const
|
|
711
|
-
if (!
|
|
712
|
-
for (const
|
|
713
|
-
|
|
714
|
-
|
|
685
|
+
A.elementOpenStart(e);
|
|
686
|
+
const o = [];
|
|
687
|
+
if (s)
|
|
688
|
+
for (const c of Object.keys(s))
|
|
689
|
+
c.toUpperCase() === "CLASSNAME" ? A.attr("class", s[c]) : /^on[A-Z]/.test(c) ? o.push(c) : A.attr(c, s[c]);
|
|
690
|
+
A.elementOpenEnd(e);
|
|
691
|
+
const r = A.currentElement();
|
|
692
|
+
if (!r[Ve]) {
|
|
693
|
+
for (const c of o)
|
|
694
|
+
r.addEventListener(c.substr(2).toLowerCase(), s[c]);
|
|
695
|
+
r[Ve] = !0;
|
|
715
696
|
}
|
|
716
|
-
|
|
697
|
+
me(i), A.elementClose(e);
|
|
717
698
|
};
|
|
718
699
|
}
|
|
719
|
-
function
|
|
720
|
-
customElements.get(e) || customElements.define(e,
|
|
700
|
+
function Ge(e, s) {
|
|
701
|
+
customElements.get(e) || customElements.define(e, s);
|
|
721
702
|
}
|
|
722
|
-
function
|
|
723
|
-
for (const
|
|
724
|
-
|
|
703
|
+
function os(...e) {
|
|
704
|
+
for (const s of e)
|
|
705
|
+
Ge(P.get(s, "tag"), s);
|
|
725
706
|
}
|
|
726
|
-
function
|
|
727
|
-
return function(...
|
|
728
|
-
for (const
|
|
729
|
-
const
|
|
730
|
-
|
|
707
|
+
function ls(e) {
|
|
708
|
+
return function(...i) {
|
|
709
|
+
for (const o of i) {
|
|
710
|
+
const r = `${e}${P.get(o, "tag").substr(3)}`;
|
|
711
|
+
Ge(r, o);
|
|
731
712
|
}
|
|
732
713
|
};
|
|
733
714
|
}
|
|
734
|
-
const
|
|
715
|
+
const We = Symbol("Component Attribute Bindings"), X = Symbol("Component Class Bindings"), ve = Symbol("Component Style Bindings"), Vt = {
|
|
735
716
|
__initialized: !1,
|
|
736
717
|
__observer: null,
|
|
737
718
|
__queuedUpdate: null,
|
|
738
719
|
__managedClasses: /* @__PURE__ */ new Set(),
|
|
739
720
|
__updateHostBindings() {
|
|
740
721
|
const e = this;
|
|
741
|
-
for (const
|
|
742
|
-
e.setAttribute(
|
|
743
|
-
for (const
|
|
744
|
-
e.style[
|
|
745
|
-
for (const
|
|
746
|
-
e.classList.remove(
|
|
747
|
-
for (const
|
|
748
|
-
e.__managedClasses.add(
|
|
749
|
-
for (const
|
|
750
|
-
e.classList.add(
|
|
722
|
+
for (const s of Object.keys(e[We] || {}))
|
|
723
|
+
e.setAttribute(s, e[We][s]);
|
|
724
|
+
for (const s of Object.keys(e[ve] || {}))
|
|
725
|
+
e.style[s] = e[ve][s];
|
|
726
|
+
for (const s of e.__managedClasses)
|
|
727
|
+
e.classList.remove(s);
|
|
728
|
+
for (const s of (e[X] || []).filter(Boolean))
|
|
729
|
+
e.__managedClasses.add(s), e.classList.add(s);
|
|
730
|
+
for (const s of (e.getAttribute("classname") || "").split(/\w+/).filter(Boolean))
|
|
731
|
+
e.classList.add(s);
|
|
751
732
|
},
|
|
752
733
|
__updateChildQueries(e) {
|
|
753
|
-
const
|
|
754
|
-
for (const
|
|
755
|
-
if (!e || e &&
|
|
756
|
-
const
|
|
757
|
-
|
|
734
|
+
const s = this;
|
|
735
|
+
for (const i of P.get(s.constructor, "childQueries", []))
|
|
736
|
+
if (!e || e && i.refresh) {
|
|
737
|
+
const o = i.all ? s.querySelectorAll : s.querySelector;
|
|
738
|
+
s[i.key] = o.call(s, i.selector);
|
|
758
739
|
}
|
|
759
740
|
},
|
|
760
741
|
__gatherChildren() {
|
|
761
742
|
const e = this;
|
|
762
|
-
let
|
|
763
|
-
for (let
|
|
764
|
-
const
|
|
765
|
-
|
|
743
|
+
let s = Array.from(e.childNodes), i = null, o = s.length;
|
|
744
|
+
for (let r = 0; r < s.length; r += 1) {
|
|
745
|
+
const c = s[r];
|
|
746
|
+
c instanceof Comment && (c.data === qe ? i = r + 1 : c.data === ge && (o = r - 1));
|
|
766
747
|
}
|
|
767
|
-
if (
|
|
768
|
-
for (const
|
|
769
|
-
|
|
748
|
+
if (i === null)
|
|
749
|
+
for (const r of s)
|
|
750
|
+
r.parentNode.removeChild(r);
|
|
770
751
|
else
|
|
771
|
-
|
|
772
|
-
|
|
752
|
+
s = s.slice(i, o);
|
|
753
|
+
P.has(e.constructor, "contentProp") && (e[P.get(e.constructor, "contentProp")] = s);
|
|
773
754
|
},
|
|
774
755
|
__startMutObs() {
|
|
775
756
|
const e = this;
|
|
@@ -783,7 +764,7 @@ const ye = Symbol("Component Attribute Bindings"), j = Symbol("Component Class B
|
|
|
783
764
|
},
|
|
784
765
|
__doRender() {
|
|
785
766
|
const e = this;
|
|
786
|
-
e.__stopMutObs(),
|
|
767
|
+
e.__stopMutObs(), A.patch(e, e.render(zt())), e.__startMutObs();
|
|
787
768
|
},
|
|
788
769
|
update() {
|
|
789
770
|
const e = this;
|
|
@@ -793,23 +774,23 @@ const ye = Symbol("Component Attribute Bindings"), j = Symbol("Component Class B
|
|
|
793
774
|
}, 0), e.__queuedUpdate = null;
|
|
794
775
|
}));
|
|
795
776
|
},
|
|
796
|
-
attributeChangedCallback(e,
|
|
797
|
-
const
|
|
798
|
-
|
|
777
|
+
attributeChangedCallback(e, s, i) {
|
|
778
|
+
const o = this, r = i === "" ? !0 : i;
|
|
779
|
+
r !== s && (o.__cbAttributeChanged && o.__cbAttributeChanged(e, o[e], r), e !== "style" && (o[e] = r), o.__initialized && o.update());
|
|
799
780
|
},
|
|
800
781
|
connectedCallback() {
|
|
801
782
|
const e = this;
|
|
802
783
|
e.__cbConnected && e.__cbConnected();
|
|
803
|
-
const
|
|
784
|
+
const s = P.get(e.constructor, "eventListeners", []);
|
|
804
785
|
setTimeout(() => {
|
|
805
786
|
if (!e.__initialized) {
|
|
806
787
|
e.__gatherChildren();
|
|
807
|
-
for (const [,
|
|
808
|
-
e[
|
|
788
|
+
for (const [, i] of s)
|
|
789
|
+
e[i] = e[i].bind(e);
|
|
809
790
|
e.__initialized = !0;
|
|
810
791
|
}
|
|
811
|
-
for (const [
|
|
812
|
-
e.addEventListener(
|
|
792
|
+
for (const [i, o] of s)
|
|
793
|
+
e.addEventListener(i, e[o]);
|
|
813
794
|
e.__doRender(), setTimeout(() => {
|
|
814
795
|
e.__updateChildQueries(), e.__updateHostBindings();
|
|
815
796
|
}, 0);
|
|
@@ -818,139 +799,139 @@ const ye = Symbol("Component Attribute Bindings"), j = Symbol("Component Class B
|
|
|
818
799
|
disconnectedCallback() {
|
|
819
800
|
const e = this;
|
|
820
801
|
e.__cbDisconnected && e.__cbDisconnected();
|
|
821
|
-
for (const [
|
|
822
|
-
e.removeEventListener(
|
|
802
|
+
for (const [s, i] of P.get(e.constructor, "eventListeners", []))
|
|
803
|
+
e.removeEventListener(s, e[i]);
|
|
823
804
|
e.__stopMutObs();
|
|
824
805
|
}
|
|
825
806
|
};
|
|
826
|
-
function
|
|
827
|
-
return (
|
|
828
|
-
|
|
829
|
-
__cbAttributeChanged:
|
|
830
|
-
__cbConnected:
|
|
831
|
-
__cbDisconnected:
|
|
832
|
-
},
|
|
807
|
+
function K(e) {
|
|
808
|
+
return (s) => {
|
|
809
|
+
P.add(s, e), Object.assign(s.prototype, {
|
|
810
|
+
__cbAttributeChanged: s.prototype.attributeChangedCallback,
|
|
811
|
+
__cbConnected: s.prototype.connectedCallback,
|
|
812
|
+
__cbDisconnected: s.prototype.disconnectedCallback
|
|
813
|
+
}, Vt);
|
|
833
814
|
};
|
|
834
815
|
}
|
|
835
|
-
function
|
|
836
|
-
return (e,
|
|
837
|
-
|
|
816
|
+
function be() {
|
|
817
|
+
return (e, s) => {
|
|
818
|
+
P.add(e.constructor, { contentProp: s });
|
|
838
819
|
};
|
|
839
820
|
}
|
|
840
|
-
function
|
|
841
|
-
return (
|
|
842
|
-
Object.defineProperty(
|
|
821
|
+
function Ce(e) {
|
|
822
|
+
return (s, i) => {
|
|
823
|
+
Object.defineProperty(s, i, {
|
|
843
824
|
get() {
|
|
844
|
-
return Object.defineProperty(this,
|
|
825
|
+
return Object.defineProperty(this, i, {
|
|
845
826
|
value: {
|
|
846
|
-
dispatch: (
|
|
847
|
-
const
|
|
848
|
-
return this.dispatchEvent(
|
|
827
|
+
dispatch: (o) => {
|
|
828
|
+
const r = new CustomEvent(e || i, { detail: o });
|
|
829
|
+
return this.dispatchEvent(r), r;
|
|
849
830
|
}
|
|
850
831
|
}
|
|
851
|
-
}), this[
|
|
832
|
+
}), this[i];
|
|
852
833
|
},
|
|
853
834
|
configurable: !0
|
|
854
835
|
});
|
|
855
836
|
};
|
|
856
837
|
}
|
|
857
|
-
function
|
|
858
|
-
return (
|
|
859
|
-
const
|
|
860
|
-
|
|
838
|
+
function le(e) {
|
|
839
|
+
return (s, i) => {
|
|
840
|
+
const o = P.get(s.constructor, "eventListeners", []);
|
|
841
|
+
o.push([e, i]), P.add(s.constructor, { eventListeners: o });
|
|
861
842
|
};
|
|
862
843
|
}
|
|
863
|
-
function
|
|
864
|
-
return (
|
|
865
|
-
const
|
|
866
|
-
if (
|
|
844
|
+
function m(e) {
|
|
845
|
+
return (s, i) => {
|
|
846
|
+
const o = s.constructor, r = i.toLowerCase();
|
|
847
|
+
if (o.observedAttributes = o.observedAttributes || [
|
|
867
848
|
"classname",
|
|
868
849
|
"className",
|
|
869
850
|
"style"
|
|
870
|
-
],
|
|
851
|
+
], o.observedAttributes.push(i), o.observedAttributes.push(r), r !== i && Object.defineProperty(s, i, {
|
|
871
852
|
get() {
|
|
872
|
-
return this[
|
|
853
|
+
return this[r];
|
|
873
854
|
},
|
|
874
|
-
set(
|
|
875
|
-
this[
|
|
855
|
+
set(c) {
|
|
856
|
+
this[r] = c;
|
|
876
857
|
}
|
|
877
858
|
}), e) {
|
|
878
|
-
const
|
|
879
|
-
Object.defineProperty(
|
|
859
|
+
const c = Symbol.for(i);
|
|
860
|
+
Object.defineProperty(s, r, {
|
|
880
861
|
get() {
|
|
881
|
-
return this[
|
|
862
|
+
return this[c];
|
|
882
863
|
},
|
|
883
|
-
set(
|
|
884
|
-
let
|
|
885
|
-
e === Boolean && typeof
|
|
864
|
+
set(f) {
|
|
865
|
+
let $ = f;
|
|
866
|
+
e === Boolean && typeof f == "string" && f.toLowerCase() === "false" ? $ = !1 : $ = e(f), this[c] = $;
|
|
886
867
|
}
|
|
887
868
|
});
|
|
888
869
|
}
|
|
889
870
|
};
|
|
890
871
|
}
|
|
891
|
-
function
|
|
892
|
-
return (
|
|
893
|
-
const
|
|
894
|
-
|
|
895
|
-
key:
|
|
872
|
+
function Xe(e, s, i) {
|
|
873
|
+
return (o, r) => {
|
|
874
|
+
const c = P.get(o.constructor, "childQueries", []);
|
|
875
|
+
c.push({
|
|
876
|
+
key: r,
|
|
896
877
|
selector: e,
|
|
897
|
-
all:
|
|
898
|
-
refresh:
|
|
899
|
-
}),
|
|
878
|
+
all: i,
|
|
879
|
+
refresh: s.refresh
|
|
880
|
+
}), P.add(o.constructor, { childQueries: c });
|
|
900
881
|
};
|
|
901
882
|
}
|
|
902
|
-
function
|
|
903
|
-
return
|
|
883
|
+
function we(e, s = {}) {
|
|
884
|
+
return Xe(e, s);
|
|
904
885
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
886
|
+
function Wt(e, s = {}) {
|
|
887
|
+
return Xe(e, s, !0);
|
|
907
888
|
}
|
|
908
|
-
function
|
|
909
|
-
return (e,
|
|
910
|
-
const
|
|
889
|
+
function Ke() {
|
|
890
|
+
return (e, s) => {
|
|
891
|
+
const i = Symbol(s);
|
|
911
892
|
Object.defineProperties(e, {
|
|
912
|
-
[
|
|
893
|
+
[i]: {
|
|
913
894
|
writable: !0,
|
|
914
895
|
enumerable: !1,
|
|
915
896
|
configurable: !1,
|
|
916
|
-
value: e[
|
|
897
|
+
value: e[s]
|
|
917
898
|
},
|
|
918
|
-
[
|
|
899
|
+
[s]: {
|
|
919
900
|
get() {
|
|
920
|
-
return this[
|
|
901
|
+
return this[i];
|
|
921
902
|
},
|
|
922
|
-
set(
|
|
923
|
-
this[
|
|
903
|
+
set(o) {
|
|
904
|
+
this[i] !== o && (this[i] = o, this.update());
|
|
924
905
|
}
|
|
925
906
|
}
|
|
926
907
|
});
|
|
927
908
|
};
|
|
928
909
|
}
|
|
929
|
-
var
|
|
930
|
-
for (var
|
|
931
|
-
(
|
|
932
|
-
return
|
|
910
|
+
var Qe = /* @__PURE__ */ ((e) => (e["7Z"] = "application/x-7z-compressed", e.AAC = "audio/aac", e.ABW = "application/x-abiword", e.ARC = "application/octet-stream", e.AVI = "video/x-msvideo", e.AZW = "application/vnd.amazon.ebook", e.BIN = "application/octet-stream", e.BMP = "image/bmp", e.BZ = "application/x-bzip", e.BZ2 = "application/x-bzip2", e.CER = "application/pkix-cert", e.CSH = "application/x-csh", e.CSS = "text/css", e.CSV = "text/csv,application/vnd.ms-excel", e.DOC = "application/msword", e.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", e.EOT = "application/vnd.ms-fontobject", e.EPUB = "application/epub+zip", e.ES = "application/ecmascript", e.FLV = "video/x-flv", e.GIF = "image/gif", e.GZ = "application/x-gzip", e.HTM = "text/html", e.HTML = "text/html", e.ICO = "image/x-icon", e.ICS = "text/calendar", e.JAR = "application/java-archive", e.JPEG = "image/jpeg", e.JPG = "image/jpeg", e.JS = "application/javascript", e.JSON = "application/json", e.M3U = "audio/x-mpequrl", e.MID = "audio/midi", e.MIDI = "audio/midi", e.MOV = "video/quicktime", e.MP3 = "audio/mpeg3", e.MP4 = "video/mp4", e.MPEG = "video/mpeg", e.MPKG = "application/vnd.apple.installer+xml", e.ODP = "application/vnd.oasis.opendocument.presentation", e.ODS = "application/vnd.oasis.opendocument.spreadsheet", e.ODT = "application/vnd.oasis.opendocument.text", e.OGA = "audio/ogg", e.OGV = "video/ogg", e.OGX = "application/ogg", e.OTF = "font/otf", e.PNG = "image/png", e.PDF = "application/pdf", e.PPT = "application/vnd.ms-powerpoint", e.PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation", e.RAR = "application/x-rar-compressed", e.RTF = "application/rtf", e.SH = "application/x-sh", e.SVG = "image/svg+xml", e.SWF = "application/x-shockwave-flash", e.TAR = "application/x-tar", e.TIF = "image/tiff", e.TIFF = "image/tiff", e.TS = "application/typescript", e.TTF = "font/ttf", e.TXT = "text/plain", e.VSD = "application/vnd.visio", e.WAV = "audio/wav", e.WEBA = "audio/webm", e.WEBM = "video/webm", e.WEBP = "image/webp", e.WOFF = "font/woff", e.WOFF2 = "font/woff2", e.XHTML = "application/xhtml+xml", e.XLS = "application/vnd.ms-excel", e.XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", e.XML = "application/xml", e.XUL = "application/vnd.mozilla.xul+xml", e.ZIP = "application/zip", e))(Qe || {}), Ht = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, N = (e, s, i, o) => {
|
|
911
|
+
for (var r = o > 1 ? void 0 : o ? qt(s, i) : s, c = e.length - 1, f; c >= 0; c--)
|
|
912
|
+
(f = e[c]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
913
|
+
return o && r && Ht(s, i, r), r;
|
|
933
914
|
};
|
|
934
|
-
const
|
|
935
|
-
let
|
|
915
|
+
const _ = "sps-file-upload";
|
|
916
|
+
let b = class extends HTMLElement {
|
|
936
917
|
constructor() {
|
|
937
918
|
super(), this.shown = !0, this.files = [], this.acceptMIMETypes = /* @__PURE__ */ new Set(), this.active = !1, this.error = !1, this.namesOfUnsupportedFiles = [], this.handleBrowseLinkClick = this.handleBrowseLinkClick.bind(this), this.handleDownloadButtonClick = this.handleDownloadButtonClick.bind(this), this.handleFileInputChange = this.handleFileInputChange.bind(this), this.dismiss = this.dismiss.bind(this);
|
|
938
919
|
}
|
|
939
|
-
get [
|
|
920
|
+
get [X]() {
|
|
940
921
|
return [
|
|
941
|
-
|
|
942
|
-
this.active && `${
|
|
943
|
-
this.error && `${
|
|
944
|
-
!this.shown && `${
|
|
945
|
-
this.mini && `${
|
|
946
|
-
this.constrainContentWidth && `${
|
|
922
|
+
_,
|
|
923
|
+
this.active && `${_}--active`,
|
|
924
|
+
this.error && `${_}--error`,
|
|
925
|
+
!this.shown && `${_}--hidden`,
|
|
926
|
+
this.mini && `${_}--mini`,
|
|
927
|
+
this.constrainContentWidth && `${_}--constrained-content-width`
|
|
947
928
|
];
|
|
948
929
|
}
|
|
949
930
|
connectedCallback() {
|
|
950
931
|
this.description = this.description || (this.multiple ? "Files" : "File"), this.acceptExtensions && this.processAcceptExtensions(this.acceptExtensions), this.maxSize && this.parseAndValidateMaxSize(this.maxSize);
|
|
951
932
|
}
|
|
952
|
-
attributeChangedCallback(e,
|
|
953
|
-
e === "acceptExtensions" && this.processAcceptExtensions(
|
|
933
|
+
attributeChangedCallback(e, s, i) {
|
|
934
|
+
e === "acceptExtensions" && this.processAcceptExtensions(i), e === "maxSize" && this.parseAndValidateMaxSize(i);
|
|
954
935
|
}
|
|
955
936
|
/**
|
|
956
937
|
* If the `dismissable` prop has been set, this will programmatically
|
|
@@ -964,28 +945,28 @@ let h = class extends HTMLElement {
|
|
|
964
945
|
this.dismissable && (this.shown = !0, this.update());
|
|
965
946
|
}
|
|
966
947
|
render({ t: e }) {
|
|
967
|
-
const
|
|
968
|
-
return /* @__PURE__ */
|
|
948
|
+
const s = this.error ? Te.EXCLAMATION_CIRCLE : Te.UPLOAD_CLOUD, i = (this.multiple ? e("design-system:fileUpload.instructions_plural", { defaultValue: "Drag and drop your files here or |browse for files| on your desktop." }) : e("design-system:fileUpload.instructions", { defaultValue: "Drag and drop your file here or |browse for a file| on your desktop." })).split("|");
|
|
949
|
+
return /* @__PURE__ */ p("div", { "data-fragment": !0 }, /* @__PURE__ */ p("div", { className: `${_}__content` }, this.processing ? /* @__PURE__ */ p("div", { "data-fragment": !0 }, /* @__PURE__ */ p("i", { className: "sps-spinner sps-spinner--medium", "aria-hidden": "true" }), /* @__PURE__ */ p("div", { className: `${_}__instructions` }, e("design-system:fileUpload.processing", { defaultValue: "Processing Upload..." }))) : /* @__PURE__ */ p("div", { "data-fragment": !0 }, /* @__PURE__ */ p("i", { className: `sps-icon sps-icon-${s} ${_}__icon-primary`, "aria-hidden": "true" }), /* @__PURE__ */ p("div", { className: `${_}__title` }, this.error ? /* @__PURE__ */ p("div", { "data-fragment": !0 }, e(
|
|
969
950
|
this.namesOfUnsupportedFiles.length > 1 ? "design-system:fileUpload.cancelled_plural" : "design-system:fileUpload.cancelled",
|
|
970
951
|
{ defaultValue: this.namesOfUnsupportedFiles.length > 1 ? "File Upload(s) Failed" : "File Upload Failed" }
|
|
971
|
-
)) : /* @__PURE__ */
|
|
972
|
-
const
|
|
973
|
-
return /* @__PURE__ */
|
|
974
|
-
}))) : /* @__PURE__ */
|
|
952
|
+
)) : /* @__PURE__ */ p("div", { "data-fragment": !0 }, e("design-system:fileUpload.title", { description: this.description, defaultValue: `Upload Your ${this.description}` }))), this.error ? /* @__PURE__ */ p("div", { className: `${_}__errored-files` }, new Set(this.namesOfUnsupportedFiles.map((o, r) => {
|
|
953
|
+
const c = Math.floor(o.length / 2);
|
|
954
|
+
return /* @__PURE__ */ p("div", { className: `${_}__errored-filename`, key: o }, /* @__PURE__ */ p("span", { className: `${_}__errored-filename-segment` }, o.substr(0, c)), /* @__PURE__ */ p("div", { className: `${_}__errored-filename-segment` }, /* @__PURE__ */ p("span", null, o.substr(c))), r < this.namesOfUnsupportedFiles.length - 1 ? "," : "");
|
|
955
|
+
}))) : /* @__PURE__ */ p("span", null), /* @__PURE__ */ p("div", { className: `${_}__instructions` }, /* @__PURE__ */ p("div", { "data-fragment": !0 }, /* @__PURE__ */ p("span", null, i[0]), /* @__PURE__ */ p("a", { href: "", onClick: this.handleBrowseLinkClick }, i[1]), /* @__PURE__ */ p("span", null, i[2]))), /* @__PURE__ */ p("div", { className: `${_}__requirements` }, this.acceptExtensions ? /* @__PURE__ */ p("span", null, "(", " ", e("design-system:fileUpload.acceptedTypes", { fileTypes: this.acceptExtensionsDescription, defaultValue: `${this.acceptExtensionsDescription} format accepted` }), " ", ")") : "", this.maxSize ? /* @__PURE__ */ p("span", null, "(", " ", e("design-system:fileUpload.maximumSize", { size: this.maxSize, defaultValue: `${this.maxSize} maximum` }), " ", ")") : "", this.customRequirement ? /* @__PURE__ */ p("span", null, " ", this.customRequirement, " ") : ""), this.downloadLabel && /* @__PURE__ */ p(
|
|
975
956
|
"div",
|
|
976
957
|
{
|
|
977
|
-
className: `sps-button sps-button--link ${
|
|
958
|
+
className: `sps-button sps-button--link ${_}__download-button`,
|
|
978
959
|
onClick: this.handleDownloadButtonClick
|
|
979
960
|
},
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
))), this.dismissable && !this.processing && /* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ p("button", { type: "button" }, /* @__PURE__ */ p("i", { className: "sps-icon sps-icon-download-cloud", "aria-hidden": "true" }), " ", this.downloadLabel)
|
|
962
|
+
))), this.dismissable && !this.processing && /* @__PURE__ */ p(
|
|
982
963
|
"div",
|
|
983
964
|
{
|
|
984
|
-
className: `sps-button sps-button--icon ${
|
|
965
|
+
className: `sps-button sps-button--icon ${_}__close-button`,
|
|
985
966
|
onClick: this.dismiss
|
|
986
967
|
},
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
), /* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ p("button", { type: "button", title: e("design-system:fileUpload.close", { defaultValue: "Close" }) }, /* @__PURE__ */ p("i", { className: "sps-icon sps-icon-x", "aria-hidden": "true" }))
|
|
969
|
+
), /* @__PURE__ */ p("form", null, /* @__PURE__ */ p(
|
|
989
970
|
"input",
|
|
990
971
|
{
|
|
991
972
|
type: "file",
|
|
@@ -997,25 +978,25 @@ let h = class extends HTMLElement {
|
|
|
997
978
|
}
|
|
998
979
|
parseAndValidateMaxSize(e) {
|
|
999
980
|
try {
|
|
1000
|
-
this.maxSizeBytes =
|
|
981
|
+
this.maxSizeBytes = Tt(e);
|
|
1001
982
|
} catch {
|
|
1002
983
|
throw new Error(`Could not parse "${e}" as a file size.`);
|
|
1003
984
|
}
|
|
1004
985
|
}
|
|
1005
986
|
processAcceptExtensions(e) {
|
|
1006
|
-
const
|
|
1007
|
-
this.acceptExtensionsDescription =
|
|
1008
|
-
for (const
|
|
1009
|
-
for (const
|
|
1010
|
-
this.acceptMIMETypes.add(
|
|
1011
|
-
this.accept =
|
|
987
|
+
const i = (Array.isArray(e) ? e : e.trim().split(/\s?,\s?/)).map((r) => r.replace(/^\./, "")), o = i.map((r) => `.${r}`.toLowerCase());
|
|
988
|
+
this.acceptExtensionsDescription = o.map((r, c) => c > 0 && c === o.length - 1 ? `or ${r}` : r).join(o.length > 2 ? ", " : " "), this.acceptMIMETypes.clear();
|
|
989
|
+
for (const r of i)
|
|
990
|
+
for (const c of Qe[r.toUpperCase()].split(","))
|
|
991
|
+
this.acceptMIMETypes.add(c);
|
|
992
|
+
this.accept = o.concat(Array.from(this.acceptMIMETypes)).join(",");
|
|
1012
993
|
}
|
|
1013
994
|
selectFiles(e) {
|
|
1014
995
|
this.namesOfUnsupportedFiles = [];
|
|
1015
|
-
const
|
|
1016
|
-
for (const
|
|
1017
|
-
this.acceptExtensions && !this.acceptMIMETypes.has(
|
|
1018
|
-
this.namesOfUnsupportedFiles.length ? (this.error = !0, this.fileInput.value = null, this.update()) : (this.files =
|
|
996
|
+
const s = Array.from(e);
|
|
997
|
+
for (const i of s)
|
|
998
|
+
this.acceptExtensions && !this.acceptMIMETypes.has(i.type) && this.namesOfUnsupportedFiles.push(i.name), this.maxSize && i.size > this.maxSizeBytes && this.namesOfUnsupportedFiles.indexOf(i.name) === -1 && this.namesOfUnsupportedFiles.push(i.name);
|
|
999
|
+
this.namesOfUnsupportedFiles.length ? (this.error = !0, this.fileInput.value = null, this.update()) : (this.files = s, this.selection.dispatch(s));
|
|
1019
1000
|
}
|
|
1020
1001
|
handleDragOver(e) {
|
|
1021
1002
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -1028,7 +1009,7 @@ let h = class extends HTMLElement {
|
|
|
1028
1009
|
}
|
|
1029
1010
|
handleDrop(e) {
|
|
1030
1011
|
e.preventDefault(), e.stopPropagation(), this.active = !1, e.dataTransfer.items ? this.selectFiles(Array.from(e.dataTransfer.items).map(
|
|
1031
|
-
(
|
|
1012
|
+
(s) => s.getAsFile()
|
|
1032
1013
|
)) : this.selectFiles(e.dataTransfer.files), this.update();
|
|
1033
1014
|
}
|
|
1034
1015
|
/* eslint-enable @typescript-eslint/member-ordering */
|
|
@@ -1042,8 +1023,8 @@ let h = class extends HTMLElement {
|
|
|
1042
1023
|
e.stopPropagation(), this.selectFiles(e.target.files);
|
|
1043
1024
|
}
|
|
1044
1025
|
};
|
|
1045
|
-
|
|
1046
|
-
|
|
1026
|
+
b.displayName = _;
|
|
1027
|
+
b.props = {
|
|
1047
1028
|
description: "string",
|
|
1048
1029
|
multiple: "boolean",
|
|
1049
1030
|
dismissable: "boolean",
|
|
@@ -1057,76 +1038,76 @@ h.props = {
|
|
|
1057
1038
|
dismissal: { event: !0, type: "CustomEvent<void>" },
|
|
1058
1039
|
download: { event: !0, type: "CustomEvent<void>" }
|
|
1059
1040
|
};
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
],
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
],
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
],
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
],
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
],
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
],
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
],
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
],
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
],
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
],
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
],
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
],
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
],
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
],
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
],
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
],
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
],
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
],
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
],
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
],
|
|
1120
|
-
const
|
|
1041
|
+
N([
|
|
1042
|
+
m()
|
|
1043
|
+
], b.prototype, "description", 2);
|
|
1044
|
+
N([
|
|
1045
|
+
m(Boolean)
|
|
1046
|
+
], b.prototype, "multiple", 2);
|
|
1047
|
+
N([
|
|
1048
|
+
m(Boolean)
|
|
1049
|
+
], b.prototype, "shown", 2);
|
|
1050
|
+
N([
|
|
1051
|
+
m(Boolean)
|
|
1052
|
+
], b.prototype, "dismissable", 2);
|
|
1053
|
+
N([
|
|
1054
|
+
m(Boolean)
|
|
1055
|
+
], b.prototype, "processing", 2);
|
|
1056
|
+
N([
|
|
1057
|
+
m(Boolean)
|
|
1058
|
+
], b.prototype, "mini", 2);
|
|
1059
|
+
N([
|
|
1060
|
+
m(Boolean)
|
|
1061
|
+
], b.prototype, "constrainContentWidth", 2);
|
|
1062
|
+
N([
|
|
1063
|
+
m()
|
|
1064
|
+
], b.prototype, "downloadLabel", 2);
|
|
1065
|
+
N([
|
|
1066
|
+
m()
|
|
1067
|
+
], b.prototype, "acceptExtensions", 2);
|
|
1068
|
+
N([
|
|
1069
|
+
m()
|
|
1070
|
+
], b.prototype, "maxSize", 2);
|
|
1071
|
+
N([
|
|
1072
|
+
m()
|
|
1073
|
+
], b.prototype, "customRequirement", 2);
|
|
1074
|
+
N([
|
|
1075
|
+
Ce()
|
|
1076
|
+
], b.prototype, "selection", 2);
|
|
1077
|
+
N([
|
|
1078
|
+
Ce()
|
|
1079
|
+
], b.prototype, "dismissal", 2);
|
|
1080
|
+
N([
|
|
1081
|
+
Ce()
|
|
1082
|
+
], b.prototype, "download", 2);
|
|
1083
|
+
N([
|
|
1084
|
+
we("input[type='file']")
|
|
1085
|
+
], b.prototype, "fileInput", 2);
|
|
1086
|
+
N([
|
|
1087
|
+
le("dragover")
|
|
1088
|
+
], b.prototype, "handleDragOver", 1);
|
|
1089
|
+
N([
|
|
1090
|
+
le("dragenter")
|
|
1091
|
+
], b.prototype, "handleDragEnter", 1);
|
|
1092
|
+
N([
|
|
1093
|
+
le("dragleave")
|
|
1094
|
+
], b.prototype, "handleDragLeave", 1);
|
|
1095
|
+
N([
|
|
1096
|
+
le("drop")
|
|
1097
|
+
], b.prototype, "handleDrop", 1);
|
|
1098
|
+
b = N([
|
|
1099
|
+
K({ tag: _ })
|
|
1100
|
+
], b);
|
|
1101
|
+
const cs = {
|
|
1121
1102
|
basic: {
|
|
1122
1103
|
label: "Basic File Upload",
|
|
1123
|
-
description:
|
|
1104
|
+
description: u`
|
|
1124
1105
|
<p>Simply allow the user to drag-and-drop or select either a single file or multiple files at once.</p>
|
|
1125
1106
|
`,
|
|
1126
1107
|
examples: {
|
|
1127
1108
|
single: {
|
|
1128
1109
|
description: "<p>Single file upload</p>",
|
|
1129
|
-
react:
|
|
1110
|
+
react: u`
|
|
1130
1111
|
function Component() {
|
|
1131
1112
|
const ref = React.useRef()
|
|
1132
1113
|
|
|
@@ -1153,7 +1134,7 @@ const gs = {
|
|
|
1153
1134
|
},
|
|
1154
1135
|
multiple: {
|
|
1155
1136
|
description: "<p>Multiple file upload</p>",
|
|
1156
|
-
react:
|
|
1137
|
+
react: u`
|
|
1157
1138
|
function Component() {
|
|
1158
1139
|
const ref = React.useRef()
|
|
1159
1140
|
|
|
@@ -1182,13 +1163,13 @@ const gs = {
|
|
|
1182
1163
|
},
|
|
1183
1164
|
restrictions: {
|
|
1184
1165
|
label: "Restrictions",
|
|
1185
|
-
description:
|
|
1166
|
+
description: u`
|
|
1186
1167
|
<p>You can place restrictions on what files will be accepted with an extension whitelist and/or a maximum size.</p>
|
|
1187
1168
|
`,
|
|
1188
1169
|
examples: {
|
|
1189
1170
|
size: {
|
|
1190
1171
|
description: "<p>Maximum size</p>",
|
|
1191
|
-
react:
|
|
1172
|
+
react: u`
|
|
1192
1173
|
function Component() {
|
|
1193
1174
|
const ref = React.useRef()
|
|
1194
1175
|
|
|
@@ -1215,7 +1196,7 @@ const gs = {
|
|
|
1215
1196
|
},
|
|
1216
1197
|
type: {
|
|
1217
1198
|
description: "<p>File type whitelist</p>",
|
|
1218
|
-
react:
|
|
1199
|
+
react: u`
|
|
1219
1200
|
function Component() {
|
|
1220
1201
|
const ref = React.useRef()
|
|
1221
1202
|
|
|
@@ -1247,7 +1228,7 @@ const gs = {
|
|
|
1247
1228
|
},
|
|
1248
1229
|
both: {
|
|
1249
1230
|
description: "<p>Both restrictions</p>",
|
|
1250
|
-
react:
|
|
1231
|
+
react: u`
|
|
1251
1232
|
function Component() {
|
|
1252
1233
|
const ref = React.useRef()
|
|
1253
1234
|
|
|
@@ -1282,13 +1263,13 @@ const gs = {
|
|
|
1282
1263
|
},
|
|
1283
1264
|
dismissable: {
|
|
1284
1265
|
label: "Dismissable",
|
|
1285
|
-
description:
|
|
1266
|
+
description: u`
|
|
1286
1267
|
<p>With this option, the file upload component can be dismissed by the user. If the user does dismiss it, you can
|
|
1287
1268
|
show it again programmatically if you need to.</p>
|
|
1288
1269
|
`,
|
|
1289
1270
|
examples: {
|
|
1290
1271
|
dismissable: {
|
|
1291
|
-
react:
|
|
1272
|
+
react: u`
|
|
1292
1273
|
function Component() {
|
|
1293
1274
|
const [showFileUpload, setShowFileUpload] = React.useState(true)
|
|
1294
1275
|
const ref = React.useRef()
|
|
@@ -1327,13 +1308,13 @@ const gs = {
|
|
|
1327
1308
|
},
|
|
1328
1309
|
downloadButton: {
|
|
1329
1310
|
label: "Download Button",
|
|
1330
|
-
description:
|
|
1311
|
+
description: u`
|
|
1331
1312
|
<p>You can optionally provide a button to download a file. Typically this will be a template for
|
|
1332
1313
|
whatever the user is expected to upload. They can then fill out the template, save it, and upload it.</p>
|
|
1333
1314
|
`,
|
|
1334
1315
|
examples: {
|
|
1335
1316
|
downloadButton: {
|
|
1336
|
-
react:
|
|
1317
|
+
react: u`
|
|
1337
1318
|
function Component() {
|
|
1338
1319
|
const ref = React.useRef()
|
|
1339
1320
|
|
|
@@ -1367,13 +1348,13 @@ const gs = {
|
|
|
1367
1348
|
},
|
|
1368
1349
|
mini: {
|
|
1369
1350
|
label: "Mini File Upload",
|
|
1370
|
-
description:
|
|
1351
|
+
description: u`
|
|
1371
1352
|
<p>When the file upload component is to be placed in a small container,
|
|
1372
1353
|
it should be marked as a mini file upload so that everything fits.</p>
|
|
1373
1354
|
`,
|
|
1374
1355
|
examples: {
|
|
1375
1356
|
single: {
|
|
1376
|
-
react:
|
|
1357
|
+
react: u`
|
|
1377
1358
|
function Component() {
|
|
1378
1359
|
const ref = React.useRef()
|
|
1379
1360
|
|
|
@@ -1402,14 +1383,14 @@ const gs = {
|
|
|
1402
1383
|
},
|
|
1403
1384
|
constrainContentWidth: {
|
|
1404
1385
|
label: "Constrain Content Width",
|
|
1405
|
-
description:
|
|
1386
|
+
description: u`
|
|
1406
1387
|
<p>If this prop is provided, the content will be restricted to 50% of
|
|
1407
1388
|
the overall width of the component. Consult your product designer if
|
|
1408
1389
|
you're not sure whether to use this variant.</p>
|
|
1409
1390
|
`,
|
|
1410
1391
|
examples: {
|
|
1411
1392
|
constrainContentWidth: {
|
|
1412
|
-
react:
|
|
1393
|
+
react: u`
|
|
1413
1394
|
function Component() {
|
|
1414
1395
|
const ref = React.useRef()
|
|
1415
1396
|
|
|
@@ -1437,41 +1418,41 @@ const gs = {
|
|
|
1437
1418
|
}
|
|
1438
1419
|
}
|
|
1439
1420
|
};
|
|
1440
|
-
var
|
|
1441
|
-
for (var
|
|
1442
|
-
(
|
|
1443
|
-
return
|
|
1421
|
+
var Gt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, R = (e, s, i, o) => {
|
|
1422
|
+
for (var r = o > 1 ? void 0 : o ? Xt(s, i) : s, c = e.length - 1, f; c >= 0; c--)
|
|
1423
|
+
(f = e[c]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
1424
|
+
return o && r && Gt(s, i, r), r;
|
|
1444
1425
|
};
|
|
1445
|
-
const
|
|
1446
|
-
let
|
|
1426
|
+
const D = "sps-insight-card";
|
|
1427
|
+
let E = class extends HTMLElement {
|
|
1447
1428
|
constructor() {
|
|
1448
|
-
super(...arguments), this.kind =
|
|
1429
|
+
super(...arguments), this.kind = Bt.GENERAL;
|
|
1449
1430
|
}
|
|
1450
|
-
get [
|
|
1431
|
+
get [X]() {
|
|
1451
1432
|
return [
|
|
1452
|
-
|
|
1453
|
-
`${
|
|
1454
|
-
this.detail && this.detail.children.length ? `${
|
|
1433
|
+
D,
|
|
1434
|
+
`${D}--${this.kind}`,
|
|
1435
|
+
this.detail && this.detail.children.length ? `${D}--has-detail` : null
|
|
1455
1436
|
];
|
|
1456
1437
|
}
|
|
1457
1438
|
render({ t: e }) {
|
|
1458
|
-
const
|
|
1439
|
+
const s = /* @__PURE__ */ p("div", { className: `${D}__metric-count` }, this.metric), i = /* @__PURE__ */ p("div", { className: `${D}__description` }, /* @__PURE__ */ p(
|
|
1459
1440
|
"div",
|
|
1460
1441
|
{
|
|
1461
|
-
className: `${
|
|
1442
|
+
className: `${D}__title`,
|
|
1462
1443
|
style: { "-webkit-box-orient": "vertical" }
|
|
1463
1444
|
},
|
|
1464
1445
|
this.title
|
|
1465
|
-
), /* @__PURE__ */
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
] = (
|
|
1470
|
-
return /* @__PURE__ */
|
|
1446
|
+
), /* @__PURE__ */ p("div", { className: `${D}__detail` }, this.content)), o = this.partnercount, r = this.totalpartners, [
|
|
1447
|
+
c,
|
|
1448
|
+
f,
|
|
1449
|
+
$
|
|
1450
|
+
] = (o ? e("design-system:insightCard.partnerCount", { count: o, total: r, defaultValue: `${o} |of| ${r}` }) : "").split("|");
|
|
1451
|
+
return /* @__PURE__ */ p("div", { "data-fragment": !0 }, /* @__PURE__ */ p("div", { className: `${D}__body` }, this.icon ? /* @__PURE__ */ p("i", { className: `sps-icon sps-icon-${this.icon}` }) : /* @__PURE__ */ p("i", { className: `sps-icon sps-icon-${jt[this.kind]}` }), s, i), o && /* @__PURE__ */ p("div", { className: `${D}__partner-count` }, o === r ? /* @__PURE__ */ p("div", null, e("design-system:insightCard.all", { defaultValue: "ALL" })) : /* @__PURE__ */ p("div", { "data-fragment": !0 }, /* @__PURE__ */ p("div", null, c), /* @__PURE__ */ p("div", null, f), /* @__PURE__ */ p("div", null, $)), /* @__PURE__ */ p("div", { className: `${D}__partners-text` }, e("design-system:insightCard.partners", { defaultValue: "PARTNERS" }))));
|
|
1471
1452
|
}
|
|
1472
1453
|
};
|
|
1473
|
-
|
|
1474
|
-
|
|
1454
|
+
E.displayName = D;
|
|
1455
|
+
E.props = {
|
|
1475
1456
|
icon: "SpsIcon",
|
|
1476
1457
|
kind: "SpsInsightCardKind",
|
|
1477
1458
|
title: "string",
|
|
@@ -1480,54 +1461,54 @@ N.props = {
|
|
|
1480
1461
|
totalPartners: "number",
|
|
1481
1462
|
secondary: "boolean"
|
|
1482
1463
|
};
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
],
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
],
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
],
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
],
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
],
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
],
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
],
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
],
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
],
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
],
|
|
1513
|
-
var
|
|
1514
|
-
for (var
|
|
1515
|
-
(
|
|
1516
|
-
return
|
|
1464
|
+
R([
|
|
1465
|
+
m()
|
|
1466
|
+
], E.prototype, "icon", 2);
|
|
1467
|
+
R([
|
|
1468
|
+
m()
|
|
1469
|
+
], E.prototype, "kind", 2);
|
|
1470
|
+
R([
|
|
1471
|
+
m()
|
|
1472
|
+
], E.prototype, "title", 2);
|
|
1473
|
+
R([
|
|
1474
|
+
m()
|
|
1475
|
+
], E.prototype, "metric", 2);
|
|
1476
|
+
R([
|
|
1477
|
+
m()
|
|
1478
|
+
], E.prototype, "partnerCount", 2);
|
|
1479
|
+
R([
|
|
1480
|
+
m()
|
|
1481
|
+
], E.prototype, "totalPartners", 2);
|
|
1482
|
+
R([
|
|
1483
|
+
m()
|
|
1484
|
+
], E.prototype, "secondary", 2);
|
|
1485
|
+
R([
|
|
1486
|
+
be()
|
|
1487
|
+
], E.prototype, "content", 2);
|
|
1488
|
+
R([
|
|
1489
|
+
we(`.${D}__detail`)
|
|
1490
|
+
], E.prototype, "detail", 2);
|
|
1491
|
+
E = R([
|
|
1492
|
+
K({ tag: D })
|
|
1493
|
+
], E);
|
|
1494
|
+
var Kt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, _e = (e, s, i, o) => {
|
|
1495
|
+
for (var r = o > 1 ? void 0 : o ? Qt(s, i) : s, c = e.length - 1, f; c >= 0; c--)
|
|
1496
|
+
(f = e[c]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
1497
|
+
return o && r && Kt(s, i, r), r;
|
|
1517
1498
|
};
|
|
1518
|
-
const
|
|
1519
|
-
let
|
|
1499
|
+
const B = "sps-insights";
|
|
1500
|
+
let G = class extends HTMLElement {
|
|
1520
1501
|
constructor() {
|
|
1521
1502
|
super(), this.content = [], this.showAdditionalInsights = !1, this.toggleAdditionalInsights = this.toggleAdditionalInsights.bind(this);
|
|
1522
1503
|
}
|
|
1523
|
-
get [
|
|
1504
|
+
get [X]() {
|
|
1524
1505
|
return [
|
|
1525
|
-
|
|
1526
|
-
this.showAdditionalInsights && `${
|
|
1527
|
-
this.details && Array.from(this.details).every((e) => !e.textContent) ? `${
|
|
1528
|
-
this.content.length === 6 ? `${
|
|
1529
|
-
this.content.length === 7 ? `${
|
|
1530
|
-
this.content.length === 8 ? `${
|
|
1506
|
+
B,
|
|
1507
|
+
this.showAdditionalInsights && `${B}--show-additional`,
|
|
1508
|
+
this.details && Array.from(this.details).every((e) => !e.textContent) ? `${B}--no-details` : null,
|
|
1509
|
+
this.content.length === 6 ? `${B}--break-4` : null,
|
|
1510
|
+
this.content.length === 7 ? `${B}--break-5` : null,
|
|
1511
|
+
this.content.length === 8 ? `${B}--break-5` : null
|
|
1531
1512
|
];
|
|
1532
1513
|
}
|
|
1533
1514
|
/**
|
|
@@ -1539,26 +1520,26 @@ let R = class extends HTMLElement {
|
|
|
1539
1520
|
this.showAdditionalInsights = !this.showAdditionalInsights, this.update();
|
|
1540
1521
|
}
|
|
1541
1522
|
render() {
|
|
1542
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ p("div", { "data-fragment": !0 }, this.content, this.content.length > 10 && /* @__PURE__ */ p("div", { className: "sps-button sps-button--link", onClick: this.toggleAdditionalInsights }, /* @__PURE__ */ p("button", { type: "button" }, this.showAdditionalInsights ? "Hide " : "Show ", "Additional Insights")));
|
|
1543
1524
|
}
|
|
1544
1525
|
};
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
],
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
],
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
],
|
|
1556
|
-
const
|
|
1526
|
+
G.displayName = B;
|
|
1527
|
+
G.props = {};
|
|
1528
|
+
_e([
|
|
1529
|
+
be()
|
|
1530
|
+
], G.prototype, "content", 2);
|
|
1531
|
+
_e([
|
|
1532
|
+
Wt(".sps-insight-card__detail")
|
|
1533
|
+
], G.prototype, "details", 2);
|
|
1534
|
+
G = _e([
|
|
1535
|
+
K({ tag: B })
|
|
1536
|
+
], G);
|
|
1537
|
+
const ps = {
|
|
1557
1538
|
basic: {
|
|
1558
1539
|
label: "Basic Insight Cards",
|
|
1559
1540
|
examples: {
|
|
1560
1541
|
basic: {
|
|
1561
|
-
jsx:
|
|
1542
|
+
jsx: u`
|
|
1562
1543
|
<sps-insights>
|
|
1563
1544
|
<sps-insight-card kind="general"
|
|
1564
1545
|
metric="1234"
|
|
@@ -1589,7 +1570,7 @@ const ms = {
|
|
|
1589
1570
|
label: "With Details",
|
|
1590
1571
|
examples: {
|
|
1591
1572
|
details: {
|
|
1592
|
-
jsx:
|
|
1573
|
+
jsx: u`
|
|
1593
1574
|
<sps-insights>
|
|
1594
1575
|
<sps-insight-card kind="general"
|
|
1595
1576
|
metric="1234"
|
|
@@ -1642,7 +1623,7 @@ const ms = {
|
|
|
1642
1623
|
label: "Partner Count",
|
|
1643
1624
|
examples: {
|
|
1644
1625
|
partner_count: {
|
|
1645
|
-
jsx:
|
|
1626
|
+
jsx: u`
|
|
1646
1627
|
<sps-insights>
|
|
1647
1628
|
<sps-insight-card kind="general"
|
|
1648
1629
|
metric="1234"
|
|
@@ -1683,7 +1664,7 @@ const ms = {
|
|
|
1683
1664
|
label: "10+ Insight Cards",
|
|
1684
1665
|
examples: {
|
|
1685
1666
|
expansion: {
|
|
1686
|
-
jsx:
|
|
1667
|
+
jsx: u`
|
|
1687
1668
|
<sps-insights>
|
|
1688
1669
|
<sps-insight-card kind="general"
|
|
1689
1670
|
metric="1234"
|
|
@@ -1798,13 +1779,13 @@ const ms = {
|
|
|
1798
1779
|
},
|
|
1799
1780
|
events: {
|
|
1800
1781
|
label: "Adding a click handler",
|
|
1801
|
-
description:
|
|
1782
|
+
description: u`
|
|
1802
1783
|
<p>Attaching event handlers to native web components in React cannot be done the usual way at this time.
|
|
1803
1784
|
Here is how to do it:</p>
|
|
1804
1785
|
`,
|
|
1805
1786
|
examples: {
|
|
1806
1787
|
events: {
|
|
1807
|
-
react:
|
|
1788
|
+
react: u`
|
|
1808
1789
|
function Component() {
|
|
1809
1790
|
function handleClick() {
|
|
1810
1791
|
window.alert("Insight card clicked");
|
|
@@ -1844,7 +1825,7 @@ const ms = {
|
|
|
1844
1825
|
label: "Using alternate icons",
|
|
1845
1826
|
examples: {
|
|
1846
1827
|
basic: {
|
|
1847
|
-
react:
|
|
1828
|
+
react: u`
|
|
1848
1829
|
function DemoComponent() {
|
|
1849
1830
|
return (
|
|
1850
1831
|
<sps-insights>
|
|
@@ -1886,27 +1867,27 @@ const ms = {
|
|
|
1886
1867
|
}
|
|
1887
1868
|
}
|
|
1888
1869
|
};
|
|
1889
|
-
var
|
|
1890
|
-
for (var
|
|
1891
|
-
(
|
|
1892
|
-
return
|
|
1870
|
+
var Zt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, z = (e, s, i, o) => {
|
|
1871
|
+
for (var r = o > 1 ? void 0 : o ? Yt(s, i) : s, c = e.length - 1, f; c >= 0; c--)
|
|
1872
|
+
(f = e[c]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
1873
|
+
return o && r && Zt(s, i, r), r;
|
|
1893
1874
|
};
|
|
1894
|
-
let
|
|
1875
|
+
let F = class extends HTMLElement {
|
|
1895
1876
|
constructor() {
|
|
1896
1877
|
super(...arguments), this.active = !1, this.label = "", this.tag = "";
|
|
1897
1878
|
}
|
|
1898
|
-
get [
|
|
1879
|
+
get [X]() {
|
|
1899
1880
|
return [
|
|
1900
1881
|
"sps-tabbed-nav__nav-item",
|
|
1901
1882
|
this.active && "sps-tabbed-nav__nav-item--active"
|
|
1902
1883
|
];
|
|
1903
1884
|
}
|
|
1904
1885
|
render() {
|
|
1905
|
-
return /* @__PURE__ */
|
|
1886
|
+
return /* @__PURE__ */ p("a", { href: this.href, target: this.target, className: "sps-tabbed-nav__nav-item-link", tabIndex: 0 }, this.icon && /* @__PURE__ */ p("i", { className: `sps-icon sps-icon-${this.icon}` }), this.label && /* @__PURE__ */ p("span", null, this.label), this.tag && /* @__PURE__ */ p("span", { className: "sps-tag sps-tag--default" }, this.tag));
|
|
1906
1887
|
}
|
|
1907
1888
|
};
|
|
1908
|
-
|
|
1909
|
-
|
|
1889
|
+
F.displayName = "sps-nav-tab";
|
|
1890
|
+
F.props = {
|
|
1910
1891
|
active: "boolean",
|
|
1911
1892
|
label: "string",
|
|
1912
1893
|
icon: "SpsIcon",
|
|
@@ -1914,57 +1895,57 @@ A.props = {
|
|
|
1914
1895
|
href: "string",
|
|
1915
1896
|
target: "string"
|
|
1916
1897
|
};
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
],
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
],
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
],
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
],
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
],
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
],
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
],
|
|
1938
|
-
var
|
|
1939
|
-
for (var
|
|
1940
|
-
(
|
|
1941
|
-
return
|
|
1898
|
+
z([
|
|
1899
|
+
m()
|
|
1900
|
+
], F.prototype, "active", 2);
|
|
1901
|
+
z([
|
|
1902
|
+
m()
|
|
1903
|
+
], F.prototype, "label", 2);
|
|
1904
|
+
z([
|
|
1905
|
+
m()
|
|
1906
|
+
], F.prototype, "icon", 2);
|
|
1907
|
+
z([
|
|
1908
|
+
m()
|
|
1909
|
+
], F.prototype, "tag", 2);
|
|
1910
|
+
z([
|
|
1911
|
+
m()
|
|
1912
|
+
], F.prototype, "href", 2);
|
|
1913
|
+
z([
|
|
1914
|
+
m()
|
|
1915
|
+
], F.prototype, "target", 2);
|
|
1916
|
+
F = z([
|
|
1917
|
+
K({ tag: "sps-nav-tab" })
|
|
1918
|
+
], F);
|
|
1919
|
+
var Jt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, Ze = (e, s, i, o) => {
|
|
1920
|
+
for (var r = o > 1 ? void 0 : o ? Mt(s, i) : s, c = e.length - 1, f; c >= 0; c--)
|
|
1921
|
+
(f = e[c]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
1922
|
+
return o && r && Jt(s, i, r), r;
|
|
1942
1923
|
};
|
|
1943
|
-
let
|
|
1924
|
+
let M = class extends HTMLElement {
|
|
1944
1925
|
constructor() {
|
|
1945
1926
|
super(...arguments), this.content = [];
|
|
1946
1927
|
}
|
|
1947
1928
|
render() {
|
|
1948
|
-
return /* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ p("nav", { className: "sps-tabbed-nav" }, this.content);
|
|
1949
1930
|
}
|
|
1950
1931
|
};
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
],
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
],
|
|
1959
|
-
const
|
|
1932
|
+
M.displayName = "sps-nav-tab-set";
|
|
1933
|
+
M.props = {};
|
|
1934
|
+
Ze([
|
|
1935
|
+
be()
|
|
1936
|
+
], M.prototype, "content", 2);
|
|
1937
|
+
M = Ze([
|
|
1938
|
+
K({ tag: "sps-nav-tab-set" })
|
|
1939
|
+
], M);
|
|
1940
|
+
const ds = {
|
|
1960
1941
|
basic: {
|
|
1961
1942
|
label: "Basic Navigation Tabs",
|
|
1962
|
-
description:
|
|
1943
|
+
description: u`
|
|
1963
1944
|
<p>Navigation tabs native web component</p>
|
|
1964
1945
|
`,
|
|
1965
1946
|
examples: {
|
|
1966
1947
|
basic: {
|
|
1967
|
-
react:
|
|
1948
|
+
react: u`
|
|
1968
1949
|
function DemoComponent() {
|
|
1969
1950
|
const tabs = [
|
|
1970
1951
|
{ label: "Tab A", icon: "chart-line" },
|
|
@@ -1994,13 +1975,13 @@ const vs = {
|
|
|
1994
1975
|
}
|
|
1995
1976
|
}
|
|
1996
1977
|
};
|
|
1997
|
-
var
|
|
1998
|
-
for (var
|
|
1999
|
-
(
|
|
2000
|
-
return
|
|
2001
|
-
},
|
|
2002
|
-
const
|
|
2003
|
-
let
|
|
1978
|
+
var es = Object.defineProperty, ts = Object.getOwnPropertyDescriptor, j = (e, s, i, o) => {
|
|
1979
|
+
for (var r = o > 1 ? void 0 : o ? ts(s, i) : s, c = e.length - 1, f; c >= 0; c--)
|
|
1980
|
+
(f = e[c]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
1981
|
+
return o && r && es(s, i, r), r;
|
|
1982
|
+
}, ss = /* @__PURE__ */ ((e) => (e.FIT = "fit", e.FILL = "fill", e))(ss || {});
|
|
1983
|
+
const q = "sps-photo";
|
|
1984
|
+
let I = class extends HTMLElement {
|
|
2004
1985
|
constructor() {
|
|
2005
1986
|
super(...arguments), this.mode = "fill";
|
|
2006
1987
|
}
|
|
@@ -2009,22 +1990,22 @@ let y = class extends HTMLElement {
|
|
|
2009
1990
|
}
|
|
2010
1991
|
set image(e) {
|
|
2011
1992
|
this.imageInternal = e, e && (this.waitForImgHeightInterval && window.clearInterval(this.waitForImgHeightInterval), this.waitForImgHeightInterval = window.setInterval(() => {
|
|
2012
|
-
const
|
|
2013
|
-
if (
|
|
1993
|
+
const s = e.getBoundingClientRect();
|
|
1994
|
+
if (s.height) {
|
|
2014
1995
|
window.clearInterval(this.waitForImgHeightInterval), delete this.waitForImgHeightInterval;
|
|
2015
|
-
let
|
|
2016
|
-
this.fitWidth =
|
|
1996
|
+
let i = s.width / s.height > 1;
|
|
1997
|
+
this.fitWidth = i === (this.mode === "fit");
|
|
2017
1998
|
}
|
|
2018
1999
|
}, 1e3 / 60));
|
|
2019
2000
|
}
|
|
2020
|
-
get [
|
|
2001
|
+
get [X]() {
|
|
2021
2002
|
return [
|
|
2022
|
-
|
|
2023
|
-
this.fitWidth ? `${
|
|
2024
|
-
this.placeholderIcon && `${
|
|
2003
|
+
q,
|
|
2004
|
+
this.fitWidth ? `${q}--fit-width` : `${q}--fit-height`,
|
|
2005
|
+
this.placeholderIcon && `${q}--placeholder`
|
|
2025
2006
|
];
|
|
2026
2007
|
}
|
|
2027
|
-
get [
|
|
2008
|
+
get [ve]() {
|
|
2028
2009
|
return {
|
|
2029
2010
|
fontSize: `${this.width * 0.05}rem`,
|
|
2030
2011
|
width: `${this.width}rem`,
|
|
@@ -2041,50 +2022,50 @@ let y = class extends HTMLElement {
|
|
|
2041
2022
|
this.waitForWidthInterval && window.clearInterval(this.waitForWidthInterval), this.waitForImgHeightInterval && window.clearInterval(this.waitForImgHeightInterval);
|
|
2042
2023
|
}
|
|
2043
2024
|
render() {
|
|
2044
|
-
return this.src ? this.width ? /* @__PURE__ */
|
|
2025
|
+
return this.src ? this.width ? /* @__PURE__ */ p("img", { src: this.src, alt: this.altText }) : /* @__PURE__ */ p("span", null) : /* @__PURE__ */ p("i", { className: `sps-icon sps-icon-${this.placeholderIcon}` });
|
|
2045
2026
|
}
|
|
2046
2027
|
setWidth(e) {
|
|
2047
2028
|
if (e && !this.width) {
|
|
2048
|
-
const
|
|
2049
|
-
this.width = e /
|
|
2029
|
+
const s = document.body.parentElement.style.fontSize || "16px", i = Number(s.substr(0, s.length - 2));
|
|
2030
|
+
this.width = e / i;
|
|
2050
2031
|
}
|
|
2051
2032
|
}
|
|
2052
2033
|
};
|
|
2053
|
-
|
|
2054
|
-
|
|
2034
|
+
I.displayName = q;
|
|
2035
|
+
I.props = {
|
|
2055
2036
|
src: "string",
|
|
2056
2037
|
altText: "string",
|
|
2057
2038
|
mode: "SpsPhotoDisplayMode",
|
|
2058
2039
|
placeholderIcon: "SpsIcon"
|
|
2059
2040
|
};
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
],
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
],
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
],
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
],
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
],
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
],
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
],
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
],
|
|
2084
|
-
const
|
|
2041
|
+
j([
|
|
2042
|
+
m()
|
|
2043
|
+
], I.prototype, "src", 2);
|
|
2044
|
+
j([
|
|
2045
|
+
m()
|
|
2046
|
+
], I.prototype, "altText", 2);
|
|
2047
|
+
j([
|
|
2048
|
+
m()
|
|
2049
|
+
], I.prototype, "mode", 2);
|
|
2050
|
+
j([
|
|
2051
|
+
m()
|
|
2052
|
+
], I.prototype, "placeholderIcon", 2);
|
|
2053
|
+
j([
|
|
2054
|
+
Ke()
|
|
2055
|
+
], I.prototype, "width", 2);
|
|
2056
|
+
j([
|
|
2057
|
+
Ke()
|
|
2058
|
+
], I.prototype, "fitWidth", 2);
|
|
2059
|
+
j([
|
|
2060
|
+
we("img", { refresh: !0 })
|
|
2061
|
+
], I.prototype, "image", 1);
|
|
2062
|
+
I = j([
|
|
2063
|
+
K({ tag: q })
|
|
2064
|
+
], I);
|
|
2065
|
+
const us = {
|
|
2085
2066
|
sizing: {
|
|
2086
2067
|
label: "Sizing",
|
|
2087
|
-
description:
|
|
2068
|
+
description: u`
|
|
2088
2069
|
<p>
|
|
2089
2070
|
Photos are block elements, so a photo fills its container's width unless
|
|
2090
2071
|
an explicit width is set. It is always a 4:3 aspect ratio. In this example,
|
|
@@ -2094,7 +2075,7 @@ const bs = {
|
|
|
2094
2075
|
`,
|
|
2095
2076
|
examples: {
|
|
2096
2077
|
basic: {
|
|
2097
|
-
jsx:
|
|
2078
|
+
jsx: u`
|
|
2098
2079
|
<div className="sfg-row">
|
|
2099
2080
|
<div className="sfg-col-2">
|
|
2100
2081
|
<sps-card>
|
|
@@ -2118,7 +2099,7 @@ const bs = {
|
|
|
2118
2099
|
},
|
|
2119
2100
|
displayMode: {
|
|
2120
2101
|
label: "Fill vs. Fit",
|
|
2121
|
-
description:
|
|
2102
|
+
description: u`
|
|
2122
2103
|
<p>
|
|
2123
2104
|
There are two display modes available:
|
|
2124
2105
|
<ul>
|
|
@@ -2130,7 +2111,7 @@ const bs = {
|
|
|
2130
2111
|
examples: {
|
|
2131
2112
|
landscape: {
|
|
2132
2113
|
description: "<p>Landscape oriented photo (container outline added for illustrative purposes)</p>",
|
|
2133
|
-
jsx:
|
|
2114
|
+
jsx: u`
|
|
2134
2115
|
<div className="sfg-row">
|
|
2135
2116
|
<div className="sfg-col-4">
|
|
2136
2117
|
<sps-photo src="assets/images/photo-landscape.jpg" mode="fill"></sps-photo>
|
|
@@ -2143,7 +2124,7 @@ const bs = {
|
|
|
2143
2124
|
},
|
|
2144
2125
|
portrait: {
|
|
2145
2126
|
description: "<p>Portrait oriented photo (container outline added for illustrative purposes)</p>",
|
|
2146
|
-
jsx:
|
|
2127
|
+
jsx: u`
|
|
2147
2128
|
<div className="sfg-row">
|
|
2148
2129
|
<div className="sfg-col-4">
|
|
2149
2130
|
<sps-photo src="assets/images/photo-portrait.jpg" mode="fill"></sps-photo>
|
|
@@ -2158,7 +2139,7 @@ const bs = {
|
|
|
2158
2139
|
},
|
|
2159
2140
|
placeholder: {
|
|
2160
2141
|
label: "Placeholders",
|
|
2161
|
-
description:
|
|
2142
|
+
description: u`
|
|
2162
2143
|
<p>
|
|
2163
2144
|
When an image is not provided for a particular use case (such as a user avatar,
|
|
2164
2145
|
a company photo, item image, etc.), a placeholder should be shown in its place.
|
|
@@ -2170,7 +2151,7 @@ const bs = {
|
|
|
2170
2151
|
examples: {
|
|
2171
2152
|
general: {
|
|
2172
2153
|
description: "<p>General Photo</p>",
|
|
2173
|
-
jsx:
|
|
2154
|
+
jsx: u`
|
|
2174
2155
|
<div className="sfg-row">
|
|
2175
2156
|
<div className="sfg-col-3">
|
|
2176
2157
|
<sps-photo placeholderIcon="photo"></sps-photo>
|
|
@@ -2180,7 +2161,7 @@ const bs = {
|
|
|
2180
2161
|
},
|
|
2181
2162
|
photoAlt: {
|
|
2182
2163
|
description: "<p>Photo Alt</p>",
|
|
2183
|
-
jsx:
|
|
2164
|
+
jsx: u`
|
|
2184
2165
|
<div className="sfg-row">
|
|
2185
2166
|
<div className="sfg-col-3">
|
|
2186
2167
|
<sps-photo placeholderIcon="camera"></sps-photo>
|
|
@@ -2190,7 +2171,7 @@ const bs = {
|
|
|
2190
2171
|
},
|
|
2191
2172
|
user: {
|
|
2192
2173
|
description: "<p>User / Single Person</p>",
|
|
2193
|
-
jsx:
|
|
2174
|
+
jsx: u`
|
|
2194
2175
|
<div className="sfg-row">
|
|
2195
2176
|
<div className="sfg-col-3">
|
|
2196
2177
|
<sps-photo placeholderIcon="user"></sps-photo>
|
|
@@ -2200,7 +2181,7 @@ const bs = {
|
|
|
2200
2181
|
},
|
|
2201
2182
|
group: {
|
|
2202
2183
|
description: "<p>Group / Multiple People</p>",
|
|
2203
|
-
jsx:
|
|
2184
|
+
jsx: u`
|
|
2204
2185
|
<div className="sfg-row">
|
|
2205
2186
|
<div className="sfg-col-3">
|
|
2206
2187
|
<sps-photo placeholderIcon="group"></sps-photo>
|
|
@@ -2210,7 +2191,7 @@ const bs = {
|
|
|
2210
2191
|
},
|
|
2211
2192
|
company: {
|
|
2212
2193
|
description: "<p>Company / Building</p>",
|
|
2213
|
-
jsx:
|
|
2194
|
+
jsx: u`
|
|
2214
2195
|
<div className="sfg-row">
|
|
2215
2196
|
<div className="sfg-col-3">
|
|
2216
2197
|
<sps-photo placeholderIcon="building"></sps-photo>
|
|
@@ -2222,32 +2203,32 @@ const bs = {
|
|
|
2222
2203
|
}
|
|
2223
2204
|
};
|
|
2224
2205
|
export {
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2206
|
+
We as AttrBindings,
|
|
2207
|
+
X as ClassBindings,
|
|
2208
|
+
K as Component,
|
|
2209
|
+
be as Content,
|
|
2210
|
+
Ce as EventDispatcher,
|
|
2211
|
+
le as EventListener,
|
|
2212
|
+
rs as MANIFEST,
|
|
2213
|
+
Qe as MIMEType,
|
|
2214
|
+
m as Prop,
|
|
2215
|
+
we as QuerySelector,
|
|
2216
|
+
Wt as QuerySelectorAll,
|
|
2217
|
+
b as SpsFileUploadComponent,
|
|
2218
|
+
cs as SpsFileUploadExamples,
|
|
2219
|
+
E as SpsInsightCardComponent,
|
|
2220
|
+
ps as SpsInsightCardExamples,
|
|
2221
|
+
G as SpsInsightsComponent,
|
|
2222
|
+
F as SpsNavTabComponent,
|
|
2223
|
+
M as SpsNavTabSetComponent,
|
|
2224
|
+
ds as SpsNavTabsExamples,
|
|
2225
|
+
I as SpsPhotoComponent,
|
|
2226
|
+
ss as SpsPhotoDisplayMode,
|
|
2227
|
+
us as SpsPhotoExamples,
|
|
2228
|
+
ve as StyleBindings,
|
|
2229
|
+
Ke as Watch,
|
|
2230
|
+
p as h,
|
|
2231
|
+
ls as namespaceOverrideRegistrar,
|
|
2232
|
+
os as register,
|
|
2233
|
+
as as webComponentsUseI18n
|
|
2253
2234
|
};
|