@playpilot/tpi 3.3.0-beta.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/link-injections.js +11 -8
- package/package.json +1 -1
- package/src/lib/api.ts +10 -2
- package/src/lib/image.ts +2 -1
- package/src/routes/+page.svelte +14 -18
- package/src/routes/components/Editorial/AIIndicator.svelte +75 -35
- package/src/routes/components/Editorial/Editor.svelte +6 -4
- package/src/tests/lib/api.test.js +18 -0
- package/src/tests/routes/+page.test.js +2 -2
- package/src/tests/routes/components/Editorial/AiIndicator.test.js +33 -1
- package/vite.config.js +4 -2
- package/dist/assets/Editor-vJiCq2Zj.js +0 -2
package/dist/link-injections.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-qkpa3e{--offset: 8px;position:absolute;top:calc((var(--offset) - 1px) * -1);left:0;width:calc(100vw - 32px);max-width:320px;padding:var(--offset) 0;transform:translateY(calc(-100% + var(--offset)));z-index:2147483647}.popover.svelte-qkpa3e svg{fill:none}.popover.flip.svelte-qkpa3e{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-qkpa3e{cursor:default;position:relative;border-radius:var(--playpilot-popover-border-radius, 16px);background:var(--playpilot-popover-background, var(--playpilot-light));box-shadow:var(--playpilot-popover-shadow, var(--playpilot-shadow-large));max-height:min(var(--max-height),560px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden}.genre.svelte-13nhocm{display:flex;flex-wrap:wrap;background:var(--playpilot-genre-background, var(--playpilot-content));border:0;border-radius:var(--playpilot-genre-border-radius, 16px);padding:4px 8px;font-family:var(--playpilot-genre-font-family, inherit);font-weight:var(--playpilot-playlink-font-weight, inherit);text-transform:var(--playpilot-genre-text-transform, none);color:var(--playpilot-genre-text-color, var(--playpilot-text-color-alt));line-height:1;font-size:inherit}.genre.svelte-13nhocm:is(button:where(.svelte-13nhocm)):hover{cursor:pointer;filter:var(--playpilot-genre-hover-filter, brightness(1.1));background:var(--playpilot-genre-hover-background, var(--playpilot-genre-background, var(--playpilot-content)))}img.svelte-1itidbd{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1itidbd{height:40px;width:40px}}.heading.svelte-1itidbd{margin:0;color:var(--playpilot-playlinks-title-color, var(--playpilot-text-color-alt));font-family:var(--playpilot-playlinks-title-font-family, inherit);font-weight:var(--playpilot-playlinks-title-font-weight, lighter);font-size:var(--playpilot-playlinks-title-font-size, 14px);line-height:normal}.playlinks.svelte-1itidbd{box-sizing:border-box;display:flex;gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px;overflow:auto;scrollbar-width:none}.playlinks.svelte-1itidbd::-webkit-scrollbar{display:none}.list.svelte-1itidbd{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1itidbd img:where(.svelte-1itidbd){height:32px;width:32px}}.playlink.svelte-1itidbd{display:flex;align-items:center;gap:12px;padding:12px;background:var(--playpilot-playlink-background, var(--playpilot-lighter));box-shadow:var(--playpilot-playlink-shadow, var(--playpilot-shadow));border-radius:var(--playpilot-playlink-border-radius, 8px);color:var(--playpilot-playlink-text-color, var(--playpilot-text-color-alt))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal);text-decoration:none!important;white-space:nowrap;font-size:12px;line-height:1}.playlink.svelte-1itidbd:hover,.playlink.svelte-1itidbd:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)))!important;text-decoration:none!important}.playlink.svelte-1itidbd img:where(.svelte-1itidbd){margin:0}.list.svelte-1itidbd .playlink:where(.svelte-1itidbd){padding:8px;gap:8px}.name.svelte-1itidbd{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1itidbd{margin-top:8px;font-size:10px;color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.empty.svelte-1itidbd{white-space:initial;line-height:1.35}.arrow.svelte-1itidbd{margin-left:auto;padding:0 8px}.paragraph.svelte-1u3je71{display:block;margin:16px 0 0}.show-more.svelte-1u3je71{display:inline;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;background:transparent;border:0;color:var(--playpilot-read-more-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-read-more-font-weight, inherit);font-family:inherit;font-size:inherit}.show-more.svelte-1u3je71:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}h2.svelte-15oguej{margin:24px 0 16px;font-size:var(--playpilot-cast-title-font-size, 18px);line-height:normal;font-weight:inherit;color:var(--playpilot-cast-title-text-color, var(--playpilot-text-color))}.participants.svelte-15oguej{display:flex;gap:16px;width:calc(100% + 32px);padding:0 16px;margin:0 -16px;overflow:auto;white-space:nowrap;scrollbar-width:none}.participants.svelte-15oguej::-webkit-scrollbar{display:none}.character.svelte-15oguej{color:var(--playpilot-cast-character-text-color, var(--playpilot-text-color-alt));font-style:italic}.heading.svelte-16h1v3j{margin:8px 0;color:var(--playpilot-detail-title-text-color, #fff);font-family:var(--playpilot-detail-title-font-family, inherit);font-weight:var(--playpilot-detail-title-font-weight, lighter);font-size:var(--playpilot-detail-title-font-size, 24px);line-height:normal;font-style:var(--playpilot-detail-title-font-style, normal)}.small.svelte-16h1v3j .heading:where(.svelte-16h1v3j){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-16h1v3j .heading:where(.svelte-16h1v3j){margin-top:0}.content.svelte-16h1v3j{z-index:1;position:relative;padding:16px;color:var(--playpilot-detail-text-color, var(--playpilot-text-color));font-family:var(--playpilot-detail-font-family, var(--playpilot-font-family));font-weight:var(--playpilot-detail-font-weight, normal);font-size:var(--playpilot-detail-font-size, 14px);line-height:normal;font-style:normal}.content.small.svelte-16h1v3j{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-16h1v3j{padding:32px 0 16px;background:transparent}.small.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding-top:16px}.compact.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding:0 0 16px}.top.svelte-16h1v3j{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-16h1v3j{display:block;width:72px;margin:0;aspect-ratio:2/3;border-radius:var(--playpilot-detail-image-border-radius, 8px);background:var(--playpilot-detail-image-background, var(--playpilot-content));box-shadow:var(--playpilot-detail-image-shadow, var(--playpilot-shadow));opacity:0}.poster.loaded.svelte-16h1v3j{opacity:1}.info.svelte-16h1v3j{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-16h1v3j .info:where(.svelte-16h1v3j){gap:8px 12px}.imdb.svelte-16h1v3j{display:flex;align-items:center;gap:4px}.imdb.svelte-16h1v3j svg{margin-top:-2px}.small.svelte-16h1v3j .imdb:where(.svelte-16h1v3j) svg{margin-top:0;width:12px;height:12px}.background.svelte-16h1v3j{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter));z-index:0}.background.svelte-16h1v3j:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%);z-index:1}.background.svelte-16h1v3j img:where(.svelte-16h1v3j){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-16h1v3j img.loaded:where(.svelte-16h1v3j){opacity:1}.background.svelte-16h1v3j img.blur:where(.svelte-16h1v3j){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-16h1v3j{opacity:.15}.capitalize.svelte-16h1v3j{text-transform:capitalize}.truncate.svelte-16h1v3j{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}p.svelte-pfvkex{font-weight:var(--playpilot-after-article-text-font-weight, normal)}span.svelte-pfvkex{display:block}button.svelte-pfvkex{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-pfvkex:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1qqv88o{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:var(--playpilot-button-padding, 0);background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1qqv88o:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-wrncjp{z-index:2147483647;position:fixed;display:flex;justify-content:center;align-items:flex-start;top:0;left:0;width:100%;height:100%;background:var(--playpilot-detail-backdrop, rgba(0, 0, 0, .65))}@media (min-width: 600px){.modal.svelte-wrncjp{padding:32px}}.modal.svelte-wrncjp svg{fill:none}.dialog.svelte-wrncjp{position:relative;width:100%;max-width:600px;max-height:80vh;overflow:auto;margin-top:auto;border-radius:var(--playpilot-detail-border-radius, 16px 16px 0 0);background:var(--playpilot-detail-background, var(--playpilot-light))}@media (min-width: 600px){.dialog.svelte-wrncjp{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-wrncjp{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-wrncjp{--playpilot-button-background: var(--playpilot-modal-close-button-background, var(--playpilot-content));--playpilot-button-shadow: var(--playpilot-modal-close-button-shadow, var(--playpilot-shadow));--playpilot-button-padding: var(--playpilot-modal-close-button-padding, .5rem);--playpilot-button-text-color: var(--playpilot-modal-close-button-text-color, var(--playpilot-text-color-alt));z-index:5;position:absolute;top:16px;right:16px}.close.svelte-wrncjp:hover{filter:brightness(1.1)}.trigger.svelte-qee95d{position:fixed;bottom:16px;right:16px}.button.svelte-qee95d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;border:0;padding:12px;border-radius:50%;background:var(--playpilot-light);box-shadow:var(--playpilot-shadow-large);transition:transform 50ms;line-height:24px;text-align:center;font-size:13.6px}.button.svelte-qee95d:hover{filter:brightness(1.1);transform:scale(1.05)}.button.svelte-qee95d svg{width:100%}.close.svelte-qee95d{display:flex;text-align:center;justify-content:center;position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:4px;background:var(--playpilot-content);color:#fff}.close.svelte-qee95d svg{width:12px}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533;--playpilot-warning: #f7c74e;--playpilot-warning-dark: #413c23}[data-playpilot-injection-key]{position:relative}.playpilot-injection-highlight{outline:4px solid var(--playpilot-primary)!important;outline-offset:8px!important;border-radius:.8px;scroll-margin:80px}.playpilot-styled-scrollbar{scrollbar-color:var(--playpilot-content-light) var(--playpilot-lighter);scrollbar-width:thin}.playpilot-styled-scrollbed::-webkit-scrollbar{width:12px}.playpilot-styled-scrollbed::-webkit-scrollbar-track{background:var(--playpilot-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb{border:2px solid var(--playpilot-light);border-radius:16px;background:var(--playpilot-lighter)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:hover{background:var(--playpilot-content-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:active{background:var(--playpilot-text-color-alt)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight]{font-weight:var(--playpilot-injection-font-weight)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color]{color:var(--playpilot-injection-text-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color-hover]:hover{color:var(--playpilot-injection-text-color-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration]{text-decoration:var(--playpilot-injection-text-decoration)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration-hover]:hover{text-decoration:var(--playpilot-injection-text-decoration-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color]{background-color:var(--playpilot-injection-background-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color-hover]:hover{background-color:var(--playpilot-injection-background-color-hover)}.playpilot-link-injections.svelte-4l9ehd *{box-sizing:border-box}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}
|
|
2
|
-
svg.svelte-by11ix{transition:transform .1s}.expanded.svelte-by11ix{transform:rotate(180deg)}.switch.svelte-91s87b{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;border:0;padding:0;background:transparent;cursor:pointer}.fullwidth.svelte-91s87b{width:100%;justify-content:space-between}.label.svelte-91s87b{display:flex;align-items:center;gap:8px;margin-right:8px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color-alt);font-size:12px}.switch.svelte-91s87b:hover .label:where(.svelte-91s87b){color:var(--playpilot-text-color)}.track.svelte-91s87b{position:relative;width:32px;height:20px;border-radius:16px;background:var(--playpilot-content);transition:background-color .1s}.active.svelte-91s87b .track:where(.svelte-91s87b){background:var(--playpilot-green)}.knob.svelte-91s87b{position:absolute;top:2px;left:2px;height:16px;width:16px;border-radius:50%;background:#fff;transition:left .1s}.active.svelte-91s87b .knob:where(.svelte-91s87b){left:14px}input.svelte-1vrer3i{width:100%;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}input.svelte-1vrer3i:focus{background:var(--playpilot-lighter);outline:1px solid white}input.svelte-1vrer3i::placeholder{color:var(--playpilot-text-color-alt);opacity:.75}.alert.svelte-18si0a5{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}.alert.warning.svelte-18si0a5{border-color:var(--playpilot-warning);background:var(--playpilot-warning-dark)}.alert.svelte-18si0a5 a{color:currentColor}.switches.svelte-1shw34x{display:flex;flex-direction:column;gap:12px}button.svelte-1shw34x{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:32px;padding:8px;background:transparent;font-family:var(--playpilot-font-family);font-size:10.4px;color:var(--playpilot-text-color-alt);cursor:pointer}button.svelte-1shw34x:hover,button.active.svelte-1shw34x{color:var(--playpilot-text-color)}.group.svelte-1shw34x{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:4px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}.active-marker.svelte-1shw34x{z-index:0;position:absolute;width:calc(50% - 8px);height:calc(100% - 8px);left:4px;top:4px;border-radius:32px;background:var(--playpilot-content);transition:left .1s}.right.svelte-1shw34x{left:calc(50% + 4px)}.label.svelte-1shw34x{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1shw34x{margin-top:8px}button.svelte-1fmy0wh{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-1fmy0wh:hover{cursor:pointer;color:#fff}.context-menu.svelte-1fmy0wh{position:relative}.content.svelte-1fmy0wh{z-index:1;position:absolute;top:100%;right:0;max-height:80px;max-width:160px;border-radius:8px;background:var(--playpilot-lighter)}.item.svelte-8gd2db{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-8gd2db:hover,.item.highlighted.svelte-8gd2db{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-8gd2db{outline:2px solid var(--playpilot-primary)}.header.svelte-8gd2db{display:flex;gap:16px;width:100%}.poster.svelte-8gd2db{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-8gd2db .poster:where(.svelte-8gd2db){opacity:.35}.title.svelte-8gd2db{font-size:14px;word-break:break-word}.sentence.svelte-8gd2db{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-8gd2db em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-8gd2db{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;margin:0;background:transparent;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;font-style:italic;text-decoration:underline}.expand-sentence.svelte-8gd2db:hover{color:var(--playpilot-text-color)}.content.svelte-8gd2db{padding-top:8px}.inactive.svelte-8gd2db .info:where(.svelte-8gd2db){opacity:.35}.context-menu.svelte-8gd2db{margin:0 -4px 0 auto}.context-menu-action.svelte-8gd2db{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:16px;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-8gd2db:hover{color:var(--playpilot-text-color)}.actions.svelte-8gd2db{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-8gd2db{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:50%;background:var(--playpilot-content);color:var(--playpilot-text-color);box-shadow:var(--playpilot-shadow);cursor:pointer}.expand.svelte-8gd2db:hover{filter:brightness(1.2)}.expanded.svelte-8gd2db{padding-top:16px}.type-select.svelte-8gd2db{margin-top:8px}.label.svelte-8gd2db{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-8gd2db{margin-top:12px}.warning.svelte-8gd2db{margin:0 auto 0 8px}.warning.svelte-8gd2db svg{display:block}.drag-handle.svelte-19mcc5g{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:8px;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-19mcc5g:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-19mcc5g:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-19mcc5g:active{cursor:grabbing}.drag-handle.svelte-19mcc5g:before{display:block;content:"";position:absolute;top:20%;right:0;bottom:60%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.resize-handle.svelte-sxkuxk{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:0;width:100%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-sxkuxk:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-sxkuxk:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-sxkuxk:active{cursor:grabbing}.resize-handle.svelte-sxkuxk:before{display:block;content:"";position:absolute;top:0;right:20%;left:20%;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-rjq94e{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left;font-size:13.6px}.item.hoverable.svelte-rjq94e{cursor:pointer}.item.hoverable.svelte-rjq94e:hover{background:var(--playpilot-lighter)}.item.svelte-rjq94e:last-child{border-bottom:0}.poster.svelte-rjq94e{flex:0 0 auto;height:auto;width:28px;aspect-ratio:28/42;border-radius:4px;background:var(--playpilot-content)}.name.svelte-rjq94e{color:var(--playpilot-text-color)}.meta.svelte-rjq94e{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-rjq94e{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-rjq94e{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-rjq94e:hover{color:vaR(--playpilot-text-color)}.search.svelte-1olb8n0{position:relative}.results.svelte-1olb8n0{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.empty.svelte-1olb8n0{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.selected.svelte-1olb8n0{margin:8px 0;border-radius:.5rem;border:2px solid var(--playpilot-green)}p.svelte-1i8p6op,label.svelte-1i8p6op{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-1i8p6op{display:block;margin-top:16px}.layout.svelte-1i8p6op{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-1i8p6op{display:flex;align-items:center;gap:8px;margin-bottom:16px}.heading.svelte-1i8p6op{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}.error.svelte-1i8p6op{margin-top:8px}.save.svelte-1i8p6op{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-green);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color)}.save.svelte-1i8p6op:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-1i8p6op{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}a.svelte-1l4sxuh{color:currentColor}.ai-indicator.svelte-1l4sxuh{position:relative;margin:0 8px}.content.svelte-1l4sxuh{position:relative;display:flex;gap:8px;background:var(--playpilot-light);padding:8px;margin:2px;border-radius:.5rem;font-size:12px;line-height:1.5;z-index:1;color:var(--playpilot-text-color-alt);overflow:hidden}.message.svelte-1l4sxuh{display:flex;margin-top:4px;font-style:italic}.icon.svelte-1l4sxuh{color:var(--playpilot-green)}.border.svelte-1l4sxuh{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.5rem;background:var(--playpilot-green);overflow:hidden;transition:background-color .5s}.running.svelte-1l4sxuh .border:where(.svelte-1l4sxuh){background:var(--playpilot-light)}@keyframes svelte-1l4sxuh-rotate{to{rotate:360deg}}.animator.svelte-1l4sxuh{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-1l4sxuh-rotate 2s infinite linear;filter:blur(5rem)}.loading-bar.svelte-1l4sxuh{display:grid;grid-template-columns:auto 3em;align-items:center}.loading-bar-progress.svelte-1l4sxuh{height:.5em;border-radius:.25rem;background:var(--playpilot-dark)}.loading-bar-fill.svelte-1l4sxuh{height:100%;border-radius:.25rem;background:var(--playpilot-green);transition:width .2s}.loading-bar-label.svelte-1l4sxuh{text-align:right}@keyframes svelte-1l4sxuh-fade{0%,to{opacity:0}25%,75%{opacity:1}}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh){animation:svelte-1l4sxuh-fade 2s infinite}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(1){animation-delay:.2s}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(2){animation-delay:.4s}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(3){animation-delay:.6s}.editor.svelte-1b2vpoj{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(70vh,640px);min-height:10rem;margin:0;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.editor.svelte-1b2vpoj svg{fill:none}.panel-open.svelte-1b2vpoj{overflow:hidden}.loading.svelte-1b2vpoj{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handles.svelte-1b2vpoj,.header.svelte-1b2vpoj{z-index:20;position:sticky;top:-16px;margin:-16px -16px 0}.handle.svelte-1b2vpoj{opacity:0;transition:opacity .15s}.editor.svelte-1b2vpoj:hover .handle:where(.svelte-1b2vpoj){opacity:1}.header.svelte-1b2vpoj{z-index:5;display:flex;align-items:center;padding:16px 16px 16px 24px;margin:0 -16px;border:0;background:var(--playpilot-dark)}.loading.svelte-1b2vpoj .header:where(.svelte-1b2vpoj){margin:-16px}.heading.svelte-1b2vpoj{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.bubble.svelte-1b2vpoj{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;border:0;padding:0;margin-right:auto;border-radius:50%;background:var(--playpilot-green);line-height:24px;text-align:center;font-size:13.6px}.items.svelte-1b2vpoj{padding-top:8px;margin-bottom:auto}.empty.svelte-1b2vpoj{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1b2vpoj{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);font-size:.85rem;cursor:pointer}.save.svelte-1b2vpoj:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1b2vpoj{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1b2vpoj{margin-top:8px}.alert.svelte-1b2vpoj{margin:0 8px 8px}.panel.svelte-1b2vpoj{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
3
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const Vt=!1;var $t=Array.isArray,ei=Array.prototype.indexOf,Qt=Array.from,ti=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,Un=Object.getOwnPropertyDescriptors,ni=Object.prototype,ri=Array.prototype,en=Object.getPrototypeOf;function He(e){return typeof e=="function"}const se=()=>{};function ii(e){return typeof(e==null?void 0:e.then)=="function"}function ai(e){for(var t=0;t<e.length;t++)e[t]()}function bn(e,t,n=!1){return e===void 0?n?t():t:e}const ue=2,Hn=4,ct=8,Pt=16,fe=32,ft=64,qt=128,Re=256,Et=512,re=1024,Le=2048,It=4096,he=8192,Qe=16384,Kn=32768,Fe=65536,oi=1<<17,si=1<<19,Wn=1<<20,Pe=Symbol("$state"),zn=Symbol("legacy props"),li=Symbol("");function Gn(e){return e===this.v}function Lt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ui(e,t){return e!==t}function tn(e){return!Lt(e,this.v)}function ci(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function fi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function di(e){throw new Error("https://svelte.dev/e/effect_orphan")}function vi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function _i(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function hi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function mi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function pi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function gi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let et=!1,yi=!1;function wi(){et=!0}const nn=1,rn=2,Yn=4,ki=8,bi=16,Ei=1,Si=2,Ti=4,Ai=8,xi=16,Pi=1,Ii=2,Li=4,Ci=1,Di=2,W=Symbol(),Zn="http://www.w3.org/2000/svg";function $(e,t){var n={f:0,v:e,reactions:null,equals:Gn,rv:0,wv:0};return n}function Z(e){return Ni($(e))}function St(e,t=!1){var r;const n=$(e);return t||(n.equals=tn),et&&D!==null&&D.l!==null&&((r=D.l).s??(r.s=[])).push(n),n}function Ni(e){return j!==null&&j.f&ue&&(pe===null?Wi([e]):pe.push(e)),e}function N(e,t){return j!==null&&_t()&&j.f&(ue|Pt)&&(pe===null||!pe.includes(e))&&gi(),Ke(e,t)}function Ke(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=hr(),Jn(e,Le),_t()&&x!==null&&x.f&re&&!(x.f&fe)&&(J!==null&&J.includes(e)?(ke(x,Le),jt(x)):Ie===null?zi([e]):Ie.push(e))),t}function Jn(e,t){var n=e.reactions;if(n!==null)for(var r=_t(),i=n.length,a=0;a<i;a++){var o=n[a],u=o.f;u&Le||!r&&o===x||(ke(o,t),u&(re|Re)&&(u&ue?Jn(o,It):jt(o)))}}let Xn=!1;function z(e,t=null,n){if(typeof e!="object"||e===null||Pe in e)return e;const r=en(e);if(r!==ni&&r!==ri)return e;var i=new Map,a=$t(e),o=$(0);a&&i.set("length",$(e.length));var u;return new Proxy(e,{defineProperty(l,f,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&hi();var s=i.get(f);return s===void 0?(s=$(d.value),i.set(f,s)):N(s,z(d.value,u)),!0},deleteProperty(l,f){var d=i.get(f);if(d===void 0)f in l&&i.set(f,$(W));else{if(a&&typeof f=="string"){var s=i.get("length"),v=Number(f);Number.isInteger(v)&&v<s.v&&N(s,v)}N(d,W),En(o)}return!0},get(l,f,d){var p;if(f===Pe)return e;var s=i.get(f),v=f in l;if(s===void 0&&(!v||(p=xe(l,f))!=null&&p.writable)&&(s=$(z(v?l[f]:W,u)),i.set(f,s)),s!==void 0){var _=m(s);return _===W?void 0:_}return Reflect.get(l,f,d)},getOwnPropertyDescriptor(l,f){var d=Reflect.getOwnPropertyDescriptor(l,f);if(d&&"value"in d){var s=i.get(f);s&&(d.value=m(s))}else if(d===void 0){var v=i.get(f),_=v==null?void 0:v.v;if(v!==void 0&&_!==W)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return d},has(l,f){var _;if(f===Pe)return!0;var d=i.get(f),s=d!==void 0&&d.v!==W||Reflect.has(l,f);if(d!==void 0||x!==null&&(!s||(_=xe(l,f))!=null&&_.writable)){d===void 0&&(d=$(s?z(l[f],u):W),i.set(f,d));var v=m(d);if(v===W)return!1}return s},set(l,f,d,s){var b;var v=i.get(f),_=f in l;if(a&&f==="length")for(var p=d;p<v.v;p+=1){var h=i.get(p+"");h!==void 0?N(h,W):p in l&&(h=$(W),i.set(p+"",h))}v===void 0?(!_||(b=xe(l,f))!=null&&b.writable)&&(v=$(void 0),N(v,z(d,u)),i.set(f,v)):(_=v.v!==W,N(v,z(d,u)));var w=Reflect.getOwnPropertyDescriptor(l,f);if(w!=null&&w.set&&w.set.call(s,d),!_){if(a&&typeof f=="string"){var g=i.get("length"),y=Number(f);Number.isInteger(y)&&y>=g.v&&N(g,y+1)}En(o)}return!0},ownKeys(l){m(o);var f=Reflect.ownKeys(l).filter(v=>{var _=i.get(v);return _===void 0||_.v!==W});for(var[d,s]of i)s.v!==W&&!(d in l)&&f.push(d);return f},setPrototypeOf(){mi()}})}function En(e,t=1){N(e,e.v+t)}var Bt,$n,Qn;function ji(){if(Bt===void 0){Bt=window;var e=Element.prototype,t=Node.prototype;$n=xe(t,"firstChild").get,Qn=xe(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function dt(e=""){return document.createTextNode(e)}function Ye(e){return $n.call(e)}function Ct(e){return Qn.call(e)}function A(e,t){return Ye(e)}function X(e,t){{var n=Ye(e);return n instanceof Comment&&n.data===""?Ct(n):n}}function C(e,t=1,n=!1){let r=e;for(;t--;)r=Ct(r);return r}function Mi(e){e.textContent=""}function G(e){var t=ue|Le;x===null?t|=Re:x.f|=Wn;var n=j!==null&&j.f&ue?j:null;const r={children:null,ctx:D,deps:null,equals:Gn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??x};return n!==null&&(n.children??(n.children=[])).push(r),r}function Oi(e){const t=G(e);return t.equals=tn,t}function er(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var r=t[n];r.f&ue?an(r):we(r)}}}function Ri(e){for(var t=e.parent;t!==null;){if(!(t.f&ue))return t;t=t.parent}return null}function tr(e){var t,n=x;te(Ri(e));try{er(e),t=mr(e)}finally{te(n)}return t}function nr(e){var t=tr(e),n=(Me||e.f&Re)&&e.deps!==null?It:re;ke(e,n),e.equals(t)||(e.v=t,e.wv=hr())}function an(e){er(e),st(e,0),ke(e,Qe),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Fi(e){x===null&&j===null&&di(),j!==null&&j.f&Re&&fi(),sn&&ci()}function Vi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function tt(e,t,n,r=!0){var i=(e&ft)!==0,a=x,o={ctx:D,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Le,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var u=We;try{Sn(!0),Nt(o),o.f|=Kn}catch(d){throw we(o),d}finally{Sn(u)}}else t!==null&&jt(o);var l=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Wn)===0;if(!l&&!i&&r&&(a!==null&&Vi(o,a),j!==null&&j.f&ue)){var f=j;(f.children??(f.children=[])).push(o)}return o}function qi(e){const t=tt(ct,null,!1);return ke(t,re),t.teardown=e,t}function rr(e){Fi();var t=x!==null&&(x.f&fe)!==0&&D!==null&&!D.m;if(t){var n=D;(n.e??(n.e=[])).push({fn:e,effect:x,reaction:j})}else{var r=vt(e);return r}}function Bi(e){const t=tt(ft,e,!0);return(n={})=>new Promise(r=>{n.outro?me(t,()=>{we(t),r(void 0)}):(we(t),r(void 0))})}function vt(e){return tt(Hn,e,!1)}function ir(e){return tt(ct,e,!0)}function M(e){return Ce(e)}function Ce(e,t=0){return tt(ct|Pt|t,e,!0)}function ye(e,t=!0){return tt(ct|fe,e,!0,t)}function ar(e){var t=e.teardown;if(t!==null){const n=sn,r=j;Tn(!0),ie(null);try{t.call(null)}finally{Tn(n),ie(r)}}}function or(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)an(t[n])}}function sr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;we(n,t),n=r}}function Ui(e){for(var t=e.first;t!==null;){var n=t.next;t.f&fe||we(t),t=n}}function we(e,t=!0){var n=!1;if((t||e.f&si)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:Ct(r);r.remove(),r=a}n=!0}sr(e,t&&!n),or(e),st(e,0),ke(e,Qe);var o=e.transitions;if(o!==null)for(const l of o)l.stop();ar(e);var u=e.parent;u!==null&&u.first!==null&&lr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function lr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function me(e,t){var n=[];on(e,n,!0),ur(n,()=>{we(e),t&&t()})}function ur(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function on(e,t,n){if(!(e.f&he)){if(e.f^=he,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&Fe)!==0||(r.f&fe)!==0;on(r,t,a?n:!1),r=i}}}function Ze(e){cr(e,!0)}function cr(e,t){if(e.f&he){ht(e)&&Nt(e),e.f^=he;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Fe)!==0||(n.f&fe)!==0;cr(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Tt=!1,Ut=[];function fr(){Tt=!1;const e=Ut.slice();Ut=[],ai(e)}function nt(e){Tt||(Tt=!0,queueMicrotask(fr)),Ut.push(e)}function Hi(){Tt&&fr()}function dr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const vr=0,Ki=1;let wt=!1,kt=vr,at=!1,ot=null,We=!1,sn=!1;function Sn(e){We=e}function Tn(e){sn=e}let je=[],ze=0;let j=null;function ie(e){j=e}let x=null;function te(e){x=e}let pe=null;function Wi(e){pe=e}let J=null,ne=0,Ie=null;function zi(e){Ie=e}let _r=1,Ht=0,Me=!1,D=null;function An(e){D=e}function hr(){return++_r}function _t(){return!et||D!==null&&D.l===null}function ht(e){var f;var t=e.f;if(t&Le)return!0;if(t&It){var n=e.deps,r=(t&Re)!==0;if(n!==null){var i,a,o=(t&Et)!==0,u=r&&x!==null&&!Me,l=n.length;if(o||u){for(i=0;i<l;i++)a=n[i],(o||!((f=a==null?void 0:a.reactions)!=null&&f.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Et)}for(i=0;i<l;i++)if(a=n[i],ht(a)&&nr(a),a.wv>e.wv)return!0}(!r||x!==null&&!Me)&&ke(e,re)}return!1}function Gi(e,t){for(var n=t;n!==null;){if(n.f&qt)try{n.fn(e);return}catch{n.f^=qt}n=n.parent}throw wt=!1,e}function Yi(e){return(e.f&Qe)===0&&(e.parent===null||(e.parent.f&qt)===0)}function Dt(e,t,n,r){if(wt){if(n===null&&(wt=!1),Yi(t))throw e;return}n!==null&&(wt=!0);{Gi(e,t);return}}function mr(e){var v;var t=J,n=ne,r=Ie,i=j,a=Me,o=pe,u=D,l=e.f;J=null,ne=0,Ie=null,j=l&(fe|ft)?null:e,Me=!We&&(l&Re)!==0,pe=null,D=e.ctx,Ht++;try{var f=(0,e.fn)(),d=e.deps;if(J!==null){var s;if(st(e,ne),d!==null&&ne>0)for(d.length=ne+J.length,s=0;s<J.length;s++)d[ne+s]=J[s];else e.deps=d=J;if(!Me)for(s=ne;s<d.length;s++)((v=d[s]).reactions??(v.reactions=[])).push(e)}else d!==null&&ne<d.length&&(st(e,ne),d.length=ne);return f}finally{J=t,ne=n,Ie=r,j=i,Me=a,pe=o,D=u}}function Zi(e,t){let n=t.reactions;if(n!==null){var r=ei.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&ue&&(J===null||!J.includes(t))&&(ke(t,It),t.f&(Re|Et)||(t.f^=Et),st(t,0))}function st(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Zi(e,n[r])}function Nt(e){var t=e.f;if(!(t&Qe)){ke(e,re);var n=x,r=D;x=e;try{t&Pt?Ui(e):sr(e),or(e),ar(e);var i=mr(e);e.teardown=typeof i=="function"?i:null,e.wv=_r;var a=e.deps,o;Vt&&yi&&e.f&Le}catch(u){Dt(u,e,n,r||e.ctx)}finally{x=n}}}function pr(){if(ze>1e3){ze=0;try{vi()}catch(e){if(ot!==null)Dt(e,ot,null);else throw e}}ze++}function gr(e){var t=e.length;if(t!==0){pr();var n=We;We=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&re||(i.f^=re);var a=[];yr(i,a),Ji(a)}}finally{We=n}}}function Ji(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(Qe|he)))try{ht(r)&&(Nt(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?lr(r):r.fn=null))}catch(i){Dt(i,r,null,r.ctx)}}}function Xi(){if(at=!1,ze>1001)return;const e=je;je=[],gr(e),at||(ze=0,ot=null)}function jt(e){kt===vr&&(at||(at=!0,queueMicrotask(Xi))),ot=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(ft|fe)){if(!(n&re))return;t.f^=re}}je.push(t)}function yr(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&fe)!==0,o=a&&(i&re)!==0,u=n.next;if(!o&&!(i&he))if(i&ct){if(a)n.f^=re;else try{ht(n)&&Nt(n)}catch(s){Dt(s,n,null,n.ctx)}var l=n.first;if(l!==null){n=l;continue}}else i&Hn&&r.push(n);if(u===null){let s=n.parent;for(;s!==null;){if(e===s)break e;var f=s.next;if(f!==null){n=f;continue e}s=s.parent}}n=u}for(var d=0;d<r.length;d++)l=r[d],t.push(l),yr(l,t)}function ln(e){var t=kt,n=je;try{pr();const i=[];kt=Ki,je=i,at=!1,gr(n);var r=e==null?void 0:e();return Hi(),(je.length>0||i.length>0)&&ln(),ze=0,ot=null,r}finally{kt=t,je=n}}async function xn(){await Promise.resolve(),ln()}function m(e){var d;var t=e.f,n=(t&ue)!==0;if(n&&t&Qe){var r=tr(e);return an(e),r}if(j!==null){pe!==null&&pe.includes(e)&&pi();var i=j.deps;e.rv<Ht&&(e.rv=Ht,J===null&&i!==null&&i[ne]===e?ne++:J===null?J=[e]:J.push(e),Ie!==null&&x!==null&&x.f&re&&!(x.f&fe)&&Ie.includes(e)&&(ke(x,Le),jt(x)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,u=a;o!==null;)if(o.f&ue){var l=o;u=l,o=l.parent}else{var f=o;(d=f.deriveds)!=null&&d.includes(u)||(f.deriveds??(f.deriveds=[])).push(u);break}return n&&(a=e,ht(a)&&nr(a)),e.v}function Oe(e){const t=j;try{return j=null,e()}finally{j=t}}const $i=-7169;function ke(e,t){e.f=e.f&$i|t}function Qi(e){return kr().get(e)}function wr(e,t){return kr().set(e,t),t}function kr(e){return D===null&&dr(),D.c??(D.c=new Map(ea(D)||void 0))}function ea(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ae(e,t=!1,n){D={p:D,c:null,e:null,m:!1,s:e,x:null,l:null},et&&!t&&(D.l={s:null,u:null,r1:[],r2:$(!1)})}function oe(e){const t=D;if(t!==null){const o=t.e;if(o!==null){var n=x,r=j;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];te(a.effect),ie(a.reaction),vt(a.fn)}}finally{te(n),ie(r)}}D=t.p,t.m=!0}return{}}function ta(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Pe in e)Kt(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Pe in n&&Kt(n)}}}function Kt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Kt(e[r],t)}catch{}const n=en(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Un(n);for(let i in r){const a=r[i].get;if(a)try{a.call(e)}catch{}}}}}function na(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const ra=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ia(e){return ra.includes(e)}const aa={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function oa(e){return e=e.toLowerCase(),aa[e]??e}const sa=["touchstart","touchmove"];function la(e){return sa.includes(e)}function ua(e,t){if(t){const n=document.body;e.autofocus=!0,nt(()=>{document.activeElement===n&&e.focus()})}}let Pn=!1;function ca(){Pn||(Pn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function br(e){var t=j,n=x;ie(null),te(null);try{return e()}finally{ie(t),te(n)}}function ws(e,t,n,r=n){e.addEventListener(t,()=>br(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),ca()}const Er=new Set,Wt=new Set;function Sr(e,t,n,r){function i(a){if(r.capture||rt.call(t,a),!a.cancelBubble)return br(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?nt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function it(e,t,n,r,i){var a={capture:r,passive:i},o=Sr(e,t,n,a);(t===document.body||t===window||t===document)&&qi(()=>{t.removeEventListener(e,o,a)})}function Ve(e){for(var t=0;t<e.length;t++)Er.add(e[t]);for(var n of Wt)n(e)}function rt(e){var y;var t=this,n=t.ownerDocument,r=e.type,i=((y=e.composedPath)==null?void 0:y.call(e))||[],a=i[0]||e.target,o=0,u=e.__root;if(u){var l=i.indexOf(u);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;l<=f&&(o=l)}if(a=i[o]||e.target,a!==t){ti(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=j,s=x;ie(null),te(null);try{for(var v,_=[];a!==null;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+r];if(h!==void 0&&!a.disabled)if($t(h)){var[w,...g]=h;w.apply(a,[e,...g])}else h.call(a,e)}catch(b){v?_.push(b):v=b}if(e.cancelBubble||p===t||p===null)break;a=p}if(v){for(let b of _)queueMicrotask(()=>{throw b});throw v}}finally{e.__root=t,delete e.currentTarget,ie(d),te(s)}}}function Tr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Je(e,t){var n=x;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function O(e,t){var n=(t&Ci)!==0,r=(t&Di)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Tr(a?e:"<!>"+e),n||(i=Ye(i)));var o=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var u=Ye(o),l=o.lastChild;Je(u,l)}else Je(o,o);return o}}function Mt(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Tr(i),u=Ye(o);a=Ye(u)}var l=a.cloneNode(!0);return Je(l,l),l}}function un(e=""){{var t=dt(e+"");return Je(t,t),t}}function Xe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=dt();return e.append(t,n),Je(t,n),e}function T(e,t){e!==null&&e.before(t)}let At=!0;function In(e){At=e}function B(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function cn(e,t){return fa(e,t)}const Be=new Map;function fa(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){ji();var u=new Set,l=s=>{for(var v=0;v<s.length;v++){var _=s[v];if(!u.has(_)){u.add(_);var p=la(_);t.addEventListener(_,rt,{passive:p});var h=Be.get(_);h===void 0?(document.addEventListener(_,rt,{passive:p}),Be.set(_,1)):Be.set(_,h+1)}}};l(Qt(Er)),Wt.add(l);var f=void 0,d=Bi(()=>{var s=n??t.appendChild(dt());return ye(()=>{if(a){ae({});var v=D;v.c=a}i&&(r.$$events=i),At=o,f=e(s,r)||{},At=!0,a&&oe()}),()=>{var p;for(var v of u){t.removeEventListener(v,rt);var _=Be.get(v);--_===0?(document.removeEventListener(v,rt),Be.delete(v)):Be.set(v,_)}Wt.delete(l),s!==n&&((p=s.parentNode)==null||p.removeChild(s))}});return zt.set(f,d),f}let zt=new WeakMap;function Ar(e,t){const n=zt.get(e);return n?(zt.delete(e),n(t)):Promise.resolve()}const Ot=0,pt=1,Rt=2;function da(e,t,n,r,i){var a=e,o=_t(),u=D,l=W,f,d,s,v=(o?$:St)(void 0),_=(o?$:St)(void 0),p=!1;function h(g,y){p=!0,y&&(te(w),ie(w),An(u));try{g===pt&&r&&(d?Ze(d):d=ye(()=>r(a,v))),g!==Ot&&f&&me(f,()=>f=null),g!==pt&&d&&me(d,()=>d=null),g!==Rt&&s&&me(s,()=>s=null)}finally{y&&(An(null),ie(null),te(null),ln())}}var w=Ce(()=>{if(l!==(l=t())){if(ii(l)){var g=l;p=!1,g.then(y=>{g===l&&(Ke(v,y),h(pt,!0))},y=>{if(g===l)throw Ke(_,y),h(Rt,!0),_.v}),nt(()=>{p||h(Ot,!0)})}else Ke(v,l),h(pt,!1);return()=>l=W}})}function U(e,t,n=!1){var r=e,i=null,a=null,o=W,u=n?Fe:0,l=!1;const f=(s,v=!0)=>{l=!0,d(v,s)},d=(s,v)=>{o!==(o=s)&&(o?(i?Ze(i):v&&(i=ye(()=>v(r))),a&&me(a,()=>{a=null})):(a?Ze(a):v&&(a=ye(()=>v(r))),i&&me(i,()=>{i=null})))};Ce(()=>{l=!1,t(f),l||d(null,null)},u)}function va(e,t,n){var r=e,i=W,a,o=_t()?ui:Lt;Ce(()=>{o(i,i=t())&&(a&&me(a),a=ye(()=>n(r)))})}function lt(e,t){return t}function _a(e,t,n,r){for(var i=[],a=t.length,o=0;o<a;o++)on(t[o].e,i,!0);var u=a>0&&i.length===0&&n!==null;if(u){var l=n.parentNode;Mi(l),l.append(n),r.clear(),Ae(e,t[0].prev,t[a-1].next)}ur(i,()=>{for(var f=0;f<a;f++){var d=t[f];u||(r.delete(d.k),Ae(e,d.prev,d.next)),we(d.e,!u)}})}function ut(e,t,n,r,i,a=null){var o=e,u={flags:t,items:new Map,first:null},l=(t&Yn)!==0;if(l){var f=e;o=f.appendChild(dt())}var d=null,s=!1;Ce(()=>{var v=n(),_=$t(v)?v:v==null?[]:Qt(v),p=_.length;if(!(s&&p===0)){s=p===0;{var h=j;ha(_,u,o,i,t,(h.f&he)!==0,r)}a!==null&&(p===0?d?Ze(d):d=ye(()=>a(o)):d!==null&&me(d,()=>{d=null})),n()}})}function ha(e,t,n,r,i,a,o,u){var L,V,H,Se;var l=(i&ki)!==0,f=(i&(nn|rn))!==0,d=e.length,s=t.items,v=t.first,_=v,p,h=null,w,g=[],y=[],b,I,k,E;if(l)for(E=0;E<d;E+=1)b=e[E],I=o(b,E),k=s.get(I),k!==void 0&&((L=k.a)==null||L.measure(),(w??(w=new Set)).add(k));for(E=0;E<d;E+=1){if(b=e[E],I=o(b,E),k=s.get(I),k===void 0){var q=_?_.e.nodes_start:n;h=pa(q,t,h,h===null?t.first:h.next,b,I,E,r,i),s.set(I,h),g=[],y=[],_=h.next;continue}if(f&&ma(k,b,E,i),k.e.f&he&&(Ze(k.e),l&&((V=k.a)==null||V.unfix(),(w??(w=new Set)).delete(k))),k!==_){if(p!==void 0&&p.has(k)){if(g.length<y.length){var S=y[0],R;h=S.prev;var K=g[0],ee=g[g.length-1];for(R=0;R<g.length;R+=1)Ln(g[R],S,n);for(R=0;R<y.length;R+=1)p.delete(y[R]);Ae(t,K.prev,ee.next),Ae(t,h,K),Ae(t,ee,S),_=S,h=ee,E-=1,g=[],y=[]}else p.delete(k),Ln(k,_,n),Ae(t,k.prev,k.next),Ae(t,k,h===null?t.first:h.next),Ae(t,h,k),h=k;continue}for(g=[],y=[];_!==null&&_.k!==I;)(a||!(_.e.f&he))&&(p??(p=new Set)).add(_),y.push(_),_=_.next;if(_===null)continue;k=_}g.push(k),h=k,_=k.next}if(_!==null||p!==void 0){for(var P=p===void 0?[]:Qt(p);_!==null;)(a||!(_.e.f&he))&&P.push(_),_=_.next;var F=P.length;if(F>0){var Y=i&Yn&&d===0?n:null;if(l){for(E=0;E<F;E+=1)(H=P[E].a)==null||H.measure();for(E=0;E<F;E+=1)(Se=P[E].a)==null||Se.fix()}_a(t,P,Y,s)}}l&&nt(()=>{var de;if(w!==void 0)for(k of w)(de=k.a)==null||de.apply()}),x.first=t.first&&t.first.e,x.last=h&&h.e}function ma(e,t,n,r){r&nn&&Ke(e.v,t),r&rn?Ke(e.i,n):e.i=n}function pa(e,t,n,r,i,a,o,u,l,f){var d=(l&nn)!==0,s=(l&bi)===0,v=d?s?St(i):$(i):i,_=l&rn?$(o):o,p={i:_,v,k:a,a:null,e:null,prev:n,next:r};try{return p.e=ye(()=>u(e,v,_),Xn),p.e.prev=n&&n.e,p.e.next=r&&r.e,n===null?t.first=p:(n.next=p,n.e.next=p.e),r!==null&&(r.prev=p,r.e.prev=p.e),p}finally{}}function Ln(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==r;){var o=Ct(a);i.before(a),a=o}}function Ae(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function fn(e,t,...n){var r=e,i=se,a;Ce(()=>{i!==(i=t())&&(a&&(we(a),a=null),a=ye(()=>i(r,...n)))},Fe)}function ga(e,t,n){var r=e,i,a;Ce(()=>{i!==(i=t())&&(a&&(me(a),a=null),i&&(a=ye(()=>n(r,i))))},Fe)}function ya(e,t,n,r,i,a){var o,u,l=null,f=e,d;Ce(()=>{const s=t()||null;var v=s==="svg"?Zn:null;s!==o&&(d&&(s===null?me(d,()=>{d=null,u=null}):s===u?Ze(d):(we(d),In(!1))),s&&s!==u&&(d=ye(()=>{l=v?document.createElementNS(v,s):document.createElement(s),Je(l,l);{var _=l.appendChild(dt());r(l,_)}x.nodes_end=l,f.before(l)})),o=s,o&&(u=o),In(!0))},Fe)}function xr(e,t,n){vt(()=>{var r=Oe(()=>t(e,n==null?void 0:n())||{});if(n&&(r!=null&&r.update)){var i=!1,a={};ir(()=>{var o=n();ta(o),i&&Lt(a,o)&&(a=o,r.update(o))}),i=!0}if(r!=null&&r.destroy)return()=>r.destroy()})}function Pr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pr(e))&&(r&&(r+=" "),r+=t);return r}function ka(e){return typeof e=="object"?wa(e):e??""}function ba(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function _e(e,t,n,r){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[li]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Ir(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ea(e,t,n,r,i=!1,a=!1,o=!1){var u=t||{},l=e.tagName==="OPTION";for(var f in t)f in n||(n[f]=null);n.class&&(n.class=ka(n.class)),n.class=n.class?n.class+" "+r:r;var d=Ir(e),s=e.__attributes??(e.__attributes={});for(const g in n){let y=n[g];if(l&&g==="value"&&y==null){e.value=e.__value="",u[g]=y;continue}var v=u[g];if(y!==v){u[g]=y;var _=g[0]+g[1];if(_!=="$$"){if(_==="on"){const b={},I="$$"+g;let k=g.slice(2);var p=ia(k);if(na(k)&&(k=k.slice(0,-7),b.capture=!0),!p&&v){if(y!=null)continue;e.removeEventListener(k,u[I],b),u[I]=null}if(y!=null)if(p)e[`__${k}`]=y,Ve([k]);else{let E=function(q){u[g].call(this,q)};u[I]=Sr(k,e,E,b)}else p&&(e[`__${k}`]=void 0)}else if(g==="style"&&y!=null)e.style.cssText=y+"";else if(g==="autofocus")ua(e,!!y);else if(g==="__value"||g==="value"&&y!=null)e.value=e[g]=e.__value=y;else if(g==="selected"&&l)ba(e,y);else{var h=g;i||(h=oa(h));var w=h==="defaultValue"||h==="defaultChecked";if(y==null&&!a&&!w)if(s[g]=null,h==="value"||h==="checked"){let b=e;if(h==="value"){let I=b.defaultValue;b.removeAttribute(h),b.defaultValue=I}else{let I=b.defaultChecked;b.removeAttribute(h),b.defaultChecked=I}}else e.removeAttribute(g);else w||d.includes(h)&&(a||typeof y!="string")?e[h]=y:typeof y!="function"&&_e(e,h,y)}g==="style"&&"__styles"in e&&(e.__styles={})}}}return u}var Cn=new Map;function Ir(e){var t=Cn.get(e.nodeName);if(t)return t;Cn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=Un(r);for(var a in n)n[a].set&&t.push(a);r=en(r)}return t}function ks(e,t,n){var r=e.__className,i=Sa(t);(r!==i||Xn)&&(t==null?e.removeAttribute("class"):e.className=i,e.__className=i)}function Sa(e,t){return(e??"")+""}function be(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function Lr(e,t,n,r){var i=e.__styles??(e.__styles={});i[t]!==n&&(i[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Ta=()=>performance.now(),Ee={tick:e=>requestAnimationFrame(e),now:()=>Ta(),tasks:new Set};function Cr(){const e=Ee.now();Ee.tasks.forEach(t=>{t.c(e)||(Ee.tasks.delete(t),t.f())}),Ee.tasks.size!==0&&Ee.tick(Cr)}function Aa(e){let t;return Ee.tasks.size===0&&Ee.tick(Cr),{promise:new Promise(n=>{Ee.tasks.add(t={c:e,f:n})}),abort(){Ee.tasks.delete(t)}}}function gt(e,t){e.dispatchEvent(new CustomEvent(t))}function xa(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Dn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const o=xa(i.trim());t[o]=a.trim()}return t}const Pa=e=>e;function Gt(e,t,n,r){var i=(e&Pi)!==0,a=(e&Ii)!==0,o=i&&a,u=(e&Li)!==0,l=o?"both":i?"in":"out",f,d=t.inert,s,v;function _(){var y=j,b=x;ie(null),te(null);try{return f??(f=n()(t,(r==null?void 0:r())??{},{direction:l}))}finally{ie(y),te(b)}}var p={is_global:u,in(){var y;if(t.inert=d,!i){v==null||v.abort(),(y=v==null?void 0:v.reset)==null||y.call(v);return}a||s==null||s.abort(),gt(t,"introstart"),s=Yt(t,_(),v,1,()=>{gt(t,"introend"),s==null||s.abort(),s=f=void 0})},out(y){if(!a){y==null||y(),f=void 0;return}t.inert=!0,gt(t,"outrostart"),v=Yt(t,_(),s,0,()=>{gt(t,"outroend"),y==null||y()})},stop:()=>{s==null||s.abort(),v==null||v.abort()}},h=x;if((h.transitions??(h.transitions=[])).push(p),i&&At){var w=u;if(!w){for(var g=h.parent;g&&g.f&Fe;)for(;(g=g.parent)&&!(g.f&Pt););w=!g||(g.f&Kn)!==0}w&&vt(()=>{Oe(()=>p.in())})}}function Yt(e,t,n,r,i){var a=r===1;if(He(t)){var o,u=!1;return nt(()=>{if(!u){var w=t({direction:a?"in":"out"});o=Yt(e,w,n,r,i)}}),{abort:()=>{u=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return i(),{abort:se,deactivate:se,reset:se,t:()=>r};const{delay:l=0,css:f,tick:d,easing:s=Pa}=t;var v=[];if(a&&n===void 0&&(d&&d(0,1),f)){var _=Dn(f(0,1));v.push(_,_)}var p=()=>1-r,h=e.animate(v,{duration:l});return h.onfinish=()=>{var w=(n==null?void 0:n.t())??1-r;n==null||n.abort();var g=r-w,y=t.duration*Math.abs(g),b=[];if(y>0){if(f)for(var I=Math.ceil(y/16.666666666666668),k=0;k<=I;k+=1){var E=w+g*s(k/I),q=f(E,1-E);b.push(Dn(q))}p=()=>{var S=h.currentTime;return w+g*s(S/y)},d&&Aa(()=>{if(h.playState!=="running")return!1;var S=p();return d(S,1-S),!0})}h=e.animate(b,{duration:y,fill:"forwards"}),h.onfinish=()=>{p=()=>r,d==null||d(r,1-r),i()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=se)},deactivate:()=>{i=se},reset:()=>{r===0&&(d==null||d(1,0))},t:()=>p()}}function Nn(e,t){return e===t||(e==null?void 0:e[Pe])===t}function Dr(e={},t,n,r){return vt(()=>{var i,a;return ir(()=>{i=a,a=[],Oe(()=>{e!==n(...a)&&(t(e,...a),i&&Nn(n(...i),e)&&t(null,...i))})}),()=>{nt(()=>{a&&Nn(n(...a),e)&&t(null,...a)})}}),e}function Ia(e,t,n){if(e==null)return t(void 0),se;const r=Oe(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}let yt=!1;function La(e){var t=yt;try{return yt=!1,[e(),yt]}finally{yt=t}}const Ca={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Da(e,t,n){return new Proxy({props:e,exclude:t},Ca)}const Na={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(He(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];He(i)&&(i=i());const a=xe(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(He(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const i=xe(r,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Pe||t===zn)return!1;for(let n of e.props)if(He(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){He(n)&&(n=n());for(const r in n)t.includes(r)||t.push(r)}return t}};function bs(...e){return new Proxy({props:e},Na)}function jn(e){for(var t=x,n=x;t!==null&&!(t.f&(fe|ft));)t=t.parent;try{return te(t),e()}finally{te(n)}}function ce(e,t,n,r){var q;var i=(n&Ei)!==0,a=!et||(n&Si)!==0,o=(n&Ai)!==0,u=(n&xi)!==0,l=!1,f;o?[f,l]=La(()=>e[t]):f=e[t];var d=Pe in e||zn in e,s=o&&(((q=xe(e,t))==null?void 0:q.set)??(d&&t in e&&(S=>e[t]=S)))||void 0,v=r,_=!0,p=!1,h=()=>(p=!0,_&&(_=!1,u?v=Oe(r):v=r),v);f===void 0&&r!==void 0&&(s&&a&&_i(),f=h(),s&&s(f));var w;if(a)w=()=>{var S=e[t];return S===void 0?h():(_=!0,p=!1,S)};else{var g=jn(()=>(i?G:Oi)(()=>e[t]));g.f|=oi,w=()=>{var S=m(g);return S!==void 0&&(v=void 0),S===void 0?v:S}}if(!(n&Ti))return w;if(s){var y=e.$$legacy;return function(S,R){return arguments.length>0?((!a||!R||y||l)&&s(R?w():S),S):w()}}var b=!1,I=!1,k=St(f),E=jn(()=>G(()=>{var S=w(),R=m(k);return b?(b=!1,I=!0,R):(I=!1,k.v=S)}));return i||(E.equals=tn),function(S,R){if(arguments.length>0){const K=R?m(E):a&&o?z(S):S;return E.equals(K)||(b=!0,N(k,K),p&&v!==void 0&&(v=K),Oe(()=>m(E))),S}return m(E)}}function dn(e){D===null&&dr(),et&&D.l!==null?ja(D).m.push(e):rr(()=>{const t=Oe(e);if(typeof t=="function")return t})}function ja(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Ma="modulepreload",Oa=function(e){return"/"+e},Mn={},Ra=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=Oa(l),l in Mn)return;Mn[l]=!0;const f=l.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const s=document.createElement("link");if(s.rel=f?"stylesheet":Ma,f||(s.as="script"),s.crossOrigin="",s.href=l,u&&s.setAttribute("nonce",u),document.head.appendChild(s),f)return new Promise((v,_)=>{s.addEventListener("load",v),s.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return i.then(o=>{for(const u of o||[])u.status==="rejected"&&a(u.reason);return t().catch(a)})},Fa="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Fa);const Es="https://www.playpilot.com",vn="https://partner-api.playpilot.tech/1.0.0",Ss="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",le=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed"}),Ue=[];function Nr(e,t=se){let n=null;const r=new Set;function i(u){if(Lt(e,u)&&(e=u,n)){const l=!Ue.length;for(const f of r)f[1](),Ue.push(f,e);if(l){for(let f=0;f<Ue.length;f+=2)Ue[f][0](Ue[f+1]);Ue.length=0}}}function a(u){i(u(e))}function o(u,l=se){const f=[u,l];return r.add(f),r.size===1&&(n=t(i,a)||se),u(e),()=>{r.delete(f),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function On(e){let t;return Ia(e,n=>t=n)(),t}const jr=Nr(null),Mr=Nr(null),Va="https://insights.playpilot.net";async function ge(e,t=null,n={}){const r=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,n.organization_sid=On(jr),n.domain_sid=On(Mr),fetch(Va,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}function qa({organizationSid:e=null,domainSid:t=null}){jr.set(e||null),Mr.set(t||null)}const _n="EncryptedToken",Or="articleReplacementEditToken",Rr="playpilot-editorial-mode";async function Fr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=yn();if(!n)throw new Error("No token was provided");const r=hn(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(vn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return Ba(r),!0}catch(n){console.error(n),ge(le.AuthFailed)}finally{Ka()}return!1}function hn(e=""){var r,i;const t=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(Or);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${_n}=`).pop())==null?void 0:i.split(";")[0])||""}function Ba(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=_n+"="+e+";"+r+";path=/"}function Ua(){document.cookie=_n+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Vr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(Rr)==="true"||!!e}function Ha(){const e=new URL(window.location.href);e.searchParams.set(Rr,"true"),window.history.replaceState({},"",e)}function Ka(){const e=new URL(window.location.href);e.searchParams.delete(Or),window.history.replaceState({},"",e)}function qr(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t*31+r>>>0}return t.toString(16)}const c=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),Wa={"Where To Stream Online":{[c.English]:"Where to stream online",[c.Swedish]:"Var kan man streama online",[c.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[c.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[c.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[c.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[c.English]:"An error occurred",[c.Swedish]:"Ett fel inträffade",[c.Danish]:"Der opstod en fejl"},"Title Unavailable":{[c.English]:"This title is not currently available to stream.",[c.Swedish]:"Den här titeln går inte att streama just nu.",[c.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[c.English]:"is not currently available to stream.",[c.Swedish]:"går inte att streama just nu.",[c.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[c.English]:"is available to stream on",[c.Swedish]:"finns att streama på",[c.Danish]:"kan streames på"},"Is Available To Stream":{[c.English]:"is available to stream.",[c.Swedish]:"finns att streama.",[c.Danish]:"kan streames."},"View Streaming Options":{[c.English]:"View streaming options",[c.Swedish]:"Se streamingalternativ",[c.Danish]:"Se streamingmuligheder"},And:{[c.English]:"and",[c.Swedish]:"och",[c.Danish]:"og"},Minutes:{[c.English]:"minutes",[c.Swedish]:"minuter",[c.Danish]:"minutter"},"Type: movie":{[c.English]:"Movie",[c.Swedish]:"Film",[c.Danish]:"Film"},"Type: series":{[c.English]:"Series",[c.Swedish]:"Serie",[c.Danish]:"Serie"},Stream:{[c.English]:"Stream",[c.Swedish]:"Streama",[c.Danish]:"Stream"},Buy:{[c.English]:"Buy",[c.Swedish]:"Köp",[c.Danish]:"Køb"},Rent:{[c.English]:"Rent",[c.Swedish]:"Hyra",[c.Danish]:"Lej"},"Rent Or Buy":{[c.English]:"Rent or Buy",[c.Swedish]:"Hyra",[c.Danish]:"Lej eller køb"},All:{[c.English]:"All",[c.Swedish]:"Alla",[c.Danish]:"Alle"},Unscripted:{[c.English]:"Unscripted",[c.Swedish]:"Oscripterat",[c.Danish]:"Umanuskriptet"},Independent:{[c.English]:"Independent",[c.Swedish]:"Indie",[c.Danish]:"Indie"},"Game Show":{[c.English]:"Game Show",[c.Swedish]:"Gameshow",[c.Danish]:"Quizshow"},"Film Noir":{[c.English]:"Film Noir",[c.Swedish]:"Film noir",[c.Danish]:"Film noir"},Entertainment:{[c.English]:"Entertainment",[c.Swedish]:"Underhållning",[c.Danish]:"Underholdning"},News:{[c.English]:"News",[c.Swedish]:"Nyheter",[c.Danish]:"Nyheder"},Short:{[c.English]:"Short",[c.Swedish]:"Kortfilm",[c.Danish]:"Kortfilm"},Bollywood:{[c.English]:"Bollywood",[c.Swedish]:"Bollywood",[c.Danish]:"Bollywood"},Concert:{[c.English]:"Concert",[c.Swedish]:"Konsert",[c.Danish]:"Koncert"},Arthouse:{[c.English]:"Arthouse",[c.Swedish]:"Arthouse",[c.Danish]:"Arthouse"},"Alternate Version":{[c.English]:"Alternate Version",[c.Swedish]:"Alternativ version",[c.Danish]:"Alternativ version"},"Reality TV":{[c.English]:"Reality TV",[c.Swedish]:"Reality-TV",[c.Danish]:"Reality-TV"},Culture:{[c.English]:"Culture",[c.Swedish]:"Kultur",[c.Danish]:"Kultur"},Drama:{[c.English]:"Drama",[c.Swedish]:"Drama",[c.Danish]:"Drama"},Crime:{[c.English]:"Crime",[c.Swedish]:"Kriminal",[c.Danish]:"Krimi"},Western:{[c.English]:"Western",[c.Swedish]:"Western",[c.Danish]:"Western"},Thriller:{[c.English]:"Thriller",[c.Swedish]:"Thriller",[c.Danish]:"Thriller"},Animation:{[c.English]:"Animation",[c.Swedish]:"Animerat",[c.Danish]:"Animation"},Mystery:{[c.English]:"Mystery",[c.Swedish]:"Mysterium",[c.Danish]:"Mysterium"},Science:{[c.English]:"Science",[c.Swedish]:"Vetenskap",[c.Danish]:"Videnskab"},Nature:{[c.English]:"Nature",[c.Swedish]:"Natur",[c.Danish]:"Natur"},War:{[c.English]:"War",[c.Swedish]:"Krig",[c.Danish]:"Krig"},"Sci-Fi":{[c.English]:"Sci-Fi",[c.Swedish]:"Sci-fi",[c.Danish]:"Sci-fi"},Documentary:{[c.English]:"Documentary",[c.Swedish]:"Dokumentär",[c.Danish]:"Dokumentar"},"Stand-up":{[c.English]:"Stand-up",[c.Swedish]:"Standup",[c.Danish]:"Stand-up"},"Talk Show":{[c.English]:"Talk Show",[c.Swedish]:"Talkshow",[c.Danish]:"Talkshow"},Fantasy:{[c.English]:"Fantasy",[c.Swedish]:"Fantasy",[c.Danish]:"Fantasy"},History:{[c.English]:"History",[c.Swedish]:"Historia",[c.Danish]:"Historie"},Adventure:{[c.English]:"Adventure",[c.Swedish]:"Äventyr",[c.Danish]:"Eventyr"},Action:{[c.English]:"Action",[c.Swedish]:"Action",[c.Danish]:"Action"},Horror:{[c.English]:"Horror",[c.Swedish]:"Skräck",[c.Danish]:"Gyser"},Comedy:{[c.English]:"Comedy",[c.Swedish]:"Komedi",[c.Danish]:"Komedie"},Biography:{[c.English]:"Biography",[c.Swedish]:"Biografi",[c.Danish]:"Biografi"},Music:{[c.English]:"Music",[c.Swedish]:"Musik",[c.Danish]:"Musik"},Sport:{[c.English]:"Sport",[c.Swedish]:"Sport",[c.Danish]:"Sport"},Romance:{[c.English]:"Romance",[c.Swedish]:"Romantik",[c.Danish]:"Romantik"},Kids:{[c.English]:"Kids",[c.Swedish]:"Barn",[c.Danish]:"Børn"},Lifestyle:{[c.English]:"Lifestyle",[c.Swedish]:"Livsstil",[c.Danish]:"Livsstil"},Musical:{[c.English]:"Musical",[c.Swedish]:"Musikal",[c.Danish]:"Musical"},Anime:{[c.English]:"Anime",[c.Swedish]:"Anime",[c.Danish]:"Anime"},Family:{[c.English]:"Family",[c.Swedish]:"Familj",[c.Danish]:"Familie"}};function Q(e,t=Br()){var n;return((n=Wa[e])==null?void 0:n[t])||e}function Br(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.language,t=Object.values(c);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:c.English}const za=e=>e;function mn(e){const t=e-1;return t*t*t+1}function Rn(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Ga(e,{delay:t=0,duration:n=400,easing:r=za}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function Ur(e,{delay:t=0,duration:n=400,easing:r=mn,x:i=0,y:a=0,opacity:o=0}={}){const u=getComputedStyle(e),l=+u.opacity,f=u.transform==="none"?"":u.transform,d=l*(1-o),[s,v]=Rn(i),[_,p]=Rn(a);return{delay:t,duration:n,easing:r,css:(h,w)=>`
|
|
4
|
-
transform: ${
|
|
5
|
-
opacity: ${
|
|
6
|
-
transform: ${
|
|
7
|
-
opacity: ${
|
|
8
|
-
`}}var Za=O('<div class="popover svelte-qkpa3e" tabindex="-1" aria-hidden="true"><div class="dialog svelte-qkpa3e"><!></div></div>');function Ja(e,t){ae(t,!0);let n=ce(t,"maxHeight",15);wr("scope","popover");let r=Z(null),i=Z(!1);dn(async()=>{await xn(),a(),await xn(),o()});function a(){if(!m(r))return;const{top:s,right:v,bottom:_,height:p}=m(r).getBoundingClientRect(),h=u();N(i,z(s-h<0&&window.innerHeight-_>s+p));const w=window.innerWidth-v-h;v+h>window.innerWidth&&(m(r).style.left=`${w}px`)}function o(){if(!m(r))return;const{top:s,height:v}=m(r).getBoundingClientRect(),_=u(),p=m(i)?window.innerHeight-s-_:s+v-_;n(Math.min(p,window.innerHeight*.8))}function u(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var l=Za(),f=A(l),d=A(f);fn(d,()=>t.children),Dr(l,s=>N(r,s),()=>m(r)),M(()=>{be(l,"flip",m(i)),Lr(l,"--max-height",n()?n()+"px":null)}),Gt(3,f,()=>Ur,()=>({duration:100,y:10})),T(e,l),oe()}const Xa=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}];var $a=O('<div class="genre svelte-13nhocm"> </div>'),Qa=(e,t)=>N(t,!0),eo=O('<button class="genre expand svelte-13nhocm"> </button>'),to=O("<!> <!>",1);function no(e,t){ae(t,!0);let n=Z(!1);const r=G(()=>m(n)?t.genres:[t.genres[0]]);var i=to(),a=X(i);ut(a,17,()=>m(r),lt,(l,f)=>{var d=Xe();const s=G(()=>{var p;return(p=Xa.find(h=>h.slug===m(f)))==null?void 0:p.name});var v=X(d);{var _=p=>{var h=$a(),w=A(h);M(()=>B(w,Q(m(s)))),T(p,h)};U(v,p=>{m(s)&&p(_)})}T(l,d)});var o=C(a,2);{var u=l=>{var f=eo();f.__click=[Qa,n];var d=A(f);M(()=>B(d,`+${t.genres.length-1}`)),T(l,f)};U(o,l=>{!m(n)&&t.genres.length>1&&l(u)})}T(e,i),oe()}Ve(["click"]);function ro(e){let t=[];for(const n of e){let r=n;const i=t.find(u=>u.name===r.name),a=i==null?void 0:i.extra_info.category,o=r.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(u=>u.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}function Ge(e,t=1){e.role="heading",e.ariaLevel=t.toString()}wi();var io=Mt('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function ao(e){var t=io();T(e,t)}function Zt(e){return e.replace("/src/img","")}var oo=(e,t,n)=>t(n()),so=O('<div class="arrow svelte-1itidbd"><!></div>'),lo=O('<a target="_blank" class="playlink svelte-1itidbd" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1itidbd"> <div><span class="name svelte-1itidbd"> </span> <div class="category svelte-1itidbd"> </div></div> <!></a>'),uo=O('<div class="playlink empty svelte-1itidbd"> </div>'),co=O('<div class="heading svelte-1itidbd"> </div> <div class="playlinks svelte-1itidbd"><!> <!></div>',1);function fo(e,t){ae(t,!0);const n=ce(t,"list",3,!1),r=Qi("scope")==="modal",i=G(()=>t.playlinks.filter(h=>!!h.logo_url)),a=G(()=>ro(m(i))),o={SVOD:Q("Stream"),BUY:Q("Buy"),RENT:Q("Rent"),TVOD:Q("Rent Or Buy")};function u(h){ge(r?le.TitleModalPlaylinkClick:le.TitlePopoverPlaylinkClick,t.title,{playlink:h})}var l=co(),f=X(l),d=A(f);M(()=>B(d,Q("Where To Stream Online"))),xr(f,(h,w)=>Ge==null?void 0:Ge(h,w),()=>2);var s=C(f,2),v=A(s);ut(v,17,()=>m(a),lt,(h,w)=>{let g=()=>m(w).name,y=()=>m(w).url,b=()=>m(w).logo_url,I=()=>m(w).extra_info.category;var k=lo();k.__click=[oo,u,g];var E=A(k);M(()=>_e(E,"src",Zt(b())));var q=C(E,2),S=A(q),R=A(S),K=C(S,2),ee=A(K);M(()=>B(ee,o[I()]||Q("Stream")));var P=C(q,2);{var F=Y=>{var L=so(),V=A(L);ao(V),T(Y,L)};U(P,Y=>{n()&&Y(F)})}M(()=>{_e(k,"href",y()),_e(k,"data-playlink",g()),B(R,g())}),T(h,k)});var _=C(v,2);{var p=h=>{var w=uo(),g=A(w);M(()=>B(g,Q("Title Unavailable"))),T(h,w)};U(_,h=>{t.playlinks.length||h(p)})}M(()=>be(s,"list",n())),T(e,l),oe()}Ve(["click"]);var vo=(e,t)=>N(t,!0),_o=O('<button class="show-more svelte-1u3je71">Show more</button>'),ho=O('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),mo=O('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function po(e,t){ae(t,!0);const n=ce(t,"blurb",3,""),r=ce(t,"limit",3,200);let i=Z(!1);const a=G(()=>t.text.slice(0,r()));var o=mo(),u=A(o),l=A(u),f=C(l);{var d=h=>{var w=un("...");T(h,w)};U(f,h=>{!m(i)&&t.text.length>r()&&h(d)})}var s=C(f,2);{var v=h=>{var w=_o();w.__click=[vo,i],T(h,w)};U(s,h=>{!m(i)&&(t.text.length>r()||n())&&h(v)})}var _=C(u,2);{var p=h=>{var w=ho(),g=A(w);M(()=>B(g,n())),T(h,w)};U(_,h=>{m(i)&&h(p)})}M(()=>B(l,m(i)?t.text:m(a))),T(e,o),oe()}Ve(["click"]);var go=O('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),yo=O('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function wo(e,t){var n=yo(),r=C(X(n),2);ut(r,21,()=>t.participants,lt,(i,a)=>{var o=go(),u=A(o),l=C(u),f=A(l);M(()=>{var v;return B(f,((v=m(a).character)==null?void 0:v.slice(0,20))||"")});var d=C(f);{var s=v=>{var _=un("...");T(v,_)};U(d,v=>{var _;(_=m(a).character)!=null&&_.length&&v(s)})}M(()=>B(u,`${m(a).name??""} `)),T(i,o)}),T(e,n)}var ko=Mt('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function bo(e){var t=ko();T(e,t)}var Eo=O('<div class="top svelte-16h1v3j"><img class="poster svelte-16h1v3j"></div>'),So=O("<div> </div>"),To=O("<!> <!>",1),Ao=O('<img alt="" class="svelte-16h1v3j">'),xo=O('<div class="content svelte-16h1v3j" data-playpilot-link-injections-title=""><div class="header svelte-16h1v3j"><!> <div class="heading svelte-16h1v3j"> </div> <div class="info svelte-16h1v3j"><div class="imdb svelte-16h1v3j"><!> </div> <!> <div> </div> <div class="capitalize svelte-16h1v3j"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-16h1v3j"><!></div>',1);function Hr(e,t){ae(t,!0);const n=ce(t,"small",3,!1),r=ce(t,"compact",3,!1);let i=Z(!1),a=Z(!1),o=Z(!1);var u=xo(),l=X(u),f=A(l),d=A(f);{var s=L=>{var V=Eo(),H=A(V);M(()=>_e(H,"src",Zt(t.title.standing_poster))),M(()=>{_e(H,"alt",`Movie poster for '${t.title.title??""}'`),be(H,"loaded",m(i))}),it("load",H,()=>N(i,!0)),T(L,V)};U(d,L=>{r()||L(s)})}var v=C(d,2),_=A(v);xr(v,L=>Ge==null?void 0:Ge(L));var p=C(v,2),h=A(p),w=A(h);bo(w);var g=C(w),y=C(h,2);no(y,{get genres(){return t.title.genres}});var b=C(y,2),I=A(b),k=C(b,2),E=A(k);M(()=>B(E,Q(`Type: ${t.title.type}`)));var q=C(k,2);{var S=L=>{var V=So(),H=A(V);M(()=>B(H,`${t.title.length??""} ${Q("Minutes")??""}`)),T(L,V)};U(q,L=>{!n()&&t.title.length&&L(S)})}var R=C(f,2),K=A(R);fo(K,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var ee=C(K,2);{var P=L=>{var V=To(),H=X(V);po(H,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var Se=C(H,2);{var de=De=>{wo(De,{get participants(){return t.title.participants}})};U(Se,De=>{var Te;(Te=t.title.participants)!=null&&Te.length&&De(de)})}T(L,V)};U(ee,L=>{n()||L(P)})}var F=C(l,2),Y=A(F);va(Y,()=>m(o),L=>{var V=Ao();M(()=>_e(V,"src",Zt(m(o)?t.title.standing_poster:t.title.medium_poster))),M(()=>{be(V,"loaded",m(a)),be(V,"blur",m(o))}),it("load",V,()=>N(a,!0)),it("error",V,()=>N(o,!0)),T(L,V)}),M(()=>{_e(l,"data-playpilot-original-title",t.title.original_title),be(l,"small",n()),be(l,"compact",r()),be(v,"truncate",n()),B(_,t.title.title),B(g,` ${t.title.imdb_score??""}`),B(I,t.title.year),be(F,"faded",r())}),T(e,u),oe()}function Po(e,t){ae(t,!0);let n=Z(0);ge(le.TitlePopoverView,t.title),Ja(e,{get maxHeight(){return m(n)},set maxHeight(r){N(n,z(r))},children:(r,i)=>{var a=G(()=>!!m(n)&&m(n)<250);Hr(r,{get title(){return t.title},small:!0,get compact(){return m(a)}})},$$slots:{default:!0}}),oe()}var Io=(e,t,n,r)=>t(m(n).title_details,m(r)),Lo=O(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),Co=(e,t,n,r)=>t(m(n).title_details,r()),Do=O('<!> <a target="_blank"> </a>',1),No=O(" <!>.",1),jo=O("<!> <br>",1),Mo=O(" <br>",1),Oo=O('<span class="svelte-pfvkex"><!></span>'),Ro=O('<p class="svelte-pfvkex"></p>');function Fo(e,t){ae(t,!0);const n=ce(t,"onclickmodal",3,l=>null);function r(l,f){ge(le.AfterArticlePlaylinkClick,l,{playlink:f})}function i(l,f){ge(le.AfterArticleModalButtonClick,l),n()(f)}var a=Xe(),o=X(a);{var u=l=>{var f=Ro();ut(f,21,()=>t.linkInjections,lt,(d,s)=>{var v=Oo();const _=G(()=>{const{key:y,title:b,title_details:I,after_article_style:k}=m(s);return{key:y,title:b,title_details:I,after_article_style:k}}),p=G(()=>{var y;return((y=m(_).title_details)==null?void 0:y.providers)||[]});var h=A(v);{var w=y=>{var b=jo(),I=X(b);{var k=q=>{var S=Lo(),R=X(S);M(()=>B(R,`"${m(_).title??""}" ${Q("Is Available To Stream")??""} `));var K=C(R),ee=A(K);ee.__click=[Io,i,_,s];var P=A(ee);M(()=>B(P,Q("View Streaming Options"))),T(q,S)},E=q=>{var S=No(),R=X(S);M(()=>B(R,`"${m(_).title??""}" ${Q("Is Available To Stream On")??""} `));var K=C(R);ut(K,17,()=>m(p),lt,(ee,P,F)=>{let Y=()=>m(P).name,L=()=>m(P).url;var V=Do(),H=X(V);{var Se=Te=>{var ve=un();M(()=>B(ve,F===m(p).length-1?`, ${Q("And")}`:",")),T(Te,ve)};U(H,Te=>{F&&Te(Se)})}var de=C(H,2);de.__click=[Co,r,_,Y];var De=A(de);M(()=>{_e(de,"href",L()),B(De,Y())}),T(ee,V)}),T(q,S)};U(I,q=>{m(_).after_article_style==="modal_button"?q(k):q(E,!1)})}T(y,b)},g=y=>{var b=Mo(),I=X(b);M(()=>B(I,`"${m(_).title??""}" ${Q("Title Unavailable Suffix")??""} `)),T(y,b)};U(h,y=>{m(p).length?y(w):y(g,!1)})}M(()=>_e(v,"data-playpilot-injection-key",m(_).key)),T(d,v)}),T(l,f)};U(o,l=>{t.linkInjections.length&&l(u)})}T(e,a),oe()}Ve(["click"]);function Vo(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Kr(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Fn(e,t,n=[]){var a,o;const r=document.createTreeWalker(t);let i;for(;(i=r.nextNode())&&!((a=i.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=i.parentNode)==null?void 0:o.nodeName)||"")););return i}function Vn(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function qo(e,t,n,r){const i=Vo(t),a=Kr(t),o=e.slice(0,r),u=e.slice(r),l=/[-/\\^$*+?.()|[\]{}]/g,f=new RegExp(`${a.replace(l,"\\$&")}|${i.replace(l,"\\$&")}`),d=u.replace(f,n);return o+d}function Ne(e){return Kr(e).toLowerCase().replace(/\s+/g,"")}function As(e,t,n){const i=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,i-a),u=o+n;u>e.length&&(u=e.length,o=Math.max(0,u-n));let l=e.slice(o,u).trim();return o>0&&(l="…"+l),u<e.length&&(l+="…"),l}function Bo(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const pn="data-playpilot-injection-key",gn=`[${pn}]`,$e={};let Jt=null,bt=null;function Uo(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(t.includes(r)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;const i=Array.from(r.childNodes).some(o=>{var u;return o.nodeType===Node.TEXT_NODE&&((u=o.nodeValue)==null?void 0:u.trim())!==""});if(i&&r.tagName==="LI"){const o=r.closest("ul, ol");o&&!t.includes(o)&&t.push(o);continue}if(i){t.push(r);continue}const a=Array.from(r.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function Wr(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),r=document.querySelector(n);if(r)return r}return document.querySelector("article")||document.querySelector("main")||document.body}function Ho(e,t,n={aiInjections:[],manualInjections:[]}){var d;const r=Jo(n);if(!r)return[];const i=Ne(e.map(s=>s.innerText).join(" ")),a=$o(r),o=a.filter(s=>i.includes(Ne(s.sentence))),u={},l={};for(const s of o){const v=e.findIndex(E=>Ne(E.innerText).includes(Ne(s.sentence))),_=e[v];if(!_)continue;const p=Fn(s.title,_,["A"]);if(!(p!=null&&p.nodeValue)||Vn(p)){const E=Fn(s.title,_);E&&Vn(E)&&(l[s.key]="Given text is already inside of a link.");continue}const h=document.createElement("span");h.dataset.playpilotInjectionKey=s.key;const w=document.createElement("a");w.innerText=s.title,w.href=s.playpilot_url,w.dataset.playpilotOriginalTitle=(d=s.title_details)==null?void 0:d.original_title,w.target="_blank",w.rel="noopener nofollow noreferrer",h.insertAdjacentElement("beforeend",w);const g=Bo(Object.values(u).filter(E=>E.elementIndex===v).map(E=>E.to)),y=_.innerHTML.indexOf(p.nodeValue),b=_.innerHTML.indexOf(s.sentence),I=Math.max(g,y,b,0);_.innerHTML=qo(_.innerHTML,s.title,h.outerHTML,I);const k=_.innerHTML.indexOf(h.outerHTML);u[s.key]={elementIndex:v,from:k,to:k+h.outerHTML.length}}Wo(a,t),Ko();const f=Qo(r);return f.length&&Yo(e,f,t),r.filter(s=>s.title_details).map((s,v)=>{const _=s.duplicate??(!s.manual&&es(s,v,r)),p=document.querySelector(`[${pn}="${s.key}"]`),h=Gr(s)&&!s.inactive&&!s.after_article&&!p,w=h?l[s.key]||(i.includes(Ne(s.sentence))?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...s,inactive:s.inactive??!1,duplicate:_,failed:h,failed_message:w}})}function Ko(){const e=Array.from(document.querySelectorAll(`${gn} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(r=>{getComputedStyle(n).getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)})})}function Wo(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(pn);if(!a)return;const o=e.find(u=>a===u.key);o&&zo(r,o,t)}),Array.from(document.querySelectorAll(gn)).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(o=>i===o.key);a&&(r.addEventListener("mouseenter",o=>Go(o,a)),r.addEventListener("mouseleave",()=>xt(a)))})}function zo(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),xt(t))}function Go(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget;Jt=n,setTimeout(()=>{if($e[t.key]||Jt!==n)return;const r=cn(Po,{target:n,props:{title:t.title_details}});$e[t.key]={injection:t,component:r}},100)}function xt(e,t=!0){const n=$e[e.key];Jt=null,n&&(Ar(n.component,{outro:t}),delete $e[e.key])}function Yo(e,t,n){var u,l;if(!t.length)return;const r=document.createElement("div"),i=(u=window.PlayPilotLinkInjections)==null?void 0:u.after_article_selector,a=(i?document.querySelector(i):null)||e[e.length-1],o=((l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_insert_position)||"afterend";r.dataset.playpilotAfterArticlePlaylinks="true",a.insertAdjacentElement(o,r),bt=cn(Fo,{target:r,props:{linkInjections:t,onclickmodal:n}})}function Zo(){var e;bt&&(Ar(bt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),bt=null)}function Xt(){Object.values($e).forEach(t=>xt(t.injection)),document.querySelectorAll(gn).forEach(t=>t.outerHTML=t.textContent||""),Object.values($e).forEach(({injection:t})=>xt(t,!1)),Zo()}function Jo({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function Xo(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function zr(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&Gr(e)}function Gr(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function $o(e){return Yr(e).filter(t=>t.in_text!==!1&&zr(t))}function Qo(e){return Yr(e).filter(t=>t.after_article===!0&&zr(t))}function Yr(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&Zr(n,t)))}function es(e,t,n){return n.some((r,i)=>t!==i&&r.manual&&Zr(r,e))}function Zr(e,t){return e.title===t.title&&Ne(e.sentence)===Ne(t.sentence)}function ts(){const e=Wr();return{heading:ns(e),modified_time:rs(e),published_time:is(e)}}function ns(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function rs(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?Jr(n):null}function is(e){const t=document.querySelector('meta[property*="published_time"]')||e.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||e.querySelector("time")||document.querySelector("time")||e.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?Jr(n):null}function Jr(e){try{return new Date(e).toISOString()}catch{return null}}function Xr(){return location.protocol+"//"+location.host+location.pathname}let Ft=null;async function $r(e,t,{hash:n=qr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=yn(),o=Vr()?await Fr():!1,u=Br(),l=ts();if(!a)throw new Error("No token was provided");const f=await fetch(vn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${u}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:l,page_text:t,...r})});if(!f.ok)throw f;return await f.json()}async function qn(e,t,{requireCompletedResult:n=!1,pollInterval:r=3e3,maxTries:i=600}={}){let a=qr(t),o=0;Ft&&clearTimeout(Ft);const u=async(l,f)=>{try{const d=await $r(e,t,{hash:a});if(n&&d.automation_enabled&&d.ai_running)throw new Error;d.link_injections=Bn(d.link_injections||[]),d.ai_injections=Bn(d.ai_injections||[]),l(d);return}catch{if(o++,o>=i){i>1&&console.error("Max poll limit exceeded. Please return later."),l();return}Ft=setTimeout(()=>u(l),r)}};return new Promise(u)}async function xs(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,i=e.filter(u=>u.manual).map(u=>({sid:u.sid,title:u.title,sentence:u.sentence,playpilot_url:u.playpilot_url,after_article:!!u.after_article,after_article_style:u.after_article_style||null,in_text:u.in_text??!0,inactive:!!u.inactive,removed:!!u.removed}));if(!await $r(Xr(),t,{params:{private_token:hn(),link_injections:i,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function as(){const e=new Headers({"Content-Type":"application/json"}),t=yn();if(!t)throw new Error("No token was provided");const n=await fetch(vn+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function Bn(e){return e.map(t=>({...t,key:os(t.sid)}))}function os(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function yn(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function ss(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var ls=Mt('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Qr(e){var t=ls();T(e,t)}function us(e,t){ae(t,!0);const n=ce(t,"size",3,"margin(2)"),r=ce(t,"onclick",3,()=>null),i=Da(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=Xe(),o=X(a);ya(o,()=>t.href?"a":"button",!1,(u,l)=>{let f;M(()=>{f=Ea(u,f,{role:t.href?"link":"button",onclick:r(),class:"button",...i},"svelte-1qqv88o",u.namespaceURI===Zn,u.nodeName.includes("-")),Lr(u,"--size",n())});var d=Xe(),s=X(d);fn(s,()=>t.children??se),T(l,d)}),T(e,a),oe()}var cs=(e,t)=>t()(),fs=O('<div class="modal svelte-wrncjp"><div class="dialog svelte-wrncjp" role="dialog"><div class="close svelte-wrncjp"><!></div> <!></div> <div class="backdrop svelte-wrncjp"></div></div>');function ds(e,t){ae(t,!0);const n=ce(t,"onclose",3,()=>null),r=ce(t,"onscroll",3,()=>null);wr("scope","modal"),dn(()=>{const s=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=s||""});function i(s){return window.innerWidth<600?Ur(s,{duration:250,y:window.innerHeight}):Ya(s,{duration:150,start:.85})}var a=fs();it("keydown",Bt,({key:s})=>{s==="Escape"&&n()()});var o=A(a),u=A(o),l=A(u);us(l,{onclick:()=>n()(),children:(s,v)=>{Qr(s)},$$slots:{default:!0}});var f=C(u,2);fn(f,()=>t.children);var d=C(o,2);d.__click=[cs,n],it("scroll",o,function(...s){var v;(v=r())==null||v.apply(this,s)}),Gt(3,o,()=>i),Gt(3,a,()=>Ga,()=>({duration:150})),T(e,a),oe()}Ve(["click"]);function vs(e,t){ae(t,!0),ge(le.TitleModalView,t.title);let n=!1;function r(){n||(ge(le.TitleModalScroll,t.title),n=!0)}ds(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Hr(i,{get title(){return t.title}})},$$slots:{default:!0}}),oe()}var _s=Mt('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function hs(e){var t=_s();T(e,t)}var ms=O('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function ps(e,t){var n=ms(),r=A(n);r.__click=function(...u){var l;(l=t.onclick)==null||l.apply(this,u)};var i=A(r);hs(i);var a=C(r,2);a.__click=function(...u){var l;(l=t.onclose)==null||l.apply(this,u)};var o=A(a);Qr(o),T(e,n)}Ve(["click"]);var gs=O('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!> <!></div>');function ys(e,t){ae(t,!0);const n=Wr(),r=Uo(n),i=r.map(P=>P.outerHTML).join("");let a=Z(null),o=Z(null),u=Z(z(Vr())),l=Z(!!hn()),f=Z(!1),d=Z(!0),s=Z(z([])),v=Z(void 0);const _=G(()=>m(a)||{}),p=G(()=>bn(m(_).ai_injections,()=>[],!0)),h=G(()=>bn(m(_).link_injections,()=>[],!0));rr(()=>{m(u)&&!m(d)&&g()}),dn(()=>{if(!ss())return(async()=>(await w(),ge(le.ArticlePageView)))(),()=>Xt()});async function w(){N(d,!0),m(u)&&N(f,z(await Fr()));const P=Xr();try{const F=await as();if(!m(u)&&(F!=null&&F.exclude_urls_pattern)&&P.match(F.exclude_urls_pattern))return}catch(F){ge(le.FetchingConfigFailed),console.error("TPI Config failed to fetch",F);return}if(N(a,z(await qn(P,i,{maxTries:1}))),N(d,!1),!!m(a)){if(qa({organizationSid:m(a).organization_sid,domainSid:m(a).domain_sid}),!m(a).ai_running||!m(a).automation_enabled){y({aiInjections:m(p),manualInjections:m(h)});return}m(u)&&(N(a,z(await qn(P,i,{requireCompletedResult:!0}))),y({aiInjections:m(p),manualInjections:m(h)}))}}function g(){Xt(),y(Xo(m(s)))}function y(P={aiInjections:m(p),manualInjections:m(h)}){const F=Ho(r,b,P);JSON.stringify(F)!==JSON.stringify(m(s))&&N(s,z(F));const Y=F.filter(L=>!L.failed);Y.length&&(m(u)||ge(le.ArticleInjected,null,{manual:Y.filter(L=>L.manual).length,ai:Y.filter(L=>!L.manual).length}))}function b(P){N(o,z(P))}function I(){N(u,!0),Ha(),w()}var k=gs(),E=A(k);{var q=P=>{ps(P,{onclick:I,onclose:()=>{N(l,!1),Ua()}})};U(E,P=>{m(l)&&!m(u)&&P(q)})}var S=C(E,2);{var R=P=>{var F=Xe(),Y=X(F);da(Y,()=>Ra(()=>import("./Editor-vJiCq2Zj.js"),[]),null,(L,V)=>{var H=Xe();const Se=G(()=>m(V).default);var de=X(H),De=G(()=>{var ve;return(ve=m(a))==null?void 0:ve.injections_enabled}),Te=G(()=>{var ve,mt,qe,wn,kn;return{automationEnabled:(ve=m(a))==null?void 0:ve.automation_enabled,aiRunning:((mt=m(a))==null?void 0:mt.ai_running)&&((qe=m(a))==null?void 0:qe.automation_enabled),message:(wn=m(a))==null?void 0:wn.ai_progress_message,percentage:(kn=m(a))==null?void 0:kn.ai_progress_percentage}});ga(de,()=>m(Se),(ve,mt)=>{Dr(mt(ve,{htmlString:i,get loading(){return m(d)},get injectionsEnabled(){return m(De)},get aiStatus(){return m(Te)},get linkInjections(){return m(s)},set linkInjections(qe){N(s,z(qe))}}),qe=>N(v,z(qe)),()=>m(v))}),T(L,H)}),T(P,F)};U(S,P=>{m(u)&&m(f)&&P(R)})}var K=C(S,2);{var ee=P=>{vs(P,{get title(){return m(o).title_details},onclose:()=>N(o,null)})};U(K,P=>{m(o)&&m(o).title_details&&P(ee)})}T(e,k),oe()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,app:null,initialize(e={token:"",selector:"",after_article_selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=cn(ys,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),Xt()}};export{Bt as $,m as A,C as B,Gr as C,G as D,un as E,Gt as F,Ts as G,it as H,Dr as I,N as J,Z as K,Ur as L,dn as M,ge as N,Zt as O,B as P,Ss as Q,As as R,Uo as S,le as T,Wr as U,Ne as V,Ga as W,yn as X,vn as Y,bo as Z,Es as _,ye as a,z as a0,rr as a1,ut as a2,Kr as a3,us as a4,xr as a5,Ge as a6,os as a7,va as a8,lt as a9,Lr as aa,bn as ab,bs as ac,xs as ad,Ce as b,Tr as c,Je as d,we as e,be as f,Ye as g,T as h,_t as i,Ve as j,ae as k,ws as l,_e as m,Mt as n,oe as o,ce as p,O as q,ir as r,fn as s,M as t,Oe as u,A as v,U as w,Xe as x,X as y,ks as z};
|
|
1
|
+
(() => {
|
|
2
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-qkpa3e{--offset: 8px;position:absolute;top:calc((var(--offset) - 1px) * -1);left:0;width:calc(100vw - 32px);max-width:320px;padding:var(--offset) 0;transform:translateY(calc(-100% + var(--offset)));z-index:2147483647}.popover.svelte-qkpa3e svg{fill:none}.popover.flip.svelte-qkpa3e{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-qkpa3e{cursor:default;position:relative;border-radius:var(--playpilot-popover-border-radius, 16px);background:var(--playpilot-popover-background, var(--playpilot-light));box-shadow:var(--playpilot-popover-shadow, var(--playpilot-shadow-large));max-height:min(var(--max-height),560px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden}.genre.svelte-13nhocm{display:flex;flex-wrap:wrap;background:var(--playpilot-genre-background, var(--playpilot-content));border:0;border-radius:var(--playpilot-genre-border-radius, 16px);padding:4px 8px;font-family:var(--playpilot-genre-font-family, inherit);font-weight:var(--playpilot-playlink-font-weight, inherit);text-transform:var(--playpilot-genre-text-transform, none);color:var(--playpilot-genre-text-color, var(--playpilot-text-color-alt));line-height:1;font-size:inherit}.genre.svelte-13nhocm:is(button:where(.svelte-13nhocm)):hover{cursor:pointer;filter:var(--playpilot-genre-hover-filter, brightness(1.1));background:var(--playpilot-genre-hover-background, var(--playpilot-genre-background, var(--playpilot-content)))}img.svelte-1itidbd{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1itidbd{height:40px;width:40px}}.heading.svelte-1itidbd{margin:0;color:var(--playpilot-playlinks-title-color, var(--playpilot-text-color-alt));font-family:var(--playpilot-playlinks-title-font-family, inherit);font-weight:var(--playpilot-playlinks-title-font-weight, lighter);font-size:var(--playpilot-playlinks-title-font-size, 14px);line-height:normal}.playlinks.svelte-1itidbd{box-sizing:border-box;display:flex;gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px;overflow:auto;scrollbar-width:none}.playlinks.svelte-1itidbd::-webkit-scrollbar{display:none}.list.svelte-1itidbd{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1itidbd img:where(.svelte-1itidbd){height:32px;width:32px}}.playlink.svelte-1itidbd{display:flex;align-items:center;gap:12px;padding:12px;background:var(--playpilot-playlink-background, var(--playpilot-lighter));box-shadow:var(--playpilot-playlink-shadow, var(--playpilot-shadow));border-radius:var(--playpilot-playlink-border-radius, 8px);color:var(--playpilot-playlink-text-color, var(--playpilot-text-color-alt))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal);text-decoration:none!important;white-space:nowrap;font-size:12px;line-height:1}.playlink.svelte-1itidbd:hover,.playlink.svelte-1itidbd:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)))!important;text-decoration:none!important}.playlink.svelte-1itidbd img:where(.svelte-1itidbd){margin:0}.list.svelte-1itidbd .playlink:where(.svelte-1itidbd){padding:8px;gap:8px}.name.svelte-1itidbd{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1itidbd{margin-top:8px;font-size:10px;color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.empty.svelte-1itidbd{white-space:initial;line-height:1.35}.arrow.svelte-1itidbd{margin-left:auto;padding:0 8px}.paragraph.svelte-1u3je71{display:block;margin:16px 0 0}.show-more.svelte-1u3je71{display:inline;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;background:transparent;border:0;color:var(--playpilot-read-more-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-read-more-font-weight, inherit);font-family:inherit;font-size:inherit}.show-more.svelte-1u3je71:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}h2.svelte-15oguej{margin:24px 0 16px;font-size:var(--playpilot-cast-title-font-size, 18px);line-height:normal;font-weight:inherit;color:var(--playpilot-cast-title-text-color, var(--playpilot-text-color))}.participants.svelte-15oguej{display:flex;gap:16px;width:calc(100% + 32px);padding:0 16px;margin:0 -16px;overflow:auto;white-space:nowrap;scrollbar-width:none}.participants.svelte-15oguej::-webkit-scrollbar{display:none}.character.svelte-15oguej{color:var(--playpilot-cast-character-text-color, var(--playpilot-text-color-alt));font-style:italic}.heading.svelte-16h1v3j{margin:8px 0;color:var(--playpilot-detail-title-text-color, #fff);font-family:var(--playpilot-detail-title-font-family, inherit);font-weight:var(--playpilot-detail-title-font-weight, lighter);font-size:var(--playpilot-detail-title-font-size, 24px);line-height:normal;font-style:var(--playpilot-detail-title-font-style, normal)}.small.svelte-16h1v3j .heading:where(.svelte-16h1v3j){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-16h1v3j .heading:where(.svelte-16h1v3j){margin-top:0}.content.svelte-16h1v3j{z-index:1;position:relative;padding:16px;color:var(--playpilot-detail-text-color, var(--playpilot-text-color));font-family:var(--playpilot-detail-font-family, var(--playpilot-font-family));font-weight:var(--playpilot-detail-font-weight, normal);font-size:var(--playpilot-detail-font-size, 14px);line-height:normal;font-style:normal}.content.small.svelte-16h1v3j{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-16h1v3j{padding:32px 0 16px;background:transparent}.small.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding-top:16px}.compact.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding:0 0 16px}.top.svelte-16h1v3j{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-16h1v3j{display:block;width:72px;margin:0;aspect-ratio:2/3;border-radius:var(--playpilot-detail-image-border-radius, 8px);background:var(--playpilot-detail-image-background, var(--playpilot-content));box-shadow:var(--playpilot-detail-image-shadow, var(--playpilot-shadow));opacity:0}.poster.loaded.svelte-16h1v3j{opacity:1}.info.svelte-16h1v3j{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-16h1v3j .info:where(.svelte-16h1v3j){gap:8px 12px}.imdb.svelte-16h1v3j{display:flex;align-items:center;gap:4px}.imdb.svelte-16h1v3j svg{margin-top:-2px}.small.svelte-16h1v3j .imdb:where(.svelte-16h1v3j) svg{margin-top:0;width:12px;height:12px}.background.svelte-16h1v3j{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter));z-index:0}.background.svelte-16h1v3j:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%);z-index:1}.background.svelte-16h1v3j img:where(.svelte-16h1v3j){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-16h1v3j img.loaded:where(.svelte-16h1v3j){opacity:1}.background.svelte-16h1v3j img.blur:where(.svelte-16h1v3j){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-16h1v3j{opacity:.15}.capitalize.svelte-16h1v3j{text-transform:capitalize}.truncate.svelte-16h1v3j{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}p.svelte-pfvkex{font-weight:var(--playpilot-after-article-text-font-weight, normal)}span.svelte-pfvkex{display:block}button.svelte-pfvkex{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-pfvkex:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1qqv88o{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:var(--playpilot-button-padding, 0);background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1qqv88o:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-wrncjp{z-index:2147483647;position:fixed;display:flex;justify-content:center;align-items:flex-start;top:0;left:0;width:100%;height:100%;background:var(--playpilot-detail-backdrop, rgba(0, 0, 0, .65))}@media (min-width: 600px){.modal.svelte-wrncjp{padding:32px}}.modal.svelte-wrncjp svg{fill:none}.dialog.svelte-wrncjp{position:relative;width:100%;max-width:600px;max-height:80vh;overflow:auto;margin-top:auto;border-radius:var(--playpilot-detail-border-radius, 16px 16px 0 0);background:var(--playpilot-detail-background, var(--playpilot-light))}@media (min-width: 600px){.dialog.svelte-wrncjp{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-wrncjp{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-wrncjp{--playpilot-button-background: var(--playpilot-modal-close-button-background, var(--playpilot-content));--playpilot-button-shadow: var(--playpilot-modal-close-button-shadow, var(--playpilot-shadow));--playpilot-button-padding: var(--playpilot-modal-close-button-padding, .5rem);--playpilot-button-text-color: var(--playpilot-modal-close-button-text-color, var(--playpilot-text-color-alt));z-index:5;position:absolute;top:16px;right:16px}.close.svelte-wrncjp:hover{filter:brightness(1.1)}svg.svelte-by11ix{transition:transform .1s}.expanded.svelte-by11ix{transform:rotate(180deg)}.switch.svelte-91s87b{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;border:0;padding:0;background:transparent;cursor:pointer}.fullwidth.svelte-91s87b{width:100%;justify-content:space-between}.label.svelte-91s87b{display:flex;align-items:center;gap:8px;margin-right:8px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color-alt);font-size:12px}.switch.svelte-91s87b:hover .label:where(.svelte-91s87b){color:var(--playpilot-text-color)}.track.svelte-91s87b{position:relative;width:32px;height:20px;border-radius:16px;background:var(--playpilot-content);transition:background-color .1s}.active.svelte-91s87b .track:where(.svelte-91s87b){background:var(--playpilot-green)}.knob.svelte-91s87b{position:absolute;top:2px;left:2px;height:16px;width:16px;border-radius:50%;background:#fff;transition:left .1s}.active.svelte-91s87b .knob:where(.svelte-91s87b){left:14px}input.svelte-1vrer3i{width:100%;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}input.svelte-1vrer3i:focus{background:var(--playpilot-lighter);outline:1px solid white}input.svelte-1vrer3i::placeholder{color:var(--playpilot-text-color-alt);opacity:.75}.alert.svelte-18si0a5{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}.alert.warning.svelte-18si0a5{border-color:var(--playpilot-warning);background:var(--playpilot-warning-dark)}.alert.svelte-18si0a5 a{color:currentColor}.switches.svelte-1shw34x{display:flex;flex-direction:column;gap:12px}button.svelte-1shw34x{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:32px;padding:8px;background:transparent;font-family:var(--playpilot-font-family);font-size:10.4px;color:var(--playpilot-text-color-alt);cursor:pointer}button.svelte-1shw34x:hover,button.active.svelte-1shw34x{color:var(--playpilot-text-color)}.group.svelte-1shw34x{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:4px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}.active-marker.svelte-1shw34x{z-index:0;position:absolute;width:calc(50% - 8px);height:calc(100% - 8px);left:4px;top:4px;border-radius:32px;background:var(--playpilot-content);transition:left .1s}.right.svelte-1shw34x{left:calc(50% + 4px)}.label.svelte-1shw34x{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1shw34x{margin-top:8px}button.svelte-1fmy0wh{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-1fmy0wh:hover{cursor:pointer;color:#fff}.context-menu.svelte-1fmy0wh{position:relative}.content.svelte-1fmy0wh{z-index:1;position:absolute;top:100%;right:0;max-height:80px;max-width:160px;border-radius:8px;background:var(--playpilot-lighter)}.item.svelte-8gd2db{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-8gd2db:hover,.item.highlighted.svelte-8gd2db{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-8gd2db{outline:2px solid var(--playpilot-primary)}.header.svelte-8gd2db{display:flex;gap:16px;width:100%}.poster.svelte-8gd2db{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-8gd2db .poster:where(.svelte-8gd2db){opacity:.35}.title.svelte-8gd2db{font-size:14px;word-break:break-word}.sentence.svelte-8gd2db{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-8gd2db em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-8gd2db{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;margin:0;background:transparent;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;font-style:italic;text-decoration:underline}.expand-sentence.svelte-8gd2db:hover{color:var(--playpilot-text-color)}.content.svelte-8gd2db{padding-top:8px}.inactive.svelte-8gd2db .info:where(.svelte-8gd2db){opacity:.35}.context-menu.svelte-8gd2db{margin:0 -4px 0 auto}.context-menu-action.svelte-8gd2db{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:16px;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-8gd2db:hover{color:var(--playpilot-text-color)}.actions.svelte-8gd2db{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-8gd2db{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:50%;background:var(--playpilot-content);color:var(--playpilot-text-color);box-shadow:var(--playpilot-shadow);cursor:pointer}.expand.svelte-8gd2db:hover{filter:brightness(1.2)}.expanded.svelte-8gd2db{padding-top:16px}.type-select.svelte-8gd2db{margin-top:8px}.label.svelte-8gd2db{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-8gd2db{margin-top:12px}.warning.svelte-8gd2db{margin:0 auto 0 8px}.warning.svelte-8gd2db svg{display:block}.drag-handle.svelte-19mcc5g{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:8px;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-19mcc5g:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-19mcc5g:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-19mcc5g:active{cursor:grabbing}.drag-handle.svelte-19mcc5g:before{display:block;content:"";position:absolute;top:20%;right:0;bottom:60%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.resize-handle.svelte-sxkuxk{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:0;width:100%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-sxkuxk:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-sxkuxk:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-sxkuxk:active{cursor:grabbing}.resize-handle.svelte-sxkuxk:before{display:block;content:"";position:absolute;top:0;right:20%;left:20%;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-rjq94e{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left;font-size:13.6px}.item.hoverable.svelte-rjq94e{cursor:pointer}.item.hoverable.svelte-rjq94e:hover{background:var(--playpilot-lighter)}.item.svelte-rjq94e:last-child{border-bottom:0}.poster.svelte-rjq94e{flex:0 0 auto;height:auto;width:28px;aspect-ratio:28/42;border-radius:4px;background:var(--playpilot-content)}.name.svelte-rjq94e{color:var(--playpilot-text-color)}.meta.svelte-rjq94e{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-rjq94e{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-rjq94e{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-rjq94e:hover{color:vaR(--playpilot-text-color)}.search.svelte-1olb8n0{position:relative}.results.svelte-1olb8n0{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.empty.svelte-1olb8n0{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.selected.svelte-1olb8n0{margin:8px 0;border-radius:.5rem;border:2px solid var(--playpilot-green)}p.svelte-1i8p6op,label.svelte-1i8p6op{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-1i8p6op{display:block;margin-top:16px}.layout.svelte-1i8p6op{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-1i8p6op{display:flex;align-items:center;gap:8px;margin-bottom:16px}.heading.svelte-1i8p6op{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}.error.svelte-1i8p6op{margin-top:8px}.save.svelte-1i8p6op{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-green);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color)}.save.svelte-1i8p6op:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-1i8p6op{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}a.svelte-1kpafo0{color:currentColor}p.svelte-1kpafo0{margin:0}.ai-indicator.svelte-1kpafo0{position:relative;margin:0 8px}.content.svelte-1kpafo0{position:relative;display:flex;gap:8px;background:var(--playpilot-light);padding:8px;margin:2px;border-radius:.5rem;font-size:12px;line-height:1.5;z-index:1;color:var(--playpilot-text-color-alt);overflow:hidden}.message.svelte-1kpafo0{display:flex;margin-top:4px;font-style:italic}.icon.svelte-1kpafo0{color:var(--playpilot-green)}.border.svelte-1kpafo0{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.5rem;background:var(--playpilot-green);overflow:hidden;transition:background-color .5s}.running.svelte-1kpafo0 .border:where(.svelte-1kpafo0){background:var(--playpilot-light)}@keyframes svelte-1kpafo0-rotate{to{rotate:360deg}}.animator.svelte-1kpafo0{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-1kpafo0-rotate 2s infinite linear;filter:blur(5rem)}.loading-bar.svelte-1kpafo0{display:grid;grid-template-columns:auto 3em;align-items:center}.loading-bar-progress.svelte-1kpafo0{height:.5em;border-radius:.25rem;background:var(--playpilot-dark)}.loading-bar-fill.svelte-1kpafo0{height:100%;border-radius:.25rem;background:var(--playpilot-green);transition:width .2s}.loading-bar-label.svelte-1kpafo0{text-align:right}@keyframes svelte-1kpafo0-fade{0%,to{opacity:0}25%,75%{opacity:1}}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0){animation:svelte-1kpafo0-fade 2s infinite}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(1){animation-delay:.2s}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(2){animation-delay:.4s}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(3){animation-delay:.6s}.dismiss.svelte-1kpafo0{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-top:4px;padding:4px;border:2px solid var(--playpilot-content-light);border-radius:4px;background:var(--playpilot-light);font-family:inherit;color:var(--playpilot-text-color-alt);font-size:12px;line-height:1;cursor:pointer}.dismiss.svelte-1kpafo0:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.editor.svelte-1ybwhez{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(70vh,640px);min-height:min(25rem,80vh);margin:0;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.editor.svelte-1ybwhez svg{fill:none}.panel-open.svelte-1ybwhez{overflow:hidden}.loading.svelte-1ybwhez{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handles.svelte-1ybwhez,.header.svelte-1ybwhez{z-index:20;position:sticky;top:-16px;margin:-16px -16px 0}.handle.svelte-1ybwhez{opacity:0;transition:opacity .15s}.editor.svelte-1ybwhez:hover .handle:where(.svelte-1ybwhez){opacity:1}.header.svelte-1ybwhez{z-index:5;display:flex;align-items:center;padding:16px 16px 16px 24px;margin:0 -16px;border:0;background:var(--playpilot-dark)}.loading.svelte-1ybwhez .header:where(.svelte-1ybwhez){margin:-16px}.heading.svelte-1ybwhez{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.bubble.svelte-1ybwhez{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;border:0;padding:0;margin-right:auto;border-radius:50%;background:var(--playpilot-green);line-height:24px;text-align:center;font-size:13.6px}.items.svelte-1ybwhez{padding-top:8px;margin-bottom:auto}.empty.svelte-1ybwhez{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1ybwhez{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);font-size:13.6px;cursor:pointer}.save.svelte-1ybwhez:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1ybwhez{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1ybwhez{margin-top:8px}.alert.svelte-1ybwhez{margin:0 8px 8px}.panel.svelte-1ybwhez{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}.trigger.svelte-qee95d{position:fixed;bottom:16px;right:16px}.button.svelte-qee95d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;border:0;padding:12px;border-radius:50%;background:var(--playpilot-light);box-shadow:var(--playpilot-shadow-large);transition:transform 50ms;line-height:24px;text-align:center;font-size:13.6px}.button.svelte-qee95d:hover{filter:brightness(1.1);transform:scale(1.05)}.button.svelte-qee95d svg{width:100%}.close.svelte-qee95d{display:flex;text-align:center;justify-content:center;position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:4px;background:var(--playpilot-content);color:#fff}.close.svelte-qee95d svg{width:12px}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533;--playpilot-warning: #f7c74e;--playpilot-warning-dark: #413c23}[data-playpilot-injection-key]{position:relative}.playpilot-injection-highlight{outline:4px solid var(--playpilot-primary)!important;outline-offset:8px!important;border-radius:.8px;scroll-margin:80px}.playpilot-styled-scrollbar{scrollbar-color:var(--playpilot-content-light) var(--playpilot-lighter);scrollbar-width:thin}.playpilot-styled-scrollbed::-webkit-scrollbar{width:12px}.playpilot-styled-scrollbed::-webkit-scrollbar-track{background:var(--playpilot-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb{border:2px solid var(--playpilot-light);border-radius:16px;background:var(--playpilot-lighter)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:hover{background:var(--playpilot-content-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:active{background:var(--playpilot-text-color-alt)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight]{font-weight:var(--playpilot-injection-font-weight)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color]{color:var(--playpilot-injection-text-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color-hover]:hover{color:var(--playpilot-injection-text-color-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration]{text-decoration:var(--playpilot-injection-text-decoration)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration-hover]:hover{text-decoration:var(--playpilot-injection-text-decoration-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color]{background-color:var(--playpilot-injection-background-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color-hover]:hover{background-color:var(--playpilot-injection-background-color-hover)}.playpilot-link-injections.svelte-4l9ehd *{box-sizing:border-box}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
3
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const kn=!1;var Ln=Array.isArray,Pr=Array.prototype.indexOf,Mn=Array.from,jr=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,yi=Object.getOwnPropertyDescriptors,Nr=Object.prototype,Lr=Array.prototype,Dn=Object.getPrototypeOf;function _t(e){return typeof e=="function"}const Le=()=>{};function Mr(e){for(var t=0;t<e.length;t++)e[t]()}function $t(e,t,n=!1){return e===void 0?n?t():t:e}const Me=2,wi=4,Mt=8,Qt=16,Re=32,Dt=64,bn=128,st=256,Zt=512,Se=1024,nt=2048,en=4096,Fe=8192,wt=16384,ki=32768,kt=65536,Dr=1<<17,Or=1<<19,bi=1<<20,et=Symbol("$state"),xi=Symbol("legacy props"),Rr=Symbol("");function Si(e){return e===this.v}function tn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Hr(e,t){return e!==t}function On(e){return!tn(e,this.v)}function Fr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function qr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Br(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Vr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ur(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function zr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Wr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Kr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Yr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let bt=!1,$r=!1;function Zr(){bt=!0}const Rn=1,Hn=2,Ei=4,Gr=8,Jr=16,Xr=1,Qr=2,ea=4,ta=8,na=16,ia=1,ra=2,aa=4,oa=1,la=2,pe=Symbol(),Ti="http://www.w3.org/2000/svg";function be(e,t){var n={f:0,v:e,reactions:null,equals:Si,rv:0,wv:0};return n}function K(e){return sa(be(e))}function Ai(e,t=!1){var i;const n=be(e);return t||(n.equals=On),bt&&te!==null&&te.l!==null&&((i=te.l).s??(i.s=[])).push(n),n}function sa(e){return Q!==null&&Q.f&Me&&(qe===null?wa([e]):qe.push(e)),e}function P(e,t){return Q!==null&&Ft()&&Q.f&(Me|Qt)&&(qe===null||!qe.includes(e))&&Yr(),xn(e,t)}function xn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Wi(),Ii(e,nt),Ft()&&z!==null&&z.f&Se&&!(z.f&Re)&&(ge!==null&&ge.includes(e)?(Ue(z,nt),ln(z)):tt===null?ka([e]):tt.push(e))),t}function Ii(e,t){var n=e.reactions;if(n!==null)for(var i=Ft(),r=n.length,a=0;a<r;a++){var o=n[a],l=o.f;l&nt||!i&&o===z||(Ue(o,t),l&(Se|st)&&(l&Me?Ii(o,en):ln(o)))}}let Ci=!1;function G(e,t=null,n){if(typeof e!="object"||e===null||et in e)return e;const i=Dn(e);if(i!==Nr&&i!==Lr)return e;var r=new Map,a=Ln(e),o=be(0);a&&r.set("length",be(e.length));var l;return new Proxy(e,{defineProperty(d,u,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&zr();var s=r.get(u);return s===void 0?(s=be(v.value),r.set(u,s)):P(s,G(v.value,l)),!0},deleteProperty(d,u){var v=r.get(u);if(v===void 0)u in d&&r.set(u,be(pe));else{if(a&&typeof u=="string"){var s=r.get("length"),h=Number(u);Number.isInteger(h)&&h<s.v&&P(s,h)}P(v,pe),ei(o)}return!0},get(d,u,v){var m;if(u===et)return e;var s=r.get(u),h=u in d;if(s===void 0&&(!h||(m=Qe(d,u))!=null&&m.writable)&&(s=be(G(h?d[u]:pe,l)),r.set(u,s)),s!==void 0){var g=c(s);return g===pe?void 0:g}return Reflect.get(d,u,v)},getOwnPropertyDescriptor(d,u){var v=Reflect.getOwnPropertyDescriptor(d,u);if(v&&"value"in v){var s=r.get(u);s&&(v.value=c(s))}else if(v===void 0){var h=r.get(u),g=h==null?void 0:h.v;if(h!==void 0&&g!==pe)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return v},has(d,u){var g;if(u===et)return!0;var v=r.get(u),s=v!==void 0&&v.v!==pe||Reflect.has(d,u);if(v!==void 0||z!==null&&(!s||(g=Qe(d,u))!=null&&g.writable)){v===void 0&&(v=be(s?G(d[u],l):pe),r.set(u,v));var h=c(v);if(h===pe)return!1}return s},set(d,u,v,s){var S;var h=r.get(u),g=u in d;if(a&&u==="length")for(var m=v;m<h.v;m+=1){var f=r.get(m+"");f!==void 0?P(f,pe):m in d&&(f=be(pe),r.set(m+"",f))}h===void 0?(!g||(S=Qe(d,u))!=null&&S.writable)&&(h=be(void 0),P(h,G(v,l)),r.set(u,h)):(g=h.v!==pe,P(h,G(v,l)));var p=Reflect.getOwnPropertyDescriptor(d,u);if(p!=null&&p.set&&p.set.call(s,v),!g){if(a&&typeof u=="string"){var y=r.get("length"),w=Number(u);Number.isInteger(w)&&w>=y.v&&P(y,w+1)}ei(o)}return!0},ownKeys(d){c(o);var u=Reflect.ownKeys(d).filter(h=>{var g=r.get(h);return g===void 0||g.v!==pe});for(var[v,s]of r)s.v!==pe&&!(v in d)&&u.push(v);return u},setPrototypeOf(){Wr()}})}function ei(e,t=1){P(e,e.v+t)}var me,Pi,ji;function ca(){if(me===void 0){me=window;var e=Element.prototype,t=Node.prototype;Pi=Qe(t,"firstChild").get,ji=Qe(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Ot(e=""){return document.createTextNode(e)}function ot(e){return Pi.call(e)}function nn(e){return ji.call(e)}function b(e,t){return ot(e)}function ee(e,t){{var n=ot(e);return n instanceof Comment&&n.data===""?nn(n):n}}function T(e,t=1,n=!1){let i=e;for(;t--;)i=nn(i);return i}function ua(e){e.textContent=""}function U(e){var t=Me|nt;z===null?t|=st:z.f|=bi;var n=Q!==null&&Q.f&Me?Q:null;const i={children:null,ctx:te,deps:null,equals:Si,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??z};return n!==null&&(n.children??(n.children=[])).push(i),i}function da(e){const t=U(e);return t.equals=On,t}function Ni(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&Me?Fn(i):De(i)}}}function fa(e){for(var t=e.parent;t!==null;){if(!(t.f&Me))return t;t=t.parent}return null}function Li(e){var t,n=z;je(fa(e));try{Ni(e),t=Ki(e)}finally{je(n)}return t}function Mi(e){var t=Li(e),n=(at||e.f&st)&&e.deps!==null?en:Se;Ue(e,n),e.equals(t)||(e.v=t,e.wv=Wi())}function Fn(e){Ni(e),Pt(e,0),Ue(e,wt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function va(e){z===null&&Q===null&&Br(),Q!==null&&Q.f&st&&qr(),Vn&&Fr()}function _a(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function xt(e,t,n,i=!0){var r=(e&Dt)!==0,a=z,o={ctx:te,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|nt,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=ht;try{ti(!0),on(o),o.f|=ki}catch(v){throw De(o),v}finally{ti(l)}}else t!==null&&ln(o);var d=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&bi)===0;if(!d&&!r&&i&&(a!==null&&_a(o,a),Q!==null&&Q.f&Me)){var u=Q;(u.children??(u.children=[])).push(o)}return o}function ha(e){const t=xt(Mt,null,!1);return Ue(t,Se),t.teardown=e,t}function rn(e){va();var t=z!==null&&(z.f&Re)!==0&&te!==null&&!te.m;if(t){var n=te;(n.e??(n.e=[])).push({fn:e,effect:z,reaction:Q})}else{var i=Rt(e);return i}}function ga(e){const t=xt(Dt,e,!0);return(n={})=>new Promise(i=>{n.outro?mt(t,()=>{De(t),i(void 0)}):(De(t),i(void 0))})}function Rt(e){return xt(wi,e,!1)}function qn(e){return xt(Mt,e,!0)}function O(e){return ct(e)}function ct(e,t=0){return xt(Mt|Qt|t,e,!0)}function $e(e,t=!0){return xt(Mt|Re,e,!0,t)}function Di(e){var t=e.teardown;if(t!==null){const n=Vn,i=Q;ni(!0),Be(null);try{t.call(null)}finally{ni(n),Be(i)}}}function Oi(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)Fn(t[n])}}function Ri(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;De(n,t),n=i}}function ma(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Re||De(t),t=n}}function De(e,t=!0){var n=!1;if((t||e.f&Or)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:nn(i);i.remove(),i=a}n=!0}Ri(e,t&&!n),Oi(e),Pt(e,0),Ue(e,wt);var o=e.transitions;if(o!==null)for(const d of o)d.stop();Di(e);var l=e.parent;l!==null&&l.first!==null&&Hi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Hi(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function mt(e,t){var n=[];Bn(e,n,!0),Fi(n,()=>{De(e),t&&t()})}function Fi(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function Bn(e,t,n){if(!(e.f&Fe)){if(e.f^=Fe,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&kt)!==0||(i.f&Re)!==0;Bn(i,t,a?n:!1),i=r}}}function At(e){qi(e,!0)}function qi(e,t){if(e.f&Fe){qt(e)&&on(e),e.f^=Fe;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&kt)!==0||(n.f&Re)!==0;qi(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Gt=!1,Sn=[];function Bi(){Gt=!1;const e=Sn.slice();Sn=[],Mr(e)}function Ht(e){Gt||(Gt=!0,queueMicrotask(Bi)),Sn.push(e)}function pa(){Gt&&Bi()}function Vi(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const Ui=0,ya=1;let Wt=!1,Kt=Ui,It=!1,Ct=null,ht=!1,Vn=!1;function ti(e){ht=e}function ni(e){Vn=e}let rt=[],gt=0;let Q=null;function Be(e){Q=e}let z=null;function je(e){z=e}let qe=null;function wa(e){qe=e}let ge=null,ke=0,tt=null;function ka(e){tt=e}let zi=1,En=0,at=!1,te=null;function Wi(){return++zi}function Ft(){return!bt||te!==null&&te.l===null}function qt(e){var u;var t=e.f;if(t&nt)return!0;if(t&en){var n=e.deps,i=(t&st)!==0;if(n!==null){var r,a,o=(t&Zt)!==0,l=i&&z!==null&&!at,d=n.length;if(o||l){for(r=0;r<d;r++)a=n[r],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Zt)}for(r=0;r<d;r++)if(a=n[r],qt(a)&&Mi(a),a.wv>e.wv)return!0}(!i||z!==null&&!at)&&Ue(e,Se)}return!1}function ba(e,t){for(var n=t;n!==null;){if(n.f&bn)try{n.fn(e);return}catch{n.f^=bn}n=n.parent}throw Wt=!1,e}function xa(e){return(e.f&wt)===0&&(e.parent===null||(e.parent.f&bn)===0)}function an(e,t,n,i){if(Wt){if(n===null&&(Wt=!1),xa(t))throw e;return}n!==null&&(Wt=!0);{ba(e,t);return}}function Ki(e){var h;var t=ge,n=ke,i=tt,r=Q,a=at,o=qe,l=te,d=e.f;ge=null,ke=0,tt=null,Q=d&(Re|Dt)?null:e,at=!ht&&(d&st)!==0,qe=null,te=e.ctx,En++;try{var u=(0,e.fn)(),v=e.deps;if(ge!==null){var s;if(Pt(e,ke),v!==null&&ke>0)for(v.length=ke+ge.length,s=0;s<ge.length;s++)v[ke+s]=ge[s];else e.deps=v=ge;if(!at)for(s=ke;s<v.length;s++)((h=v[s]).reactions??(h.reactions=[])).push(e)}else v!==null&&ke<v.length&&(Pt(e,ke),v.length=ke);return u}finally{ge=t,ke=n,tt=i,Q=r,at=a,qe=o,te=l}}function Sa(e,t){let n=t.reactions;if(n!==null){var i=Pr.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&Me&&(ge===null||!ge.includes(t))&&(Ue(t,en),t.f&(st|Zt)||(t.f^=Zt),Pt(t,0))}function Pt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)Sa(e,n[i])}function on(e){var t=e.f;if(!(t&wt)){Ue(e,Se);var n=z,i=te;z=e;try{t&Qt?ma(e):Ri(e),Oi(e),Di(e);var r=Ki(e);e.teardown=typeof r=="function"?r:null,e.wv=zi;var a=e.deps,o;kn&&$r&&e.f&nt}catch(l){an(l,e,n,i||e.ctx)}finally{z=n}}}function Yi(){if(gt>1e3){gt=0;try{Vr()}catch(e){if(Ct!==null)an(e,Ct,null);else throw e}}gt++}function $i(e){var t=e.length;if(t!==0){Yi();var n=ht;ht=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&Se||(r.f^=Se);var a=[];Zi(r,a),Ea(a)}}finally{ht=n}}}function Ea(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(wt|Fe)))try{qt(i)&&(on(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Hi(i):i.fn=null))}catch(r){an(r,i,null,i.ctx)}}}function Ta(){if(It=!1,gt>1001)return;const e=rt;rt=[],$i(e),It||(gt=0,Ct=null)}function ln(e){Kt===Ui&&(It||(It=!0,queueMicrotask(Ta))),Ct=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Dt|Re)){if(!(n&Se))return;t.f^=Se}}rt.push(t)}function Zi(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&Re)!==0,o=a&&(r&Se)!==0,l=n.next;if(!o&&!(r&Fe))if(r&Mt){if(a)n.f^=Se;else try{qt(n)&&on(n)}catch(s){an(s,n,null,n.ctx)}var d=n.first;if(d!==null){n=d;continue}}else r&wi&&i.push(n);if(l===null){let s=n.parent;for(;s!==null;){if(e===s)break e;var u=s.next;if(u!==null){n=u;continue e}s=s.parent}}n=l}for(var v=0;v<i.length;v++)d=i[v],t.push(d),Zi(d,t)}function Gi(e){var t=Kt,n=rt;try{Yi();const r=[];Kt=ya,rt=r,It=!1,$i(n);var i=e==null?void 0:e();return pa(),(rt.length>0||r.length>0)&&Gi(),gt=0,Ct=null,i}finally{Kt=t,rt=n}}async function ii(){await Promise.resolve(),Gi()}function c(e){var v;var t=e.f,n=(t&Me)!==0;if(n&&t&wt){var i=Li(e);return Fn(e),i}if(Q!==null){qe!==null&&qe.includes(e)&&Kr();var r=Q.deps;e.rv<En&&(e.rv=En,ge===null&&r!==null&&r[ke]===e?ke++:ge===null?ge=[e]:ge.push(e),tt!==null&&z!==null&&z.f&Se&&!(z.f&Re)&&tt.includes(e)&&(Ue(z,nt),ln(z)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Me){var d=o;l=d,o=d.parent}else{var u=o;(v=u.deriveds)!=null&&v.includes(l)||(u.deriveds??(u.deriveds=[])).push(l);break}return n&&(a=e,qt(a)&&Mi(a)),e.v}function Ve(e){const t=Q;try{return Q=null,e()}finally{Q=t}}const Aa=-7169;function Ue(e,t){e.f=e.f&Aa|t}function Ia(e){return Xi().get(e)}function Ji(e,t){return Xi().set(e,t),t}function Xi(e){return te===null&&Vi(),te.c??(te.c=new Map(Ca(te)||void 0))}function Ca(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function re(e,t=!1,n){te={p:te,c:null,e:null,m:!1,s:e,x:null,l:null},bt&&!t&&(te.l={s:null,u:null,r1:[],r2:be(!1)})}function ae(e){const t=te;if(t!==null){const o=t.e;if(o!==null){var n=z,i=Q;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];je(a.effect),Be(a.reaction),Rt(a.fn)}}finally{je(n),Be(i)}}te=t.p,t.m=!0}return{}}function Pa(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(et in e)Tn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&et in n&&Tn(n)}}}function Tn(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Tn(e[i],t)}catch{}const n=Dn(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=yi(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function ja(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Na=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function La(e){return Na.includes(e)}const Ma={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Da(e){return e=e.toLowerCase(),Ma[e]??e}const Oa=["touchstart","touchmove"];function Ra(e){return Oa.includes(e)}function Ha(e,t){if(t){const n=document.body;e.autofocus=!0,Ht(()=>{document.activeElement===n&&e.focus()})}}let ri=!1;function Fa(){ri||(ri=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function Qi(e){var t=Q,n=z;Be(null),je(null);try{return e()}finally{Be(t),je(n)}}function qa(e,t,n,i=n){e.addEventListener(t,()=>Qi(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),Fa()}const er=new Set,An=new Set;function tr(e,t,n,i){function r(a){if(i.capture||Tt.call(t,a),!a.cancelBubble)return Qi(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ht(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function ie(e,t,n,i,r){var a={capture:i,passive:r},o=tr(e,t,n,a);(t===document.body||t===window||t===document)&&ha(()=>{t.removeEventListener(e,o,a)})}function ve(e){for(var t=0;t<e.length;t++)er.add(e[t]);for(var n of An)n(e)}function Tt(e){var w;var t=this,n=t.ownerDocument,i=e.type,r=((w=e.composedPath)==null?void 0:w.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var d=r.indexOf(l);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var u=r.indexOf(t);if(u===-1)return;d<=u&&(o=d)}if(a=r[o]||e.target,a!==t){jr(e,"currentTarget",{configurable:!0,get(){return a||n}});var v=Q,s=z;Be(null),je(null);try{for(var h,g=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var f=a["__"+i];if(f!==void 0&&!a.disabled)if(Ln(f)){var[p,...y]=f;p.apply(a,[e,...y])}else f.call(a,e)}catch(S){h?g.push(S):h=S}if(e.cancelBubble||m===t||m===null)break;a=m}if(h){for(let S of g)queueMicrotask(()=>{throw S});throw h}}finally{e.__root=t,delete e.currentTarget,Be(v),je(s)}}}function Un(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function lt(e,t){var n=z;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&oa)!==0,i=(t&la)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=Un(a?e:"<!>"+e),n||(r=ot(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=ot(o),d=o.lastChild;lt(l,d)}else lt(o,o);return o}}function Ee(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Un(r),l=ot(o);a=ot(l)}var d=a.cloneNode(!0);return lt(d,d),d}}function Oe(e=""){{var t=Ot(e+"");return lt(t,t),t}}function Ze(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Ot();return e.append(t,n),lt(t,n),e}function k(e,t){e!==null&&e.before(t)}let Jt=!0;function ai(e){Jt=e}function Y(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function zn(e,t){return Ba(e,t)}const ft=new Map;function Ba(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){ca();var l=new Set,d=s=>{for(var h=0;h<s.length;h++){var g=s[h];if(!l.has(g)){l.add(g);var m=Ra(g);t.addEventListener(g,Tt,{passive:m});var f=ft.get(g);f===void 0?(document.addEventListener(g,Tt,{passive:m}),ft.set(g,1)):ft.set(g,f+1)}}};d(Mn(er)),An.add(d);var u=void 0,v=ga(()=>{var s=n??t.appendChild(Ot());return $e(()=>{if(a){re({});var h=te;h.c=a}r&&(i.$$events=r),Jt=o,u=e(s,i)||{},Jt=!0,a&&ae()}),()=>{var m;for(var h of l){t.removeEventListener(h,Tt);var g=ft.get(h);--g===0?(document.removeEventListener(h,Tt),ft.delete(h)):ft.set(h,g)}An.delete(d),s!==n&&((m=s.parentNode)==null||m.removeChild(s))}});return In.set(u,v),u}let In=new WeakMap;function nr(e,t){const n=In.get(e);return n?(In.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var i=e,r=null,a=null,o=pe,l=n?kt:0,d=!1;const u=(s,h=!0)=>{d=!0,v(h,s)},v=(s,h)=>{o!==(o=s)&&(o?(r?At(r):h&&(r=$e(()=>h(i))),a&&mt(a,()=>{a=null})):(a?At(a):h&&(a=$e(()=>h(i))),r&&mt(r,()=>{r=null})))};ct(()=>{d=!1,t(u),d||v(null,null)},l)}function ir(e,t,n){var i=e,r=pe,a,o=Ft()?Hr:tn;ct(()=>{o(r,r=t())&&(a&&mt(a),a=$e(()=>n(i)))})}function pt(e,t){return t}function Va(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)Bn(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var d=n.parentNode;ua(d),d.append(n),i.clear(),Xe(e,t[0].prev,t[a-1].next)}Fi(r,()=>{for(var u=0;u<a;u++){var v=t[u];l||(i.delete(v.k),Xe(e,v.prev,v.next)),De(v.e,!l)}})}function it(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},d=(t&Ei)!==0;if(d){var u=e;o=u.appendChild(Ot())}var v=null,s=!1;ct(()=>{var h=n(),g=Ln(h)?h:h==null?[]:Mn(h),m=g.length;if(!(s&&m===0)){s=m===0;{var f=Q;Ua(g,l,o,r,t,(f.f&Fe)!==0,i)}a!==null&&(m===0?v?At(v):v=$e(()=>a(o)):v!==null&&mt(v,()=>{v=null})),n()}})}function Ua(e,t,n,i,r,a,o,l){var N,W,X,le;var d=(r&Gr)!==0,u=(r&(Rn|Hn))!==0,v=e.length,s=t.items,h=t.first,g=h,m,f=null,p,y=[],w=[],S,j,x,A;if(d)for(A=0;A<v;A+=1)S=e[A],j=o(S,A),x=s.get(j),x!==void 0&&((N=x.a)==null||N.measure(),(p??(p=new Set)).add(x));for(A=0;A<v;A+=1){if(S=e[A],j=o(S,A),x=s.get(j),x===void 0){var C=g?g.e.nodes_start:n;f=Wa(C,t,f,f===null?t.first:f.next,S,j,A,i,r),s.set(j,f),y=[],w=[],g=f.next;continue}if(u&&za(x,S,A,r),x.e.f&Fe&&(At(x.e),d&&((W=x.a)==null||W.unfix(),(p??(p=new Set)).delete(x))),x!==g){if(m!==void 0&&m.has(x)){if(y.length<w.length){var E=w[0],L;f=E.prev;var B=y[0],$=y[y.length-1];for(L=0;L<y.length;L+=1)oi(y[L],E,n);for(L=0;L<w.length;L+=1)m.delete(w[L]);Xe(t,B.prev,$.next),Xe(t,f,B),Xe(t,$,E),g=E,f=$,A-=1,y=[],w=[]}else m.delete(x),oi(x,g,n),Xe(t,x.prev,x.next),Xe(t,x,f===null?t.first:f.next),Xe(t,f,x),f=x;continue}for(y=[],w=[];g!==null&&g.k!==j;)(a||!(g.e.f&Fe))&&(m??(m=new Set)).add(g),w.push(g),g=g.next;if(g===null)continue;x=g}y.push(x),f=x,g=x.next}if(g!==null||m!==void 0){for(var M=m===void 0?[]:Mn(m);g!==null;)(a||!(g.e.f&Fe))&&M.push(g),g=g.next;var F=M.length;if(F>0){var V=r&Ei&&v===0?n:null;if(d){for(A=0;A<F;A+=1)(X=M[A].a)==null||X.measure();for(A=0;A<F;A+=1)(le=M[A].a)==null||le.fix()}Va(t,M,V,s)}}d&&Ht(()=>{var ce;if(p!==void 0)for(x of p)(ce=x.a)==null||ce.apply()}),z.first=t.first&&t.first.e,z.last=f&&f.e}function za(e,t,n,i){i&Rn&&xn(e.v,t),i&Hn?xn(e.i,n):e.i=n}function Wa(e,t,n,i,r,a,o,l,d,u){var v=(d&Rn)!==0,s=(d&Jr)===0,h=v?s?Ai(r):be(r):r,g=d&Hn?be(o):o,m={i:g,v:h,k:a,a:null,e:null,prev:n,next:i};try{return m.e=$e(()=>l(e,h,g),Ci),m.e.prev=n&&n.e,m.e.next=i&&i.e,n===null?t.first=m:(n.next=m,n.e.next=m.e),i!==null&&(i.prev=m,i.e.prev=m.e),m}finally{}}function oi(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=nn(a);r.before(a),a=o}}function Xe(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function Ka(e,t,n,i,r){var a=e,o="",l;ct(()=>{o!==(o=t()??"")&&(l!==void 0&&(De(l),l=void 0),o!==""&&(l=$e(()=>{var d=o+"",u=Un(d);lt(ot(u),u.lastChild),a.before(u)})))})}function St(e,t,...n){var i=e,r=Le,a;ct(()=>{r!==(r=t())&&(a&&(De(a),a=null),a=$e(()=>r(i,...n)))},kt)}function Ya(e,t,n,i,r,a){var o,l,d=null,u=e,v;ct(()=>{const s=t()||null;var h=s==="svg"?Ti:null;s!==o&&(v&&(s===null?mt(v,()=>{v=null,l=null}):s===l?At(v):(De(v),ai(!1))),s&&s!==l&&(v=$e(()=>{d=h?document.createElementNS(h,s):document.createElement(s),lt(d,d);{var g=d.appendChild(Ot());i(d,g)}z.nodes_end=d,u.before(d)})),o=s,o&&(l=o),ai(!0))},kt)}function sn(e,t,n){Rt(()=>{var i=Ve(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};qn(()=>{var o=n();Pa(o),r&&tn(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function rr(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=rr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function $a(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=rr(e))&&(i&&(i+=" "),i+=t);return i}function Za(e){return typeof e=="object"?$a(e):e??""}function Ga(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ne(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Rr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ar(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ja(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},d=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=Za(n.class)),n.class=n.class?n.class+" "+i:i;var v=ar(e),s=e.__attributes??(e.__attributes={});for(const w in n){let S=n[w];if(d&&w==="value"&&S==null){e.value=e.__value="",l[w]=S;continue}var h=l[w];if(S!==h){l[w]=S;var g=w[0]+w[1];if(g!=="$$"){if(g==="on"){const j={},x="$$"+w;let A=w.slice(2);var m=La(A);if(ja(A)&&(A=A.slice(0,-7),j.capture=!0),!m&&h){if(S!=null)continue;e.removeEventListener(A,l[x],j),l[x]=null}if(S!=null)if(m)e[`__${A}`]=S,ve([A]);else{let C=function(E){l[w].call(this,E)};var y=C;l[x]=tr(A,e,C,j)}else m&&(e[`__${A}`]=void 0)}else if(w==="style"&&S!=null)e.style.cssText=S+"";else if(w==="autofocus")Ha(e,!!S);else if(w==="__value"||w==="value"&&S!=null)e.value=e[w]=e.__value=S;else if(w==="selected"&&d)Ga(e,S);else{var f=w;r||(f=Da(f));var p=f==="defaultValue"||f==="defaultChecked";if(S==null&&!a&&!p)if(s[w]=null,f==="value"||f==="checked"){let j=e;if(f==="value"){let x=j.defaultValue;j.removeAttribute(f),j.defaultValue=x}else{let x=j.defaultChecked;j.removeAttribute(f),j.defaultChecked=x}}else e.removeAttribute(w);else p||v.includes(f)&&(a||typeof S!="string")?e[f]=S:typeof S!="function"&&ne(e,f,S)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var li=new Map;function ar(e){var t=li.get(e.nodeName);if(t)return t;li.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=yi(i);for(var a in n)n[a].set&&t.push(a);i=Dn(i)}return t}function Xa(e,t,n){var i=e.__className,r=Qa(t);(i!==r||Ci)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Qa(e,t){return(e??"")+""}function se(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function cn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const eo=()=>performance.now(),Ke={tick:e=>requestAnimationFrame(e),now:()=>eo(),tasks:new Set};function or(){const e=Ke.now();Ke.tasks.forEach(t=>{t.c(e)||(Ke.tasks.delete(t),t.f())}),Ke.tasks.size!==0&&Ke.tick(or)}function to(e){let t;return Ke.tasks.size===0&&Ke.tick(or),{promise:new Promise(n=>{Ke.tasks.add(t={c:e,f:n})}),abort(){Ke.tasks.delete(t)}}}function Ut(e,t){e.dispatchEvent(new CustomEvent(t))}function no(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function si(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=no(r.trim());t[o]=a.trim()}return t}const io=e=>e;function Ie(e,t,n,i){var r=(e&ia)!==0,a=(e&ra)!==0,o=r&&a,l=(e&aa)!==0,d=o?"both":r?"in":"out",u,v=t.inert,s,h;function g(){var w=Q,S=z;Be(null),je(null);try{return u??(u=n()(t,(i==null?void 0:i())??{},{direction:d}))}finally{Be(w),je(S)}}var m={is_global:l,in(){var w;if(t.inert=v,!r){h==null||h.abort(),(w=h==null?void 0:h.reset)==null||w.call(h);return}a||s==null||s.abort(),Ut(t,"introstart"),s=Cn(t,g(),h,1,()=>{Ut(t,"introend"),s==null||s.abort(),s=u=void 0})},out(w){if(!a){w==null||w(),u=void 0;return}t.inert=!0,Ut(t,"outrostart"),h=Cn(t,g(),s,0,()=>{Ut(t,"outroend"),w==null||w()})},stop:()=>{s==null||s.abort(),h==null||h.abort()}},f=z;if((f.transitions??(f.transitions=[])).push(m),r&&Jt){var p=l;if(!p){for(var y=f.parent;y&&y.f&kt;)for(;(y=y.parent)&&!(y.f&Qt););p=!y||(y.f&ki)!==0}p&&Rt(()=>{Ve(()=>m.in())})}}function Cn(e,t,n,i,r){var a=i===1;if(_t(t)){var o,l=!1;return Ht(()=>{if(!l){var p=t({direction:a?"in":"out"});o=Cn(e,p,n,i,r)}}),{abort:()=>{l=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:Le,deactivate:Le,reset:Le,t:()=>i};const{delay:d=0,css:u,tick:v,easing:s=io}=t;var h=[];if(a&&n===void 0&&(v&&v(0,1),u)){var g=si(u(0,1));h.push(g,g)}var m=()=>1-i,f=e.animate(h,{duration:d});return f.onfinish=()=>{var p=(n==null?void 0:n.t())??1-i;n==null||n.abort();var y=i-p,w=t.duration*Math.abs(y),S=[];if(w>0){if(u)for(var j=Math.ceil(w/16.666666666666668),x=0;x<=j;x+=1){var A=p+y*s(x/j),C=u(A,1-A);S.push(si(C))}m=()=>{var E=f.currentTime;return p+y*s(E/w)},v&&to(()=>{if(f.playState!=="running")return!1;var E=m();return v(E,1-E),!0})}f=e.animate(S,{duration:w,fill:"forwards"}),f.onfinish=()=>{m=()=>i,v==null||v(i,1-i),r()}},{abort:()=>{f&&(f.cancel(),f.effect=null,f.onfinish=Le)},deactivate:()=>{r=Le},reset:()=>{i===0&&(v==null||v(1,0))},t:()=>m()}}function ro(e,t,n=t){var i=Ft();qa(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=pn(e)?yn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),Ve(t)==null&&e.value&&n(pn(e)?yn(e.value):e.value),qn(()=>{var r=t();pn(e)&&r===yn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function pn(e){var t=e.type;return t==="number"||t==="range"}function yn(e){return e===""?null:+e}function ci(e,t){return e===t||(e==null?void 0:e[et])===t}function Bt(e={},t,n,i){return Rt(()=>{var r,a;return qn(()=>{r=a,a=[],Ve(()=>{e!==n(...a)&&(t(e,...a),r&&ci(n(...r),e)&&t(null,...r))})}),()=>{Ht(()=>{a&&ci(n(...a),e)&&t(null,...a)})}}),e}function ao(e,t,n){if(e==null)return t(void 0),Le;const i=Ve(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}let zt=!1;function oo(e){var t=zt;try{return zt=!1,[e(),zt]}finally{zt=t}}const lo={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function so(e,t,n){return new Proxy({props:e,exclude:t},lo)}const co={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];_t(r)&&(r=r());const a=Qe(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=Qe(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===et||t===xi)return!1;for(let n of e.props)if(_t(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){_t(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function uo(...e){return new Proxy({props:e},co)}function ui(e){for(var t=z,n=z;t!==null&&!(t.f&(Re|Dt));)t=t.parent;try{return je(t),e()}finally{je(n)}}function R(e,t,n,i){var C;var r=(n&Xr)!==0,a=!bt||(n&Qr)!==0,o=(n&ta)!==0,l=(n&na)!==0,d=!1,u;o?[u,d]=oo(()=>e[t]):u=e[t];var v=et in e||xi in e,s=o&&(((C=Qe(e,t))==null?void 0:C.set)??(v&&t in e&&(E=>e[t]=E)))||void 0,h=i,g=!0,m=!1,f=()=>(m=!0,g&&(g=!1,l?h=Ve(i):h=i),h);u===void 0&&i!==void 0&&(s&&a&&Ur(),u=f(),s&&s(u));var p;if(a)p=()=>{var E=e[t];return E===void 0?f():(g=!0,m=!1,E)};else{var y=ui(()=>(r?U:da)(()=>e[t]));y.f|=Dr,p=()=>{var E=c(y);return E!==void 0&&(h=void 0),E===void 0?h:E}}if(!(n&ea))return p;if(s){var w=e.$$legacy;return function(E,L){return arguments.length>0?((!a||!L||w||d)&&s(L?p():E),E):p()}}var S=!1,j=!1,x=Ai(u),A=ui(()=>U(()=>{var E=p(),L=c(x);return S?(S=!1,j=!0,L):(j=!1,x.v=E)}));return r||(A.equals=On),function(E,L){if(arguments.length>0){const B=L?c(A):a&&o?G(E):E;return A.equals(B)||(S=!0,P(x,B),m&&h!==void 0&&(h=B),Ve(()=>c(A))),E}return c(A)}}function ut(e){te===null&&Vi(),bt&&te.l!==null?fo(te).m.push(e):rn(()=>{const t=Ve(e);if(typeof t=="function")return t})}function fo(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const vo="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(vo);const lr="https://www.playpilot.com",un="https://partner-api.playpilot.tech/1.0.0",sr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",xe=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed"}),vt=[];function cr(e,t=Le){let n=null;const i=new Set;function r(l){if(tn(e,l)&&(e=l,n)){const d=!vt.length;for(const u of i)u[1](),vt.push(u,e);if(d){for(let u=0;u<vt.length;u+=2)vt[u][0](vt[u+1]);vt.length=0}}}function a(l){r(l(e))}function o(l,d=Le){const u=[l,d];return i.add(u),i.size===1&&(n=t(r,a)||Le),l(e),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:a,subscribe:o}}function di(e){let t;return ao(e,n=>t=n)(),t}const ur=cr(null),dr=cr(null),_o="https://insights.playpilot.net";async function Ce(e,t=null,n={}){const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,n.organization_sid=di(ur),n.domain_sid=di(dr),fetch(_o,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}function ho({organizationSid:e=null,domainSid:t=null}){ur.set(e||null),dr.set(t||null)}const Wn="EncryptedToken",fr="articleReplacementEditToken",vr="playpilot-editorial-mode";async function _r(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=_n();if(!n)throw new Error("No token was provided");const i=Kn(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(un+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return go(i),!0}catch(n){console.error(n),Ce(xe.AuthFailed)}finally{yo()}return!1}function Kn(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(fr);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${Wn}=`).pop())==null?void 0:r.split(";")[0])||""}function go(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=Wn+"="+e+";"+i+";path=/"}function mo(){document.cookie=Wn+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function hr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(vr)==="true"||!!e}function po(){const e=new URL(window.location.href);e.searchParams.set(vr,"true"),window.history.replaceState({},"",e)}function yo(){const e=new URL(window.location.href);e.searchParams.delete(fr),window.history.replaceState({},"",e)}function gr(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),wo={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function ye(e,t=mr()){var n;return((n=wo[e])==null?void 0:n[t])||e}function mr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");return n&&t.includes(n)?n:_.English}const ko=e=>e;function Yn(e){const t=e-1;return t*t*t+1}function fi(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function $n(e,{delay:t=0,duration:n=400,easing:i=ko}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function dn(e,{delay:t=0,duration:n=400,easing:i=Yn,x:r=0,y:a=0,opacity:o=0}={}){const l=getComputedStyle(e),d=+l.opacity,u=l.transform==="none"?"":l.transform,v=d*(1-o),[s,h]=fi(r),[g,m]=fi(a);return{delay:t,duration:n,easing:i,css:(f,p)=>`
|
|
4
|
+
transform: ${u} translate(${(1-f)*s}${h}, ${(1-f)*g}${m});
|
|
5
|
+
opacity: ${d-v*p}`}}function jt(e,{delay:t=0,duration:n=400,easing:i=Yn,axis:r="y"}={}){const a=getComputedStyle(e),o=+a.opacity,l=r==="y"?"height":"width",d=parseFloat(a[l]),u=r==="y"?["top","bottom"]:["left","right"],v=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),s=parseFloat(a[`padding${v[0]}`]),h=parseFloat(a[`padding${v[1]}`]),g=parseFloat(a[`margin${v[0]}`]),m=parseFloat(a[`margin${v[1]}`]),f=parseFloat(a[`border${v[0]}Width`]),p=parseFloat(a[`border${v[1]}Width`]);return{delay:t,duration:n,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${l}: ${y*d}px;padding-${u[0]}: ${y*s}px;padding-${u[1]}: ${y*h}px;margin-${u[0]}: ${y*g}px;margin-${u[1]}: ${y*m}px;border-${u[0]}-width: ${y*f}px;border-${u[1]}-width: ${y*p}px;min-${l}: 0`}}function bo(e,{delay:t=0,duration:n=400,easing:i=Yn,start:r=0,opacity:a=0}={}){const o=getComputedStyle(e),l=+o.opacity,d=o.transform==="none"?"":o.transform,u=1-r,v=l*(1-a);return{delay:t,duration:n,easing:i,css:(s,h)=>`
|
|
6
|
+
transform: ${d} scale(${1-u*h});
|
|
7
|
+
opacity: ${l-v*h}
|
|
8
|
+
`}}var xo=I('<div class="popover svelte-qkpa3e" tabindex="-1" aria-hidden="true"><div class="dialog svelte-qkpa3e"><!></div></div>');function So(e,t){re(t,!0);let n=R(t,"maxHeight",15);Ji("scope","popover");let i=K(null),r=K(!1);ut(async()=>{await ii(),a(),await ii(),o()});function a(){if(!c(i))return;const{top:s,right:h,bottom:g,height:m}=c(i).getBoundingClientRect(),f=l();P(r,G(s-f<0&&window.innerHeight-g>s+m));const p=window.innerWidth-h-f;h+f>window.innerWidth&&(c(i).style.left=`${p}px`)}function o(){if(!c(i))return;const{top:s,height:h}=c(i).getBoundingClientRect(),g=l(),m=c(r)?window.innerHeight-s-g:s+h-g;n(Math.min(m,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var d=xo(),u=b(d),v=b(u);St(v,()=>t.children),Bt(d,s=>P(i,s),()=>c(i)),O(()=>{se(d,"flip",c(r)),cn(d,"--max-height",n()?n()+"px":null)}),Ie(3,u,()=>dn,()=>({duration:100,y:10})),k(e,d),ae()}const Eo=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}];var To=I('<div class="genre svelte-13nhocm"> </div>'),Ao=(e,t)=>P(t,!0),Io=I('<button class="genre expand svelte-13nhocm"> </button>'),Co=I("<!> <!>",1);function Po(e,t){re(t,!0);let n=K(!1);const i=U(()=>c(n)?t.genres:[t.genres[0]]);var r=Co(),a=ee(r);it(a,17,()=>c(i),pt,(d,u)=>{var v=Ze();const s=U(()=>{var m;return(m=Eo.find(f=>f.slug===c(u)))==null?void 0:m.name});var h=ee(v);{var g=m=>{var f=To(),p=b(f);O(()=>Y(p,ye(c(s)))),k(m,f)};H(h,m=>{c(s)&&m(g)})}k(d,v)});var o=T(a,2);{var l=d=>{var u=Io();u.__click=[Ao,n];var v=b(u);O(()=>Y(v,`+${t.genres.length-1}`)),k(d,u)};H(o,d=>{!c(n)&&t.genres.length>1&&d(l)})}k(e,r),ae()}ve(["click"]);function jo(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(l=>l.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function Pe(e,t=1){e.role="heading",e.ariaLevel=t.toString()}Zr();var No=Ee('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Lo(e){var t=No();k(e,t)}function Nt(e){return e?e.replace("/src/img",""):null}var Mo=(e,t,n)=>t(n()),Do=I('<div class="arrow svelte-1itidbd"><!></div>'),Oo=I('<a target="_blank" class="playlink svelte-1itidbd" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1itidbd"> <div><span class="name svelte-1itidbd"> </span> <div class="category svelte-1itidbd"> </div></div> <!></a>'),Ro=I('<div class="playlink empty svelte-1itidbd"> </div>'),Ho=I('<div class="heading svelte-1itidbd"> </div> <div class="playlinks svelte-1itidbd"><!> <!></div>',1);function Fo(e,t){re(t,!0);const n=R(t,"list",3,!1),i=Ia("scope")==="modal",r=U(()=>t.playlinks.filter(f=>!!f.logo_url)),a=U(()=>jo(c(r))),o={SVOD:ye("Stream"),BUY:ye("Buy"),RENT:ye("Rent"),TVOD:ye("Rent Or Buy")};function l(f){Ce(i?xe.TitleModalPlaylinkClick:xe.TitlePopoverPlaylinkClick,t.title,{playlink:f})}var d=Ho(),u=ee(d),v=b(u);O(()=>Y(v,ye("Where To Stream Online"))),sn(u,(f,p)=>Pe==null?void 0:Pe(f,p),()=>2);var s=T(u,2),h=b(s);it(h,17,()=>c(a),pt,(f,p)=>{let y=()=>c(p).name,w=()=>c(p).url,S=()=>c(p).logo_url,j=()=>c(p).extra_info.category;var x=Oo();x.__click=[Mo,l,y];var A=b(x);O(()=>ne(A,"src",Nt(S())));var C=T(A,2),E=b(C),L=b(E),B=T(E,2),$=b(B);O(()=>Y($,o[j()]||ye("Stream")));var M=T(C,2);{var F=V=>{var N=Do(),W=b(N);Lo(W),k(V,N)};H(M,V=>{n()&&V(F)})}O(()=>{ne(x,"href",w()),ne(x,"data-playlink",y()),Y(L,y())}),k(f,x)});var g=T(h,2);{var m=f=>{var p=Ro(),y=b(p);O(()=>Y(y,ye("Title Unavailable"))),k(f,p)};H(g,f=>{t.playlinks.length||f(m)})}O(()=>se(s,"list",n())),k(e,d),ae()}ve(["click"]);var qo=(e,t)=>P(t,!0),Bo=I('<button class="show-more svelte-1u3je71">Show more</button>'),Vo=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Uo=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function zo(e,t){re(t,!0);const n=R(t,"blurb",3,""),i=R(t,"limit",3,200);let r=K(!1);const a=U(()=>t.text.slice(0,i()));var o=Uo(),l=b(o),d=b(l),u=T(d);{var v=f=>{var p=Oe("...");k(f,p)};H(u,f=>{!c(r)&&t.text.length>i()&&f(v)})}var s=T(u,2);{var h=f=>{var p=Bo();p.__click=[qo,r],k(f,p)};H(s,f=>{!c(r)&&(t.text.length>i()||n())&&f(h)})}var g=T(l,2);{var m=f=>{var p=Vo(),y=b(p);O(()=>Y(y,n())),k(f,p)};H(g,f=>{c(r)&&f(m)})}O(()=>Y(d,c(r)?t.text:c(a))),k(e,o),ae()}ve(["click"]);var Wo=I('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Ko=I('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Yo(e,t){var n=Ko(),i=T(ee(n),2);it(i,21,()=>t.participants,pt,(r,a)=>{var o=Wo(),l=b(o),d=T(l),u=b(d);O(()=>{var h;return Y(u,((h=c(a).character)==null?void 0:h.slice(0,20))||"")});var v=T(u);{var s=h=>{var g=Oe("...");k(h,g)};H(v,h=>{var g;(g=c(a).character)!=null&&g.length&&h(s)})}O(()=>Y(l,`${c(a).name??""} `)),k(r,o)}),k(e,n)}var $o=Ee('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function pr(e){var t=$o();k(e,t)}var Zo=I('<div class="top svelte-16h1v3j"><img class="poster svelte-16h1v3j"></div>'),Go=I("<div> </div>"),Jo=I("<!> <!>",1),Xo=I('<img alt="" class="svelte-16h1v3j">'),Qo=I('<div class="content svelte-16h1v3j" data-playpilot-link-injections-title=""><div class="header svelte-16h1v3j"><!> <div class="heading svelte-16h1v3j"> </div> <div class="info svelte-16h1v3j"><div class="imdb svelte-16h1v3j"><!> </div> <!> <div> </div> <div class="capitalize svelte-16h1v3j"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-16h1v3j"><!></div>',1);function yr(e,t){re(t,!0);const n=R(t,"small",3,!1),i=R(t,"compact",3,!1);let r=K(!1),a=K(!1),o=K(!1);var l=Qo(),d=ee(l),u=b(d),v=b(u);{var s=N=>{var W=Zo(),X=b(W);O(()=>ne(X,"src",Nt(t.title.standing_poster))),O(()=>{ne(X,"alt",`Movie poster for '${t.title.title??""}'`),se(X,"loaded",c(r))}),ie("load",X,()=>P(r,!0)),k(N,W)};H(v,N=>{i()||N(s)})}var h=T(v,2),g=b(h);sn(h,N=>Pe==null?void 0:Pe(N));var m=T(h,2),f=b(m),p=b(f);pr(p);var y=T(p),w=T(f,2);Po(w,{get genres(){return t.title.genres}});var S=T(w,2),j=b(S),x=T(S,2),A=b(x);O(()=>Y(A,ye(`Type: ${t.title.type}`)));var C=T(x,2);{var E=N=>{var W=Go(),X=b(W);O(()=>Y(X,`${t.title.length??""} ${ye("Minutes")??""}`)),k(N,W)};H(C,N=>{!n()&&t.title.length&&N(E)})}var L=T(u,2),B=b(L);Fo(B,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var $=T(B,2);{var M=N=>{var W=Jo(),X=ee(W);zo(X,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var le=T(X,2);{var ce=de=>{Yo(de,{get participants(){return t.title.participants}})};H(le,de=>{var _e;(_e=t.title.participants)!=null&&_e.length&&de(ce)})}k(N,W)};H($,N=>{n()||N(M)})}var F=T(d,2),V=b(F);ir(V,()=>c(o),N=>{var W=Xo();O(()=>ne(W,"src",Nt(c(o)?t.title.standing_poster:t.title.medium_poster))),O(()=>{se(W,"loaded",c(a)),se(W,"blur",c(o))}),ie("load",W,()=>P(a,!0)),ie("error",W,()=>P(o,!0)),k(N,W)}),O(()=>{ne(d,"data-playpilot-original-title",t.title.original_title),se(d,"small",n()),se(d,"compact",i()),se(h,"truncate",n()),Y(g,t.title.title),Y(y,` ${t.title.imdb_score??""}`),Y(j,t.title.year),se(F,"faded",i())}),k(e,l),ae()}function el(e,t){re(t,!0);let n=K(0);Ce(xe.TitlePopoverView,t.title),So(e,{get maxHeight(){return c(n)},set maxHeight(i){P(n,G(i))},children:(i,r)=>{var a=U(()=>!!c(n)&&c(n)<250);yr(i,{get title(){return t.title},small:!0,get compact(){return c(a)}})},$$slots:{default:!0}}),ae()}var tl=(e,t,n,i)=>t(c(n).title_details,c(i)),nl=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),il=(e,t,n,i)=>t(c(n).title_details,i()),rl=I('<!> <a target="_blank"> </a>',1),al=I(" <!>.",1),ol=I("<!> <br>",1),ll=I(" <br>",1),sl=I('<span class="svelte-pfvkex"><!></span>'),cl=I('<p class="svelte-pfvkex"></p>');function ul(e,t){re(t,!0);const n=R(t,"onclickmodal",3,d=>null);function i(d,u){Ce(xe.AfterArticlePlaylinkClick,d,{playlink:u})}function r(d,u){Ce(xe.AfterArticleModalButtonClick,d),n()(u)}var a=Ze(),o=ee(a);{var l=d=>{var u=cl();it(u,21,()=>t.linkInjections,pt,(v,s)=>{var h=sl();const g=U(()=>{const{key:w,title:S,title_details:j,after_article_style:x}=c(s);return{key:w,title:S,title_details:j,after_article_style:x}}),m=U(()=>{var w;return((w=c(g).title_details)==null?void 0:w.providers)||[]});var f=b(h);{var p=w=>{var S=ol(),j=ee(S);{var x=C=>{var E=nl(),L=ee(E);O(()=>Y(L,`"${c(g).title??""}" ${ye("Is Available To Stream")??""} `));var B=T(L),$=b(B);$.__click=[tl,r,g,s];var M=b($);O(()=>Y(M,ye("View Streaming Options"))),k(C,E)},A=C=>{var E=al(),L=ee(E);O(()=>Y(L,`"${c(g).title??""}" ${ye("Is Available To Stream On")??""} `));var B=T(L);it(B,17,()=>c(m),pt,($,M,F)=>{let V=()=>c(M).name,N=()=>c(M).url;var W=rl(),X=ee(W);{var le=_e=>{var ze=Oe();O(()=>Y(ze,F===c(m).length-1?`, ${ye("And")}`:",")),k(_e,ze)};H(X,_e=>{F&&_e(le)})}var ce=T(X,2);ce.__click=[il,i,g,V];var de=b(ce);O(()=>{ne(ce,"href",N()),Y(de,V())}),k($,W)}),k(C,E)};H(j,C=>{c(g).after_article_style==="modal_button"?C(x):C(A,!1)})}k(w,S)},y=w=>{var S=ll(),j=ee(S);O(()=>Y(j,`"${c(g).title??""}" ${ye("Title Unavailable Suffix")??""} `)),k(w,S)};H(f,w=>{c(m).length?w(p):w(y,!1)})}O(()=>ne(h,"data-playpilot-injection-key",c(g).key)),k(v,h)}),k(d,u)};H(o,d=>{t.linkInjections.length&&d(l)})}k(e,a),ae()}ve(["click"]);function dl(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Zn(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function vi(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function _i(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function fl(e,t,n,i){const r=dl(t),a=Zn(t),o=e.slice(0,i),l=e.slice(i),d=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(d,"\\$&")}|${r.replace(d,"\\$&")}`),v=l.replace(u,n);return o+v}function Ye(e){return Zn(e).toLowerCase().replace(/\s+/g,"")}function vl(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let d=e.slice(o,l).trim();return o>0&&(d="…"+d),l<e.length&&(d+="…"),d}function _l(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const Gn="data-playpilot-injection-key",Jn=`[${Gn}]`,yt={};let Pn=null,Yt=null;function wr(e){const t=[],n=[e];for(;n.length>0;){const i=n.pop();if(t.includes(i)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(i.tagName))continue;const r=Array.from(i.childNodes).some(o=>{var l;return o.nodeType===Node.TEXT_NODE&&((l=o.nodeValue)==null?void 0:l.trim())!==""});if(r&&i.tagName==="LI"){const o=i.closest("ul, ol");o&&!t.includes(o)&&t.push(o);continue}if(r){t.push(i);continue}const a=Array.from(i.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function fn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function hl(e,t,n={aiInjections:[],manualInjections:[]}){var v;const i=bl(n);if(!i)return[];const r=Ye(e.map(s=>s.innerText).join(" ")),a=xl(i),o=a.filter(s=>r.includes(Ye(s.sentence))),l={},d={};for(const s of o){const h=e.findIndex(A=>Ye(A.innerText).includes(Ye(s.sentence))),g=e[h];if(!g)continue;const m=vi(s.title,g,["A"]);if(!(m!=null&&m.nodeValue)||_i(m)){const A=vi(s.title,g);A&&_i(A)&&(d[s.key]="Given text is already inside of a link.");continue}const f=document.createElement("span");f.dataset.playpilotInjectionKey=s.key;const p=document.createElement("a");p.innerText=s.title,p.href=s.playpilot_url,p.dataset.playpilotOriginalTitle=(v=s.title_details)==null?void 0:v.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",f.insertAdjacentElement("beforeend",p);const y=_l(Object.values(l).filter(A=>A.elementIndex===h).map(A=>A.to)),w=g.innerHTML.indexOf(m.nodeValue),S=g.innerHTML.indexOf(s.sentence),j=Math.max(y,w,S,0);g.innerHTML=fl(g.innerHTML,s.title,f.outerHTML,j);const x=g.innerHTML.indexOf(f.outerHTML);l[s.key]={elementIndex:h,from:x,to:x+f.outerHTML.length}}ml(a,t),gl();const u=Sl(i);return u.length&&wl(e,u,t),i.filter(s=>s.title_details).map((s,h)=>{const g=s.duplicate??(!s.manual&&El(s,h,i)),m=document.querySelector(`[${Gn}="${s.key}"]`),f=vn(s)&&!s.inactive&&!s.after_article&&!m,p=f?d[s.key]||(r.includes(Ye(s.sentence))?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...s,inactive:s.inactive??!1,duplicate:g,failed:f,failed_message:p}})}function gl(){const e=Array.from(document.querySelectorAll(`${Jn} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function ml(e,t){window.addEventListener("click",i=>{const r=i.target;if(!(r!=null&&r.parentElement))return;const a=r.parentElement.getAttribute(Gn);if(!a)return;const o=e.find(l=>a===l.key);o&&pl(i,o,t)}),Array.from(document.querySelectorAll(Jn)).forEach(i=>{const r=i.dataset.playpilotInjectionKey,a=e.find(o=>r===o.key);a&&(i.addEventListener("mouseenter",o=>yl(o,a)),i.addEventListener("mouseleave",()=>Xt(a)))})}function pl(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Xt(t))}function yl(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget;Pn=n,setTimeout(()=>{if(yt[t.key]||Pn!==n)return;const i=zn(el,{target:n,props:{title:t.title_details}});yt[t.key]={injection:t,component:i}},100)}function Xt(e,t=!0){const n=yt[e.key];Pn=null,n&&(nr(n.component,{outro:t}),delete yt[e.key])}function wl(e,t,n){var l,d;if(!t.length)return;const i=document.createElement("div"),r=(l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_selector,a=(r?document.querySelector(r):null)||e[e.length-1],o=((d=window.PlayPilotLinkInjections)==null?void 0:d.after_article_insert_position)||"afterend";i.dataset.playpilotAfterArticlePlaylinks="true",a.insertAdjacentElement(o,i),Yt=zn(ul,{target:i,props:{linkInjections:t,onclickmodal:n}})}function kl(){var e;Yt&&(nr(Yt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Yt=null)}function jn(){Object.values(yt).forEach(t=>Xt(t.injection)),document.querySelectorAll(Jn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(yt).forEach(({injection:t})=>Xt(t,!1)),kl()}function bl({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function kr(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function br(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&vn(e)}function vn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function xl(e){return xr(e).filter(t=>t.in_text!==!1&&br(t))}function Sl(e){return xr(e).filter(t=>t.after_article===!0&&br(t))}function xr(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&Sr(n,t)))}function El(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&Sr(i,e))}function Sr(e,t){return e.title===t.title&&Ye(e.sentence)===Ye(t.sentence)}function Tl(){const e=fn();return{heading:Al(e),modified_time:Il(e),published_time:Cl(e)}}function Al(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Il(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?Er(n):null}function Cl(e){const t=document.querySelector('meta[property*="published_time"]')||e.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||e.querySelector("time")||document.querySelector("time")||e.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?Er(n):null}function Er(e){try{return new Date(e).toISOString()}catch{return null}}function Tr(){return location.protocol+"//"+location.host+location.pathname}let wn=null;async function Ar(e,t,{hash:n=gr(t),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=_n(),o=hr()?await _r():!1,l=mr(),d=Tl();if(!a)throw new Error("No token was provided");const u=await fetch(un+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:d,page_text:t,...i})});if(!u.ok)throw u;return await u.json()}async function hi(e,t,{requireCompletedResult:n=!1,pollInterval:i=3e3,maxTries:r=600,onpoll:a=()=>null}={}){let o=gr(t),l=0;wn&&clearTimeout(wn);const d=async(u,v)=>{let s;try{if(s=await Ar(e,t,{hash:o}),n&&s.automation_enabled&&s.ai_running)throw new Error;s.link_injections=gi(s.link_injections||[]),s.ai_injections=gi(s.ai_injections||[]),u(s);return}catch{if(l++,l>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),u();return}s&&a(s),wn=setTimeout(()=>d(u),i)}};return new Promise(d)}async function Pl(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.removed}));if(!await Ar(Tr(),t,{params:{private_token:Kn(),link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function jl(){const e=new Headers({"Content-Type":"application/json"}),t=_n();if(!t)throw new Error("No token was provided");const n=await fetch(un+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function gi(e){return e.map(t=>({...t,key:Ir(t.sid)}))}function Ir(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function _n(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Nl(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Ll=Ee('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Cr(e){var t=Ll();k(e,t)}function Xn(e,t){re(t,!0);const n=R(t,"size",3,"margin(2)"),i=R(t,"onclick",3,()=>null),r=so(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=Ze(),o=ee(a);Ya(o,()=>t.href?"a":"button",!1,(l,d)=>{let u;O(()=>{u=Ja(l,u,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===Ti,l.nodeName.includes("-")),cn(l,"--size",n())});var v=Ze(),s=ee(v);St(s,()=>t.children??Le),k(d,v)}),k(e,a),ae()}var Ml=(e,t)=>t()(),Dl=I('<div class="modal svelte-wrncjp"><div class="dialog svelte-wrncjp" role="dialog"><div class="close svelte-wrncjp"><!></div> <!></div> <div class="backdrop svelte-wrncjp"></div></div>');function Ol(e,t){re(t,!0);const n=R(t,"onclose",3,()=>null),i=R(t,"onscroll",3,()=>null);Ji("scope","modal"),ut(()=>{const s=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=s||""});function r(s){return window.innerWidth<600?dn(s,{duration:250,y:window.innerHeight}):bo(s,{duration:150,start:.85})}var a=Dl();ie("keydown",me,({key:s})=>{s==="Escape"&&n()()});var o=b(a),l=b(o),d=b(l);Xn(d,{onclick:()=>n()(),children:(s,h)=>{Cr(s)},$$slots:{default:!0}});var u=T(l,2);St(u,()=>t.children);var v=T(o,2);v.__click=[Ml,n],ie("scroll",o,function(...s){var h;(h=i())==null||h.apply(this,s)}),Ie(3,o,()=>r),Ie(3,a,()=>$n,()=>({duration:150})),k(e,a),ae()}ve(["click"]);function Rl(e,t){re(t,!0),Ce(xe.TitleModalView,t.title);let n=!1;function i(){n||(Ce(xe.TitleModalScroll,t.title),n=!0)}Ol(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{yr(r,{get title(){return t.title}})},$$slots:{default:!0}}),ae()}var Hl=Ee('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Fl(e,t){const n=R(t,"expanded",3,!1);var i=Hl();O(()=>se(i,"expanded",n())),k(e,i)}var ql=Ee('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Bl(e){var t=ql();k(e,t)}function Vl(e,t,n){t(!t()),n()(t())}var Ul=I('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function Nn(e,t){re(t,!0);let n=R(t,"active",15),i=R(t,"fullwidth",3,!1),r=R(t,"label",3,""),a=R(t,"onclick",3,()=>null);var o=Ul();o.__click=[Vl,n,a];var l=b(o),d=b(l);St(d,()=>t.children),O(()=>{ne(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),se(o,"active",n()),se(o,"fullwidth",i())}),k(e,o),ae()}ve(["click"]);var zl=I('<input type="text" class="svelte-1vrer3i">');function Qn(e,t){let n=R(t,"value",15),i=R(t,"label",3,""),r=R(t,"name",3,""),a=R(t,"readonly",3,!1),o=R(t,"oninput",3,()=>null);var l=zl();l.__input=function(...d){var u;(u=o())==null||u.apply(this,d)},O(()=>{ne(l,"name",r()),ne(l,"aria-label",i()),ne(l,"placeholder",i()),l.readOnly=a()}),ro(l,n),k(e,l)}ve(["input"]);var Wl=Ee('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Kl=Ee('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Yl=Ee('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function mi(e,t){const n=R(t,"align",3,"bottom");var i=Yl(),r=b(i);{var a=l=>{var d=Wl();k(l,d)},o=l=>{var d=Ze(),u=ee(d);{var v=s=>{var h=Kl();k(s,h)};H(u,s=>{n()==="center"&&s(v)},!0)}k(l,d)};H(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var $l=I("<div><!></div>");function Lt(e,t){re(t,!0);const n=R(t,"type",3,"error");var i=$l(),r=b(i);St(r,()=>t.children),O(()=>Xa(i,`alert ${n()??""} svelte-18si0a5`)),k(e,i),ae()}var Zl=I("<!> In-text Playlink",1),Gl=I("<!> Bottom Playlink",1),Jl=I('<div class="alert svelte-1shw34x"><!></div>'),Xl=(e,t)=>t().after_article_style="playlinks",Ql=(e,t)=>t().after_article_style="modal_button",es=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),ts=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function ns(e,t){re(t,!0);const n=R(t,"linkInjection",7),i=U(()=>n().after_article_style==="modal_button");var r=ts(),a=ee(r),o=b(a),l=U(()=>n().in_text??!0);Nn(o,{fullwidth:!0,get active(){return c(l)},onclick:m=>{n().in_text=m,n().manual=!0},label:"In-text Playlink",children:(m,f)=>{var p=Zl(),y=ee(p);mi(y,{align:"center"}),k(m,p)},$$slots:{default:!0}});var d=T(o,2),u=U(()=>n().after_article??!1);Nn(d,{fullwidth:!0,get active(){return c(u)},onclick:m=>{n().after_article=m,n().manual=!0},label:"Bottom Playlink",children:(m,f)=>{var p=Gl(),y=ee(p);mi(y,{align:"bottom"}),k(m,p)},$$slots:{default:!0}});var v=T(a,2);{var s=m=>{var f=Jl(),p=b(f);Lt(p,{type:"warning",children:(y,w)=>{var S=Oe("At least one layout option must be selected for the playlink to be visible.");k(y,S)},$$slots:{default:!0}}),Ie(3,f,()=>jt,()=>({duration:200})),k(m,f)};H(v,m=>{vn(n())||m(s)})}var h=T(v,2);{var g=m=>{var f=es(),p=T(b(f),2),y=b(p);y.__click=[Xl,n];var w=T(y,2);w.__click=[Ql,n];var S=T(w,2);O(()=>{ne(p,"aria-activedescendant",`playlinks-${(c(i)?"after-article":"in-text")??""}`),ne(y,"aria-selected",!c(i)||null),se(y,"active",!c(i)),ne(w,"aria-selected",c(i)||null),se(w,"active",c(i)),se(S,"right",c(i))}),Ie(3,f,()=>jt,()=>({duration:100})),k(m,f)};H(h,m=>{n().after_article&&m(g)})}k(e,r),ae()}ve(["click"]);var is=Ee('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function rs(e){var t=is();k(e,t)}var as=(e,t)=>P(t,!c(t)),os=I('<div class="content svelte-1fmy0wh"><!></div>'),ls=I('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function ss(e,t){re(t,!0);let n=K(!1),i=K(null);function r(v){var h;const s=v.target;s===c(i)||(h=c(i))!=null&&h.contains(s)||P(n,!1)}var a=ls();ie("click",me,r);var o=b(a);o.__click=[as,n];var l=b(o);rs(l),Bt(o,v=>P(i,v),()=>c(i));var d=T(o,2);{var u=v=>{var s=os(),h=b(s);St(h,()=>t.children),Ie(1,s,()=>dn,()=>({duration:150,y:5})),k(v,s)};H(d,v=>{c(n)&&v(u)})}O(()=>{ne(o,"aria-label",t.ariaLabel),ne(o,"aria-expanded",c(n))}),k(e,a),ae()}ve(["click"]);function cs(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}var us=(e,t)=>P(t,!c(t)),ds=I('<button class="expand-sentence svelte-8gd2db"> </button>'),fs=I('<button class="context-menu-action svelte-8gd2db">Remove</button>'),vs=(e,t)=>P(t,!c(t)),_s=I('<div class="warning svelte-8gd2db" aria-label="Invalid playlink settings"><!></div>'),hs=I('<div class="actions svelte-8gd2db"><button class="expand svelte-8gd2db" aria-label="Expand"><!></button> <!> <!></div>'),gs=I('<div class="expanded svelte-8gd2db"><div class="label svelte-8gd2db">Link URL</div> <!> <div class="label offset svelte-8gd2db">Layout options</div> <div class="type-select svelte-8gd2db"><!></div></div>'),ms=I('<div class="item svelte-8gd2db"><div class="header svelte-8gd2db"><img class="poster svelte-8gd2db" alt="" width="32" height="48"> <div class="info svelte-8gd2db"><div class="title svelte-8gd2db"> </div> <div class="sentence svelte-8gd2db"><!> <!></div></div> <div class="context-menu svelte-8gd2db"><!></div></div> <div class="content svelte-8gd2db"><!> <!></div></div>');function ps(e,t){re(t,!0);const n=R(t,"linkInjection",15),i=R(t,"onremove",3,()=>null),r=R(t,"onhighlight",3,()=>null),a=U(()=>n()||{}),o=U(()=>c(a).key),l=U(()=>c(a).sentence),d=U(()=>c(a).title_details),u=U(()=>c(a).failed),v=U(()=>c(a).failed_message),s=U(()=>c(a).inactive),h=U(()=>c(d)),g=U(()=>vl(n().sentence,n().title,60));let m=K(!1),f=K(!1),p=K(!1),y=K(null);ut(()=>{c(u)&&Ce(xe.InjectionFailed,c(h),{phrase:n().title,sentence:c(l)})});function w(Z=!0){j().forEach(oe=>{oe.classList.toggle("playpilot-injection-highlight",Z)})}function S(Z){let J=Z.target,oe=J==null?void 0:J.dataset.playpilotInjectionKey;J&&!oe&&(J=J.closest(`[data-playpilot-injection-key="${c(o)}"]`),oe=J==null?void 0:J.dataset.playpilotInjectionKey),P(p,oe===c(o)),c(y)&&c(p)&&r()(c(y))}function j(){const Z=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${c(o)}"]`));return Z.length?Z:wr(fn()).filter(J=>Ye(J.innerText).includes(Ye(n().sentence)))||[]}var x=ms();ie("mouseover",me,S),x.__click=[cs,w,j];var A=b(x),C=b(A);O(()=>ne(C,"src",Nt(c(h).standing_poster)));var E=T(C,2),L=b(E),B=b(L),$=T(L,2),M=b($);Ka(M,()=>(c(f)?c(l):c(g)).replace(n().title,`<em>${n().title}</em>`));var F=T(M,2);{var V=Z=>{var J=ds();J.__click=[us,f];var oe=b(J);O(()=>Y(oe,c(f)?"Less":"More")),k(Z,J)};H(F,Z=>{c(g).length<c(l).length&&Z(V)})}var N=T(E,2),W=b(N);ss(W,{ariaLabel:"More options",children:(Z,J)=>{var oe=fs();oe.__click=function(...D){var q;(q=i())==null||q.apply(this,D)},k(Z,oe)},$$slots:{default:!0}});var X=T(A,2),le=b(X);{var ce=Z=>{Lt(Z,{children:(J,oe)=>{var D=Oe();O(()=>Y(D,c(v))),k(J,D)},$$slots:{default:!0}})},de=Z=>{var J=hs(),oe=b(J);oe.__click=[vs,m];var D=b(oe);Fl(D,{get expanded(){return c(m)}});var q=T(oe,2);{var ue=fe=>{var Ge=_s(),Je=b(Ge);Bl(Je),Ie(3,Ge,()=>$n,()=>({duration:100})),k(fe,Ge)};H(q,fe=>{vn(n())||fe(ue)})}var Te=T(q,2),Ae=U(()=>c(s)?"Inactive":"Visible"),We=U(()=>!n().inactive);Nn(Te,{get label(){return c(Ae)},get active(){return c(We)},onclick:fe=>{n(n().inactive=!fe,!0),n(n().manual=!0,!0)},children:(fe,Ge)=>{var Je=Oe();O(()=>Y(Je,c(s)?"Inactive":"Visible")),k(fe,Je)},$$slots:{default:!0}}),O(()=>ne(oe,"aria-expanded",c(m))),k(Z,J)};H(le,Z=>{c(u)?Z(ce):Z(de,!1)})}var _e=T(le,2);{var ze=Z=>{var J=gs(),oe=T(b(J),2);Qn(oe,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(ue){n(n().playpilot_url=ue,!0)}});var D=T(oe,4),q=b(D);ns(q,{get linkInjection(){return n()}}),Ie(3,J,()=>jt,()=>({duration:100})),k(Z,J)};H(_e,Z=>{c(m)&&Z(ze)})}Bt(x,Z=>P(y,Z),()=>c(y)),O(()=>{se(x,"highlighted",c(p)),se(x,"inactive",c(s)),Y(B,c(h).title)}),ie("mouseenter",x,()=>w(!0)),ie("mouseleave",x,()=>w(!1)),ie("error",C,({target:Z})=>Z.src=sr),Ie(6,x,()=>jt,()=>({duration:200})),k(e,x),ae()}ve(["click"]);var ys=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function ws(e,t){re(t,!0);let n=R(t,"element",7),i=R(t,"position",23,()=>({x:0,y:0})),r=R(t,"limit",19,()=>({x:0,y:0})),a=R(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},d=i();ut(()=>{u(i().x,i().y)});function u(f,p){const y=window.innerWidth,w=window.innerHeight,S=n().clientWidth,j=n().clientHeight;f=Math.min(Math.max(f,r().x),y-S-r().x),p=Math.min(Math.max(p,r().y),w-j-r().y),n().style.right=f+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:f,y:p}),a()(i())}function v(f){var p,y;return{x:f.pageX||((p=f.touches)==null?void 0:p[0].pageX)||0,y:f.pageY||((y=f.touches)==null?void 0:y[0].pageY)||0}}function s(f){o=!0,l=v(f),d=i()}function h(f){if(!o)return;const p=v(f),y=p.x-l.x,w=p.y-l.y,S=d.x-y,j=d.y-w;u(S,j)}function g(){o&&(o=!1)}var m=ys();ie("mousemove",me,h),ie("touchmove",me,h,void 0,!0),ie("mouseup",me,g),ie("touchend",me,g),ie("resize",me,()=>u(i().x,i().y)),m.__mousedown=s,m.__touchstart=s,k(e,m),ae()}ve(["mousedown","touchstart"]);var ks=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function bs(e,t){re(t,!0);let n=R(t,"element",7),i=R(t,"height",7,200),r=R(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,d=i();ut(()=>{i()&&u(i())});function u(f){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(f,g()));n().style.height=`${y}px`,i(y),r()(y)}function v(f){var p,y;o=!0,l=f.pageY||((y=(p=f.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,d=n().clientHeight}function s(f){var S,j;if(!o)return;const p=f.pageY||((j=(S=f.touches)==null?void 0:S[0])==null?void 0:j.pageY)||0,y=l-p,w=d+y;u(w)}function h(){o=!1}function g(){const f=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-f,0)}var m=ks();ie("mousemove",me,s),ie("touchmove",me,s,void 0,!0),ie("mouseup",me,h),ie("touchend",me,h),ie("resize",me,()=>{i()&&u(i())}),m.__mousedown=v,m.__touchstart=v,k(e,m),ae()}ve(["mousedown","touchstart"]);var xs=Ee('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ss(e){var t=xs();k(e,t)}async function Es(e){const t=new Headers({"Content-Type":"application/json"}),n=_n();if(!n)throw new Error("No token was provided");const i=await fetch(un+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var Ts=Ee('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function As(e){var t=Ts();k(e,t)}var Is=I("<div> </div>"),Cs=e=>e.stopImmediatePropagation(),Ps=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function pi(e,t){re(t,!0);const n=R(t,"hoverable",3,!0),i=R(t,"onclick",3,()=>null);var r=Ps();r.__click=function(...x){var A;(A=i())==null||A.apply(this,x)};var a=b(r);O(()=>ne(a,"src",Nt(t.title.standing_poster)));var o=T(a,2),l=b(o),d=b(l),u=T(l,2),v=b(u),s=b(v);pr(s);var h=T(s),g=T(v,2),m=b(g),f=T(g,2),p=b(f),y=T(f,2);{var w=x=>{var A=Is(),C=b(A);O(()=>Y(C,`${t.title.length??""} min`)),k(x,A)};H(y,x=>{t.title.length&&x(w)})}var S=T(o,2);S.__click=[Cs];var j=b(S);As(j),O(()=>{se(r,"hoverable",n()),Y(d,t.title.title),Y(h,` ${t.title.imdb_score??""}`),Y(m,t.title.year),Y(p,t.title.type),ne(S,"href",`${lr}/${t.title.type??""}/${t.title.slug??""}`)}),ie("error",a,({target:x})=>x.src=sr),k(e,r),ae()}ve(["click"]);var js=I('<em class="empty svelte-1olb8n0">No results found</em>'),Ns=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Ls=I('<div class="selected svelte-1olb8n0"><!></div>'),Ms=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function Ds(e,t){re(t,!0);let n=R(t,"onselect",3,()=>null),i=R(t,"query",15),r=K(G([])),a=K(null),o=K(!1);rn(()=>{i()&&l(i())});async function l(f){P(o,!0);try{P(r,G(await Es(f)))}finally{P(o,!1)}}function d(f){i(f.title),P(a,G(f)),n()(f)}var u=Ms(),v=b(u);Qn(v,{oninput:()=>P(a,null),name:"search",label:"Search...",get value(){return i()},set value(f){i(f)}});var s=T(v,2);{var h=f=>{var p=Ns();it(p,21,()=>c(r),y=>y.sid,(y,w)=>{pi(y,{get title(){return c(w)},onclick:()=>d(c(w))})},y=>{var w=Ze(),S=ee(w);{var j=x=>{var A=js();k(x,A)};H(S,x=>{c(o)||x(j)})}k(y,w)}),k(f,p)};H(s,f=>{i()&&!c(a)&&f(h)})}var g=T(s,2);{var m=f=>{var p=Ls(),y=b(p);pi(y,{get title(){return c(a)},hoverable:!1}),k(f,p)};H(g,f=>{c(a)&&f(m)})}k(e,u),ae()}function Os(e,t,n,i,r,a){if(!c(t)||!c(n))return;const o=c(n).type==="movie"?"movie":"show",l=lr+`/${o}/${c(n).slug}`,d={sid:c(n).sid,title:c(t),sentence:c(i),playpilot_url:l,key:Ir(c(n).sid),title_details:c(n),manual:!0};r.onsave(d),a()()}var Rs=I('<div class="error svelte-1i8p6op"><!></div>'),Hs=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Fs=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function qs(e,t){re(t,!0);let n=R(t,"htmlString",3,""),i=R(t,"onclose",3,()=>null),r=K(""),a=K(""),o=K(null),l=K(""),d=K("");ut(u);function u(){const C=window.getSelection();if(!(C!=null&&C.anchorNode)||C.anchorNode.parentElement&&!fn().contains(C.anchorNode.parentElement))return;const E=C.toString().trim();if(!E)return;P(l,""),P(r,G(E));const L=C.getRangeAt(0).cloneContents();if(Array.from(L.childNodes).filter(F=>{var V;return(V=F.textContent)==null?void 0:V.trim()}).length>1){P(l,"Selection contains multiple items. Selection may not contain a mix of styled and non styled text. Please select the text more directly.");return}P(d,G(c(r))),P(a,G(v(C,E)));const $=C.getRangeAt(0).commonAncestorContainer.textContent,M=Zn(n());(!$||!M.includes($))&&P(l,"Selection was not inside of given content")}function v(C,E){const L=C.getRangeAt(0);let B=L.startContainer;for(;(B.textContent||"").length<=E.length*3&&B.parentNode;)B=B.parentNode;if(!B||!B.textContent)return"";const $=B.textContent,M=s(B,L.startContainer,L.startOffset),F=s(B,L.endContainer,L.endOffset),V=$.slice(0,M).lastIndexOf("."),N=$.slice(F).match(/[.!?]/),W=N?F+N.index:$.length,X=V===-1?0:V+1,le=W;return $.slice(X,le+1).trim()}function s(C,E,L){let B=0;const $=C,M=F=>{var V;if(F===E)return B+=L,!0;F.nodeType===Node.TEXT_NODE&&(B+=((V=F.textContent)==null?void 0:V.length)||0);for(let N=F.firstChild;N;N=N.nextSibling)if(M(N))return!0;return!1};return M($),B}function h(C){var E,L;P(o,G(C)),(L=(E=window.getSelection())==null?void 0:E.removeAllRanges)==null||L.call(E)}var g=Fs();ie("mouseup",me,u);var m=b(g),f=b(m);Xn(f,{get onclick(){return i()},size:"24px",children:(C,E)=>{Ss(C)},$$slots:{default:!0}});var p=T(f,2);sn(p,(C,E)=>Pe==null?void 0:Pe(C,E),()=>2);var y=T(m,6);Qn(y,{get value(){return c(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var w=T(y,2);{var S=C=>{var E=Rs(),L=b(E);Lt(L,{children:(B,$)=>{var M=Oe();O(()=>Y(M,c(l))),k(B,M)},$$slots:{default:!0}}),k(C,E)};H(w,C=>{c(l)&&C(S)})}var j=T(w,2);{var x=C=>{var E=Hs(),L=T(ee(E),2);ir(L,()=>c(a)+c(r),B=>{Ds(B,{onselect:h,get query(){return c(d)},set query($){P(d,G($))}})}),k(C,E)};H(j,C=>{c(l)||C(x)})}var A=T(j,2);A.__click=[Os,r,o,a,t,i],O(()=>A.disabled=!c(r)||!c(o)),k(e,g),ae()}ve(["click"]);var Bs=Ee('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function Vs(e){var t=Bs();k(e,t)}var Us=I('<strong class="svelte-1kpafo0">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1kpafo0">Partner Portal</a>',1),zs=I('<span class="svelte-1kpafo0">.</span>'),Ws=I(`<strong class="svelte-1kpafo0">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1kpafo0"> <span class="ellipses svelte-1kpafo0"></span></div> <div class="loading-bar svelte-1kpafo0"><div class="loading-bar-progress svelte-1kpafo0"><div class="loading-bar-fill svelte-1kpafo0" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1kpafo0"> </div></div>`,1),Ks=(e,t)=>P(t,!0),Ys=I('<p class="svelte-1kpafo0"><strong class="svelte-1kpafo0">AI has finished processing.</strong> <br class="svelte-1kpafo0"> <!></p> <button class="dismiss svelte-1kpafo0">Dismiss</button>',1),$s=I('<div class="animator svelte-1kpafo0" data-test-id="animator"></div>'),Zs=I('<div class="ai-indicator svelte-1kpafo0" data-testid="ai-indicator"><div class="content svelte-1kpafo0"><div class="icon svelte-1kpafo0"><!></div> <div class="svelte-1kpafo0"><!></div></div> <div class="border svelte-1kpafo0"><!></div></div>');function Gs(e,t){const n=R(t,"aiRunning",3,!1),i=R(t,"automationEnabled",3,!1),r=R(t,"message",3,""),a=R(t,"percentage",3,0),o=R(t,"aiInjectionsCount",3,0),l=o();let d=K(!1);var u=Ze(),v=ee(u);{var s=h=>{var g=Zs(),m=b(g),f=b(m),p=b(f);Vs(p);var y=T(f,2),w=b(y);{var S=E=>{var L=Us();k(E,L)},j=E=>{var L=Ze(),B=ee(L);{var $=F=>{var V=Ws(),N=T(ee(V),2),W=b(N),X=T(W);it(X,20,()=>({length:3}),pt,(J,oe)=>{var D=zs();k(J,D)});var le=T(N,2),ce=b(le),de=b(ce);const _e=U(()=>`${Math.max(a(),3)??""}%`);O(()=>cn(de,"width",c(_e)));var ze=T(ce,2),Z=b(ze);O(()=>{Y(W,`${r()??""} `),Y(Z,`${a()??""}%`)}),k(F,V)},M=F=>{var V=Ys(),N=ee(V),W=T(b(N),4);{var X=de=>{var _e=Oe("No new injections where found.");k(de,_e)},le=de=>{var _e=Oe();O(()=>Y(_e,`${o()??""} Injections where found and added to the page.`)),k(de,_e)};H(W,de=>{l===o()?de(X):de(le,!1)})}var ce=T(N,2);ce.__click=[Ks,d],k(F,V)};H(B,F=>{n()?F($):F(M,!1)},!0)}k(E,L)};H(w,E=>{i()?E(j,!1):E(S)})}var x=T(m,2),A=b(x);{var C=E=>{var L=$s();k(E,L)};H(A,E=>{n()&&E(C)})}O(()=>se(g,"running",n())),k(h,g)};H(v,h=>{c(d)||h(s)})}k(e,u)}ve(["click"]);async function Js(e,t,n,i,r,a,o){try{P(t,!0),P(n,!1),i(await Pl(i(),r())),P(a,G(c(o)))}catch{P(n,!0)}finally{P(t,!1)}}var Xs=I('<div class="handles svelte-1ybwhez"><div class="handle svelte-1ybwhez"><!></div> <div class="handle svelte-1ybwhez"><!></div></div>'),Qs=I('<div class="loading svelte-1ybwhez">Loading...</div>'),ec=I('<div class="bubble svelte-1ybwhez"> </div> <!>',1),tc=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
9
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal</a>`,1),nc=I('<div class="alert svelte-1ybwhez"><!></div>'),ic=I('<div class="error svelte-1ybwhez"><!></div>'),rc=I('<div class="empty svelte-1ybwhez">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),ac=I('<button class="save svelte-1ybwhez"> </button>'),oc=I('<div class="items svelte-1ybwhez"></div> <!>',1),lc=I("<!> <!> <!> <!>",1),sc=I('<div class="panel playpilot-styled-scrollbar svelte-1ybwhez"><!></div>'),cc=I('<section class="editor playpilot-styled-scrollbar svelte-1ybwhez"><!> <header class="header svelte-1ybwhez"><div class="heading svelte-1ybwhez">Playlinks</div> <!></header> <!> <!></section>');function uc(e,t){re(t,!0);let n=R(t,"linkInjections",15),i=R(t,"htmlString",3,""),r=R(t,"loading",3,!1),a=R(t,"injectionsEnabled",3,!1),o=R(t,"aiStatus",19,()=>({}));const l="editor-position",d="editor-height";let u=K(null),v=G(JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }')),s=G(parseInt(localStorage.getItem(d)||"0")),h=K(!1),g=K(!1),m=K(!1),f=K(0),p=K("");const y=U(()=>JSON.stringify(n())),w=U(()=>c(p)&&c(p)!==c(y)),S=U(()=>n().filter(D=>D.title_details&&!D.removed&&!D.duplicate&&(D.manual||!D.manual&&!D.failed))),j=U(()=>E(c(S))),x=U(()=>$t(o().automationEnabled,!1)),A=U(()=>$t(o().aiRunning,!1)),C=U(()=>!r()&&Ve(()=>o().aiRunning));rn(()=>{r()||Ve(()=>{requestAnimationFrame(()=>P(p,G(c(y)))),F()})});function E(D){return D.sort((q,ue)=>q.failed!==ue.failed?q.failed?1:-1:q.title_details.title.localeCompare(ue.title_details.title))}function L(D,q){localStorage.setItem(D,q)}function B(D){const q=n().findIndex(ue=>ue.key===D);n(n()[q].manual=!0,!0),n(n()[q].removed=!0,!0),n([...n()])}function $(D){if(!c(u))return;const q=D.offsetTop,ue=q+D.offsetHeight,Te=c(u).scrollTop,Ae=Te+c(u).clientHeight;q>=Te&&ue<=Ae||c(u).scrollTo({top:q-c(u).clientHeight/2,behavior:"smooth"})}function M(D){const q=D.target;P(f,G(q.scrollTop))}function F(){const D={total:n().length,failed_automatic:n().filter(q=>q.failed&&!q.manual).length,failed_manual:n().filter(q=>q.failed&&q.manual).length,final_injected:c(S).length};Ce(xe.TotalInjectionsCount,null,D)}var V=cc(),N=b(V);{var W=D=>{var q=Xs(),ue=b(q),Te=b(ue);bs(Te,{get element(){return c(u)},get height(){return s},onchange:fe=>L(d,JSON.stringify(fe))});var Ae=T(ue,2),We=b(Ae);ws(We,{get element(){return c(u)},get position(){return v},limit:{x:16,y:16},onchange:fe=>L(l,JSON.stringify(fe))}),k(D,q)};H(N,D=>{c(u)&&!r()&&D(W)})}var X=T(N,2),le=b(X);sn(le,D=>Pe==null?void 0:Pe(D));var ce=T(le,2);{var de=D=>{var q=Qs();k(D,q)},_e=D=>{var q=Ze(),ue=ee(q);{var Te=Ae=>{var We=ec(),fe=ee(We),Ge=b(fe),Je=T(fe,2);Xn(Je,{onclick:()=>P(h,!0),size:"24px","aria-label":"Add manual injection",children:(hn,he)=>{var Ne=Oe("+");k(hn,Ne)},$$slots:{default:!0}}),O(()=>{ne(fe,"aria-label",`${c(S).length??""} found playlinks`),Y(Ge,c(S).length)}),k(Ae,We)};H(ue,Ae=>{c(A)||Ae(Te)},!0)}k(D,q)};H(ce,D=>{r()?D(de):D(_e,!1)})}var ze=T(X,2);{var Z=D=>{var q=lc(),ue=ee(q);{var Te=he=>{var Ne=nc(),dt=b(Ne);Lt(dt,{type:"warning",children:(Et,gn)=>{var we=tc();k(Et,we)},$$slots:{default:!0}}),k(he,Ne)};H(ue,he=>{a()||he(Te)})}var Ae=T(ue,2);{var We=he=>{Gs(he,uo(o,{get aiInjectionsCount(){return kr(n()).aiInjections.length}}))};H(Ae,he=>{(c(C)||!c(x))&&he(We)})}var fe=T(Ae,2);{var Ge=he=>{var Ne=ic(),dt=b(Ne);Lt(dt,{children:(Et,gn)=>{var we=Oe("Something went wrong, check your links below.");k(Et,we)},$$slots:{default:!0}}),Ie(7,Ne,()=>jt,()=>({duration:150})),k(he,Ne)};H(fe,he=>{c(m)&&he(Ge)})}var Je=T(fe,2);{var hn=he=>{var Ne=oc(),dt=ee(Ne);it(dt,21,()=>c(j),we=>we.key,(we,He)=>{const Vt=U(()=>n().findIndex(mn=>mn.key===c(He).key));ps(we,{onremove:()=>B(c(He).key),onhighlight:$,get linkInjection(){return n()[c(Vt)]},set linkInjection(mn){n(n()[c(Vt)]=mn,!0)}})},we=>{var He=rc();k(we,He)});var Et=T(dt,2);{var gn=we=>{var He=ac();He.__click=[Js,g,m,n,i,p,y];var Vt=b(He);O(()=>{He.disabled=c(g),Y(Vt,c(g)?"Saving...":"Save links")}),Ie(1,He,()=>$n,()=>({duration:100})),k(we,He)};H(Et,we=>{c(w)&&n().length&&we(gn)})}k(he,Ne)};H(Je,he=>{c(A)||he(hn)})}k(D,q)};H(ze,D=>{r()||D(Z)})}var J=T(ze,2);{var oe=D=>{var q=sc(),ue=b(q);qs(ue,{get htmlString(){return i()},onclose:()=>P(h,!1),onsave:Te=>n().push(Te)}),O(()=>cn(q,"top",`${c(f)??""}px`)),Ie(3,q,()=>dn,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(D,q)};H(J,D=>{c(h)&&D(oe)})}Bt(V,D=>P(u,D),()=>c(u)),O(()=>{se(V,"panel-open",c(h)),se(V,"loading",r())}),ie("scroll",V,M),k(e,V),ae()}ve(["click"]);var dc=Ee('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function fc(e){var t=dc();k(e,t)}var vc=I('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function _c(e,t){var n=vc(),i=b(n);i.__click=function(...l){var d;(d=t.onclick)==null||d.apply(this,l)};var r=b(i);fc(r);var a=T(i,2);a.__click=function(...l){var d;(d=t.onclose)==null||d.apply(this,l)};var o=b(a);Cr(o),k(e,n)}ve(["click"]);var hc=I('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!> <!></div>');function gc(e,t){re(t,!0);const n=fn(),i=wr(n),r=i.map(M=>M.outerHTML).join("");let a=K(null),o=K(null),l=K(G(hr())),d=K(!!Kn()),u=K(!1),v=K(!0),s=K(G([])),h=K(void 0);const g=U(()=>c(a)||{}),m=U(()=>$t(c(g).ai_injections,()=>[],!0)),f=U(()=>$t(c(g).link_injections,()=>[],!0));rn(()=>{c(l)&&!c(v)&&y()}),ut(()=>{if(!Nl())return(async()=>(await p(),Ce(xe.ArticlePageView)))(),()=>jn()});async function p(){P(v,!0),c(l)&&P(u,G(await _r()));const M=Tr();try{const F=await jl();if(!c(l)&&(F!=null&&F.exclude_urls_pattern)&&M.match(F.exclude_urls_pattern))return}catch(F){Ce(xe.FetchingConfigFailed),console.error("TPI Config failed to fetch",F);return}if(P(a,G(await hi(M,r,{maxTries:1}))),P(v,!1),!!c(a)){if(ho({organizationSid:c(a).organization_sid,domainSid:c(a).domain_sid}),!c(a).ai_running||!c(a).automation_enabled){w({aiInjections:c(m),manualInjections:c(f)});return}c(l)&&(P(a,G(await hi(M,r,{requireCompletedResult:!0,onpoll:F=>P(a,G(F))}))),w({aiInjections:c(m),manualInjections:c(f)}))}}function y(){jn(),w(kr(c(s)))}function w(M={aiInjections:c(m),manualInjections:c(f)}){const F=hl(i,S,M);JSON.stringify(F)!==JSON.stringify(c(s))&&P(s,G(F));const V=F.filter(N=>!N.failed);V.length&&(c(l)||Ce(xe.ArticleInjected,null,{manual:V.filter(N=>N.manual).length,ai:V.filter(N=>!N.manual).length}))}function S(M){P(o,G(M))}function j(){P(l,!0),po(),p()}var x=hc(),A=b(x);{var C=M=>{_c(M,{onclick:j,onclose:()=>{P(d,!1),mo()}})};H(A,M=>{c(d)&&!c(l)&&M(C)})}var E=T(A,2);{var L=M=>{var F=U(()=>{var N;return(N=c(a))==null?void 0:N.injections_enabled}),V=U(()=>{var N,W,X,le,ce;return{automationEnabled:(N=c(a))==null?void 0:N.automation_enabled,aiRunning:((W=c(a))==null?void 0:W.ai_running)&&((X=c(a))==null?void 0:X.automation_enabled),message:(le=c(a))==null?void 0:le.ai_progress_message,percentage:(ce=c(a))==null?void 0:ce.ai_progress_percentage}});Bt(uc(M,{htmlString:r,get loading(){return c(v)},get injectionsEnabled(){return c(F)},get aiStatus(){return c(V)},get linkInjections(){return c(s)},set linkInjections(N){P(s,G(N))}}),N=>P(h,G(N)),()=>c(h))};H(E,M=>{c(l)&&c(u)&&M(L)})}var B=T(E,2);{var $=M=>{Rl(M,{get title(){return c(o).title_details},onclose:()=>P(o,null)})};H(B,M=>{c(o)&&c(o).title_details&&M($)})}k(e,x),ae()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,app:null,initialize(e={token:"",selector:"",after_article_selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=zn(gc,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),jn()}};
|
|
10
|
+
|
|
11
|
+
})();
|
package/package.json
CHANGED
package/src/lib/api.ts
CHANGED
|
@@ -51,7 +51,12 @@ export async function fetchLinkInjections(url: string, html: string, { hash = st
|
|
|
51
51
|
* @param url URL of the given article
|
|
52
52
|
* @param html HTML to be crawled
|
|
53
53
|
*/
|
|
54
|
-
export async function pollLinkInjections(
|
|
54
|
+
export async function pollLinkInjections(
|
|
55
|
+
url: string,
|
|
56
|
+
html: string,
|
|
57
|
+
{ requireCompletedResult = false, pollInterval = 3000, maxTries = 600, onpoll = () => null }:
|
|
58
|
+
{ requireCompletedResult?: boolean, pollInterval?: number, maxTries?: number, onpoll?: (_response: LinkInjectionResponse) => void } = {}
|
|
59
|
+
): Promise<LinkInjectionResponse> {
|
|
55
60
|
let hash = stringToHash(html)
|
|
56
61
|
let currentTry = 0
|
|
57
62
|
|
|
@@ -65,8 +70,9 @@ export async function pollLinkInjections(url: string, html: string, { requireCom
|
|
|
65
70
|
* @param reject Injections are not yet ready
|
|
66
71
|
*/
|
|
67
72
|
const poll = async (resolve: Function, reject: Function): Promise<void> => {
|
|
73
|
+
let response
|
|
68
74
|
try {
|
|
69
|
-
|
|
75
|
+
response = await fetchLinkInjections(url, html, { hash })
|
|
70
76
|
|
|
71
77
|
if (requireCompletedResult && (response.automation_enabled && response.ai_running)) throw new Error
|
|
72
78
|
|
|
@@ -84,6 +90,8 @@ export async function pollLinkInjections(url: string, html: string, { requireCom
|
|
|
84
90
|
return
|
|
85
91
|
}
|
|
86
92
|
|
|
93
|
+
if (response) onpoll(response)
|
|
94
|
+
|
|
87
95
|
pollTimeout = setTimeout(() => poll(resolve, reject), pollInterval)
|
|
88
96
|
}
|
|
89
97
|
}
|
package/src/lib/image.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* NOTE: This is a temporary measure. Images url from the API use a previous format which is to be replaced,
|
|
3
3
|
* but that isn't live yet and requires some extra work. In the meantime we remove part of the URL ourselves.
|
|
4
4
|
*/
|
|
5
|
-
export function removeImageUrlPrefix(url: string): string {
|
|
5
|
+
export function removeImageUrlPrefix(url: string | null): string | null {
|
|
6
|
+
if (!url) return null
|
|
6
7
|
return url.replace('/src/img', '')
|
|
7
8
|
}
|
package/src/routes/+page.svelte
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
9
9
|
import { authorize, getAuthToken, isEditorialModeEnabled, removeAuthCookie, setEditorialParamInUrl } from '$lib/auth'
|
|
10
10
|
import TitleModal from './components/TitleModal.svelte'
|
|
11
|
+
import Editor from './components/Editorial/Editor.svelte'
|
|
11
12
|
import EditorTrigger from './components/Editorial/EditorTrigger.svelte'
|
|
12
13
|
import type { LinkInjectionResponse, LinkInjection, LinkInjectionTypes } from '$lib/types/injection'
|
|
13
14
|
|
|
@@ -85,8 +86,7 @@
|
|
|
85
86
|
// so as not to suddenly insert new links while a user is reading the article.
|
|
86
87
|
if (!isEditorialMode) return
|
|
87
88
|
|
|
88
|
-
response = await pollLinkInjections(url, htmlString, { requireCompletedResult: true })
|
|
89
|
-
|
|
89
|
+
response = await pollLinkInjections(url, htmlString, { requireCompletedResult: true, onpoll: (update) => response = update })
|
|
90
90
|
inject({ aiInjections, manualInjections })
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -132,22 +132,18 @@
|
|
|
132
132
|
{/if}
|
|
133
133
|
|
|
134
134
|
{#if isEditorialMode && authorized}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
message: response?.ai_progress_message,
|
|
148
|
-
percentage: response?.ai_progress_percentage,
|
|
149
|
-
}} />
|
|
150
|
-
{/await}
|
|
135
|
+
<Editor
|
|
136
|
+
bind:linkInjections
|
|
137
|
+
bind:this={editor}
|
|
138
|
+
{htmlString}
|
|
139
|
+
{loading}
|
|
140
|
+
injectionsEnabled={response?.injections_enabled}
|
|
141
|
+
aiStatus={{
|
|
142
|
+
automationEnabled: response?.automation_enabled,
|
|
143
|
+
aiRunning: response?.ai_running && response?.automation_enabled,
|
|
144
|
+
message: response?.ai_progress_message,
|
|
145
|
+
percentage: response?.ai_progress_percentage,
|
|
146
|
+
}} />
|
|
151
147
|
{/if}
|
|
152
148
|
|
|
153
149
|
{#if activeInjection && activeInjection.title_details}
|
|
@@ -6,57 +6,78 @@
|
|
|
6
6
|
automationEnabled?: boolean,
|
|
7
7
|
message?: string,
|
|
8
8
|
percentage?: number,
|
|
9
|
+
aiInjectionsCount?: number,
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
const { aiRunning = false, automationEnabled = false, message = '', percentage = 0 }: Props = $props()
|
|
12
|
+
const { aiRunning = false, automationEnabled = false, message = '', percentage = 0, aiInjectionsCount = 0 }: Props = $props()
|
|
13
|
+
|
|
14
|
+
const initialAIInjectionsCount = aiInjectionsCount
|
|
15
|
+
|
|
16
|
+
let dismissed = $state(false)
|
|
12
17
|
</script>
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
<div class="
|
|
16
|
-
<div class="
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
+
{#if !dismissed}
|
|
20
|
+
<div class="ai-indicator" class:running={aiRunning} data-testid="ai-indicator">
|
|
21
|
+
<div class="content">
|
|
22
|
+
<div class="icon">
|
|
23
|
+
<IconAi />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div>
|
|
27
|
+
{#if !automationEnabled}
|
|
28
|
+
<strong>AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net">Partner Portal</a>
|
|
29
|
+
{:else if aiRunning}
|
|
30
|
+
<strong>AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready.
|
|
31
|
+
|
|
32
|
+
<div class="message">
|
|
33
|
+
{message}
|
|
34
|
+
|
|
35
|
+
<span class="ellipses">
|
|
36
|
+
{#each { length: 3 }}
|
|
37
|
+
<span>.</span>
|
|
38
|
+
{/each}
|
|
39
|
+
</span>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="loading-bar">
|
|
43
|
+
<div class="loading-bar-progress">
|
|
44
|
+
<div class="loading-bar-fill" data-testid="loading-bar" style:width="{Math.max(percentage, 3)}%"></div>
|
|
45
|
+
</div>
|
|
19
46
|
|
|
20
|
-
|
|
21
|
-
{#if !automationEnabled}
|
|
22
|
-
<strong>AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net">Partner Portal</a>
|
|
23
|
-
{:else if aiRunning}
|
|
24
|
-
AI links are currently processing. This can take several minutes. We'll automatically insert all found injections once ready.
|
|
25
|
-
|
|
26
|
-
<div class="message">
|
|
27
|
-
{message}
|
|
28
|
-
|
|
29
|
-
<span class="ellipses">
|
|
30
|
-
{#each { length: 3 }}
|
|
31
|
-
<span>.</span>
|
|
32
|
-
{/each}
|
|
33
|
-
</span>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div class="loading-bar">
|
|
37
|
-
<div class="loading-bar-progress">
|
|
38
|
-
<div class="loading-bar-fill" data-testid="loading-bar" style:width="{Math.max(percentage, 3)}%"></div>
|
|
47
|
+
<div class="loading-bar-label">{percentage}%</div>
|
|
39
48
|
</div>
|
|
49
|
+
{:else}
|
|
50
|
+
<p>
|
|
51
|
+
<strong>AI has finished processing.</strong> <br>
|
|
52
|
+
{#if initialAIInjectionsCount === aiInjectionsCount}
|
|
53
|
+
No new injections where found.
|
|
54
|
+
{:else}
|
|
55
|
+
{aiInjectionsCount} Injections where found and added to the page.
|
|
56
|
+
{/if}
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
<button class="dismiss" onclick={() => dismissed = true}>Dismiss</button>
|
|
60
|
+
{/if}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
40
63
|
|
|
41
|
-
|
|
42
|
-
|
|
64
|
+
<div class="border">
|
|
65
|
+
{#if aiRunning}
|
|
66
|
+
<div class="animator" data-test-id="animator"></div>
|
|
43
67
|
{/if}
|
|
44
68
|
</div>
|
|
45
|
-
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<div class="border">
|
|
49
|
-
{#if aiRunning}
|
|
50
|
-
<div class="animator" data-test-id="animator"></div>
|
|
51
|
-
{/if}
|
|
52
69
|
</div>
|
|
53
|
-
|
|
70
|
+
{/if}
|
|
54
71
|
|
|
55
72
|
<style lang="scss">
|
|
56
73
|
a {
|
|
57
74
|
color: currentColor;
|
|
58
75
|
}
|
|
59
76
|
|
|
77
|
+
p {
|
|
78
|
+
margin: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
60
81
|
.ai-indicator {
|
|
61
82
|
position: relative;
|
|
62
83
|
margin: 0 margin(0.5);
|
|
@@ -168,4 +189,23 @@
|
|
|
168
189
|
}
|
|
169
190
|
}
|
|
170
191
|
}
|
|
192
|
+
|
|
193
|
+
.dismiss {
|
|
194
|
+
appearance: none;
|
|
195
|
+
margin-top: margin(0.25);
|
|
196
|
+
padding: margin(0.25);
|
|
197
|
+
border: 2px solid var(--playpilot-content-light);
|
|
198
|
+
border-radius: margin(0.25);
|
|
199
|
+
background: var(--playpilot-light);
|
|
200
|
+
font-family: inherit;
|
|
201
|
+
color: var(--playpilot-text-color-alt);
|
|
202
|
+
font-size: margin(0.75);
|
|
203
|
+
line-height: 1;
|
|
204
|
+
cursor: pointer;
|
|
205
|
+
|
|
206
|
+
&:hover {
|
|
207
|
+
background: var(--playpilot-content-light);
|
|
208
|
+
color: var(--playpilot-text-color);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
171
211
|
</style>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import { track } from '$lib/tracking'
|
|
15
15
|
import { TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
16
16
|
import { heading } from '$lib/actions/heading'
|
|
17
|
+
import { separateLinkInjectionTypes } from '$lib/linkInjection'
|
|
17
18
|
|
|
18
19
|
interface Props {
|
|
19
20
|
linkInjections: LinkInjection[],
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
const filteredInjections = $derived(linkInjections.filter((i) => i.title_details && !i.removed && !i.duplicate && (i.manual || (!i.manual && !i.failed))))
|
|
55
56
|
const sortedInjections = $derived(sortInjections(filteredInjections))
|
|
56
57
|
const { automationEnabled = false, aiRunning = false } = $derived(aiStatus)
|
|
58
|
+
const initialAiRunning = $derived(!loading && untrack(() => aiStatus.aiRunning))
|
|
57
59
|
|
|
58
60
|
$effect(() => {
|
|
59
61
|
if (loading) return
|
|
@@ -173,8 +175,8 @@
|
|
|
173
175
|
</div>
|
|
174
176
|
{/if}
|
|
175
177
|
|
|
176
|
-
{#if
|
|
177
|
-
<AIIndicator {...aiStatus} />
|
|
178
|
+
{#if initialAiRunning || !automationEnabled}
|
|
179
|
+
<AIIndicator {...aiStatus} aiInjectionsCount={separateLinkInjectionTypes(linkInjections).aiInjections.length} />
|
|
178
180
|
{/if}
|
|
179
181
|
|
|
180
182
|
{#if hasError}
|
|
@@ -227,7 +229,7 @@
|
|
|
227
229
|
width: 100%;
|
|
228
230
|
max-width: margin(22);
|
|
229
231
|
height: min(70vh, margin(40));
|
|
230
|
-
min-height:
|
|
232
|
+
min-height: min(25rem, 80vh);
|
|
231
233
|
margin: 0;
|
|
232
234
|
padding: margin(1);
|
|
233
235
|
border-radius: margin(1.5);
|
|
@@ -338,7 +340,7 @@
|
|
|
338
340
|
transition: opacity 100ms;
|
|
339
341
|
font-family: inherit;
|
|
340
342
|
color: var(--playpilot-text-color-alt);
|
|
341
|
-
font-size: 0.
|
|
343
|
+
font-size: margin(0.85);
|
|
342
344
|
cursor: pointer;
|
|
343
345
|
|
|
344
346
|
&:hover {
|
|
@@ -3,6 +3,7 @@ import { fetchConfig, fetchLinkInjections, getApiToken, pollLinkInjections } fro
|
|
|
3
3
|
import { fakeFetch } from '../helpers'
|
|
4
4
|
import { authorize, isEditorialModeEnabled } from '$lib/auth'
|
|
5
5
|
import { Language } from '$lib/enums/Language'
|
|
6
|
+
import { waitFor } from '@testing-library/svelte'
|
|
6
7
|
|
|
7
8
|
vi.mock('$lib/auth', async importActual => {
|
|
8
9
|
const actual = await importActual()
|
|
@@ -140,6 +141,23 @@ describe('$lib/api', () => {
|
|
|
140
141
|
expect(global.fetch).toHaveBeenCalledTimes(3)
|
|
141
142
|
})
|
|
142
143
|
|
|
144
|
+
it('Should call given onpoll function when polling', async () => {
|
|
145
|
+
fakeFetch({ response: { automation_enabled: true, ai_running: true } })
|
|
146
|
+
|
|
147
|
+
const onpoll = vi.fn()
|
|
148
|
+
pollLinkInjections('https://some-url', 'some-html', { requireCompletedResult: true, pollInterval: 500, onpoll })
|
|
149
|
+
|
|
150
|
+
await waitFor(() => {
|
|
151
|
+
expect(onpoll).toHaveBeenCalledTimes(1)
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
await new Promise(res => setTimeout(res, 600)) // Wait for a polling
|
|
155
|
+
expect(onpoll).toHaveBeenCalledTimes(2)
|
|
156
|
+
|
|
157
|
+
await new Promise(res => setTimeout(res, 600)) // Wait for a polling
|
|
158
|
+
expect(onpoll).toHaveBeenCalledTimes(3)
|
|
159
|
+
})
|
|
160
|
+
|
|
143
161
|
it('Should stop polling if replacements are ready', async () => {
|
|
144
162
|
const response = { automation_enabled: true, ai_running: false, link_injections: [{ title: 'value' }] }
|
|
145
163
|
fakeFetch({ response })
|
|
@@ -81,7 +81,7 @@ describe('$routes/+page.svelte', () => {
|
|
|
81
81
|
|
|
82
82
|
await waitFor(() => {
|
|
83
83
|
expect(pollLinkInjections).toHaveBeenCalledWith(expect.any(String), expect.any(String), { maxTries: 1 })
|
|
84
|
-
expect(pollLinkInjections).toHaveBeenCalledWith(expect.any(String), expect.any(String), { requireCompletedResult: true })
|
|
84
|
+
expect(pollLinkInjections).toHaveBeenCalledWith(expect.any(String), expect.any(String), { requireCompletedResult: true, onpoll: expect.any(Function) })
|
|
85
85
|
})
|
|
86
86
|
})
|
|
87
87
|
|
|
@@ -104,7 +104,7 @@ describe('$routes/+page.svelte', () => {
|
|
|
104
104
|
})
|
|
105
105
|
|
|
106
106
|
await waitFor(() => {
|
|
107
|
-
expect(pollLinkInjections).toHaveBeenCalledWith(expect.any(String), expect.any(String), { requireCompletedResult: true })
|
|
107
|
+
expect(pollLinkInjections).toHaveBeenCalledWith(expect.any(String), expect.any(String), { requireCompletedResult: true, onpoll: expect.any(Function) })
|
|
108
108
|
})
|
|
109
109
|
|
|
110
110
|
expect(pollLinkInjections).toHaveBeenCalledTimes(2)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { render } from '@testing-library/svelte'
|
|
1
|
+
import { fireEvent, render, waitFor } from '@testing-library/svelte'
|
|
2
2
|
import { describe, expect, it } from 'vitest'
|
|
3
3
|
|
|
4
4
|
import AIIndicator from '../../../../routes/components/Editorial/AIIndicator.svelte'
|
|
@@ -44,4 +44,36 @@ describe('AIIndicator.svelte', () => {
|
|
|
44
44
|
expect(getByTestId('loading-bar').style.width).toBe('3%')
|
|
45
45
|
expect(getByText('0%')).toBeTruthy()
|
|
46
46
|
})
|
|
47
|
+
|
|
48
|
+
it('Should show message after aiInjectionsCount has changed and aiRunning is false', async () => {
|
|
49
|
+
const { getByText, rerender } = render(AIIndicator, { aiRunning: true, automationEnabled: true, message: 'Some message', aiInjectionsCount: 0 })
|
|
50
|
+
rerender({ aiRunning: false, aiInjectionsCount: 5 })
|
|
51
|
+
|
|
52
|
+
await waitFor(() => {
|
|
53
|
+
expect(getByText('AI has finished processing.')).toBeTruthy()
|
|
54
|
+
expect(getByText('5 Injections where found and added to the page.')).toBeTruthy()
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('Should show message after aiInjectionsCount has changed and aiRunning is false but no new injections were found', async () => {
|
|
59
|
+
const { getByText, rerender } = render(AIIndicator, { aiRunning: true, automationEnabled: true, message: 'Some message', aiInjectionsCount: 0 })
|
|
60
|
+
rerender({ aiRunning: false, aiInjectionsCount: 0 })
|
|
61
|
+
|
|
62
|
+
await waitFor(() => {
|
|
63
|
+
expect(getByText('AI has finished processing.')).toBeTruthy()
|
|
64
|
+
expect(getByText('No new injections where found.')).toBeTruthy()
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
it('Should dismiss entire element when dismiss button is pressed', async () => {
|
|
69
|
+
const { getByText, rerender, queryByTestId } = render(AIIndicator, { aiRunning: true, automationEnabled: true, message: 'Some message', aiInjectionsCount: 0 })
|
|
70
|
+
rerender({ aiRunning: false, aiInjectionsCount: 5 })
|
|
71
|
+
|
|
72
|
+
expect(queryByTestId('ai-indicator')).toBeTruthy()
|
|
73
|
+
|
|
74
|
+
await waitFor(() => getByText('Dismiss'))
|
|
75
|
+
await fireEvent.click(getByText('Dismiss'))
|
|
76
|
+
|
|
77
|
+
expect(queryByTestId('ai-indicator')).not.toBeTruthy()
|
|
78
|
+
})
|
|
47
79
|
})
|
package/vite.config.js
CHANGED
|
@@ -33,10 +33,12 @@ export default defineConfig(({ command }) => ({
|
|
|
33
33
|
const sourcePath = path.join(assetsPath, jsFile)
|
|
34
34
|
const targetPath = path.join(distPath, 'link-injections.js')
|
|
35
35
|
|
|
36
|
-
// Read original file and
|
|
36
|
+
// Read original file and wrap it in a self contained function
|
|
37
37
|
const originalContent = fs.readFileSync(sourcePath, 'utf8')
|
|
38
|
-
|
|
38
|
+
const wrappedContent = `(() => {\n${originalContent}\n})();\n`
|
|
39
39
|
|
|
40
|
+
// Write a new file
|
|
41
|
+
fs.writeFileSync(targetPath, wrappedContent)
|
|
40
42
|
console.log(`Moved and renamed ${jsFile} to link-injections.js`)
|
|
41
43
|
|
|
42
44
|
// Remove original file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as rt,a as ot,c as st,d as vt,g as ct,e as dt,i as ut,l as ht,u as Ze,r as ft,p as k,t as q,f as le,h as o,n as fe,j as de,k as se,s as qe,m as J,o as ve,q as b,v as u,w as T,x as Se,y as ie,z as gt,A as t,B as _,C as ze,D as $,E as xe,F as he,G as we,H as Z,$ as ee,I as Re,J as P,K as W,L as De,M as Pe,N as Fe,T as Ke,O as Xe,P as X,Q as Je,R as _t,S as mt,U as Ge,V as Ve,W as Qe,X as bt,Y as yt,Z as pt,_ as et,a0 as te,a1 as tt,a2 as $e,a3 as xt,a4 as nt,a5 as at,a6 as it,a7 as kt,a8 as wt,a9 as Ct,aa as lt,ab as Ye,ac as jt,ad as It}from"./index-o5n01Vib.js";function St(a,e,n,i,v){var h=a,r="",c;rt(()=>{r!==(r=e()??"")&&(c!==void 0&&(dt(c),c=void 0),r!==""&&(c=ot(()=>{var p=r+"",m=st(p);vt(ct(m),m.lastChild),h.before(m)})))})}function Pt(a,e,n=e){var i=ut();ht(a,"input",v=>{var h=v?a.defaultValue:a.value;if(h=Le(a)?Ne(h):h,n(h),i&&h!==(h=e())){var r=a.selectionStart,c=a.selectionEnd;a.value=h??"",c!==null&&(a.selectionStart=r,a.selectionEnd=Math.min(c,a.value.length))}}),Ze(e)==null&&a.value&&n(Le(a)?Ne(a.value):a.value),ft(()=>{var v=e();Le(a)&&v===Ne(a.value)||a.type==="date"&&!v&&!a.value||v!==a.value&&(a.value=v??"")})}function Le(a){var e=a.type;return e==="number"||e==="range"}function Ne(a){return a===""?null:+a}var Mt=fe('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Et(a,e){const n=k(e,"expanded",3,!1);var i=Mt();q(()=>le(i,"expanded",n())),o(a,i)}var Ht=fe('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Tt(a){var e=Ht();o(a,e)}function At(a,e,n){e(!e()),n()(e())}var Lt=b('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function Be(a,e){se(e,!0);let n=k(e,"active",15),i=k(e,"fullwidth",3,!1),v=k(e,"label",3,""),h=k(e,"onclick",3,()=>null);var r=Lt();r.__click=[At,n,h];var c=u(r),p=u(c);qe(p,()=>e.children),q(()=>{J(r,"aria-label",`Toggle ${v()??""} ${(n()?"off":"on")??""}`),le(r,"active",n()),le(r,"fullwidth",i())}),o(a,r),ve()}de(["click"]);var Nt=b('<input type="text" class="svelte-1vrer3i">');function Oe(a,e){let n=k(e,"value",15),i=k(e,"label",3,""),v=k(e,"name",3,""),h=k(e,"readonly",3,!1),r=k(e,"oninput",3,()=>null);var c=Nt();c.__input=function(...p){var m;(m=r())==null||m.apply(this,p)},q(()=>{J(c,"name",v()),J(c,"aria-label",i()),J(c,"placeholder",i()),c.readOnly=h()}),Pt(c,n),o(a,c)}de(["input"]);var Bt=fe('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),qt=fe('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Rt=fe('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function We(a,e){const n=k(e,"align",3,"bottom");var i=Rt(),v=u(i);{var h=c=>{var p=Bt();o(c,p)},r=c=>{var p=Se(),m=ie(p);{var j=w=>{var I=qt();o(w,I)};T(m,w=>{n()==="center"&&w(j)},!0)}o(c,p)};T(v,c=>{n()==="bottom"?c(h):c(r,!1)})}o(a,i)}var $t=b("<div><!></div>");function Ce(a,e){se(e,!0);const n=k(e,"type",3,"error");var i=$t(),v=u(i);qe(v,()=>e.children),q(()=>gt(i,`alert ${n()??""} svelte-18si0a5`)),o(a,i),ve()}var Ot=b("<!> In-text Playlink",1),Vt=b("<!> Bottom Playlink",1),Yt=b('<div class="alert svelte-1shw34x"><!></div>'),Wt=(a,e)=>e().after_article_style="playlinks",Ut=(a,e)=>e().after_article_style="modal_button",Zt=b('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),zt=b('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function Dt(a,e){se(e,!0);const n=k(e,"linkInjection",7),i=$(()=>n().after_article_style==="modal_button");var v=zt(),h=ie(v),r=u(h),c=$(()=>n().in_text??!0);Be(r,{fullwidth:!0,get active(){return t(c)},onclick:y=>{n().in_text=y,n().manual=!0},label:"In-text Playlink",children:(y,l)=>{var f=Ot(),d=ie(f);We(d,{align:"center"}),o(y,f)},$$slots:{default:!0}});var p=_(r,2),m=$(()=>n().after_article??!1);Be(p,{fullwidth:!0,get active(){return t(m)},onclick:y=>{n().after_article=y,n().manual=!0},label:"Bottom Playlink",children:(y,l)=>{var f=Vt(),d=ie(f);We(d,{align:"bottom"}),o(y,f)},$$slots:{default:!0}});var j=_(h,2);{var w=y=>{var l=Yt(),f=u(l);Ce(f,{type:"warning",children:(d,C)=>{var A=xe("At least one layout option must be selected for the playlink to be visible.");o(d,A)},$$slots:{default:!0}}),he(3,l,()=>we,()=>({duration:200})),o(y,l)};T(j,y=>{ze(n())||y(w)})}var I=_(j,2);{var R=y=>{var l=Zt(),f=_(u(l),2),d=u(f);d.__click=[Wt,n];var C=_(d,2);C.__click=[Ut,n];var A=_(C,2);q(()=>{J(f,"aria-activedescendant",`playlinks-${(t(i)?"after-article":"in-text")??""}`),J(d,"aria-selected",!t(i)||null),le(d,"active",!t(i)),J(C,"aria-selected",t(i)||null),le(C,"active",t(i)),le(A,"right",t(i))}),he(3,l,()=>we,()=>({duration:100})),o(y,l)};T(I,y=>{n().after_article&&y(R)})}o(a,v),ve()}de(["click"]);var Ft=fe('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Kt(a){var e=Ft();o(a,e)}var Xt=(a,e)=>P(e,!t(e)),Jt=b('<div class="content svelte-1fmy0wh"><!></div>'),Gt=b('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function Qt(a,e){se(e,!0);let n=W(!1),i=W(null);function v(j){var I;const w=j.target;w===t(i)||(I=t(i))!=null&&I.contains(w)||P(n,!1)}var h=Gt();Z("click",ee,v);var r=u(h);r.__click=[Xt,n];var c=u(r);Kt(c),Re(r,j=>P(i,j),()=>t(i));var p=_(r,2);{var m=j=>{var w=Jt(),I=u(w);qe(I,()=>e.children),he(1,w,()=>De,()=>({duration:150,y:5})),o(j,w)};T(p,j=>{t(n)&&j(m)})}q(()=>{J(r,"aria-label",e.ariaLabel),J(r,"aria-expanded",t(n))}),o(a,h),ve()}de(["click"]);function en(a,e,n){requestAnimationFrame(()=>e());const i=a.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const v=n()[0];v&&v.scrollIntoView({behavior:"smooth"})}var tn=(a,e)=>P(e,!t(e)),nn=b('<button class="expand-sentence svelte-8gd2db"> </button>'),an=b('<button class="context-menu-action svelte-8gd2db">Remove</button>'),ln=(a,e)=>P(e,!t(e)),rn=b('<div class="warning svelte-8gd2db" aria-label="Invalid playlink settings"><!></div>'),on=b('<div class="actions svelte-8gd2db"><button class="expand svelte-8gd2db" aria-label="Expand"><!></button> <!> <!></div>'),sn=b('<div class="expanded svelte-8gd2db"><div class="label svelte-8gd2db">Link URL</div> <!> <div class="label offset svelte-8gd2db">Layout options</div> <div class="type-select svelte-8gd2db"><!></div></div>'),vn=b('<div class="item svelte-8gd2db"><div class="header svelte-8gd2db"><img class="poster svelte-8gd2db" alt="" width="32" height="48"> <div class="info svelte-8gd2db"><div class="title svelte-8gd2db"> </div> <div class="sentence svelte-8gd2db"><!> <!></div></div> <div class="context-menu svelte-8gd2db"><!></div></div> <div class="content svelte-8gd2db"><!> <!></div></div>');function cn(a,e){se(e,!0);const n=k(e,"linkInjection",15),i=k(e,"onremove",3,()=>null),v=k(e,"onhighlight",3,()=>null),h=$(()=>n()||{}),r=$(()=>t(h).key),c=$(()=>t(h).sentence),p=$(()=>t(h).title_details),m=$(()=>t(h).failed),j=$(()=>t(h).failed_message),w=$(()=>t(h).inactive),I=$(()=>t(p)),R=$(()=>_t(n().sentence,n().title,60));let y=W(!1),l=W(!1),f=W(!1),d=W(null);Pe(()=>{t(m)&&Fe(Ke.InjectionFailed,t(I),{phrase:n().title,sentence:t(c)})});function C(E=!0){O().forEach(s=>{s.classList.toggle("playpilot-injection-highlight",E)})}function A(E){let H=E.target,s=H==null?void 0:H.dataset.playpilotInjectionKey;H&&!s&&(H=H.closest(`[data-playpilot-injection-key="${t(r)}"]`),s=H==null?void 0:H.dataset.playpilotInjectionKey),P(f,s===t(r)),t(d)&&t(f)&&v()(t(d))}function O(){const E=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${t(r)}"]`));return E.length?E:mt(Ge()).filter(H=>Ve(H.innerText).includes(Ve(n().sentence)))||[]}var M=vn();Z("mouseover",ee,A),M.__click=[en,C,O];var V=u(M),x=u(V);q(()=>J(x,"src",Xe(t(I).standing_poster)));var S=_(x,2),L=u(S),N=u(L),U=_(L,2),z=u(U);St(z,()=>(t(l)?t(c):t(R)).replace(n().title,`<em>${n().title}</em>`));var Y=_(z,2);{var F=E=>{var H=nn();H.__click=[tn,l];var s=u(H);q(()=>X(s,t(l)?"Less":"More")),o(E,H)};T(Y,E=>{t(R).length<t(c).length&&E(F)})}var G=_(S,2),ge=u(G);Qt(ge,{ariaLabel:"More options",children:(E,H)=>{var s=an();s.__click=function(...g){var B;(B=i())==null||B.apply(this,g)},o(E,s)},$$slots:{default:!0}});var ye=_(V,2),_e=u(ye);{var Me=E=>{Ce(E,{children:(H,s)=>{var g=xe();q(()=>X(g,t(j))),o(H,g)},$$slots:{default:!0}})},Ee=E=>{var H=on(),s=u(H);s.__click=[ln,y];var g=u(s);Et(g,{get expanded(){return t(y)}});var B=_(s,2);{var K=re=>{var me=rn(),be=u(me);Tt(be),he(3,me,()=>Qe,()=>({duration:100})),o(re,me)};T(B,re=>{ze(n())||re(K)})}var ne=_(B,2),ue=$(()=>t(w)?"Inactive":"Visible"),ae=$(()=>!n().inactive);Be(ne,{get label(){return t(ue)},get active(){return t(ae)},onclick:re=>{n(n().inactive=!re,!0),n(n().manual=!0,!0)},children:(re,me)=>{var be=xe();q(()=>X(be,t(w)?"Inactive":"Visible")),o(re,be)},$$slots:{default:!0}}),q(()=>J(s,"aria-expanded",t(y))),o(E,H)};T(_e,E=>{t(m)?E(Me):E(Ee,!1)})}var je=_(_e,2);{var He=E=>{var H=sn(),s=_(u(H),2);Oe(s,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(K){n(n().playpilot_url=K,!0)}});var g=_(s,4),B=u(g);Dt(B,{get linkInjection(){return n()}}),he(3,H,()=>we,()=>({duration:100})),o(E,H)};T(je,E=>{t(y)&&E(He)})}Re(M,E=>P(d,E),()=>t(d)),q(()=>{le(M,"highlighted",t(f)),le(M,"inactive",t(w)),X(N,t(I).title)}),Z("mouseenter",M,()=>C(!0)),Z("mouseleave",M,()=>C(!1)),Z("error",x,({target:E})=>E.src=Je),he(6,M,()=>we,()=>({duration:200})),o(a,M),ve()}de(["click"]);var dn=b('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function un(a,e){se(e,!0);let n=k(e,"element",7),i=k(e,"position",23,()=>({x:0,y:0})),v=k(e,"limit",19,()=>({x:0,y:0})),h=k(e,"onchange",3,()=>null),r=!1,c={x:0,y:0},p=i();Pe(()=>{m(i().x,i().y)});function m(l,f){const d=window.innerWidth,C=window.innerHeight,A=n().clientWidth,O=n().clientHeight;l=Math.min(Math.max(l,v().x),d-A-v().x),f=Math.min(Math.max(f,v().y),C-O-v().y),n().style.right=l+"px",n().style.bottom=Math.max(f,v().y)+"px",i({x:l,y:f}),h()(i())}function j(l){var f,d;return{x:l.pageX||((f=l.touches)==null?void 0:f[0].pageX)||0,y:l.pageY||((d=l.touches)==null?void 0:d[0].pageY)||0}}function w(l){r=!0,c=j(l),p=i()}function I(l){if(!r)return;const f=j(l),d=f.x-c.x,C=f.y-c.y,A=p.x-d,O=p.y-C;m(A,O)}function R(){r&&(r=!1)}var y=dn();Z("mousemove",ee,I),Z("touchmove",ee,I,void 0,!0),Z("mouseup",ee,R),Z("touchend",ee,R),Z("resize",ee,()=>m(i().x,i().y)),y.__mousedown=w,y.__touchstart=w,o(a,y),ve()}de(["mousedown","touchstart"]);var hn=b('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function fn(a,e){se(e,!0);let n=k(e,"element",7),i=k(e,"height",7,200),v=k(e,"onchange",3,()=>null);const h=16;let r=!1,c=0,p=i();Pe(()=>{i()&&m(i())});function m(l){const f=window.getComputedStyle(n()).minHeight||"0",d=Math.max(parseInt(f),Math.min(l,R()));n().style.height=`${d}px`,i(d),v()(d)}function j(l){var f,d;r=!0,c=l.pageY||((d=(f=l.touches)==null?void 0:f[0])==null?void 0:d.pageY)||0,p=n().clientHeight}function w(l){var A,O;if(!r)return;const f=l.pageY||((O=(A=l.touches)==null?void 0:A[0])==null?void 0:O.pageY)||0,d=c-f,C=p+d;m(C)}function I(){r=!1}function R(){const l=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-h*2-l,0)}var y=hn();Z("mousemove",ee,w),Z("touchmove",ee,w,void 0,!0),Z("mouseup",ee,I),Z("touchend",ee,I),Z("resize",ee,()=>{i()&&m(i())}),y.__mousedown=j,y.__touchstart=j,o(a,y),ve()}de(["mousedown","touchstart"]);var gn=fe('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function _n(a){var e=gn();o(a,e)}async function mn(a){const e=new Headers({"Content-Type":"application/json"}),n=bt();if(!n)throw new Error("No token was provided");const i=await fetch(yt+`/search/titles/?api-token=${n}&query=${a}`,{headers:e});if(!i.ok)throw i;return await i.json()}var bn=fe('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function yn(a){var e=bn();o(a,e)}var pn=b("<div> </div>"),xn=a=>a.stopImmediatePropagation(),kn=b('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function Ue(a,e){se(e,!0);const n=k(e,"hoverable",3,!0),i=k(e,"onclick",3,()=>null);var v=kn();v.__click=function(...M){var V;(V=i())==null||V.apply(this,M)};var h=u(v);q(()=>J(h,"src",Xe(e.title.standing_poster)));var r=_(h,2),c=u(r),p=u(c),m=_(c,2),j=u(m),w=u(j);pt(w);var I=_(w),R=_(j,2),y=u(R),l=_(R,2),f=u(l),d=_(l,2);{var C=M=>{var V=pn(),x=u(V);q(()=>X(x,`${e.title.length??""} min`)),o(M,V)};T(d,M=>{e.title.length&&M(C)})}var A=_(r,2);A.__click=[xn];var O=u(A);yn(O),q(()=>{le(v,"hoverable",n()),X(p,e.title.title),X(I,` ${e.title.imdb_score??""}`),X(y,e.title.year),X(f,e.title.type),J(A,"href",`${et}/${e.title.type??""}/${e.title.slug??""}`)}),Z("error",h,({target:M})=>M.src=Je),o(a,v),ve()}de(["click"]);var wn=b('<em class="empty svelte-1olb8n0">No results found</em>'),Cn=b('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),jn=b('<div class="selected svelte-1olb8n0"><!></div>'),In=b('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function Sn(a,e){se(e,!0);let n=k(e,"onselect",3,()=>null),i=k(e,"query",15),v=W(te([])),h=W(null),r=W(!1);tt(()=>{i()&&c(i())});async function c(l){P(r,!0);try{P(v,te(await mn(l)))}finally{P(r,!1)}}function p(l){i(l.title),P(h,te(l)),n()(l)}var m=In(),j=u(m);Oe(j,{oninput:()=>P(h,null),name:"search",label:"Search...",get value(){return i()},set value(l){i(l)}});var w=_(j,2);{var I=l=>{var f=Cn();$e(f,21,()=>t(v),d=>d.sid,(d,C)=>{Ue(d,{get title(){return t(C)},onclick:()=>p(t(C))})},d=>{var C=Se(),A=ie(C);{var O=M=>{var V=wn();o(M,V)};T(A,M=>{t(r)||M(O)})}o(d,C)}),o(l,f)};T(w,l=>{i()&&!t(h)&&l(I)})}var R=_(w,2);{var y=l=>{var f=jn(),d=u(f);Ue(d,{get title(){return t(h)},hoverable:!1}),o(l,f)};T(R,l=>{t(h)&&l(y)})}o(a,m),ve()}function Pn(a,e,n,i,v,h){if(!t(e)||!t(n))return;const r=t(n).type==="movie"?"movie":"show",c=et+`/${r}/${t(n).slug}`,p={sid:t(n).sid,title:t(e),sentence:t(i),playpilot_url:c,key:kt(t(n).sid),title_details:t(n),manual:!0};v.onsave(p),h()()}var Mn=b('<div class="error svelte-1i8p6op"><!></div>'),En=b('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Hn=b('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function Tn(a,e){se(e,!0);let n=k(e,"htmlString",3,""),i=k(e,"onclose",3,()=>null),v=W(""),h=W(""),r=W(null),c=W(""),p=W("");Pe(m);function m(){const x=window.getSelection();if(!(x!=null&&x.anchorNode)||x.anchorNode.parentElement&&!Ge().contains(x.anchorNode.parentElement))return;const S=x.toString().trim();if(!S)return;P(c,""),P(v,te(S));const L=x.getRangeAt(0).cloneContents();if(Array.from(L.childNodes).filter(Y=>{var F;return(F=Y.textContent)==null?void 0:F.trim()}).length>1){P(c,"Selection contains multiple items. Selection may not contain a mix of styled and non styled text. Please select the text more directly.");return}P(p,te(t(v))),P(h,te(j(x,S)));const U=x.getRangeAt(0).commonAncestorContainer.textContent,z=xt(n());(!U||!z.includes(U))&&P(c,"Selection was not inside of given content")}function j(x,S){const L=x.getRangeAt(0);let N=L.startContainer;for(;(N.textContent||"").length<=S.length*3&&N.parentNode;)N=N.parentNode;if(!N||!N.textContent)return"";const U=N.textContent,z=w(N,L.startContainer,L.startOffset),Y=w(N,L.endContainer,L.endOffset),F=U.slice(0,z).lastIndexOf("."),G=U.slice(Y).match(/[.!?]/),ge=G?Y+G.index:U.length,ye=F===-1?0:F+1,_e=ge;return U.slice(ye,_e+1).trim()}function w(x,S,L){let N=0;const U=x,z=Y=>{var F;if(Y===S)return N+=L,!0;Y.nodeType===Node.TEXT_NODE&&(N+=((F=Y.textContent)==null?void 0:F.length)||0);for(let G=Y.firstChild;G;G=G.nextSibling)if(z(G))return!0;return!1};return z(U),N}function I(x){var S,L;P(r,te(x)),(L=(S=window.getSelection())==null?void 0:S.removeAllRanges)==null||L.call(S)}var R=Hn();Z("mouseup",ee,m);var y=u(R),l=u(y);nt(l,{get onclick(){return i()},size:"24px",children:(x,S)=>{_n(x)},$$slots:{default:!0}});var f=_(l,2);at(f,(x,S)=>{var L;return(L=it)==null?void 0:L(x,S)},()=>2);var d=_(y,6);Oe(d,{get value(){return t(v)},label:"Select text on the page",name:"selected-text",readonly:!0});var C=_(d,2);{var A=x=>{var S=Mn(),L=u(S);Ce(L,{children:(N,U)=>{var z=xe();q(()=>X(z,t(c))),o(N,z)},$$slots:{default:!0}}),o(x,S)};T(C,x=>{t(c)&&x(A)})}var O=_(C,2);{var M=x=>{var S=En(),L=_(ie(S),2);wt(L,()=>t(h)+t(v),N=>{Sn(N,{onselect:I,get query(){return t(p)},set query(U){P(p,te(U))}})}),o(x,S)};T(O,x=>{t(c)||x(M)})}var V=_(O,2);V.__click=[Pn,v,r,h,e,i],q(()=>V.disabled=!t(v)||!t(r)),o(a,R),ve()}de(["click"]);var An=fe('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function Ln(a){var e=An();o(a,e)}var Nn=b('<strong class="svelte-1l4sxuh">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1l4sxuh">Partner Portal</a>',1),Bn=b('<span class="svelte-1l4sxuh">.</span>'),qn=b(`AI links are currently processing. This can take several minutes. We'll automatically insert all found injections once ready. <div class="message svelte-1l4sxuh"> <span class="ellipses svelte-1l4sxuh"></span></div> <div class="loading-bar svelte-1l4sxuh"><div class="loading-bar-progress svelte-1l4sxuh"><div class="loading-bar-fill svelte-1l4sxuh" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1l4sxuh"> </div></div>`,1),Rn=b('<div class="animator svelte-1l4sxuh" data-test-id="animator"></div>'),$n=b('<div class="ai-indicator svelte-1l4sxuh"><div class="content svelte-1l4sxuh"><div class="icon svelte-1l4sxuh"><!></div> <div class="svelte-1l4sxuh"><!></div></div> <div class="border svelte-1l4sxuh"><!></div></div>');function On(a,e){const n=k(e,"aiRunning",3,!1),i=k(e,"automationEnabled",3,!1),v=k(e,"message",3,""),h=k(e,"percentage",3,0);var r=$n(),c=u(r),p=u(c),m=u(p);Ln(m);var j=_(p,2),w=u(j);{var I=d=>{var C=Nn();o(d,C)},R=d=>{var C=Se(),A=ie(C);{var O=M=>{var V=qn(),x=_(ie(V)),S=u(x),L=_(S);$e(L,20,()=>({length:3}),Ct,(ge,ye)=>{var _e=Bn();o(ge,_e)});var N=_(x,2),U=u(N),z=u(U);const Y=$(()=>`${Math.max(h(),3)??""}%`);q(()=>lt(z,"width",t(Y)));var F=_(U,2),G=u(F);q(()=>{X(S,`${v()??""} `),X(G,`${h()??""}%`)}),o(M,V)};T(A,M=>{n()&&M(O)},!0)}o(d,C)};T(w,d=>{i()?d(R,!1):d(I)})}var y=_(c,2),l=u(y);{var f=d=>{var C=Rn();o(d,C)};T(l,d=>{n()&&d(f)})}q(()=>le(r,"running",n())),o(a,r)}async function Vn(a,e,n,i,v,h,r){try{P(e,!0),P(n,!1),i(await It(i(),v())),P(h,te(t(r)))}catch{P(n,!0)}finally{P(e,!1)}}var Yn=b('<div class="handles svelte-1b2vpoj"><div class="handle svelte-1b2vpoj"><!></div> <div class="handle svelte-1b2vpoj"><!></div></div>'),Wn=b('<div class="loading svelte-1b2vpoj">Loading...</div>'),Un=b('<div class="bubble svelte-1b2vpoj"> </div> <!>',1),Zn=b(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
2
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal</a>`,1),zn=b('<div class="alert svelte-1b2vpoj"><!></div>'),Dn=b('<div class="error svelte-1b2vpoj"><!></div>'),Fn=b('<div class="empty svelte-1b2vpoj">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Kn=b('<button class="save svelte-1b2vpoj"> </button>'),Xn=b('<div class="items svelte-1b2vpoj"></div> <!>',1),Jn=b("<!> <!> <!> <!>",1),Gn=b('<div class="panel playpilot-styled-scrollbar svelte-1b2vpoj"><!></div>'),Qn=b('<section class="editor playpilot-styled-scrollbar svelte-1b2vpoj"><!> <header class="header svelte-1b2vpoj"><div class="heading svelte-1b2vpoj">Playlinks</div> <!></header> <!> <!></section>');function ta(a,e){se(e,!0);let n=k(e,"linkInjections",15),i=k(e,"htmlString",3,""),v=k(e,"loading",3,!1),h=k(e,"injectionsEnabled",3,!1),r=k(e,"aiStatus",19,()=>({}));const c="editor-position",p="editor-height";let m=W(null),j=te(JSON.parse(localStorage.getItem(c)||'{ "x": 0, "y": 0 }')),w=te(parseInt(localStorage.getItem(p)||"0")),I=W(!1),R=W(!1),y=W(!1),l=W(0),f=W("");const d=$(()=>JSON.stringify(n())),C=$(()=>t(f)&&t(f)!==t(d)),A=$(()=>n().filter(s=>s.title_details&&!s.removed&&!s.duplicate&&(s.manual||!s.manual&&!s.failed))),O=$(()=>x(t(A))),M=$(()=>Ye(r().automationEnabled,!1)),V=$(()=>Ye(r().aiRunning,!1));tt(()=>{v()||Ze(()=>{requestAnimationFrame(()=>P(f,te(t(d)))),z()})});function x(s){return s.sort((g,B)=>g.failed!==B.failed?g.failed?1:-1:g.title_details.title.localeCompare(B.title_details.title))}function S(s,g){localStorage.setItem(s,g)}function L(s){const g=n().findIndex(B=>B.key===s);n(n()[g].manual=!0,!0),n(n()[g].removed=!0,!0),n([...n()])}function N(s){if(!t(m))return;const g=s.offsetTop,B=g+s.offsetHeight,K=t(m).scrollTop,ne=K+t(m).clientHeight;g>=K&&B<=ne||t(m).scrollTo({top:g-t(m).clientHeight/2,behavior:"smooth"})}function U(s){const g=s.target;P(l,te(g.scrollTop))}function z(){const s={total:n().length,failed_automatic:n().filter(g=>g.failed&&!g.manual).length,failed_manual:n().filter(g=>g.failed&&g.manual).length,final_injected:t(A).length};Fe(Ke.TotalInjectionsCount,null,s)}var Y=Qn(),F=u(Y);{var G=s=>{var g=Yn(),B=u(g),K=u(B);fn(K,{get element(){return t(m)},get height(){return w},onchange:ae=>S(p,JSON.stringify(ae))});var ne=_(B,2),ue=u(ne);un(ue,{get element(){return t(m)},get position(){return j},limit:{x:16,y:16},onchange:ae=>S(c,JSON.stringify(ae))}),o(s,g)};T(F,s=>{t(m)&&!v()&&s(G)})}var ge=_(F,2),ye=u(ge);at(ye,s=>{var g;return(g=it)==null?void 0:g(s)});var _e=_(ye,2);{var Me=s=>{var g=Wn();o(s,g)},Ee=s=>{var g=Se(),B=ie(g);{var K=ne=>{var ue=Un(),ae=ie(ue),re=u(ae),me=_(ae,2);nt(me,{onclick:()=>P(I,!0),size:"24px","aria-label":"Add manual injection",children:(be,D)=>{var oe=xe("+");o(be,oe)},$$slots:{default:!0}}),q(()=>{J(ae,"aria-label",`${t(A).length??""} found playlinks`),X(re,t(A).length)}),o(ne,ue)};T(B,ne=>{t(V)||ne(K)},!0)}o(s,g)};T(_e,s=>{v()?s(Me):s(Ee,!1)})}var je=_(ge,2);{var He=s=>{var g=Jn(),B=ie(g);{var K=D=>{var oe=zn(),pe=u(oe);Ce(pe,{type:"warning",children:(ke,Te)=>{var Q=Zn();o(ke,Q)},$$slots:{default:!0}}),o(D,oe)};T(B,D=>{h()||D(K)})}var ne=_(B,2);{var ue=D=>{On(D,jt(r))};T(ne,D=>{(t(V)||!t(M))&&D(ue)})}var ae=_(ne,2);{var re=D=>{var oe=Dn(),pe=u(oe);Ce(pe,{children:(ke,Te)=>{var Q=xe("Something went wrong, check your links below.");o(ke,Q)},$$slots:{default:!0}}),he(7,oe,()=>we,()=>({duration:150})),o(D,oe)};T(ae,D=>{t(y)&&D(re)})}var me=_(ae,2);{var be=D=>{var oe=Xn(),pe=ie(oe);$e(pe,21,()=>t(O),Q=>Q.key,(Q,ce)=>{const Ie=$(()=>n().findIndex(Ae=>Ae.key===t(ce).key));cn(Q,{onremove:()=>L(t(ce).key),onhighlight:N,get linkInjection(){return n()[t(Ie)]},set linkInjection(Ae){n(n()[t(Ie)]=Ae,!0)}})},Q=>{var ce=Fn();o(Q,ce)});var ke=_(pe,2);{var Te=Q=>{var ce=Kn();ce.__click=[Vn,R,y,n,i,f,d];var Ie=u(ce);q(()=>{ce.disabled=t(R),X(Ie,t(R)?"Saving...":"Save links")}),he(1,ce,()=>Qe,()=>({duration:100})),o(Q,ce)};T(ke,Q=>{t(C)&&n().length&&Q(Te)})}o(D,oe)};T(me,D=>{t(V)||D(be)})}o(s,g)};T(je,s=>{v()||s(He)})}var E=_(je,2);{var H=s=>{var g=Gn(),B=u(g);Tn(B,{get htmlString(){return i()},onclose:()=>P(I,!1),onsave:K=>n().push(K)}),q(()=>lt(g,"top",`${t(l)??""}px`)),he(3,g,()=>De,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),o(s,g)};T(E,s=>{t(I)&&s(H)})}Re(Y,s=>P(m,s),()=>t(m)),q(()=>{le(Y,"panel-open",t(I)),le(Y,"loading",v())}),Z("scroll",Y,U),o(a,Y),ve()}de(["click"]);export{ta as default};
|