lookbook 1.0.8 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/lookbook/css/lookbook.css +76 -2
- data/app/assets/lookbook/js/app.js +20 -2
- data/app/{components/lookbook/params_editor/field/component.js → assets/lookbook/js/components/params_input.js} +1 -14
- data/app/assets/lookbook/js/lookbook.js +2 -1
- data/app/components/lookbook/base_component.rb +2 -3
- data/app/components/lookbook/button/component.html.erb +2 -2
- data/app/components/lookbook/button/component.rb +6 -1
- data/app/components/lookbook/button_group/component.rb +3 -4
- data/app/components/lookbook/copy_button/component.html.erb +1 -1
- data/app/components/lookbook/debug_menu/component.html.erb +51 -0
- data/app/components/lookbook/debug_menu/component.rb +18 -0
- data/app/components/lookbook/embed/component.html.erb +3 -3
- data/app/components/lookbook/header/component.html.erb +19 -44
- data/app/components/lookbook/inspector_panel/component.html.erb +5 -3
- data/app/components/lookbook/inspector_panel/component.rb +6 -18
- data/app/components/lookbook/nav/component.js +4 -0
- data/app/components/lookbook/nav/component.rb +1 -1
- data/app/components/lookbook/nav/item/component.html.erb +4 -4
- data/app/components/lookbook/nav/item/component.rb +1 -1
- data/app/components/lookbook/page_tabs/component.html.erb +4 -4
- data/app/components/lookbook/page_tabs/component.rb +1 -1
- data/app/components/lookbook/params/editor/component.html.erb +21 -0
- data/app/components/lookbook/{params_editor → params/editor}/component.js +1 -1
- data/app/components/lookbook/params/editor/component.rb +40 -0
- data/app/components/lookbook/params/field/component.css +76 -0
- data/app/components/lookbook/params/field/component.html.erb +27 -0
- data/app/components/lookbook/params/field/component.js +7 -0
- data/app/components/lookbook/params/field/component.rb +101 -0
- data/app/components/lookbook/tabs/component.html.erb +2 -2
- data/app/components/lookbook/tag_component.rb +1 -0
- data/app/components/lookbook/viewport/component.css +1 -1
- data/app/components/lookbook/viewport/component.html.erb +11 -0
- data/app/controllers/lookbook/previews_controller.rb +1 -1
- data/app/helpers/lookbook/component_helper.rb +45 -26
- data/app/helpers/lookbook/page_helper.rb +1 -1
- data/app/helpers/lookbook/preview_helper.rb +1 -1
- data/app/views/layouts/lookbook/application.html.erb +18 -4
- data/app/views/layouts/lookbook/page.html.erb +4 -4
- data/app/views/layouts/lookbook/shell.html.erb +4 -4
- data/app/views/layouts/lookbook/skeleton.html.erb +0 -6
- data/app/views/lookbook/error.html.erb +1 -1
- data/app/views/lookbook/pages/show.html.erb +2 -2
- data/app/views/lookbook/preview.html.erb +1 -1
- data/app/views/lookbook/previews/inputs/_color.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_range.html.erb +15 -0
- data/app/views/lookbook/previews/inputs/_select.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_text.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_textarea.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_toggle.html.erb +20 -0
- data/app/views/lookbook/previews/panels/_content.html.erb +2 -2
- data/app/views/lookbook/previews/panels/_notes.html.erb +2 -2
- data/app/views/lookbook/previews/panels/_output.html.erb +1 -1
- data/app/views/lookbook/previews/panels/_params.html.erb +3 -3
- data/app/views/lookbook/previews/panels/_preview.html.erb +1 -1
- data/app/views/lookbook/previews/panels/_source.html.erb +2 -2
- data/app/views/lookbook/previews/show.html.erb +13 -19
- data/lib/lookbook/config.rb +111 -100
- data/lib/lookbook/engine.rb +3 -60
- data/lib/lookbook/markdown.rb +1 -1
- data/lib/lookbook/panels.rb +14 -4
- data/lib/lookbook/params.rb +66 -35
- data/lib/lookbook/parser.rb +1 -0
- data/lib/lookbook/preview.rb +10 -4
- data/lib/lookbook/preview_controller.rb +7 -19
- data/lib/lookbook/preview_example.rb +1 -1
- data/lib/lookbook/source_inspector.rb +10 -4
- data/lib/lookbook/store.rb +14 -28
- data/lib/lookbook/tag.rb +13 -3
- data/lib/lookbook/tag_options.rb +111 -0
- data/lib/lookbook/tags.rb +6 -2
- data/lib/lookbook/template_parser.rb +72 -0
- data/lib/lookbook/theme.rb +1 -1
- data/lib/lookbook/utils.rb +23 -0
- data/lib/lookbook/version.rb +1 -1
- data/lib/lookbook.rb +75 -28
- data/public/lookbook-assets/css/lookbook.css +369 -126
- data/public/lookbook-assets/css/lookbook.css.map +1 -1
- data/public/lookbook-assets/js/embed.js +13 -13
- data/public/lookbook-assets/js/embed.js.map +1 -1
- data/public/lookbook-assets/js/lookbook.js +701 -612
- data/public/lookbook-assets/js/lookbook.js.map +1 -1
- metadata +56 -11
- data/app/components/lookbook/params_editor/component.html.erb +0 -3
- data/app/components/lookbook/params_editor/component.rb +0 -11
- data/app/components/lookbook/params_editor/field/component.html.erb +0 -49
- data/app/components/lookbook/params_editor/field/component.rb +0 -44
- data/lib/lookbook/data.rb +0 -11
@@ -177,16 +177,16 @@ function $caa9439642c6336c$var$onMutate(mutations) {
|
|
177
177
|
let removedNodes = [];
|
178
178
|
let addedAttributes = new Map();
|
179
179
|
let removedAttributes = new Map();
|
180
|
-
for(let
|
181
|
-
if (mutations[
|
182
|
-
if (mutations[
|
183
|
-
mutations[
|
184
|
-
mutations[
|
185
|
-
}
|
186
|
-
if (mutations[
|
187
|
-
let el = mutations[
|
188
|
-
let name = mutations[
|
189
|
-
let oldValue = mutations[
|
180
|
+
for(let i = 0; i < mutations.length; i++){
|
181
|
+
if (mutations[i].target._x_ignoreMutationObserver) continue;
|
182
|
+
if (mutations[i].type === "childList") {
|
183
|
+
mutations[i].addedNodes.forEach((node)=>node.nodeType === 1 && addedNodes.push(node));
|
184
|
+
mutations[i].removedNodes.forEach((node)=>node.nodeType === 1 && removedNodes.push(node));
|
185
|
+
}
|
186
|
+
if (mutations[i].type === "attributes") {
|
187
|
+
let el = mutations[i].target;
|
188
|
+
let name = mutations[i].attributeName;
|
189
|
+
let oldValue = mutations[i].oldValue;
|
190
190
|
let add2 = ()=>{
|
191
191
|
if (!addedAttributes.has(el)) addedAttributes.set(el, []);
|
192
192
|
addedAttributes.get(el).push({
|
@@ -211,10 +211,10 @@ function $caa9439642c6336c$var$onMutate(mutations) {
|
|
211
211
|
addedAttributes.forEach((attrs, el)=>{
|
212
212
|
$caa9439642c6336c$var$onAttributeAddeds.forEach((i)=>i(el, attrs));
|
213
213
|
});
|
214
|
-
for (let
|
215
|
-
if (addedNodes.includes(
|
216
|
-
$caa9439642c6336c$var$onElRemoveds.forEach((i)=>i(
|
217
|
-
if (
|
214
|
+
for (let node of removedNodes){
|
215
|
+
if (addedNodes.includes(node)) continue;
|
216
|
+
$caa9439642c6336c$var$onElRemoveds.forEach((i)=>i(node));
|
217
|
+
if (node._x_cleanups) while(node._x_cleanups.length)node._x_cleanups.pop()();
|
218
218
|
}
|
219
219
|
addedNodes.forEach((node)=>{
|
220
220
|
node._x_ignoreSelf = true;
|
@@ -495,8 +495,24 @@ function $caa9439642c6336c$var$directive(name, callback) {
|
|
495
495
|
$caa9439642c6336c$var$directiveHandlers[name] = callback;
|
496
496
|
}
|
497
497
|
function $caa9439642c6336c$var$directives(el, attributes, originalAttributeOverride) {
|
498
|
+
attributes = Array.from(attributes);
|
499
|
+
if (el._x_virtualDirectives) {
|
500
|
+
let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value])=>({
|
501
|
+
name: name,
|
502
|
+
value: value
|
503
|
+
}));
|
504
|
+
let staticAttributes = $caa9439642c6336c$var$attributesOnly(vAttributes);
|
505
|
+
vAttributes = vAttributes.map((attribute)=>{
|
506
|
+
if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {
|
507
|
+
name: `x-bind:${attribute.name}`,
|
508
|
+
value: `"${attribute.value}"`
|
509
|
+
};
|
510
|
+
return attribute;
|
511
|
+
});
|
512
|
+
attributes = attributes.concat(vAttributes);
|
513
|
+
}
|
498
514
|
let transformedAttributeMap = {};
|
499
|
-
let directives2 =
|
515
|
+
let directives2 = attributes.map($caa9439642c6336c$var$toTransformedAttributes((newName, oldName)=>transformedAttributeMap[newName] = oldName)).filter($caa9439642c6336c$var$outNonAlpineAttributes).map($caa9439642c6336c$var$toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort($caa9439642c6336c$var$byPriority);
|
500
516
|
return directives2.map((directive2)=>{
|
501
517
|
return $caa9439642c6336c$var$getDirectiveHandler(el, directive2);
|
502
518
|
});
|
@@ -607,6 +623,10 @@ var $caa9439642c6336c$var$directiveOrder = [
|
|
607
623
|
"ref",
|
608
624
|
"data",
|
609
625
|
"id",
|
626
|
+
"tabs",
|
627
|
+
"radio",
|
628
|
+
"switch",
|
629
|
+
"disclosure",
|
610
630
|
"bind",
|
611
631
|
"init",
|
612
632
|
"for",
|
@@ -617,8 +637,7 @@ var $caa9439642c6336c$var$directiveOrder = [
|
|
617
637
|
"show",
|
618
638
|
"if",
|
619
639
|
$caa9439642c6336c$var$DEFAULT,
|
620
|
-
"teleport"
|
621
|
-
"element"
|
640
|
+
"teleport"
|
622
641
|
];
|
623
642
|
function $caa9439642c6336c$var$byPriority(a, b) {
|
624
643
|
let typeA = $caa9439642c6336c$var$directiveOrder.indexOf(a.type) === -1 ? $caa9439642c6336c$var$DEFAULT : a.type;
|
@@ -931,9 +950,8 @@ function $caa9439642c6336c$var$registerTransitionObject(el, setFunction, default
|
|
931
950
|
};
|
932
951
|
}
|
933
952
|
window.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {
|
934
|
-
|
935
|
-
|
936
|
-
};
|
953
|
+
const nextTick2 = document.visibilityState === "visible" ? requestAnimationFrame : setTimeout;
|
954
|
+
let clickAwayCompatibleShow = ()=>nextTick2(show);
|
937
955
|
if (value) {
|
938
956
|
if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();
|
939
957
|
else el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();
|
@@ -950,7 +968,7 @@ window.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value
|
|
950
968
|
if (closest) {
|
951
969
|
if (!closest._x_hideChildren) closest._x_hideChildren = [];
|
952
970
|
closest._x_hideChildren.push(el);
|
953
|
-
} else
|
971
|
+
} else nextTick2(()=>{
|
954
972
|
let hideAfterChildren = (el2)=>{
|
955
973
|
let carry = Promise.all([
|
956
974
|
el2._x_hidePromise,
|
@@ -1224,11 +1242,11 @@ function $caa9439642c6336c$var$getBinding(el, name, fallback) {
|
|
1224
1242
|
if (el._x_bindings && el._x_bindings[name] !== void 0) return el._x_bindings[name];
|
1225
1243
|
let attr = el.getAttribute(name);
|
1226
1244
|
if (attr === null) return typeof fallback === "function" ? fallback() : fallback;
|
1245
|
+
if (attr === "") return true;
|
1227
1246
|
if ($caa9439642c6336c$var$isBooleanAttr(name)) return !![
|
1228
1247
|
name,
|
1229
1248
|
"true"
|
1230
1249
|
].includes(attr);
|
1231
|
-
if (attr === "") return true;
|
1232
1250
|
return attr;
|
1233
1251
|
}
|
1234
1252
|
// packages/alpinejs/src/utils/debounce.js
|
@@ -1278,8 +1296,10 @@ function $caa9439642c6336c$var$getStores() {
|
|
1278
1296
|
}
|
1279
1297
|
// packages/alpinejs/src/binds.js
|
1280
1298
|
var $caa9439642c6336c$var$binds = {};
|
1281
|
-
function $caa9439642c6336c$var$bind2(name,
|
1282
|
-
|
1299
|
+
function $caa9439642c6336c$var$bind2(name, bindings) {
|
1300
|
+
let getBindings = typeof bindings !== "function" ? ()=>bindings : bindings;
|
1301
|
+
if (name instanceof Element) $caa9439642c6336c$var$applyBindingsObject(name, getBindings());
|
1302
|
+
else $caa9439642c6336c$var$binds[name] = getBindings;
|
1283
1303
|
}
|
1284
1304
|
function $caa9439642c6336c$var$injectBindingProviders(obj) {
|
1285
1305
|
Object.entries($caa9439642c6336c$var$binds).forEach(([name, callback])=>{
|
@@ -1293,6 +1313,26 @@ function $caa9439642c6336c$var$injectBindingProviders(obj) {
|
|
1293
1313
|
});
|
1294
1314
|
return obj;
|
1295
1315
|
}
|
1316
|
+
function $caa9439642c6336c$var$applyBindingsObject(el, obj, original) {
|
1317
|
+
let cleanupRunners = [];
|
1318
|
+
while(cleanupRunners.length)cleanupRunners.pop()();
|
1319
|
+
let attributes = Object.entries(obj).map(([name, value])=>({
|
1320
|
+
name: name,
|
1321
|
+
value: value
|
1322
|
+
}));
|
1323
|
+
let staticAttributes = $caa9439642c6336c$var$attributesOnly(attributes);
|
1324
|
+
attributes = attributes.map((attribute)=>{
|
1325
|
+
if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {
|
1326
|
+
name: `x-bind:${attribute.name}`,
|
1327
|
+
value: `"${attribute.value}"`
|
1328
|
+
};
|
1329
|
+
return attribute;
|
1330
|
+
});
|
1331
|
+
$caa9439642c6336c$var$directives(el, attributes, original).map((handle)=>{
|
1332
|
+
cleanupRunners.push(handle.runCleanups);
|
1333
|
+
handle();
|
1334
|
+
});
|
1335
|
+
}
|
1296
1336
|
// packages/alpinejs/src/datas.js
|
1297
1337
|
var $caa9439642c6336c$var$datas = {};
|
1298
1338
|
function $caa9439642c6336c$var$data(name, callback) {
|
@@ -1325,7 +1365,7 @@ var $caa9439642c6336c$var$Alpine = {
|
|
1325
1365
|
get raw () {
|
1326
1366
|
return $caa9439642c6336c$var$raw;
|
1327
1367
|
},
|
1328
|
-
version: "3.10.
|
1368
|
+
version: "3.10.4",
|
1329
1369
|
flushAndStopDeferringMutations: $caa9439642c6336c$var$flushAndStopDeferringMutations,
|
1330
1370
|
dontAutoEvaluateFunctions: $caa9439642c6336c$var$dontAutoEvaluateFunctions,
|
1331
1371
|
disableEffectScheduling: $caa9439642c6336c$var$disableEffectScheduling,
|
@@ -1395,8 +1435,8 @@ var $caa9439642c6336c$var$slotFlagsText = {
|
|
1395
1435
|
};
|
1396
1436
|
var $caa9439642c6336c$var$specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
1397
1437
|
var $caa9439642c6336c$var$isBooleanAttr2 = /* @__PURE__ */ $caa9439642c6336c$var$makeMap($caa9439642c6336c$var$specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
|
1398
|
-
var $caa9439642c6336c$var$EMPTY_OBJ = {};
|
1399
|
-
var $caa9439642c6336c$var$EMPTY_ARR = [];
|
1438
|
+
var $caa9439642c6336c$var$EMPTY_OBJ = Object.freeze({});
|
1439
|
+
var $caa9439642c6336c$var$EMPTY_ARR = Object.freeze([]);
|
1400
1440
|
var $caa9439642c6336c$var$extend = Object.assign;
|
1401
1441
|
var $caa9439642c6336c$var$hasOwnProperty = Object.prototype.hasOwnProperty;
|
1402
1442
|
var $caa9439642c6336c$var$hasOwn = (val, key)=>$caa9439642c6336c$var$hasOwnProperty.call(val, key);
|
@@ -1431,8 +1471,8 @@ var $caa9439642c6336c$var$hasChanged = (value, oldValue)=>value !== oldValue &&
|
|
1431
1471
|
var $caa9439642c6336c$var$targetMap = new WeakMap();
|
1432
1472
|
var $caa9439642c6336c$var$effectStack = [];
|
1433
1473
|
var $caa9439642c6336c$var$activeEffect;
|
1434
|
-
var $caa9439642c6336c$var$ITERATE_KEY = Symbol("");
|
1435
|
-
var $caa9439642c6336c$var$MAP_KEY_ITERATE_KEY = Symbol("");
|
1474
|
+
var $caa9439642c6336c$var$ITERATE_KEY = Symbol("iterate");
|
1475
|
+
var $caa9439642c6336c$var$MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");
|
1436
1476
|
function $caa9439642c6336c$var$isEffect(fn) {
|
1437
1477
|
return fn && fn._isEffect === true;
|
1438
1478
|
}
|
@@ -1506,6 +1546,12 @@ function $caa9439642c6336c$var$track(target, type, key) {
|
|
1506
1546
|
if (!dep.has($caa9439642c6336c$var$activeEffect)) {
|
1507
1547
|
dep.add($caa9439642c6336c$var$activeEffect);
|
1508
1548
|
$caa9439642c6336c$var$activeEffect.deps.push(dep);
|
1549
|
+
if ($caa9439642c6336c$var$activeEffect.options.onTrack) $caa9439642c6336c$var$activeEffect.options.onTrack({
|
1550
|
+
effect: $caa9439642c6336c$var$activeEffect,
|
1551
|
+
target: target,
|
1552
|
+
type: type,
|
1553
|
+
key: key
|
1554
|
+
});
|
1509
1555
|
}
|
1510
1556
|
}
|
1511
1557
|
function $caa9439642c6336c$var$trigger(target, type, key, newValue, oldValue, oldTarget) {
|
@@ -1542,6 +1588,15 @@ function $caa9439642c6336c$var$trigger(target, type, key, newValue, oldValue, ol
|
|
1542
1588
|
}
|
1543
1589
|
}
|
1544
1590
|
const run = (effect3)=>{
|
1591
|
+
if (effect3.options.onTrigger) effect3.options.onTrigger({
|
1592
|
+
effect: effect3,
|
1593
|
+
target: target,
|
1594
|
+
key: key,
|
1595
|
+
type: type,
|
1596
|
+
newValue: newValue,
|
1597
|
+
oldValue: oldValue,
|
1598
|
+
oldTarget: oldTarget
|
1599
|
+
});
|
1545
1600
|
if (effect3.options.scheduler) effect3.options.scheduler(effect3);
|
1546
1601
|
else effect3();
|
1547
1602
|
};
|
@@ -1650,9 +1705,11 @@ var $caa9439642c6336c$var$mutableHandlers = {
|
|
1650
1705
|
var $caa9439642c6336c$var$readonlyHandlers = {
|
1651
1706
|
get: $caa9439642c6336c$var$readonlyGet,
|
1652
1707
|
set (target, key) {
|
1708
|
+
console.warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
1653
1709
|
return true;
|
1654
1710
|
},
|
1655
1711
|
deleteProperty (target, key) {
|
1712
|
+
console.warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
1656
1713
|
return true;
|
1657
1714
|
}
|
1658
1715
|
};
|
@@ -1711,7 +1768,7 @@ function $caa9439642c6336c$var$set$1(key, value) {
|
|
1711
1768
|
if (!hadKey) {
|
1712
1769
|
key = $caa9439642c6336c$var$toRaw(key);
|
1713
1770
|
hadKey = has2.call(target, key);
|
1714
|
-
}
|
1771
|
+
} else $caa9439642c6336c$var$checkIdentityKeys(target, has2, key);
|
1715
1772
|
const oldValue = get3.call(target, key);
|
1716
1773
|
target.set(key, value);
|
1717
1774
|
if (!hadKey) $caa9439642c6336c$var$trigger(target, "add", key, value);
|
@@ -1725,7 +1782,7 @@ function $caa9439642c6336c$var$deleteEntry(key) {
|
|
1725
1782
|
if (!hadKey) {
|
1726
1783
|
key = $caa9439642c6336c$var$toRaw(key);
|
1727
1784
|
hadKey = has2.call(target, key);
|
1728
|
-
}
|
1785
|
+
} else $caa9439642c6336c$var$checkIdentityKeys(target, has2, key);
|
1729
1786
|
const oldValue = get3 ? get3.call(target, key) : void 0;
|
1730
1787
|
const result = target.delete(key);
|
1731
1788
|
if (hadKey) $caa9439642c6336c$var$trigger(target, "delete", key, void 0, oldValue);
|
@@ -1734,7 +1791,7 @@ function $caa9439642c6336c$var$deleteEntry(key) {
|
|
1734
1791
|
function $caa9439642c6336c$var$clear() {
|
1735
1792
|
const target = $caa9439642c6336c$var$toRaw(this);
|
1736
1793
|
const hadItems = target.size !== 0;
|
1737
|
-
const oldTarget =
|
1794
|
+
const oldTarget = $caa9439642c6336c$var$isMap(target) ? new Map(target) : new Set(target);
|
1738
1795
|
const result = target.clear();
|
1739
1796
|
if (hadItems) $caa9439642c6336c$var$trigger(target, "clear", void 0, void 0, oldTarget);
|
1740
1797
|
return result;
|
@@ -1783,6 +1840,10 @@ function $caa9439642c6336c$var$createIterableMethod(method, isReadonly, isShallo
|
|
1783
1840
|
}
|
1784
1841
|
function $caa9439642c6336c$var$createReadonlyMethod(type) {
|
1785
1842
|
return function(...args) {
|
1843
|
+
{
|
1844
|
+
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
1845
|
+
console.warn(`${$caa9439642c6336c$var$capitalize(type)} operation ${key}failed: target is readonly.`, $caa9439642c6336c$var$toRaw(this));
|
1846
|
+
}
|
1786
1847
|
return type === "delete" ? false : this;
|
1787
1848
|
};
|
1788
1849
|
}
|
@@ -1879,6 +1940,13 @@ var $caa9439642c6336c$var$readonlyCollectionHandlers = {
|
|
1879
1940
|
var $caa9439642c6336c$var$shallowReadonlyCollectionHandlers = {
|
1880
1941
|
get: $caa9439642c6336c$var$createInstrumentationGetter(true, true)
|
1881
1942
|
};
|
1943
|
+
function $caa9439642c6336c$var$checkIdentityKeys(target, has2, key) {
|
1944
|
+
const rawKey = $caa9439642c6336c$var$toRaw(key);
|
1945
|
+
if (rawKey !== key && has2.call(target, rawKey)) {
|
1946
|
+
const type = $caa9439642c6336c$var$toRawType(target);
|
1947
|
+
console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
|
1948
|
+
}
|
1949
|
+
}
|
1882
1950
|
var $caa9439642c6336c$var$reactiveMap = new WeakMap();
|
1883
1951
|
var $caa9439642c6336c$var$shallowReactiveMap = new WeakMap();
|
1884
1952
|
var $caa9439642c6336c$var$readonlyMap = new WeakMap();
|
@@ -1908,7 +1976,10 @@ function $caa9439642c6336c$var$readonly(target) {
|
|
1908
1976
|
return $caa9439642c6336c$var$createReactiveObject(target, true, $caa9439642c6336c$var$readonlyHandlers, $caa9439642c6336c$var$readonlyCollectionHandlers, $caa9439642c6336c$var$readonlyMap);
|
1909
1977
|
}
|
1910
1978
|
function $caa9439642c6336c$var$createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {
|
1911
|
-
if (!$caa9439642c6336c$var$isObject(target))
|
1979
|
+
if (!$caa9439642c6336c$var$isObject(target)) {
|
1980
|
+
console.warn(`value cannot be made reactive: ${String(target)}`);
|
1981
|
+
return target;
|
1982
|
+
}
|
1912
1983
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
1913
1984
|
const existingProxy = proxyMap.get(target);
|
1914
1985
|
if (existingProxy) return existingProxy;
|
@@ -2101,9 +2172,9 @@ function $caa9439642c6336c$var$on(el, event, modifiers, callback) {
|
|
2101
2172
|
handler3 = $caa9439642c6336c$var$debounce(handler3, wait);
|
2102
2173
|
}
|
2103
2174
|
if (modifiers.includes("throttle")) {
|
2104
|
-
let
|
2105
|
-
let
|
2106
|
-
handler3 = $caa9439642c6336c$var$throttle(handler3,
|
2175
|
+
let nextModifier1 = modifiers[modifiers.indexOf("throttle") + 1] || "invalid-wait";
|
2176
|
+
let wait1 = $caa9439642c6336c$var$isNumeric(nextModifier1.split("ms")[0]) ? Number(nextModifier1.split("ms")[0]) : 250;
|
2177
|
+
handler3 = $caa9439642c6336c$var$throttle(handler3, wait1);
|
2107
2178
|
}
|
2108
2179
|
listenerTarget.addEventListener(event, handler3, options);
|
2109
2180
|
return ()=>{
|
@@ -2309,41 +2380,24 @@ $caa9439642c6336c$var$directive("html", (el, { expression: expression }, { effe
|
|
2309
2380
|
// packages/alpinejs/src/directives/x-bind.js
|
2310
2381
|
$caa9439642c6336c$var$mapAttributes($caa9439642c6336c$var$startingWith(":", $caa9439642c6336c$var$into($caa9439642c6336c$var$prefix("bind:"))));
|
2311
2382
|
$caa9439642c6336c$var$directive("bind", (el, { value: value , modifiers: modifiers , expression: expression , original: original }, { effect: effect3 })=>{
|
2312
|
-
if (!value)
|
2383
|
+
if (!value) {
|
2384
|
+
let bindingProviders = {};
|
2385
|
+
$caa9439642c6336c$var$injectBindingProviders(bindingProviders);
|
2386
|
+
let getBindings = $caa9439642c6336c$var$evaluateLater(el, expression);
|
2387
|
+
getBindings((bindings)=>{
|
2388
|
+
$caa9439642c6336c$var$applyBindingsObject(el, bindings, original);
|
2389
|
+
}, {
|
2390
|
+
scope: bindingProviders
|
2391
|
+
});
|
2392
|
+
return;
|
2393
|
+
}
|
2313
2394
|
if (value === "key") return $caa9439642c6336c$var$storeKeyForXFor(el, expression);
|
2314
2395
|
let evaluate2 = $caa9439642c6336c$var$evaluateLater(el, expression);
|
2315
2396
|
effect3(()=>evaluate2((result)=>{
|
2316
|
-
if (result === void 0 && expression.match(/\./)) result = "";
|
2397
|
+
if (result === void 0 && typeof expression === "string" && expression.match(/\./)) result = "";
|
2317
2398
|
$caa9439642c6336c$var$mutateDom(()=>$caa9439642c6336c$var$bind(el, value, result, modifiers));
|
2318
2399
|
}));
|
2319
2400
|
});
|
2320
|
-
function $caa9439642c6336c$var$applyBindingsObject(el, expression, original, effect3) {
|
2321
|
-
let bindingProviders = {};
|
2322
|
-
$caa9439642c6336c$var$injectBindingProviders(bindingProviders);
|
2323
|
-
let getBindings = $caa9439642c6336c$var$evaluateLater(el, expression);
|
2324
|
-
let cleanupRunners = [];
|
2325
|
-
while(cleanupRunners.length)cleanupRunners.pop()();
|
2326
|
-
getBindings((bindings)=>{
|
2327
|
-
let attributes = Object.entries(bindings).map(([name, value])=>({
|
2328
|
-
name: name,
|
2329
|
-
value: value
|
2330
|
-
}));
|
2331
|
-
let staticAttributes = $caa9439642c6336c$var$attributesOnly(attributes);
|
2332
|
-
attributes = attributes.map((attribute)=>{
|
2333
|
-
if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {
|
2334
|
-
name: `x-bind:${attribute.name}`,
|
2335
|
-
value: `"${attribute.value}"`
|
2336
|
-
};
|
2337
|
-
return attribute;
|
2338
|
-
});
|
2339
|
-
$caa9439642c6336c$var$directives(el, attributes, original).map((handle)=>{
|
2340
|
-
cleanupRunners.push(handle.runCleanups);
|
2341
|
-
handle();
|
2342
|
-
});
|
2343
|
-
}, {
|
2344
|
-
scope: bindingProviders
|
2345
|
-
});
|
2346
|
-
}
|
2347
2401
|
function $caa9439642c6336c$var$storeKeyForXFor(el, expression) {
|
2348
2402
|
el._x_keyExpression = expression;
|
2349
2403
|
}
|
@@ -2373,7 +2427,9 @@ $caa9439642c6336c$var$directive("data", $caa9439642c6336c$var$skipDuringClone((e
|
|
2373
2427
|
$caa9439642c6336c$var$directive("show", (el, { modifiers: modifiers , expression: expression }, { effect: effect3 })=>{
|
2374
2428
|
let evaluate2 = $caa9439642c6336c$var$evaluateLater(el, expression);
|
2375
2429
|
if (!el._x_doHide) el._x_doHide = ()=>{
|
2376
|
-
$caa9439642c6336c$var$mutateDom(()=>
|
2430
|
+
$caa9439642c6336c$var$mutateDom(()=>{
|
2431
|
+
el.style.setProperty("display", "none", modifiers.includes("important") ? "important" : void 0);
|
2432
|
+
});
|
2377
2433
|
};
|
2378
2434
|
if (!el._x_doShow) el._x_doShow = ()=>{
|
2379
2435
|
$caa9439642c6336c$var$mutateDom(()=>{
|
@@ -2438,11 +2494,11 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
2438
2494
|
});
|
2439
2495
|
scopes.push(scope2);
|
2440
2496
|
});
|
2441
|
-
else for(let
|
2442
|
-
let scope2 = $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, items[
|
2497
|
+
else for(let i = 0; i < items.length; i++){
|
2498
|
+
let scope2 = $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, items[i], i, items);
|
2443
2499
|
evaluateKey((value)=>keys.push(value), {
|
2444
2500
|
scope: {
|
2445
|
-
index:
|
2501
|
+
index: i,
|
2446
2502
|
...scope2
|
2447
2503
|
}
|
2448
2504
|
});
|
@@ -2452,44 +2508,44 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
2452
2508
|
let moves = [];
|
2453
2509
|
let removes = [];
|
2454
2510
|
let sames = [];
|
2455
|
-
for(let
|
2456
|
-
let key = prevKeys[
|
2511
|
+
for(let i1 = 0; i1 < prevKeys.length; i1++){
|
2512
|
+
let key = prevKeys[i1];
|
2457
2513
|
if (keys.indexOf(key) === -1) removes.push(key);
|
2458
2514
|
}
|
2459
2515
|
prevKeys = prevKeys.filter((key)=>!removes.includes(key));
|
2460
2516
|
let lastKey = "template";
|
2461
|
-
for(let
|
2462
|
-
let
|
2463
|
-
let prevIndex = prevKeys.indexOf(
|
2517
|
+
for(let i2 = 0; i2 < keys.length; i2++){
|
2518
|
+
let key1 = keys[i2];
|
2519
|
+
let prevIndex = prevKeys.indexOf(key1);
|
2464
2520
|
if (prevIndex === -1) {
|
2465
|
-
prevKeys.splice(
|
2521
|
+
prevKeys.splice(i2, 0, key1);
|
2466
2522
|
adds.push([
|
2467
2523
|
lastKey,
|
2468
|
-
|
2524
|
+
i2
|
2469
2525
|
]);
|
2470
|
-
} else if (prevIndex !==
|
2471
|
-
let keyInSpot = prevKeys.splice(
|
2526
|
+
} else if (prevIndex !== i2) {
|
2527
|
+
let keyInSpot = prevKeys.splice(i2, 1)[0];
|
2472
2528
|
let keyForSpot = prevKeys.splice(prevIndex - 1, 1)[0];
|
2473
|
-
prevKeys.splice(
|
2529
|
+
prevKeys.splice(i2, 0, keyForSpot);
|
2474
2530
|
prevKeys.splice(prevIndex, 0, keyInSpot);
|
2475
2531
|
moves.push([
|
2476
2532
|
keyInSpot,
|
2477
2533
|
keyForSpot
|
2478
2534
|
]);
|
2479
|
-
} else sames.push(
|
2480
|
-
lastKey =
|
2481
|
-
}
|
2482
|
-
for(let
|
2483
|
-
let
|
2484
|
-
if (!!lookup[
|
2485
|
-
lookup[
|
2486
|
-
lookup[
|
2487
|
-
delete lookup[
|
2488
|
-
}
|
2489
|
-
for(let
|
2490
|
-
let [
|
2491
|
-
let elInSpot = lookup[
|
2492
|
-
let elForSpot = lookup[
|
2535
|
+
} else sames.push(key1);
|
2536
|
+
lastKey = key1;
|
2537
|
+
}
|
2538
|
+
for(let i3 = 0; i3 < removes.length; i3++){
|
2539
|
+
let key2 = removes[i3];
|
2540
|
+
if (!!lookup[key2]._x_effects) lookup[key2]._x_effects.forEach($caa9439642c6336c$var$dequeueJob);
|
2541
|
+
lookup[key2].remove();
|
2542
|
+
lookup[key2] = null;
|
2543
|
+
delete lookup[key2];
|
2544
|
+
}
|
2545
|
+
for(let i4 = 0; i4 < moves.length; i4++){
|
2546
|
+
let [keyInSpot1, keyForSpot1] = moves[i4];
|
2547
|
+
let elInSpot = lookup[keyInSpot1];
|
2548
|
+
let elForSpot = lookup[keyForSpot1];
|
2493
2549
|
let marker = document.createElement("div");
|
2494
2550
|
$caa9439642c6336c$var$mutateDom(()=>{
|
2495
2551
|
elForSpot.after(marker);
|
@@ -2499,24 +2555,24 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
2499
2555
|
elInSpot._x_currentIfEl && elInSpot.after(elInSpot._x_currentIfEl);
|
2500
2556
|
marker.remove();
|
2501
2557
|
});
|
2502
|
-
$caa9439642c6336c$var$refreshScope(elForSpot, scopes[keys.indexOf(
|
2558
|
+
$caa9439642c6336c$var$refreshScope(elForSpot, scopes[keys.indexOf(keyForSpot1)]);
|
2503
2559
|
}
|
2504
|
-
for(let
|
2505
|
-
let [lastKey2, index] = adds[
|
2560
|
+
for(let i5 = 0; i5 < adds.length; i5++){
|
2561
|
+
let [lastKey2, index] = adds[i5];
|
2506
2562
|
let lastEl = lastKey2 === "template" ? templateEl : lookup[lastKey2];
|
2507
2563
|
if (lastEl._x_currentIfEl) lastEl = lastEl._x_currentIfEl;
|
2508
|
-
let
|
2509
|
-
let
|
2564
|
+
let scope21 = scopes[index];
|
2565
|
+
let key3 = keys[index];
|
2510
2566
|
let clone2 = document.importNode(templateEl.content, true).firstElementChild;
|
2511
|
-
$caa9439642c6336c$var$addScopeToNode(clone2, $caa9439642c6336c$var$reactive(
|
2567
|
+
$caa9439642c6336c$var$addScopeToNode(clone2, $caa9439642c6336c$var$reactive(scope21), templateEl);
|
2512
2568
|
$caa9439642c6336c$var$mutateDom(()=>{
|
2513
2569
|
lastEl.after(clone2);
|
2514
2570
|
$caa9439642c6336c$var$initTree(clone2);
|
2515
2571
|
});
|
2516
|
-
if (typeof
|
2517
|
-
lookup[
|
2572
|
+
if (typeof key3 === "object") $caa9439642c6336c$var$warn("x-for key cannot be an object, it must be a string or an integer", templateEl);
|
2573
|
+
lookup[key3] = clone2;
|
2518
2574
|
}
|
2519
|
-
for(let
|
2575
|
+
for(let i6 = 0; i6 < sames.length; i6++)$caa9439642c6336c$var$refreshScope(lookup[sames[i6]], scopes[keys.indexOf(sames[i6])]);
|
2520
2576
|
templateEl._x_prevKeys = keys;
|
2521
2577
|
});
|
2522
2578
|
}
|
@@ -2545,8 +2601,8 @@ function $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, item, i
|
|
2545
2601
|
scopeVariables[name] = item[i];
|
2546
2602
|
});
|
2547
2603
|
} else if (/^\{.*\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === "object") {
|
2548
|
-
let
|
2549
|
-
|
2604
|
+
let names1 = iteratorNames.item.replace("{", "").replace("}", "").split(",").map((i)=>i.trim());
|
2605
|
+
names1.forEach((name)=>{
|
2550
2606
|
scopeVariables[name] = item[name];
|
2551
2607
|
});
|
2552
2608
|
} else scopeVariables[iteratorNames.item] = item;
|
@@ -2695,7 +2751,9 @@ function $512e3a9270ec7803$var$dom(el) {
|
|
2695
2751
|
return new $512e3a9270ec7803$var$DomManager(el);
|
2696
2752
|
}
|
2697
2753
|
function $512e3a9270ec7803$var$createElement(html) {
|
2698
|
-
|
2754
|
+
const template = document.createElement("template");
|
2755
|
+
template.innerHTML = html;
|
2756
|
+
return template.content.firstElementChild;
|
2699
2757
|
}
|
2700
2758
|
function $512e3a9270ec7803$var$textOrComment(el) {
|
2701
2759
|
return el.nodeType === 3 || el.nodeType === 8;
|
@@ -2774,11 +2832,11 @@ async function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(from, toHtml, options)
|
|
2774
2832
|
}
|
2775
2833
|
}
|
2776
2834
|
for(let i1 = toAttributes.length - 1; i1 >= 0; i1--){
|
2777
|
-
let
|
2835
|
+
let name1 = toAttributes[i1].name;
|
2778
2836
|
let value = toAttributes[i1].value;
|
2779
|
-
if (from2.getAttribute(
|
2780
|
-
from2.setAttribute(
|
2781
|
-
await breakpoint(`Set [${
|
2837
|
+
if (from2.getAttribute(name1) !== value) {
|
2838
|
+
from2.setAttribute(name1, value);
|
2839
|
+
await breakpoint(`Set [${name1}] attribute to: "${value}"`);
|
2782
2840
|
}
|
2783
2841
|
}
|
2784
2842
|
}
|
@@ -4613,7 +4671,7 @@ var $69a8ec8dbeef3157$var$require_tippy_cjs = $69a8ec8dbeef3157$var$__commonJS((
|
|
4613
4671
|
return value.replace(spacesAndTabs, " ").replace(lineStartWithSpaces, "").trim();
|
4614
4672
|
}
|
4615
4673
|
function getDevMessage(message) {
|
4616
|
-
return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77
|
4674
|
+
return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77 This is a development-only message. It will be removed in production.\n ");
|
4617
4675
|
}
|
4618
4676
|
function getFormattedMessage(message) {
|
4619
4677
|
return [
|
@@ -6510,7 +6568,7 @@ var $5267f0d63de538ba$exports = {};
|
|
6510
6568
|
var cookie = window.document.cookie;
|
6511
6569
|
var location = cookie.indexOf(encodeURIComponent(storageKey) + "=");
|
6512
6570
|
if (location !== -1) storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
|
6513
|
-
} catch (
|
6571
|
+
} catch (ignore1) {}
|
6514
6572
|
// If the stored level is not valid, treat it as if nothing was stored.
|
6515
6573
|
if (self.levels[storedLevel] === undefined) storedLevel = undefined;
|
6516
6574
|
return storedLevel;
|
@@ -6525,7 +6583,7 @@ var $5267f0d63de538ba$exports = {};
|
|
6525
6583
|
// Use session cookie as fallback
|
6526
6584
|
try {
|
6527
6585
|
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
6528
|
-
} catch (
|
6586
|
+
} catch (ignore1) {}
|
6529
6587
|
}
|
6530
6588
|
/*
|
6531
6589
|
*
|
@@ -6780,7 +6838,7 @@ function $aabd7bdddb195dac$export$2e2bcd8739ae039(Alpine, { prefix: prefix }) {
|
|
6780
6838
|
init () {
|
6781
6839
|
(0, $9930d46698775b42$export$33d4bfa367d0ee08)(`(min-width: ${(0, $4d527fa4ac70acba$export$2e2bcd8739ae039).desktopWidth}px)`, (matches)=>{
|
6782
6840
|
this._isDesktop = matches;
|
6783
|
-
(0, (/*@__PURE__*/$parcel$interopDefault($5267f0d63de538ba$exports))).debug(`Media query 'desktop': ${matches ? "
|
6841
|
+
(0, (/*@__PURE__*/$parcel$interopDefault($5267f0d63de538ba$exports))).debug(`Media query 'desktop': ${matches ? "✅ match" : "❌ no match"}`);
|
6784
6842
|
});
|
6785
6843
|
},
|
6786
6844
|
get desktop () {
|
@@ -6972,7 +7030,7 @@ function $af7ba71c6eecd94a$export$2e2bcd8739ae039(Alpine, { prefix: prefix }) {
|
|
6972
7030
|
var $7d6b1fa982d8364d$exports = {};
|
6973
7031
|
(function(global, factory) {
|
6974
7032
|
factory($7d6b1fa982d8364d$exports);
|
6975
|
-
})($7d6b1fa982d8364d$exports, function(
|
7033
|
+
})($7d6b1fa982d8364d$exports, function(exports1) {
|
6976
7034
|
"use strict";
|
6977
7035
|
var adapters = {
|
6978
7036
|
logger: self.console,
|
@@ -7023,7 +7081,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7023
7081
|
var clamp = function clamp(number, min, max) {
|
7024
7082
|
return Math.max(min, Math.min(max, number));
|
7025
7083
|
};
|
7026
|
-
var
|
7084
|
+
var ConnectionMonitor = function() {
|
7027
7085
|
function ConnectionMonitor(connection) {
|
7028
7086
|
classCallCheck(this, ConnectionMonitor);
|
7029
7087
|
this.visibilityDidChange = this.visibilityDidChange.bind(this);
|
@@ -7110,12 +7168,12 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7110
7168
|
};
|
7111
7169
|
return ConnectionMonitor;
|
7112
7170
|
}();
|
7113
|
-
|
7171
|
+
ConnectionMonitor.pollInterval = {
|
7114
7172
|
min: 3,
|
7115
7173
|
max: 30,
|
7116
7174
|
multiplier: 5
|
7117
7175
|
};
|
7118
|
-
|
7176
|
+
ConnectionMonitor.staleThreshold = 6;
|
7119
7177
|
var INTERNAL = {
|
7120
7178
|
message_types: {
|
7121
7179
|
welcome: "welcome",
|
@@ -7138,13 +7196,13 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7138
7196
|
var message_types = INTERNAL.message_types, protocols = INTERNAL.protocols;
|
7139
7197
|
var supportedProtocols = protocols.slice(0, protocols.length - 1);
|
7140
7198
|
var indexOf = [].indexOf;
|
7141
|
-
var
|
7199
|
+
var Connection = function() {
|
7142
7200
|
function Connection(consumer) {
|
7143
7201
|
classCallCheck(this, Connection);
|
7144
7202
|
this.open = this.open.bind(this);
|
7145
7203
|
this.consumer = consumer;
|
7146
7204
|
this.subscriptions = this.consumer.subscriptions;
|
7147
|
-
this.monitor = new
|
7205
|
+
this.monitor = new ConnectionMonitor(this);
|
7148
7206
|
this.disconnected = true;
|
7149
7207
|
}
|
7150
7208
|
Connection.prototype.send = function send(data) {
|
@@ -7218,8 +7276,8 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7218
7276
|
};
|
7219
7277
|
return Connection;
|
7220
7278
|
}();
|
7221
|
-
|
7222
|
-
|
7279
|
+
Connection.reopenDelay = 500;
|
7280
|
+
Connection.prototype.events = {
|
7223
7281
|
message: function message(event) {
|
7224
7282
|
if (!this.isProtocolSupported()) return;
|
7225
7283
|
var _JSON$parse = JSON.parse(event.data), identifier = _JSON$parse.identifier, message = _JSON$parse.message, reason = _JSON$parse.reason, reconnect = _JSON$parse.reconnect, type = _JSON$parse.type;
|
@@ -7273,7 +7331,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7273
7331
|
}
|
7274
7332
|
return object;
|
7275
7333
|
};
|
7276
|
-
var
|
7334
|
+
var Subscription = function() {
|
7277
7335
|
function Subscription(consumer) {
|
7278
7336
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
7279
7337
|
var mixin = arguments[2];
|
@@ -7299,7 +7357,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7299
7357
|
};
|
7300
7358
|
return Subscription;
|
7301
7359
|
}();
|
7302
|
-
var
|
7360
|
+
var SubscriptionGuarantor = function() {
|
7303
7361
|
function SubscriptionGuarantor(subscriptions) {
|
7304
7362
|
classCallCheck(this, SubscriptionGuarantor);
|
7305
7363
|
this.subscriptions = subscriptions;
|
@@ -7336,11 +7394,11 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7336
7394
|
};
|
7337
7395
|
return SubscriptionGuarantor;
|
7338
7396
|
}();
|
7339
|
-
var
|
7397
|
+
var Subscriptions = function() {
|
7340
7398
|
function Subscriptions(consumer) {
|
7341
7399
|
classCallCheck(this, Subscriptions);
|
7342
7400
|
this.consumer = consumer;
|
7343
|
-
this.guarantor = new
|
7401
|
+
this.guarantor = new SubscriptionGuarantor(this);
|
7344
7402
|
this.subscriptions = [];
|
7345
7403
|
}
|
7346
7404
|
Subscriptions.prototype.create = function create(channelName, mixin) {
|
@@ -7348,7 +7406,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7348
7406
|
var params = (typeof channel === "undefined" ? "undefined" : _typeof(channel)) === "object" ? channel : {
|
7349
7407
|
channel: channel
|
7350
7408
|
};
|
7351
|
-
var subscription = new
|
7409
|
+
var subscription = new Subscription(this.consumer, params, mixin);
|
7352
7410
|
return this.add(subscription);
|
7353
7411
|
};
|
7354
7412
|
Subscriptions.prototype.add = function add(subscription) {
|
@@ -7399,12 +7457,12 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7399
7457
|
].concat(args));
|
7400
7458
|
});
|
7401
7459
|
};
|
7402
|
-
Subscriptions.prototype.notify = function notify(
|
7460
|
+
Subscriptions.prototype.notify = function notify(subscription, callbackName) {
|
7403
7461
|
for(var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++)args[_key2 - 2] = arguments[_key2];
|
7404
7462
|
var subscriptions = void 0;
|
7405
|
-
if (typeof
|
7463
|
+
if (typeof subscription === "string") subscriptions = this.findAll(subscription);
|
7406
7464
|
else subscriptions = [
|
7407
|
-
|
7465
|
+
subscription
|
7408
7466
|
];
|
7409
7467
|
return subscriptions.map(function(subscription) {
|
7410
7468
|
return typeof subscription[callbackName] === "function" ? subscription[callbackName].apply(subscription, args) : undefined;
|
@@ -7429,12 +7487,12 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7429
7487
|
};
|
7430
7488
|
return Subscriptions;
|
7431
7489
|
}();
|
7432
|
-
var
|
7490
|
+
var Consumer = function() {
|
7433
7491
|
function Consumer(url) {
|
7434
7492
|
classCallCheck(this, Consumer);
|
7435
7493
|
this._url = url;
|
7436
|
-
this.subscriptions = new
|
7437
|
-
this.connection = new
|
7494
|
+
this.subscriptions = new Subscriptions(this);
|
7495
|
+
this.connection = new Connection(this);
|
7438
7496
|
}
|
7439
7497
|
Consumer.prototype.send = function send(data) {
|
7440
7498
|
return this.connection.send(data);
|
@@ -7472,25 +7530,25 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7472
7530
|
}
|
7473
7531
|
function createConsumer() {
|
7474
7532
|
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getConfig("url") || INTERNAL.default_mount_path;
|
7475
|
-
return new
|
7533
|
+
return new Consumer(url);
|
7476
7534
|
}
|
7477
7535
|
function getConfig(name) {
|
7478
7536
|
var element = document.head.querySelector("meta[name='action-cable-" + name + "']");
|
7479
7537
|
if (element) return element.getAttribute("content");
|
7480
7538
|
}
|
7481
|
-
|
7482
|
-
|
7483
|
-
|
7484
|
-
|
7485
|
-
|
7486
|
-
|
7487
|
-
|
7488
|
-
|
7489
|
-
|
7490
|
-
|
7491
|
-
|
7492
|
-
|
7493
|
-
Object.defineProperty(
|
7539
|
+
exports1.Connection = Connection;
|
7540
|
+
exports1.ConnectionMonitor = ConnectionMonitor;
|
7541
|
+
exports1.Consumer = Consumer;
|
7542
|
+
exports1.INTERNAL = INTERNAL;
|
7543
|
+
exports1.Subscription = Subscription;
|
7544
|
+
exports1.Subscriptions = Subscriptions;
|
7545
|
+
exports1.SubscriptionGuarantor = SubscriptionGuarantor;
|
7546
|
+
exports1.adapters = adapters;
|
7547
|
+
exports1.createWebSocketURL = createWebSocketURL;
|
7548
|
+
exports1.logger = logger;
|
7549
|
+
exports1.createConsumer = createConsumer;
|
7550
|
+
exports1.getConfig = getConfig;
|
7551
|
+
Object.defineProperty(exports1, "__esModule", {
|
7494
7552
|
value: true
|
7495
7553
|
});
|
7496
7554
|
});
|
@@ -7516,8 +7574,8 @@ var $7d6b1fa982d8364d$exports = {};
|
|
7516
7574
|
* false (at end), schedule `callback` to execute after `delay` ms.
|
7517
7575
|
*
|
7518
7576
|
* @returns {Function} A new, throttled, function.
|
7519
|
-
*/ function $c5d017602d25d050$export$de363e709c412c8a(delay, callback,
|
7520
|
-
var _ref =
|
7577
|
+
*/ function $c5d017602d25d050$export$de363e709c412c8a(delay, callback, options) {
|
7578
|
+
var _ref = options || {}, _ref$noTrailing = _ref.noTrailing, noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing, _ref$noLeading = _ref.noLeading, noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading, _ref$debounceMode = _ref.debounceMode, debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
7521
7579
|
/*
|
7522
7580
|
* After wrapper has stopped being called, this timeout ensures that
|
7523
7581
|
* `callback` is executed at the proper times in `throttle` and `end`
|
@@ -7678,8 +7736,15 @@ async function $e8e1f68a69f95ce8$export$51c59e2af49c1a92(url, selector) {
|
|
7678
7736
|
|
7679
7737
|
function $d709d0f4027033b2$export$2e2bcd8739ae039() {
|
7680
7738
|
return {
|
7739
|
+
_requestsInProgress: 0,
|
7681
7740
|
version: Alpine.$persist("").as("lookbook-version"),
|
7682
7741
|
location: window.location,
|
7742
|
+
get sidebarHidden () {
|
7743
|
+
return this.$store.layout.sidebar.hidden;
|
7744
|
+
},
|
7745
|
+
get loading () {
|
7746
|
+
return this._requestsInProgress > 0;
|
7747
|
+
},
|
7683
7748
|
init () {
|
7684
7749
|
if (window.SOCKET_PATH) {
|
7685
7750
|
console.log("SOCKET CREATED");
|
@@ -7709,10 +7774,12 @@ function $d709d0f4027033b2$export$2e2bcd8739ae039() {
|
|
7709
7774
|
async updateDOM () {
|
7710
7775
|
this.debug("Starting DOM update");
|
7711
7776
|
this.$dispatch("dom:update-start");
|
7777
|
+
this.requestStart();
|
7712
7778
|
try {
|
7713
7779
|
const { fragment: fragment , title: title } = await (0, $e8e1f68a69f95ce8$export$51c59e2af49c1a92)(window.location, `#${this.$root.id}`);
|
7714
7780
|
(0, $e263283f97229955$export$2e5e8c41f5d4e7c7)(this.$root, fragment);
|
7715
7781
|
document.title = title;
|
7782
|
+
this.requestEnd();
|
7716
7783
|
this.$dispatch("dom:update-complete");
|
7717
7784
|
this.debug("DOM update complete");
|
7718
7785
|
} catch (err) {
|
@@ -7726,8 +7793,11 @@ function $d709d0f4027033b2$export$2e2bcd8739ae039() {
|
|
7726
7793
|
closeMobileSidebar () {
|
7727
7794
|
if (this.$store.layout.mobile && !this.sidebarHidden) this.toggleSidebar();
|
7728
7795
|
},
|
7729
|
-
|
7730
|
-
|
7796
|
+
requestStart () {
|
7797
|
+
this._requestsInProgress += 1;
|
7798
|
+
},
|
7799
|
+
requestEnd () {
|
7800
|
+
if (this._requestsInProgress > 0) this._requestsInProgress -= 1;
|
7731
7801
|
},
|
7732
7802
|
...Alpine.$log
|
7733
7803
|
};
|
@@ -7755,7 +7825,7 @@ function $5439cede634b2921$var$toCamel(s) {
|
|
7755
7825
|
}
|
7756
7826
|
|
7757
7827
|
|
7758
|
-
var $
|
7828
|
+
var $1f889267678ff167$exports = {};
|
7759
7829
|
var $cbd28b10fa9798c7$exports = {};
|
7760
7830
|
|
7761
7831
|
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
|
@@ -7795,10 +7865,10 @@ function $1fa2a5446b18c455$export$af51f0f06c0f328a(node) {
|
|
7795
7865
|
// and applies them to the HTMLElements such as popper and arrow
|
7796
7866
|
function $dfb41fce0bddd2d8$var$applyStyles(_ref) {
|
7797
7867
|
var state = _ref.state;
|
7798
|
-
Object.keys(state.elements).forEach(function(
|
7799
|
-
var style = state.styles[
|
7800
|
-
var attributes = state.attributes[
|
7801
|
-
var element = state.elements[
|
7868
|
+
Object.keys(state.elements).forEach(function(name) {
|
7869
|
+
var style = state.styles[name] || {};
|
7870
|
+
var attributes = state.attributes[name] || {};
|
7871
|
+
var element = state.elements[name]; // arrow is optional + virtual elements
|
7802
7872
|
if (!(0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element) || !(0, $59d97a6bab2b727e$export$2e2bcd8739ae039)(element)) return;
|
7803
7873
|
// Flow doesn't support to extend this property, but it's the most
|
7804
7874
|
// effective way to apply styles to an HTMLElement
|
@@ -7833,12 +7903,12 @@ function $dfb41fce0bddd2d8$var$effect(_ref2) {
|
|
7833
7903
|
var element = state.elements[name];
|
7834
7904
|
var attributes = state.attributes[name] || {};
|
7835
7905
|
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
|
7836
|
-
var
|
7906
|
+
var style = styleProperties.reduce(function(style, property) {
|
7837
7907
|
style[property] = "";
|
7838
7908
|
return style;
|
7839
7909
|
}, {}); // arrow is optional + virtual elements
|
7840
7910
|
if (!(0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element) || !(0, $59d97a6bab2b727e$export$2e2bcd8739ae039)(element)) return;
|
7841
|
-
Object.assign(element.style,
|
7911
|
+
Object.assign(element.style, style);
|
7842
7912
|
Object.keys(attributes).forEach(function(attribute) {
|
7843
7913
|
element.removeAttribute(attribute);
|
7844
7914
|
});
|
@@ -7863,27 +7933,46 @@ var $a435872b5ba665df$export$96ec731ed4dcb222 = Math.min;
|
|
7863
7933
|
var $a435872b5ba665df$export$2077e0241d6afd3c = Math.round;
|
7864
7934
|
|
7865
7935
|
|
7866
|
-
|
7936
|
+
|
7937
|
+
function $beb42d7aceecf8c8$export$2e2bcd8739ae039() {
|
7938
|
+
var uaData = navigator.userAgentData;
|
7939
|
+
if (uaData != null && uaData.brands) return uaData.brands.map(function(item) {
|
7940
|
+
return item.brand + "/" + item.version;
|
7941
|
+
}).join(" ");
|
7942
|
+
return navigator.userAgent;
|
7943
|
+
}
|
7944
|
+
|
7945
|
+
|
7946
|
+
function $f6bdda075fc14cbf$export$2e2bcd8739ae039() {
|
7947
|
+
return !/^((?!chrome|android).)*safari/i.test((0, $beb42d7aceecf8c8$export$2e2bcd8739ae039)());
|
7948
|
+
}
|
7949
|
+
|
7950
|
+
|
7951
|
+
function $b854957821c00430$export$2e2bcd8739ae039(element, includeScale, isFixedStrategy) {
|
7867
7952
|
if (includeScale === void 0) includeScale = false;
|
7868
|
-
|
7953
|
+
if (isFixedStrategy === void 0) isFixedStrategy = false;
|
7954
|
+
var clientRect = element.getBoundingClientRect();
|
7869
7955
|
var scaleX = 1;
|
7870
7956
|
var scaleY = 1;
|
7871
|
-
if ((0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element)
|
7872
|
-
|
7873
|
-
|
7874
|
-
|
7875
|
-
|
7876
|
-
|
7877
|
-
|
7957
|
+
if (includeScale && (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element)) {
|
7958
|
+
scaleX = element.offsetWidth > 0 ? (0, $a435872b5ba665df$export$2077e0241d6afd3c)(clientRect.width) / element.offsetWidth || 1 : 1;
|
7959
|
+
scaleY = element.offsetHeight > 0 ? (0, $a435872b5ba665df$export$2077e0241d6afd3c)(clientRect.height) / element.offsetHeight || 1 : 1;
|
7960
|
+
}
|
7961
|
+
var _ref = (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(element) ? (0, $f41f4520bee001a7$export$2e2bcd8739ae039)(element) : window, visualViewport = _ref.visualViewport;
|
7962
|
+
var addVisualOffsets = !(0, $f6bdda075fc14cbf$export$2e2bcd8739ae039)() && isFixedStrategy;
|
7963
|
+
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
7964
|
+
var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
7965
|
+
var width = clientRect.width / scaleX;
|
7966
|
+
var height = clientRect.height / scaleY;
|
7878
7967
|
return {
|
7879
|
-
width:
|
7880
|
-
height:
|
7881
|
-
top:
|
7882
|
-
right:
|
7883
|
-
bottom:
|
7884
|
-
left:
|
7885
|
-
x:
|
7886
|
-
y:
|
7968
|
+
width: width,
|
7969
|
+
height: height,
|
7970
|
+
top: y,
|
7971
|
+
right: x + width,
|
7972
|
+
bottom: y + height,
|
7973
|
+
left: x,
|
7974
|
+
x: x,
|
7975
|
+
y: y
|
7887
7976
|
};
|
7888
7977
|
}
|
7889
7978
|
|
@@ -7965,7 +8054,7 @@ function $a195ad21b1cffe79$export$2e2bcd8739ae039(elementOrVirtualElement, offse
|
|
7965
8054
|
var isOffsetParentAnElement = (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(offsetParent);
|
7966
8055
|
var offsetParentIsScaled = (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(offsetParent) && $a195ad21b1cffe79$var$isElementScaled(offsetParent);
|
7967
8056
|
var documentElement = (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(offsetParent);
|
7968
|
-
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(elementOrVirtualElement, offsetParentIsScaled);
|
8057
|
+
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(elementOrVirtualElement, offsetParentIsScaled, isFixed);
|
7969
8058
|
var scroll = {
|
7970
8059
|
scrollLeft: 0,
|
7971
8060
|
scrollTop: 0
|
@@ -8068,14 +8157,15 @@ function $b7f6a1d3d9524a70$export$2e2bcd8739ae039(element) {
|
|
8068
8157
|
|
8069
8158
|
|
8070
8159
|
|
8160
|
+
|
8071
8161
|
function $4acba801a6bfbaa3$var$getTrueOffsetParent(element) {
|
8072
8162
|
if (!(0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element) || (0, $392247934674b5b4$export$2e2bcd8739ae039)(element).position === "fixed") return null;
|
8073
8163
|
return element.offsetParent;
|
8074
8164
|
} // `.offsetParent` reports `null` for fixed elements, while absolute elements
|
8075
8165
|
// return the containing block
|
8076
8166
|
function $4acba801a6bfbaa3$var$getContainingBlock(element) {
|
8077
|
-
var isFirefox =
|
8078
|
-
var isIE =
|
8167
|
+
var isFirefox = /firefox/i.test((0, $beb42d7aceecf8c8$export$2e2bcd8739ae039)());
|
8168
|
+
var isIE = /Trident/i.test((0, $beb42d7aceecf8c8$export$2e2bcd8739ae039)());
|
8079
8169
|
if (isIE && (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element)) {
|
8080
8170
|
// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
|
8081
8171
|
var elementCss = (0, $392247934674b5b4$export$2e2bcd8739ae039)(element);
|
@@ -8215,7 +8305,7 @@ function $d6d1d118731c5c9c$export$2e2bcd8739ae039(fn) {
|
|
8215
8305
|
|
8216
8306
|
|
8217
8307
|
function $6af99e74d4c8a734$export$2e2bcd8739ae039(modifiers) {
|
8218
|
-
var
|
8308
|
+
var merged = modifiers.reduce(function(merged, current) {
|
8219
8309
|
var existing = merged[current.name];
|
8220
8310
|
merged[current.name] = existing ? Object.assign({}, existing, current, {
|
8221
8311
|
options: Object.assign({}, existing.options, current.options),
|
@@ -8223,8 +8313,8 @@ function $6af99e74d4c8a734$export$2e2bcd8739ae039(modifiers) {
|
|
8223
8313
|
}) : current;
|
8224
8314
|
return merged;
|
8225
8315
|
}, {}); // IE11 does not support Object.values
|
8226
|
-
return Object.keys(
|
8227
|
-
return
|
8316
|
+
return Object.keys(merged).map(function(key) {
|
8317
|
+
return merged[key];
|
8228
8318
|
});
|
8229
8319
|
}
|
8230
8320
|
|
@@ -8248,16 +8338,16 @@ function $8e357be334f3fad9$var$areValidElements() {
|
|
8248
8338
|
function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
8249
8339
|
if (generatorOptions === void 0) generatorOptions = {};
|
8250
8340
|
var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? $8e357be334f3fad9$var$DEFAULT_OPTIONS : _generatorOptions$def2;
|
8251
|
-
return function createPopper(
|
8252
|
-
if (
|
8253
|
-
var
|
8341
|
+
return function createPopper(reference, popper, options) {
|
8342
|
+
if (options === void 0) options = defaultOptions;
|
8343
|
+
var state = {
|
8254
8344
|
placement: "bottom",
|
8255
8345
|
orderedModifiers: [],
|
8256
8346
|
options: Object.assign({}, $8e357be334f3fad9$var$DEFAULT_OPTIONS, defaultOptions),
|
8257
8347
|
modifiersData: {},
|
8258
8348
|
elements: {
|
8259
|
-
reference:
|
8260
|
-
popper:
|
8349
|
+
reference: reference,
|
8350
|
+
popper: popper
|
8261
8351
|
},
|
8262
8352
|
attributes: {},
|
8263
8353
|
styles: {}
|
@@ -8265,18 +8355,18 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
8265
8355
|
var effectCleanupFns = [];
|
8266
8356
|
var isDestroyed = false;
|
8267
8357
|
var instance = {
|
8268
|
-
state:
|
8358
|
+
state: state,
|
8269
8359
|
setOptions: function setOptions(setOptionsAction) {
|
8270
|
-
var options = typeof setOptionsAction === "function" ? setOptionsAction(
|
8360
|
+
var options = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
|
8271
8361
|
cleanupModifierEffects();
|
8272
|
-
|
8273
|
-
|
8274
|
-
reference: (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(
|
8275
|
-
popper: (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(
|
8362
|
+
state.options = Object.assign({}, defaultOptions, state.options, options);
|
8363
|
+
state.scrollParents = {
|
8364
|
+
reference: (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(reference) ? (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(reference) : reference.contextElement ? (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(reference.contextElement) : [],
|
8365
|
+
popper: (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(popper)
|
8276
8366
|
}; // Orders the modifiers based on their dependencies and `phase`
|
8277
8367
|
// properties
|
8278
|
-
var orderedModifiers = (0, $6e11c0a2f23600d6$export$2e2bcd8739ae039)((0, $6af99e74d4c8a734$export$2e2bcd8739ae039)([].concat(defaultModifiers,
|
8279
|
-
|
8368
|
+
var orderedModifiers = (0, $6e11c0a2f23600d6$export$2e2bcd8739ae039)((0, $6af99e74d4c8a734$export$2e2bcd8739ae039)([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
|
8369
|
+
state.orderedModifiers = orderedModifiers.filter(function(m) {
|
8280
8370
|
return m.enabled;
|
8281
8371
|
}); // Validate the provided modifiers so that the consumer will get warned
|
8282
8372
|
var modifiers, _ref, name, flipModifier, _ref2, name1, _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, margin;
|
@@ -8290,40 +8380,40 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
8290
8380
|
// prefer the async Popper#update method
|
8291
8381
|
forceUpdate: function forceUpdate() {
|
8292
8382
|
if (isDestroyed) return;
|
8293
|
-
var _state$elements =
|
8383
|
+
var _state$elements = state.elements, reference = _state$elements.reference, popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
|
8294
8384
|
// anymore
|
8295
8385
|
if (!$8e357be334f3fad9$var$areValidElements(reference, popper)) return;
|
8296
8386
|
// Store the reference and popper rects to be read by modifiers
|
8297
|
-
|
8298
|
-
reference: (0, $a195ad21b1cffe79$export$2e2bcd8739ae039)(reference, (0, $4acba801a6bfbaa3$export$2e2bcd8739ae039)(popper),
|
8387
|
+
state.rects = {
|
8388
|
+
reference: (0, $a195ad21b1cffe79$export$2e2bcd8739ae039)(reference, (0, $4acba801a6bfbaa3$export$2e2bcd8739ae039)(popper), state.options.strategy === "fixed"),
|
8299
8389
|
popper: (0, $e287ac773d355028$export$2e2bcd8739ae039)(popper)
|
8300
8390
|
}; // Modifiers have the ability to reset the current update cycle. The
|
8301
8391
|
// most common use case for this is the `flip` modifier changing the
|
8302
8392
|
// placement, which then needs to re-run all the modifiers, because the
|
8303
8393
|
// logic was previously ran for the previous placement and is therefore
|
8304
8394
|
// stale/incorrect
|
8305
|
-
|
8306
|
-
|
8395
|
+
state.reset = false;
|
8396
|
+
state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
|
8307
8397
|
// is filled with the initial data specified by the modifier. This means
|
8308
8398
|
// it doesn't persist and is fresh on each update.
|
8309
8399
|
// To ensure persistent data, use `${name}#persistent`
|
8310
|
-
|
8311
|
-
return
|
8400
|
+
state.orderedModifiers.forEach(function(modifier) {
|
8401
|
+
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
8312
8402
|
});
|
8313
8403
|
var __debug_loops__ = 0;
|
8314
|
-
for(var index = 0; index <
|
8315
|
-
if (
|
8316
|
-
|
8404
|
+
for(var index = 0; index < state.orderedModifiers.length; index++){
|
8405
|
+
if (state.reset === true) {
|
8406
|
+
state.reset = false;
|
8317
8407
|
index = -1;
|
8318
8408
|
continue;
|
8319
8409
|
}
|
8320
|
-
var _state$orderedModifie =
|
8321
|
-
if (typeof fn === "function")
|
8322
|
-
state:
|
8410
|
+
var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
|
8411
|
+
if (typeof fn === "function") state = fn({
|
8412
|
+
state: state,
|
8323
8413
|
options: _options,
|
8324
8414
|
name: name,
|
8325
8415
|
instance: instance
|
8326
|
-
}) ||
|
8416
|
+
}) || state;
|
8327
8417
|
}
|
8328
8418
|
},
|
8329
8419
|
// Async and optimistically optimized update – it will not be executed if
|
@@ -8331,7 +8421,7 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
8331
8421
|
update: (0, $d6d1d118731c5c9c$export$2e2bcd8739ae039)(function() {
|
8332
8422
|
return new Promise(function(resolve) {
|
8333
8423
|
instance.forceUpdate();
|
8334
|
-
resolve(
|
8424
|
+
resolve(state);
|
8335
8425
|
});
|
8336
8426
|
}),
|
8337
8427
|
destroy: function destroy() {
|
@@ -8339,20 +8429,20 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
8339
8429
|
isDestroyed = true;
|
8340
8430
|
}
|
8341
8431
|
};
|
8342
|
-
if (!$8e357be334f3fad9$var$areValidElements(
|
8343
|
-
instance.setOptions(
|
8344
|
-
if (!isDestroyed &&
|
8432
|
+
if (!$8e357be334f3fad9$var$areValidElements(reference, popper)) return instance;
|
8433
|
+
instance.setOptions(options).then(function(state) {
|
8434
|
+
if (!isDestroyed && options.onFirstUpdate) options.onFirstUpdate(state);
|
8345
8435
|
}); // Modifiers have the ability to execute arbitrary code before the first
|
8346
8436
|
// update cycle runs. They will be executed in the same order as the update
|
8347
8437
|
// cycle. This is useful when a modifier adds some persistent data that
|
8348
8438
|
// other modifiers need to use, but the modifier is run after the dependent
|
8349
8439
|
// one.
|
8350
8440
|
function runModifierEffects() {
|
8351
|
-
|
8441
|
+
state.orderedModifiers.forEach(function(_ref3) {
|
8352
8442
|
var name = _ref3.name, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? {} : _ref3$options, effect = _ref3.effect;
|
8353
8443
|
if (typeof effect === "function") {
|
8354
8444
|
var cleanupFn = effect({
|
8355
|
-
state:
|
8445
|
+
state: state,
|
8356
8446
|
name: name,
|
8357
8447
|
instance: instance,
|
8358
8448
|
options: options
|
@@ -8627,15 +8717,15 @@ var $03e421bdaa8eda14$export$2e2bcd8739ae039 = {
|
|
8627
8717
|
|
8628
8718
|
|
8629
8719
|
|
8630
|
-
function $b2dec03e76957d70$export$7fa02d8595b015ed(placement, rects,
|
8720
|
+
function $b2dec03e76957d70$export$7fa02d8595b015ed(placement, rects, offset) {
|
8631
8721
|
var basePlacement = (0, $923eec132c8d334b$export$2e2bcd8739ae039)(placement);
|
8632
8722
|
var invertDistance = [
|
8633
8723
|
(0, $9b56e55559dfbda1$export$eabcd2c8791e7bf4),
|
8634
8724
|
(0, $9b56e55559dfbda1$export$1e95b668f3b82d)
|
8635
8725
|
].indexOf(basePlacement) >= 0 ? -1 : 1;
|
8636
|
-
var _ref = typeof
|
8726
|
+
var _ref = typeof offset === "function" ? offset(Object.assign({}, rects, {
|
8637
8727
|
placement: placement
|
8638
|
-
})) :
|
8728
|
+
})) : offset, skidding = _ref[0], distance = _ref[1];
|
8639
8729
|
skidding = skidding || 0;
|
8640
8730
|
distance = (distance || 0) * invertDistance;
|
8641
8731
|
return [
|
@@ -8651,12 +8741,12 @@ function $b2dec03e76957d70$export$7fa02d8595b015ed(placement, rects, offset1) {
|
|
8651
8741
|
}
|
8652
8742
|
function $b2dec03e76957d70$var$offset(_ref2) {
|
8653
8743
|
var state = _ref2.state, options = _ref2.options, name = _ref2.name;
|
8654
|
-
var _options$offset = options.offset,
|
8744
|
+
var _options$offset = options.offset, offset = _options$offset === void 0 ? [
|
8655
8745
|
0,
|
8656
8746
|
0
|
8657
8747
|
] : _options$offset;
|
8658
8748
|
var data = (0, $9b56e55559dfbda1$export$803cd8101b6c182b).reduce(function(acc, placement) {
|
8659
|
-
acc[placement] = $b2dec03e76957d70$export$7fa02d8595b015ed(placement, state.rects,
|
8749
|
+
acc[placement] = $b2dec03e76957d70$export$7fa02d8595b015ed(placement, state.rects, offset);
|
8660
8750
|
return acc;
|
8661
8751
|
}, {});
|
8662
8752
|
var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
|
@@ -8706,29 +8796,20 @@ function $e23a845ff98433e2$export$2e2bcd8739ae039(placement) {
|
|
8706
8796
|
|
8707
8797
|
|
8708
8798
|
|
8709
|
-
|
8799
|
+
|
8800
|
+
function $ed6afea5d5a4d314$export$2e2bcd8739ae039(element, strategy) {
|
8710
8801
|
var win = (0, $f41f4520bee001a7$export$2e2bcd8739ae039)(element);
|
8711
8802
|
var html = (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(element);
|
8712
8803
|
var visualViewport = win.visualViewport;
|
8713
8804
|
var width = html.clientWidth;
|
8714
8805
|
var height = html.clientHeight;
|
8715
8806
|
var x = 0;
|
8716
|
-
var y = 0;
|
8717
|
-
// can be obscured underneath it.
|
8718
|
-
// Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
|
8719
|
-
// if it isn't open, so if this isn't available, the popper will be detected
|
8720
|
-
// to overflow the bottom of the screen too early.
|
8807
|
+
var y = 0;
|
8721
8808
|
if (visualViewport) {
|
8722
8809
|
width = visualViewport.width;
|
8723
|
-
height = visualViewport.height;
|
8724
|
-
|
8725
|
-
|
8726
|
-
// Safari returns a number <= 0, usually < -1 when pinch-zoomed
|
8727
|
-
// Feature detection fails in mobile emulation mode in Chrome.
|
8728
|
-
// Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
|
8729
|
-
// 0.001
|
8730
|
-
// Fallback here: "Not Safari" userAgent
|
8731
|
-
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
8810
|
+
height = visualViewport.height;
|
8811
|
+
var layoutViewport = (0, $f6bdda075fc14cbf$export$2e2bcd8739ae039)();
|
8812
|
+
if (layoutViewport || !layoutViewport && strategy === "fixed") {
|
8732
8813
|
x = visualViewport.offsetLeft;
|
8733
8814
|
y = visualViewport.offsetTop;
|
8734
8815
|
}
|
@@ -8801,8 +8882,8 @@ function $611b7cfc3d40c8f5$export$2e2bcd8739ae039(rect) {
|
|
8801
8882
|
|
8802
8883
|
|
8803
8884
|
|
8804
|
-
function $1ae21a55ad42cc80$var$getInnerBoundingClientRect(element) {
|
8805
|
-
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(element);
|
8885
|
+
function $1ae21a55ad42cc80$var$getInnerBoundingClientRect(element, strategy) {
|
8886
|
+
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(element, false, strategy === "fixed");
|
8806
8887
|
rect.top = rect.top + element.clientTop;
|
8807
8888
|
rect.left = rect.left + element.clientLeft;
|
8808
8889
|
rect.bottom = rect.top + element.clientHeight;
|
@@ -8813,8 +8894,8 @@ function $1ae21a55ad42cc80$var$getInnerBoundingClientRect(element) {
|
|
8813
8894
|
rect.y = rect.top;
|
8814
8895
|
return rect;
|
8815
8896
|
}
|
8816
|
-
function $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent) {
|
8817
|
-
return clippingParent === (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) ? (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $ed6afea5d5a4d314$export$2e2bcd8739ae039)(element)) : (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(clippingParent) ? $1ae21a55ad42cc80$var$getInnerBoundingClientRect(clippingParent) : (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $048158ac5222e515$export$2e2bcd8739ae039)((0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(element)));
|
8897
|
+
function $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent, strategy) {
|
8898
|
+
return clippingParent === (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) ? (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $ed6afea5d5a4d314$export$2e2bcd8739ae039)(element, strategy)) : (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(clippingParent) ? $1ae21a55ad42cc80$var$getInnerBoundingClientRect(clippingParent, strategy) : (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $048158ac5222e515$export$2e2bcd8739ae039)((0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(element)));
|
8818
8899
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
8819
8900
|
// clipping (or hiding) overflowing elements with a position different from
|
8820
8901
|
// `initial`
|
@@ -8831,20 +8912,20 @@ function $1ae21a55ad42cc80$var$getClippingParents(element) {
|
|
8831
8912
|
return (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(clippingParent) && (0, $d1f185f47d247fa7$export$2e2bcd8739ae039)(clippingParent, clipperElement) && (0, $59d97a6bab2b727e$export$2e2bcd8739ae039)(clippingParent) !== "body";
|
8832
8913
|
});
|
8833
8914
|
} // Gets the maximum area that the element is visible in due to any number of
|
8834
|
-
function $1ae21a55ad42cc80$export$2e2bcd8739ae039(element, boundary, rootBoundary) {
|
8915
|
+
function $1ae21a55ad42cc80$export$2e2bcd8739ae039(element, boundary, rootBoundary, strategy) {
|
8835
8916
|
var mainClippingParents = boundary === "clippingParents" ? $1ae21a55ad42cc80$var$getClippingParents(element) : [].concat(boundary);
|
8836
8917
|
var clippingParents = [].concat(mainClippingParents, [
|
8837
8918
|
rootBoundary
|
8838
8919
|
]);
|
8839
8920
|
var firstClippingParent = clippingParents[0];
|
8840
8921
|
var clippingRect = clippingParents.reduce(function(accRect, clippingParent) {
|
8841
|
-
var rect = $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent);
|
8922
|
+
var rect = $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent, strategy);
|
8842
8923
|
accRect.top = (0, $a435872b5ba665df$export$8960430cfd85939f)(rect.top, accRect.top);
|
8843
8924
|
accRect.right = (0, $a435872b5ba665df$export$96ec731ed4dcb222)(rect.right, accRect.right);
|
8844
8925
|
accRect.bottom = (0, $a435872b5ba665df$export$96ec731ed4dcb222)(rect.bottom, accRect.bottom);
|
8845
8926
|
accRect.left = (0, $a435872b5ba665df$export$8960430cfd85939f)(rect.left, accRect.left);
|
8846
8927
|
return accRect;
|
8847
|
-
}, $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, firstClippingParent));
|
8928
|
+
}, $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, firstClippingParent, strategy));
|
8848
8929
|
clippingRect.width = clippingRect.right - clippingRect.left;
|
8849
8930
|
clippingRect.height = clippingRect.bottom - clippingRect.top;
|
8850
8931
|
clippingRect.x = clippingRect.left;
|
@@ -8884,12 +8965,12 @@ function $f5b522f3e076d616$export$2e2bcd8739ae039(value, keys) {
|
|
8884
8965
|
|
8885
8966
|
function $223e3075705edc49$export$2e2bcd8739ae039(state, options) {
|
8886
8967
|
if (options === void 0) options = {};
|
8887
|
-
var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? (0, $9b56e55559dfbda1$export$390fd549c5303b4d) : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? (0, $9b56e55559dfbda1$export$ae5ab1c730825774) : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;
|
8968
|
+
var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? (0, $9b56e55559dfbda1$export$390fd549c5303b4d) : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? (0, $9b56e55559dfbda1$export$ae5ab1c730825774) : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;
|
8888
8969
|
var paddingObject = (0, $4867192599152955$export$2e2bcd8739ae039)(typeof padding !== "number" ? padding : (0, $f5b522f3e076d616$export$2e2bcd8739ae039)(padding, (0, $9b56e55559dfbda1$export$aec2ce47c367b8c3)));
|
8889
8970
|
var altContext = elementContext === (0, $9b56e55559dfbda1$export$ae5ab1c730825774) ? (0, $9b56e55559dfbda1$export$ca50aac9f3ba507f) : (0, $9b56e55559dfbda1$export$ae5ab1c730825774);
|
8890
8971
|
var popperRect = state.rects.popper;
|
8891
8972
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
8892
|
-
var clippingClientRect = (0, $1ae21a55ad42cc80$export$2e2bcd8739ae039)((0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(element) ? element : element.contextElement || (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(state.elements.popper), boundary, rootBoundary);
|
8973
|
+
var clippingClientRect = (0, $1ae21a55ad42cc80$export$2e2bcd8739ae039)((0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(element) ? element : element.contextElement || (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(state.elements.popper), boundary, rootBoundary, strategy);
|
8893
8974
|
var referenceClientRect = (0, $b854957821c00430$export$2e2bcd8739ae039)(state.elements.reference);
|
8894
8975
|
var popperOffsets = (0, $05d4a7bd7e0110bf$export$2e2bcd8739ae039)({
|
8895
8976
|
reference: referenceClientRect,
|
@@ -8931,8 +9012,8 @@ function $223e3075705edc49$export$2e2bcd8739ae039(state, options) {
|
|
8931
9012
|
|
8932
9013
|
function $4ec2b0d0092c1820$export$2e2bcd8739ae039(state, options) {
|
8933
9014
|
if (options === void 0) options = {};
|
8934
|
-
var _options = options,
|
8935
|
-
var variation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(
|
9015
|
+
var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? (0, $9b56e55559dfbda1$export$803cd8101b6c182b) : _options$allowedAutoP;
|
9016
|
+
var variation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(placement);
|
8936
9017
|
var placements = variation ? flipVariations ? (0, $9b56e55559dfbda1$export$368f9a87e87fa4e1) : (0, $9b56e55559dfbda1$export$368f9a87e87fa4e1).filter(function(placement) {
|
8937
9018
|
return (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(placement) === variation;
|
8938
9019
|
}) : (0, $9b56e55559dfbda1$export$aec2ce47c367b8c3);
|
@@ -8995,16 +9076,16 @@ function $d886080699dc4994$var$flip(_ref) {
|
|
8995
9076
|
var makeFallbackChecks = true;
|
8996
9077
|
var firstFittingPlacement = placements[0];
|
8997
9078
|
for(var i = 0; i < placements.length; i++){
|
8998
|
-
var
|
8999
|
-
var _basePlacement = (0, $923eec132c8d334b$export$2e2bcd8739ae039)(
|
9000
|
-
var isStartVariation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(
|
9079
|
+
var placement = placements[i];
|
9080
|
+
var _basePlacement = (0, $923eec132c8d334b$export$2e2bcd8739ae039)(placement);
|
9081
|
+
var isStartVariation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(placement) === (0, $9b56e55559dfbda1$export$b3571188c770cc5a);
|
9001
9082
|
var isVertical = [
|
9002
9083
|
(0, $9b56e55559dfbda1$export$1e95b668f3b82d),
|
9003
9084
|
(0, $9b56e55559dfbda1$export$40e543e69a8b3fbb)
|
9004
9085
|
].indexOf(_basePlacement) >= 0;
|
9005
9086
|
var len = isVertical ? "width" : "height";
|
9006
9087
|
var overflow = (0, $223e3075705edc49$export$2e2bcd8739ae039)(state, {
|
9007
|
-
placement:
|
9088
|
+
placement: placement,
|
9008
9089
|
boundary: boundary,
|
9009
9090
|
rootBoundary: rootBoundary,
|
9010
9091
|
altBoundary: altBoundary,
|
@@ -9019,11 +9100,11 @@ function $d886080699dc4994$var$flip(_ref) {
|
|
9019
9100
|
if (checks.every(function(check) {
|
9020
9101
|
return check;
|
9021
9102
|
})) {
|
9022
|
-
firstFittingPlacement =
|
9103
|
+
firstFittingPlacement = placement;
|
9023
9104
|
makeFallbackChecks = false;
|
9024
9105
|
break;
|
9025
9106
|
}
|
9026
|
-
checksMap.set(
|
9107
|
+
checksMap.set(placement, checks);
|
9027
9108
|
}
|
9028
9109
|
if (makeFallbackChecks) {
|
9029
9110
|
// `2` may be desired in some cases – research later
|
@@ -9040,8 +9121,8 @@ function $d886080699dc4994$var$flip(_ref) {
|
|
9040
9121
|
return "break";
|
9041
9122
|
}
|
9042
9123
|
};
|
9043
|
-
for(var
|
9044
|
-
var _ret = _loop(
|
9124
|
+
for(var _i = numberOfChecks; _i > 0; _i--){
|
9125
|
+
var _ret = _loop(_i);
|
9045
9126
|
if (_ret === "break") break;
|
9046
9127
|
}
|
9047
9128
|
}
|
@@ -9558,7 +9639,7 @@ function $b013befce1f6217f$var$clean(value) {
|
|
9558
9639
|
return value.replace(spacesAndTabs, " ").replace(lineStartWithSpaces, "").trim();
|
9559
9640
|
}
|
9560
9641
|
function $b013befce1f6217f$var$getDevMessage(message) {
|
9561
|
-
return $b013befce1f6217f$var$clean("\n %ctippy.js\n\n %c" + $b013befce1f6217f$var$clean(message) + "\n\n %c\uD83D\uDC77
|
9642
|
+
return $b013befce1f6217f$var$clean("\n %ctippy.js\n\n %c" + $b013befce1f6217f$var$clean(message) + "\n\n %c\uD83D\uDC77 This is a development-only message. It will be removed in production.\n ");
|
9562
9643
|
}
|
9563
9644
|
function $b013befce1f6217f$var$getFormattedMessage(message) {
|
9564
9645
|
return [
|
@@ -9669,7 +9750,7 @@ var $b013befce1f6217f$var$setDefaultProps = function setDefaultProps(partialProp
|
|
9669
9750
|
};
|
9670
9751
|
function $b013befce1f6217f$var$getExtendedPassedProps(passedProps) {
|
9671
9752
|
var plugins = passedProps.plugins || [];
|
9672
|
-
var
|
9753
|
+
var pluginProps = plugins.reduce(function(acc, plugin) {
|
9673
9754
|
var name = plugin.name, defaultValue = plugin.defaultValue;
|
9674
9755
|
if (name) {
|
9675
9756
|
var _name;
|
@@ -9677,7 +9758,7 @@ function $b013befce1f6217f$var$getExtendedPassedProps(passedProps) {
|
|
9677
9758
|
}
|
9678
9759
|
return acc;
|
9679
9760
|
}, {});
|
9680
|
-
return Object.assign({}, passedProps,
|
9761
|
+
return Object.assign({}, passedProps, pluginProps);
|
9681
9762
|
}
|
9682
9763
|
function $b013befce1f6217f$var$getDataAttributeProps(reference, plugins) {
|
9683
9764
|
var propKeys = plugins ? Object.keys($b013befce1f6217f$var$getExtendedPassedProps(Object.assign({}, $b013befce1f6217f$var$defaultProps, {
|
@@ -9772,16 +9853,16 @@ function $b013befce1f6217f$var$getChildren(popper) {
|
|
9772
9853
|
}
|
9773
9854
|
function $b013befce1f6217f$var$render(instance) {
|
9774
9855
|
var popper = $b013befce1f6217f$var$div();
|
9775
|
-
var
|
9776
|
-
|
9777
|
-
|
9778
|
-
|
9779
|
-
var
|
9780
|
-
|
9781
|
-
|
9782
|
-
$b013befce1f6217f$var$setContent(
|
9783
|
-
popper.appendChild(
|
9784
|
-
|
9856
|
+
var box = $b013befce1f6217f$var$div();
|
9857
|
+
box.className = $b013befce1f6217f$var$BOX_CLASS;
|
9858
|
+
box.setAttribute("data-state", "hidden");
|
9859
|
+
box.setAttribute("tabindex", "-1");
|
9860
|
+
var content = $b013befce1f6217f$var$div();
|
9861
|
+
content.className = $b013befce1f6217f$var$CONTENT_CLASS;
|
9862
|
+
content.setAttribute("data-state", "hidden");
|
9863
|
+
$b013befce1f6217f$var$setContent(content, instance.props);
|
9864
|
+
popper.appendChild(box);
|
9865
|
+
box.appendChild(content);
|
9785
9866
|
onUpdate(instance.props, instance.props);
|
9786
9867
|
function onUpdate(prevProps, nextProps) {
|
9787
9868
|
var _getChildren = $b013befce1f6217f$var$getChildren(popper), box = _getChildren.box, content = _getChildren.content, arrow = _getChildren.arrow;
|
@@ -9832,10 +9913,10 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
9832
9913
|
var currentTarget; // ===========================================================================
|
9833
9914
|
// 🔑 Public members
|
9834
9915
|
// ===========================================================================
|
9835
|
-
var
|
9916
|
+
var id = $b013befce1f6217f$var$idCounter++;
|
9836
9917
|
var popperInstance = null;
|
9837
9918
|
var plugins = $b013befce1f6217f$var$unique(props.plugins);
|
9838
|
-
var
|
9919
|
+
var state = {
|
9839
9920
|
// Is the instance currently enabled?
|
9840
9921
|
isEnabled: true,
|
9841
9922
|
// Is the tippy currently showing and not transitioning out?
|
@@ -9847,19 +9928,19 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
9847
9928
|
// Has the tippy finished transitioning in?
|
9848
9929
|
isShown: false
|
9849
9930
|
};
|
9850
|
-
var
|
9931
|
+
var instance = {
|
9851
9932
|
// properties
|
9852
|
-
id:
|
9933
|
+
id: id,
|
9853
9934
|
reference: reference,
|
9854
9935
|
popper: $b013befce1f6217f$var$div(),
|
9855
9936
|
popperInstance: popperInstance,
|
9856
9937
|
props: props,
|
9857
|
-
state:
|
9938
|
+
state: state,
|
9858
9939
|
plugins: plugins,
|
9859
9940
|
// methods
|
9860
9941
|
clearDelayTimeouts: clearDelayTimeouts,
|
9861
9942
|
setProps: setProps,
|
9862
|
-
setContent:
|
9943
|
+
setContent: setContent,
|
9863
9944
|
show: show,
|
9864
9945
|
hide: hide,
|
9865
9946
|
hideWithInteractivity: hideWithInteractivity,
|
@@ -9869,40 +9950,40 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
9869
9950
|
destroy: destroy
|
9870
9951
|
}; // TODO: Investigate why this early return causes a TDZ error in the tests —
|
9871
9952
|
// it doesn't seem to happen in the browser
|
9872
|
-
/* istanbul ignore if */ if (!props.render) return
|
9953
|
+
/* istanbul ignore if */ if (!props.render) return instance;
|
9873
9954
|
// ===========================================================================
|
9874
9955
|
// Initial mutations
|
9875
9956
|
// ===========================================================================
|
9876
|
-
var _props$render = props.render(
|
9877
|
-
|
9878
|
-
|
9879
|
-
|
9880
|
-
reference._tippy =
|
9881
|
-
|
9957
|
+
var _props$render = props.render(instance), popper = _props$render.popper, onUpdate = _props$render.onUpdate;
|
9958
|
+
popper.setAttribute("data-tippy-root", "");
|
9959
|
+
popper.id = "tippy-" + instance.id;
|
9960
|
+
instance.popper = popper;
|
9961
|
+
reference._tippy = instance;
|
9962
|
+
popper._tippy = instance;
|
9882
9963
|
var pluginsHooks = plugins.map(function(plugin) {
|
9883
|
-
return plugin.fn(
|
9964
|
+
return plugin.fn(instance);
|
9884
9965
|
});
|
9885
9966
|
var hasAriaExpanded = reference.hasAttribute("aria-expanded");
|
9886
9967
|
addListeners();
|
9887
9968
|
handleAriaExpandedAttribute();
|
9888
9969
|
handleStyles();
|
9889
9970
|
invokeHook("onCreate", [
|
9890
|
-
|
9971
|
+
instance
|
9891
9972
|
]);
|
9892
9973
|
if (props.showOnCreate) scheduleShow();
|
9893
9974
|
// Prevent a tippy with a delay from hiding if the cursor left then returned
|
9894
9975
|
// before it started hiding
|
9895
|
-
|
9896
|
-
if (
|
9976
|
+
popper.addEventListener("mouseenter", function() {
|
9977
|
+
if (instance.props.interactive && instance.state.isVisible) instance.clearDelayTimeouts();
|
9897
9978
|
});
|
9898
|
-
|
9899
|
-
if (
|
9979
|
+
popper.addEventListener("mouseleave", function() {
|
9980
|
+
if (instance.props.interactive && instance.props.trigger.indexOf("mouseenter") >= 0) getDocument().addEventListener("mousemove", debouncedOnMouseMove);
|
9900
9981
|
});
|
9901
|
-
return
|
9982
|
+
return instance; // ===========================================================================
|
9902
9983
|
// 🔒 Private methods
|
9903
9984
|
// ===========================================================================
|
9904
9985
|
function getNormalizedTouchSettings() {
|
9905
|
-
var touch =
|
9986
|
+
var touch = instance.props.touch;
|
9906
9987
|
return Array.isArray(touch) ? touch : [
|
9907
9988
|
touch,
|
9908
9989
|
0
|
@@ -9914,7 +9995,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
9914
9995
|
function getIsDefaultRenderFn() {
|
9915
9996
|
var _instance$props$rende;
|
9916
9997
|
// @ts-ignore
|
9917
|
-
return !!((_instance$props$rende =
|
9998
|
+
return !!((_instance$props$rende = instance.props.render) != null && _instance$props$rende.$$tippy);
|
9918
9999
|
}
|
9919
10000
|
function getCurrentTarget() {
|
9920
10001
|
return currentTarget || reference;
|
@@ -9924,23 +10005,23 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
9924
10005
|
return parent ? $b013befce1f6217f$var$getOwnerDocument(parent) : document;
|
9925
10006
|
}
|
9926
10007
|
function getDefaultTemplateChildren() {
|
9927
|
-
return $b013befce1f6217f$var$getChildren(
|
10008
|
+
return $b013befce1f6217f$var$getChildren(popper);
|
9928
10009
|
}
|
9929
10010
|
function getDelay(isShow) {
|
9930
10011
|
// For touch or keyboard input, force `0` delay for UX reasons
|
9931
10012
|
// Also if the instance is mounted but not visible (transitioning out),
|
9932
10013
|
// ignore delay
|
9933
|
-
if (
|
10014
|
+
if (instance.state.isMounted && !instance.state.isVisible || $b013befce1f6217f$var$currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === "focus") {
|
9934
10015
|
return 0;
|
9935
10016
|
}
|
9936
|
-
return $b013befce1f6217f$var$getValueAtIndexOrReturn(
|
10017
|
+
return $b013befce1f6217f$var$getValueAtIndexOrReturn(instance.props.delay, isShow ? 0 : 1, $b013befce1f6217f$var$defaultProps.delay);
|
9937
10018
|
}
|
9938
10019
|
function handleStyles(fromHide) {
|
9939
10020
|
if (fromHide === void 0) {
|
9940
10021
|
fromHide = false;
|
9941
10022
|
}
|
9942
|
-
|
9943
|
-
|
10023
|
+
popper.style.pointerEvents = instance.props.interactive && !fromHide ? "" : "none";
|
10024
|
+
popper.style.zIndex = "" + instance.props.zIndex;
|
9944
10025
|
}
|
9945
10026
|
function invokeHook(hook, args, shouldInvokePropsHook) {
|
9946
10027
|
if (shouldInvokePropsHook === void 0) {
|
@@ -9953,20 +10034,20 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
9953
10034
|
});
|
9954
10035
|
if (shouldInvokePropsHook) {
|
9955
10036
|
var _instance$props;
|
9956
|
-
(_instance$props =
|
10037
|
+
(_instance$props = instance.props)[hook].apply(_instance$props, args);
|
9957
10038
|
}
|
9958
10039
|
}
|
9959
10040
|
function handleAriaContentAttribute() {
|
9960
|
-
var aria =
|
10041
|
+
var aria = instance.props.aria;
|
9961
10042
|
if (!aria.content) {
|
9962
10043
|
return;
|
9963
10044
|
}
|
9964
10045
|
var attr = "aria-" + aria.content;
|
9965
|
-
var id =
|
9966
|
-
var nodes = $b013befce1f6217f$var$normalizeToArray(
|
10046
|
+
var id = popper.id;
|
10047
|
+
var nodes = $b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference);
|
9967
10048
|
nodes.forEach(function(node) {
|
9968
10049
|
var currentValue = node.getAttribute(attr);
|
9969
|
-
if (
|
10050
|
+
if (instance.state.isVisible) {
|
9970
10051
|
node.setAttribute(attr, currentValue ? currentValue + " " + id : id);
|
9971
10052
|
} else {
|
9972
10053
|
var nextValue = currentValue && currentValue.replace(id, "").trim();
|
@@ -9979,13 +10060,13 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
9979
10060
|
});
|
9980
10061
|
}
|
9981
10062
|
function handleAriaExpandedAttribute() {
|
9982
|
-
if (hasAriaExpanded || !
|
10063
|
+
if (hasAriaExpanded || !instance.props.aria.expanded) {
|
9983
10064
|
return;
|
9984
10065
|
}
|
9985
|
-
var nodes = $b013befce1f6217f$var$normalizeToArray(
|
10066
|
+
var nodes = $b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference);
|
9986
10067
|
nodes.forEach(function(node) {
|
9987
|
-
if (
|
9988
|
-
node.setAttribute("aria-expanded",
|
10068
|
+
if (instance.props.interactive) {
|
10069
|
+
node.setAttribute("aria-expanded", instance.state.isVisible && node === getCurrentTarget() ? "true" : "false");
|
9989
10070
|
} else {
|
9990
10071
|
node.removeAttribute("aria-expanded");
|
9991
10072
|
}
|
@@ -10005,27 +10086,27 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10005
10086
|
}
|
10006
10087
|
}
|
10007
10088
|
var actualTarget = event.composedPath && event.composedPath()[0] || event.target; // Clicked on interactive popper
|
10008
|
-
if (
|
10089
|
+
if (instance.props.interactive && $b013befce1f6217f$var$actualContains(popper, actualTarget)) {
|
10009
10090
|
return;
|
10010
10091
|
} // Clicked on the event listeners target
|
10011
|
-
if ($b013befce1f6217f$var$normalizeToArray(
|
10092
|
+
if ($b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference).some(function(el) {
|
10012
10093
|
return $b013befce1f6217f$var$actualContains(el, actualTarget);
|
10013
10094
|
})) {
|
10014
10095
|
if ($b013befce1f6217f$var$currentInput.isTouch) {
|
10015
10096
|
return;
|
10016
10097
|
}
|
10017
|
-
if (
|
10098
|
+
if (instance.state.isVisible && instance.props.trigger.indexOf("click") >= 0) {
|
10018
10099
|
return;
|
10019
10100
|
}
|
10020
10101
|
} else {
|
10021
10102
|
invokeHook("onClickOutside", [
|
10022
|
-
|
10103
|
+
instance,
|
10023
10104
|
event
|
10024
10105
|
]);
|
10025
10106
|
}
|
10026
|
-
if (
|
10027
|
-
|
10028
|
-
|
10107
|
+
if (instance.props.hideOnClick === true) {
|
10108
|
+
instance.clearDelayTimeouts();
|
10109
|
+
instance.hide(); // `mousedown` event is fired right before `focus` if pressing the
|
10029
10110
|
// currentTarget. This lets a tippy with `focus` trigger know that it
|
10030
10111
|
// should not show
|
10031
10112
|
didHideDueToDocumentMouseDown = true;
|
@@ -10034,7 +10115,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10034
10115
|
}); // The listener gets added in `scheduleShow()`, but this may be hiding it
|
10035
10116
|
// before it shows, and hide()'s early bail-out behavior can prevent it
|
10036
10117
|
// from being cleaned up
|
10037
|
-
if (!
|
10118
|
+
if (!instance.state.isMounted) {
|
10038
10119
|
removeDocumentPress();
|
10039
10120
|
}
|
10040
10121
|
}
|
@@ -10061,7 +10142,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10061
10142
|
}
|
10062
10143
|
function onTransitionedOut(duration, callback) {
|
10063
10144
|
onTransitionEnd(duration, function() {
|
10064
|
-
if (!
|
10145
|
+
if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {
|
10065
10146
|
callback();
|
10066
10147
|
}
|
10067
10148
|
});
|
@@ -10089,7 +10170,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10089
10170
|
if (options === void 0) {
|
10090
10171
|
options = false;
|
10091
10172
|
}
|
10092
|
-
var nodes = $b013befce1f6217f$var$normalizeToArray(
|
10173
|
+
var nodes = $b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference);
|
10093
10174
|
nodes.forEach(function(node) {
|
10094
10175
|
node.addEventListener(eventType, handler, options);
|
10095
10176
|
listeners.push({
|
@@ -10109,7 +10190,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10109
10190
|
passive: true
|
10110
10191
|
});
|
10111
10192
|
}
|
10112
|
-
$b013befce1f6217f$var$splitBySpaces(
|
10193
|
+
$b013befce1f6217f$var$splitBySpaces(instance.props.trigger).forEach(function(eventType) {
|
10113
10194
|
if (eventType === "manual") {
|
10114
10195
|
return;
|
10115
10196
|
}
|
@@ -10137,14 +10218,14 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10137
10218
|
function onTrigger(event) {
|
10138
10219
|
var _lastTriggerEvent;
|
10139
10220
|
var shouldScheduleClickHide = false;
|
10140
|
-
if (!
|
10221
|
+
if (!instance.state.isEnabled || isEventListenerStopped(event) || didHideDueToDocumentMouseDown) {
|
10141
10222
|
return;
|
10142
10223
|
}
|
10143
10224
|
var wasFocused = ((_lastTriggerEvent = lastTriggerEvent) == null ? void 0 : _lastTriggerEvent.type) === "focus";
|
10144
10225
|
lastTriggerEvent = event;
|
10145
10226
|
currentTarget = event.currentTarget;
|
10146
10227
|
handleAriaExpandedAttribute();
|
10147
|
-
if (!
|
10228
|
+
if (!instance.state.isVisible && $b013befce1f6217f$var$isMouseEvent(event)) {
|
10148
10229
|
// If scrolling, `mouseenter` events can be fired if the cursor lands
|
10149
10230
|
// over a new target, but `mousemove` events don't get fired. This
|
10150
10231
|
// causes interactive tooltips to get stuck open until the cursor is
|
@@ -10153,7 +10234,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10153
10234
|
return listener(event);
|
10154
10235
|
});
|
10155
10236
|
} // Toggle show/hide when clicking click-triggered tooltips
|
10156
|
-
if (event.type === "click" && (
|
10237
|
+
if (event.type === "click" && (instance.props.trigger.indexOf("mouseenter") < 0 || isVisibleFromClick) && instance.props.hideOnClick !== false && instance.state.isVisible) {
|
10157
10238
|
shouldScheduleClickHide = true;
|
10158
10239
|
} else {
|
10159
10240
|
scheduleShow(event);
|
@@ -10167,11 +10248,11 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10167
10248
|
}
|
10168
10249
|
function onMouseMove(event) {
|
10169
10250
|
var target = event.target;
|
10170
|
-
var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) ||
|
10251
|
+
var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) || popper.contains(target);
|
10171
10252
|
if (event.type === "mousemove" && isCursorOverReferenceOrPopper) {
|
10172
10253
|
return;
|
10173
10254
|
}
|
10174
|
-
var popperTreeData = getNestedPopperTree().concat(
|
10255
|
+
var popperTreeData = getNestedPopperTree().concat(popper).map(function(popper) {
|
10175
10256
|
var _instance$popperInsta;
|
10176
10257
|
var instance = popper._tippy;
|
10177
10258
|
var state = (_instance$popperInsta = instance.popperInstance) == null ? void 0 : _instance$popperInsta.state;
|
@@ -10190,21 +10271,21 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10190
10271
|
}
|
10191
10272
|
}
|
10192
10273
|
function onMouseLeave(event) {
|
10193
|
-
var shouldBail = isEventListenerStopped(event) ||
|
10274
|
+
var shouldBail = isEventListenerStopped(event) || instance.props.trigger.indexOf("click") >= 0 && isVisibleFromClick;
|
10194
10275
|
if (shouldBail) {
|
10195
10276
|
return;
|
10196
10277
|
}
|
10197
|
-
if (
|
10198
|
-
|
10278
|
+
if (instance.props.interactive) {
|
10279
|
+
instance.hideWithInteractivity(event);
|
10199
10280
|
return;
|
10200
10281
|
}
|
10201
10282
|
scheduleHide(event);
|
10202
10283
|
}
|
10203
10284
|
function onBlurOrFocusOut(event) {
|
10204
|
-
if (
|
10285
|
+
if (instance.props.trigger.indexOf("focusin") < 0 && event.target !== getCurrentTarget()) {
|
10205
10286
|
return;
|
10206
10287
|
} // If focus was moved to within the popper
|
10207
|
-
if (
|
10288
|
+
if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {
|
10208
10289
|
return;
|
10209
10290
|
}
|
10210
10291
|
scheduleHide(event);
|
@@ -10214,8 +10295,8 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10214
10295
|
}
|
10215
10296
|
function createPopperInstance() {
|
10216
10297
|
destroyPopperInstance();
|
10217
|
-
var _instance$props2 =
|
10218
|
-
var arrow = getIsDefaultRenderFn() ? $b013befce1f6217f$var$getChildren(
|
10298
|
+
var _instance$props2 = instance.props, popperOptions = _instance$props2.popperOptions, placement = _instance$props2.placement, offset = _instance$props2.offset, getReferenceClientRect = _instance$props2.getReferenceClientRect, moveTransition = _instance$props2.moveTransition;
|
10299
|
+
var arrow = getIsDefaultRenderFn() ? $b013befce1f6217f$var$getChildren(popper).arrow : null;
|
10219
10300
|
var computedReference = getReferenceClientRect ? {
|
10220
10301
|
getBoundingClientRect: getReferenceClientRect,
|
10221
10302
|
contextElement: getReferenceClientRect.contextElement || getCurrentTarget()
|
@@ -10292,27 +10373,27 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10292
10373
|
});
|
10293
10374
|
}
|
10294
10375
|
modifiers.push.apply(modifiers, (popperOptions == null ? void 0 : popperOptions.modifiers) || []);
|
10295
|
-
|
10376
|
+
instance.popperInstance = (0, $d3ca9c4a635d8f8b$export$8f7491d57c8f97a9)(computedReference, popper, Object.assign({}, popperOptions, {
|
10296
10377
|
placement: placement,
|
10297
10378
|
onFirstUpdate: onFirstUpdate,
|
10298
10379
|
modifiers: modifiers
|
10299
10380
|
}));
|
10300
10381
|
}
|
10301
10382
|
function destroyPopperInstance() {
|
10302
|
-
if (
|
10303
|
-
|
10304
|
-
|
10383
|
+
if (instance.popperInstance) {
|
10384
|
+
instance.popperInstance.destroy();
|
10385
|
+
instance.popperInstance = null;
|
10305
10386
|
}
|
10306
10387
|
}
|
10307
10388
|
function mount() {
|
10308
|
-
var appendTo =
|
10389
|
+
var appendTo = instance.props.appendTo;
|
10309
10390
|
var parentNode; // By default, we'll append the popper to the triggerTargets's parentNode so
|
10310
10391
|
// it's directly after the reference element so the elements inside the
|
10311
10392
|
// tippy can be tabbed to
|
10312
10393
|
// If there are clipping issues, the user can specify a different appendTo
|
10313
10394
|
// and ensure focus management is handled correctly manually
|
10314
10395
|
var node = getCurrentTarget();
|
10315
|
-
if (
|
10396
|
+
if (instance.props.interactive && appendTo === $b013befce1f6217f$var$TIPPY_DEFAULT_APPEND_TO || appendTo === "parent") {
|
10316
10397
|
parentNode = node.parentNode;
|
10317
10398
|
} else {
|
10318
10399
|
parentNode = $b013befce1f6217f$var$invokeWithArgsOrReturn(appendTo, [
|
@@ -10320,14 +10401,14 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10320
10401
|
]);
|
10321
10402
|
} // The popper element needs to exist on the DOM before its position can be
|
10322
10403
|
// updated as Popper needs to read its dimensions
|
10323
|
-
if (!parentNode.contains(
|
10324
|
-
parentNode.appendChild(
|
10404
|
+
if (!parentNode.contains(popper)) {
|
10405
|
+
parentNode.appendChild(popper);
|
10325
10406
|
}
|
10326
|
-
|
10407
|
+
instance.state.isMounted = true;
|
10327
10408
|
createPopperInstance();
|
10328
10409
|
/* istanbul ignore else */ if (false) {
|
10329
10410
|
// Accessibility check
|
10330
|
-
$b013befce1f6217f$var$warnWhen(
|
10411
|
+
$b013befce1f6217f$var$warnWhen(instance.props.interactive && appendTo === $b013befce1f6217f$var$defaultProps.appendTo && node.nextElementSibling !== popper, [
|
10331
10412
|
"Interactive tippy element may not be accessible via keyboard",
|
10332
10413
|
"navigation because it is not directly after the reference element",
|
10333
10414
|
"in the DOM source order.",
|
@@ -10344,13 +10425,13 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10344
10425
|
}
|
10345
10426
|
}
|
10346
10427
|
function getNestedPopperTree() {
|
10347
|
-
return $b013befce1f6217f$var$arrayFrom(
|
10428
|
+
return $b013befce1f6217f$var$arrayFrom(popper.querySelectorAll("[data-tippy-root]"));
|
10348
10429
|
}
|
10349
10430
|
function scheduleShow(event) {
|
10350
|
-
|
10431
|
+
instance.clearDelayTimeouts();
|
10351
10432
|
if (event) {
|
10352
10433
|
invokeHook("onTrigger", [
|
10353
|
-
|
10434
|
+
instance,
|
10354
10435
|
event
|
10355
10436
|
]);
|
10356
10437
|
}
|
@@ -10362,26 +10443,26 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10362
10443
|
}
|
10363
10444
|
if (delay) {
|
10364
10445
|
showTimeout = setTimeout(function() {
|
10365
|
-
|
10446
|
+
instance.show();
|
10366
10447
|
}, delay);
|
10367
10448
|
} else {
|
10368
|
-
|
10449
|
+
instance.show();
|
10369
10450
|
}
|
10370
10451
|
}
|
10371
10452
|
function scheduleHide(event) {
|
10372
|
-
|
10453
|
+
instance.clearDelayTimeouts();
|
10373
10454
|
invokeHook("onUntrigger", [
|
10374
|
-
|
10455
|
+
instance,
|
10375
10456
|
event
|
10376
10457
|
]);
|
10377
|
-
if (!
|
10458
|
+
if (!instance.state.isVisible) {
|
10378
10459
|
removeDocumentPress();
|
10379
10460
|
return;
|
10380
10461
|
} // For interactive tippies, scheduleHide is added to a document.body handler
|
10381
10462
|
// from onMouseLeave so must intercept scheduled hides from mousemove/leave
|
10382
10463
|
// events when trigger contains mouseenter and click, and the tip is
|
10383
10464
|
// currently shown as a result of a click.
|
10384
|
-
if (
|
10465
|
+
if (instance.props.trigger.indexOf("mouseenter") >= 0 && instance.props.trigger.indexOf("click") >= 0 && [
|
10385
10466
|
"mouseleave",
|
10386
10467
|
"mousemove"
|
10387
10468
|
].indexOf(event.type) >= 0 && isVisibleFromClick) {
|
@@ -10390,28 +10471,28 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10390
10471
|
var delay = getDelay(false);
|
10391
10472
|
if (delay) {
|
10392
10473
|
hideTimeout = setTimeout(function() {
|
10393
|
-
if (
|
10394
|
-
|
10474
|
+
if (instance.state.isVisible) {
|
10475
|
+
instance.hide();
|
10395
10476
|
}
|
10396
10477
|
}, delay);
|
10397
10478
|
} else {
|
10398
10479
|
// Fixes a `transitionend` problem when it fires 1 frame too
|
10399
10480
|
// late sometimes, we don't want hide() to be called.
|
10400
10481
|
scheduleHideAnimationFrame = requestAnimationFrame(function() {
|
10401
|
-
|
10482
|
+
instance.hide();
|
10402
10483
|
});
|
10403
10484
|
}
|
10404
10485
|
} // ===========================================================================
|
10405
10486
|
// 🔑 Public methods
|
10406
10487
|
// ===========================================================================
|
10407
10488
|
function enable() {
|
10408
|
-
|
10489
|
+
instance.state.isEnabled = true;
|
10409
10490
|
}
|
10410
10491
|
function disable() {
|
10411
10492
|
// Disabling the instance should also hide it
|
10412
10493
|
// https://github.com/atomiks/tippy.js-react/issues/106
|
10413
|
-
|
10414
|
-
|
10494
|
+
instance.hide();
|
10495
|
+
instance.state.isEnabled = false;
|
10415
10496
|
}
|
10416
10497
|
function clearDelayTimeouts() {
|
10417
10498
|
clearTimeout(showTimeout);
|
@@ -10420,21 +10501,21 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10420
10501
|
}
|
10421
10502
|
function setProps(partialProps) {
|
10422
10503
|
/* istanbul ignore else */ if (false) {
|
10423
|
-
$b013befce1f6217f$var$warnWhen(
|
10504
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("setProps"));
|
10424
10505
|
}
|
10425
|
-
if (
|
10506
|
+
if (instance.state.isDestroyed) {
|
10426
10507
|
return;
|
10427
10508
|
}
|
10428
10509
|
invokeHook("onBeforeUpdate", [
|
10429
|
-
|
10510
|
+
instance,
|
10430
10511
|
partialProps
|
10431
10512
|
]);
|
10432
10513
|
removeListeners();
|
10433
|
-
var prevProps =
|
10514
|
+
var prevProps = instance.props;
|
10434
10515
|
var nextProps = $b013befce1f6217f$var$evaluateProps(reference, Object.assign({}, prevProps, $b013befce1f6217f$var$removeUndefinedProps(partialProps), {
|
10435
10516
|
ignoreAttributes: true
|
10436
10517
|
}));
|
10437
|
-
|
10518
|
+
instance.props = nextProps;
|
10438
10519
|
addListeners();
|
10439
10520
|
if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
|
10440
10521
|
cleanupInteractiveMouseListeners();
|
@@ -10452,7 +10533,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10452
10533
|
if (onUpdate) {
|
10453
10534
|
onUpdate(prevProps, nextProps);
|
10454
10535
|
}
|
10455
|
-
if (
|
10536
|
+
if (instance.popperInstance) {
|
10456
10537
|
createPopperInstance(); // Fixes an issue with nested tippies if they are all getting re-rendered,
|
10457
10538
|
// and the nested ones get re-rendered first.
|
10458
10539
|
// https://github.com/atomiks/tippyjs-react/issues/177
|
@@ -10464,24 +10545,24 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10464
10545
|
});
|
10465
10546
|
}
|
10466
10547
|
invokeHook("onAfterUpdate", [
|
10467
|
-
|
10548
|
+
instance,
|
10468
10549
|
partialProps
|
10469
10550
|
]);
|
10470
10551
|
}
|
10471
|
-
function
|
10472
|
-
|
10552
|
+
function setContent(content) {
|
10553
|
+
instance.setProps({
|
10473
10554
|
content: content
|
10474
10555
|
});
|
10475
10556
|
}
|
10476
10557
|
function show() {
|
10477
10558
|
/* istanbul ignore else */ if (false) {
|
10478
|
-
$b013befce1f6217f$var$warnWhen(
|
10559
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("show"));
|
10479
10560
|
} // Early bail-out
|
10480
|
-
var isAlreadyVisible =
|
10481
|
-
var isDestroyed =
|
10482
|
-
var isDisabled = !
|
10483
|
-
var isTouchAndTouchDisabled = $b013befce1f6217f$var$currentInput.isTouch && !
|
10484
|
-
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(
|
10561
|
+
var isAlreadyVisible = instance.state.isVisible;
|
10562
|
+
var isDestroyed = instance.state.isDestroyed;
|
10563
|
+
var isDisabled = !instance.state.isEnabled;
|
10564
|
+
var isTouchAndTouchDisabled = $b013befce1f6217f$var$currentInput.isTouch && !instance.props.touch;
|
10565
|
+
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(instance.props.duration, 0, $b013befce1f6217f$var$defaultProps.duration);
|
10485
10566
|
if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
|
10486
10567
|
return;
|
10487
10568
|
} // Normalize `disabled` behavior across browsers.
|
@@ -10491,19 +10572,19 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10491
10572
|
return;
|
10492
10573
|
}
|
10493
10574
|
invokeHook("onShow", [
|
10494
|
-
|
10575
|
+
instance
|
10495
10576
|
], false);
|
10496
|
-
if (
|
10577
|
+
if (instance.props.onShow(instance) === false) {
|
10497
10578
|
return;
|
10498
10579
|
}
|
10499
|
-
|
10580
|
+
instance.state.isVisible = true;
|
10500
10581
|
if (getIsDefaultRenderFn()) {
|
10501
|
-
|
10582
|
+
popper.style.visibility = "visible";
|
10502
10583
|
}
|
10503
10584
|
handleStyles();
|
10504
10585
|
addDocumentPress();
|
10505
|
-
if (!
|
10506
|
-
|
10586
|
+
if (!instance.state.isMounted) {
|
10587
|
+
popper.style.transition = "none";
|
10507
10588
|
} // If flipping to the opposite side after hiding at least once, the
|
10508
10589
|
// animation will use the wrong placement without resetting the duration
|
10509
10590
|
if (getIsDefaultRenderFn()) {
|
@@ -10515,13 +10596,13 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10515
10596
|
}
|
10516
10597
|
onFirstUpdate = function onFirstUpdate() {
|
10517
10598
|
var _instance$popperInsta2;
|
10518
|
-
if (!
|
10599
|
+
if (!instance.state.isVisible || ignoreOnFirstUpdate) {
|
10519
10600
|
return;
|
10520
10601
|
}
|
10521
10602
|
ignoreOnFirstUpdate = true; // reflow
|
10522
|
-
void
|
10523
|
-
|
10524
|
-
if (getIsDefaultRenderFn() &&
|
10603
|
+
void popper.offsetHeight;
|
10604
|
+
popper.style.transition = instance.props.moveTransition;
|
10605
|
+
if (getIsDefaultRenderFn() && instance.props.animation) {
|
10525
10606
|
var _getDefaultTemplateCh3 = getDefaultTemplateChildren(), _box = _getDefaultTemplateCh3.box, _content = _getDefaultTemplateCh3.content;
|
10526
10607
|
$b013befce1f6217f$var$setTransitionDuration([
|
10527
10608
|
_box,
|
@@ -10534,17 +10615,17 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10534
10615
|
}
|
10535
10616
|
handleAriaContentAttribute();
|
10536
10617
|
handleAriaExpandedAttribute();
|
10537
|
-
$b013befce1f6217f$var$pushIfUnique($b013befce1f6217f$var$mountedInstances,
|
10618
|
+
$b013befce1f6217f$var$pushIfUnique($b013befce1f6217f$var$mountedInstances, instance); // certain modifiers (e.g. `maxSize`) require a second update after the
|
10538
10619
|
// popper has been positioned for the first time
|
10539
|
-
(_instance$popperInsta2 =
|
10620
|
+
(_instance$popperInsta2 = instance.popperInstance) == null ? void 0 : _instance$popperInsta2.forceUpdate();
|
10540
10621
|
invokeHook("onMount", [
|
10541
|
-
|
10622
|
+
instance
|
10542
10623
|
]);
|
10543
|
-
if (
|
10624
|
+
if (instance.props.animation && getIsDefaultRenderFn()) {
|
10544
10625
|
onTransitionedIn(duration, function() {
|
10545
|
-
|
10626
|
+
instance.state.isShown = true;
|
10546
10627
|
invokeHook("onShown", [
|
10547
|
-
|
10628
|
+
instance
|
10548
10629
|
]);
|
10549
10630
|
});
|
10550
10631
|
}
|
@@ -10553,34 +10634,34 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10553
10634
|
}
|
10554
10635
|
function hide() {
|
10555
10636
|
/* istanbul ignore else */ if (false) {
|
10556
|
-
$b013befce1f6217f$var$warnWhen(
|
10637
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("hide"));
|
10557
10638
|
} // Early bail-out
|
10558
|
-
var isAlreadyHidden = !
|
10559
|
-
var isDestroyed =
|
10560
|
-
var isDisabled = !
|
10561
|
-
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(
|
10639
|
+
var isAlreadyHidden = !instance.state.isVisible;
|
10640
|
+
var isDestroyed = instance.state.isDestroyed;
|
10641
|
+
var isDisabled = !instance.state.isEnabled;
|
10642
|
+
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(instance.props.duration, 1, $b013befce1f6217f$var$defaultProps.duration);
|
10562
10643
|
if (isAlreadyHidden || isDestroyed || isDisabled) {
|
10563
10644
|
return;
|
10564
10645
|
}
|
10565
10646
|
invokeHook("onHide", [
|
10566
|
-
|
10647
|
+
instance
|
10567
10648
|
], false);
|
10568
|
-
if (
|
10649
|
+
if (instance.props.onHide(instance) === false) {
|
10569
10650
|
return;
|
10570
10651
|
}
|
10571
|
-
|
10572
|
-
|
10652
|
+
instance.state.isVisible = false;
|
10653
|
+
instance.state.isShown = false;
|
10573
10654
|
ignoreOnFirstUpdate = false;
|
10574
10655
|
isVisibleFromClick = false;
|
10575
10656
|
if (getIsDefaultRenderFn()) {
|
10576
|
-
|
10657
|
+
popper.style.visibility = "hidden";
|
10577
10658
|
}
|
10578
10659
|
cleanupInteractiveMouseListeners();
|
10579
10660
|
removeDocumentPress();
|
10580
10661
|
handleStyles(true);
|
10581
10662
|
if (getIsDefaultRenderFn()) {
|
10582
10663
|
var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content = _getDefaultTemplateCh4.content;
|
10583
|
-
if (
|
10664
|
+
if (instance.props.animation) {
|
10584
10665
|
$b013befce1f6217f$var$setTransitionDuration([
|
10585
10666
|
box,
|
10586
10667
|
content
|
@@ -10593,17 +10674,17 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10593
10674
|
}
|
10594
10675
|
handleAriaContentAttribute();
|
10595
10676
|
handleAriaExpandedAttribute();
|
10596
|
-
if (
|
10677
|
+
if (instance.props.animation) {
|
10597
10678
|
if (getIsDefaultRenderFn()) {
|
10598
|
-
onTransitionedOut(duration,
|
10679
|
+
onTransitionedOut(duration, instance.unmount);
|
10599
10680
|
}
|
10600
10681
|
} else {
|
10601
|
-
|
10682
|
+
instance.unmount();
|
10602
10683
|
}
|
10603
10684
|
}
|
10604
10685
|
function hideWithInteractivity(event) {
|
10605
10686
|
/* istanbul ignore else */ if (false) {
|
10606
|
-
$b013befce1f6217f$var$warnWhen(
|
10687
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("hideWithInteractivity"));
|
10607
10688
|
}
|
10608
10689
|
getDocument().addEventListener("mousemove", debouncedOnMouseMove);
|
10609
10690
|
$b013befce1f6217f$var$pushIfUnique($b013befce1f6217f$var$mouseMoveListeners, debouncedOnMouseMove);
|
@@ -10611,12 +10692,12 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10611
10692
|
}
|
10612
10693
|
function unmount() {
|
10613
10694
|
/* istanbul ignore else */ if (false) {
|
10614
|
-
$b013befce1f6217f$var$warnWhen(
|
10695
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("unmount"));
|
10615
10696
|
}
|
10616
|
-
if (
|
10617
|
-
|
10697
|
+
if (instance.state.isVisible) {
|
10698
|
+
instance.hide();
|
10618
10699
|
}
|
10619
|
-
if (!
|
10700
|
+
if (!instance.state.isMounted) {
|
10620
10701
|
return;
|
10621
10702
|
}
|
10622
10703
|
destroyPopperInstance(); // If a popper is not interactive, it will be appended outside the popper
|
@@ -10625,31 +10706,31 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
10625
10706
|
getNestedPopperTree().forEach(function(nestedPopper) {
|
10626
10707
|
nestedPopper._tippy.unmount();
|
10627
10708
|
});
|
10628
|
-
if (
|
10629
|
-
|
10709
|
+
if (popper.parentNode) {
|
10710
|
+
popper.parentNode.removeChild(popper);
|
10630
10711
|
}
|
10631
10712
|
$b013befce1f6217f$var$mountedInstances = $b013befce1f6217f$var$mountedInstances.filter(function(i) {
|
10632
|
-
return i !==
|
10713
|
+
return i !== instance;
|
10633
10714
|
});
|
10634
|
-
|
10715
|
+
instance.state.isMounted = false;
|
10635
10716
|
invokeHook("onHidden", [
|
10636
|
-
|
10717
|
+
instance
|
10637
10718
|
]);
|
10638
10719
|
}
|
10639
10720
|
function destroy() {
|
10640
10721
|
/* istanbul ignore else */ if (false) {
|
10641
|
-
$b013befce1f6217f$var$warnWhen(
|
10722
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("destroy"));
|
10642
10723
|
}
|
10643
|
-
if (
|
10724
|
+
if (instance.state.isDestroyed) {
|
10644
10725
|
return;
|
10645
10726
|
}
|
10646
|
-
|
10647
|
-
|
10727
|
+
instance.clearDelayTimeouts();
|
10728
|
+
instance.unmount();
|
10648
10729
|
removeListeners();
|
10649
10730
|
delete reference._tippy;
|
10650
|
-
|
10731
|
+
instance.state.isDestroyed = true;
|
10651
10732
|
invokeHook("onDestroy", [
|
10652
|
-
|
10733
|
+
instance
|
10653
10734
|
]);
|
10654
10735
|
}
|
10655
10736
|
}
|
@@ -10799,7 +10880,7 @@ var $b013befce1f6217f$export$374c483667c1ea9b = function createSingleton(tippyIn
|
|
10799
10880
|
};
|
10800
10881
|
}
|
10801
10882
|
};
|
10802
|
-
var
|
10883
|
+
var singleton = $b013befce1f6217f$var$tippy($b013befce1f6217f$var$div(), Object.assign({}, $b013befce1f6217f$var$removeProperties(optionalProps, [
|
10803
10884
|
"overrides"
|
10804
10885
|
]), {
|
10805
10886
|
plugins: [
|
@@ -10812,42 +10893,42 @@ var $b013befce1f6217f$export$374c483667c1ea9b = function createSingleton(tippyIn
|
|
10812
10893
|
])
|
10813
10894
|
})
|
10814
10895
|
}));
|
10815
|
-
var originalShow =
|
10816
|
-
|
10896
|
+
var originalShow = singleton.show;
|
10897
|
+
singleton.show = function(target) {
|
10817
10898
|
originalShow(); // first time, showOnCreate or programmatic call with no params
|
10818
10899
|
// default to showing first instance
|
10819
|
-
if (!currentTarget && target == null) return prepareInstance(
|
10900
|
+
if (!currentTarget && target == null) return prepareInstance(singleton, references[0]);
|
10820
10901
|
// triggered from event (do nothing as prepareInstance already called by onTrigger)
|
10821
10902
|
// programmatic call with no params when already visible (do nothing again)
|
10822
10903
|
if (currentTarget && target == null) return;
|
10823
10904
|
// target is index of instance
|
10824
|
-
if (typeof target === "number") return references[target] && prepareInstance(
|
10905
|
+
if (typeof target === "number") return references[target] && prepareInstance(singleton, references[target]);
|
10825
10906
|
// target is a child tippy instance
|
10826
10907
|
if (individualInstances.indexOf(target) >= 0) {
|
10827
10908
|
var ref = target.reference;
|
10828
|
-
return prepareInstance(
|
10909
|
+
return prepareInstance(singleton, ref);
|
10829
10910
|
} // target is a ReferenceElement
|
10830
|
-
if (references.indexOf(target) >= 0) return prepareInstance(
|
10911
|
+
if (references.indexOf(target) >= 0) return prepareInstance(singleton, target);
|
10831
10912
|
};
|
10832
|
-
|
10913
|
+
singleton.showNext = function() {
|
10833
10914
|
var first = references[0];
|
10834
|
-
if (!currentTarget) return
|
10915
|
+
if (!currentTarget) return singleton.show(0);
|
10835
10916
|
var index = references.indexOf(currentTarget);
|
10836
|
-
|
10917
|
+
singleton.show(references[index + 1] || first);
|
10837
10918
|
};
|
10838
|
-
|
10919
|
+
singleton.showPrevious = function() {
|
10839
10920
|
var last = references[references.length - 1];
|
10840
|
-
if (!currentTarget) return
|
10921
|
+
if (!currentTarget) return singleton.show(last);
|
10841
10922
|
var index = references.indexOf(currentTarget);
|
10842
10923
|
var target = references[index - 1] || last;
|
10843
|
-
|
10924
|
+
singleton.show(target);
|
10844
10925
|
};
|
10845
|
-
var
|
10846
|
-
|
10926
|
+
var originalSetProps = singleton.setProps;
|
10927
|
+
singleton.setProps = function(props) {
|
10847
10928
|
overrides = props.overrides || overrides;
|
10848
|
-
|
10929
|
+
originalSetProps(props);
|
10849
10930
|
};
|
10850
|
-
|
10931
|
+
singleton.setInstances = function(nextInstances) {
|
10851
10932
|
enableInstances(true);
|
10852
10933
|
interceptSetPropsCleanups.forEach(function(fn) {
|
10853
10934
|
return fn();
|
@@ -10856,13 +10937,13 @@ var $b013befce1f6217f$export$374c483667c1ea9b = function createSingleton(tippyIn
|
|
10856
10937
|
enableInstances(false);
|
10857
10938
|
setReferences();
|
10858
10939
|
setTriggerTargets();
|
10859
|
-
interceptSetPropsCleanups = interceptSetProps(
|
10860
|
-
|
10940
|
+
interceptSetPropsCleanups = interceptSetProps(singleton);
|
10941
|
+
singleton.setProps({
|
10861
10942
|
triggerTarget: triggerTargets
|
10862
10943
|
});
|
10863
10944
|
};
|
10864
|
-
interceptSetPropsCleanups = interceptSetProps(
|
10865
|
-
return
|
10945
|
+
interceptSetPropsCleanups = interceptSetProps(singleton);
|
10946
|
+
return singleton;
|
10866
10947
|
};
|
10867
10948
|
var $b013befce1f6217f$var$BUBBLING_EVENTS_MAP = {
|
10868
10949
|
mouseover: "mouseenter",
|
@@ -10930,11 +11011,11 @@ var $b013befce1f6217f$var$BUBBLING_EVENTS_MAP = {
|
|
10930
11011
|
});
|
10931
11012
|
listeners = [];
|
10932
11013
|
}
|
10933
|
-
function applyMutations(
|
10934
|
-
var originalDestroy =
|
10935
|
-
var originalEnable =
|
10936
|
-
var originalDisable =
|
10937
|
-
|
11014
|
+
function applyMutations(instance) {
|
11015
|
+
var originalDestroy = instance.destroy;
|
11016
|
+
var originalEnable = instance.enable;
|
11017
|
+
var originalDisable = instance.disable;
|
11018
|
+
instance.destroy = function(shouldDestroyChildInstances) {
|
10938
11019
|
if (shouldDestroyChildInstances === void 0) shouldDestroyChildInstances = true;
|
10939
11020
|
if (shouldDestroyChildInstances) childTippyInstances.forEach(function(instance) {
|
10940
11021
|
instance.destroy();
|
@@ -10943,21 +11024,21 @@ var $b013befce1f6217f$var$BUBBLING_EVENTS_MAP = {
|
|
10943
11024
|
removeEventListeners();
|
10944
11025
|
originalDestroy();
|
10945
11026
|
};
|
10946
|
-
|
11027
|
+
instance.enable = function() {
|
10947
11028
|
originalEnable();
|
10948
11029
|
childTippyInstances.forEach(function(instance) {
|
10949
11030
|
return instance.enable();
|
10950
11031
|
});
|
10951
11032
|
disabled = false;
|
10952
11033
|
};
|
10953
|
-
|
11034
|
+
instance.disable = function() {
|
10954
11035
|
originalDisable();
|
10955
11036
|
childTippyInstances.forEach(function(instance) {
|
10956
11037
|
return instance.disable();
|
10957
11038
|
});
|
10958
11039
|
disabled = true;
|
10959
11040
|
};
|
10960
|
-
addEventListeners(
|
11041
|
+
addEventListeners(instance);
|
10961
11042
|
}
|
10962
11043
|
normalizedReturnValue.forEach(applyMutations);
|
10963
11044
|
return returnValue;
|
@@ -11063,25 +11144,25 @@ var $b013befce1f6217f$export$ac81526b64504ab6 = {
|
|
11063
11144
|
// If the instance is interactive, avoid updating the position unless it's
|
11064
11145
|
// over the reference element
|
11065
11146
|
var isCursorOverReference = event.target ? reference.contains(event.target) : true;
|
11066
|
-
var
|
11147
|
+
var followCursor = instance.props.followCursor;
|
11067
11148
|
var clientX = event.clientX, clientY = event.clientY;
|
11068
|
-
var
|
11069
|
-
var relativeX = clientX -
|
11070
|
-
var relativeY = clientY -
|
11149
|
+
var rect = reference.getBoundingClientRect();
|
11150
|
+
var relativeX = clientX - rect.left;
|
11151
|
+
var relativeY = clientY - rect.top;
|
11071
11152
|
if (isCursorOverReference || !instance.props.interactive) instance.setProps({
|
11072
11153
|
// @ts-ignore - unneeded DOMRect properties
|
11073
11154
|
getReferenceClientRect: function getReferenceClientRect() {
|
11074
11155
|
var rect = reference.getBoundingClientRect();
|
11075
11156
|
var x = clientX;
|
11076
11157
|
var y = clientY;
|
11077
|
-
if (
|
11158
|
+
if (followCursor === "initial") {
|
11078
11159
|
x = rect.left + relativeX;
|
11079
11160
|
y = rect.top + relativeY;
|
11080
11161
|
}
|
11081
|
-
var top =
|
11082
|
-
var right =
|
11083
|
-
var bottom =
|
11084
|
-
var left =
|
11162
|
+
var top = followCursor === "horizontal" ? rect.top : y;
|
11163
|
+
var right = followCursor === "vertical" ? rect.right : x;
|
11164
|
+
var bottom = followCursor === "horizontal" ? rect.bottom : y;
|
11165
|
+
var left = followCursor === "vertical" ? rect.left : x;
|
11085
11166
|
return {
|
11086
11167
|
width: right - left,
|
11087
11168
|
height: bottom - top,
|
@@ -11117,11 +11198,11 @@ var $b013befce1f6217f$export$ac81526b64504ab6 = {
|
|
11117
11198
|
prevProps = instance.props;
|
11118
11199
|
},
|
11119
11200
|
onAfterUpdate: function onAfterUpdate(_, _ref2) {
|
11120
|
-
var
|
11201
|
+
var followCursor = _ref2.followCursor;
|
11121
11202
|
if (isInternalUpdate) return;
|
11122
|
-
if (
|
11203
|
+
if (followCursor !== undefined && prevProps.followCursor !== followCursor) {
|
11123
11204
|
destroy();
|
11124
|
-
if (
|
11205
|
+
if (followCursor) {
|
11125
11206
|
create();
|
11126
11207
|
if (instance.state.isMounted && !wasFocusEvent && !getIsInitialBehavior()) addListener();
|
11127
11208
|
} else {
|
@@ -11177,7 +11258,7 @@ var $b013befce1f6217f$export$e2b668424a9c728 = {
|
|
11177
11258
|
function isEnabled() {
|
11178
11259
|
return !!instance.props.inlinePositioning;
|
11179
11260
|
}
|
11180
|
-
var
|
11261
|
+
var placement;
|
11181
11262
|
var cursorRectIndex = -1;
|
11182
11263
|
var isInternalUpdate = false;
|
11183
11264
|
var triedPlacements = [];
|
@@ -11189,7 +11270,7 @@ var $b013befce1f6217f$export$e2b668424a9c728 = {
|
|
11189
11270
|
var state = _ref2.state;
|
11190
11271
|
if (isEnabled()) {
|
11191
11272
|
if (triedPlacements.indexOf(state.placement) !== -1) triedPlacements = [];
|
11192
|
-
if (
|
11273
|
+
if (placement !== state.placement && triedPlacements.indexOf(state.placement) === -1) {
|
11193
11274
|
triedPlacements.push(state.placement);
|
11194
11275
|
instance.setProps({
|
11195
11276
|
// @ts-ignore - unneeded DOMRect properties
|
@@ -11198,7 +11279,7 @@ var $b013befce1f6217f$export$e2b668424a9c728 = {
|
|
11198
11279
|
}
|
11199
11280
|
});
|
11200
11281
|
}
|
11201
|
-
|
11282
|
+
placement = state.placement;
|
11202
11283
|
}
|
11203
11284
|
}
|
11204
11285
|
};
|
@@ -11507,31 +11588,6 @@ function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
|
|
11507
11588
|
}
|
11508
11589
|
|
11509
11590
|
|
11510
|
-
var $e9904a14dabf652d$exports = {};
|
11511
|
-
|
11512
|
-
$parcel$defineInteropFlag($e9904a14dabf652d$exports);
|
11513
|
-
|
11514
|
-
$parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
|
11515
|
-
function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
11516
|
-
return {
|
11517
|
-
focussed: false,
|
11518
|
-
get active () {
|
11519
|
-
return store.active;
|
11520
|
-
},
|
11521
|
-
get text () {
|
11522
|
-
return store.text;
|
11523
|
-
},
|
11524
|
-
clear () {
|
11525
|
-
if (store.raw === "") this.$refs.input.blur();
|
11526
|
-
else store.raw = "";
|
11527
|
-
},
|
11528
|
-
focus () {
|
11529
|
-
this.$refs.input.focus();
|
11530
|
-
}
|
11531
|
-
};
|
11532
|
-
}
|
11533
|
-
|
11534
|
-
|
11535
11591
|
var $e1f51f020443edd4$exports = {};
|
11536
11592
|
|
11537
11593
|
$parcel$defineInteropFlag($e1f51f020443edd4$exports);
|
@@ -11634,11 +11690,11 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11634
11690
|
if (true === enabled && "object" === typeof window.console) // eslint-disable-next-line no-console
|
11635
11691
|
console[type](formatLogHeader(iframeId), msg);
|
11636
11692
|
}
|
11637
|
-
function iFrameListener(
|
11693
|
+
function iFrameListener(event) {
|
11638
11694
|
function resizeIFrame() {
|
11639
11695
|
function resize() {
|
11640
11696
|
setSize(messageData);
|
11641
|
-
setPagePosition(
|
11697
|
+
setPagePosition(iframeId);
|
11642
11698
|
on("onResized", messageData);
|
11643
11699
|
}
|
11644
11700
|
ensureInRange("Height");
|
@@ -11671,15 +11727,15 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11671
11727
|
return top + bot;
|
11672
11728
|
}
|
11673
11729
|
function ensureInRange(Dimension) {
|
11674
|
-
var max = Number(settings[
|
11675
|
-
log(
|
11730
|
+
var max = Number(settings[iframeId]["max" + Dimension]), min = Number(settings[iframeId]["min" + Dimension]), dimension = Dimension.toLowerCase(), size = Number(messageData[dimension]);
|
11731
|
+
log(iframeId, "Checking " + dimension + " is in range " + min + "-" + max);
|
11676
11732
|
if (size < min) {
|
11677
11733
|
size = min;
|
11678
|
-
log(
|
11734
|
+
log(iframeId, "Set " + dimension + " to min value");
|
11679
11735
|
}
|
11680
11736
|
if (size > max) {
|
11681
11737
|
size = max;
|
11682
|
-
log(
|
11738
|
+
log(iframeId, "Set " + dimension + " to max value");
|
11683
11739
|
}
|
11684
11740
|
messageData[dimension] = "" + size;
|
11685
11741
|
}
|
@@ -11687,7 +11743,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11687
11743
|
function checkAllowedOrigin() {
|
11688
11744
|
function checkList() {
|
11689
11745
|
var i = 0, retCode = false;
|
11690
|
-
log(
|
11746
|
+
log(iframeId, "Checking connection is from allowed list of origins: " + checkOrigin);
|
11691
11747
|
for(; i < checkOrigin.length; i++)if (checkOrigin[i] === origin) {
|
11692
11748
|
retCode = true;
|
11693
11749
|
break;
|
@@ -11695,14 +11751,14 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11695
11751
|
return retCode;
|
11696
11752
|
}
|
11697
11753
|
function checkSingle() {
|
11698
|
-
var remoteHost = settings[
|
11699
|
-
log(
|
11754
|
+
var remoteHost = settings[iframeId] && settings[iframeId].remoteHost;
|
11755
|
+
log(iframeId, "Checking connection is from: " + remoteHost);
|
11700
11756
|
return origin === remoteHost;
|
11701
11757
|
}
|
11702
11758
|
return checkOrigin.constructor === Array ? checkList() : checkSingle();
|
11703
11759
|
}
|
11704
|
-
var origin =
|
11705
|
-
if (checkOrigin && "" + origin !== "null" && !checkAllowedOrigin()) throw new Error("Unexpected message received from: " + origin + " for " + messageData.iframe.id + ". Message was: " +
|
11760
|
+
var origin = event.origin, checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin;
|
11761
|
+
if (checkOrigin && "" + origin !== "null" && !checkAllowedOrigin()) throw new Error("Unexpected message received from: " + origin + " for " + messageData.iframe.id + ". Message was: " + event.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");
|
11706
11762
|
return true;
|
11707
11763
|
}
|
11708
11764
|
function isMessageForUs() {
|
@@ -11717,19 +11773,19 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11717
11773
|
false: 1,
|
11718
11774
|
undefined: 1
|
11719
11775
|
};
|
11720
|
-
if (retCode) log(
|
11776
|
+
if (retCode) log(iframeId, "Ignoring init message from meta parent page");
|
11721
11777
|
return retCode;
|
11722
11778
|
}
|
11723
11779
|
function getMsgBody(offset) {
|
11724
11780
|
return msg.substr(msg.indexOf(":") + msgHeaderLen + offset);
|
11725
11781
|
}
|
11726
11782
|
function forwardMsgFromIFrame(msgBody) {
|
11727
|
-
log(
|
11783
|
+
log(iframeId, "onMessage passed: {iframe: " + messageData.iframe.id + ", message: " + msgBody + "}");
|
11728
11784
|
on("onMessage", {
|
11729
11785
|
iframe: messageData.iframe,
|
11730
11786
|
message: JSON.parse(msgBody)
|
11731
11787
|
});
|
11732
|
-
log(
|
11788
|
+
log(iframeId, "--");
|
11733
11789
|
}
|
11734
11790
|
function getPageInfo() {
|
11735
11791
|
var bodyPosition = document.body.getBoundingClientRect(), iFramePosition = messageData.iframe.getBoundingClientRect();
|
@@ -11774,28 +11830,28 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11774
11830
|
function start() {
|
11775
11831
|
setListener("Add ", addEventListener);
|
11776
11832
|
}
|
11777
|
-
var id =
|
11833
|
+
var id = iframeId // Create locally scoped copy of iFrame ID
|
11778
11834
|
;
|
11779
11835
|
start();
|
11780
11836
|
if (settings[id]) settings[id].stopPageInfo = stop;
|
11781
11837
|
}
|
11782
11838
|
function stopPageInfoMonitor() {
|
11783
|
-
if (settings[
|
11784
|
-
settings[
|
11785
|
-
delete settings[
|
11839
|
+
if (settings[iframeId] && settings[iframeId].stopPageInfo) {
|
11840
|
+
settings[iframeId].stopPageInfo();
|
11841
|
+
delete settings[iframeId].stopPageInfo;
|
11786
11842
|
}
|
11787
11843
|
}
|
11788
11844
|
function checkIFrameExists() {
|
11789
11845
|
var retBool = true;
|
11790
11846
|
if (null === messageData.iframe) {
|
11791
|
-
warn(
|
11847
|
+
warn(iframeId, "IFrame (" + messageData.id + ") not found");
|
11792
11848
|
retBool = false;
|
11793
11849
|
}
|
11794
11850
|
return retBool;
|
11795
11851
|
}
|
11796
11852
|
function getElementPosition(target) {
|
11797
11853
|
var iFramePosition = target.getBoundingClientRect();
|
11798
|
-
getPagePosition(
|
11854
|
+
getPagePosition(iframeId);
|
11799
11855
|
return {
|
11800
11856
|
x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),
|
11801
11857
|
y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))
|
@@ -11806,7 +11862,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11806
11862
|
function reposition() {
|
11807
11863
|
pagePosition = newPosition;
|
11808
11864
|
scrollTo();
|
11809
|
-
log(
|
11865
|
+
log(iframeId, "--");
|
11810
11866
|
}
|
11811
11867
|
function calcOffset() {
|
11812
11868
|
return {
|
@@ -11816,39 +11872,39 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11816
11872
|
}
|
11817
11873
|
function scrollParent() {
|
11818
11874
|
if (window.parentIFrame) window.parentIFrame["scrollTo" + (addOffset ? "Offset" : "")](newPosition.x, newPosition.y);
|
11819
|
-
else warn(
|
11875
|
+
else warn(iframeId, "Unable to scroll to requested position, window.parentIFrame not found");
|
11820
11876
|
}
|
11821
11877
|
var offset = addOffset ? getElementPosition(messageData.iframe) : {
|
11822
11878
|
x: 0,
|
11823
11879
|
y: 0
|
11824
11880
|
}, newPosition = calcOffset();
|
11825
|
-
log(
|
11881
|
+
log(iframeId, "Reposition requested from iFrame (offset x:" + offset.x + " y:" + offset.y + ")");
|
11826
11882
|
if (window.top !== window.self) scrollParent();
|
11827
11883
|
else reposition();
|
11828
11884
|
}
|
11829
11885
|
function scrollTo() {
|
11830
|
-
if (false !== on("onScroll", pagePosition)) setPagePosition(
|
11886
|
+
if (false !== on("onScroll", pagePosition)) setPagePosition(iframeId);
|
11831
11887
|
else unsetPagePosition();
|
11832
11888
|
}
|
11833
11889
|
function findTarget(location) {
|
11834
11890
|
function jumpToTarget() {
|
11835
11891
|
var jumpPosition = getElementPosition(target);
|
11836
|
-
log(
|
11892
|
+
log(iframeId, "Moving to in page link (#" + hash + ") at x: " + jumpPosition.x + " y: " + jumpPosition.y);
|
11837
11893
|
pagePosition = {
|
11838
11894
|
x: jumpPosition.x,
|
11839
11895
|
y: jumpPosition.y
|
11840
11896
|
};
|
11841
11897
|
scrollTo();
|
11842
|
-
log(
|
11898
|
+
log(iframeId, "--");
|
11843
11899
|
}
|
11844
11900
|
function jumpToParent() {
|
11845
11901
|
if (window.parentIFrame) window.parentIFrame.moveToAnchor(hash);
|
11846
|
-
else log(
|
11902
|
+
else log(iframeId, "In page link #" + hash + " not found and window.parentIFrame not found");
|
11847
11903
|
}
|
11848
11904
|
var hash = location.split("#")[1] || "", hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
|
11849
11905
|
if (target) jumpToTarget();
|
11850
11906
|
else if (window.top !== window.self) jumpToParent();
|
11851
|
-
else log(
|
11907
|
+
else log(iframeId, "In page link #" + hash + " not found");
|
11852
11908
|
}
|
11853
11909
|
function onMouse(event) {
|
11854
11910
|
var mousePos = {};
|
@@ -11870,10 +11926,10 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11870
11926
|
});
|
11871
11927
|
}
|
11872
11928
|
function on(funcName, val) {
|
11873
|
-
return chkEvent(
|
11929
|
+
return chkEvent(iframeId, funcName, val);
|
11874
11930
|
}
|
11875
11931
|
function actionMsg() {
|
11876
|
-
if (settings[
|
11932
|
+
if (settings[iframeId] && settings[iframeId].firstRun) firstRun();
|
11877
11933
|
switch(messageData.type){
|
11878
11934
|
case "close":
|
11879
11935
|
closeIFrame(messageData.iframe);
|
@@ -11888,7 +11944,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11888
11944
|
onMouse("onMouseLeave");
|
11889
11945
|
break;
|
11890
11946
|
case "autoResize":
|
11891
|
-
settings[
|
11947
|
+
settings[iframeId].autoResize = JSON.parse(getMsgBody(9));
|
11892
11948
|
break;
|
11893
11949
|
case "scrollTo":
|
11894
11950
|
scrollRequestFromChild(false);
|
@@ -11897,7 +11953,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11897
11953
|
scrollRequestFromChild(true);
|
11898
11954
|
break;
|
11899
11955
|
case "pageInfo":
|
11900
|
-
sendPageInfoToIframe(settings[
|
11956
|
+
sendPageInfoToIframe(settings[iframeId] && settings[iframeId].iframe, iframeId);
|
11901
11957
|
startPageInfoMonitor();
|
11902
11958
|
break;
|
11903
11959
|
case "pageInfoStop":
|
@@ -11931,19 +11987,19 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11931
11987
|
for(var iframeId in settings)trigger("iFrame requested init", createOutgoingMsg(iframeId), settings[iframeId].iframe, iframeId);
|
11932
11988
|
}
|
11933
11989
|
function firstRun() {
|
11934
|
-
if (settings[
|
11990
|
+
if (settings[iframeId]) settings[iframeId].firstRun = false;
|
11935
11991
|
}
|
11936
|
-
var msg =
|
11992
|
+
var msg = event.data, messageData = {}, iframeId = null;
|
11937
11993
|
if ("[iFrameResizerChild]Ready" === msg) iFrameReadyMsgReceived();
|
11938
11994
|
else if (isMessageForUs()) {
|
11939
11995
|
messageData = processMsg();
|
11940
|
-
|
11941
|
-
if (settings[
|
11942
|
-
if (!isMessageFromMetaParent() && hasSettings(
|
11943
|
-
log(
|
11996
|
+
iframeId = messageData.id;
|
11997
|
+
if (settings[iframeId]) settings[iframeId].loaded = true;
|
11998
|
+
if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
|
11999
|
+
log(iframeId, "Received: " + msg);
|
11944
12000
|
if (checkIFrameExists() && isMessageFromIFrame()) actionMsg();
|
11945
12001
|
}
|
11946
|
-
} else info(
|
12002
|
+
} else info(iframeId, "Ignored: " + msg);
|
11947
12003
|
}
|
11948
12004
|
function chkEvent(iframeId, funcName, val) {
|
11949
12005
|
var func = null, retVal = null;
|
@@ -12077,17 +12133,17 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12077
12133
|
function isNumber(value) {
|
12078
12134
|
return typeof value === "number";
|
12079
12135
|
}
|
12080
|
-
function setupIFrame(iframe,
|
12136
|
+
function setupIFrame(iframe, options) {
|
12081
12137
|
function setLimits() {
|
12082
12138
|
function addStyle(style) {
|
12083
|
-
var styleValue = settings[
|
12139
|
+
var styleValue = settings[iframeId][style];
|
12084
12140
|
if (Infinity !== styleValue && 0 !== styleValue) {
|
12085
12141
|
iframe.style[style] = isNumber(styleValue) ? styleValue + "px" : styleValue;
|
12086
|
-
log(
|
12142
|
+
log(iframeId, "Set " + style + " = " + iframe.style[style]);
|
12087
12143
|
}
|
12088
12144
|
}
|
12089
12145
|
function chkMinMax(dimension) {
|
12090
|
-
if (settings[
|
12146
|
+
if (settings[iframeId]["min" + dimension] > settings[iframeId]["max" + dimension]) throw new Error("Value for min" + dimension + " can not be greater than max" + dimension);
|
12091
12147
|
}
|
12092
12148
|
chkMinMax("Height");
|
12093
12149
|
chkMinMax("Width");
|
@@ -12097,7 +12153,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12097
12153
|
addStyle("minWidth");
|
12098
12154
|
}
|
12099
12155
|
function newId() {
|
12100
|
-
var id =
|
12156
|
+
var id = options && options.id || defaults.id + count++;
|
12101
12157
|
if (null !== document.getElementById(id)) id += count++;
|
12102
12158
|
return id;
|
12103
12159
|
}
|
@@ -12105,15 +12161,15 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12105
12161
|
if ("" === iframeId) {
|
12106
12162
|
// eslint-disable-next-line no-multi-assign
|
12107
12163
|
iframe.id = iframeId = newId();
|
12108
|
-
logEnabled = (
|
12164
|
+
logEnabled = (options || {}).log;
|
12109
12165
|
log(iframeId, "Added missing iframe ID: " + iframeId + " (" + iframe.src + ")");
|
12110
12166
|
}
|
12111
12167
|
return iframeId;
|
12112
12168
|
}
|
12113
12169
|
function setScrolling() {
|
12114
|
-
log(
|
12115
|
-
iframe.style.overflow = false === (settings[
|
12116
|
-
switch(settings[
|
12170
|
+
log(iframeId, "IFrame scrolling " + (settings[iframeId] && settings[iframeId].scrolling ? "enabled" : "disabled") + " for " + iframeId);
|
12171
|
+
iframe.style.overflow = false === (settings[iframeId] && settings[iframeId].scrolling) ? "hidden" : "auto";
|
12172
|
+
switch(settings[iframeId] && settings[iframeId].scrolling){
|
12117
12173
|
case "omit":
|
12118
12174
|
break;
|
12119
12175
|
case true:
|
@@ -12123,23 +12179,23 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12123
12179
|
iframe.scrolling = "no";
|
12124
12180
|
break;
|
12125
12181
|
default:
|
12126
|
-
iframe.scrolling = settings[
|
12182
|
+
iframe.scrolling = settings[iframeId] ? settings[iframeId].scrolling : "no";
|
12127
12183
|
}
|
12128
12184
|
}
|
12129
12185
|
// The V1 iFrame script expects an int, where as in V2 expects a CSS
|
12130
12186
|
// string value such as '1px 3em', so if we have an int for V2, set V1=V2
|
12131
12187
|
// and then convert V2 to a string PX value.
|
12132
12188
|
function setupBodyMarginValues() {
|
12133
|
-
if ("number" === typeof (settings[
|
12134
|
-
settings[
|
12135
|
-
settings[
|
12189
|
+
if ("number" === typeof (settings[iframeId] && settings[iframeId].bodyMargin) || "0" === (settings[iframeId] && settings[iframeId].bodyMargin)) {
|
12190
|
+
settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;
|
12191
|
+
settings[iframeId].bodyMargin = "" + settings[iframeId].bodyMargin + "px";
|
12136
12192
|
}
|
12137
12193
|
}
|
12138
12194
|
function checkReset() {
|
12139
12195
|
// Reduce scope of firstRun to function, because IE8's JS execution
|
12140
12196
|
// context stack is borked and this value gets externally
|
12141
12197
|
// changed midway through running this function!!!
|
12142
|
-
var firstRun = settings[
|
12198
|
+
var firstRun = settings[iframeId] && settings[iframeId].firstRun, resetRequertMethod = settings[iframeId] && settings[iframeId].heightCalculationMethod in resetRequiredMethods;
|
12143
12199
|
if (!firstRun && resetRequertMethod) resetIFrame({
|
12144
12200
|
iframe: iframe,
|
12145
12201
|
height: 0,
|
@@ -12148,16 +12204,16 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12148
12204
|
});
|
12149
12205
|
}
|
12150
12206
|
function setupIFrameObject() {
|
12151
|
-
if (settings[
|
12152
|
-
close: closeIFrame.bind(null, settings[
|
12153
|
-
removeListeners: removeIframeListeners.bind(null, settings[
|
12154
|
-
resize: trigger.bind(null, "Window resize", "resize", settings[
|
12207
|
+
if (settings[iframeId]) settings[iframeId].iframe.iFrameResizer = {
|
12208
|
+
close: closeIFrame.bind(null, settings[iframeId].iframe),
|
12209
|
+
removeListeners: removeIframeListeners.bind(null, settings[iframeId].iframe),
|
12210
|
+
resize: trigger.bind(null, "Window resize", "resize", settings[iframeId].iframe),
|
12155
12211
|
moveToAnchor: function(anchor) {
|
12156
|
-
trigger("Move to anchor", "moveToAnchor:" + anchor, settings[
|
12212
|
+
trigger("Move to anchor", "moveToAnchor:" + anchor, settings[iframeId].iframe, iframeId);
|
12157
12213
|
},
|
12158
12214
|
sendMessage: function(message) {
|
12159
12215
|
message = JSON.stringify(message);
|
12160
|
-
trigger("Send Message", "message:" + message, settings[
|
12216
|
+
trigger("Send Message", "message:" + message, settings[iframeId].iframe, iframeId);
|
12161
12217
|
}
|
12162
12218
|
};
|
12163
12219
|
}
|
@@ -12184,8 +12240,8 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12184
12240
|
childList: true
|
12185
12241
|
});
|
12186
12242
|
}
|
12187
|
-
var
|
12188
|
-
if (
|
12243
|
+
var MutationObserver = getMutationObserver();
|
12244
|
+
if (MutationObserver) createDestroyObserver(MutationObserver);
|
12189
12245
|
addEventListener(iframe, "load", iFrameLoaded);
|
12190
12246
|
trigger("init", msg, iframe, undefined, true);
|
12191
12247
|
}
|
@@ -12194,7 +12250,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12194
12250
|
}
|
12195
12251
|
function copyOptions(options) {
|
12196
12252
|
// eslint-disable-next-line no-restricted-syntax
|
12197
|
-
for(var option in defaults)if (Object.prototype.hasOwnProperty.call(defaults, option)) settings[
|
12253
|
+
for(var option in defaults)if (Object.prototype.hasOwnProperty.call(defaults, option)) settings[iframeId][option] = Object.prototype.hasOwnProperty.call(options, option) ? options[option] : defaults[option];
|
12198
12254
|
}
|
12199
12255
|
function getTargetOrigin(remoteHost) {
|
12200
12256
|
return "" === remoteHost || null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/) ? "*" : remoteHost;
|
@@ -12205,12 +12261,12 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12205
12261
|
var name = "on" + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
|
12206
12262
|
this[name] = this[key];
|
12207
12263
|
delete this[key];
|
12208
|
-
warn(
|
12264
|
+
warn(iframeId, "Deprecated: '" + key + "' has been renamed '" + name + "'. The old method will be removed in the next major version.");
|
12209
12265
|
}
|
12210
12266
|
}
|
12211
12267
|
function processOptions(options) {
|
12212
12268
|
options = options || {};
|
12213
|
-
settings[
|
12269
|
+
settings[iframeId] = {
|
12214
12270
|
firstRun: true,
|
12215
12271
|
iframe: iframe,
|
12216
12272
|
remoteHost: iframe.src && iframe.src.split("/").slice(0, 3).join("/")
|
@@ -12218,20 +12274,20 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12218
12274
|
checkOptions(options);
|
12219
12275
|
Object.keys(options).forEach(depricate, options);
|
12220
12276
|
copyOptions(options);
|
12221
|
-
if (settings[
|
12277
|
+
if (settings[iframeId]) settings[iframeId].targetOrigin = true === settings[iframeId].checkOrigin ? getTargetOrigin(settings[iframeId].remoteHost) : "*";
|
12222
12278
|
}
|
12223
12279
|
function beenHere() {
|
12224
|
-
return
|
12280
|
+
return iframeId in settings && "iFrameResizer" in iframe;
|
12225
12281
|
}
|
12226
|
-
var
|
12282
|
+
var iframeId = ensureHasId(iframe.id);
|
12227
12283
|
if (!beenHere()) {
|
12228
|
-
processOptions(
|
12284
|
+
processOptions(options);
|
12229
12285
|
setScrolling();
|
12230
12286
|
setLimits();
|
12231
12287
|
setupBodyMarginValues();
|
12232
|
-
init(createOutgoingMsg(
|
12288
|
+
init(createOutgoingMsg(iframeId));
|
12233
12289
|
setupIFrameObject();
|
12234
|
-
} else warn(
|
12290
|
+
} else warn(iframeId, "Ignored iFrame, already setup.");
|
12235
12291
|
}
|
12236
12292
|
function debouce(fn, time) {
|
12237
12293
|
if (null === timer) timer = setTimeout(function() {
|
@@ -12397,6 +12453,31 @@ function $e1f51f020443edd4$export$2e2bcd8739ae039(id, embedStore) {
|
|
12397
12453
|
}
|
12398
12454
|
|
12399
12455
|
|
12456
|
+
var $e9904a14dabf652d$exports = {};
|
12457
|
+
|
12458
|
+
$parcel$defineInteropFlag($e9904a14dabf652d$exports);
|
12459
|
+
|
12460
|
+
$parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
|
12461
|
+
function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
12462
|
+
return {
|
12463
|
+
focussed: false,
|
12464
|
+
get active () {
|
12465
|
+
return store.active;
|
12466
|
+
},
|
12467
|
+
get text () {
|
12468
|
+
return store.text;
|
12469
|
+
},
|
12470
|
+
clear () {
|
12471
|
+
if (store.raw === "") this.$refs.input.blur();
|
12472
|
+
else store.raw = "";
|
12473
|
+
},
|
12474
|
+
focus () {
|
12475
|
+
this.$refs.input.focus();
|
12476
|
+
}
|
12477
|
+
};
|
12478
|
+
}
|
12479
|
+
|
12480
|
+
|
12400
12481
|
var $36506012e0c6e9e3$exports = {};
|
12401
12482
|
|
12402
12483
|
$parcel$defineInteropFlag($36506012e0c6e9e3$exports);
|
@@ -12431,6 +12512,9 @@ function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
|
|
12431
12512
|
const index = store.open.indexOf(id);
|
12432
12513
|
if (index > -1) store.open.splice(index, 1);
|
12433
12514
|
},
|
12515
|
+
closeAll () {
|
12516
|
+
store.open.length = 0;
|
12517
|
+
},
|
12434
12518
|
toggleOpen (id) {
|
12435
12519
|
this.isOpen(id) ? this.setClosed(id) : this.setOpen(id);
|
12436
12520
|
},
|
@@ -12450,24 +12534,6 @@ function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
|
|
12450
12534
|
}
|
12451
12535
|
|
12452
12536
|
|
12453
|
-
var $b63b9c6d236b3f65$exports = {};
|
12454
|
-
|
12455
|
-
$parcel$defineInteropFlag($b63b9c6d236b3f65$exports);
|
12456
|
-
|
12457
|
-
$parcel$export($b63b9c6d236b3f65$exports, "default", () => $b63b9c6d236b3f65$export$2e2bcd8739ae039);
|
12458
|
-
|
12459
|
-
function $b63b9c6d236b3f65$export$2e2bcd8739ae039() {
|
12460
|
-
return {
|
12461
|
-
narrow: false,
|
12462
|
-
init () {
|
12463
|
-
(0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
|
12464
|
-
this.narrow = width < 450;
|
12465
|
-
});
|
12466
|
-
}
|
12467
|
-
};
|
12468
|
-
}
|
12469
|
-
|
12470
|
-
|
12471
12537
|
var $506dabb2bf255b38$exports = {};
|
12472
12538
|
|
12473
12539
|
$parcel$defineInteropFlag($506dabb2bf255b38$exports);
|
@@ -12501,14 +12567,14 @@ var $7cac9a0d4b75bf4e$var$parseValue = function(value) {
|
|
12501
12567
|
var $7cac9a0d4b75bf4e$var$parse = function(rule) {
|
12502
12568
|
return rule.split(" ").map($7cac9a0d4b75bf4e$var$parseValue);
|
12503
12569
|
};
|
12504
|
-
var $7cac9a0d4b75bf4e$var$getSizeAtTrack = function(
|
12570
|
+
var $7cac9a0d4b75bf4e$var$getSizeAtTrack = function(index, tracks, gap, end) {
|
12505
12571
|
if (gap === void 0) gap = 0;
|
12506
12572
|
if (end === void 0) end = false;
|
12507
|
-
var newIndex = end ?
|
12573
|
+
var newIndex = end ? index + 1 : index;
|
12508
12574
|
var trackSum = tracks.slice(0, newIndex).reduce(function(accum, value) {
|
12509
12575
|
return accum + value.numeric;
|
12510
12576
|
}, 0);
|
12511
|
-
var gapSum = gap ?
|
12577
|
+
var gapSum = gap ? index * gap : 0;
|
12512
12578
|
return trackSum + gapSum;
|
12513
12579
|
};
|
12514
12580
|
var $7cac9a0d4b75bf4e$var$getStyles = function(rule, ownRules, matchedRules) {
|
@@ -12683,8 +12749,8 @@ $7cac9a0d4b75bf4e$var$Gutter.prototype.startDragging = function startDragging(e)
|
|
12683
12749
|
});
|
12684
12750
|
this.totalFrs = trackFr.length;
|
12685
12751
|
if (this.totalFrs) {
|
12686
|
-
var
|
12687
|
-
if (
|
12752
|
+
var track = $7cac9a0d4b75bf4e$var$firstNonZero(trackFr);
|
12753
|
+
if (track !== null) this.frToPixels = this.computedPixels[track].numeric / trackFr[track].numeric;
|
12688
12754
|
}
|
12689
12755
|
if (trackPercentage.length) {
|
12690
12756
|
var track$1 = $7cac9a0d4b75bf4e$var$firstNonZero(trackPercentage);
|
@@ -13055,7 +13121,7 @@ $parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$exp
|
|
13055
13121
|
|
13056
13122
|
|
13057
13123
|
function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
|
13058
|
-
const
|
13124
|
+
const initial = store ? store.activeTab : null;
|
13059
13125
|
let dropdown = null;
|
13060
13126
|
return {
|
13061
13127
|
visibleTabsCount: 0,
|
@@ -13084,7 +13150,7 @@ function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
|
|
13084
13150
|
placement: "bottom",
|
13085
13151
|
appendTo: this.$root
|
13086
13152
|
});
|
13087
|
-
const initialTab =
|
13153
|
+
const initialTab = initial ? this.tabs.find((t)=>this._getRef(t) === initial) : this.tabs[0];
|
13088
13154
|
this.selectTab(initialTab, true);
|
13089
13155
|
this.parentObserver = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this)));
|
13090
13156
|
this.$watch("visibleTabsCount", (value)=>{
|
@@ -13264,16 +13330,15 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
|
|
13264
13330
|
}
|
13265
13331
|
|
13266
13332
|
|
13267
|
-
$
|
13333
|
+
$1f889267678ff167$exports = {
|
13268
13334
|
"button": $cbd28b10fa9798c7$exports,
|
13269
13335
|
"code": $99486586f6691564$exports,
|
13270
13336
|
"copy_button": $47a1c62621be0c54$exports,
|
13271
13337
|
"dimensions_display": $e398acaded942bbe$exports,
|
13272
|
-
"filter": $e9904a14dabf652d$exports,
|
13273
13338
|
"embed": $e1f51f020443edd4$exports,
|
13339
|
+
"filter": $e9904a14dabf652d$exports,
|
13274
13340
|
"icon": $36506012e0c6e9e3$exports,
|
13275
13341
|
"nav": $d92d9d5253f84566$exports,
|
13276
|
-
"params_editor": $b63b9c6d236b3f65$exports,
|
13277
13342
|
"split_layout": $506dabb2bf255b38$exports,
|
13278
13343
|
"tab_panels": $a87dacf5139b5e2f$exports,
|
13279
13344
|
"tabs": $0db07828cadc68e0$exports,
|
@@ -13281,7 +13346,7 @@ $5a1160331e703b26$exports = {
|
|
13281
13346
|
};
|
13282
13347
|
|
13283
13348
|
|
13284
|
-
var $
|
13349
|
+
var $c43230a66e7bc31a$exports = {};
|
13285
13350
|
var $9b24cbeb3a465447$exports = {};
|
13286
13351
|
|
13287
13352
|
$parcel$defineInteropFlag($9b24cbeb3a465447$exports);
|
@@ -13338,12 +13403,57 @@ function $9b24cbeb3a465447$export$2e2bcd8739ae039({ id: id , matchers: matchers
|
|
13338
13403
|
}
|
13339
13404
|
|
13340
13405
|
|
13341
|
-
var $
|
13406
|
+
var $1a7a7298eec5b755$exports = {};
|
13407
|
+
|
13408
|
+
$parcel$defineInteropFlag($1a7a7298eec5b755$exports);
|
13342
13409
|
|
13343
|
-
$parcel$
|
13410
|
+
$parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039);
|
13344
13411
|
|
13345
|
-
$
|
13346
|
-
|
13412
|
+
function $1a7a7298eec5b755$export$2e2bcd8739ae039() {
|
13413
|
+
return {
|
13414
|
+
narrow: false,
|
13415
|
+
init () {
|
13416
|
+
(0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
|
13417
|
+
this.narrow = width < 500;
|
13418
|
+
});
|
13419
|
+
}
|
13420
|
+
};
|
13421
|
+
}
|
13422
|
+
|
13423
|
+
|
13424
|
+
var $e773f8ef556b41ff$exports = {};
|
13425
|
+
|
13426
|
+
$parcel$defineInteropFlag($e773f8ef556b41ff$exports);
|
13427
|
+
|
13428
|
+
$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
|
13429
|
+
function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
|
13430
|
+
return {
|
13431
|
+
get isNarrowLayout () {
|
13432
|
+
return this.narrow || false;
|
13433
|
+
}
|
13434
|
+
};
|
13435
|
+
}
|
13436
|
+
|
13437
|
+
|
13438
|
+
$c43230a66e7bc31a$exports = {
|
13439
|
+
"nav": {
|
13440
|
+
"item": $9b24cbeb3a465447$exports
|
13441
|
+
},
|
13442
|
+
"params": {
|
13443
|
+
"editor": $1a7a7298eec5b755$exports,
|
13444
|
+
"field": $e773f8ef556b41ff$exports
|
13445
|
+
}
|
13446
|
+
};
|
13447
|
+
|
13448
|
+
|
13449
|
+
var $6c10158820e535ef$exports = {};
|
13450
|
+
|
13451
|
+
var $7f7fff78376549af$exports = {};
|
13452
|
+
|
13453
|
+
$parcel$defineInteropFlag($7f7fff78376549af$exports);
|
13454
|
+
|
13455
|
+
$parcel$export($7f7fff78376549af$exports, "default", () => $7f7fff78376549af$export$2e2bcd8739ae039);
|
13456
|
+
function $7f7fff78376549af$export$2e2bcd8739ae039({ name: name , value: value }) {
|
13347
13457
|
return {
|
13348
13458
|
name: name,
|
13349
13459
|
value: value,
|
@@ -13360,37 +13470,15 @@ function $fa8073e5be19dff9$export$2e2bcd8739ae039({ name: name , value: value }
|
|
13360
13470
|
},
|
13361
13471
|
validate () {
|
13362
13472
|
return this.$root.reportValidity ? this.$root.reportValidity() : true;
|
13363
|
-
},
|
13364
|
-
get isNarrowLayout () {
|
13365
|
-
return this.narrow || false;
|
13366
|
-
},
|
13367
|
-
bindings: {
|
13368
|
-
input: {
|
13369
|
-
[":id"]: "`param-${name}`",
|
13370
|
-
["x-ref"]: "input",
|
13371
|
-
["x-model.debounce.200"]: "value",
|
13372
|
-
["@keydown.stop"]: true
|
13373
|
-
}
|
13374
13473
|
}
|
13375
13474
|
};
|
13376
13475
|
}
|
13377
13476
|
|
13378
13477
|
|
13379
|
-
$e4eab7529959b73b$exports = {
|
13380
|
-
"nav": {
|
13381
|
-
"item": $9b24cbeb3a465447$exports
|
13382
|
-
},
|
13383
|
-
"params_editor": {
|
13384
|
-
"field": $fa8073e5be19dff9$exports
|
13385
|
-
}
|
13386
|
-
};
|
13387
|
-
|
13388
|
-
|
13389
|
-
var $4979d2d897a1c01f$exports = {};
|
13390
|
-
|
13391
13478
|
|
13392
|
-
$
|
13479
|
+
$6c10158820e535ef$exports = {
|
13393
13480
|
"clipboard": $122263eab94cad08$exports,
|
13481
|
+
"params_input": $7f7fff78376549af$exports,
|
13394
13482
|
"tooltip": $2ef98910f916db6b$exports
|
13395
13483
|
};
|
13396
13484
|
|
@@ -13421,13 +13509,14 @@ const $d73574cc5e9b9e72$var$prefix = window.APP_NAME;
|
|
13421
13509
|
// Components
|
13422
13510
|
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
|
13423
13511
|
[
|
13424
|
-
$
|
13425
|
-
$
|
13426
|
-
$
|
13512
|
+
$1f889267678ff167$exports,
|
13513
|
+
$c43230a66e7bc31a$exports,
|
13514
|
+
$6c10158820e535ef$exports
|
13427
13515
|
].forEach((scripts)=>{
|
13428
|
-
const
|
13429
|
-
Object.keys(
|
13430
|
-
|
13516
|
+
const components = (0, $5439cede634b2921$export$4e811121b221213b)(scripts);
|
13517
|
+
Object.keys(components).forEach((name)=>{
|
13518
|
+
console.log(name);
|
13519
|
+
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data(`${name}Component`, components[name]);
|
13431
13520
|
});
|
13432
13521
|
});
|
13433
13522
|
// Init
|