lookbook 2.3.12 → 2.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/components/lookbook/button/component.html.erb +11 -12
- data/app/components/lookbook/button/component.js +19 -31
- data/app/components/lookbook/button/component.rb +4 -0
- data/app/components/lookbook/button_group/component.html.erb +1 -1
- data/app/components/lookbook/code/component.html.erb +1 -1
- data/app/components/lookbook/copy_button/component.html.erb +1 -1
- data/app/components/lookbook/debug_menu/component.html.erb +1 -1
- data/app/components/lookbook/dimensions_display/component.html.erb +2 -2
- data/app/components/lookbook/display_options/editor/component.html.erb +2 -2
- data/app/components/lookbook/display_options/field/component.html.erb +1 -1
- data/app/components/lookbook/embed/component.html.erb +1 -1
- data/app/components/lookbook/file_source/component.html.erb +1 -1
- data/app/components/lookbook/icon_button/component.html.erb +2 -2
- data/app/components/lookbook/inspector_panel/component.html.erb +1 -1
- data/app/components/lookbook/logo/component.html.erb +1 -1
- data/app/components/lookbook/message/component.html.erb +1 -1
- data/app/components/lookbook/nav/component.html.erb +1 -1
- data/app/components/lookbook/nav/directory/component.html.erb +1 -1
- data/app/components/lookbook/nav/entity/component.html.erb +1 -1
- data/app/components/lookbook/page_tabs/component.html.erb +1 -1
- data/app/components/lookbook/params/editor/component.html.erb +1 -1
- data/app/components/lookbook/prose/component.html.erb +1 -1
- data/app/components/lookbook/split_layout/component.html.erb +1 -1
- data/app/components/lookbook/tab_panels/component.html.erb +1 -1
- data/app/components/lookbook/tab_panels/panel/component.html.erb +1 -1
- data/app/components/lookbook/tabs/component.html.erb +1 -1
- data/app/components/lookbook/tabs/dropdown_tab/component.html.erb +1 -1
- data/app/components/lookbook/tabs/tab/component.html.erb +1 -1
- data/app/components/lookbook/text_button/component.html.erb +2 -2
- data/app/components/lookbook/toolbar/component.html.erb +1 -1
- data/app/controllers/lookbook/application_controller.rb +17 -0
- data/app/views/layouts/lookbook/application.html.erb +3 -3
- data/app/views/layouts/lookbook/embed.html.erb +1 -1
- data/app/views/lookbook/embeds/show.html.erb +1 -1
- data/app/views/lookbook/errors/default.html.erb +1 -1
- data/app/views/lookbook/errors/not_found.html.erb +1 -1
- data/app/views/lookbook/index.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_color.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_range.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_select.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_text.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_text_two_step.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_textarea.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_notes.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_output.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_preview.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_source.html.erb +1 -1
- data/app/views/lookbook/inspector/show.html.erb +4 -4
- data/app/views/lookbook/pages/show.html.erb +1 -1
- data/app/views/lookbook/partials/_iframe_content_scripts.html.erb +1 -1
- data/app/views/lookbook/partials/_user_styles.html.erb +1 -1
- data/app/views/lookbook/previews/group.html.erb +1 -1
- data/app/views/lookbook/previews/preview.html.erb +3 -3
- data/app/views/lookbook/previews/show.html.erb +1 -1
- data/config/app.yml +0 -1
- data/lib/lookbook/preview_parser.rb +1 -1
- data/lib/lookbook/services/markdown_renderer.rb +12 -4
- data/lib/lookbook/services/string_value_caster.rb +4 -0
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/css/lookbook.css +77 -102
- data/public/lookbook-assets/css/lookbook.css.map +1 -1
- data/public/lookbook-assets/js/iframe.js +15 -6
- data/public/lookbook-assets/js/iframe.js.map +1 -1
- data/public/lookbook-assets/js/index.js +617 -447
- data/public/lookbook-assets/js/index.js.map +1 -1
- data/public/lookbook-assets/js/lookbook.js +26 -8
- metadata +1 -1
|
@@ -94,104 +94,20 @@ function $caa9439642c6336c$var$elementBoundEffect(el) {
|
|
|
94
94
|
}
|
|
95
95
|
];
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
// packages/alpinejs/src/utils/walk.js
|
|
108
|
-
function $caa9439642c6336c$var$walk(el, callback) {
|
|
109
|
-
if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) {
|
|
110
|
-
Array.from(el.children).forEach((el2)=>$caa9439642c6336c$var$walk(el2, callback));
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
let skip = false;
|
|
114
|
-
callback(el, ()=>skip = true);
|
|
115
|
-
if (skip) return;
|
|
116
|
-
let node = el.firstElementChild;
|
|
117
|
-
while(node){
|
|
118
|
-
$caa9439642c6336c$var$walk(node, callback, false);
|
|
119
|
-
node = node.nextElementSibling;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
// packages/alpinejs/src/utils/warn.js
|
|
123
|
-
function $caa9439642c6336c$var$warn(message, ...args) {
|
|
124
|
-
console.warn(`Alpine Warning: ${message}`, ...args);
|
|
125
|
-
}
|
|
126
|
-
// packages/alpinejs/src/lifecycle.js
|
|
127
|
-
var $caa9439642c6336c$var$started = false;
|
|
128
|
-
function $caa9439642c6336c$var$start() {
|
|
129
|
-
if ($caa9439642c6336c$var$started) $caa9439642c6336c$var$warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");
|
|
130
|
-
$caa9439642c6336c$var$started = true;
|
|
131
|
-
if (!document.body) $caa9439642c6336c$var$warn("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");
|
|
132
|
-
$caa9439642c6336c$var$dispatch(document, "alpine:init");
|
|
133
|
-
$caa9439642c6336c$var$dispatch(document, "alpine:initializing");
|
|
134
|
-
$caa9439642c6336c$var$startObservingMutations();
|
|
135
|
-
$caa9439642c6336c$var$onElAdded((el)=>$caa9439642c6336c$var$initTree(el, $caa9439642c6336c$var$walk));
|
|
136
|
-
$caa9439642c6336c$var$onElRemoved((el)=>$caa9439642c6336c$var$destroyTree(el));
|
|
137
|
-
$caa9439642c6336c$var$onAttributesAdded((el, attrs)=>{
|
|
138
|
-
$caa9439642c6336c$var$directives(el, attrs).forEach((handle)=>handle());
|
|
139
|
-
});
|
|
140
|
-
let outNestedComponents = (el)=>!$caa9439642c6336c$var$closestRoot(el.parentElement, true);
|
|
141
|
-
Array.from(document.querySelectorAll($caa9439642c6336c$var$allSelectors().join(","))).filter(outNestedComponents).forEach((el)=>{
|
|
142
|
-
$caa9439642c6336c$var$initTree(el);
|
|
143
|
-
});
|
|
144
|
-
$caa9439642c6336c$var$dispatch(document, "alpine:initialized");
|
|
145
|
-
}
|
|
146
|
-
var $caa9439642c6336c$var$rootSelectorCallbacks = [];
|
|
147
|
-
var $caa9439642c6336c$var$initSelectorCallbacks = [];
|
|
148
|
-
function $caa9439642c6336c$var$rootSelectors() {
|
|
149
|
-
return $caa9439642c6336c$var$rootSelectorCallbacks.map((fn)=>fn());
|
|
150
|
-
}
|
|
151
|
-
function $caa9439642c6336c$var$allSelectors() {
|
|
152
|
-
return $caa9439642c6336c$var$rootSelectorCallbacks.concat($caa9439642c6336c$var$initSelectorCallbacks).map((fn)=>fn());
|
|
153
|
-
}
|
|
154
|
-
function $caa9439642c6336c$var$addRootSelector(selectorCallback) {
|
|
155
|
-
$caa9439642c6336c$var$rootSelectorCallbacks.push(selectorCallback);
|
|
156
|
-
}
|
|
157
|
-
function $caa9439642c6336c$var$addInitSelector(selectorCallback) {
|
|
158
|
-
$caa9439642c6336c$var$initSelectorCallbacks.push(selectorCallback);
|
|
159
|
-
}
|
|
160
|
-
function $caa9439642c6336c$var$closestRoot(el, includeInitSelectors = false) {
|
|
161
|
-
return $caa9439642c6336c$var$findClosest(el, (element)=>{
|
|
162
|
-
const selectors = includeInitSelectors ? $caa9439642c6336c$var$allSelectors() : $caa9439642c6336c$var$rootSelectors();
|
|
163
|
-
if (selectors.some((selector)=>element.matches(selector))) return true;
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
function $caa9439642c6336c$var$findClosest(el, callback) {
|
|
167
|
-
if (!el) return;
|
|
168
|
-
if (callback(el)) return el;
|
|
169
|
-
if (el._x_teleportBack) el = el._x_teleportBack;
|
|
170
|
-
if (!el.parentElement) return;
|
|
171
|
-
return $caa9439642c6336c$var$findClosest(el.parentElement, callback);
|
|
172
|
-
}
|
|
173
|
-
function $caa9439642c6336c$var$isRoot(el) {
|
|
174
|
-
return $caa9439642c6336c$var$rootSelectors().some((selector)=>el.matches(selector));
|
|
175
|
-
}
|
|
176
|
-
var $caa9439642c6336c$var$initInterceptors = [];
|
|
177
|
-
function $caa9439642c6336c$var$interceptInit(callback) {
|
|
178
|
-
$caa9439642c6336c$var$initInterceptors.push(callback);
|
|
179
|
-
}
|
|
180
|
-
function $caa9439642c6336c$var$initTree(el, walker = $caa9439642c6336c$var$walk, intercept = ()=>{}) {
|
|
181
|
-
$caa9439642c6336c$var$deferHandlingDirectives(()=>{
|
|
182
|
-
walker(el, (el2, skip)=>{
|
|
183
|
-
intercept(el2, skip);
|
|
184
|
-
$caa9439642c6336c$var$initInterceptors.forEach((i)=>i(el2, skip));
|
|
185
|
-
$caa9439642c6336c$var$directives(el2, el2.attributes).forEach((handle)=>handle());
|
|
186
|
-
el2._x_ignore && skip();
|
|
97
|
+
function $caa9439642c6336c$var$watch(getter, callback) {
|
|
98
|
+
let firstTime = true;
|
|
99
|
+
let oldValue;
|
|
100
|
+
let effectReference = $caa9439642c6336c$var$effect(()=>{
|
|
101
|
+
let value = getter();
|
|
102
|
+
JSON.stringify(value);
|
|
103
|
+
if (!firstTime) queueMicrotask(()=>{
|
|
104
|
+
callback(value, oldValue);
|
|
105
|
+
oldValue = value;
|
|
187
106
|
});
|
|
107
|
+
else oldValue = value;
|
|
108
|
+
firstTime = false;
|
|
188
109
|
});
|
|
189
|
-
|
|
190
|
-
function $caa9439642c6336c$var$destroyTree(root) {
|
|
191
|
-
$caa9439642c6336c$var$walk(root, (el)=>{
|
|
192
|
-
$caa9439642c6336c$var$cleanupAttributes(el);
|
|
193
|
-
$caa9439642c6336c$var$cleanupElement(el);
|
|
194
|
-
});
|
|
110
|
+
return ()=>$caa9439642c6336c$var$release(effectReference);
|
|
195
111
|
}
|
|
196
112
|
// packages/alpinejs/src/mutation.js
|
|
197
113
|
var $caa9439642c6336c$var$onAttributeAddeds = [];
|
|
@@ -227,7 +143,8 @@ function $caa9439642c6336c$var$cleanupAttributes(el, names) {
|
|
|
227
143
|
});
|
|
228
144
|
}
|
|
229
145
|
function $caa9439642c6336c$var$cleanupElement(el) {
|
|
230
|
-
|
|
146
|
+
el._x_effects?.forEach($caa9439642c6336c$var$dequeueJob);
|
|
147
|
+
while(el._x_cleanups?.length)el._x_cleanups.pop()();
|
|
231
148
|
}
|
|
232
149
|
var $caa9439642c6336c$var$observer = new MutationObserver($caa9439642c6336c$var$onMutate);
|
|
233
150
|
var $caa9439642c6336c$var$currentlyObserving = false;
|
|
@@ -245,21 +162,14 @@ function $caa9439642c6336c$var$stopObservingMutations() {
|
|
|
245
162
|
$caa9439642c6336c$var$observer.disconnect();
|
|
246
163
|
$caa9439642c6336c$var$currentlyObserving = false;
|
|
247
164
|
}
|
|
248
|
-
var $caa9439642c6336c$var$
|
|
249
|
-
var $caa9439642c6336c$var$willProcessRecordQueue = false;
|
|
165
|
+
var $caa9439642c6336c$var$queuedMutations = [];
|
|
250
166
|
function $caa9439642c6336c$var$flushObserver() {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
function $caa9439642c6336c$var$processRecordQueue() {
|
|
261
|
-
$caa9439642c6336c$var$onMutate($caa9439642c6336c$var$recordQueue);
|
|
262
|
-
$caa9439642c6336c$var$recordQueue.length = 0;
|
|
167
|
+
let records = $caa9439642c6336c$var$observer.takeRecords();
|
|
168
|
+
$caa9439642c6336c$var$queuedMutations.push(()=>records.length > 0 && $caa9439642c6336c$var$onMutate(records));
|
|
169
|
+
let queueLengthWhenTriggered = $caa9439642c6336c$var$queuedMutations.length;
|
|
170
|
+
queueMicrotask(()=>{
|
|
171
|
+
if ($caa9439642c6336c$var$queuedMutations.length === queueLengthWhenTriggered) while($caa9439642c6336c$var$queuedMutations.length > 0)$caa9439642c6336c$var$queuedMutations.shift()();
|
|
172
|
+
});
|
|
263
173
|
}
|
|
264
174
|
function $caa9439642c6336c$var$mutateDom(callback) {
|
|
265
175
|
if (!$caa9439642c6336c$var$currentlyObserving) return callback();
|
|
@@ -284,14 +194,26 @@ function $caa9439642c6336c$var$onMutate(mutations) {
|
|
|
284
194
|
return;
|
|
285
195
|
}
|
|
286
196
|
let addedNodes = [];
|
|
287
|
-
let removedNodes =
|
|
197
|
+
let removedNodes = /* @__PURE__ */ new Set();
|
|
288
198
|
let addedAttributes = /* @__PURE__ */ new Map();
|
|
289
199
|
let removedAttributes = /* @__PURE__ */ new Map();
|
|
290
200
|
for(let i = 0; i < mutations.length; i++){
|
|
291
201
|
if (mutations[i].target._x_ignoreMutationObserver) continue;
|
|
292
202
|
if (mutations[i].type === "childList") {
|
|
293
|
-
mutations[i].
|
|
294
|
-
|
|
203
|
+
mutations[i].removedNodes.forEach((node)=>{
|
|
204
|
+
if (node.nodeType !== 1) return;
|
|
205
|
+
if (!node._x_marker) return;
|
|
206
|
+
removedNodes.add(node);
|
|
207
|
+
});
|
|
208
|
+
mutations[i].addedNodes.forEach((node)=>{
|
|
209
|
+
if (node.nodeType !== 1) return;
|
|
210
|
+
if (removedNodes.has(node)) {
|
|
211
|
+
removedNodes.delete(node);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
if (node._x_marker) return;
|
|
215
|
+
addedNodes.push(node);
|
|
216
|
+
});
|
|
295
217
|
}
|
|
296
218
|
if (mutations[i].type === "attributes") {
|
|
297
219
|
let el = mutations[i].target;
|
|
@@ -322,27 +244,13 @@ function $caa9439642c6336c$var$onMutate(mutations) {
|
|
|
322
244
|
$caa9439642c6336c$var$onAttributeAddeds.forEach((i)=>i(el, attrs));
|
|
323
245
|
});
|
|
324
246
|
for (let node of removedNodes){
|
|
325
|
-
if (addedNodes.
|
|
247
|
+
if (addedNodes.some((i)=>i.contains(node))) continue;
|
|
326
248
|
$caa9439642c6336c$var$onElRemoveds.forEach((i)=>i(node));
|
|
327
|
-
$caa9439642c6336c$var$destroyTree(node);
|
|
328
249
|
}
|
|
329
|
-
addedNodes.forEach((node)=>{
|
|
330
|
-
node._x_ignoreSelf = true;
|
|
331
|
-
node._x_ignore = true;
|
|
332
|
-
});
|
|
333
250
|
for (let node of addedNodes){
|
|
334
|
-
if (removedNodes.includes(node)) continue;
|
|
335
251
|
if (!node.isConnected) continue;
|
|
336
|
-
delete node._x_ignoreSelf;
|
|
337
|
-
delete node._x_ignore;
|
|
338
252
|
$caa9439642c6336c$var$onElAddeds.forEach((i)=>i(node));
|
|
339
|
-
node._x_ignore = true;
|
|
340
|
-
node._x_ignoreSelf = true;
|
|
341
253
|
}
|
|
342
|
-
addedNodes.forEach((node)=>{
|
|
343
|
-
delete node._x_ignoreSelf;
|
|
344
|
-
delete node._x_ignore;
|
|
345
|
-
});
|
|
346
254
|
addedNodes = null;
|
|
347
255
|
removedNodes = null;
|
|
348
256
|
addedAttributes = null;
|
|
@@ -378,16 +286,16 @@ var $caa9439642c6336c$var$mergeProxyTrap = {
|
|
|
378
286
|
},
|
|
379
287
|
has ({ objects: objects }, name) {
|
|
380
288
|
if (name == Symbol.unscopables) return false;
|
|
381
|
-
return objects.some((obj)=>Object.prototype.hasOwnProperty.call(obj, name));
|
|
289
|
+
return objects.some((obj)=>Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name));
|
|
382
290
|
},
|
|
383
291
|
get ({ objects: objects }, name, thisProxy) {
|
|
384
292
|
if (name == "toJSON") return $caa9439642c6336c$var$collapseProxies;
|
|
385
|
-
return Reflect.get(objects.find((obj)=>
|
|
293
|
+
return Reflect.get(objects.find((obj)=>Reflect.has(obj, name)) || {}, name, thisProxy);
|
|
386
294
|
},
|
|
387
295
|
set ({ objects: objects }, name, value, thisProxy) {
|
|
388
296
|
const target = objects.find((obj)=>Object.prototype.hasOwnProperty.call(obj, name)) || objects[objects.length - 1];
|
|
389
297
|
const descriptor = Object.getOwnPropertyDescriptor(target, name);
|
|
390
|
-
if (descriptor?.set && descriptor?.get) return
|
|
298
|
+
if (descriptor?.set && descriptor?.get) return descriptor.set.call(thisProxy, value) || true;
|
|
391
299
|
return Reflect.set(target, name, value);
|
|
392
300
|
}
|
|
393
301
|
};
|
|
@@ -399,11 +307,12 @@ function $caa9439642c6336c$var$collapseProxies() {
|
|
|
399
307
|
}, {});
|
|
400
308
|
}
|
|
401
309
|
// packages/alpinejs/src/interceptor.js
|
|
402
|
-
function $caa9439642c6336c$var$
|
|
310
|
+
function $caa9439642c6336c$var$initInterceptors(data2) {
|
|
403
311
|
let isObject2 = (val)=>typeof val === "object" && !Array.isArray(val) && val !== null;
|
|
404
312
|
let recurse = (obj, basePath = "")=>{
|
|
405
313
|
Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value: value, enumerable: enumerable }])=>{
|
|
406
314
|
if (enumerable === false || value === void 0) return;
|
|
315
|
+
if (typeof value === "object" && value !== null && value.__v_skip) return;
|
|
407
316
|
let path = basePath === "" ? key : `${basePath}.${key}`;
|
|
408
317
|
if (typeof value === "object" && value !== null && value._x_interceptor) obj[key] = value.initialize(data2, path, key);
|
|
409
318
|
else if (isObject2(value) && value !== obj && !(value instanceof Element)) recurse(value, path);
|
|
@@ -453,29 +362,26 @@ function $caa9439642c6336c$var$magic(name, callback) {
|
|
|
453
362
|
$caa9439642c6336c$var$magics[name] = callback;
|
|
454
363
|
}
|
|
455
364
|
function $caa9439642c6336c$var$injectMagics(obj, el) {
|
|
365
|
+
let memoizedUtilities = $caa9439642c6336c$var$getUtilities(el);
|
|
456
366
|
Object.entries($caa9439642c6336c$var$magics).forEach(([name, callback])=>{
|
|
457
|
-
let memoizedUtilities = null;
|
|
458
|
-
function getUtilities() {
|
|
459
|
-
if (memoizedUtilities) return memoizedUtilities;
|
|
460
|
-
else {
|
|
461
|
-
let [utilities, cleanup2] = $caa9439642c6336c$var$getElementBoundUtilities(el);
|
|
462
|
-
memoizedUtilities = {
|
|
463
|
-
interceptor: $caa9439642c6336c$var$interceptor,
|
|
464
|
-
...utilities
|
|
465
|
-
};
|
|
466
|
-
$caa9439642c6336c$var$onElRemoved(el, cleanup2);
|
|
467
|
-
return memoizedUtilities;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
367
|
Object.defineProperty(obj, `$${name}`, {
|
|
471
368
|
get () {
|
|
472
|
-
return callback(el,
|
|
369
|
+
return callback(el, memoizedUtilities);
|
|
473
370
|
},
|
|
474
371
|
enumerable: false
|
|
475
372
|
});
|
|
476
373
|
});
|
|
477
374
|
return obj;
|
|
478
375
|
}
|
|
376
|
+
function $caa9439642c6336c$var$getUtilities(el) {
|
|
377
|
+
let [utilities, cleanup2] = $caa9439642c6336c$var$getElementBoundUtilities(el);
|
|
378
|
+
let utils = {
|
|
379
|
+
interceptor: $caa9439642c6336c$var$interceptor,
|
|
380
|
+
...utilities
|
|
381
|
+
};
|
|
382
|
+
$caa9439642c6336c$var$onElRemoved(el, cleanup2);
|
|
383
|
+
return utils;
|
|
384
|
+
}
|
|
479
385
|
// packages/alpinejs/src/utils/error.js
|
|
480
386
|
function $caa9439642c6336c$var$tryCatch(el, expression, callback, ...args) {
|
|
481
387
|
try {
|
|
@@ -485,7 +391,9 @@ function $caa9439642c6336c$var$tryCatch(el, expression, callback, ...args) {
|
|
|
485
391
|
}
|
|
486
392
|
}
|
|
487
393
|
function $caa9439642c6336c$var$handleError(error2, el, expression) {
|
|
488
|
-
Object.assign(error2
|
|
394
|
+
error2 = Object.assign(error2 ?? {
|
|
395
|
+
message: "No error message given."
|
|
396
|
+
}, {
|
|
489
397
|
el: el,
|
|
490
398
|
expression: expression
|
|
491
399
|
});
|
|
@@ -602,7 +510,7 @@ function $caa9439642c6336c$var$directive(name, callback) {
|
|
|
602
510
|
return {
|
|
603
511
|
before (directive2) {
|
|
604
512
|
if (!$caa9439642c6336c$var$directiveHandlers[directive2]) {
|
|
605
|
-
console.warn(
|
|
513
|
+
console.warn(String.raw`Cannot find directive \`${directive2}\`. \`${name}\` will use the default order of execution`);
|
|
606
514
|
return;
|
|
607
515
|
}
|
|
608
516
|
const pos = $caa9439642c6336c$var$directiveOrder.indexOf(directive2);
|
|
@@ -610,6 +518,9 @@ function $caa9439642c6336c$var$directive(name, callback) {
|
|
|
610
518
|
}
|
|
611
519
|
};
|
|
612
520
|
}
|
|
521
|
+
function $caa9439642c6336c$var$directiveExists(name) {
|
|
522
|
+
return Object.keys($caa9439642c6336c$var$directiveHandlers).includes(name);
|
|
523
|
+
}
|
|
613
524
|
function $caa9439642c6336c$var$directives(el, attributes, originalAttributeOverride) {
|
|
614
525
|
attributes = Array.from(attributes);
|
|
615
526
|
if (el._x_virtualDirectives) {
|
|
@@ -756,6 +667,147 @@ function $caa9439642c6336c$var$byPriority(a, b) {
|
|
|
756
667
|
let typeB = $caa9439642c6336c$var$directiveOrder.indexOf(b.type) === -1 ? $caa9439642c6336c$var$DEFAULT : b.type;
|
|
757
668
|
return $caa9439642c6336c$var$directiveOrder.indexOf(typeA) - $caa9439642c6336c$var$directiveOrder.indexOf(typeB);
|
|
758
669
|
}
|
|
670
|
+
// packages/alpinejs/src/utils/dispatch.js
|
|
671
|
+
function $caa9439642c6336c$var$dispatch(el, name, detail = {}) {
|
|
672
|
+
el.dispatchEvent(new CustomEvent(name, {
|
|
673
|
+
detail: detail,
|
|
674
|
+
bubbles: true,
|
|
675
|
+
// Allows events to pass the shadow DOM barrier.
|
|
676
|
+
composed: true,
|
|
677
|
+
cancelable: true
|
|
678
|
+
}));
|
|
679
|
+
}
|
|
680
|
+
// packages/alpinejs/src/utils/walk.js
|
|
681
|
+
function $caa9439642c6336c$var$walk(el, callback) {
|
|
682
|
+
if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) {
|
|
683
|
+
Array.from(el.children).forEach((el2)=>$caa9439642c6336c$var$walk(el2, callback));
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
let skip = false;
|
|
687
|
+
callback(el, ()=>skip = true);
|
|
688
|
+
if (skip) return;
|
|
689
|
+
let node = el.firstElementChild;
|
|
690
|
+
while(node){
|
|
691
|
+
$caa9439642c6336c$var$walk(node, callback, false);
|
|
692
|
+
node = node.nextElementSibling;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
// packages/alpinejs/src/utils/warn.js
|
|
696
|
+
function $caa9439642c6336c$var$warn(message, ...args) {
|
|
697
|
+
console.warn(`Alpine Warning: ${message}`, ...args);
|
|
698
|
+
}
|
|
699
|
+
// packages/alpinejs/src/lifecycle.js
|
|
700
|
+
var $caa9439642c6336c$var$started = false;
|
|
701
|
+
function $caa9439642c6336c$var$start() {
|
|
702
|
+
if ($caa9439642c6336c$var$started) $caa9439642c6336c$var$warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");
|
|
703
|
+
$caa9439642c6336c$var$started = true;
|
|
704
|
+
if (!document.body) $caa9439642c6336c$var$warn("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");
|
|
705
|
+
$caa9439642c6336c$var$dispatch(document, "alpine:init");
|
|
706
|
+
$caa9439642c6336c$var$dispatch(document, "alpine:initializing");
|
|
707
|
+
$caa9439642c6336c$var$startObservingMutations();
|
|
708
|
+
$caa9439642c6336c$var$onElAdded((el)=>$caa9439642c6336c$var$initTree(el, $caa9439642c6336c$var$walk));
|
|
709
|
+
$caa9439642c6336c$var$onElRemoved((el)=>$caa9439642c6336c$var$destroyTree(el));
|
|
710
|
+
$caa9439642c6336c$var$onAttributesAdded((el, attrs)=>{
|
|
711
|
+
$caa9439642c6336c$var$directives(el, attrs).forEach((handle)=>handle());
|
|
712
|
+
});
|
|
713
|
+
let outNestedComponents = (el)=>!$caa9439642c6336c$var$closestRoot(el.parentElement, true);
|
|
714
|
+
Array.from(document.querySelectorAll($caa9439642c6336c$var$allSelectors().join(","))).filter(outNestedComponents).forEach((el)=>{
|
|
715
|
+
$caa9439642c6336c$var$initTree(el);
|
|
716
|
+
});
|
|
717
|
+
$caa9439642c6336c$var$dispatch(document, "alpine:initialized");
|
|
718
|
+
setTimeout(()=>{
|
|
719
|
+
$caa9439642c6336c$var$warnAboutMissingPlugins();
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
var $caa9439642c6336c$var$rootSelectorCallbacks = [];
|
|
723
|
+
var $caa9439642c6336c$var$initSelectorCallbacks = [];
|
|
724
|
+
function $caa9439642c6336c$var$rootSelectors() {
|
|
725
|
+
return $caa9439642c6336c$var$rootSelectorCallbacks.map((fn)=>fn());
|
|
726
|
+
}
|
|
727
|
+
function $caa9439642c6336c$var$allSelectors() {
|
|
728
|
+
return $caa9439642c6336c$var$rootSelectorCallbacks.concat($caa9439642c6336c$var$initSelectorCallbacks).map((fn)=>fn());
|
|
729
|
+
}
|
|
730
|
+
function $caa9439642c6336c$var$addRootSelector(selectorCallback) {
|
|
731
|
+
$caa9439642c6336c$var$rootSelectorCallbacks.push(selectorCallback);
|
|
732
|
+
}
|
|
733
|
+
function $caa9439642c6336c$var$addInitSelector(selectorCallback) {
|
|
734
|
+
$caa9439642c6336c$var$initSelectorCallbacks.push(selectorCallback);
|
|
735
|
+
}
|
|
736
|
+
function $caa9439642c6336c$var$closestRoot(el, includeInitSelectors = false) {
|
|
737
|
+
return $caa9439642c6336c$var$findClosest(el, (element)=>{
|
|
738
|
+
const selectors = includeInitSelectors ? $caa9439642c6336c$var$allSelectors() : $caa9439642c6336c$var$rootSelectors();
|
|
739
|
+
if (selectors.some((selector)=>element.matches(selector))) return true;
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
function $caa9439642c6336c$var$findClosest(el, callback) {
|
|
743
|
+
if (!el) return;
|
|
744
|
+
if (callback(el)) return el;
|
|
745
|
+
if (el._x_teleportBack) el = el._x_teleportBack;
|
|
746
|
+
if (!el.parentElement) return;
|
|
747
|
+
return $caa9439642c6336c$var$findClosest(el.parentElement, callback);
|
|
748
|
+
}
|
|
749
|
+
function $caa9439642c6336c$var$isRoot(el) {
|
|
750
|
+
return $caa9439642c6336c$var$rootSelectors().some((selector)=>el.matches(selector));
|
|
751
|
+
}
|
|
752
|
+
var $caa9439642c6336c$var$initInterceptors2 = [];
|
|
753
|
+
function $caa9439642c6336c$var$interceptInit(callback) {
|
|
754
|
+
$caa9439642c6336c$var$initInterceptors2.push(callback);
|
|
755
|
+
}
|
|
756
|
+
var $caa9439642c6336c$var$markerDispenser = 1;
|
|
757
|
+
function $caa9439642c6336c$var$initTree(el, walker = $caa9439642c6336c$var$walk, intercept = ()=>{}) {
|
|
758
|
+
if ($caa9439642c6336c$var$findClosest(el, (i)=>i._x_ignore)) return;
|
|
759
|
+
$caa9439642c6336c$var$deferHandlingDirectives(()=>{
|
|
760
|
+
walker(el, (el2, skip)=>{
|
|
761
|
+
if (el2._x_marker) return;
|
|
762
|
+
intercept(el2, skip);
|
|
763
|
+
$caa9439642c6336c$var$initInterceptors2.forEach((i)=>i(el2, skip));
|
|
764
|
+
$caa9439642c6336c$var$directives(el2, el2.attributes).forEach((handle)=>handle());
|
|
765
|
+
if (!el2._x_ignore) el2._x_marker = $caa9439642c6336c$var$markerDispenser++;
|
|
766
|
+
el2._x_ignore && skip();
|
|
767
|
+
});
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
function $caa9439642c6336c$var$destroyTree(root, walker = $caa9439642c6336c$var$walk) {
|
|
771
|
+
walker(root, (el)=>{
|
|
772
|
+
$caa9439642c6336c$var$cleanupElement(el);
|
|
773
|
+
$caa9439642c6336c$var$cleanupAttributes(el);
|
|
774
|
+
delete el._x_marker;
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
function $caa9439642c6336c$var$warnAboutMissingPlugins() {
|
|
778
|
+
let pluginDirectives = [
|
|
779
|
+
[
|
|
780
|
+
"ui",
|
|
781
|
+
"dialog",
|
|
782
|
+
[
|
|
783
|
+
"[x-dialog], [x-popover]"
|
|
784
|
+
]
|
|
785
|
+
],
|
|
786
|
+
[
|
|
787
|
+
"anchor",
|
|
788
|
+
"anchor",
|
|
789
|
+
[
|
|
790
|
+
"[x-anchor]"
|
|
791
|
+
]
|
|
792
|
+
],
|
|
793
|
+
[
|
|
794
|
+
"sort",
|
|
795
|
+
"sort",
|
|
796
|
+
[
|
|
797
|
+
"[x-sort]"
|
|
798
|
+
]
|
|
799
|
+
]
|
|
800
|
+
];
|
|
801
|
+
pluginDirectives.forEach(([plugin2, directive2, selectors])=>{
|
|
802
|
+
if ($caa9439642c6336c$var$directiveExists(directive2)) return;
|
|
803
|
+
selectors.some((selector)=>{
|
|
804
|
+
if (document.querySelector(selector)) {
|
|
805
|
+
$caa9439642c6336c$var$warn(`found "${selector}", but missing ${plugin2} plugin`);
|
|
806
|
+
return true;
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
});
|
|
810
|
+
}
|
|
759
811
|
// packages/alpinejs/src/nextTick.js
|
|
760
812
|
var $caa9439642c6336c$var$tickStack = [];
|
|
761
813
|
var $caa9439642c6336c$var$isHolding = false;
|
|
@@ -1000,7 +1052,7 @@ window.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value
|
|
|
1000
1052
|
let carry = Promise.all([
|
|
1001
1053
|
el2._x_hidePromise,
|
|
1002
1054
|
...(el2._x_hideChildren || []).map(hideAfterChildren)
|
|
1003
|
-
]).then(([i])=>i());
|
|
1055
|
+
]).then(([i])=>i?.());
|
|
1004
1056
|
delete el2._x_hidePromise;
|
|
1005
1057
|
delete el2._x_hideChildren;
|
|
1006
1058
|
return carry;
|
|
@@ -1198,13 +1250,13 @@ function $caa9439642c6336c$var$bind(el, name, value, modifiers = []) {
|
|
|
1198
1250
|
}
|
|
1199
1251
|
}
|
|
1200
1252
|
function $caa9439642c6336c$var$bindInputValue(el, value) {
|
|
1201
|
-
if (el
|
|
1253
|
+
if ($caa9439642c6336c$var$isRadio(el)) {
|
|
1202
1254
|
if (el.attributes.value === void 0) el.value = value;
|
|
1203
1255
|
if (window.fromModel) {
|
|
1204
1256
|
if (typeof value === "boolean") el.checked = $caa9439642c6336c$var$safeParseBoolean(el.value) === value;
|
|
1205
1257
|
else el.checked = $caa9439642c6336c$var$checkedAttrLooseCompare(el.value, value);
|
|
1206
1258
|
}
|
|
1207
|
-
} else if (el
|
|
1259
|
+
} else if ($caa9439642c6336c$var$isCheckbox(el)) {
|
|
1208
1260
|
if (Number.isInteger(value)) el.value = value;
|
|
1209
1261
|
else if (!Array.isArray(value) && typeof value !== "boolean" && ![
|
|
1210
1262
|
null,
|
|
@@ -1280,35 +1332,37 @@ function $caa9439642c6336c$var$safeParseBoolean(rawValue) {
|
|
|
1280
1332
|
].includes(rawValue)) return false;
|
|
1281
1333
|
return rawValue ? Boolean(rawValue) : null;
|
|
1282
1334
|
}
|
|
1335
|
+
var $caa9439642c6336c$var$booleanAttributes = /* @__PURE__ */ new Set([
|
|
1336
|
+
"allowfullscreen",
|
|
1337
|
+
"async",
|
|
1338
|
+
"autofocus",
|
|
1339
|
+
"autoplay",
|
|
1340
|
+
"checked",
|
|
1341
|
+
"controls",
|
|
1342
|
+
"default",
|
|
1343
|
+
"defer",
|
|
1344
|
+
"disabled",
|
|
1345
|
+
"formnovalidate",
|
|
1346
|
+
"inert",
|
|
1347
|
+
"ismap",
|
|
1348
|
+
"itemscope",
|
|
1349
|
+
"loop",
|
|
1350
|
+
"multiple",
|
|
1351
|
+
"muted",
|
|
1352
|
+
"nomodule",
|
|
1353
|
+
"novalidate",
|
|
1354
|
+
"open",
|
|
1355
|
+
"playsinline",
|
|
1356
|
+
"readonly",
|
|
1357
|
+
"required",
|
|
1358
|
+
"reversed",
|
|
1359
|
+
"selected",
|
|
1360
|
+
"shadowrootclonable",
|
|
1361
|
+
"shadowrootdelegatesfocus",
|
|
1362
|
+
"shadowrootserializable"
|
|
1363
|
+
]);
|
|
1283
1364
|
function $caa9439642c6336c$var$isBooleanAttr(attrName) {
|
|
1284
|
-
|
|
1285
|
-
"disabled",
|
|
1286
|
-
"checked",
|
|
1287
|
-
"required",
|
|
1288
|
-
"readonly",
|
|
1289
|
-
"hidden",
|
|
1290
|
-
"open",
|
|
1291
|
-
"selected",
|
|
1292
|
-
"autofocus",
|
|
1293
|
-
"itemscope",
|
|
1294
|
-
"multiple",
|
|
1295
|
-
"novalidate",
|
|
1296
|
-
"allowfullscreen",
|
|
1297
|
-
"allowpaymentrequest",
|
|
1298
|
-
"formnovalidate",
|
|
1299
|
-
"autoplay",
|
|
1300
|
-
"controls",
|
|
1301
|
-
"loop",
|
|
1302
|
-
"muted",
|
|
1303
|
-
"playsinline",
|
|
1304
|
-
"default",
|
|
1305
|
-
"ismap",
|
|
1306
|
-
"reversed",
|
|
1307
|
-
"async",
|
|
1308
|
-
"defer",
|
|
1309
|
-
"nomodule"
|
|
1310
|
-
];
|
|
1311
|
-
return booleanAttributes.includes(attrName);
|
|
1365
|
+
return $caa9439642c6336c$var$booleanAttributes.has(attrName);
|
|
1312
1366
|
}
|
|
1313
1367
|
function $caa9439642c6336c$var$attributeShouldntBePreservedIfFalsy(name) {
|
|
1314
1368
|
return ![
|
|
@@ -1343,6 +1397,12 @@ function $caa9439642c6336c$var$getAttributeBinding(el, name, fallback) {
|
|
|
1343
1397
|
].includes(attr);
|
|
1344
1398
|
return attr;
|
|
1345
1399
|
}
|
|
1400
|
+
function $caa9439642c6336c$var$isCheckbox(el) {
|
|
1401
|
+
return el.type === "checkbox" || el.localName === "ui-checkbox" || el.localName === "ui-switch";
|
|
1402
|
+
}
|
|
1403
|
+
function $caa9439642c6336c$var$isRadio(el) {
|
|
1404
|
+
return el.type === "radio" || el.localName === "ui-radio";
|
|
1405
|
+
}
|
|
1346
1406
|
// packages/alpinejs/src/utils/debounce.js
|
|
1347
1407
|
function $caa9439642c6336c$var$debounce(func, wait) {
|
|
1348
1408
|
var timeout;
|
|
@@ -1372,25 +1432,21 @@ function $caa9439642c6336c$var$throttle(func, limit) {
|
|
|
1372
1432
|
function $caa9439642c6336c$var$entangle({ get: outerGet, set: outerSet }, { get: innerGet, set: innerSet }) {
|
|
1373
1433
|
let firstRun = true;
|
|
1374
1434
|
let outerHash;
|
|
1435
|
+
let innerHash;
|
|
1375
1436
|
let reference = $caa9439642c6336c$var$effect(()=>{
|
|
1376
|
-
|
|
1377
|
-
|
|
1437
|
+
let outer = outerGet();
|
|
1438
|
+
let inner = innerGet();
|
|
1378
1439
|
if (firstRun) {
|
|
1379
1440
|
innerSet($caa9439642c6336c$var$cloneIfObject(outer));
|
|
1380
1441
|
firstRun = false;
|
|
1381
|
-
outerHash = JSON.stringify(outer);
|
|
1382
1442
|
} else {
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
} else {
|
|
1388
|
-
outerSet($caa9439642c6336c$var$cloneIfObject(inner));
|
|
1389
|
-
outerHash = JSON.stringify(inner);
|
|
1390
|
-
}
|
|
1443
|
+
let outerHashLatest = JSON.stringify(outer);
|
|
1444
|
+
let innerHashLatest = JSON.stringify(inner);
|
|
1445
|
+
if (outerHashLatest !== outerHash) innerSet($caa9439642c6336c$var$cloneIfObject(outer));
|
|
1446
|
+
else if (outerHashLatest !== innerHashLatest) outerSet($caa9439642c6336c$var$cloneIfObject(inner));
|
|
1391
1447
|
}
|
|
1392
|
-
JSON.stringify(
|
|
1393
|
-
JSON.stringify(
|
|
1448
|
+
outerHash = JSON.stringify(outerGet());
|
|
1449
|
+
innerHash = JSON.stringify(innerGet());
|
|
1394
1450
|
});
|
|
1395
1451
|
return ()=>{
|
|
1396
1452
|
$caa9439642c6336c$var$release(reference);
|
|
@@ -1416,8 +1472,8 @@ function $caa9439642c6336c$var$store(name, value) {
|
|
|
1416
1472
|
}
|
|
1417
1473
|
if (value === void 0) return $caa9439642c6336c$var$stores[name];
|
|
1418
1474
|
$caa9439642c6336c$var$stores[name] = value;
|
|
1475
|
+
$caa9439642c6336c$var$initInterceptors($caa9439642c6336c$var$stores[name]);
|
|
1419
1476
|
if (typeof value === "object" && value !== null && value.hasOwnProperty("init") && typeof value.init === "function") $caa9439642c6336c$var$stores[name].init();
|
|
1420
|
-
$caa9439642c6336c$var$initInterceptors2($caa9439642c6336c$var$stores[name]);
|
|
1421
1477
|
}
|
|
1422
1478
|
function $caa9439642c6336c$var$getStores() {
|
|
1423
1479
|
return $caa9439642c6336c$var$stores;
|
|
@@ -1497,7 +1553,7 @@ var $caa9439642c6336c$var$Alpine = {
|
|
|
1497
1553
|
get raw () {
|
|
1498
1554
|
return $caa9439642c6336c$var$raw;
|
|
1499
1555
|
},
|
|
1500
|
-
version: "3.
|
|
1556
|
+
version: "3.14.9",
|
|
1501
1557
|
flushAndStopDeferringMutations: $caa9439642c6336c$var$flushAndStopDeferringMutations,
|
|
1502
1558
|
dontAutoEvaluateFunctions: $caa9439642c6336c$var$dontAutoEvaluateFunctions,
|
|
1503
1559
|
disableEffectScheduling: $caa9439642c6336c$var$disableEffectScheduling,
|
|
@@ -1550,6 +1606,7 @@ var $caa9439642c6336c$var$Alpine = {
|
|
|
1550
1606
|
// INTERNAL
|
|
1551
1607
|
bound: $caa9439642c6336c$var$getBinding,
|
|
1552
1608
|
$data: $caa9439642c6336c$var$scope,
|
|
1609
|
+
watch: $caa9439642c6336c$var$watch,
|
|
1553
1610
|
walk: $caa9439642c6336c$var$walk,
|
|
1554
1611
|
data: $caa9439642c6336c$var$data,
|
|
1555
1612
|
bind: $caa9439642c6336c$var$bind2
|
|
@@ -2125,20 +2182,15 @@ $caa9439642c6336c$var$magic("nextTick", ()=>$caa9439642c6336c$var$nextTick);
|
|
|
2125
2182
|
// packages/alpinejs/src/magics/$dispatch.js
|
|
2126
2183
|
$caa9439642c6336c$var$magic("dispatch", (el)=>$caa9439642c6336c$var$dispatch.bind($caa9439642c6336c$var$dispatch, el));
|
|
2127
2184
|
// packages/alpinejs/src/magics/$watch.js
|
|
2128
|
-
$caa9439642c6336c$var$magic("watch", (el, { evaluateLater: evaluateLater2,
|
|
2185
|
+
$caa9439642c6336c$var$magic("watch", (el, { evaluateLater: evaluateLater2, cleanup: cleanup2 })=>(key, callback)=>{
|
|
2129
2186
|
let evaluate2 = evaluateLater2(key);
|
|
2130
|
-
let
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
});
|
|
2138
|
-
else oldValue = value;
|
|
2139
|
-
firstTime = false;
|
|
2140
|
-
}));
|
|
2141
|
-
el._x_effects.delete(effectReference);
|
|
2187
|
+
let getter = ()=>{
|
|
2188
|
+
let value;
|
|
2189
|
+
evaluate2((i)=>value = i);
|
|
2190
|
+
return value;
|
|
2191
|
+
};
|
|
2192
|
+
let unwatch = $caa9439642c6336c$var$watch(getter, callback);
|
|
2193
|
+
cleanup2(unwatch);
|
|
2142
2194
|
});
|
|
2143
2195
|
// packages/alpinejs/src/magics/$store.js
|
|
2144
2196
|
$caa9439642c6336c$var$magic("store", $caa9439642c6336c$var$getStores);
|
|
@@ -2154,11 +2206,9 @@ $caa9439642c6336c$var$magic("refs", (el)=>{
|
|
|
2154
2206
|
});
|
|
2155
2207
|
function $caa9439642c6336c$var$getArrayOfRefObject(el) {
|
|
2156
2208
|
let refObjects = [];
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
currentEl = currentEl.parentNode;
|
|
2161
|
-
}
|
|
2209
|
+
$caa9439642c6336c$var$findClosest(el, (i)=>{
|
|
2210
|
+
if (i._x_refs) refObjects.push(i._x_refs);
|
|
2211
|
+
});
|
|
2162
2212
|
return refObjects;
|
|
2163
2213
|
}
|
|
2164
2214
|
// packages/alpinejs/src/ids.js
|
|
@@ -2177,11 +2227,27 @@ function $caa9439642c6336c$var$setIdRoot(el, name) {
|
|
|
2177
2227
|
if (!el._x_ids[name]) el._x_ids[name] = $caa9439642c6336c$var$findAndIncrementId(name);
|
|
2178
2228
|
}
|
|
2179
2229
|
// packages/alpinejs/src/magics/$id.js
|
|
2180
|
-
$caa9439642c6336c$var$magic("id", (el)=>(name, key = null)=>{
|
|
2181
|
-
let
|
|
2182
|
-
|
|
2183
|
-
|
|
2230
|
+
$caa9439642c6336c$var$magic("id", (el, { cleanup: cleanup2 })=>(name, key = null)=>{
|
|
2231
|
+
let cacheKey = `${name}${key ? `-${key}` : ""}`;
|
|
2232
|
+
return $caa9439642c6336c$var$cacheIdByNameOnElement(el, cacheKey, cleanup2, ()=>{
|
|
2233
|
+
let root = $caa9439642c6336c$var$closestIdRoot(el, name);
|
|
2234
|
+
let id = root ? root._x_ids[name] : $caa9439642c6336c$var$findAndIncrementId(name);
|
|
2235
|
+
return key ? `${name}-${id}-${key}` : `${name}-${id}`;
|
|
2236
|
+
});
|
|
2184
2237
|
});
|
|
2238
|
+
$caa9439642c6336c$var$interceptClone((from, to)=>{
|
|
2239
|
+
if (from._x_id) to._x_id = from._x_id;
|
|
2240
|
+
});
|
|
2241
|
+
function $caa9439642c6336c$var$cacheIdByNameOnElement(el, cacheKey, cleanup2, callback) {
|
|
2242
|
+
if (!el._x_id) el._x_id = {};
|
|
2243
|
+
if (el._x_id[cacheKey]) return el._x_id[cacheKey];
|
|
2244
|
+
let output = callback();
|
|
2245
|
+
el._x_id[cacheKey] = output;
|
|
2246
|
+
cleanup2(()=>{
|
|
2247
|
+
delete el._x_id[cacheKey];
|
|
2248
|
+
});
|
|
2249
|
+
return output;
|
|
2250
|
+
}
|
|
2185
2251
|
// packages/alpinejs/src/magics/$el.js
|
|
2186
2252
|
$caa9439642c6336c$var$magic("el", (el)=>el);
|
|
2187
2253
|
// packages/alpinejs/src/magics/index.js
|
|
@@ -2252,8 +2318,9 @@ $caa9439642c6336c$var$directive("teleport", (el, { modifiers: modifiers, express
|
|
|
2252
2318
|
};
|
|
2253
2319
|
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2254
2320
|
placeInDom(clone2, target, modifiers);
|
|
2255
|
-
$caa9439642c6336c$var$
|
|
2256
|
-
|
|
2321
|
+
$caa9439642c6336c$var$skipDuringClone(()=>{
|
|
2322
|
+
$caa9439642c6336c$var$initTree(clone2);
|
|
2323
|
+
})();
|
|
2257
2324
|
});
|
|
2258
2325
|
el._x_teleportPutBack = ()=>{
|
|
2259
2326
|
let target2 = $caa9439642c6336c$var$getTarget(expression);
|
|
@@ -2261,7 +2328,10 @@ $caa9439642c6336c$var$directive("teleport", (el, { modifiers: modifiers, express
|
|
|
2261
2328
|
placeInDom(el._x_teleport, target2, modifiers);
|
|
2262
2329
|
});
|
|
2263
2330
|
};
|
|
2264
|
-
cleanup2(()
|
|
2331
|
+
cleanup2(()=>$caa9439642c6336c$var$mutateDom(()=>{
|
|
2332
|
+
clone2.remove();
|
|
2333
|
+
$caa9439642c6336c$var$destroyTree(clone2);
|
|
2334
|
+
}));
|
|
2265
2335
|
});
|
|
2266
2336
|
var $caa9439642c6336c$var$teleportContainerDuringClone = document.createElement("div");
|
|
2267
2337
|
function $caa9439642c6336c$var$getTarget(expression) {
|
|
@@ -2316,8 +2386,9 @@ function $caa9439642c6336c$var$on(el, event, modifiers, callback) {
|
|
|
2316
2386
|
e.stopPropagation();
|
|
2317
2387
|
next(e);
|
|
2318
2388
|
});
|
|
2319
|
-
if (modifiers.includes("
|
|
2320
|
-
|
|
2389
|
+
if (modifiers.includes("once")) handler4 = wrapHandler(handler4, (next, e)=>{
|
|
2390
|
+
next(e);
|
|
2391
|
+
listenerTarget.removeEventListener(event, handler4, options);
|
|
2321
2392
|
});
|
|
2322
2393
|
if (modifiers.includes("away") || modifiers.includes("outside")) {
|
|
2323
2394
|
listenerTarget = document;
|
|
@@ -2329,14 +2400,11 @@ function $caa9439642c6336c$var$on(el, event, modifiers, callback) {
|
|
|
2329
2400
|
next(e);
|
|
2330
2401
|
});
|
|
2331
2402
|
}
|
|
2332
|
-
if (modifiers.includes("
|
|
2333
|
-
next(e);
|
|
2334
|
-
listenerTarget.removeEventListener(event, handler4, options);
|
|
2403
|
+
if (modifiers.includes("self")) handler4 = wrapHandler(handler4, (next, e)=>{
|
|
2404
|
+
e.target === el && next(e);
|
|
2335
2405
|
});
|
|
2336
|
-
handler4 = wrapHandler(handler4, (next, e)=>{
|
|
2337
|
-
if ($caa9439642c6336c$var$
|
|
2338
|
-
if ($caa9439642c6336c$var$isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) return;
|
|
2339
|
-
}
|
|
2406
|
+
if ($caa9439642c6336c$var$isKeyEvent(event) || $caa9439642c6336c$var$isClickEvent(event)) handler4 = wrapHandler(handler4, (next, e)=>{
|
|
2407
|
+
if ($caa9439642c6336c$var$isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) return;
|
|
2340
2408
|
next(e);
|
|
2341
2409
|
});
|
|
2342
2410
|
listenerTarget.addEventListener(event, handler4, options);
|
|
@@ -2366,6 +2434,13 @@ function $caa9439642c6336c$var$isKeyEvent(event) {
|
|
|
2366
2434
|
"keyup"
|
|
2367
2435
|
].includes(event);
|
|
2368
2436
|
}
|
|
2437
|
+
function $caa9439642c6336c$var$isClickEvent(event) {
|
|
2438
|
+
return [
|
|
2439
|
+
"contextmenu",
|
|
2440
|
+
"click",
|
|
2441
|
+
"mouse"
|
|
2442
|
+
].some((i)=>event.includes(i));
|
|
2443
|
+
}
|
|
2369
2444
|
function $caa9439642c6336c$var$isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {
|
|
2370
2445
|
let keyModifiers = modifiers.filter((i)=>{
|
|
2371
2446
|
return ![
|
|
@@ -2374,7 +2449,11 @@ function $caa9439642c6336c$var$isListeningForASpecificKeyThatHasntBeenPressed(e,
|
|
|
2374
2449
|
"prevent",
|
|
2375
2450
|
"stop",
|
|
2376
2451
|
"once",
|
|
2377
|
-
"capture"
|
|
2452
|
+
"capture",
|
|
2453
|
+
"self",
|
|
2454
|
+
"away",
|
|
2455
|
+
"outside",
|
|
2456
|
+
"passive"
|
|
2378
2457
|
].includes(i);
|
|
2379
2458
|
});
|
|
2380
2459
|
if (keyModifiers.includes("debounce")) {
|
|
@@ -2403,6 +2482,7 @@ function $caa9439642c6336c$var$isListeningForASpecificKeyThatHasntBeenPressed(e,
|
|
|
2403
2482
|
return e[`${modifier}Key`];
|
|
2404
2483
|
});
|
|
2405
2484
|
if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {
|
|
2485
|
+
if ($caa9439642c6336c$var$isClickEvent(e.type)) return false;
|
|
2406
2486
|
if ($caa9439642c6336c$var$keyToModifiers(e.key).includes(keyModifiers[0])) return false;
|
|
2407
2487
|
}
|
|
2408
2488
|
}
|
|
@@ -2423,6 +2503,7 @@ function $caa9439642c6336c$var$keyToModifiers(key) {
|
|
|
2423
2503
|
"left": "arrow-left",
|
|
2424
2504
|
"right": "arrow-right",
|
|
2425
2505
|
"period": ".",
|
|
2506
|
+
"comma": ",",
|
|
2426
2507
|
"equal": "=",
|
|
2427
2508
|
"minus": "-",
|
|
2428
2509
|
"underscore": "_"
|
|
@@ -2468,16 +2549,21 @@ $caa9439642c6336c$var$directive("model", (el, { modifiers: modifiers, expression
|
|
|
2468
2549
|
});
|
|
2469
2550
|
if (modifiers.includes("fill")) {
|
|
2470
2551
|
if ([
|
|
2552
|
+
void 0,
|
|
2471
2553
|
null,
|
|
2472
2554
|
""
|
|
2473
|
-
].includes(getValue()) || el
|
|
2555
|
+
].includes(getValue()) || $caa9439642c6336c$var$isCheckbox(el) && Array.isArray(getValue()) || el.tagName.toLowerCase() === "select" && el.multiple) setValue($caa9439642c6336c$var$getInputValue(el, modifiers, {
|
|
2556
|
+
target: el
|
|
2557
|
+
}, getValue()));
|
|
2474
2558
|
}
|
|
2475
2559
|
if (!el._x_removeModelListeners) el._x_removeModelListeners = {};
|
|
2476
2560
|
el._x_removeModelListeners["default"] = removeListener;
|
|
2477
2561
|
cleanup2(()=>el._x_removeModelListeners["default"]());
|
|
2478
2562
|
if (el.form) {
|
|
2479
2563
|
let removeResetListener = $caa9439642c6336c$var$on(el.form, "reset", [], (e)=>{
|
|
2480
|
-
$caa9439642c6336c$var$nextTick(()=>el._x_model && el._x_model.set(el
|
|
2564
|
+
$caa9439642c6336c$var$nextTick(()=>el._x_model && el._x_model.set($caa9439642c6336c$var$getInputValue(el, modifiers, {
|
|
2565
|
+
target: el
|
|
2566
|
+
}, getValue())));
|
|
2481
2567
|
});
|
|
2482
2568
|
cleanup2(()=>removeResetListener());
|
|
2483
2569
|
}
|
|
@@ -2504,13 +2590,13 @@ $caa9439642c6336c$var$directive("model", (el, { modifiers: modifiers, expression
|
|
|
2504
2590
|
function $caa9439642c6336c$var$getInputValue(el, modifiers, event, currentValue) {
|
|
2505
2591
|
return $caa9439642c6336c$var$mutateDom(()=>{
|
|
2506
2592
|
if (event instanceof CustomEvent && event.detail !== void 0) return event.detail !== null && event.detail !== void 0 ? event.detail : event.target.value;
|
|
2507
|
-
else if (el
|
|
2593
|
+
else if ($caa9439642c6336c$var$isCheckbox(el)) {
|
|
2508
2594
|
if (Array.isArray(currentValue)) {
|
|
2509
2595
|
let newValue = null;
|
|
2510
2596
|
if (modifiers.includes("number")) newValue = $caa9439642c6336c$var$safeParseNumber(event.target.value);
|
|
2511
2597
|
else if (modifiers.includes("boolean")) newValue = $caa9439642c6336c$var$safeParseBoolean(event.target.value);
|
|
2512
2598
|
else newValue = event.target.value;
|
|
2513
|
-
return event.target.checked ? currentValue.concat([
|
|
2599
|
+
return event.target.checked ? currentValue.includes(newValue) ? currentValue : currentValue.concat([
|
|
2514
2600
|
newValue
|
|
2515
2601
|
]) : currentValue.filter((el2)=>!$caa9439642c6336c$var$checkedAttrLooseCompare2(el2, newValue));
|
|
2516
2602
|
} else return event.target.checked;
|
|
@@ -2527,9 +2613,15 @@ function $caa9439642c6336c$var$getInputValue(el, modifiers, event, currentValue)
|
|
|
2527
2613
|
return option.value || option.text;
|
|
2528
2614
|
});
|
|
2529
2615
|
} else {
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2616
|
+
let newValue;
|
|
2617
|
+
if ($caa9439642c6336c$var$isRadio(el)) {
|
|
2618
|
+
if (event.target.checked) newValue = event.target.value;
|
|
2619
|
+
else newValue = currentValue;
|
|
2620
|
+
} else newValue = event.target.value;
|
|
2621
|
+
if (modifiers.includes("number")) return $caa9439642c6336c$var$safeParseNumber(newValue);
|
|
2622
|
+
else if (modifiers.includes("boolean")) return $caa9439642c6336c$var$safeParseBoolean(newValue);
|
|
2623
|
+
else if (modifiers.includes("trim")) return newValue.trim();
|
|
2624
|
+
else return newValue;
|
|
2533
2625
|
}
|
|
2534
2626
|
});
|
|
2535
2627
|
}
|
|
@@ -2581,7 +2673,7 @@ $caa9439642c6336c$var$directive("html", (el, { expression: expression }, { effec
|
|
|
2581
2673
|
});
|
|
2582
2674
|
// packages/alpinejs/src/directives/x-bind.js
|
|
2583
2675
|
$caa9439642c6336c$var$mapAttributes($caa9439642c6336c$var$startingWith(":", $caa9439642c6336c$var$into($caa9439642c6336c$var$prefix("bind:"))));
|
|
2584
|
-
var $caa9439642c6336c$var$handler2 = (el, { value: value, modifiers: modifiers, expression: expression, original: original }, { effect: effect3 })=>{
|
|
2676
|
+
var $caa9439642c6336c$var$handler2 = (el, { value: value, modifiers: modifiers, expression: expression, original: original }, { effect: effect3, cleanup: cleanup2 })=>{
|
|
2585
2677
|
if (!value) {
|
|
2586
2678
|
let bindingProviders = {};
|
|
2587
2679
|
$caa9439642c6336c$var$injectBindingProviders(bindingProviders);
|
|
@@ -2600,6 +2692,10 @@ var $caa9439642c6336c$var$handler2 = (el, { value: value, modifiers: modifiers,
|
|
|
2600
2692
|
if (result === void 0 && typeof expression === "string" && expression.match(/\./)) result = "";
|
|
2601
2693
|
$caa9439642c6336c$var$mutateDom(()=>$caa9439642c6336c$var$bind(el, value, result, modifiers));
|
|
2602
2694
|
}));
|
|
2695
|
+
cleanup2(()=>{
|
|
2696
|
+
el._x_undoAddedClasses && el._x_undoAddedClasses();
|
|
2697
|
+
el._x_undoAddedStyles && el._x_undoAddedStyles();
|
|
2698
|
+
});
|
|
2603
2699
|
};
|
|
2604
2700
|
$caa9439642c6336c$var$handler2.inline = (el, { value: value, modifiers: modifiers, expression: expression })=>{
|
|
2605
2701
|
if (!value) return;
|
|
@@ -2628,7 +2724,7 @@ $caa9439642c6336c$var$directive("data", (el, { expression: expression }, { clean
|
|
|
2628
2724
|
if (data2 === void 0 || data2 === true) data2 = {};
|
|
2629
2725
|
$caa9439642c6336c$var$injectMagics(data2, el);
|
|
2630
2726
|
let reactiveData = $caa9439642c6336c$var$reactive(data2);
|
|
2631
|
-
$caa9439642c6336c$var$
|
|
2727
|
+
$caa9439642c6336c$var$initInterceptors(reactiveData);
|
|
2632
2728
|
let undo = $caa9439642c6336c$var$addScopeToNode(el, reactiveData);
|
|
2633
2729
|
reactiveData["init"] && $caa9439642c6336c$var$evaluate(el, reactiveData["init"]);
|
|
2634
2730
|
cleanup2(()=>{
|
|
@@ -2694,7 +2790,10 @@ $caa9439642c6336c$var$directive("for", (el, { expression: expression }, { effect
|
|
|
2694
2790
|
el._x_lookup = {};
|
|
2695
2791
|
effect3(()=>$caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKey));
|
|
2696
2792
|
cleanup2(()=>{
|
|
2697
|
-
Object.values(el._x_lookup).forEach((el2)
|
|
2793
|
+
Object.values(el._x_lookup).forEach((el2)=>$caa9439642c6336c$var$mutateDom(()=>{
|
|
2794
|
+
$caa9439642c6336c$var$destroyTree(el2);
|
|
2795
|
+
el2.remove();
|
|
2796
|
+
}));
|
|
2698
2797
|
delete el._x_prevKeys;
|
|
2699
2798
|
delete el._x_lookup;
|
|
2700
2799
|
});
|
|
@@ -2711,7 +2810,10 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2711
2810
|
let keys = [];
|
|
2712
2811
|
if (isObject2(items)) items = Object.entries(items).map(([key, value])=>{
|
|
2713
2812
|
let scope2 = $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, value, key, items);
|
|
2714
|
-
evaluateKey((value2)=>
|
|
2813
|
+
evaluateKey((value2)=>{
|
|
2814
|
+
if (keys.includes(value2)) $caa9439642c6336c$var$warn("Duplicate key on x-for", el);
|
|
2815
|
+
keys.push(value2);
|
|
2816
|
+
}, {
|
|
2715
2817
|
scope: {
|
|
2716
2818
|
index: key,
|
|
2717
2819
|
...scope2
|
|
@@ -2721,7 +2823,10 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2721
2823
|
});
|
|
2722
2824
|
else for(let i = 0; i < items.length; i++){
|
|
2723
2825
|
let scope2 = $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, items[i], i, items);
|
|
2724
|
-
evaluateKey((value)=>
|
|
2826
|
+
evaluateKey((value)=>{
|
|
2827
|
+
if (keys.includes(value)) $caa9439642c6336c$var$warn("Duplicate key on x-for", el);
|
|
2828
|
+
keys.push(value);
|
|
2829
|
+
}, {
|
|
2725
2830
|
scope: {
|
|
2726
2831
|
index: i,
|
|
2727
2832
|
...scope2
|
|
@@ -2762,9 +2867,11 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2762
2867
|
}
|
|
2763
2868
|
for(let i = 0; i < removes.length; i++){
|
|
2764
2869
|
let key = removes[i];
|
|
2765
|
-
if (
|
|
2766
|
-
|
|
2767
|
-
|
|
2870
|
+
if (!(key in lookup)) continue;
|
|
2871
|
+
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2872
|
+
$caa9439642c6336c$var$destroyTree(lookup[key]);
|
|
2873
|
+
lookup[key].remove();
|
|
2874
|
+
});
|
|
2768
2875
|
delete lookup[key];
|
|
2769
2876
|
}
|
|
2770
2877
|
for(let i = 0; i < moves.length; i++){
|
|
@@ -2773,7 +2880,7 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2773
2880
|
let elForSpot = lookup[keyForSpot];
|
|
2774
2881
|
let marker = document.createElement("div");
|
|
2775
2882
|
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2776
|
-
if (!elForSpot) $caa9439642c6336c$var$warn(`x-for ":key" is undefined or invalid`, templateEl);
|
|
2883
|
+
if (!elForSpot) $caa9439642c6336c$var$warn(`x-for ":key" is undefined or invalid`, templateEl, keyForSpot, lookup);
|
|
2777
2884
|
elForSpot.after(marker);
|
|
2778
2885
|
elInSpot.after(elForSpot);
|
|
2779
2886
|
elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl);
|
|
@@ -2799,7 +2906,7 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2799
2906
|
};
|
|
2800
2907
|
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2801
2908
|
lastEl.after(clone2);
|
|
2802
|
-
$caa9439642c6336c$var$initTree(clone2);
|
|
2909
|
+
$caa9439642c6336c$var$skipDuringClone(()=>$caa9439642c6336c$var$initTree(clone2))();
|
|
2803
2910
|
});
|
|
2804
2911
|
if (typeof key === "object") $caa9439642c6336c$var$warn("x-for key cannot be an object, it must be a string or an integer", templateEl);
|
|
2805
2912
|
lookup[key] = clone2;
|
|
@@ -2864,14 +2971,14 @@ $caa9439642c6336c$var$directive("if", (el, { expression: expression }, { effect:
|
|
|
2864
2971
|
$caa9439642c6336c$var$addScopeToNode(clone2, {}, el);
|
|
2865
2972
|
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2866
2973
|
el.after(clone2);
|
|
2867
|
-
$caa9439642c6336c$var$initTree(clone2);
|
|
2974
|
+
$caa9439642c6336c$var$skipDuringClone(()=>$caa9439642c6336c$var$initTree(clone2))();
|
|
2868
2975
|
});
|
|
2869
2976
|
el._x_currentIfEl = clone2;
|
|
2870
2977
|
el._x_undoIf = ()=>{
|
|
2871
|
-
$caa9439642c6336c$var$
|
|
2872
|
-
|
|
2978
|
+
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2979
|
+
$caa9439642c6336c$var$destroyTree(clone2);
|
|
2980
|
+
clone2.remove();
|
|
2873
2981
|
});
|
|
2874
|
-
clone2.remove();
|
|
2875
2982
|
delete el._x_currentIfEl;
|
|
2876
2983
|
};
|
|
2877
2984
|
return clone2;
|
|
@@ -2891,6 +2998,9 @@ $caa9439642c6336c$var$directive("id", (el, { expression: expression }, { evaluat
|
|
|
2891
2998
|
let names = evaluate2(expression);
|
|
2892
2999
|
names.forEach((name)=>$caa9439642c6336c$var$setIdRoot(el, name));
|
|
2893
3000
|
});
|
|
3001
|
+
$caa9439642c6336c$var$interceptClone((from, to)=>{
|
|
3002
|
+
if (from._x_ids) to._x_ids = from._x_ids;
|
|
3003
|
+
});
|
|
2894
3004
|
// packages/alpinejs/src/directives/x-on.js
|
|
2895
3005
|
$caa9439642c6336c$var$mapAttributes($caa9439642c6336c$var$startingWith("@", $caa9439642c6336c$var$into($caa9439642c6336c$var$prefix("on:"))));
|
|
2896
3006
|
$caa9439642c6336c$var$directive("on", $caa9439642c6336c$var$skipDuringClone((el, { value: value, modifiers: modifiers, expression: expression }, { cleanup: cleanup2 })=>{
|
|
@@ -2927,95 +3037,137 @@ $caa9439642c6336c$var$alpine_default.setReactivityEngine({
|
|
|
2927
3037
|
release: $caa9439642c6336c$var$stop,
|
|
2928
3038
|
raw: $caa9439642c6336c$var$toRaw
|
|
2929
3039
|
});
|
|
2930
|
-
var $caa9439642c6336c$
|
|
3040
|
+
var $caa9439642c6336c$export$b7ee041e4ad2afec = $caa9439642c6336c$var$alpine_default;
|
|
2931
3041
|
// packages/alpinejs/builds/module.js
|
|
2932
|
-
var $caa9439642c6336c$export$2e2bcd8739ae039 = $caa9439642c6336c$
|
|
3042
|
+
var $caa9439642c6336c$export$2e2bcd8739ae039 = $caa9439642c6336c$export$b7ee041e4ad2afec;
|
|
2933
3043
|
|
|
2934
3044
|
|
|
2935
3045
|
// packages/morph/src/morph.js
|
|
2936
|
-
function $512e3a9270ec7803$
|
|
3046
|
+
function $512e3a9270ec7803$var$morph(from, toHtml, options) {
|
|
3047
|
+
$512e3a9270ec7803$var$monkeyPatchDomSetAttributeToAllowAtSymbols();
|
|
3048
|
+
let context = $512e3a9270ec7803$var$createMorphContext(options);
|
|
3049
|
+
let toEl = typeof toHtml === "string" ? $512e3a9270ec7803$var$createElement(toHtml) : toHtml;
|
|
3050
|
+
if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {
|
|
3051
|
+
toEl._x_dataStack = window.Alpine.closestDataStack(from);
|
|
3052
|
+
toEl._x_dataStack && window.Alpine.cloneNode(from, toEl);
|
|
3053
|
+
}
|
|
3054
|
+
context.patch(from, toEl);
|
|
3055
|
+
return from;
|
|
3056
|
+
}
|
|
3057
|
+
function $512e3a9270ec7803$var$morphBetween(startMarker, endMarker, toHtml, options = {}) {
|
|
2937
3058
|
$512e3a9270ec7803$var$monkeyPatchDomSetAttributeToAllowAtSymbols();
|
|
2938
|
-
let
|
|
2939
|
-
let
|
|
2940
|
-
let
|
|
2941
|
-
|
|
2942
|
-
let
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
3059
|
+
let context = $512e3a9270ec7803$var$createMorphContext(options);
|
|
3060
|
+
let fromContainer = startMarker.parentNode;
|
|
3061
|
+
let fromBlock = new $512e3a9270ec7803$var$Block(startMarker, endMarker);
|
|
3062
|
+
let toContainer = typeof toHtml === "string" ? (()=>{
|
|
3063
|
+
let container = document.createElement("div");
|
|
3064
|
+
container.insertAdjacentHTML("beforeend", toHtml);
|
|
3065
|
+
return container;
|
|
3066
|
+
})() : toHtml;
|
|
3067
|
+
let toStartMarker = document.createComment("[morph-start]");
|
|
3068
|
+
let toEndMarker = document.createComment("[morph-end]");
|
|
3069
|
+
toContainer.insertBefore(toStartMarker, toContainer.firstChild);
|
|
3070
|
+
toContainer.appendChild(toEndMarker);
|
|
3071
|
+
let toBlock = new $512e3a9270ec7803$var$Block(toStartMarker, toEndMarker);
|
|
3072
|
+
if (window.Alpine && window.Alpine.closestDataStack) {
|
|
3073
|
+
toContainer._x_dataStack = window.Alpine.closestDataStack(fromContainer);
|
|
3074
|
+
toContainer._x_dataStack && window.Alpine.cloneNode(fromContainer, toContainer);
|
|
3075
|
+
}
|
|
3076
|
+
context.patchChildren(fromBlock, toBlock);
|
|
3077
|
+
}
|
|
3078
|
+
function $512e3a9270ec7803$var$createMorphContext(options = {}) {
|
|
3079
|
+
let defaultGetKey = (el)=>el.getAttribute("key");
|
|
3080
|
+
let noop = ()=>{};
|
|
3081
|
+
let context = {
|
|
3082
|
+
key: options.key || defaultGetKey,
|
|
3083
|
+
lookahead: options.lookahead || false,
|
|
3084
|
+
updating: options.updating || noop,
|
|
3085
|
+
updated: options.updated || noop,
|
|
3086
|
+
removing: options.removing || noop,
|
|
3087
|
+
removed: options.removed || noop,
|
|
3088
|
+
adding: options.adding || noop,
|
|
3089
|
+
added: options.added || noop
|
|
3090
|
+
};
|
|
3091
|
+
context.patch = function(from, to) {
|
|
3092
|
+
if (context.differentElementNamesTypesOrKeys(from, to)) return context.swapElements(from, to);
|
|
2955
3093
|
let updateChildrenOnly = false;
|
|
2956
|
-
|
|
2957
|
-
|
|
3094
|
+
let skipChildren = false;
|
|
3095
|
+
let skipUntil = (predicate)=>context.skipUntilCondition = predicate;
|
|
3096
|
+
if ($512e3a9270ec7803$var$shouldSkipChildren(context.updating, ()=>skipChildren = true, skipUntil, from, to, ()=>updateChildrenOnly = true)) return;
|
|
3097
|
+
if (from.nodeType === 1 && window.Alpine) {
|
|
3098
|
+
window.Alpine.cloneNode(from, to);
|
|
3099
|
+
if (from._x_teleport && to._x_teleport) context.patch(from._x_teleport, to._x_teleport);
|
|
3100
|
+
}
|
|
2958
3101
|
if ($512e3a9270ec7803$var$textOrComment(to)) {
|
|
2959
|
-
patchNodeValue(
|
|
2960
|
-
updated(
|
|
3102
|
+
context.patchNodeValue(from, to);
|
|
3103
|
+
context.updated(from, to);
|
|
2961
3104
|
return;
|
|
2962
3105
|
}
|
|
2963
|
-
if (!updateChildrenOnly) patchAttributes(
|
|
2964
|
-
updated(
|
|
2965
|
-
patchChildren(
|
|
2966
|
-
}
|
|
2967
|
-
function
|
|
2968
|
-
return
|
|
2969
|
-
}
|
|
2970
|
-
function
|
|
2971
|
-
if ($512e3a9270ec7803$var$shouldSkip(removing,
|
|
3106
|
+
if (!updateChildrenOnly) context.patchAttributes(from, to);
|
|
3107
|
+
context.updated(from, to);
|
|
3108
|
+
if (!skipChildren) context.patchChildren(from, to);
|
|
3109
|
+
};
|
|
3110
|
+
context.differentElementNamesTypesOrKeys = function(from, to) {
|
|
3111
|
+
return from.nodeType != to.nodeType || from.nodeName != to.nodeName || context.getKey(from) != context.getKey(to);
|
|
3112
|
+
};
|
|
3113
|
+
context.swapElements = function(from, to) {
|
|
3114
|
+
if ($512e3a9270ec7803$var$shouldSkip(context.removing, from)) return;
|
|
2972
3115
|
let toCloned = to.cloneNode(true);
|
|
2973
|
-
if ($512e3a9270ec7803$var$shouldSkip(adding, toCloned)) return;
|
|
2974
|
-
|
|
2975
|
-
removed(
|
|
2976
|
-
added(toCloned);
|
|
2977
|
-
}
|
|
2978
|
-
function
|
|
3116
|
+
if ($512e3a9270ec7803$var$shouldSkip(context.adding, toCloned)) return;
|
|
3117
|
+
from.replaceWith(toCloned);
|
|
3118
|
+
context.removed(from);
|
|
3119
|
+
context.added(toCloned);
|
|
3120
|
+
};
|
|
3121
|
+
context.patchNodeValue = function(from, to) {
|
|
2979
3122
|
let value = to.nodeValue;
|
|
2980
|
-
if (
|
|
2981
|
-
}
|
|
2982
|
-
function
|
|
2983
|
-
if (
|
|
2984
|
-
if (
|
|
2985
|
-
if (!
|
|
2986
|
-
let domAttributes = Array.from(
|
|
3123
|
+
if (from.nodeValue !== value) from.nodeValue = value;
|
|
3124
|
+
};
|
|
3125
|
+
context.patchAttributes = function(from, to) {
|
|
3126
|
+
if (from._x_transitioning) return;
|
|
3127
|
+
if (from._x_isShown && !to._x_isShown) return;
|
|
3128
|
+
if (!from._x_isShown && to._x_isShown) return;
|
|
3129
|
+
let domAttributes = Array.from(from.attributes);
|
|
2987
3130
|
let toAttributes = Array.from(to.attributes);
|
|
2988
3131
|
for(let i = domAttributes.length - 1; i >= 0; i--){
|
|
2989
3132
|
let name = domAttributes[i].name;
|
|
2990
|
-
if (!to.hasAttribute(name))
|
|
3133
|
+
if (!to.hasAttribute(name)) from.removeAttribute(name);
|
|
2991
3134
|
}
|
|
2992
3135
|
for(let i = toAttributes.length - 1; i >= 0; i--){
|
|
2993
3136
|
let name = toAttributes[i].name;
|
|
2994
3137
|
let value = toAttributes[i].value;
|
|
2995
|
-
if (
|
|
3138
|
+
if (from.getAttribute(name) !== value) from.setAttribute(name, value);
|
|
2996
3139
|
}
|
|
2997
|
-
}
|
|
2998
|
-
function
|
|
2999
|
-
|
|
3000
|
-
if (to._x_teleport) to = to._x_teleport;
|
|
3001
|
-
let fromKeys = keyToMap(from2.children);
|
|
3140
|
+
};
|
|
3141
|
+
context.patchChildren = function(from, to) {
|
|
3142
|
+
let fromKeys = context.keyToMap(from.children);
|
|
3002
3143
|
let fromKeyHoldovers = {};
|
|
3003
3144
|
let currentTo = $512e3a9270ec7803$var$getFirstNode(to);
|
|
3004
|
-
let currentFrom = $512e3a9270ec7803$var$getFirstNode(
|
|
3145
|
+
let currentFrom = $512e3a9270ec7803$var$getFirstNode(from);
|
|
3005
3146
|
while(currentTo){
|
|
3006
3147
|
$512e3a9270ec7803$var$seedingMatchingId(currentTo, currentFrom);
|
|
3007
|
-
let toKey = getKey(currentTo);
|
|
3008
|
-
let fromKey = getKey(currentFrom);
|
|
3148
|
+
let toKey = context.getKey(currentTo);
|
|
3149
|
+
let fromKey = context.getKey(currentFrom);
|
|
3150
|
+
if (context.skipUntilCondition) {
|
|
3151
|
+
let fromDone = !currentFrom || context.skipUntilCondition(currentFrom);
|
|
3152
|
+
let toDone = !currentTo || context.skipUntilCondition(currentTo);
|
|
3153
|
+
if (fromDone && toDone) context.skipUntilCondition = null;
|
|
3154
|
+
else {
|
|
3155
|
+
if (!fromDone) currentFrom = currentFrom && $512e3a9270ec7803$var$getNextSibling(from, currentFrom);
|
|
3156
|
+
if (!toDone) currentTo = currentTo && $512e3a9270ec7803$var$getNextSibling(to, currentTo);
|
|
3157
|
+
continue;
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3009
3160
|
if (!currentFrom) {
|
|
3010
3161
|
if (toKey && fromKeyHoldovers[toKey]) {
|
|
3011
3162
|
let holdover = fromKeyHoldovers[toKey];
|
|
3012
|
-
|
|
3163
|
+
from.appendChild(holdover);
|
|
3013
3164
|
currentFrom = holdover;
|
|
3165
|
+
fromKey = context.getKey(currentFrom);
|
|
3014
3166
|
} else {
|
|
3015
|
-
if (!$512e3a9270ec7803$var$shouldSkip(adding, currentTo)) {
|
|
3167
|
+
if (!$512e3a9270ec7803$var$shouldSkip(context.adding, currentTo)) {
|
|
3016
3168
|
let clone = currentTo.cloneNode(true);
|
|
3017
|
-
|
|
3018
|
-
added(clone);
|
|
3169
|
+
from.appendChild(clone);
|
|
3170
|
+
context.added(clone);
|
|
3019
3171
|
}
|
|
3020
3172
|
currentTo = $512e3a9270ec7803$var$getNextSibling(to, currentTo);
|
|
3021
3173
|
continue;
|
|
@@ -3027,7 +3179,7 @@ function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(from, toHtml, options) {
|
|
|
3027
3179
|
let nestedIfCount = 0;
|
|
3028
3180
|
let fromBlockStart = currentFrom;
|
|
3029
3181
|
while(currentFrom){
|
|
3030
|
-
let next = $512e3a9270ec7803$var$getNextSibling(
|
|
3182
|
+
let next = $512e3a9270ec7803$var$getNextSibling(from, currentFrom);
|
|
3031
3183
|
if (isIf(next)) nestedIfCount++;
|
|
3032
3184
|
else if (isEnd(next) && nestedIfCount > 0) nestedIfCount--;
|
|
3033
3185
|
else if (isEnd(next) && nestedIfCount === 0) {
|
|
@@ -3052,17 +3204,17 @@ function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(from, toHtml, options) {
|
|
|
3052
3204
|
let toBlockEnd = currentTo;
|
|
3053
3205
|
let fromBlock = new $512e3a9270ec7803$var$Block(fromBlockStart, fromBlockEnd);
|
|
3054
3206
|
let toBlock = new $512e3a9270ec7803$var$Block(toBlockStart, toBlockEnd);
|
|
3055
|
-
patchChildren(fromBlock, toBlock);
|
|
3207
|
+
context.patchChildren(fromBlock, toBlock);
|
|
3056
3208
|
continue;
|
|
3057
3209
|
}
|
|
3058
|
-
if (currentFrom.nodeType === 1 && lookahead && !currentFrom.isEqualNode(currentTo)) {
|
|
3210
|
+
if (currentFrom.nodeType === 1 && context.lookahead && !currentFrom.isEqualNode(currentTo)) {
|
|
3059
3211
|
let nextToElementSibling = $512e3a9270ec7803$var$getNextSibling(to, currentTo);
|
|
3060
3212
|
let found = false;
|
|
3061
3213
|
while(!found && nextToElementSibling){
|
|
3062
3214
|
if (nextToElementSibling.nodeType === 1 && currentFrom.isEqualNode(nextToElementSibling)) {
|
|
3063
3215
|
found = true;
|
|
3064
|
-
currentFrom = addNodeBefore(
|
|
3065
|
-
fromKey = getKey(currentFrom);
|
|
3216
|
+
currentFrom = context.addNodeBefore(from, currentTo, currentFrom);
|
|
3217
|
+
fromKey = context.getKey(currentFrom);
|
|
3066
3218
|
}
|
|
3067
3219
|
nextToElementSibling = $512e3a9270ec7803$var$getNextSibling(to, nextToElementSibling);
|
|
3068
3220
|
}
|
|
@@ -3070,9 +3222,9 @@ function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(from, toHtml, options) {
|
|
|
3070
3222
|
if (toKey !== fromKey) {
|
|
3071
3223
|
if (!toKey && fromKey) {
|
|
3072
3224
|
fromKeyHoldovers[fromKey] = currentFrom;
|
|
3073
|
-
currentFrom = addNodeBefore(
|
|
3225
|
+
currentFrom = context.addNodeBefore(from, currentTo, currentFrom);
|
|
3074
3226
|
fromKeyHoldovers[fromKey].remove();
|
|
3075
|
-
currentFrom = $512e3a9270ec7803$var$getNextSibling(
|
|
3227
|
+
currentFrom = $512e3a9270ec7803$var$getNextSibling(from, currentFrom);
|
|
3076
3228
|
currentTo = $512e3a9270ec7803$var$getNextSibling(to, currentTo);
|
|
3077
3229
|
continue;
|
|
3078
3230
|
}
|
|
@@ -3080,6 +3232,7 @@ function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(from, toHtml, options) {
|
|
|
3080
3232
|
if (fromKeys[toKey]) {
|
|
3081
3233
|
currentFrom.replaceWith(fromKeys[toKey]);
|
|
3082
3234
|
currentFrom = fromKeys[toKey];
|
|
3235
|
+
fromKey = context.getKey(currentFrom);
|
|
3083
3236
|
}
|
|
3084
3237
|
}
|
|
3085
3238
|
if (toKey && fromKey) {
|
|
@@ -3088,71 +3241,67 @@ function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(from, toHtml, options) {
|
|
|
3088
3241
|
fromKeyHoldovers[fromKey] = currentFrom;
|
|
3089
3242
|
currentFrom.replaceWith(fromKeyNode);
|
|
3090
3243
|
currentFrom = fromKeyNode;
|
|
3244
|
+
fromKey = context.getKey(currentFrom);
|
|
3091
3245
|
} else {
|
|
3092
3246
|
fromKeyHoldovers[fromKey] = currentFrom;
|
|
3093
|
-
currentFrom = addNodeBefore(
|
|
3247
|
+
currentFrom = context.addNodeBefore(from, currentTo, currentFrom);
|
|
3094
3248
|
fromKeyHoldovers[fromKey].remove();
|
|
3095
|
-
currentFrom = $512e3a9270ec7803$var$getNextSibling(
|
|
3249
|
+
currentFrom = $512e3a9270ec7803$var$getNextSibling(from, currentFrom);
|
|
3096
3250
|
currentTo = $512e3a9270ec7803$var$getNextSibling(to, currentTo);
|
|
3097
3251
|
continue;
|
|
3098
3252
|
}
|
|
3099
3253
|
}
|
|
3100
3254
|
}
|
|
3101
|
-
let currentFromNext = currentFrom && $512e3a9270ec7803$var$getNextSibling(
|
|
3102
|
-
patch(currentFrom, currentTo);
|
|
3255
|
+
let currentFromNext = currentFrom && $512e3a9270ec7803$var$getNextSibling(from, currentFrom);
|
|
3256
|
+
context.patch(currentFrom, currentTo);
|
|
3103
3257
|
currentTo = currentTo && $512e3a9270ec7803$var$getNextSibling(to, currentTo);
|
|
3104
3258
|
currentFrom = currentFromNext;
|
|
3105
3259
|
}
|
|
3106
3260
|
let removals = [];
|
|
3107
3261
|
while(currentFrom){
|
|
3108
|
-
if (!$512e3a9270ec7803$var$shouldSkip(removing, currentFrom)) removals.push(currentFrom);
|
|
3109
|
-
currentFrom = $512e3a9270ec7803$var$getNextSibling(
|
|
3262
|
+
if (!$512e3a9270ec7803$var$shouldSkip(context.removing, currentFrom)) removals.push(currentFrom);
|
|
3263
|
+
currentFrom = $512e3a9270ec7803$var$getNextSibling(from, currentFrom);
|
|
3110
3264
|
}
|
|
3111
3265
|
while(removals.length){
|
|
3112
3266
|
let domForRemoval = removals.shift();
|
|
3113
3267
|
domForRemoval.remove();
|
|
3114
|
-
removed(domForRemoval);
|
|
3268
|
+
context.removed(domForRemoval);
|
|
3115
3269
|
}
|
|
3116
|
-
}
|
|
3117
|
-
function
|
|
3118
|
-
return el && el.nodeType === 1 && key(el);
|
|
3119
|
-
}
|
|
3120
|
-
function
|
|
3270
|
+
};
|
|
3271
|
+
context.getKey = function(el) {
|
|
3272
|
+
return el && el.nodeType === 1 && context.key(el);
|
|
3273
|
+
};
|
|
3274
|
+
context.keyToMap = function(els) {
|
|
3121
3275
|
let map = {};
|
|
3122
3276
|
for (let el of els){
|
|
3123
|
-
let theKey = getKey(el);
|
|
3277
|
+
let theKey = context.getKey(el);
|
|
3124
3278
|
if (theKey) map[theKey] = el;
|
|
3125
3279
|
}
|
|
3126
3280
|
return map;
|
|
3127
|
-
}
|
|
3128
|
-
function
|
|
3129
|
-
if (!$512e3a9270ec7803$var$shouldSkip(adding, node)) {
|
|
3281
|
+
};
|
|
3282
|
+
context.addNodeBefore = function(parent, node, beforeMe) {
|
|
3283
|
+
if (!$512e3a9270ec7803$var$shouldSkip(context.adding, node)) {
|
|
3130
3284
|
let clone = node.cloneNode(true);
|
|
3131
3285
|
parent.insertBefore(clone, beforeMe);
|
|
3132
|
-
added(clone);
|
|
3286
|
+
context.added(clone);
|
|
3133
3287
|
return clone;
|
|
3134
3288
|
}
|
|
3135
3289
|
return node;
|
|
3136
|
-
}
|
|
3137
|
-
|
|
3138
|
-
fromEl = from;
|
|
3139
|
-
toEl = typeof toHtml === "string" ? $512e3a9270ec7803$var$createElement(toHtml) : toHtml;
|
|
3140
|
-
if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {
|
|
3141
|
-
toEl._x_dataStack = window.Alpine.closestDataStack(from);
|
|
3142
|
-
toEl._x_dataStack && window.Alpine.cloneNode(from, toEl);
|
|
3143
|
-
}
|
|
3144
|
-
patch(from, toEl);
|
|
3145
|
-
fromEl = void 0;
|
|
3146
|
-
toEl = void 0;
|
|
3147
|
-
return from;
|
|
3290
|
+
};
|
|
3291
|
+
return context;
|
|
3148
3292
|
}
|
|
3149
|
-
$512e3a9270ec7803$
|
|
3150
|
-
$512e3a9270ec7803$
|
|
3293
|
+
$512e3a9270ec7803$var$morph.step = ()=>{};
|
|
3294
|
+
$512e3a9270ec7803$var$morph.log = ()=>{};
|
|
3151
3295
|
function $512e3a9270ec7803$var$shouldSkip(hook, ...args) {
|
|
3152
3296
|
let skip = false;
|
|
3153
3297
|
hook(...args, ()=>skip = true);
|
|
3154
3298
|
return skip;
|
|
3155
3299
|
}
|
|
3300
|
+
function $512e3a9270ec7803$var$shouldSkipChildren(hook, skipChildren, skipUntil, ...args) {
|
|
3301
|
+
let skip = false;
|
|
3302
|
+
hook(...args, ()=>skip = true, skipChildren, skipUntil);
|
|
3303
|
+
return skip;
|
|
3304
|
+
}
|
|
3156
3305
|
var $512e3a9270ec7803$var$patched = false;
|
|
3157
3306
|
function $512e3a9270ec7803$var$createElement(html) {
|
|
3158
3307
|
const template = document.createElement("template");
|
|
@@ -3219,15 +3368,17 @@ function $512e3a9270ec7803$var$monkeyPatchDomSetAttributeToAllowAtSymbols() {
|
|
|
3219
3368
|
function $512e3a9270ec7803$var$seedingMatchingId(to, from) {
|
|
3220
3369
|
let fromId = from && from._x_bindings && from._x_bindings.id;
|
|
3221
3370
|
if (!fromId) return;
|
|
3371
|
+
if (!to.setAttribute) return;
|
|
3222
3372
|
to.setAttribute("id", fromId);
|
|
3223
3373
|
to.id = fromId;
|
|
3224
3374
|
}
|
|
3225
3375
|
// packages/morph/src/index.js
|
|
3226
|
-
function $512e3a9270ec7803$
|
|
3227
|
-
Alpine.morph = $512e3a9270ec7803$
|
|
3376
|
+
function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(Alpine) {
|
|
3377
|
+
Alpine.morph = $512e3a9270ec7803$var$morph;
|
|
3378
|
+
Alpine.morphBetween = $512e3a9270ec7803$var$morphBetween;
|
|
3228
3379
|
}
|
|
3229
3380
|
// packages/morph/builds/module.js
|
|
3230
|
-
var $512e3a9270ec7803$export$2e2bcd8739ae039 = $512e3a9270ec7803$
|
|
3381
|
+
var $512e3a9270ec7803$export$2e2bcd8739ae039 = $512e3a9270ec7803$export$2e5e8c41f5d4e7c7;
|
|
3231
3382
|
|
|
3232
3383
|
|
|
3233
3384
|
// packages/persist/src/index.js
|
|
@@ -3284,7 +3435,9 @@ function $a5acee56471cec18$var$storageHas(key, storage) {
|
|
|
3284
3435
|
return storage.getItem(key) !== null;
|
|
3285
3436
|
}
|
|
3286
3437
|
function $a5acee56471cec18$var$storageGet(key, storage) {
|
|
3287
|
-
|
|
3438
|
+
let value = storage.getItem(key, storage);
|
|
3439
|
+
if (value === void 0) return;
|
|
3440
|
+
return JSON.parse(value);
|
|
3288
3441
|
}
|
|
3289
3442
|
function $a5acee56471cec18$var$storageSet(key, value, storage) {
|
|
3290
3443
|
storage.setItem(key, JSON.stringify(value));
|
|
@@ -4930,7 +5083,7 @@ var $69a8ec8dbeef3157$var$require_tippy_cjs = $69a8ec8dbeef3157$var$__commonJS((
|
|
|
4930
5083
|
return value.replace(spacesAndTabs, " ").replace(lineStartWithSpaces, "").trim();
|
|
4931
5084
|
}
|
|
4932
5085
|
function getDevMessage(message) {
|
|
4933
|
-
return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\
|
|
5086
|
+
return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77\u200D This is a development-only message. It will be removed in production.\n ");
|
|
4934
5087
|
}
|
|
4935
5088
|
function getFormattedMessage(message) {
|
|
4936
5089
|
return [
|
|
@@ -6553,9 +6706,15 @@ function $69a8ec8dbeef3157$var$Tooltip(Alpine) {
|
|
|
6553
6706
|
}, timeout || 2e3);
|
|
6554
6707
|
};
|
|
6555
6708
|
});
|
|
6556
|
-
Alpine.directive("tooltip", (el, { modifiers: modifiers, expression: expression }, { evaluateLater: evaluateLater, effect: effect })=>{
|
|
6709
|
+
Alpine.directive("tooltip", (el, { modifiers: modifiers, expression: expression }, { evaluateLater: evaluateLater, effect: effect, cleanup: cleanup })=>{
|
|
6557
6710
|
const config = modifiers.length > 0 ? $69a8ec8dbeef3157$var$buildConfigFromModifiers(modifiers) : {};
|
|
6558
6711
|
if (!el.__x_tippy) el.__x_tippy = (0, $69a8ec8dbeef3157$var$import_tippy2.default)(el, config);
|
|
6712
|
+
cleanup(()=>{
|
|
6713
|
+
if (el.__x_tippy) {
|
|
6714
|
+
el.__x_tippy.destroy();
|
|
6715
|
+
delete el.__x_tippy;
|
|
6716
|
+
}
|
|
6717
|
+
});
|
|
6559
6718
|
const enableTooltip = ()=>el.__x_tippy.enable();
|
|
6560
6719
|
const disableTooltip = ()=>el.__x_tippy.disable();
|
|
6561
6720
|
const setupTooltip = (content)=>{
|
|
@@ -6597,7 +6756,7 @@ var $5267f0d63de538ba$exports = {};
|
|
|
6597
6756
|
*/ (function(root, definition) {
|
|
6598
6757
|
"use strict";
|
|
6599
6758
|
if (typeof define === 'function' && define.amd) define(definition);
|
|
6600
|
-
else if (
|
|
6759
|
+
else if ($5267f0d63de538ba$exports) $5267f0d63de538ba$exports = definition();
|
|
6601
6760
|
else root.log = definition();
|
|
6602
6761
|
})($5267f0d63de538ba$exports, function() {
|
|
6603
6762
|
"use strict";
|
|
@@ -6831,7 +6990,7 @@ var $5267f0d63de538ba$exports = {};
|
|
|
6831
6990
|
var $1ffebed09abdb92f$exports = {};
|
|
6832
6991
|
(function(root, factory) {
|
|
6833
6992
|
if (typeof define === 'function' && define.amd) define(factory);
|
|
6834
|
-
else if (
|
|
6993
|
+
else if ($1ffebed09abdb92f$exports) $1ffebed09abdb92f$exports = factory();
|
|
6835
6994
|
else root.prefix = factory(root);
|
|
6836
6995
|
})($1ffebed09abdb92f$exports, function(root) {
|
|
6837
6996
|
'use strict';
|
|
@@ -8030,7 +8189,7 @@ function $12b7aa006b8a97e1$var$toCamel(s) {
|
|
|
8030
8189
|
}
|
|
8031
8190
|
|
|
8032
8191
|
|
|
8033
|
-
var $
|
|
8192
|
+
var $c9dfaeb25bf110ce$exports = {};
|
|
8034
8193
|
var $cbd28b10fa9798c7$exports = {};
|
|
8035
8194
|
|
|
8036
8195
|
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
|
|
@@ -11495,13 +11654,14 @@ function $cbd28b10fa9798c7$export$2e2bcd8739ae039() {
|
|
|
11495
11654
|
let tooltip = null;
|
|
11496
11655
|
let dropdown = null;
|
|
11497
11656
|
return {
|
|
11498
|
-
updateAfterNavigate: true,
|
|
11499
11657
|
init () {
|
|
11500
|
-
this.updateAfterNavigate = this.$el.dataset.updateAfterNavigate !== "false";
|
|
11501
11658
|
if (this.$refs.tooltip) tooltip = (0, $7a759511c361f2bd$export$353372104066311a)(this, {
|
|
11502
11659
|
target: this.$refs.icon
|
|
11503
11660
|
});
|
|
11504
|
-
if (this.dropdownContent)
|
|
11661
|
+
if (this.dropdownContent) this.initDropdown();
|
|
11662
|
+
},
|
|
11663
|
+
initDropdown () {
|
|
11664
|
+
dropdown = (0, $789b7d27a7c715a6$export$2e2bcd8739ae039)(this.$el, {
|
|
11505
11665
|
content: this.dropdownContent,
|
|
11506
11666
|
trigger: "click",
|
|
11507
11667
|
theme: "menu",
|
|
@@ -11529,14 +11689,6 @@ function $cbd28b10fa9798c7$export$2e2bcd8739ae039() {
|
|
|
11529
11689
|
hideDropdown () {
|
|
11530
11690
|
if (dropdown) dropdown.hide();
|
|
11531
11691
|
},
|
|
11532
|
-
updateDropdown () {
|
|
11533
|
-
if (dropdown) {
|
|
11534
|
-
dropdown.hide();
|
|
11535
|
-
if (this.updateAfterNavigate) this.$nextTick(()=>{
|
|
11536
|
-
dropdown.setContent(this.dropdownContent);
|
|
11537
|
-
});
|
|
11538
|
-
}
|
|
11539
|
-
},
|
|
11540
11692
|
startSpin () {
|
|
11541
11693
|
this._spinning = true;
|
|
11542
11694
|
},
|
|
@@ -12279,6 +12431,33 @@ function $506dabb2bf255b38$var$sizeSplits(sizes) {
|
|
|
12279
12431
|
}
|
|
12280
12432
|
|
|
12281
12433
|
|
|
12434
|
+
var $a87dacf5139b5e2f$exports = {};
|
|
12435
|
+
|
|
12436
|
+
$parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
|
|
12437
|
+
|
|
12438
|
+
$parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
|
|
12439
|
+
function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
|
|
12440
|
+
return {
|
|
12441
|
+
get store () {
|
|
12442
|
+
return store || this;
|
|
12443
|
+
},
|
|
12444
|
+
get id () {
|
|
12445
|
+
return this.$root.id;
|
|
12446
|
+
},
|
|
12447
|
+
get panels () {
|
|
12448
|
+
return Array.from(this.$refs.panels.children);
|
|
12449
|
+
},
|
|
12450
|
+
isActive (el) {
|
|
12451
|
+
return this.store.activeTab === this._getRef(el);
|
|
12452
|
+
},
|
|
12453
|
+
// protected
|
|
12454
|
+
_getRef (el) {
|
|
12455
|
+
return el.getAttribute("x-ref");
|
|
12456
|
+
}
|
|
12457
|
+
};
|
|
12458
|
+
}
|
|
12459
|
+
|
|
12460
|
+
|
|
12282
12461
|
var $0db07828cadc68e0$exports = {};
|
|
12283
12462
|
|
|
12284
12463
|
$parcel$defineInteropFlag($0db07828cadc68e0$exports);
|
|
@@ -12499,34 +12678,7 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
|
|
|
12499
12678
|
}
|
|
12500
12679
|
|
|
12501
12680
|
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
$parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
|
|
12505
|
-
|
|
12506
|
-
$parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
|
|
12507
|
-
function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
|
|
12508
|
-
return {
|
|
12509
|
-
get store () {
|
|
12510
|
-
return store || this;
|
|
12511
|
-
},
|
|
12512
|
-
get id () {
|
|
12513
|
-
return this.$root.id;
|
|
12514
|
-
},
|
|
12515
|
-
get panels () {
|
|
12516
|
-
return Array.from(this.$refs.panels.children);
|
|
12517
|
-
},
|
|
12518
|
-
isActive (el) {
|
|
12519
|
-
return this.store.activeTab === this._getRef(el);
|
|
12520
|
-
},
|
|
12521
|
-
// protected
|
|
12522
|
-
_getRef (el) {
|
|
12523
|
-
return el.getAttribute("x-ref");
|
|
12524
|
-
}
|
|
12525
|
-
};
|
|
12526
|
-
}
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
$e3048089509446aa$exports = {
|
|
12681
|
+
$c9dfaeb25bf110ce$exports = {
|
|
12530
12682
|
"button": $cbd28b10fa9798c7$exports,
|
|
12531
12683
|
"code": $99486586f6691564$exports,
|
|
12532
12684
|
"copy_button": $47a1c62621be0c54$exports,
|
|
@@ -12535,20 +12687,20 @@ $e3048089509446aa$exports = {
|
|
|
12535
12687
|
"filter": $e9904a14dabf652d$exports,
|
|
12536
12688
|
"nav": $d92d9d5253f84566$exports,
|
|
12537
12689
|
"split_layout": $506dabb2bf255b38$exports,
|
|
12690
|
+
"tab_panels": $a87dacf5139b5e2f$exports,
|
|
12538
12691
|
"tabs": $0db07828cadc68e0$exports,
|
|
12539
|
-
"viewport": $6d64716f0b34fdf4$exports
|
|
12540
|
-
"tab_panels": $a87dacf5139b5e2f$exports
|
|
12692
|
+
"viewport": $6d64716f0b34fdf4$exports
|
|
12541
12693
|
};
|
|
12542
12694
|
|
|
12543
12695
|
|
|
12544
|
-
var $
|
|
12696
|
+
var $5d1c9207cb730903$exports = {};
|
|
12545
12697
|
var $6a9b69d9cc7f810f$exports = {};
|
|
12546
12698
|
|
|
12547
12699
|
$parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
|
|
12548
12700
|
|
|
12549
12701
|
$parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
|
|
12550
12702
|
var $cdfeaa1e0e8d642c$exports = {};
|
|
12551
|
-
(function(global, factory) {
|
|
12703
|
+
/*! js-cookie v3.0.5 | MIT */ (function(global, factory) {
|
|
12552
12704
|
$cdfeaa1e0e8d642c$exports = factory();
|
|
12553
12705
|
})($cdfeaa1e0e8d642c$exports, function() {
|
|
12554
12706
|
'use strict';
|
|
@@ -12670,14 +12822,26 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12670
12822
|
* File: iframeResizer.js
|
|
12671
12823
|
* Desc: Force iframes to size to content.
|
|
12672
12824
|
* Requires: iframeResizer.contentWindow.js to be loaded into the target frame.
|
|
12673
|
-
* Doc: https://
|
|
12674
|
-
* Author: David J. Bradshaw -
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12825
|
+
* Doc: https://iframe-resizer.com
|
|
12826
|
+
* Author: David J. Bradshaw - info@iframe-resizer.com
|
|
12827
|
+
*/ console.info(`
|
|
12828
|
+
IFRAME-RESIZER
|
|
12829
|
+
|
|
12830
|
+
Iframe-Resizer 5 is now available via the following two packages:
|
|
12831
|
+
|
|
12832
|
+
* @iframe-resizer/parent
|
|
12833
|
+
* @iframe-resizer/child
|
|
12834
|
+
|
|
12835
|
+
Additionally their are also new versions of iframe-resizer for React, Vue, and jQuery.
|
|
12836
|
+
|
|
12837
|
+
Version 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.
|
|
12838
|
+
|
|
12839
|
+
Please see https://iframe-resizer.com/upgrade for more details.
|
|
12840
|
+
`);
|
|
12678
12841
|
(function(undefined) {
|
|
12679
12842
|
if (typeof window === 'undefined') return; // don't run for server side render
|
|
12680
|
-
var
|
|
12843
|
+
// var VERSION = '4.3.11'
|
|
12844
|
+
var count = 0, destroyObserver, logEnabled = false, hiddenCheckEnabled = false, msgHeader = 'message', msgHeaderLen = msgHeader.length, msgId = '[iFrameSizer]', msgIdLen = msgId.length, pagePosition = null, requestAnimationFrame = window.requestAnimationFrame, resetRequiredMethods = Object.freeze({
|
|
12681
12845
|
max: 1,
|
|
12682
12846
|
scroll: 1,
|
|
12683
12847
|
bodyScroll: 1,
|
|
@@ -12694,6 +12858,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12694
12858
|
heightCalculationMethod: 'bodyOffset',
|
|
12695
12859
|
id: 'iFrameResizer',
|
|
12696
12860
|
interval: 32,
|
|
12861
|
+
license: '1jqr0si6pnt',
|
|
12697
12862
|
log: false,
|
|
12698
12863
|
maxHeight: Infinity,
|
|
12699
12864
|
maxWidth: Infinity,
|
|
@@ -13111,6 +13276,10 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
13111
13276
|
chkEvent(iframeId, 'onClosed', iframeId);
|
|
13112
13277
|
log(iframeId, '--');
|
|
13113
13278
|
removeIframeListeners(iframe);
|
|
13279
|
+
if (destroyObserver) {
|
|
13280
|
+
destroyObserver.disconnect();
|
|
13281
|
+
destroyObserver = null;
|
|
13282
|
+
}
|
|
13114
13283
|
}
|
|
13115
13284
|
function getPagePosition(iframeId) {
|
|
13116
13285
|
if (null === pagePosition) {
|
|
@@ -13308,7 +13477,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
13308
13477
|
checkReset();
|
|
13309
13478
|
}
|
|
13310
13479
|
function createDestroyObserver(MutationObserver) {
|
|
13311
|
-
if (!iframe.parentNode) return;
|
|
13480
|
+
if (!iframe.parentNode) return null;
|
|
13312
13481
|
var destroyObserver = new MutationObserver(function(mutations) {
|
|
13313
13482
|
mutations.forEach(function(mutation) {
|
|
13314
13483
|
var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array
|
|
@@ -13321,9 +13490,10 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
13321
13490
|
destroyObserver.observe(iframe.parentNode, {
|
|
13322
13491
|
childList: true
|
|
13323
13492
|
});
|
|
13493
|
+
return destroyObserver;
|
|
13324
13494
|
}
|
|
13325
13495
|
var MutationObserver = getMutationObserver();
|
|
13326
|
-
if (MutationObserver) createDestroyObserver(MutationObserver);
|
|
13496
|
+
if (MutationObserver) destroyObserver = createDestroyObserver(MutationObserver);
|
|
13327
13497
|
addEventListener(iframe, 'load', iFrameLoaded);
|
|
13328
13498
|
trigger('init', msg, iframe, undefined, true);
|
|
13329
13499
|
}
|
|
@@ -13552,6 +13722,38 @@ function $c299e36fa9e271bc$export$2e2bcd8739ae039(id, embedStore) {
|
|
|
13552
13722
|
}
|
|
13553
13723
|
|
|
13554
13724
|
|
|
13725
|
+
var $1a7a7298eec5b755$exports = {};
|
|
13726
|
+
|
|
13727
|
+
$parcel$defineInteropFlag($1a7a7298eec5b755$exports);
|
|
13728
|
+
|
|
13729
|
+
$parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039);
|
|
13730
|
+
|
|
13731
|
+
function $1a7a7298eec5b755$export$2e2bcd8739ae039() {
|
|
13732
|
+
return {
|
|
13733
|
+
narrow: false,
|
|
13734
|
+
init () {
|
|
13735
|
+
(0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
|
|
13736
|
+
this.narrow = width < 500;
|
|
13737
|
+
});
|
|
13738
|
+
}
|
|
13739
|
+
};
|
|
13740
|
+
}
|
|
13741
|
+
|
|
13742
|
+
|
|
13743
|
+
var $e773f8ef556b41ff$exports = {};
|
|
13744
|
+
|
|
13745
|
+
$parcel$defineInteropFlag($e773f8ef556b41ff$exports);
|
|
13746
|
+
|
|
13747
|
+
$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
|
|
13748
|
+
function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
|
|
13749
|
+
return {
|
|
13750
|
+
get isNarrowLayout () {
|
|
13751
|
+
return this.narrow || false;
|
|
13752
|
+
}
|
|
13753
|
+
};
|
|
13754
|
+
}
|
|
13755
|
+
|
|
13756
|
+
|
|
13555
13757
|
var $9b24cbeb3a465447$exports = {};
|
|
13556
13758
|
|
|
13557
13759
|
$parcel$defineInteropFlag($9b24cbeb3a465447$exports);
|
|
@@ -13609,51 +13811,19 @@ function $9b24cbeb3a465447$export$2e2bcd8739ae039({ id: id, matchers: matchers }
|
|
|
13609
13811
|
}
|
|
13610
13812
|
|
|
13611
13813
|
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
$parcel$defineInteropFlag($1a7a7298eec5b755$exports);
|
|
13615
|
-
|
|
13616
|
-
$parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039);
|
|
13617
|
-
|
|
13618
|
-
function $1a7a7298eec5b755$export$2e2bcd8739ae039() {
|
|
13619
|
-
return {
|
|
13620
|
-
narrow: false,
|
|
13621
|
-
init () {
|
|
13622
|
-
(0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
|
|
13623
|
-
this.narrow = width < 500;
|
|
13624
|
-
});
|
|
13625
|
-
}
|
|
13626
|
-
};
|
|
13627
|
-
}
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
var $e773f8ef556b41ff$exports = {};
|
|
13631
|
-
|
|
13632
|
-
$parcel$defineInteropFlag($e773f8ef556b41ff$exports);
|
|
13633
|
-
|
|
13634
|
-
$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
|
|
13635
|
-
function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
|
|
13636
|
-
return {
|
|
13637
|
-
get isNarrowLayout () {
|
|
13638
|
-
return this.narrow || false;
|
|
13639
|
-
}
|
|
13640
|
-
};
|
|
13641
|
-
}
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
$6178ee12f80cbf68$exports = {
|
|
13814
|
+
$5d1c9207cb730903$exports = {
|
|
13645
13815
|
"display_options": {
|
|
13646
13816
|
"field": $6a9b69d9cc7f810f$exports
|
|
13647
13817
|
},
|
|
13648
13818
|
"embed": {
|
|
13649
13819
|
"inspector": $c299e36fa9e271bc$exports
|
|
13650
13820
|
},
|
|
13651
|
-
"nav": {
|
|
13652
|
-
"item": $9b24cbeb3a465447$exports
|
|
13653
|
-
},
|
|
13654
13821
|
"params": {
|
|
13655
13822
|
"editor": $1a7a7298eec5b755$exports,
|
|
13656
13823
|
"field": $e773f8ef556b41ff$exports
|
|
13824
|
+
},
|
|
13825
|
+
"nav": {
|
|
13826
|
+
"item": $9b24cbeb3a465447$exports
|
|
13657
13827
|
}
|
|
13658
13828
|
};
|
|
13659
13829
|
|
|
@@ -13721,8 +13891,8 @@ const $22969b543678f572$var$prefix = window.APP_NAME;
|
|
|
13721
13891
|
// Components
|
|
13722
13892
|
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $5792afa4170ed552$export$2e2bcd8739ae039));
|
|
13723
13893
|
[
|
|
13724
|
-
$
|
|
13725
|
-
$
|
|
13894
|
+
$c9dfaeb25bf110ce$exports,
|
|
13895
|
+
$5d1c9207cb730903$exports,
|
|
13726
13896
|
$d56e5cced44001d2$exports
|
|
13727
13897
|
].forEach((scripts)=>{
|
|
13728
13898
|
const components = (0, $12b7aa006b8a97e1$export$4e811121b221213b)(scripts);
|