From ac892ff7ae6ee87cacc208b46105187f294b63ea Mon Sep 17 00:00:00 2001 From: second1996 Date: Mon, 11 Nov 2024 03:40:37 +0200 Subject: [PATCH 1/4] refactor: UI components --- node_modules/.package-lock.json | 6 + .../.vite/deps_temp/@alpinejs_mask.js | 154 + .../.vite/deps_temp/@alpinejs_mask.js.map | 7 + .../.vite/deps_temp/@alpinejs_persist.js | 45 + .../.vite/deps_temp/@alpinejs_persist.js.map | 7 + node_modules/.vite/deps_temp/_metadata.json | 25 + node_modules/.vite/deps_temp/alpinejs.js | 2819 +++++++++++++++++ node_modules/.vite/deps_temp/alpinejs.js.map | 7 + node_modules/.vite/deps_temp/package.json | 1 + src/Laravel/src/Layouts/BaseLayout.php | 4 +- src/UI/dist/assets/main.css | 2 +- src/UI/dist/assets/minimalistic.css | 2 +- src/UI/resources/css/components/dropdowns.css | 15 +- src/UI/resources/css/components/languages.css | 18 + src/UI/resources/css/components/menu.css | 227 +- src/UI/resources/css/components/profile.css | 38 + src/UI/resources/css/components/search.css | 20 + .../css/components/theme-switcher.css | 12 + src/UI/resources/css/main.css | 4 + src/UI/resources/css/minimalistic.css | 158 +- .../views/components/layout/profile.blade.php | 10 +- .../views/components/layout/search.blade.php | 33 +- .../layout/theme-switcher.blade.php | 72 +- src/UI/src/Components/Table/TableBuilder.php | 2 +- 24 files changed, 3365 insertions(+), 323 deletions(-) create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/.vite/deps_temp/@alpinejs_mask.js create mode 100644 node_modules/.vite/deps_temp/@alpinejs_mask.js.map create mode 100644 node_modules/.vite/deps_temp/@alpinejs_persist.js create mode 100644 node_modules/.vite/deps_temp/@alpinejs_persist.js.map create mode 100644 node_modules/.vite/deps_temp/_metadata.json create mode 100644 node_modules/.vite/deps_temp/alpinejs.js create mode 100644 node_modules/.vite/deps_temp/alpinejs.js.map create mode 100644 node_modules/.vite/deps_temp/package.json create mode 100644 src/UI/resources/css/components/languages.css create mode 100644 src/UI/resources/css/components/profile.css create mode 100644 src/UI/resources/css/components/search.css create mode 100644 src/UI/resources/css/components/theme-switcher.css diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 000000000..53ce02aa6 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "moonshine", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/node_modules/.vite/deps_temp/@alpinejs_mask.js b/node_modules/.vite/deps_temp/@alpinejs_mask.js new file mode 100644 index 000000000..a2975d508 --- /dev/null +++ b/node_modules/.vite/deps_temp/@alpinejs_mask.js @@ -0,0 +1,154 @@ +// node_modules/@alpinejs/mask/dist/module.esm.js +function src_default(Alpine) { + Alpine.directive("mask", (el, { value, expression }, { effect, evaluateLater }) => { + let templateFn = () => expression; + let lastInputValue = ""; + if (["function", "dynamic"].includes(value)) { + let evaluator = evaluateLater(expression); + effect(() => { + templateFn = (input) => { + let result; + Alpine.dontAutoEvaluateFunctions(() => { + evaluator((value2) => { + result = typeof value2 === "function" ? value2(input) : value2; + }, { scope: { + $input: input, + $money: formatMoney.bind({ el }) + } }); + }); + return result; + }; + processInputValue(el); + }); + } else { + processInputValue(el); + } + el.addEventListener("input", () => processInputValue(el)); + el.addEventListener("blur", () => processInputValue(el, false)); + function processInputValue(el2, shouldRestoreCursor = true) { + let input = el2.value; + let template = templateFn(input); + if (!template || template === "false") + return false; + if (lastInputValue.length - el2.value.length === 1) { + return lastInputValue = el2.value; + } + let setInput = () => { + lastInputValue = el2.value = formatInput(input, template); + }; + if (shouldRestoreCursor) { + restoreCursorPosition(el2, template, () => { + setInput(); + }); + } else { + setInput(); + } + } + function formatInput(input, template) { + if (input === "") + return ""; + let strippedDownInput = stripDown(template, input); + let rebuiltInput = buildUp(template, strippedDownInput); + return rebuiltInput; + } + }); +} +function restoreCursorPosition(el, template, callback) { + let cursorPosition = el.selectionStart; + let unformattedValue = el.value; + callback(); + let beforeLeftOfCursorBeforeFormatting = unformattedValue.slice(0, cursorPosition); + let newPosition = buildUp(template, stripDown(template, beforeLeftOfCursorBeforeFormatting)).length; + el.setSelectionRange(newPosition, newPosition); +} +function stripDown(template, input) { + let inputToBeStripped = input; + let output = ""; + let regexes = { + "9": /[0-9]/, + a: /[a-zA-Z]/, + "*": /[a-zA-Z0-9]/ + }; + let wildcardTemplate = ""; + for (let i = 0; i < template.length; i++) { + if (["9", "a", "*"].includes(template[i])) { + wildcardTemplate += template[i]; + continue; + } + for (let j = 0; j < inputToBeStripped.length; j++) { + if (inputToBeStripped[j] === template[i]) { + inputToBeStripped = inputToBeStripped.slice(0, j) + inputToBeStripped.slice(j + 1); + break; + } + } + } + for (let i = 0; i < wildcardTemplate.length; i++) { + let found = false; + for (let j = 0; j < inputToBeStripped.length; j++) { + if (regexes[wildcardTemplate[i]].test(inputToBeStripped[j])) { + output += inputToBeStripped[j]; + inputToBeStripped = inputToBeStripped.slice(0, j) + inputToBeStripped.slice(j + 1); + found = true; + break; + } + } + if (!found) + break; + } + return output; +} +function buildUp(template, input) { + let clean = Array.from(input); + let output = ""; + for (let i = 0; i < template.length; i++) { + if (!["9", "a", "*"].includes(template[i])) { + output += template[i]; + continue; + } + if (clean.length === 0) + break; + output += clean.shift(); + } + return output; +} +function formatMoney(input, delimeter = ".", thousands) { + thousands = delimeter === "," && thousands === void 0 ? "." : ","; + let addThousands = (input2, thousands2) => { + let output = ""; + let counter = 0; + for (let i = input2.length - 1; i >= 0; i--) { + if (input2[i] === thousands2) + continue; + if (counter === 3) { + output = input2[i] + thousands2 + output; + counter = 0; + } else { + output = input2[i] + output; + } + counter++; + } + return output; + }; + let strippedInput = input.replaceAll(new RegExp(`[^0-9\\${delimeter}]`, "g"), ""); + let template = Array.from({ length: strippedInput.split(delimeter)[0].length }).fill("9").join(""); + template = addThousands(template, thousands); + if (input.includes(delimeter)) + template += `${delimeter}99`; + queueMicrotask(() => { + if (this.el.value.endsWith(delimeter)) + return; + if (this.el.value[this.el.selectionStart - 1] === delimeter) { + this.el.setSelectionRange(this.el.selectionStart - 1, this.el.selectionStart - 1); + } + }); + return template; +} +var module_default = src_default; + +// dep:@alpinejs_mask +var alpinejs_mask_default = module_default; +export { + alpinejs_mask_default as default, + stripDown +}; +//# sourceMappingURL=@alpinejs_mask.js.map diff --git a/node_modules/.vite/deps_temp/@alpinejs_mask.js.map b/node_modules/.vite/deps_temp/@alpinejs_mask.js.map new file mode 100644 index 000000000..cebd51af7 --- /dev/null +++ b/node_modules/.vite/deps_temp/@alpinejs_mask.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../@alpinejs/mask/dist/module.esm.js", "dep:@alpinejs_mask"], + "sourcesContent": ["// packages/mask/src/index.js\nfunction src_default(Alpine) {\n Alpine.directive(\"mask\", (el, {value, expression}, {effect, evaluateLater}) => {\n let templateFn = () => expression;\n let lastInputValue = \"\";\n if ([\"function\", \"dynamic\"].includes(value)) {\n let evaluator = evaluateLater(expression);\n effect(() => {\n templateFn = (input) => {\n let result;\n Alpine.dontAutoEvaluateFunctions(() => {\n evaluator((value2) => {\n result = typeof value2 === \"function\" ? value2(input) : value2;\n }, {scope: {\n $input: input,\n $money: formatMoney.bind({el})\n }});\n });\n return result;\n };\n processInputValue(el);\n });\n } else {\n processInputValue(el);\n }\n el.addEventListener(\"input\", () => processInputValue(el));\n el.addEventListener(\"blur\", () => processInputValue(el, false));\n function processInputValue(el2, shouldRestoreCursor = true) {\n let input = el2.value;\n let template = templateFn(input);\n if (!template || template === \"false\")\n return false;\n if (lastInputValue.length - el2.value.length === 1) {\n return lastInputValue = el2.value;\n }\n let setInput = () => {\n lastInputValue = el2.value = formatInput(input, template);\n };\n if (shouldRestoreCursor) {\n restoreCursorPosition(el2, template, () => {\n setInput();\n });\n } else {\n setInput();\n }\n }\n function formatInput(input, template) {\n if (input === \"\")\n return \"\";\n let strippedDownInput = stripDown(template, input);\n let rebuiltInput = buildUp(template, strippedDownInput);\n return rebuiltInput;\n }\n });\n}\nfunction restoreCursorPosition(el, template, callback) {\n let cursorPosition = el.selectionStart;\n let unformattedValue = el.value;\n callback();\n let beforeLeftOfCursorBeforeFormatting = unformattedValue.slice(0, cursorPosition);\n let newPosition = buildUp(template, stripDown(template, beforeLeftOfCursorBeforeFormatting)).length;\n el.setSelectionRange(newPosition, newPosition);\n}\nfunction stripDown(template, input) {\n let inputToBeStripped = input;\n let output = \"\";\n let regexes = {\n \"9\": /[0-9]/,\n a: /[a-zA-Z]/,\n \"*\": /[a-zA-Z0-9]/\n };\n let wildcardTemplate = \"\";\n for (let i = 0; i < template.length; i++) {\n if ([\"9\", \"a\", \"*\"].includes(template[i])) {\n wildcardTemplate += template[i];\n continue;\n }\n for (let j = 0; j < inputToBeStripped.length; j++) {\n if (inputToBeStripped[j] === template[i]) {\n inputToBeStripped = inputToBeStripped.slice(0, j) + inputToBeStripped.slice(j + 1);\n break;\n }\n }\n }\n for (let i = 0; i < wildcardTemplate.length; i++) {\n let found = false;\n for (let j = 0; j < inputToBeStripped.length; j++) {\n if (regexes[wildcardTemplate[i]].test(inputToBeStripped[j])) {\n output += inputToBeStripped[j];\n inputToBeStripped = inputToBeStripped.slice(0, j) + inputToBeStripped.slice(j + 1);\n found = true;\n break;\n }\n }\n if (!found)\n break;\n }\n return output;\n}\nfunction buildUp(template, input) {\n let clean = Array.from(input);\n let output = \"\";\n for (let i = 0; i < template.length; i++) {\n if (![\"9\", \"a\", \"*\"].includes(template[i])) {\n output += template[i];\n continue;\n }\n if (clean.length === 0)\n break;\n output += clean.shift();\n }\n return output;\n}\nfunction formatMoney(input, delimeter = \".\", thousands) {\n thousands = delimeter === \",\" && thousands === void 0 ? \".\" : \",\";\n let addThousands = (input2, thousands2) => {\n let output = \"\";\n let counter = 0;\n for (let i = input2.length - 1; i >= 0; i--) {\n if (input2[i] === thousands2)\n continue;\n if (counter === 3) {\n output = input2[i] + thousands2 + output;\n counter = 0;\n } else {\n output = input2[i] + output;\n }\n counter++;\n }\n return output;\n };\n let strippedInput = input.replaceAll(new RegExp(`[^0-9\\\\${delimeter}]`, \"g\"), \"\");\n let template = Array.from({length: strippedInput.split(delimeter)[0].length}).fill(\"9\").join(\"\");\n template = addThousands(template, thousands);\n if (input.includes(delimeter))\n template += `${delimeter}99`;\n queueMicrotask(() => {\n if (this.el.value.endsWith(delimeter))\n return;\n if (this.el.value[this.el.selectionStart - 1] === delimeter) {\n this.el.setSelectionRange(this.el.selectionStart - 1, this.el.selectionStart - 1);\n }\n });\n return template;\n}\n\n// packages/mask/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n stripDown\n};\n", "import d from \"./node_modules/@alpinejs/mask/dist/module.esm.js\";export default d;\nexport * from \"./node_modules/@alpinejs/mask/dist/module.esm.js\""], + "mappings": ";AACA,SAAS,YAAY,QAAQ;AAC3B,SAAO,UAAU,QAAQ,CAAC,IAAI,EAAC,OAAO,WAAU,GAAG,EAAC,QAAQ,cAAa,MAAM;AAC7E,QAAI,aAAa,MAAM;AACvB,QAAI,iBAAiB;AACrB,QAAI,CAAC,YAAY,SAAS,EAAE,SAAS,KAAK,GAAG;AAC3C,UAAI,YAAY,cAAc,UAAU;AACxC,aAAO,MAAM;AACX,qBAAa,CAAC,UAAU;AACtB,cAAI;AACJ,iBAAO,0BAA0B,MAAM;AACrC,sBAAU,CAAC,WAAW;AACpB,uBAAS,OAAO,WAAW,aAAa,OAAO,KAAK,IAAI;AAAA,YAC1D,GAAG,EAAC,OAAO;AAAA,cACT,QAAQ;AAAA,cACR,QAAQ,YAAY,KAAK,EAAC,GAAE,CAAC;AAAA,YAC/B,EAAC,CAAC;AAAA,UACJ,CAAC;AACD,iBAAO;AAAA,QACT;AACA,0BAAkB,EAAE;AAAA,MACtB,CAAC;AAAA,IACH,OAAO;AACL,wBAAkB,EAAE;AAAA,IACtB;AACA,OAAG,iBAAiB,SAAS,MAAM,kBAAkB,EAAE,CAAC;AACxD,OAAG,iBAAiB,QAAQ,MAAM,kBAAkB,IAAI,KAAK,CAAC;AAC9D,aAAS,kBAAkB,KAAK,sBA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A,MAAI,gBAAgB,MAAM,WAAW,IAAI,OAAO,UAAU,cAAc,GAAG,GAAG,EAAE;AAChF,MAAI,WAAW,MAAM,KAAK,EAAC,QAAQ,cAAc,MAAM,SAAS,EAAE,GAAG,OAAM,CAAC,EAAE,KAAK,GAAG,EAAE,KAAK,EAAE;AAC/F,aAAW,aAAa,UAAU,SAAS;AAC3C,MAAI,MAAM,SAAS,SAAS;AAC1B,gBAAY,GAAG;AACjB,iBAAe,MAAM;AACnB,QAAI,KAAK,GAAG,MAAM,SAAS,SAAS;AAClC;AACF,QAAI,KAAK,GAAG,MAAM,KAAK,GAAG,iBAAiB,OAAO,WAAW;AAC3D,WAAK,GAAG,kBAAkB,KAAK,GAAG,iBAAiB,GAAG,KAAK,GAAG,iBAAiB,CAAC;AAAA,IAClF;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAGA,IAAI,iBAAiB;;;ACnJ4C,IAAO,wBAAQ;", + "names": [] +} diff --git a/node_modules/.vite/deps_temp/@alpinejs_persist.js b/node_modules/.vite/deps_temp/@alpinejs_persist.js new file mode 100644 index 000000000..01ac61b08 --- /dev/null +++ b/node_modules/.vite/deps_temp/@alpinejs_persist.js @@ -0,0 +1,45 @@ +// node_modules/@alpinejs/persist/dist/module.esm.js +function src_default(Alpine) { + let persist = () => { + let alias; + let storage = localStorage; + return Alpine.interceptor((initialValue, getter, setter, path, key) => { + let lookup = alias || `_x_${path}`; + let initial = storageHas(lookup, storage) ? storageGet(lookup, storage) : initialValue; + setter(initial); + Alpine.effect(() => { + let value = getter(); + storageSet(lookup, value, storage); + setter(value); + }); + return initial; + }, (func) => { + func.as = (key) => { + alias = key; + return func; + }, func.using = (target) => { + storage = target; + return func; + }; + }); + }; + Object.defineProperty(Alpine, "$persist", { get: () => persist() }); + Alpine.magic("persist", persist); +} +function storageHas(key, storage) { + return storage.getItem(key) !== null; +} +function storageGet(key, storage) { + return JSON.parse(storage.getItem(key, storage)); +} +function storageSet(key, value, storage) { + storage.setItem(key, JSON.stringify(value)); +} +var module_default = src_default; + +// dep:@alpinejs_persist +var alpinejs_persist_default = module_default; +export { + alpinejs_persist_default as default +}; +//# sourceMappingURL=@alpinejs_persist.js.map diff --git a/node_modules/.vite/deps_temp/@alpinejs_persist.js.map b/node_modules/.vite/deps_temp/@alpinejs_persist.js.map new file mode 100644 index 000000000..09f0a7074 --- /dev/null +++ b/node_modules/.vite/deps_temp/@alpinejs_persist.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../@alpinejs/persist/dist/module.esm.js", "dep:@alpinejs_persist"], + "sourcesContent": ["// packages/persist/src/index.js\nfunction src_default(Alpine) {\n let persist = () => {\n let alias;\n let storage = localStorage;\n return Alpine.interceptor((initialValue, getter, setter, path, key) => {\n let lookup = alias || `_x_${path}`;\n let initial = storageHas(lookup, storage) ? storageGet(lookup, storage) : initialValue;\n setter(initial);\n Alpine.effect(() => {\n let value = getter();\n storageSet(lookup, value, storage);\n setter(value);\n });\n return initial;\n }, (func) => {\n func.as = (key) => {\n alias = key;\n return func;\n }, func.using = (target) => {\n storage = target;\n return func;\n };\n });\n };\n Object.defineProperty(Alpine, \"$persist\", {get: () => persist()});\n Alpine.magic(\"persist\", persist);\n}\nfunction storageHas(key, storage) {\n return storage.getItem(key) !== null;\n}\nfunction storageGet(key, storage) {\n return JSON.parse(storage.getItem(key, storage));\n}\nfunction storageSet(key, value, storage) {\n storage.setItem(key, JSON.stringify(value));\n}\n\n// packages/persist/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default\n};\n", "import d from \"./node_modules/@alpinejs/persist/dist/module.esm.js\";export default d;"], + "mappings": ";AACA,SAAS,YAAY,QAAQ;AAC3B,MAAI,UAAU,MAAM;AAClB,QAAI;AACJ,QAAI,UAAU;AACd,WAAO,OAAO,YAAY,CAAC,cAAc,QAAQ,QAAQ,MAAM,QAAQ;AACrE,UAAI,SAAS,SAAS,MAAM;AAC5B,UAAI,UAAU,WAAW,QAAQ,OAAO,IAAI,WAAW,QAAQ,OAAO,IAAI;AAC1E,aAAO,OAAO;AACd,aAAO,OAAO,MAAM;AAClB,YAAI,QAAQ,OAAO;AACnB,mBAAW,QAAQ,OAAO,OAAO;AACjC,eAAO,KAAK;AAAA,MACd,CAAC;AACD,aAAO;AAAA,IACT,GAAG,CAAC,SAAS;AACX,WAAK,KAAK,CAAC,QAAQ;AACjB,gBAAQ;AACR,eAAO;AAAA,MACT,GAAG,KAAK,QAAQ,CAAC,WAAW;AAC1B,kBAAU;AACV,eAAO;AAAA,MACT;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO,eAAe,QAAQ,YAAY,EAAC,KAAK,MAAM,QAAQ,EAAC,CAAC;AAChE,SAAO,MAAM,WAAW,OAAO;AACjC;AACA,SAAS,WAAW,KAAK,SAAS;AAChC,SAAO,QAAQ,QAAQ,GAAG,MAAM;AAClC;AACA,SAAS,WAAW,KAAK,SAAS;AAChC,SAAO,KAAK,MAAM,QAAQ,QAAQ,KAAK,OAAO,CAAC;AACjD;AACA,SAAS,WAAW,KAAK,OAAO,SAAS;AACvC,UAAQ,QAAQ,KAAK,KAAK,UAAU,KAAK,CAAC;AAC5C;AAGA,IAAI,iBAAiB;;;ACvC+C,IAAO,2BAAQ;", + "names": [] +} diff --git a/node_modules/.vite/deps_temp/_metadata.json b/node_modules/.vite/deps_temp/_metadata.json new file mode 100644 index 000000000..9e700ab5a --- /dev/null +++ b/node_modules/.vite/deps_temp/_metadata.json @@ -0,0 +1,25 @@ +{ + "hash": "83541f5a", + "browserHash": "3d102b32", + "optimized": { + "@alpinejs/mask": { + "src": "../../@alpinejs/mask/dist/module.esm.js", + "file": "@alpinejs_mask.js", + "fileHash": "920de551", + "needsInterop": false + }, + "@alpinejs/persist": { + "src": "../../@alpinejs/persist/dist/module.esm.js", + "file": "@alpinejs_persist.js", + "fileHash": "d70f92a0", + "needsInterop": false + }, + "alpinejs": { + "src": "../../alpinejs/dist/module.esm.js", + "file": "alpinejs.js", + "fileHash": "69f7bb0a", + "needsInterop": false + } + }, + "chunks": {} +} \ No newline at end of file diff --git a/node_modules/.vite/deps_temp/alpinejs.js b/node_modules/.vite/deps_temp/alpinejs.js new file mode 100644 index 000000000..647c0fef4 --- /dev/null +++ b/node_modules/.vite/deps_temp/alpinejs.js @@ -0,0 +1,2819 @@ +// node_modules/alpinejs/dist/module.esm.js +var flushPending = false; +var flushing = false; +var queue = []; +function scheduler(callback) { + queueJob(callback); +} +function queueJob(job) { + if (!queue.includes(job)) + queue.push(job); + queueFlush(); +} +function dequeueJob(job) { + let index = queue.indexOf(job); + if (index !== -1) + queue.splice(index, 1); +} +function queueFlush() { + if (!flushing && !flushPending) { + flushPending = true; + queueMicrotask(flushJobs); + } +} +function flushJobs() { + flushPending = false; + flushing = true; + for (let i = 0; i < queue.length; i++) { + queue[i](); + } + queue.length = 0; + flushing = false; +} +var reactive; +var effect; +var release; +var raw; +var shouldSchedule = true; +function disableEffectScheduling(callback) { + shouldSchedule = false; + callback(); + shouldSchedule = true; +} +function setReactivityEngine(engine) { + reactive = engine.reactive; + release = engine.release; + effect = (callback) => engine.effect(callback, { scheduler: (task) => { + if (shouldSchedule) { + scheduler(task); + } else { + task(); + } + } }); + raw = engine.raw; +} +function overrideEffect(override) { + effect = override; +} +function elementBoundEffect(el) { + let cleanup2 = () => { + }; + let wrappedEffect = (callback) => { + let effectReference = effect(callback); + if (!el._x_effects) { + el._x_effects = /* @__PURE__ */ new Set(); + el._x_runEffects = () => { + el._x_effects.forEach((i) => i()); + }; + } + el._x_effects.add(effectReference); + cleanup2 = () => { + if (effectReference === void 0) + return; + el._x_effects.delete(effectReference); + release(effectReference); + }; + return effectReference; + }; + return [wrappedEffect, () => { + cleanup2(); + }]; +} +var onAttributeAddeds = []; +var onElRemoveds = []; +var onElAddeds = []; +function onElAdded(callback) { + onElAddeds.push(callback); +} +function onElRemoved(el, callback) { + if (typeof callback === "function") { + if (!el._x_cleanups) + el._x_cleanups = []; + el._x_cleanups.push(callback); + } else { + callback = el; + onElRemoveds.push(callback); + } +} +function onAttributesAdded(callback) { + onAttributeAddeds.push(callback); +} +function onAttributeRemoved(el, name, callback) { + if (!el._x_attributeCleanups) + el._x_attributeCleanups = {}; + if (!el._x_attributeCleanups[name]) + el._x_attributeCleanups[name] = []; + el._x_attributeCleanups[name].push(callback); +} +function cleanupAttributes(el, names) { + if (!el._x_attributeCleanups) + return; + Object.entries(el._x_attributeCleanups).forEach(([name, value]) => { + if (names === void 0 || names.includes(name)) { + value.forEach((i) => i()); + delete el._x_attributeCleanups[name]; + } + }); +} +var observer = new MutationObserver(onMutate); +var currentlyObserving = false; +function startObservingMutations() { + observer.observe(document, { subtree: true, childList: true, attributes: true, attributeOldValue: true }); + currentlyObserving = true; +} +function stopObservingMutations() { + flushObserver(); + observer.disconnect(); + currentlyObserving = false; +} +var recordQueue = []; +var willProcessRecordQueue = false; +function flushObserver() { + recordQueue = recordQueue.concat(observer.takeRecords()); + if (recordQueue.length && !willProcessRecordQueue) { + willProcessRecordQueue = true; + queueMicrotask(() => { + processRecordQueue(); + willProcessRecordQueue = false; + }); + } +} +function processRecordQueue() { + onMutate(recordQueue); + recordQueue.length = 0; +} +function mutateDom(callback) { + if (!currentlyObserving) + return callback(); + stopObservingMutations(); + let result = callback(); + startObservingMutations(); + return result; +} +var isCollecting = false; +var deferredMutations = []; +function deferMutations() { + isCollecting = true; +} +function flushAndStopDeferringMutations() { + isCollecting = false; + onMutate(deferredMutations); + deferredMutations = []; +} +function onMutate(mutations) { + if (isCollecting) { + deferredMutations = deferredMutations.concat(mutations); + return; + } + let addedNodes = []; + let removedNodes = []; + let addedAttributes = /* @__PURE__ */ new Map(); + let removedAttributes = /* @__PURE__ */ new Map(); + for (let i = 0; i < mutations.length; i++) { + if (mutations[i].target._x_ignoreMutationObserver) + continue; + if (mutations[i].type === "childList") { + mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.push(node)); + mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.push(node)); + } + if (mutations[i].type === "attributes") { + let el = mutations[i].target; + let name = mutations[i].attributeName; + let oldValue = mutations[i].oldValue; + let add2 = () => { + if (!addedAttributes.has(el)) + addedAttributes.set(el, []); + addedAttributes.get(el).push({ name, value: el.getAttribute(name) }); + }; + let remove = () => { + if (!removedAttributes.has(el)) + removedAttributes.set(el, []); + removedAttributes.get(el).push(name); + }; + if (el.hasAttribute(name) && oldValue === null) { + add2(); + } else if (el.hasAttribute(name)) { + remove(); + add2(); + } else { + remove(); + } + } + } + removedAttributes.forEach((attrs, el) => { + cleanupAttributes(el, attrs); + }); + addedAttributes.forEach((attrs, el) => { + onAttributeAddeds.forEach((i) => i(el, attrs)); + }); + for (let node of removedNodes) { + if (addedNodes.includes(node)) + continue; + onElRemoveds.forEach((i) => i(node)); + if (node._x_cleanups) { + while (node._x_cleanups.length) + node._x_cleanups.pop()(); + } + } + addedNodes.forEach((node) => { + node._x_ignoreSelf = true; + node._x_ignore = true; + }); + for (let node of addedNodes) { + if (removedNodes.includes(node)) + continue; + if (!node.isConnected) + continue; + delete node._x_ignoreSelf; + delete node._x_ignore; + onElAddeds.forEach((i) => i(node)); + node._x_ignore = true; + node._x_ignoreSelf = true; + } + addedNodes.forEach((node) => { + delete node._x_ignoreSelf; + delete node._x_ignore; + }); + addedNodes = null; + removedNodes = null; + addedAttributes = null; + removedAttributes = null; +} +function scope(node) { + return mergeProxies(closestDataStack(node)); +} +function addScopeToNode(node, data2, referenceNode) { + node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)]; + return () => { + node._x_dataStack = node._x_dataStack.filter((i) => i !== data2); + }; +} +function refreshScope(element, scope2) { + let existingScope = element._x_dataStack[0]; + Object.entries(scope2).forEach(([key, value]) => { + existingScope[key] = value; + }); +} +function closestDataStack(node) { + if (node._x_dataStack) + return node._x_dataStack; + if (typeof ShadowRoot === "function" && node instanceof ShadowRoot) { + return closestDataStack(node.host); + } + if (!node.parentNode) { + return []; + } + return closestDataStack(node.parentNode); +} +function mergeProxies(objects) { + let thisProxy = new Proxy({}, { + ownKeys: () => { + return Array.from(new Set(objects.flatMap((i) => Object.keys(i)))); + }, + has: (target, name) => { + return objects.some((obj) => obj.hasOwnProperty(name)); + }, + get: (target, name) => { + return (objects.find((obj) => { + if (obj.hasOwnProperty(name)) { + let descriptor = Object.getOwnPropertyDescriptor(obj, name); + if (descriptor.get && descriptor.get._x_alreadyBound || descriptor.set && descriptor.set._x_alreadyBound) { + return true; + } + if ((descriptor.get || descriptor.set) && descriptor.enumerable) { + let getter = descriptor.get; + let setter = descriptor.set; + let property = descriptor; + getter = getter && getter.bind(thisProxy); + setter = setter && setter.bind(thisProxy); + if (getter) + getter._x_alreadyBound = true; + if (setter) + setter._x_alreadyBound = true; + Object.defineProperty(obj, name, { + ...property, + get: getter, + set: setter + }); + } + return true; + } + return false; + }) || {})[name]; + }, + set: (target, name, value) => { + let closestObjectWithKey = objects.find((obj) => obj.hasOwnProperty(name)); + if (closestObjectWithKey) { + closestObjectWithKey[name] = value; + } else { + objects[objects.length - 1][name] = value; + } + return true; + } + }); + return thisProxy; +} +function initInterceptors(data2) { + let isObject2 = (val) => typeof val === "object" && !Array.isArray(val) && val !== null; + let recurse = (obj, basePath = "") => { + Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => { + if (enumerable === false || value === void 0) + return; + let path = basePath === "" ? key : `${basePath}.${key}`; + if (typeof value === "object" && value !== null && value._x_interceptor) { + obj[key] = value.initialize(data2, path, key); + } else { + if (isObject2(value) && value !== obj && !(value instanceof Element)) { + recurse(value, path); + } + } + }); + }; + return recurse(data2); +} +function interceptor(callback, mutateObj = () => { +}) { + let obj = { + initialValue: void 0, + _x_interceptor: true, + initialize(data2, path, key) { + return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key); + } + }; + mutateObj(obj); + return (initialValue) => { + if (typeof initialValue === "object" && initialValue !== null && initialValue._x_interceptor) { + let initialize = obj.initialize.bind(obj); + obj.initialize = (data2, path, key) => { + let innerValue = initialValue.initialize(data2, path, key); + obj.initialValue = innerValue; + return initialize(data2, path, key); + }; + } else { + obj.initialValue = initialValue; + } + return obj; + }; +} +function get(obj, path) { + return path.split(".").reduce((carry, segment) => carry[segment], obj); +} +function set(obj, path, value) { + if (typeof path === "string") + path = path.split("."); + if (path.length === 1) + obj[path[0]] = value; + else if (path.length === 0) + throw error; + else { + if (obj[path[0]]) + return set(obj[path[0]], path.slice(1), value); + else { + obj[path[0]] = {}; + return set(obj[path[0]], path.slice(1), value); + } + } +} +var magics = {}; +function magic(name, callback) { + magics[name] = callback; +} +function injectMagics(obj, el) { + Object.entries(magics).forEach(([name, callback]) => { + Object.defineProperty(obj, `$${name}`, { + get() { + let [utilities, cleanup2] = getElementBoundUtilities(el); + utilities = { interceptor, ...utilities }; + onElRemoved(el, cleanup2); + return callback(el, utilities); + }, + enumerable: false + }); + }); + return obj; +} +function tryCatch(el, expression, callback, ...args) { + try { + return callback(...args); + } catch (e) { + handleError(e, el, expression); + } +} +function handleError(error2, el, expression = void 0) { + Object.assign(error2, { el, expression }); + console.warn(`Alpine Expression Error: ${error2.message} + +${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); + setTimeout(() => { + throw error2; + }, 0); +} +var shouldAutoEvaluateFunctions = true; +function dontAutoEvaluateFunctions(callback) { + let cache = shouldAutoEvaluateFunctions; + shouldAutoEvaluateFunctions = false; + callback(); + shouldAutoEvaluateFunctions = cache; +} +function evaluate(el, expression, extras = {}) { + let result; + evaluateLater(el, expression)((value) => result = value, extras); + return result; +} +function evaluateLater(...args) { + return theEvaluatorFunction(...args); +} +var theEvaluatorFunction = normalEvaluator; +function setEvaluator(newEvaluator) { + theEvaluatorFunction = newEvaluator; +} +function normalEvaluator(el, expression) { + let overriddenMagics = {}; + injectMagics(overriddenMagics, el); + let dataStack = [overriddenMagics, ...closestDataStack(el)]; + if (typeof expression === "function") { + return generateEvaluatorFromFunction(dataStack, expression); + } + let evaluator = generateEvaluatorFromString(dataStack, expression, el); + return tryCatch.bind(null, el, expression, evaluator); +} +function generateEvaluatorFromFunction(dataStack, func) { + return (receiver = () => { + }, { scope: scope2 = {}, params = [] } = {}) => { + let result = func.apply(mergeProxies([scope2, ...dataStack]), params); + runIfTypeOfFunction(receiver, result); + }; +} +var evaluatorMemo = {}; +function generateFunctionFromString(expression, el) { + if (evaluatorMemo[expression]) { + return evaluatorMemo[expression]; + } + let AsyncFunction = Object.getPrototypeOf(async function() { + }).constructor; + let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression) || /^(let|const)\s/.test(expression) ? `(() => { ${expression} })()` : expression; + const safeAsyncFunction = () => { + try { + return new AsyncFunction(["__self", "scope"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`); + } catch (error2) { + handleError(error2, el, expression); + return Promise.resolve(); + } + }; + let func = safeAsyncFunction(); + evaluatorMemo[expression] = func; + return func; +} +function generateEvaluatorFromString(dataStack, expression, el) { + let func = generateFunctionFromString(expression, el); + return (receiver = () => { + }, { scope: scope2 = {}, params = [] } = {}) => { + func.result = void 0; + func.finished = false; + let completeScope = mergeProxies([scope2, ...dataStack]); + if (typeof func === "function") { + let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression)); + if (func.finished) { + runIfTypeOfFunction(receiver, func.result, completeScope, params, el); + func.result = void 0; + } else { + promise.then((result) => { + runIfTypeOfFunction(receiver, result, completeScope, params, el); + }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0); + } + } + }; +} +function runIfTypeOfFunction(receiver, value, scope2, params, el) { + if (shouldAutoEvaluateFunctions && typeof value === "function") { + let result = value.apply(scope2, params); + if (result instanceof Promise) { + result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value)); + } else { + receiver(result); + } + } else { + receiver(value); + } +} +var prefixAsString = "x-"; +function prefix(subject = "") { + return prefixAsString + subject; +} +function setPrefix(newPrefix) { + prefixAsString = newPrefix; +} +var directiveHandlers = {}; +function directive(name, callback) { + directiveHandlers[name] = callback; +} +function directives(el, attributes, originalAttributeOverride) { + attributes = Array.from(attributes); + if (el._x_virtualDirectives) { + let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({ name, value })); + let staticAttributes = attributesOnly(vAttributes); + vAttributes = vAttributes.map((attribute) => { + if (staticAttributes.find((attr) => attr.name === attribute.name)) { + return { + name: `x-bind:${attribute.name}`, + value: `"${attribute.value}"` + }; + } + return attribute; + }); + attributes = attributes.concat(vAttributes); + } + let transformedAttributeMap = {}; + let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority); + return directives2.map((directive2) => { + return getDirectiveHandler(el, directive2); + }); +} +function attributesOnly(attributes) { + return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr)); +} +var isDeferringHandlers = false; +var directiveHandlerStacks = /* @__PURE__ */ new Map(); +var currentHandlerStackKey = Symbol(); +function deferHandlingDirectives(callback) { + isDeferringHandlers = true; + let key = Symbol(); + currentHandlerStackKey = key; + directiveHandlerStacks.set(key, []); + let flushHandlers = () => { + while (directiveHandlerStacks.get(key).length) + directiveHandlerStacks.get(key).shift()(); + directiveHandlerStacks.delete(key); + }; + let stopDeferring = () => { + isDeferringHandlers = false; + flushHandlers(); + }; + callback(flushHandlers); + stopDeferring(); +} +function getElementBoundUtilities(el) { + let cleanups = []; + let cleanup2 = (callback) => cleanups.push(callback); + let [effect3, cleanupEffect] = elementBoundEffect(el); + cleanups.push(cleanupEffect); + let utilities = { + Alpine: alpine_default, + effect: effect3, + cleanup: cleanup2, + evaluateLater: evaluateLater.bind(evaluateLater, el), + evaluate: evaluate.bind(evaluate, el) + }; + let doCleanup = () => cleanups.forEach((i) => i()); + return [utilities, doCleanup]; +} +function getDirectiveHandler(el, directive2) { + let noop = () => { + }; + let handler3 = directiveHandlers[directive2.type] || noop; + let [utilities, cleanup2] = getElementBoundUtilities(el); + onAttributeRemoved(el, directive2.original, cleanup2); + let fullHandler = () => { + if (el._x_ignore || el._x_ignoreSelf) + return; + handler3.inline && handler3.inline(el, directive2, utilities); + handler3 = handler3.bind(handler3, el, directive2, utilities); + isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler3) : handler3(); + }; + fullHandler.runCleanups = cleanup2; + return fullHandler; +} +var startingWith = (subject, replacement) => ({ name, value }) => { + if (name.startsWith(subject)) + name = name.replace(subject, replacement); + return { name, value }; +}; +var into = (i) => i; +function toTransformedAttributes(callback = () => { +}) { + return ({ name, value }) => { + let { name: newName, value: newValue } = attributeTransformers.reduce((carry, transform) => { + return transform(carry); + }, { name, value }); + if (newName !== name) + callback(newName, name); + return { name: newName, value: newValue }; + }; +} +var attributeTransformers = []; +function mapAttributes(callback) { + attributeTransformers.push(callback); +} +function outNonAlpineAttributes({ name }) { + return alpineAttributeRegex().test(name); +} +var alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\b`); +function toParsedDirectives(transformedAttributeMap, originalAttributeOverride) { + return ({ name, value }) => { + let typeMatch = name.match(alpineAttributeRegex()); + let valueMatch = name.match(/:([a-zA-Z0-9\-:]+)/); + let modifiers = name.match(/\.[^.\]]+(?=[^\]]*$)/g) || []; + let original = originalAttributeOverride || transformedAttributeMap[name] || name; + return { + type: typeMatch ? typeMatch[1] : null, + value: valueMatch ? valueMatch[1] : null, + modifiers: modifiers.map((i) => i.replace(".", "")), + expression: value, + original + }; + }; +} +var DEFAULT = "DEFAULT"; +var directiveOrder = [ + "ignore", + "ref", + "data", + "id", + "bind", + "init", + "for", + "mask", + "model", + "modelable", + "transition", + "show", + "if", + DEFAULT, + "teleport" +]; +function byPriority(a, b) { + let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type; + let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type; + return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB); +} +function dispatch(el, name, detail = {}) { + el.dispatchEvent(new CustomEvent(name, { + detail, + bubbles: true, + composed: true, + cancelable: true + })); +} +var tickStack = []; +var isHolding = false; +function nextTick(callback = () => { +}) { + queueMicrotask(() => { + isHolding || setTimeout(() => { + releaseNextTicks(); + }); + }); + return new Promise((res) => { + tickStack.push(() => { + callback(); + res(); + }); + }); +} +function releaseNextTicks() { + isHolding = false; + while (tickStack.length) + tickStack.shift()(); +} +function holdNextTicks() { + isHolding = true; +} +function walk(el, callback) { + if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) { + Array.from(el.children).forEach((el2) => walk(el2, callback)); + return; + } + let skip = false; + callback(el, () => skip = true); + if (skip) + return; + let node = el.firstElementChild; + while (node) { + walk(node, callback, false); + node = node.nextElementSibling; + } +} +function warn(message, ...args) { + console.warn(`Alpine Warning: ${message}`, ...args); +} +function start() { + if (!document.body) + warn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `