coveragebook_components 0.8.5 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +129 -6
  3. data/app/assets/build/coco/app.js +794 -566
  4. data/app/assets/build/coco/book.css +63 -0
  5. data/app/assets/build/coco/book.js +769 -554
  6. data/app/assets/build/coco/icons/cake.svg +1 -1
  7. data/app/assets/build/coco/icons/check-circle-2.svg +1 -1
  8. data/app/assets/build/coco/icons/check-circle.svg +1 -1
  9. data/app/assets/build/coco/icons/check-square-2.svg +1 -0
  10. data/app/assets/build/coco/icons/check-square.svg +1 -1
  11. data/app/assets/build/coco/icons/check.svg +1 -1
  12. data/app/assets/build/coco/icons/radiation.svg +1 -1
  13. data/app/assets/build/coco/icons/ribbon.svg +1 -0
  14. data/app/assets/build/coco/icons/tree-deciduous.svg +1 -1
  15. data/app/assets/js/libs/alpine/directives/options.js +0 -1
  16. data/app/components/coco/app/blocks/sidebar_nav/item/item.css +2 -2
  17. data/app/components/coco/app/blocks/sidebar_nav/menu/menu.css +2 -2
  18. data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.css +2 -2
  19. data/app/components/coco/app/blocks/slide_editor/slide_editor.html.erb +1 -0
  20. data/app/components/coco/app/elements/alert/alert.html.erb +2 -2
  21. data/app/components/coco/app/elements/alert/alert.js +1 -1
  22. data/app/components/coco/app/elements/alert/alert.rb +1 -0
  23. data/app/components/coco/app/elements/image_picker_button/image_picker_button.js +8 -2
  24. data/app/components/coco/app/elements/system_banner/system_banner.rb +1 -0
  25. data/app/components/coco/app/layouts/application/application.css +13 -0
  26. data/app/components/coco/app/layouts/application/application.rb +0 -2
  27. data/app/components/coco/app/layouts/page/page.css +23 -0
  28. data/app/components/coco/app/layouts/page/page.html.erb +27 -0
  29. data/app/components/coco/app/layouts/page/page.js +5 -0
  30. data/app/components/coco/app/layouts/page/page.rb +40 -0
  31. data/app/components/coco/base/pager_link/pager_link.css +26 -0
  32. data/app/components/coco/base/pager_link/pager_link.html.erb +3 -0
  33. data/app/components/coco/base/pager_link/pager_link.rb +32 -0
  34. data/app/components/coco/base/poll_controller/poll_controller.css +5 -0
  35. data/app/components/coco/base/poll_controller/poll_controller.html.erb +15 -0
  36. data/app/components/coco/base/poll_controller/poll_controller.js +67 -0
  37. data/app/components/coco/base/poll_controller/poll_controller.rb +9 -0
  38. data/app/helpers/coco/app_helper.rb +4 -0
  39. data/config/icons.json +2 -0
  40. data/lib/coco.rb +1 -1
  41. data/lib/tasks/coco_tasks.rake +0 -8
  42. metadata +15 -2
@@ -3848,10 +3848,10 @@
3848
3848
  return result2;
3849
3849
  };
3850
3850
  }
3851
- var bind4 = baseRest(function(func, thisArg, partials) {
3851
+ var bind3 = baseRest(function(func, thisArg, partials) {
3852
3852
  var bitmask = WRAP_BIND_FLAG;
3853
3853
  if (partials.length) {
3854
- var holders = replaceHolders(partials, getHolder(bind4));
3854
+ var holders = replaceHolders(partials, getHolder(bind3));
3855
3855
  bitmask |= WRAP_PARTIAL_FLAG;
3856
3856
  }
3857
3857
  return createWrap(func, bitmask, thisArg, partials, holders);
@@ -4858,7 +4858,7 @@
4858
4858
  var bindAll = flatRest(function(object, methodNames) {
4859
4859
  arrayEach(methodNames, function(key) {
4860
4860
  key = toKey(key);
4861
- baseAssignValue(object, key, bind4(object[key], object));
4861
+ baseAssignValue(object, key, bind3(object[key], object));
4862
4862
  });
4863
4863
  return object;
4864
4864
  });
@@ -5055,7 +5055,7 @@
5055
5055
  lodash.assignWith = assignWith;
5056
5056
  lodash.at = at2;
5057
5057
  lodash.before = before;
5058
- lodash.bind = bind4;
5058
+ lodash.bind = bind3;
5059
5059
  lodash.bindAll = bindAll;
5060
5060
  lodash.bindKey = bindKey;
5061
5061
  lodash.castArray = castArray;
@@ -14044,7 +14044,7 @@
14044
14044
  var package_default = {
14045
14045
  name: "coveragebook-components",
14046
14046
  type: "module",
14047
- version: "0.8.5",
14047
+ version: "0.8.7",
14048
14048
  main: "index.js",
14049
14049
  repository: "git@github.com:coveragebook/coco.git",
14050
14050
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -14053,21 +14053,21 @@
14053
14053
  "defaults"
14054
14054
  ],
14055
14055
  dependencies: {
14056
- "@alpinejs/collapse": "3.12.1",
14057
- "@alpinejs/focus": "3.12.1",
14058
- "@alpinejs/intersect": "3.12.1",
14059
- "@alpinejs/mask": "3.12.1",
14060
- "@alpinejs/morph": "3.12.1",
14056
+ "@alpinejs/collapse": "^3.13.2",
14057
+ "@alpinejs/focus": "^3.13.2",
14058
+ "@alpinejs/intersect": "^3.13.2",
14059
+ "@alpinejs/mask": "^3.13.2",
14060
+ "@alpinejs/morph": "^3.13.2",
14061
14061
  "@jaames/iro": "^5.5.2",
14062
14062
  "@tailwindcss/container-queries": "^0.1.0",
14063
14063
  "@tailwindcss/forms": "^0.5.6",
14064
- alpinejs: "3.12.2",
14064
+ alpinejs: "^3.13.2",
14065
14065
  "container-query-polyfill": "^1.0.2",
14066
14066
  del: "^7.1.0",
14067
14067
  html2canvas: "^1.4.1",
14068
14068
  "js-cookie": "^3.0.5",
14069
14069
  lodash: "^4.17.21",
14070
- "lucide-static": "^0.290.0",
14070
+ "lucide-static": "^0.292.0",
14071
14071
  tailwindcss: "^3.3.5",
14072
14072
  "tippy.js": "^6.3.7"
14073
14073
  },
@@ -15720,6 +15720,112 @@ ${t5.join("\n")}`);
15720
15720
  cleanup2();
15721
15721
  }];
15722
15722
  }
15723
+ function dispatch(el, name, detail = {}) {
15724
+ el.dispatchEvent(
15725
+ new CustomEvent(name, {
15726
+ detail,
15727
+ bubbles: true,
15728
+ // Allows events to pass the shadow DOM barrier.
15729
+ composed: true,
15730
+ cancelable: true
15731
+ })
15732
+ );
15733
+ }
15734
+ function walk(el, callback) {
15735
+ if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) {
15736
+ Array.from(el.children).forEach((el2) => walk(el2, callback));
15737
+ return;
15738
+ }
15739
+ let skip = false;
15740
+ callback(el, () => skip = true);
15741
+ if (skip)
15742
+ return;
15743
+ let node = el.firstElementChild;
15744
+ while (node) {
15745
+ walk(node, callback, false);
15746
+ node = node.nextElementSibling;
15747
+ }
15748
+ }
15749
+ function warn(message2, ...args) {
15750
+ console.warn(`Alpine Warning: ${message2}`, ...args);
15751
+ }
15752
+ var started = false;
15753
+ function start() {
15754
+ if (started)
15755
+ warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");
15756
+ started = true;
15757
+ if (!document.body)
15758
+ warn("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");
15759
+ dispatch(document, "alpine:init");
15760
+ dispatch(document, "alpine:initializing");
15761
+ startObservingMutations();
15762
+ onElAdded((el) => initTree(el, walk));
15763
+ onElRemoved((el) => destroyTree(el));
15764
+ onAttributesAdded((el, attrs) => {
15765
+ directives(el, attrs).forEach((handle) => handle());
15766
+ });
15767
+ let outNestedComponents = (el) => !closestRoot(el.parentElement, true);
15768
+ Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((el) => {
15769
+ initTree(el);
15770
+ });
15771
+ dispatch(document, "alpine:initialized");
15772
+ }
15773
+ var rootSelectorCallbacks = [];
15774
+ var initSelectorCallbacks = [];
15775
+ function rootSelectors() {
15776
+ return rootSelectorCallbacks.map((fn3) => fn3());
15777
+ }
15778
+ function allSelectors() {
15779
+ return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn3) => fn3());
15780
+ }
15781
+ function addRootSelector(selectorCallback) {
15782
+ rootSelectorCallbacks.push(selectorCallback);
15783
+ }
15784
+ function addInitSelector(selectorCallback) {
15785
+ initSelectorCallbacks.push(selectorCallback);
15786
+ }
15787
+ function closestRoot(el, includeInitSelectors = false) {
15788
+ return findClosest(el, (element) => {
15789
+ const selectors = includeInitSelectors ? allSelectors() : rootSelectors();
15790
+ if (selectors.some((selector) => element.matches(selector)))
15791
+ return true;
15792
+ });
15793
+ }
15794
+ function findClosest(el, callback) {
15795
+ if (!el)
15796
+ return;
15797
+ if (callback(el))
15798
+ return el;
15799
+ if (el._x_teleportBack)
15800
+ el = el._x_teleportBack;
15801
+ if (!el.parentElement)
15802
+ return;
15803
+ return findClosest(el.parentElement, callback);
15804
+ }
15805
+ function isRoot(el) {
15806
+ return rootSelectors().some((selector) => el.matches(selector));
15807
+ }
15808
+ var initInterceptors = [];
15809
+ function interceptInit(callback) {
15810
+ initInterceptors.push(callback);
15811
+ }
15812
+ function initTree(el, walker = walk, intercept = () => {
15813
+ }) {
15814
+ deferHandlingDirectives(() => {
15815
+ walker(el, (el2, skip) => {
15816
+ intercept(el2, skip);
15817
+ initInterceptors.forEach((i3) => i3(el2, skip));
15818
+ directives(el2, el2.attributes).forEach((handle) => handle());
15819
+ el2._x_ignore && skip();
15820
+ });
15821
+ });
15822
+ }
15823
+ function destroyTree(root) {
15824
+ walk(root, (el) => {
15825
+ cleanupAttributes(el);
15826
+ cleanupElement(el);
15827
+ });
15828
+ }
15723
15829
  var onAttributeAddeds = [];
15724
15830
  var onElRemoveds = [];
15725
15831
  var onElAddeds = [];
@@ -15756,6 +15862,12 @@ ${t5.join("\n")}`);
15756
15862
  }
15757
15863
  });
15758
15864
  }
15865
+ function cleanupElement(el) {
15866
+ if (el._x_cleanups) {
15867
+ while (el._x_cleanups.length)
15868
+ el._x_cleanups.pop()();
15869
+ }
15870
+ }
15759
15871
  var observer = new MutationObserver(onMutate);
15760
15872
  var currentlyObserving = false;
15761
15873
  function startObservingMutations() {
@@ -15851,10 +15963,7 @@ ${t5.join("\n")}`);
15851
15963
  if (addedNodes.includes(node))
15852
15964
  continue;
15853
15965
  onElRemoveds.forEach((i3) => i3(node));
15854
- if (node._x_cleanups) {
15855
- while (node._x_cleanups.length)
15856
- node._x_cleanups.pop()();
15857
- }
15966
+ destroyTree(node);
15858
15967
  }
15859
15968
  addedNodes.forEach((node) => {
15860
15969
  node._x_ignoreSelf = true;
@@ -15901,53 +16010,50 @@ ${t5.join("\n")}`);
15901
16010
  return closestDataStack(node.parentNode);
15902
16011
  }
15903
16012
  function mergeProxies(objects) {
15904
- let thisProxy = new Proxy({}, {
15905
- ownKeys: () => {
15906
- return Array.from(new Set(objects.flatMap((i3) => Object.keys(i3))));
15907
- },
15908
- has: (target, name) => {
15909
- return objects.some((obj) => obj.hasOwnProperty(name));
15910
- },
15911
- get: (target, name) => {
15912
- return (objects.find((obj) => {
15913
- if (obj.hasOwnProperty(name)) {
15914
- let descriptor = Object.getOwnPropertyDescriptor(obj, name);
15915
- if (descriptor.get && descriptor.get._x_alreadyBound || descriptor.set && descriptor.set._x_alreadyBound) {
15916
- return true;
15917
- }
15918
- if ((descriptor.get || descriptor.set) && descriptor.enumerable) {
15919
- let getter = descriptor.get;
15920
- let setter = descriptor.set;
15921
- let property = descriptor;
15922
- getter = getter && getter.bind(thisProxy);
15923
- setter = setter && setter.bind(thisProxy);
15924
- if (getter)
15925
- getter._x_alreadyBound = true;
15926
- if (setter)
15927
- setter._x_alreadyBound = true;
15928
- Object.defineProperty(obj, name, __spreadProps(__spreadValues({}, property), {
15929
- get: getter,
15930
- set: setter
15931
- }));
15932
- }
15933
- return true;
15934
- }
15935
- return false;
15936
- }) || {})[name];
15937
- },
15938
- set: (target, name, value) => {
15939
- let closestObjectWithKey = objects.find((obj) => obj.hasOwnProperty(name));
15940
- if (closestObjectWithKey) {
15941
- closestObjectWithKey[name] = value;
15942
- } else {
15943
- objects[objects.length - 1][name] = value;
15944
- }
15945
- return true;
15946
- }
15947
- });
15948
- return thisProxy;
16013
+ return new Proxy({ objects }, mergeProxyTrap);
15949
16014
  }
15950
- function initInterceptors(data2) {
16015
+ var mergeProxyTrap = {
16016
+ ownKeys({ objects }) {
16017
+ return Array.from(
16018
+ new Set(objects.flatMap((i3) => Object.keys(i3)))
16019
+ );
16020
+ },
16021
+ has({ objects }, name) {
16022
+ if (name == Symbol.unscopables)
16023
+ return false;
16024
+ return objects.some(
16025
+ (obj) => Object.prototype.hasOwnProperty.call(obj, name)
16026
+ );
16027
+ },
16028
+ get({ objects }, name, thisProxy) {
16029
+ if (name == "toJSON")
16030
+ return collapseProxies;
16031
+ return Reflect.get(
16032
+ objects.find(
16033
+ (obj) => Object.prototype.hasOwnProperty.call(obj, name)
16034
+ ) || {},
16035
+ name,
16036
+ thisProxy
16037
+ );
16038
+ },
16039
+ set({ objects }, name, value, thisProxy) {
16040
+ const target = objects.find(
16041
+ (obj) => Object.prototype.hasOwnProperty.call(obj, name)
16042
+ ) || objects[objects.length - 1];
16043
+ const descriptor = Object.getOwnPropertyDescriptor(target, name);
16044
+ if ((descriptor == null ? void 0 : descriptor.set) && (descriptor == null ? void 0 : descriptor.get))
16045
+ return Reflect.set(target, name, value, thisProxy);
16046
+ return Reflect.set(target, name, value);
16047
+ }
16048
+ };
16049
+ function collapseProxies() {
16050
+ let keys = Reflect.ownKeys(this);
16051
+ return keys.reduce((acc, key) => {
16052
+ acc[key] = Reflect.get(this, key);
16053
+ return acc;
16054
+ }, {});
16055
+ }
16056
+ function initInterceptors2(data2) {
15951
16057
  let isObject22 = (val) => typeof val === "object" && !Array.isArray(val) && val !== null;
15952
16058
  let recurse = (obj, basePath = "") => {
15953
16059
  Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => {
@@ -16054,8 +16160,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16054
16160
  function dontAutoEvaluateFunctions(callback) {
16055
16161
  let cache = shouldAutoEvaluateFunctions;
16056
16162
  shouldAutoEvaluateFunctions = false;
16057
- callback();
16163
+ let result = callback();
16058
16164
  shouldAutoEvaluateFunctions = cache;
16165
+ return result;
16059
16166
  }
16060
16167
  function evaluate(el, expression, extras = {}) {
16061
16168
  let result;
@@ -16090,10 +16197,17 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16090
16197
  }
16091
16198
  let AsyncFunction = Object.getPrototypeOf(async function() {
16092
16199
  }).constructor;
16093
- let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression) || /^(let|const)\s/.test(expression) ? `(async()=>{ ${expression} })()` : expression;
16200
+ let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression.trim()) || /^(let|const)\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression;
16094
16201
  const safeAsyncFunction = () => {
16095
16202
  try {
16096
- return new AsyncFunction(["__self", "scope"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`);
16203
+ let func2 = new AsyncFunction(
16204
+ ["__self", "scope"],
16205
+ `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`
16206
+ );
16207
+ Object.defineProperty(func2, "name", {
16208
+ value: `[Alpine] ${expression}`
16209
+ });
16210
+ return func2;
16097
16211
  } catch (error2) {
16098
16212
  handleError(error2, el, expression);
16099
16213
  return Promise.resolve();
@@ -16150,7 +16264,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16150
16264
  return {
16151
16265
  before(directive2) {
16152
16266
  if (!directiveHandlers[directive2]) {
16153
- console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");
16267
+ console.warn(
16268
+ "Cannot find directive `${directive}`. `${name}` will use the default order of execution"
16269
+ );
16154
16270
  return;
16155
16271
  }
16156
16272
  const pos = directiveOrder.indexOf(directive2);
@@ -16221,15 +16337,15 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16221
16337
  function getDirectiveHandler(el, directive2) {
16222
16338
  let noop = () => {
16223
16339
  };
16224
- let handler3 = directiveHandlers[directive2.type] || noop;
16340
+ let handler4 = directiveHandlers[directive2.type] || noop;
16225
16341
  let [utilities, cleanup2] = getElementBoundUtilities(el);
16226
16342
  onAttributeRemoved(el, directive2.original, cleanup2);
16227
16343
  let fullHandler = () => {
16228
16344
  if (el._x_ignore || el._x_ignoreSelf)
16229
16345
  return;
16230
- handler3.inline && handler3.inline(el, directive2, utilities);
16231
- handler3 = handler3.bind(handler3, el, directive2, utilities);
16232
- isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler3) : handler3();
16346
+ handler4.inline && handler4.inline(el, directive2, utilities);
16347
+ handler4 = handler4.bind(handler4, el, directive2, utilities);
16348
+ isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler4) : handler4();
16233
16349
  };
16234
16350
  fullHandler.runCleanups = cleanup2;
16235
16351
  return fullHandler;
@@ -16262,7 +16378,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16262
16378
  function toParsedDirectives(transformedAttributeMap, originalAttributeOverride) {
16263
16379
  return ({ name, value }) => {
16264
16380
  let typeMatch = name.match(alpineAttributeRegex());
16265
- let valueMatch = name.match(/:([a-zA-Z0-9\-:]+)/);
16381
+ let valueMatch = name.match(/:([a-zA-Z0-9\-_:]+)/);
16266
16382
  let modifiers = name.match(/\.[^.\]]+(?=[^\]]*$)/g) || [];
16267
16383
  let original = originalAttributeOverride || transformedAttributeMap[name] || name;
16268
16384
  return {
@@ -16296,106 +16412,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16296
16412
  let typeB = directiveOrder.indexOf(b3.type) === -1 ? DEFAULT : b3.type;
16297
16413
  return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB);
16298
16414
  }
16299
- function dispatch(el, name, detail = {}) {
16300
- el.dispatchEvent(new CustomEvent(name, {
16301
- detail,
16302
- bubbles: true,
16303
- composed: true,
16304
- cancelable: true
16305
- }));
16306
- }
16307
- function walk(el, callback) {
16308
- if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) {
16309
- Array.from(el.children).forEach((el2) => walk(el2, callback));
16310
- return;
16311
- }
16312
- let skip = false;
16313
- callback(el, () => skip = true);
16314
- if (skip)
16315
- return;
16316
- let node = el.firstElementChild;
16317
- while (node) {
16318
- walk(node, callback, false);
16319
- node = node.nextElementSibling;
16320
- }
16321
- }
16322
- function warn(message2, ...args) {
16323
- console.warn(`Alpine Warning: ${message2}`, ...args);
16324
- }
16325
- var started = false;
16326
- function start() {
16327
- if (started)
16328
- warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");
16329
- started = true;
16330
- if (!document.body)
16331
- warn("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");
16332
- dispatch(document, "alpine:init");
16333
- dispatch(document, "alpine:initializing");
16334
- startObservingMutations();
16335
- onElAdded((el) => initTree(el, walk));
16336
- onElRemoved((el) => destroyTree(el));
16337
- onAttributesAdded((el, attrs) => {
16338
- directives(el, attrs).forEach((handle) => handle());
16339
- });
16340
- let outNestedComponents = (el) => !closestRoot(el.parentElement, true);
16341
- Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((el) => {
16342
- initTree(el);
16343
- });
16344
- dispatch(document, "alpine:initialized");
16345
- }
16346
- var rootSelectorCallbacks = [];
16347
- var initSelectorCallbacks = [];
16348
- function rootSelectors() {
16349
- return rootSelectorCallbacks.map((fn3) => fn3());
16350
- }
16351
- function allSelectors() {
16352
- return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn3) => fn3());
16353
- }
16354
- function addRootSelector(selectorCallback) {
16355
- rootSelectorCallbacks.push(selectorCallback);
16356
- }
16357
- function addInitSelector(selectorCallback) {
16358
- initSelectorCallbacks.push(selectorCallback);
16359
- }
16360
- function closestRoot(el, includeInitSelectors = false) {
16361
- return findClosest(el, (element) => {
16362
- const selectors = includeInitSelectors ? allSelectors() : rootSelectors();
16363
- if (selectors.some((selector) => element.matches(selector)))
16364
- return true;
16365
- });
16366
- }
16367
- function findClosest(el, callback) {
16368
- if (!el)
16369
- return;
16370
- if (callback(el))
16371
- return el;
16372
- if (el._x_teleportBack)
16373
- el = el._x_teleportBack;
16374
- if (!el.parentElement)
16375
- return;
16376
- return findClosest(el.parentElement, callback);
16377
- }
16378
- function isRoot(el) {
16379
- return rootSelectors().some((selector) => el.matches(selector));
16380
- }
16381
- var initInterceptors2 = [];
16382
- function interceptInit(callback) {
16383
- initInterceptors2.push(callback);
16384
- }
16385
- function initTree(el, walker = walk, intercept = () => {
16386
- }) {
16387
- deferHandlingDirectives(() => {
16388
- walker(el, (el2, skip) => {
16389
- intercept(el2, skip);
16390
- initInterceptors2.forEach((i3) => i3(el2, skip));
16391
- directives(el2, el2.attributes).forEach((handle) => handle());
16392
- el2._x_ignore && skip();
16393
- });
16394
- });
16395
- }
16396
- function destroyTree(root) {
16397
- walk(root, (el) => cleanupAttributes(el));
16398
- }
16399
16415
  var tickStack = [];
16400
16416
  var isHolding = false;
16401
16417
  function nextTick(callback = () => {
@@ -16525,7 +16541,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16525
16541
  function registerTransitionsFromClassString(el, classString, stage) {
16526
16542
  registerTransitionObject(el, setClasses, "");
16527
16543
  let directiveStorageMap = {
16528
- enter: (classes) => {
16544
+ "enter": (classes) => {
16529
16545
  el._x_transition.enter.during = classes;
16530
16546
  },
16531
16547
  "enter-start": (classes) => {
@@ -16534,7 +16550,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16534
16550
  "enter-end": (classes) => {
16535
16551
  el._x_transition.enter.end = classes;
16536
16552
  },
16537
- leave: (classes) => {
16553
+ "leave": (classes) => {
16538
16554
  el._x_transition.leave.during = classes;
16539
16555
  },
16540
16556
  "leave-start": (classes) => {
@@ -16794,14 +16810,31 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16794
16810
  function onlyDuringClone(callback) {
16795
16811
  return (...args) => isCloning && callback(...args);
16796
16812
  }
16813
+ function cloneNode(from, to) {
16814
+ if (from._x_dataStack) {
16815
+ to._x_dataStack = from._x_dataStack;
16816
+ to.setAttribute("data-has-alpine-state", true);
16817
+ }
16818
+ isCloning = true;
16819
+ dontRegisterReactiveSideEffects(() => {
16820
+ initTree(to, (el, callback) => {
16821
+ callback(el, () => {
16822
+ });
16823
+ });
16824
+ });
16825
+ isCloning = false;
16826
+ }
16827
+ var isCloningLegacy = false;
16797
16828
  function clone(oldEl, newEl) {
16798
16829
  if (!newEl._x_dataStack)
16799
16830
  newEl._x_dataStack = oldEl._x_dataStack;
16800
16831
  isCloning = true;
16832
+ isCloningLegacy = true;
16801
16833
  dontRegisterReactiveSideEffects(() => {
16802
16834
  cloneTree(newEl);
16803
16835
  });
16804
16836
  isCloning = false;
16837
+ isCloningLegacy = false;
16805
16838
  }
16806
16839
  function cloneTree(el) {
16807
16840
  let hasRunThroughFirstEl = false;
@@ -16826,6 +16859,13 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16826
16859
  callback();
16827
16860
  overrideEffect(cache);
16828
16861
  }
16862
+ function shouldSkipRegisteringDataDuringClone(el) {
16863
+ if (!isCloning)
16864
+ return false;
16865
+ if (isCloningLegacy)
16866
+ return true;
16867
+ return el.hasAttribute("data-has-alpine-state");
16868
+ }
16829
16869
  function bind(el, name, value, modifiers = []) {
16830
16870
  if (!el._x_bindings)
16831
16871
  el._x_bindings = reactive({});
@@ -16861,7 +16901,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16861
16901
  } else if (el.type === "checkbox") {
16862
16902
  if (Number.isInteger(value)) {
16863
16903
  el.value = value;
16864
- } else if (!Number.isInteger(value) && !Array.isArray(value) && typeof value !== "boolean" && ![null, void 0].includes(value)) {
16904
+ } else if (!Array.isArray(value) && typeof value !== "boolean" && ![null, void 0].includes(value)) {
16865
16905
  el.value = String(value);
16866
16906
  } else {
16867
16907
  if (Array.isArray(value)) {
@@ -16875,7 +16915,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16875
16915
  } else {
16876
16916
  if (el.value === value)
16877
16917
  return;
16878
- el.value = value;
16918
+ el.value = value === void 0 ? "" : value;
16879
16919
  }
16880
16920
  }
16881
16921
  function bindClasses(el, value) {
@@ -16961,6 +17001,21 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16961
17001
  function getBinding(el, name, fallback) {
16962
17002
  if (el._x_bindings && el._x_bindings[name] !== void 0)
16963
17003
  return el._x_bindings[name];
17004
+ return getAttributeBinding(el, name, fallback);
17005
+ }
17006
+ function extractProp(el, name, fallback, extract = true) {
17007
+ if (el._x_bindings && el._x_bindings[name] !== void 0)
17008
+ return el._x_bindings[name];
17009
+ if (el._x_inlineBindings && el._x_inlineBindings[name] !== void 0) {
17010
+ let binding = el._x_inlineBindings[name];
17011
+ binding.extract = extract;
17012
+ return dontAutoEvaluateFunctions(() => {
17013
+ return evaluate(el, binding.expression);
17014
+ });
17015
+ }
17016
+ return getAttributeBinding(el, name, fallback);
17017
+ }
17018
+ function getAttributeBinding(el, name, fallback) {
16964
17019
  let attr = el.getAttribute(name);
16965
17020
  if (attr === null)
16966
17021
  return typeof fallback === "function" ? fallback() : fallback;
@@ -16994,6 +17049,36 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
16994
17049
  }
16995
17050
  };
16996
17051
  }
17052
+ function entangle({ get: outerGet, set: outerSet }, { get: innerGet, set: innerSet }) {
17053
+ let firstRun = true;
17054
+ let outerHash;
17055
+ let reference2 = effect(() => {
17056
+ const outer = outerGet();
17057
+ const inner = innerGet();
17058
+ if (firstRun) {
17059
+ innerSet(cloneIfObject(outer));
17060
+ firstRun = false;
17061
+ outerHash = JSON.stringify(outer);
17062
+ } else {
17063
+ const outerHashLatest = JSON.stringify(outer);
17064
+ if (outerHashLatest !== outerHash) {
17065
+ innerSet(cloneIfObject(outer));
17066
+ outerHash = outerHashLatest;
17067
+ } else {
17068
+ outerSet(cloneIfObject(inner));
17069
+ outerHash = JSON.stringify(inner);
17070
+ }
17071
+ }
17072
+ JSON.stringify(innerGet());
17073
+ JSON.stringify(outerGet());
17074
+ });
17075
+ return () => {
17076
+ release(reference2);
17077
+ };
17078
+ }
17079
+ function cloneIfObject(value) {
17080
+ return typeof value === "object" ? JSON.parse(JSON.stringify(value)) : value;
17081
+ }
16997
17082
  function plugin(callback) {
16998
17083
  let callbacks = Array.isArray(callback) ? callback : [callback];
16999
17084
  callbacks.forEach((i3) => i3(alpine_default));
@@ -17012,7 +17097,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17012
17097
  if (typeof value === "object" && value !== null && value.hasOwnProperty("init") && typeof value.init === "function") {
17013
17098
  stores[name].init();
17014
17099
  }
17015
- initInterceptors(stores[name]);
17100
+ initInterceptors2(stores[name]);
17016
17101
  }
17017
17102
  function getStores() {
17018
17103
  return stores;
@@ -17021,10 +17106,12 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17021
17106
  function bind2(name, bindings) {
17022
17107
  let getBindings = typeof bindings !== "function" ? () => bindings : bindings;
17023
17108
  if (name instanceof Element) {
17024
- applyBindingsObject(name, getBindings());
17109
+ return applyBindingsObject(name, getBindings());
17025
17110
  } else {
17026
17111
  binds[name] = getBindings;
17027
17112
  }
17113
+ return () => {
17114
+ };
17028
17115
  }
17029
17116
  function injectBindingProviders(obj) {
17030
17117
  Object.entries(binds).forEach(([name, callback]) => {
@@ -17057,6 +17144,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17057
17144
  cleanupRunners.push(handle.runCleanups);
17058
17145
  handle();
17059
17146
  });
17147
+ return () => {
17148
+ while (cleanupRunners.length)
17149
+ cleanupRunners.pop()();
17150
+ };
17060
17151
  }
17061
17152
  var datas = {};
17062
17153
  function data(name, callback) {
@@ -17088,13 +17179,15 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17088
17179
  get raw() {
17089
17180
  return raw;
17090
17181
  },
17091
- version: "3.12.2",
17182
+ version: "3.13.2",
17092
17183
  flushAndStopDeferringMutations,
17093
17184
  dontAutoEvaluateFunctions,
17094
17185
  disableEffectScheduling,
17095
17186
  startObservingMutations,
17096
17187
  stopObservingMutations,
17097
17188
  setReactivityEngine,
17189
+ onAttributeRemoved,
17190
+ onAttributesAdded,
17098
17191
  closestDataStack,
17099
17192
  skipDuringClone,
17100
17193
  onlyDuringClone,
@@ -17107,14 +17200,20 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17107
17200
  interceptInit,
17108
17201
  setEvaluator,
17109
17202
  mergeProxies,
17203
+ extractProp,
17110
17204
  findClosest,
17205
+ onElRemoved,
17111
17206
  closestRoot,
17112
17207
  destroyTree,
17113
17208
  interceptor,
17209
+ // INTERNAL: not public API and is subject to change without major release.
17114
17210
  transition,
17211
+ // INTERNAL
17115
17212
  setStyles,
17213
+ // INTERNAL
17116
17214
  mutateDom,
17117
17215
  directive,
17216
+ entangle,
17118
17217
  throttle,
17119
17218
  debounce,
17120
17219
  evaluate,
@@ -17127,6 +17226,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17127
17226
  store,
17128
17227
  start,
17129
17228
  clone,
17229
+ // INTERNAL
17230
+ cloneNode,
17231
+ // INTERNAL
17130
17232
  bound: getBinding,
17131
17233
  $data: scope,
17132
17234
  walk,
@@ -17146,7 +17248,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17146
17248
  var isBooleanAttr2 = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
17147
17249
  var EMPTY_OBJ = true ? Object.freeze({}) : {};
17148
17250
  var EMPTY_ARR = true ? Object.freeze([]) : [];
17149
- var extend = Object.assign;
17150
17251
  var hasOwnProperty = Object.prototype.hasOwnProperty;
17151
17252
  var hasOwn = (val, key) => hasOwnProperty.call(val, key);
17152
17253
  var isArray = Array.isArray;
@@ -17356,34 +17457,34 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17356
17457
  var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
17357
17458
  var builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol));
17358
17459
  var get2 = /* @__PURE__ */ createGetter();
17359
- var shallowGet = /* @__PURE__ */ createGetter(false, true);
17360
17460
  var readonlyGet = /* @__PURE__ */ createGetter(true);
17361
- var shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
17362
- var arrayInstrumentations = {};
17363
- ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
17364
- const method = Array.prototype[key];
17365
- arrayInstrumentations[key] = function(...args) {
17366
- const arr = toRaw(this);
17367
- for (let i3 = 0, l2 = this.length; i3 < l2; i3++) {
17368
- track(arr, "get", i3 + "");
17369
- }
17370
- const res = method.apply(arr, args);
17371
- if (res === -1 || res === false) {
17372
- return method.apply(arr, args.map(toRaw));
17373
- } else {
17461
+ var arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
17462
+ function createArrayInstrumentations() {
17463
+ const instrumentations = {};
17464
+ ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
17465
+ instrumentations[key] = function(...args) {
17466
+ const arr = toRaw(this);
17467
+ for (let i3 = 0, l2 = this.length; i3 < l2; i3++) {
17468
+ track(arr, "get", i3 + "");
17469
+ }
17470
+ const res = arr[key](...args);
17471
+ if (res === -1 || res === false) {
17472
+ return arr[key](...args.map(toRaw));
17473
+ } else {
17474
+ return res;
17475
+ }
17476
+ };
17477
+ });
17478
+ ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
17479
+ instrumentations[key] = function(...args) {
17480
+ pauseTracking();
17481
+ const res = toRaw(this)[key].apply(this, args);
17482
+ resetTracking();
17374
17483
  return res;
17375
- }
17376
- };
17377
- });
17378
- ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
17379
- const method = Array.prototype[key];
17380
- arrayInstrumentations[key] = function(...args) {
17381
- pauseTracking();
17382
- const res = method.apply(this, args);
17383
- resetTracking();
17384
- return res;
17385
- };
17386
- });
17484
+ };
17485
+ });
17486
+ return instrumentations;
17487
+ }
17387
17488
  function createGetter(isReadonly = false, shallow = false) {
17388
17489
  return function get3(target, key, receiver) {
17389
17490
  if (key === "__v_isReactive") {
@@ -17418,7 +17519,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17418
17519
  };
17419
17520
  }
17420
17521
  var set2 = /* @__PURE__ */ createSetter();
17421
- var shallowSet = /* @__PURE__ */ createSetter(true);
17422
17522
  function createSetter(shallow = false) {
17423
17523
  return function set3(target, key, value, receiver) {
17424
17524
  let oldValue = target[key];
@@ -17484,19 +17584,15 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17484
17584
  return true;
17485
17585
  }
17486
17586
  };
17487
- var shallowReactiveHandlers = extend({}, mutableHandlers, {
17488
- get: shallowGet,
17489
- set: shallowSet
17490
- });
17491
- var shallowReadonlyHandlers = extend({}, readonlyHandlers, {
17492
- get: shallowReadonlyGet
17493
- });
17494
17587
  var toReactive = (value) => isObject(value) ? reactive2(value) : value;
17495
17588
  var toReadonly = (value) => isObject(value) ? readonly(value) : value;
17496
17589
  var toShallow = (value) => value;
17497
17590
  var getProto = (v3) => Reflect.getPrototypeOf(v3);
17498
17591
  function get$1(target, key, isReadonly = false, isShallow = false) {
17499
- target = target["__v_raw"];
17592
+ target = target[
17593
+ "__v_raw"
17594
+ /* RAW */
17595
+ ];
17500
17596
  const rawTarget = toRaw(target);
17501
17597
  const rawKey = toRaw(key);
17502
17598
  if (key !== rawKey) {
@@ -17514,7 +17610,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17514
17610
  }
17515
17611
  }
17516
17612
  function has$1(key, isReadonly = false) {
17517
- const target = this["__v_raw"];
17613
+ const target = this[
17614
+ "__v_raw"
17615
+ /* RAW */
17616
+ ];
17518
17617
  const rawTarget = toRaw(target);
17519
17618
  const rawKey = toRaw(key);
17520
17619
  if (key !== rawKey) {
@@ -17524,7 +17623,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17524
17623
  return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
17525
17624
  }
17526
17625
  function size(target, isReadonly = false) {
17527
- target = target["__v_raw"];
17626
+ target = target[
17627
+ "__v_raw"
17628
+ /* RAW */
17629
+ ];
17528
17630
  !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY);
17529
17631
  return Reflect.get(target, "size", target);
17530
17632
  }
@@ -17589,7 +17691,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17589
17691
  function createForEach(isReadonly, isShallow) {
17590
17692
  return function forEach(callback, thisArg) {
17591
17693
  const observed = this;
17592
- const target = observed["__v_raw"];
17694
+ const target = observed[
17695
+ "__v_raw"
17696
+ /* RAW */
17697
+ ];
17593
17698
  const rawTarget = toRaw(target);
17594
17699
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
17595
17700
  !isReadonly && track(rawTarget, "iterate", ITERATE_KEY);
@@ -17600,7 +17705,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17600
17705
  }
17601
17706
  function createIterableMethod(method, isReadonly, isShallow) {
17602
17707
  return function(...args) {
17603
- const target = this["__v_raw"];
17708
+ const target = this[
17709
+ "__v_raw"
17710
+ /* RAW */
17711
+ ];
17604
17712
  const rawTarget = toRaw(target);
17605
17713
  const targetIsMap = isMap(rawTarget);
17606
17714
  const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
@@ -17609,6 +17717,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17609
17717
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
17610
17718
  !isReadonly && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
17611
17719
  return {
17720
+ // iterator protocol
17612
17721
  next() {
17613
17722
  const { value, done } = innerIterator.next();
17614
17723
  return done ? { value, done } : {
@@ -17616,6 +17725,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17616
17725
  done
17617
17726
  };
17618
17727
  },
17728
+ // iterable protocol
17619
17729
  [Symbol.iterator]() {
17620
17730
  return this;
17621
17731
  }
@@ -17631,73 +17741,106 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17631
17741
  return type === "delete" ? false : this;
17632
17742
  };
17633
17743
  }
17634
- var mutableInstrumentations = {
17635
- get(key) {
17636
- return get$1(this, key);
17637
- },
17638
- get size() {
17639
- return size(this);
17640
- },
17641
- has: has$1,
17642
- add,
17643
- set: set$1,
17644
- delete: deleteEntry,
17645
- clear,
17646
- forEach: createForEach(false, false)
17647
- };
17648
- var shallowInstrumentations = {
17649
- get(key) {
17650
- return get$1(this, key, false, true);
17651
- },
17652
- get size() {
17653
- return size(this);
17654
- },
17655
- has: has$1,
17656
- add,
17657
- set: set$1,
17658
- delete: deleteEntry,
17659
- clear,
17660
- forEach: createForEach(false, true)
17661
- };
17662
- var readonlyInstrumentations = {
17663
- get(key) {
17664
- return get$1(this, key, true);
17665
- },
17666
- get size() {
17667
- return size(this, true);
17668
- },
17669
- has(key) {
17670
- return has$1.call(this, key, true);
17671
- },
17672
- add: createReadonlyMethod("add"),
17673
- set: createReadonlyMethod("set"),
17674
- delete: createReadonlyMethod("delete"),
17675
- clear: createReadonlyMethod("clear"),
17676
- forEach: createForEach(true, false)
17677
- };
17678
- var shallowReadonlyInstrumentations = {
17679
- get(key) {
17680
- return get$1(this, key, true, true);
17681
- },
17682
- get size() {
17683
- return size(this, true);
17684
- },
17685
- has(key) {
17686
- return has$1.call(this, key, true);
17687
- },
17688
- add: createReadonlyMethod("add"),
17689
- set: createReadonlyMethod("set"),
17690
- delete: createReadonlyMethod("delete"),
17691
- clear: createReadonlyMethod("clear"),
17692
- forEach: createForEach(true, true)
17693
- };
17694
- var iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
17695
- iteratorMethods.forEach((method) => {
17696
- mutableInstrumentations[method] = createIterableMethod(method, false, false);
17697
- readonlyInstrumentations[method] = createIterableMethod(method, true, false);
17698
- shallowInstrumentations[method] = createIterableMethod(method, false, true);
17699
- shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);
17700
- });
17744
+ function createInstrumentations() {
17745
+ const mutableInstrumentations2 = {
17746
+ get(key) {
17747
+ return get$1(this, key);
17748
+ },
17749
+ get size() {
17750
+ return size(this);
17751
+ },
17752
+ has: has$1,
17753
+ add,
17754
+ set: set$1,
17755
+ delete: deleteEntry,
17756
+ clear,
17757
+ forEach: createForEach(false, false)
17758
+ };
17759
+ const shallowInstrumentations2 = {
17760
+ get(key) {
17761
+ return get$1(this, key, false, true);
17762
+ },
17763
+ get size() {
17764
+ return size(this);
17765
+ },
17766
+ has: has$1,
17767
+ add,
17768
+ set: set$1,
17769
+ delete: deleteEntry,
17770
+ clear,
17771
+ forEach: createForEach(false, true)
17772
+ };
17773
+ const readonlyInstrumentations2 = {
17774
+ get(key) {
17775
+ return get$1(this, key, true);
17776
+ },
17777
+ get size() {
17778
+ return size(this, true);
17779
+ },
17780
+ has(key) {
17781
+ return has$1.call(this, key, true);
17782
+ },
17783
+ add: createReadonlyMethod(
17784
+ "add"
17785
+ /* ADD */
17786
+ ),
17787
+ set: createReadonlyMethod(
17788
+ "set"
17789
+ /* SET */
17790
+ ),
17791
+ delete: createReadonlyMethod(
17792
+ "delete"
17793
+ /* DELETE */
17794
+ ),
17795
+ clear: createReadonlyMethod(
17796
+ "clear"
17797
+ /* CLEAR */
17798
+ ),
17799
+ forEach: createForEach(true, false)
17800
+ };
17801
+ const shallowReadonlyInstrumentations2 = {
17802
+ get(key) {
17803
+ return get$1(this, key, true, true);
17804
+ },
17805
+ get size() {
17806
+ return size(this, true);
17807
+ },
17808
+ has(key) {
17809
+ return has$1.call(this, key, true);
17810
+ },
17811
+ add: createReadonlyMethod(
17812
+ "add"
17813
+ /* ADD */
17814
+ ),
17815
+ set: createReadonlyMethod(
17816
+ "set"
17817
+ /* SET */
17818
+ ),
17819
+ delete: createReadonlyMethod(
17820
+ "delete"
17821
+ /* DELETE */
17822
+ ),
17823
+ clear: createReadonlyMethod(
17824
+ "clear"
17825
+ /* CLEAR */
17826
+ ),
17827
+ forEach: createForEach(true, true)
17828
+ };
17829
+ const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
17830
+ iteratorMethods.forEach((method) => {
17831
+ mutableInstrumentations2[method] = createIterableMethod(method, false, false);
17832
+ readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
17833
+ shallowInstrumentations2[method] = createIterableMethod(method, false, true);
17834
+ shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true);
17835
+ });
17836
+ return [
17837
+ mutableInstrumentations2,
17838
+ readonlyInstrumentations2,
17839
+ shallowInstrumentations2,
17840
+ shallowReadonlyInstrumentations2
17841
+ ];
17842
+ }
17843
+ var [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations();
17701
17844
  function createInstrumentationGetter(isReadonly, shallow) {
17702
17845
  const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;
17703
17846
  return (target, key, receiver) => {
@@ -17712,16 +17855,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17712
17855
  };
17713
17856
  }
17714
17857
  var mutableCollectionHandlers = {
17715
- get: createInstrumentationGetter(false, false)
17716
- };
17717
- var shallowCollectionHandlers = {
17718
- get: createInstrumentationGetter(false, true)
17858
+ get: /* @__PURE__ */ createInstrumentationGetter(false, false)
17719
17859
  };
17720
17860
  var readonlyCollectionHandlers = {
17721
- get: createInstrumentationGetter(true, false)
17722
- };
17723
- var shallowReadonlyCollectionHandlers = {
17724
- get: createInstrumentationGetter(true, true)
17861
+ get: /* @__PURE__ */ createInstrumentationGetter(true, false)
17725
17862
  };
17726
17863
  function checkIdentityKeys(target, has2, key) {
17727
17864
  const rawKey = toRaw(key);
@@ -17749,10 +17886,16 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17749
17886
  }
17750
17887
  }
17751
17888
  function getTargetType(value) {
17752
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
17889
+ return value[
17890
+ "__v_skip"
17891
+ /* SKIP */
17892
+ ] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
17753
17893
  }
17754
17894
  function reactive2(target) {
17755
- if (target && target["__v_isReadonly"]) {
17895
+ if (target && target[
17896
+ "__v_isReadonly"
17897
+ /* IS_READONLY */
17898
+ ]) {
17756
17899
  return target;
17757
17900
  }
17758
17901
  return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
@@ -17767,7 +17910,13 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17767
17910
  }
17768
17911
  return target;
17769
17912
  }
17770
- if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) {
17913
+ if (target[
17914
+ "__v_raw"
17915
+ /* RAW */
17916
+ ] && !(isReadonly && target[
17917
+ "__v_isReactive"
17918
+ /* IS_REACTIVE */
17919
+ ])) {
17771
17920
  return target;
17772
17921
  }
17773
17922
  const existingProxy = proxyMap.get(target);
@@ -17783,7 +17932,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17783
17932
  return proxy;
17784
17933
  }
17785
17934
  function toRaw(observed) {
17786
- return observed && toRaw(observed["__v_raw"]) || observed;
17935
+ return observed && toRaw(observed[
17936
+ "__v_raw"
17937
+ /* RAW */
17938
+ ]) || observed;
17787
17939
  }
17788
17940
  function isRef(r3) {
17789
17941
  return Boolean(r3 && r3.__v_isRef === true);
@@ -17854,38 +18006,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17854
18006
  warnMissingPluginMagic("Focus", "focus", "focus");
17855
18007
  warnMissingPluginMagic("Persist", "persist", "persist");
17856
18008
  function warnMissingPluginMagic(name, magicName, slug) {
17857
- magic(magicName, (el) => warn(`You can't use [$${directiveName}] without first installing the "${name}" plugin here: https://alpinejs.dev/plugins/${slug}`, el));
17858
- }
17859
- function entangle({ get: outerGet, set: outerSet }, { get: innerGet, set: innerSet }) {
17860
- let firstRun = true;
17861
- let outerHash, innerHash, outerHashLatest, innerHashLatest;
17862
- let reference2 = effect(() => {
17863
- let outer, inner;
17864
- if (firstRun) {
17865
- outer = outerGet();
17866
- innerSet(outer);
17867
- inner = innerGet();
17868
- firstRun = false;
17869
- } else {
17870
- outer = outerGet();
17871
- inner = innerGet();
17872
- outerHashLatest = JSON.stringify(outer);
17873
- innerHashLatest = JSON.stringify(inner);
17874
- if (outerHashLatest !== outerHash) {
17875
- inner = innerGet();
17876
- innerSet(outer);
17877
- inner = outer;
17878
- } else {
17879
- outerSet(inner);
17880
- outer = inner;
17881
- }
17882
- }
17883
- outerHash = JSON.stringify(outer);
17884
- innerHash = JSON.stringify(inner);
17885
- });
17886
- return () => {
17887
- release(reference2);
17888
- };
18009
+ magic(magicName, (el) => warn(`You can't use [$${magicName}] without first installing the "${name}" plugin here: https://alpinejs.dev/plugins/${slug}`, el));
17889
18010
  }
17890
18011
  directive("modelable", (el, { expression }, { effect: effect32, evaluateLater: evaluateLater2, cleanup: cleanup2 }) => {
17891
18012
  let func = evaluateLater2(expression);
@@ -17896,7 +18017,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17896
18017
  };
17897
18018
  let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`);
17898
18019
  let innerSet = (val) => evaluateInnerSet(() => {
17899
- }, { scope: { __placeholder: val } });
18020
+ }, { scope: { "__placeholder": val } });
17900
18021
  let initialValue = innerGet();
17901
18022
  innerSet(initialValue);
17902
18023
  queueMicrotask(() => {
@@ -17905,38 +18026,36 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17905
18026
  el._x_removeModelListeners["default"]();
17906
18027
  let outerGet = el._x_model.get;
17907
18028
  let outerSet = el._x_model.set;
17908
- let releaseEntanglement = entangle({
17909
- get() {
17910
- return outerGet();
17911
- },
17912
- set(value) {
17913
- outerSet(value);
17914
- }
17915
- }, {
17916
- get() {
17917
- return innerGet();
18029
+ let releaseEntanglement = entangle(
18030
+ {
18031
+ get() {
18032
+ return outerGet();
18033
+ },
18034
+ set(value) {
18035
+ outerSet(value);
18036
+ }
17918
18037
  },
17919
- set(value) {
17920
- innerSet(value);
18038
+ {
18039
+ get() {
18040
+ return innerGet();
18041
+ },
18042
+ set(value) {
18043
+ innerSet(value);
18044
+ }
17921
18045
  }
17922
- });
18046
+ );
17923
18047
  cleanup2(releaseEntanglement);
17924
18048
  });
17925
18049
  });
17926
- var teleportContainerDuringClone = document.createElement("div");
17927
18050
  directive("teleport", (el, { modifiers, expression }, { cleanup: cleanup2 }) => {
17928
18051
  if (el.tagName.toLowerCase() !== "template")
17929
18052
  warn("x-teleport can only be used on a <template> tag", el);
17930
- let target = skipDuringClone(() => {
17931
- return document.querySelector(expression);
17932
- }, () => {
17933
- return teleportContainerDuringClone;
17934
- })();
17935
- if (!target)
17936
- warn(`Cannot find x-teleport element for selector: "${expression}"`);
18053
+ let target = getTarget(expression);
17937
18054
  let clone2 = el.content.cloneNode(true).firstElementChild;
17938
18055
  el._x_teleport = clone2;
17939
18056
  clone2._x_teleportBack = el;
18057
+ el.setAttribute("data-teleport-template", true);
18058
+ clone2.setAttribute("data-teleport-target", true);
17940
18059
  if (el._x_forwardEvents) {
17941
18060
  el._x_forwardEvents.forEach((eventName) => {
17942
18061
  clone2.addEventListener(eventName, (e3) => {
@@ -17946,19 +18065,39 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17946
18065
  });
17947
18066
  }
17948
18067
  addScopeToNode(clone2, {}, el);
17949
- mutateDom(() => {
17950
- if (modifiers.includes("prepend")) {
17951
- target.parentNode.insertBefore(clone2, target);
17952
- } else if (modifiers.includes("append")) {
17953
- target.parentNode.insertBefore(clone2, target.nextSibling);
18068
+ let placeInDom = (clone3, target2, modifiers2) => {
18069
+ if (modifiers2.includes("prepend")) {
18070
+ target2.parentNode.insertBefore(clone3, target2);
18071
+ } else if (modifiers2.includes("append")) {
18072
+ target2.parentNode.insertBefore(clone3, target2.nextSibling);
17954
18073
  } else {
17955
- target.appendChild(clone2);
18074
+ target2.appendChild(clone3);
17956
18075
  }
18076
+ };
18077
+ mutateDom(() => {
18078
+ placeInDom(clone2, target, modifiers);
17957
18079
  initTree(clone2);
17958
18080
  clone2._x_ignore = true;
17959
18081
  });
18082
+ el._x_teleportPutBack = () => {
18083
+ let target2 = getTarget(expression);
18084
+ mutateDom(() => {
18085
+ placeInDom(el._x_teleport, target2, modifiers);
18086
+ });
18087
+ };
17960
18088
  cleanup2(() => clone2.remove());
17961
18089
  });
18090
+ var teleportContainerDuringClone = document.createElement("div");
18091
+ function getTarget(expression) {
18092
+ let target = skipDuringClone(() => {
18093
+ return document.querySelector(expression);
18094
+ }, () => {
18095
+ return teleportContainerDuringClone;
18096
+ })();
18097
+ if (!target)
18098
+ warn(`Cannot find x-teleport element for selector: "${expression}"`);
18099
+ return target;
18100
+ }
17962
18101
  var handler = () => {
17963
18102
  };
17964
18103
  handler.inline = (el, { modifiers }, { cleanup: cleanup2 }) => {
@@ -17971,7 +18110,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17971
18110
  directive("effect", (el, { expression }, { effect: effect32 }) => effect32(evaluateLater(el, expression)));
17972
18111
  function on(el, event, modifiers, callback) {
17973
18112
  let listenerTarget = el;
17974
- let handler3 = (e3) => callback(e3);
18113
+ let handler4 = (e3) => callback(e3);
17975
18114
  let options = {};
17976
18115
  let wrapHandler = (callback2, wrapper) => (e3) => wrapper(callback2, e3);
17977
18116
  if (modifiers.includes("dot"))
@@ -17989,30 +18128,30 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
17989
18128
  if (modifiers.includes("debounce")) {
17990
18129
  let nextModifier = modifiers[modifiers.indexOf("debounce") + 1] || "invalid-wait";
17991
18130
  let wait = isNumeric(nextModifier.split("ms")[0]) ? Number(nextModifier.split("ms")[0]) : 250;
17992
- handler3 = debounce(handler3, wait);
18131
+ handler4 = debounce(handler4, wait);
17993
18132
  }
17994
18133
  if (modifiers.includes("throttle")) {
17995
18134
  let nextModifier = modifiers[modifiers.indexOf("throttle") + 1] || "invalid-wait";
17996
18135
  let wait = isNumeric(nextModifier.split("ms")[0]) ? Number(nextModifier.split("ms")[0]) : 250;
17997
- handler3 = throttle(handler3, wait);
18136
+ handler4 = throttle(handler4, wait);
17998
18137
  }
17999
18138
  if (modifiers.includes("prevent"))
18000
- handler3 = wrapHandler(handler3, (next, e3) => {
18139
+ handler4 = wrapHandler(handler4, (next, e3) => {
18001
18140
  e3.preventDefault();
18002
18141
  next(e3);
18003
18142
  });
18004
18143
  if (modifiers.includes("stop"))
18005
- handler3 = wrapHandler(handler3, (next, e3) => {
18144
+ handler4 = wrapHandler(handler4, (next, e3) => {
18006
18145
  e3.stopPropagation();
18007
18146
  next(e3);
18008
18147
  });
18009
18148
  if (modifiers.includes("self"))
18010
- handler3 = wrapHandler(handler3, (next, e3) => {
18149
+ handler4 = wrapHandler(handler4, (next, e3) => {
18011
18150
  e3.target === el && next(e3);
18012
18151
  });
18013
18152
  if (modifiers.includes("away") || modifiers.includes("outside")) {
18014
18153
  listenerTarget = document;
18015
- handler3 = wrapHandler(handler3, (next, e3) => {
18154
+ handler4 = wrapHandler(handler4, (next, e3) => {
18016
18155
  if (el.contains(e3.target))
18017
18156
  return;
18018
18157
  if (e3.target.isConnected === false)
@@ -18025,12 +18164,12 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18025
18164
  });
18026
18165
  }
18027
18166
  if (modifiers.includes("once")) {
18028
- handler3 = wrapHandler(handler3, (next, e3) => {
18167
+ handler4 = wrapHandler(handler4, (next, e3) => {
18029
18168
  next(e3);
18030
- listenerTarget.removeEventListener(event, handler3, options);
18169
+ listenerTarget.removeEventListener(event, handler4, options);
18031
18170
  });
18032
18171
  }
18033
- handler3 = wrapHandler(handler3, (next, e3) => {
18172
+ handler4 = wrapHandler(handler4, (next, e3) => {
18034
18173
  if (isKeyEvent(event)) {
18035
18174
  if (isListeningForASpecificKeyThatHasntBeenPressed(e3, modifiers)) {
18036
18175
  return;
@@ -18038,9 +18177,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18038
18177
  }
18039
18178
  next(e3);
18040
18179
  });
18041
- listenerTarget.addEventListener(event, handler3, options);
18180
+ listenerTarget.addEventListener(event, handler4, options);
18042
18181
  return () => {
18043
- listenerTarget.removeEventListener(event, handler3, options);
18182
+ listenerTarget.removeEventListener(event, handler4, options);
18044
18183
  };
18045
18184
  }
18046
18185
  function dotSyntax(subject) {
@@ -18053,7 +18192,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18053
18192
  return !Array.isArray(subject) && !isNaN(subject);
18054
18193
  }
18055
18194
  function kebabCase2(subject) {
18056
- if ([" ", "_"].includes(subject))
18195
+ if ([" ", "_"].includes(
18196
+ subject
18197
+ ))
18057
18198
  return subject;
18058
18199
  return subject.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[_\s]/, "-").toLowerCase();
18059
18200
  }
@@ -18097,20 +18238,20 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18097
18238
  return [];
18098
18239
  key = kebabCase2(key);
18099
18240
  let modifierToKeyMap = {
18100
- ctrl: "control",
18101
- slash: "/",
18102
- space: " ",
18103
- spacebar: " ",
18104
- cmd: "meta",
18105
- esc: "escape",
18106
- up: "arrow-up",
18107
- down: "arrow-down",
18108
- left: "arrow-left",
18109
- right: "arrow-right",
18110
- period: ".",
18111
- equal: "=",
18112
- minus: "-",
18113
- underscore: "_"
18241
+ "ctrl": "control",
18242
+ "slash": "/",
18243
+ "space": " ",
18244
+ "spacebar": " ",
18245
+ "cmd": "meta",
18246
+ "esc": "escape",
18247
+ "up": "arrow-up",
18248
+ "down": "arrow-down",
18249
+ "left": "arrow-left",
18250
+ "right": "arrow-right",
18251
+ "period": ".",
18252
+ "equal": "=",
18253
+ "minus": "-",
18254
+ "underscore": "_"
18114
18255
  };
18115
18256
  modifierToKeyMap[key] = key;
18116
18257
  return Object.keys(modifierToKeyMap).map((modifier) => {
@@ -18146,7 +18287,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18146
18287
  } else {
18147
18288
  evaluateSet(() => {
18148
18289
  }, {
18149
- scope: { __placeholder: value }
18290
+ scope: { "__placeholder": value }
18150
18291
  });
18151
18292
  }
18152
18293
  };
@@ -18161,8 +18302,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18161
18302
  } : on(el, event, modifiers, (e3) => {
18162
18303
  setValue(getInputValue(el, modifiers, e3, getValue()));
18163
18304
  });
18164
- if (modifiers.includes("fill") && [null, ""].includes(getValue())) {
18165
- el.dispatchEvent(new Event(event, {}));
18305
+ if (modifiers.includes("fill")) {
18306
+ if ([null, ""].includes(getValue()) || el.type === "checkbox" && Array.isArray(getValue())) {
18307
+ el.dispatchEvent(new Event(event, {}));
18308
+ }
18166
18309
  }
18167
18310
  if (!el._x_removeModelListeners)
18168
18311
  el._x_removeModelListeners = {};
@@ -18183,7 +18326,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18183
18326
  }
18184
18327
  };
18185
18328
  el._x_forceModelUpdate = (value) => {
18186
- value = value === void 0 ? getValue() : value;
18187
18329
  if (value === void 0 && typeof expression === "string" && expression.match(/\./))
18188
18330
  value = "";
18189
18331
  window.fromModel = true;
@@ -18199,9 +18341,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18199
18341
  });
18200
18342
  function getInputValue(el, modifiers, event, currentValue) {
18201
18343
  return mutateDom(() => {
18202
- var _a;
18203
18344
  if (event instanceof CustomEvent && event.detail !== void 0)
18204
- return (_a = event.detail) != null ? _a : event.target.value;
18345
+ return event.detail !== null && event.detail !== void 0 ? event.detail : event.target.value;
18205
18346
  else if (el.type === "checkbox") {
18206
18347
  if (Array.isArray(currentValue)) {
18207
18348
  let newValue = modifiers.includes("number") ? safeParseNumber(event.target.value) : event.target.value;
@@ -18267,7 +18408,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18267
18408
  });
18268
18409
  });
18269
18410
  mapAttributes(startingWith(":", into(prefix("bind:"))));
18270
- directive("bind", (el, { value, modifiers, expression, original }, { effect: effect32 }) => {
18411
+ var handler2 = (el, { value, modifiers, expression, original }, { effect: effect32 }) => {
18271
18412
  if (!value) {
18272
18413
  let bindingProviders = {};
18273
18414
  injectBindingProviders(bindingProviders);
@@ -18279,6 +18420,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18279
18420
  }
18280
18421
  if (value === "key")
18281
18422
  return storeKeyForXFor(el, expression);
18423
+ if (el._x_inlineBindings && el._x_inlineBindings[value] && el._x_inlineBindings[value].extract) {
18424
+ return;
18425
+ }
18282
18426
  let evaluate2 = evaluateLater(el, expression);
18283
18427
  effect32(() => evaluate2((result) => {
18284
18428
  if (result === void 0 && typeof expression === "string" && expression.match(/\./)) {
@@ -18286,12 +18430,22 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18286
18430
  }
18287
18431
  mutateDom(() => bind(el, value, result, modifiers));
18288
18432
  }));
18289
- });
18433
+ };
18434
+ handler2.inline = (el, { value, modifiers, expression }) => {
18435
+ if (!value)
18436
+ return;
18437
+ if (!el._x_inlineBindings)
18438
+ el._x_inlineBindings = {};
18439
+ el._x_inlineBindings[value] = { expression, extract: false };
18440
+ };
18441
+ directive("bind", handler2);
18290
18442
  function storeKeyForXFor(el, expression) {
18291
18443
  el._x_keyExpression = expression;
18292
18444
  }
18293
18445
  addRootSelector(() => `[${prefix("data")}]`);
18294
- directive("data", skipDuringClone((el, { expression }, { cleanup: cleanup2 }) => {
18446
+ directive("data", (el, { expression }, { cleanup: cleanup2 }) => {
18447
+ if (shouldSkipRegisteringDataDuringClone(el))
18448
+ return;
18295
18449
  expression = expression === "" ? "{}" : expression;
18296
18450
  let magicContext = {};
18297
18451
  injectMagics(magicContext, el);
@@ -18302,14 +18456,14 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18302
18456
  data2 = {};
18303
18457
  injectMagics(data2, el);
18304
18458
  let reactiveData = reactive(data2);
18305
- initInterceptors(reactiveData);
18459
+ initInterceptors2(reactiveData);
18306
18460
  let undo = addScopeToNode(el, reactiveData);
18307
18461
  reactiveData["init"] && evaluate(el, reactiveData["init"]);
18308
18462
  cleanup2(() => {
18309
18463
  reactiveData["destroy"] && evaluate(el, reactiveData["destroy"]);
18310
18464
  undo();
18311
18465
  });
18312
- }));
18466
+ });
18313
18467
  directive("show", (el, { modifiers, expression }, { effect: effect32 }) => {
18314
18468
  let evaluate2 = evaluateLater(el, expression);
18315
18469
  if (!el._x_doHide)
@@ -18337,13 +18491,16 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18337
18491
  el._x_isShown = true;
18338
18492
  };
18339
18493
  let clickAwayCompatibleShow = () => setTimeout(show);
18340
- let toggle = once((value) => value ? show() : hide2(), (value) => {
18341
- if (typeof el._x_toggleAndCascadeWithTransitions === "function") {
18342
- el._x_toggleAndCascadeWithTransitions(el, value, show, hide2);
18343
- } else {
18344
- value ? clickAwayCompatibleShow() : hide2();
18494
+ let toggle = once(
18495
+ (value) => value ? show() : hide2(),
18496
+ (value) => {
18497
+ if (typeof el._x_toggleAndCascadeWithTransitions === "function") {
18498
+ el._x_toggleAndCascadeWithTransitions(el, value, show, hide2);
18499
+ } else {
18500
+ value ? clickAwayCompatibleShow() : hide2();
18501
+ }
18345
18502
  }
18346
- });
18503
+ );
18347
18504
  let oldValue;
18348
18505
  let firstTime = true;
18349
18506
  effect32(() => evaluate2((value) => {
@@ -18359,7 +18516,11 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18359
18516
  directive("for", (el, { expression }, { effect: effect32, cleanup: cleanup2 }) => {
18360
18517
  let iteratorNames = parseForExpression(expression);
18361
18518
  let evaluateItems = evaluateLater(el, iteratorNames.items);
18362
- let evaluateKey = evaluateLater(el, el._x_keyExpression || "index");
18519
+ let evaluateKey = evaluateLater(
18520
+ el,
18521
+ // the x-bind:key expression is stored for our use instead of evaluated.
18522
+ el._x_keyExpression || "index"
18523
+ );
18363
18524
  el._x_prevKeys = [];
18364
18525
  el._x_lookup = {};
18365
18526
  effect32(() => loop(el, iteratorNames, evaluateItems, evaluateKey));
@@ -18525,17 +18686,19 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18525
18686
  function isNumeric3(subject) {
18526
18687
  return !Array.isArray(subject) && !isNaN(subject);
18527
18688
  }
18528
- function handler2() {
18689
+ function handler3() {
18529
18690
  }
18530
- handler2.inline = (el, { expression }, { cleanup: cleanup2 }) => {
18691
+ handler3.inline = (el, { expression }, { cleanup: cleanup2 }) => {
18531
18692
  let root = closestRoot(el);
18532
18693
  if (!root._x_refs)
18533
18694
  root._x_refs = {};
18534
18695
  root._x_refs[expression] = el;
18535
18696
  cleanup2(() => delete root._x_refs[expression]);
18536
18697
  };
18537
- directive("ref", handler2);
18698
+ directive("ref", handler3);
18538
18699
  directive("if", (el, { expression }, { effect: effect32, cleanup: cleanup2 }) => {
18700
+ if (el.tagName.toLowerCase() !== "template")
18701
+ warn("x-if can only be used on a <template> tag", el);
18539
18702
  let evaluate2 = evaluateLater(el, expression);
18540
18703
  let show = () => {
18541
18704
  if (el._x_currentIfEl)
@@ -18585,7 +18748,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18585
18748
  }
18586
18749
  let removeListener = on(el, value, modifiers, (e3) => {
18587
18750
  evaluate2(() => {
18588
- }, { scope: { $event: e3 }, params: [e3] });
18751
+ }, { scope: { "$event": e3 }, params: [e3] });
18589
18752
  });
18590
18753
  cleanup2(() => removeListener());
18591
18754
  }));
@@ -18593,8 +18756,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18593
18756
  warnMissingPluginDirective("Intersect", "intersect", "intersect");
18594
18757
  warnMissingPluginDirective("Focus", "trap", "focus");
18595
18758
  warnMissingPluginDirective("Mask", "mask", "mask");
18596
- function warnMissingPluginDirective(name, directiveName2, slug) {
18597
- directive(directiveName2, (el) => warn(`You can't use [x-${directiveName2}] without first installing the "${name}" plugin here: https://alpinejs.dev/plugins/${slug}`, el));
18759
+ function warnMissingPluginDirective(name, directiveName, slug) {
18760
+ directive(directiveName, (el) => warn(`You can't use [x-${directiveName}] without first installing the "${name}" plugin here: https://alpinejs.dev/plugins/${slug}`, el));
18598
18761
  }
18599
18762
  alpine_default.setEvaluator(normalEvaluator);
18600
18763
  alpine_default.setReactivityEngine({ reactive: reactive2, effect: effect2, release: stop, raw: toRaw });
@@ -18602,72 +18765,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18602
18765
  var module_default = src_default;
18603
18766
 
18604
18767
  // ../../../node_modules/@alpinejs/morph/dist/module.esm.js
18605
- function createElement(html) {
18606
- const template = document.createElement("template");
18607
- template.innerHTML = html;
18608
- return template.content.firstElementChild;
18609
- }
18610
- function textOrComment(el) {
18611
- return el.nodeType === 3 || el.nodeType === 8;
18612
- }
18613
- var dom = {
18614
- replace(children, old, replacement) {
18615
- let index = children.indexOf(old);
18616
- if (index === -1)
18617
- throw "Cant find element in children";
18618
- old.replaceWith(replacement);
18619
- children[index] = replacement;
18620
- return children;
18621
- },
18622
- before(children, reference2, subject) {
18623
- let index = children.indexOf(reference2);
18624
- if (index === -1)
18625
- throw "Cant find element in children";
18626
- reference2.before(subject);
18627
- children.splice(index, 0, subject);
18628
- return children;
18629
- },
18630
- append(children, subject, appendFn) {
18631
- let last = children[children.length - 1];
18632
- appendFn(subject);
18633
- children.push(subject);
18634
- return children;
18635
- },
18636
- remove(children, subject) {
18637
- let index = children.indexOf(subject);
18638
- if (index === -1)
18639
- throw "Cant find element in children";
18640
- subject.remove();
18641
- return children.filter((i3) => i3 !== subject);
18642
- },
18643
- first(children) {
18644
- return this.teleportTo(children[0]);
18645
- },
18646
- next(children, reference2) {
18647
- let index = children.indexOf(reference2);
18648
- if (index === -1)
18649
- return;
18650
- return this.teleportTo(this.teleportBack(children[index + 1]));
18651
- },
18652
- teleportTo(el) {
18653
- if (!el)
18654
- return el;
18655
- if (el._x_teleport)
18656
- return el._x_teleport;
18657
- return el;
18658
- },
18659
- teleportBack(el) {
18660
- if (!el)
18661
- return el;
18662
- if (el._x_teleportBack)
18663
- return el._x_teleportBack;
18664
- return el;
18665
- }
18666
- };
18667
- var resolveStep = () => {
18668
- };
18669
- var logger = () => {
18670
- };
18671
18768
  function morph(from, toHtml, options) {
18672
18769
  monkeyPatchDomSetAttributeToAllowAtSymbols();
18673
18770
  let fromEl;
@@ -18688,12 +18785,14 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18688
18785
  }
18689
18786
  function patch(from2, to) {
18690
18787
  if (differentElementNamesTypesOrKeys(from2, to)) {
18691
- return patchElement(from2, to);
18788
+ return swapElements(from2, to);
18692
18789
  }
18693
18790
  let updateChildrenOnly = false;
18694
18791
  if (shouldSkip(updating, from2, to, () => updateChildrenOnly = true))
18695
18792
  return;
18696
- window.Alpine && initializeAlpineOnTo(from2, to, () => updateChildrenOnly = true);
18793
+ if (from2.nodeType === 1 && window.Alpine) {
18794
+ window.Alpine.cloneNode(from2, to);
18795
+ }
18697
18796
  if (textOrComment(to)) {
18698
18797
  patchNodeValue(from2, to);
18699
18798
  updated(from2, to);
@@ -18703,20 +18802,18 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18703
18802
  patchAttributes(from2, to);
18704
18803
  }
18705
18804
  updated(from2, to);
18706
- patchChildren(Array.from(from2.childNodes), Array.from(to.childNodes), (toAppend) => {
18707
- from2.appendChild(toAppend);
18708
- });
18805
+ patchChildren(from2, to);
18709
18806
  }
18710
18807
  function differentElementNamesTypesOrKeys(from2, to) {
18711
18808
  return from2.nodeType != to.nodeType || from2.nodeName != to.nodeName || getKey(from2) != getKey(to);
18712
18809
  }
18713
- function patchElement(from2, to) {
18810
+ function swapElements(from2, to) {
18714
18811
  if (shouldSkip(removing, from2))
18715
18812
  return;
18716
18813
  let toCloned = to.cloneNode(true);
18717
18814
  if (shouldSkip(adding, toCloned))
18718
18815
  return;
18719
- dom.replace([from2], from2, toCloned);
18816
+ from2.replaceWith(toCloned);
18720
18817
  removed(from2);
18721
18818
  added(toCloned);
18722
18819
  }
@@ -18727,6 +18824,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18727
18824
  }
18728
18825
  }
18729
18826
  function patchAttributes(from2, to) {
18827
+ if (from2._x_transitioning)
18828
+ return;
18730
18829
  if (from2._x_isShown && !to._x_isShown) {
18731
18830
  return;
18732
18831
  }
@@ -18749,120 +18848,120 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18749
18848
  }
18750
18849
  }
18751
18850
  }
18752
- function patchChildren(fromChildren, toChildren, appendFn) {
18753
- let fromKeyDomNodeMap = {};
18851
+ function patchChildren(from2, to) {
18852
+ let fromKeys = keyToMap(from2.children);
18754
18853
  let fromKeyHoldovers = {};
18755
- let currentTo = dom.first(toChildren);
18756
- let currentFrom = dom.first(fromChildren);
18854
+ let currentTo = getFirstNode(to);
18855
+ let currentFrom = getFirstNode(from2);
18757
18856
  while (currentTo) {
18758
18857
  let toKey = getKey(currentTo);
18759
18858
  let fromKey = getKey(currentFrom);
18760
18859
  if (!currentFrom) {
18761
18860
  if (toKey && fromKeyHoldovers[toKey]) {
18762
18861
  let holdover = fromKeyHoldovers[toKey];
18763
- fromChildren = dom.append(fromChildren, holdover, appendFn);
18862
+ from2.appendChild(holdover);
18764
18863
  currentFrom = holdover;
18765
18864
  } else {
18766
18865
  if (!shouldSkip(adding, currentTo)) {
18767
18866
  let clone2 = currentTo.cloneNode(true);
18768
- fromChildren = dom.append(fromChildren, clone2, appendFn);
18867
+ from2.appendChild(clone2);
18769
18868
  added(clone2);
18770
18869
  }
18771
- currentTo = dom.next(toChildren, currentTo);
18870
+ currentTo = getNextSibling(to, currentTo);
18772
18871
  continue;
18773
18872
  }
18774
18873
  }
18775
- let isIf = (node) => node.nodeType === 8 && node.textContent === " __BLOCK__ ";
18776
- let isEnd = (node) => node.nodeType === 8 && node.textContent === " __ENDBLOCK__ ";
18874
+ let isIf = (node) => node && node.nodeType === 8 && node.textContent === "[if BLOCK]><![endif]";
18875
+ let isEnd = (node) => node && node.nodeType === 8 && node.textContent === "[if ENDBLOCK]><![endif]";
18777
18876
  if (isIf(currentTo) && isIf(currentFrom)) {
18778
- let newFromChildren = [];
18779
- let appendPoint;
18780
18877
  let nestedIfCount = 0;
18878
+ let fromBlockStart = currentFrom;
18781
18879
  while (currentFrom) {
18782
- let next = dom.next(fromChildren, currentFrom);
18880
+ let next = getNextSibling(from2, currentFrom);
18783
18881
  if (isIf(next)) {
18784
18882
  nestedIfCount++;
18785
18883
  } else if (isEnd(next) && nestedIfCount > 0) {
18786
18884
  nestedIfCount--;
18787
18885
  } else if (isEnd(next) && nestedIfCount === 0) {
18788
- currentFrom = dom.next(fromChildren, next);
18789
- appendPoint = next;
18886
+ currentFrom = next;
18790
18887
  break;
18791
18888
  }
18792
- newFromChildren.push(next);
18793
18889
  currentFrom = next;
18794
18890
  }
18795
- let newToChildren = [];
18891
+ let fromBlockEnd = currentFrom;
18796
18892
  nestedIfCount = 0;
18893
+ let toBlockStart = currentTo;
18797
18894
  while (currentTo) {
18798
- let next = dom.next(toChildren, currentTo);
18895
+ let next = getNextSibling(to, currentTo);
18799
18896
  if (isIf(next)) {
18800
18897
  nestedIfCount++;
18801
18898
  } else if (isEnd(next) && nestedIfCount > 0) {
18802
18899
  nestedIfCount--;
18803
18900
  } else if (isEnd(next) && nestedIfCount === 0) {
18804
- currentTo = dom.next(toChildren, next);
18901
+ currentTo = next;
18805
18902
  break;
18806
18903
  }
18807
- newToChildren.push(next);
18808
18904
  currentTo = next;
18809
18905
  }
18810
- patchChildren(newFromChildren, newToChildren, (node) => appendPoint.before(node));
18906
+ let toBlockEnd = currentTo;
18907
+ let fromBlock = new Block(fromBlockStart, fromBlockEnd);
18908
+ let toBlock = new Block(toBlockStart, toBlockEnd);
18909
+ patchChildren(fromBlock, toBlock);
18811
18910
  continue;
18812
18911
  }
18813
- if (currentFrom.nodeType === 1 && lookahead) {
18814
- let nextToElementSibling = dom.next(toChildren, currentTo);
18912
+ if (currentFrom.nodeType === 1 && lookahead && !currentFrom.isEqualNode(currentTo)) {
18913
+ let nextToElementSibling = getNextSibling(to, currentTo);
18815
18914
  let found = false;
18816
18915
  while (!found && nextToElementSibling) {
18817
- if (currentFrom.isEqualNode(nextToElementSibling)) {
18916
+ if (nextToElementSibling.nodeType === 1 && currentFrom.isEqualNode(nextToElementSibling)) {
18818
18917
  found = true;
18819
- [fromChildren, currentFrom] = addNodeBefore(fromChildren, currentTo, currentFrom);
18918
+ currentFrom = addNodeBefore(from2, currentTo, currentFrom);
18820
18919
  fromKey = getKey(currentFrom);
18821
18920
  }
18822
- nextToElementSibling = dom.next(toChildren, nextToElementSibling);
18921
+ nextToElementSibling = getNextSibling(to, nextToElementSibling);
18823
18922
  }
18824
18923
  }
18825
18924
  if (toKey !== fromKey) {
18826
18925
  if (!toKey && fromKey) {
18827
18926
  fromKeyHoldovers[fromKey] = currentFrom;
18828
- [fromChildren, currentFrom] = addNodeBefore(fromChildren, currentTo, currentFrom);
18829
- fromChildren = dom.remove(fromChildren, fromKeyHoldovers[fromKey]);
18830
- currentFrom = dom.next(fromChildren, currentFrom);
18831
- currentTo = dom.next(toChildren, currentTo);
18927
+ currentFrom = addNodeBefore(from2, currentTo, currentFrom);
18928
+ fromKeyHoldovers[fromKey].remove();
18929
+ currentFrom = getNextSibling(from2, currentFrom);
18930
+ currentTo = getNextSibling(to, currentTo);
18832
18931
  continue;
18833
18932
  }
18834
18933
  if (toKey && !fromKey) {
18835
- if (fromKeyDomNodeMap[toKey]) {
18836
- fromChildren = dom.replace(fromChildren, currentFrom, fromKeyDomNodeMap[toKey]);
18837
- currentFrom = fromKeyDomNodeMap[toKey];
18934
+ if (fromKeys[toKey]) {
18935
+ currentFrom.replaceWith(fromKeys[toKey]);
18936
+ currentFrom = fromKeys[toKey];
18838
18937
  }
18839
18938
  }
18840
18939
  if (toKey && fromKey) {
18841
- let fromKeyNode = fromKeyDomNodeMap[toKey];
18940
+ let fromKeyNode = fromKeys[toKey];
18842
18941
  if (fromKeyNode) {
18843
18942
  fromKeyHoldovers[fromKey] = currentFrom;
18844
- fromChildren = dom.replace(fromChildren, currentFrom, fromKeyNode);
18943
+ currentFrom.replaceWith(fromKeyNode);
18845
18944
  currentFrom = fromKeyNode;
18846
18945
  } else {
18847
18946
  fromKeyHoldovers[fromKey] = currentFrom;
18848
- [fromChildren, currentFrom] = addNodeBefore(fromChildren, currentTo, currentFrom);
18849
- fromChildren = dom.remove(fromChildren, fromKeyHoldovers[fromKey]);
18850
- currentFrom = dom.next(fromChildren, currentFrom);
18851
- currentTo = dom.next(toChildren, currentTo);
18947
+ currentFrom = addNodeBefore(from2, currentTo, currentFrom);
18948
+ fromKeyHoldovers[fromKey].remove();
18949
+ currentFrom = getNextSibling(from2, currentFrom);
18950
+ currentTo = getNextSibling(to, currentTo);
18852
18951
  continue;
18853
18952
  }
18854
18953
  }
18855
18954
  }
18856
- let currentFromNext = currentFrom && dom.next(fromChildren, currentFrom);
18955
+ let currentFromNext = currentFrom && getNextSibling(from2, currentFrom);
18857
18956
  patch(currentFrom, currentTo);
18858
- currentTo = currentTo && dom.next(toChildren, currentTo);
18957
+ currentTo = currentTo && getNextSibling(to, currentTo);
18859
18958
  currentFrom = currentFromNext;
18860
18959
  }
18861
18960
  let removals = [];
18862
18961
  while (currentFrom) {
18863
18962
  if (!shouldSkip(removing, currentFrom))
18864
18963
  removals.push(currentFrom);
18865
- currentFrom = dom.next(fromChildren, currentFrom);
18964
+ currentFrom = getNextSibling(from2, currentFrom);
18866
18965
  }
18867
18966
  while (removals.length) {
18868
18967
  let domForRemoval = removals.shift();
@@ -18875,52 +18974,102 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
18875
18974
  }
18876
18975
  function keyToMap(els) {
18877
18976
  let map = {};
18878
- els.forEach((el) => {
18977
+ for (let el of els) {
18879
18978
  let theKey = getKey(el);
18880
18979
  if (theKey) {
18881
18980
  map[theKey] = el;
18882
18981
  }
18883
- });
18982
+ }
18884
18983
  return map;
18885
18984
  }
18886
- function addNodeBefore(children, node, beforeMe) {
18985
+ function addNodeBefore(parent, node, beforeMe) {
18887
18986
  if (!shouldSkip(adding, node)) {
18888
18987
  let clone2 = node.cloneNode(true);
18889
- children = dom.before(children, beforeMe, clone2);
18988
+ parent.insertBefore(clone2, beforeMe);
18890
18989
  added(clone2);
18891
- return [children, clone2];
18990
+ return clone2;
18892
18991
  }
18893
- return [children, node];
18992
+ return node;
18894
18993
  }
18895
18994
  assignOptions(options);
18896
18995
  fromEl = from;
18897
18996
  toEl = typeof toHtml === "string" ? createElement(toHtml) : toHtml;
18898
18997
  if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {
18899
18998
  toEl._x_dataStack = window.Alpine.closestDataStack(from);
18900
- toEl._x_dataStack && window.Alpine.clone(from, toEl);
18999
+ toEl._x_dataStack && window.Alpine.cloneNode(from, toEl);
18901
19000
  }
18902
19001
  patch(from, toEl);
18903
19002
  fromEl = void 0;
18904
19003
  toEl = void 0;
18905
19004
  return from;
18906
19005
  }
18907
- morph.step = () => resolveStep();
18908
- morph.log = (theLogger) => {
18909
- logger = theLogger;
19006
+ morph.step = () => {
19007
+ };
19008
+ morph.log = () => {
18910
19009
  };
18911
19010
  function shouldSkip(hook, ...args) {
18912
19011
  let skip = false;
18913
19012
  hook(...args, () => skip = true);
18914
19013
  return skip;
18915
19014
  }
18916
- function initializeAlpineOnTo(from, to, childrenOnly) {
18917
- if (from.nodeType !== 1)
18918
- return;
18919
- if (from._x_dataStack) {
18920
- window.Alpine.clone(from, to);
19015
+ var patched = false;
19016
+ function createElement(html) {
19017
+ const template = document.createElement("template");
19018
+ template.innerHTML = html;
19019
+ return template.content.firstElementChild;
19020
+ }
19021
+ function textOrComment(el) {
19022
+ return el.nodeType === 3 || el.nodeType === 8;
19023
+ }
19024
+ var Block = class {
19025
+ constructor(start3, end2) {
19026
+ this.startComment = start3;
19027
+ this.endComment = end2;
19028
+ }
19029
+ get children() {
19030
+ let children = [];
19031
+ let currentNode = this.startComment.nextSibling;
19032
+ while (currentNode && currentNode !== this.endComment) {
19033
+ children.push(currentNode);
19034
+ currentNode = currentNode.nextSibling;
19035
+ }
19036
+ return children;
19037
+ }
19038
+ appendChild(child) {
19039
+ this.endComment.before(child);
18921
19040
  }
19041
+ get firstChild() {
19042
+ let first = this.startComment.nextSibling;
19043
+ if (first === this.endComment)
19044
+ return;
19045
+ return first;
19046
+ }
19047
+ nextNode(reference2) {
19048
+ let next = reference2.nextSibling;
19049
+ if (next === this.endComment)
19050
+ return;
19051
+ return next;
19052
+ }
19053
+ insertBefore(newNode, reference2) {
19054
+ reference2.before(newNode);
19055
+ return newNode;
19056
+ }
19057
+ };
19058
+ function getFirstNode(parent) {
19059
+ return parent.firstChild;
19060
+ }
19061
+ function getNextSibling(parent, reference2) {
19062
+ if (reference2._x_teleport) {
19063
+ return reference2._x_teleport;
19064
+ }
19065
+ let next;
19066
+ if (parent instanceof Block) {
19067
+ next = parent.nextNode(reference2);
19068
+ } else {
19069
+ next = reference2.nextSibling;
19070
+ }
19071
+ return next;
18922
19072
  }
18923
- var patched = false;
18924
19073
  function monkeyPatchDomSetAttributeToAllowAtSymbols() {
18925
19074
  if (patched)
18926
19075
  return;
@@ -19042,7 +19191,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
19042
19191
  let evaluate2 = evaluateLater2(expression);
19043
19192
  let options = {
19044
19193
  rootMargin: getRootMargin(modifiers),
19045
- threshold: getThreshhold(modifiers)
19194
+ threshold: getThreshold(modifiers)
19046
19195
  };
19047
19196
  let observer2 = new IntersectionObserver((entries) => {
19048
19197
  entries.forEach((entry) => {
@@ -19058,7 +19207,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
19058
19207
  });
19059
19208
  });
19060
19209
  }
19061
- function getThreshhold(modifiers) {
19210
+ function getThreshold(modifiers) {
19062
19211
  if (modifiers.includes("full"))
19063
19212
  return 0.99;
19064
19213
  if (modifiers.includes("half"))
@@ -19220,7 +19369,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
19220
19369
  return "-";
19221
19370
  if (/^\D+$/.test(input))
19222
19371
  return "9";
19223
- thousands = thousands != null ? thousands : delimiter === "," ? "." : ",";
19372
+ if (thousands === null || thousands === void 0) {
19373
+ thousands = delimiter === "," ? "." : ",";
19374
+ }
19224
19375
  let addThousands = (input2, thousands2) => {
19225
19376
  let output = "";
19226
19377
  let counter = 0;
@@ -19254,7 +19405,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
19254
19405
  }
19255
19406
  var module_default5 = src_default5;
19256
19407
 
19257
- // ../../../node_modules/tabbable/dist/index.esm.js
19408
+ // ../../../node_modules/@alpinejs/focus/dist/module.esm.js
19258
19409
  var candidateSelectors = ["input", "select", "textarea", "a[href]", "button", "[tabindex]:not(slot)", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])', "details>summary:first-of-type", "details"];
19259
19410
  var candidateSelector = /* @__PURE__ */ candidateSelectors.join(",");
19260
19411
  var NoElement = typeof Element === "undefined";
@@ -19528,8 +19679,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
19528
19679
  }
19529
19680
  return isNodeMatchingSelectorFocusable(options, node);
19530
19681
  };
19531
-
19532
- // ../../../node_modules/focus-trap/dist/focus-trap.esm.js
19533
19682
  function ownKeys2(object, enumerableOnly) {
19534
19683
  var keys = Object.keys(object);
19535
19684
  if (Object.getOwnPropertySymbols) {
@@ -20051,8 +20200,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
20051
20200
  trap.updateContainerElements(elements);
20052
20201
  return trap;
20053
20202
  };
20054
-
20055
- // ../../../node_modules/@alpinejs/focus/dist/module.esm.js
20056
20203
  function src_default6(Alpine3) {
20057
20204
  let lastFocused;
20058
20205
  let currentFocused;
@@ -22688,17 +22835,17 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
22688
22835
  updateTransitionEndListener(box, "add", listener);
22689
22836
  currentTransitionEndListener = listener;
22690
22837
  }
22691
- function on2(eventType, handler3, options) {
22838
+ function on2(eventType, handler4, options) {
22692
22839
  if (options === void 0) {
22693
22840
  options = false;
22694
22841
  }
22695
22842
  var nodes = normalizeToArray(instance.props.triggerTarget || reference2);
22696
22843
  nodes.forEach(function(node) {
22697
- node.addEventListener(eventType, handler3, options);
22844
+ node.addEventListener(eventType, handler4, options);
22698
22845
  listeners.push({
22699
22846
  node,
22700
22847
  eventType,
22701
- handler: handler3,
22848
+ handler: handler4,
22702
22849
  options
22703
22850
  });
22704
22851
  });
@@ -22732,8 +22879,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
22732
22879
  }
22733
22880
  function removeListeners() {
22734
22881
  listeners.forEach(function(_ref) {
22735
- var node = _ref.node, eventType = _ref.eventType, handler3 = _ref.handler, options = _ref.options;
22736
- node.removeEventListener(eventType, handler3, options);
22882
+ var node = _ref.node, eventType = _ref.eventType, handler4 = _ref.handler, options = _ref.options;
22883
+ node.removeEventListener(eventType, handler4, options);
22737
22884
  });
22738
22885
  listeners = [];
22739
22886
  }
@@ -24331,8 +24478,72 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
24331
24478
  };
24332
24479
  });
24333
24480
 
24481
+ // ../../components/coco/base/poll_controller/poll_controller.js
24482
+ var poll_controller_exports = {};
24483
+ __export(poll_controller_exports, {
24484
+ default: () => poll_controller_default
24485
+ });
24486
+ var poll_controller_default = CocoComponent("pollController", () => {
24487
+ return {
24488
+ polling: false,
24489
+ frame: null,
24490
+ pollTimer: null,
24491
+ get interval() {
24492
+ return parseInt(this.$root.dataset.interval || 0, 10);
24493
+ },
24494
+ init() {
24495
+ this.frame = document.getElementById("polling-controller-frame");
24496
+ this.observer = new MutationObserver(() => this.onUpdate());
24497
+ this.observer.observe(this.$el, { attributes: true });
24498
+ },
24499
+ startPolling() {
24500
+ if (this.interval > 0 && !this.polling) {
24501
+ this.polling = true;
24502
+ this.queuePollRequest(500);
24503
+ }
24504
+ },
24505
+ onUpdate() {
24506
+ this.$nextTick(() => {
24507
+ this.$dispatch("dom-updates:complete", { html: document });
24508
+ });
24509
+ this.queuePollRequest();
24510
+ },
24511
+ queuePollRequest(wait) {
24512
+ if (this.pollTimer)
24513
+ clearTimeout(this.pollTimer);
24514
+ if (this.interval > 0 && this.polling) {
24515
+ this.pollTimer = setTimeout(
24516
+ () => this.reloadFrame(),
24517
+ wait || this.interval
24518
+ );
24519
+ }
24520
+ },
24521
+ reloadFrame() {
24522
+ this.frame.addEventListener(
24523
+ "turbo:before-fetch-request",
24524
+ addStreamHeaders,
24525
+ { once: true }
24526
+ );
24527
+ window.Turbo.visit(location.href, {
24528
+ frame: this.frame.id,
24529
+ action: "replace"
24530
+ });
24531
+ },
24532
+ destroy() {
24533
+ this.observer.disconnect();
24534
+ this.polling = false;
24535
+ }
24536
+ };
24537
+ });
24538
+ function addStreamHeaders(event) {
24539
+ const { headers } = event.detail.fetchOptions || {};
24540
+ if (headers) {
24541
+ headers.Accept = ["text/vnd.turbo-stream.html", headers.Accept].join(", ");
24542
+ }
24543
+ }
24544
+
24334
24545
  // import-glob:/Users/mark/Code/coveragebook/coco/app/assets/js/base|@baseComponents/**/*.js
24335
- var modules = [button_exports, dropdown_exports, icon_exports, image_uploader_exports, modal_exports, modal_dialog_exports, modal_lightbox_exports];
24546
+ var modules = [button_exports, dropdown_exports, icon_exports, image_uploader_exports, modal_exports, modal_dialog_exports, modal_lightbox_exports, poll_controller_exports];
24336
24547
  var __default = modules;
24337
24548
 
24338
24549
  // base/components.js
@@ -24846,7 +25057,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
24846
25057
  }
24847
25058
  },
24848
25059
  root: {
24849
- "x-options": '["dismissable", "singleLine"]',
25060
+ "x-options": '["dismissable", "singleLine", "dismissAfterAction"]',
24850
25061
  ":class": "{'force-multi-line': forceMultiLine}"
24851
25062
  }
24852
25063
  };
@@ -26826,12 +27037,16 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
26826
27037
  readFile(file) {
26827
27038
  const reader = new FileReader();
26828
27039
  reader.addEventListener("load", () => {
26829
- this.selectedImage = {
27040
+ const selectedImage = {
26830
27041
  name: file.name,
26831
27042
  file,
26832
27043
  data: reader.result
26833
27044
  };
26834
- this.dropdown.hide();
27045
+ this.$dispatch("image-picker:change", { image: selectedImage });
27046
+ this.selectedImage = selectedImage;
27047
+ if (this.dropdown) {
27048
+ this.dropdown.hide();
27049
+ }
26835
27050
  });
26836
27051
  reader.readAsDataURL(file);
26837
27052
  },
@@ -27175,8 +27390,17 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
27175
27390
  };
27176
27391
  });
27177
27392
 
27393
+ // ../../components/coco/app/layouts/page/page.js
27394
+ var page_exports = {};
27395
+ __export(page_exports, {
27396
+ default: () => page_default
27397
+ });
27398
+ var page_default = CocoComponent("pageLayout", () => {
27399
+ return {};
27400
+ });
27401
+
27178
27402
  // import-glob:/Users/mark/Code/coveragebook/coco/app/assets/js/app|@appComponents/**/*.js
27179
- var modules3 = [header_exports, nav_drawer_exports, item_exports, menu_exports, navbar_exports, slide_editor_exports, alert_exports, button_group_exports, color_picker_exports, color_picker_button_exports, confirm_panel_exports, image_picker_exports, image_picker_button_exports, layout_picker_button_exports, menu_button_exports, notice_exports, seamless_textarea_exports, snackbar_exports, system_banner_exports, toast_exports, toolbar_exports, application_exports];
27403
+ var modules3 = [header_exports, nav_drawer_exports, item_exports, menu_exports, navbar_exports, slide_editor_exports, alert_exports, button_group_exports, color_picker_exports, color_picker_button_exports, confirm_panel_exports, image_picker_exports, image_picker_button_exports, layout_picker_button_exports, menu_button_exports, notice_exports, seamless_textarea_exports, snackbar_exports, system_banner_exports, toast_exports, toolbar_exports, application_exports, page_exports];
27180
27404
  var __default3 = modules3;
27181
27405
 
27182
27406
  // app/components.js
@@ -27219,16 +27443,20 @@ html2canvas/dist/html2canvas.js:
27219
27443
  PERFORMANCE OF THIS SOFTWARE.
27220
27444
  ***************************************************************************** *)
27221
27445
 
27222
- tabbable/dist/index.esm.js:
27223
- (*!
27224
- * tabbable 5.3.3
27225
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
27226
- *)
27227
-
27228
- focus-trap/dist/focus-trap.esm.js:
27229
- (*!
27230
- * focus-trap 6.9.4
27231
- * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
27446
+ @alpinejs/focus/dist/module.esm.js:
27447
+ (*! Bundled license information:
27448
+
27449
+ tabbable/dist/index.esm.js:
27450
+ (*!
27451
+ * tabbable 5.3.3
27452
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
27453
+ *)
27454
+
27455
+ focus-trap/dist/focus-trap.esm.js:
27456
+ (*!
27457
+ * focus-trap 6.9.4
27458
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
27459
+ *)
27232
27460
  *)
27233
27461
 
27234
27462
  @jaames/iro/dist/iro.es.js: