-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-es5.js
613 lines (491 loc) · 17.9 KB
/
common-es5.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
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
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
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
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
611
612
613
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["common"], {
/***/
"./node_modules/@ionic/core/dist/esm/framework-delegate-d1eb6504.js":
/*!**************************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/framework-delegate-d1eb6504.js ***!
\**************************************************************************/
/*! exports provided: a, d */
/***/
function node_modulesIonicCoreDistEsmFrameworkDelegateD1eb6504Js(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "a", function () {
return attachComponent;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "d", function () {
return detachComponent;
});
var attachComponent = /*#__PURE__*/function () {
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(delegate, container, component, cssClasses, componentProps) {
var el;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!delegate) {
_context.next = 2;
break;
}
return _context.abrupt("return", delegate.attachViewToDom(container, component, componentProps, cssClasses));
case 2:
if (!(typeof component !== 'string' && !(component instanceof HTMLElement))) {
_context.next = 4;
break;
}
throw new Error('framework delegate is missing');
case 4:
el = typeof component === 'string' ? container.ownerDocument && container.ownerDocument.createElement(component) : component;
if (cssClasses) {
cssClasses.forEach(function (c) {
return el.classList.add(c);
});
}
if (componentProps) {
Object.assign(el, componentProps);
}
container.appendChild(el);
if (!el.componentOnReady) {
_context.next = 11;
break;
}
_context.next = 11;
return el.componentOnReady();
case 11:
return _context.abrupt("return", el);
case 12:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function attachComponent(_x, _x2, _x3, _x4, _x5) {
return _ref.apply(this, arguments);
};
}();
var detachComponent = function detachComponent(delegate, element) {
if (element) {
if (delegate) {
var container = element.parentElement;
return delegate.removeViewFromDom(container, element);
}
element.remove();
}
return Promise.resolve();
};
/***/
},
/***/
"./node_modules/@ionic/core/dist/esm/haptic-ccbda579.js":
/*!**************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/haptic-ccbda579.js ***!
\**************************************************************/
/*! exports provided: a, b, c, h */
/***/
function node_modulesIonicCoreDistEsmHapticCcbda579Js(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "a", function () {
return hapticSelectionStart;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "b", function () {
return hapticSelectionChanged;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "c", function () {
return hapticSelectionEnd;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "h", function () {
return hapticSelection;
});
/**
* Check to see if the Haptic Plugin is available
* @return Returns `true` or false if the plugin is available
*/
/**
* Trigger a selection changed haptic event. Good for one-time events
* (not for gestures)
*/
var hapticSelection = function hapticSelection() {
var engine = window.TapticEngine;
if (engine) {
engine.selection();
}
};
/**
* Tell the haptic engine that a gesture for a selection change is starting.
*/
var hapticSelectionStart = function hapticSelectionStart() {
var engine = window.TapticEngine;
if (engine) {
engine.gestureSelectionStart();
}
};
/**
* Tell the haptic engine that a selection changed during a gesture.
*/
var hapticSelectionChanged = function hapticSelectionChanged() {
var engine = window.TapticEngine;
if (engine) {
engine.gestureSelectionChanged();
}
};
/**
* Tell the haptic engine we are done with a gesture. This needs to be
* called lest resources are not properly recycled.
*/
var hapticSelectionEnd = function hapticSelectionEnd() {
var engine = window.TapticEngine;
if (engine) {
engine.gestureSelectionEnd();
}
};
/***/
},
/***/
"./node_modules/@ionic/core/dist/esm/index-729ec402.js":
/*!*************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/index-729ec402.js ***!
\*************************************************************/
/*! exports provided: s */
/***/
function node_modulesIonicCoreDistEsmIndex729ec402Js(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "s", function () {
return sanitizeDOMString;
});
/**
* Does a simple sanitization of all elements
* in an untrusted string
*/
var sanitizeDOMString = function sanitizeDOMString(untrustedString) {
try {
if (typeof untrustedString !== 'string' || untrustedString === '') {
return untrustedString;
}
/**
* Create a document fragment
* separate from the main DOM,
* create a div to do our work in
*/
var documentFragment = document.createDocumentFragment();
var workingDiv = document.createElement('div');
documentFragment.appendChild(workingDiv);
workingDiv.innerHTML = untrustedString;
/**
* Remove any elements
* that are blocked
*/
blockedTags.forEach(function (blockedTag) {
var getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
for (var elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
var element = getElementsToRemove[elementIndex];
if (element.parentNode) {
element.parentNode.removeChild(element);
} else {
documentFragment.removeChild(element);
}
/**
* We still need to sanitize
* the children of this element
* as they are left behind
*/
var childElements = getElementChildren(element);
/* tslint:disable-next-line */
for (var childIndex = 0; childIndex < childElements.length; childIndex++) {
sanitizeElement(childElements[childIndex]);
}
}
});
/**
* Go through remaining elements and remove
* non-allowed attribs
*/
// IE does not support .children on document fragments, only .childNodes
var dfChildren = getElementChildren(documentFragment);
/* tslint:disable-next-line */
for (var childIndex = 0; childIndex < dfChildren.length; childIndex++) {
sanitizeElement(dfChildren[childIndex]);
} // Append document fragment to div
var fragmentDiv = document.createElement('div');
fragmentDiv.appendChild(documentFragment); // First child is always the div we did our work in
var getInnerDiv = fragmentDiv.querySelector('div');
return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
} catch (err) {
console.error(err);
return '';
}
};
/**
* Clean up current element based on allowed attributes
* and then recursively dig down into any child elements to
* clean those up as well
*/
var sanitizeElement = function sanitizeElement(element) {
// IE uses childNodes, so ignore nodes that are not elements
if (element.nodeType && element.nodeType !== 1) {
return;
}
for (var i = element.attributes.length - 1; i >= 0; i--) {
var attribute = element.attributes.item(i);
var attributeName = attribute.name; // remove non-allowed attribs
if (!allowedAttributes.includes(attributeName.toLowerCase())) {
element.removeAttribute(attributeName);
continue;
} // clean up any allowed attribs
// that attempt to do any JS funny-business
var attributeValue = attribute.value;
/* tslint:disable-next-line */
if (attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) {
element.removeAttribute(attributeName);
}
}
/**
* Sanitize any nested children
*/
var childElements = getElementChildren(element);
/* tslint:disable-next-line */
for (var _i = 0; _i < childElements.length; _i++) {
sanitizeElement(childElements[_i]);
}
};
/**
* IE doesn't always support .children
* so we revert to .childNodes instead
*/
var getElementChildren = function getElementChildren(el) {
return el.children != null ? el.children : el.childNodes;
};
var allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
var blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];
/***/
},
/***/
"./node_modules/@ionic/core/dist/esm/spinner-configs-c78e170e.js":
/*!***********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/spinner-configs-c78e170e.js ***!
\***********************************************************************/
/*! exports provided: S */
/***/
function node_modulesIonicCoreDistEsmSpinnerConfigsC78e170eJs(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "S", function () {
return SPINNERS;
});
var spinners = {
'bubbles': {
dur: 1000,
circles: 9,
fn: function fn(dur, index, total) {
var animationDelay = "".concat(dur * index / total - dur, "ms");
var angle = 2 * Math.PI * index / total;
return {
r: 5,
style: {
'top': "".concat(9 * Math.sin(angle), "px"),
'left': "".concat(9 * Math.cos(angle), "px"),
'animation-delay': animationDelay
}
};
}
},
'circles': {
dur: 1000,
circles: 8,
fn: function fn(dur, index, total) {
var step = index / total;
var animationDelay = "".concat(dur * step - dur, "ms");
var angle = 2 * Math.PI * step;
return {
r: 5,
style: {
'top': "".concat(9 * Math.sin(angle), "px"),
'left': "".concat(9 * Math.cos(angle), "px"),
'animation-delay': animationDelay
}
};
}
},
'circular': {
dur: 1400,
elmDuration: true,
circles: 1,
fn: function fn() {
return {
r: 20,
cx: 48,
cy: 48,
fill: 'none',
viewBox: '24 24 48 48',
transform: 'translate(0,0)',
style: {}
};
}
},
'crescent': {
dur: 750,
circles: 1,
fn: function fn() {
return {
r: 26,
style: {}
};
}
},
'dots': {
dur: 750,
circles: 3,
fn: function fn(_, index) {
var animationDelay = -(110 * index) + 'ms';
return {
r: 6,
style: {
'left': "".concat(9 - 9 * index, "px"),
'animation-delay': animationDelay
}
};
}
},
'lines': {
dur: 1000,
lines: 12,
fn: function fn(dur, index, total) {
var transform = "rotate(".concat(30 * index + (index < 6 ? 180 : -180), "deg)");
var animationDelay = "".concat(dur * index / total - dur, "ms");
return {
y1: 17,
y2: 29,
style: {
'transform': transform,
'animation-delay': animationDelay
}
};
}
},
'lines-small': {
dur: 1000,
lines: 12,
fn: function fn(dur, index, total) {
var transform = "rotate(".concat(30 * index + (index < 6 ? 180 : -180), "deg)");
var animationDelay = "".concat(dur * index / total - dur, "ms");
return {
y1: 12,
y2: 20,
style: {
'transform': transform,
'animation-delay': animationDelay
}
};
}
}
};
var SPINNERS = spinners;
/***/
},
/***/
"./node_modules/@ionic/core/dist/esm/theme-c2dc54d9.js":
/*!*************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/theme-c2dc54d9.js ***!
\*************************************************************/
/*! exports provided: c, g, h, o */
/***/
function node_modulesIonicCoreDistEsmThemeC2dc54d9Js(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "c", function () {
return createColorClasses;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "g", function () {
return getClassMap;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "h", function () {
return hostContext;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "o", function () {
return openURL;
});
var hostContext = function hostContext(selector, el) {
return el.closest(selector) !== null;
};
/**
* Create the mode and color classes for the component based on the classes passed in
*/
var createColorClasses = function createColorClasses(color) {
return typeof color === 'string' && color.length > 0 ? _defineProperty({
'ion-color': true
}, "ion-color-".concat(color), true) : undefined;
};
var getClassList = function getClassList(classes) {
if (classes !== undefined) {
var array = Array.isArray(classes) ? classes : classes.split(' ');
return array.filter(function (c) {
return c != null;
}).map(function (c) {
return c.trim();
}).filter(function (c) {
return c !== '';
});
}
return [];
};
var getClassMap = function getClassMap(classes) {
var map = {};
getClassList(classes).forEach(function (c) {
return map[c] = true;
});
return map;
};
var SCHEME = /^[a-z][a-z0-9+\-.]*:/;
var openURL = /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(url, ev, direction) {
var router;
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
if (!(url != null && url[0] !== '#' && !SCHEME.test(url))) {
_context2.next = 5;
break;
}
router = document.querySelector('ion-router');
if (!router) {
_context2.next = 5;
break;
}
if (ev != null) {
ev.preventDefault();
}
return _context2.abrupt("return", router.push(url, direction));
case 5:
return _context2.abrupt("return", false);
case 6:
case "end":
return _context2.stop();
}
}
}, _callee2);
}));
return function openURL(_x6, _x7, _x8) {
return _ref3.apply(this, arguments);
};
}();
/***/
}
}]);
//# sourceMappingURL=common-es5.js.map