youtuber-blog-frontend/build/server/chunks/index-De6aia-x.js.map

1 line
26 KiB
Plaintext
Raw Normal View History

2024-06-21 23:07:29 +00:00
{"version":3,"file":"index-De6aia-x.js","sources":["../../../.svelte-kit/adapter-node/chunks/Toaster.svelte_svelte_type_style_lang.js","../../../node_modules/nanoid/non-secure/index.js"],"sourcesContent":["import { w as withGet } from \"./index3.js\";\nimport { w as writable } from \"./index2.js\";\nimport { d as createEventDispatcher, f as split_css_unit, i as identity, b as get_store_value } from \"./lifecycle.js\";\nimport { a as cubicOut } from \"./button.js\";\nconst overridable = (_store, onChange) => {\n const store = withGet(_store);\n const update = (updater, sideEffect) => {\n store.update((curr) => {\n const next = updater(curr);\n let res = next;\n if (onChange) {\n res = onChange({ curr, next });\n }\n sideEffect?.(res);\n return res;\n });\n };\n const set = (curr) => {\n update(() => curr);\n };\n return {\n ...store,\n update,\n set\n };\n};\nfunction toWritableStores(properties) {\n const result = {};\n Object.keys(properties).forEach((key) => {\n const propertyKey = key;\n const value = properties[propertyKey];\n result[propertyKey] = withGet(writable(value));\n });\n return result;\n}\nfunction createBitAttrs(bit, parts) {\n const attrs = {};\n parts.forEach((part) => {\n attrs[part] = {\n [`data-${bit}-${part}`]: \"\"\n };\n });\n return (part) => attrs[part];\n}\nfunction disabledAttrs(disabled) {\n return disabled ? { \"aria-disabled\": \"true\", \"data-disabled\": \"\" } : { \"aria-disabled\": void 0, \"data-disabled\": void 0 };\n}\nfunction createDispatcher() {\n const dispatch = createEventDispatcher();\n return (e) => {\n const { originalEvent } = e.detail;\n const { cancelable } = e;\n const type = originalEvent.type;\n const shouldContinue = dispatch(type, { originalEvent, currentTarget: originalEvent.currentTarget }, { cancelable });\n if (!shouldContinue) {\n e.preventDefault();\n }\n };\n}\nfunction removeUndefined(obj) {\n const result = {};\n for (const key in obj) {\n const value = obj[key];\n if (value !== void 0) {\n result[key] = value;\n }\n }\n return result;\n}\nfunction getOptionUpdater(options) {\n return function(key, value) {\n if (value === void 0)\n return;\n const store = options[key];\n if (store) {\n store.set(value);\n }\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = identity } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: (t) => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === \"none\" ? \"\" : style.transform;\n const od = target_opacity * (1 - opacity);\n const [xValue, xUnit] = split_css_unit(x);\n const [yValue, yUnit] = split_css_unit(y);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * xValue}${xUnit}, ${(1 - t) * yValue}${yUnit});\n\t\t\topacity: ${target_opacity - od * u}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut, axis = \"y\" } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const primary_property = axis === \"y\" ? \"height\" : \"width\";\n const primary_property_value = parseFloat(style[primary_property]);\n const secondary_properties = axis === \"y\" ? [\"top\", \"bottom\"] : [\"left\", \"right\"];\n const capitalized_secondary_properties = secondary_properties.map(\n (e) => `${e[0].toUpperCase()}${e.slice(1)}`\n );\n const padding_start_value = parseFloat(style[`padding${capitalized_secondary_properties[0]}`]);\n const padding_end_value = parseFloat(style[`padding${capitalized_secondary_properties[1]}`]);\n const margin_start_value = parseFloat(style[`margin${capitalized_secondary_properties[0]}`]);\n const margin_end_value = parseFloat(style[