youtuber-blog-frontend/build/server/chunks/ssr-ipqebOFl.js.map

1 line
13 KiB
Plaintext
Raw Normal View History

2024-06-23 09:25:48 +00:00
{"version":3,"file":"ssr-ipqebOFl.js","sources":["../../../.svelte-kit/adapter-node/chunks/ssr.js"],"sourcesContent":["import { r as run_all, p as blank_object, k as current_component, j as set_current_component } from \"./lifecycle.js\";\nfunction ensure_array_like(array_like_or_iterator) {\n return array_like_or_iterator?.length !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator);\n}\nconst _boolean_attributes = (\n /** @type {const} */\n [\n \"allowfullscreen\",\n \"allowpaymentrequest\",\n \"async\",\n \"autofocus\",\n \"autoplay\",\n \"checked\",\n \"controls\",\n \"default\",\n \"defer\",\n \"disabled\",\n \"formnovalidate\",\n \"hidden\",\n \"inert\",\n \"ismap\",\n \"loop\",\n \"multiple\",\n \"muted\",\n \"nomodule\",\n \"novalidate\",\n \"open\",\n \"playsinline\",\n \"readonly\",\n \"required\",\n \"reversed\",\n \"selected\"\n ]\n);\nconst boolean_attributes = /* @__PURE__ */ new Set([..._boolean_attributes]);\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n } else {\n attributes.class += \" \" + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n } else {\n attributes.style = style_object_to_string(\n merge_ssr_styles(attributes.style, styles_to_add)\n );\n }\n }\n }\n let str = \"\";\n Object.keys(attributes).forEach((name) => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += \" \" + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += \" \" + name;\n } else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(\";\")) {\n const colon_index = individual_style.indexOf(\":\");\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n } else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = \"\";\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === \"&\" ? \"&amp;\" : ch === '\"' ? \"&quot;\" : \"&lt;\");\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n const should_escape = typeof value === \"string\" || value && typeof value === \"object\";\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n ret