@playpilot/tpi 2.0.4 → 2.0.5

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.
@@ -1,10 +1,10 @@
1
1
  (() => {
2
2
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-8w8waf{--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.flip.svelte-8w8waf{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-8w8waf{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)))}h2.svelte-1f6ryh6{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}img.svelte-1f6ryh6{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1f6ryh6{height:40px;width:40px}}.playlinks.svelte-1f6ryh6{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-1f6ryh6::-webkit-scrollbar{display:none}.list.svelte-1f6ryh6{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){height:32px;width:32px}}.playlink.svelte-1f6ryh6{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-1f6ryh6:hover,.playlink.svelte-1f6ryh6:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)));text-decoration:none!important}.playlink.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){margin:0}.list.svelte-1f6ryh6 .playlink:where(.svelte-1f6ryh6){padding:8px;gap:8px}.name.svelte-1f6ryh6{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1f6ryh6{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-1f6ryh6{white-space:initial;line-height:1.35}.arrow.svelte-1f6ryh6{margin-left:auto;padding:0 8px}p.svelte-fluzit,.paragraph.svelte-fluzit{display:block;margin:16px 0 0}.show-more.svelte-fluzit{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-fluzit: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}h1.svelte-138sn9z{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-138sn9z h1:where(.svelte-138sn9z){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-138sn9z h1:where(.svelte-138sn9z){margin-top:0}.content.svelte-138sn9z{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-138sn9z{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-138sn9z{padding:32px 0 16px}.small.svelte-138sn9z .header:where(.svelte-138sn9z){padding-top:16px}.compact.svelte-138sn9z .header:where(.svelte-138sn9z){padding:0 0 16px}.top.svelte-138sn9z{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-138sn9z{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-138sn9z{opacity:1}.info.svelte-138sn9z{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-138sn9z .info:where(.svelte-138sn9z){gap:8px 12px}.imdb.svelte-138sn9z{display:flex;align-items:center;gap:4px}.imdb.svelte-138sn9z svg{margin-top:-2px}.small.svelte-138sn9z .imdb:where(.svelte-138sn9z) svg{margin-top:0;width:12px;height:12px}.background.svelte-138sn9z{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter))}.background.svelte-138sn9z: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%)}.background.svelte-138sn9z img:where(.svelte-138sn9z){width:100%;height:100%;object-fit:cover;object-position:center;margin:0}.faded.svelte-138sn9z{opacity:.15}.capitalize.svelte-138sn9z{text-transform:capitalize}.truncate.svelte-138sn9z{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}span.svelte-6p0hvs{display:block}button.svelte-6p0hvs{-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-6p0hvs: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-1riopfw{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-1riopfw{padding:32px}}.dialog.svelte-1riopfw{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-1riopfw{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-1riopfw{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-1riopfw{--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-1riopfw: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}.switches.svelte-14krcvc{display:flex;flex-direction:column;gap:12px}button.svelte-14krcvc{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-14krcvc:hover,button.active.svelte-14krcvc{color:var(--playpilot-text-color)}.group.svelte-14krcvc{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-14krcvc{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-14krcvc{left:calc(50% + 4px)}.label.svelte-14krcvc{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1tq7qhv{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}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-1bz02u6{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-1bz02u6:hover,.item.highlighted.svelte-1bz02u6{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-1bz02u6{outline:2px solid var(--playpilot-primary)}.header.svelte-1bz02u6{display:flex;gap:16px;width:100%}.poster.svelte-1bz02u6{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.title.svelte-1bz02u6{font-size:14px;word-break:break-word}.meta.svelte-1bz02u6{display:flex;gap:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.meta.svelte-1bz02u6 span:where(.svelte-1bz02u6){display:flex;align-items:center}.meta.svelte-1bz02u6 svg{display:block;margin:-2px 2px 0 0;height:1em}.content.svelte-1bz02u6{padding-top:16px}.context-menu.svelte-1bz02u6{margin:0 -4px 0 auto}.context-menu-action.svelte-1bz02u6{-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-1bz02u6:hover{color:var(--playpilot-text-color)}.actions.svelte-1bz02u6{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-1bz02u6{-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-1bz02u6:hover{filter:brightness(1.2)}.expanded.svelte-1bz02u6{padding-top:16px}.type-select.svelte-1bz02u6{margin-top:8px}.label.svelte-1bz02u6{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-1bz02u6{margin-top:12px}.drag-handle.svelte-bwc0q8{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-bwc0q8:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-bwc0q8:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-bwc0q8:active{cursor:grabbing}.drag-handle.svelte-bwc0q8:before{display:block;content:"";position:absolute;top:40%;right:0;bottom:40%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.search.svelte-15ml41d{position:relative}.results.svelte-15ml41d{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}.item.svelte-15ml41d{cursor:pointer;-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}.item.svelte-15ml41d:hover{background:var(--playpilot-lighter)}.item.svelte-15ml41d:last-child{border-bottom:0}.poster.svelte-15ml41d{width:28px;border-radius:4px;height:auto;background:var(--playpilot-dark)}.name.svelte-15ml41d{color:var(--playpilot-text-color)}.meta.svelte-15ml41d{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-15ml41d{display:flex;align-items:center;gap:4px}.empty.svelte-15ml41d{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d:hover{color:vaR(--playpilot-text-color)}h2.svelte-c3phlu{margin:0;font-size:16px;font-weight:400}p.svelte-c3phlu,label.svelte-c3phlu{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-c3phlu{display:block;margin-top:16px}.layout.svelte-c3phlu{height:100%;display:flex;flex-direction:column}.header.svelte-c3phlu{display:flex;align-items:center;gap:8px;margin-bottom:16px}.error.svelte-c3phlu{margin-top:8px}.save.svelte-c3phlu{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-content);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt)}.save.svelte-c3phlu:not([disabled]):hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-c3phlu{cursor:default;opacity:.5}.ai-indicator.svelte-1ds1k2x{position:relative;margin:0 8px}.content.svelte-1ds1k2x{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)}.icon.svelte-1ds1k2x{color:var(--playpilot-green)}.border.svelte-1ds1k2x{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-1ds1k2x .border:where(.svelte-1ds1k2x){background:var(--playpilot-light)}@keyframes svelte-1ds1k2x-rotate{to{rotate:360deg}}.animator.svelte-1ds1k2x{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-1ds1k2x-rotate 2s infinite linear;filter:blur(5rem)}.button.svelte-1ds1k2x{display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 4px;margin:4px 0 0;border:1px solid currentColor;border-radius:.25rem;background:transparent;color:var(--playpilot-green);font-family:var(--playpilot-font-family);cursor:pointer}.button.svelte-1ds1k2x:hover{color:#fff}h1.svelte-1qckv40{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.editor.svelte-1qckv40{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:320px;height:min(50vh,800px);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}.panel-open.svelte-1qckv40{overflow:hidden}.loading.svelte-1qckv40{height:auto;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.drag-handle.svelte-1qckv40{opacity:0;transition:opacity .15s}.editor.svelte-1qckv40:hover .drag-handle:where(.svelte-1qckv40){opacity:1}.header.svelte-1qckv40{z-index:5;position:sticky;top:-16px;margin:-16px -16px 0;padding:16px 16px 16px 24px;background:var(--playpilot-dark);display:flex;align-items:center}.loading.svelte-1qckv40 .header:where(.svelte-1qckv40){margin:-16px}.bubble.svelte-1qckv40{-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-1qckv40{padding-top:8px;margin-bottom:auto}.empty.svelte-1qckv40{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1qckv40{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);cursor:pointer}.save.svelte-1qckv40:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1qckv40{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1qckv40{margin-top:8px}.panel.svelte-1qckv40{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}: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}[data-playpilot-injection-key]{position:relative}[data-playpilot-injection-key].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(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
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 Jt=!1;var sn=Array.isArray,Wr=Array.prototype.indexOf,cn=Array.from,Yr=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Gr=Object.getOwnPropertyDescriptors,Zr=Object.prototype,Jr=Array.prototype,Yn=Object.getPrototypeOf;function Xr(e){return typeof e=="function"}const ze=()=>{};function Qr(e){for(var t=0;t<e.length;t++)e[t]()}function Ln(e,t,n=!1){return e===void 0?n?t():t:e}const Se=2,Gn=4,wt=8,Rt=16,Ee=32,kt=64,Xt=128,Ze=256,Lt=512,ye=1024,Fe=2048,qt=4096,Ie=8192,ot=16384,Zn=32768,lt=65536,ei=1<<17,ti=1<<19,Jn=1<<20,ft=Symbol("$state"),ni=Symbol("legacy props"),ri=Symbol("");function Xn(e){return e===this.v}function ii(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function un(e){return!ii(e,this.v)}function ai(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function oi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function li(e){throw new Error("https://svelte.dev/e/effect_orphan")}function si(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ci(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ui(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function di(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function vi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function fi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let st=!1,_i=!1;function hi(){st=!0}const dn=1,vn=2,Qn=4,mi=8,gi=16,pi=1,yi=2,wi=4,ki=8,bi=16,xi=1,Si=2,Ei=4,Ti=1,Ii=2,_e=Symbol(),er="http://www.w3.org/2000/svg";function pe(e,t){var n={f:0,v:e,reactions:null,equals:Xn,rv:0,wv:0};return n}function H(e){return Ai(pe(e))}function tr(e,t=!1){var r;const n=pe(e);return t||(n.equals=un),st&&Z!==null&&Z.l!==null&&((r=Z.l).s??(r.s=[])).push(n),n}function Ai(e){return Y!==null&&Y.f&Se&&(Ae===null?Bi([e]):Ae.push(e)),e}function P(e,t){return Y!==null&&Vt()&&Y.f&(Se|Rt)&&(Ae===null||!Ae.includes(e))&&fi(),Qt(e,t)}function Qt(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=yr(),nr(e,Fe),Vt()&&q!==null&&q.f&ye&&!(q.f&Ee)&&(de!==null&&de.includes(e)?(De(q,Fe),Ut(q)):qe===null?Vi([e]):qe.push(e))),t}function nr(e,t){var n=e.reactions;if(n!==null)for(var r=Vt(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;s&Fe||!r&&o===q||(De(o,t),s&(ye|Ze)&&(s&Se?nr(o,qt):Ut(o)))}}let Ci=!1;function $(e,t=null,n){if(typeof e!="object"||e===null||ft in e)return e;const r=Yn(e);if(r!==Zr&&r!==Jr)return e;var i=new Map,a=sn(e),o=pe(0);a&&i.set("length",pe(e.length));var s;return new Proxy(e,{defineProperty(c,v,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ui();var l=i.get(v);return l===void 0?(l=pe(u.value),i.set(v,l)):P(l,$(u.value,s)),!0},deleteProperty(c,v){var u=i.get(v);if(u===void 0)v in c&&i.set(v,pe(_e));else{if(a&&typeof v=="string"){var l=i.get("length"),d=Number(v);Number.isInteger(d)&&d<l.v&&P(l,d)}P(u,_e),Dn(o)}return!0},get(c,v,u){var g;if(v===ft)return e;var l=i.get(v),d=v in c;if(l===void 0&&(!d||(g=Qe(c,v))!=null&&g.writable)&&(l=pe($(d?c[v]:_e,s)),i.set(v,l)),l!==void 0){var m=f(l);return m===_e?void 0:m}return Reflect.get(c,v,u)},getOwnPropertyDescriptor(c,v){var u=Reflect.getOwnPropertyDescriptor(c,v);if(u&&"value"in u){var l=i.get(v);l&&(u.value=f(l))}else if(u===void 0){var d=i.get(v),m=d==null?void 0:d.v;if(d!==void 0&&m!==_e)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return u},has(c,v){var m;if(v===ft)return!0;var u=i.get(v),l=u!==void 0&&u.v!==_e||Reflect.has(c,v);if(u!==void 0||q!==null&&(!l||(m=Qe(c,v))!=null&&m.writable)){u===void 0&&(u=pe(l?$(c[v],s):_e),i.set(v,u));var d=f(u);if(d===_e)return!1}return l},set(c,v,u,l){var y;var d=i.get(v),m=v in c;if(a&&v==="length")for(var g=u;g<d.v;g+=1){var h=i.get(g+"");h!==void 0?P(h,_e):g in c&&(h=pe(_e),i.set(g+"",h))}d===void 0?(!m||(y=Qe(c,v))!=null&&y.writable)&&(d=pe(void 0),P(d,$(u,s)),i.set(v,d)):(m=d.v!==_e,P(d,$(u,s)));var p=Reflect.getOwnPropertyDescriptor(c,v);if(p!=null&&p.set&&p.set.call(l,u),!m){if(a&&typeof v=="string"){var w=i.get("length"),k=Number(v);Number.isInteger(k)&&k>=w.v&&P(w,k+1)}Dn(o)}return!0},ownKeys(c){f(o);var v=Reflect.ownKeys(c).filter(d=>{var m=i.get(d);return m===void 0||m.v!==_e});for(var[u,l]of i)l.v!==_e&&!(u in c)&&v.push(u);return v},setPrototypeOf(){di()}})}function Dn(e,t=1){P(e,e.v+t)}var xe,rr,ir;function Pi(){if(xe===void 0){xe=window;var e=Element.prototype,t=Node.prototype;rr=Qe(t,"firstChild").get,ir=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 bt(e=""){return document.createTextNode(e)}function nt(e){return rr.call(e)}function Ft(e){return ir.call(e)}function x(e,t){return nt(e)}function X(e,t){{var n=nt(e);return n instanceof Comment&&n.data===""?Ft(n):n}}function I(e,t=1,n=!1){let r=e;for(;t--;)r=Ft(r);return r}function Li(e){e.textContent=""}function W(e){var t=Se|Fe;q===null?t|=Ze:q.f|=Jn;var n=Y!==null&&Y.f&Se?Y:null;const r={children:null,ctx:Z,deps:null,equals:Xn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??q};return n!==null&&(n.children??(n.children=[])).push(r),r}function Di(e){const t=W(e);return t.equals=un,t}function ar(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&Se?fn(r):Pe(r)}}}function ji(e){for(var t=e.parent;t!==null;){if(!(t.f&Se))return t;t=t.parent}return null}function or(e){var t,n=q;ke(ji(e));try{ar(e),t=wr(e)}finally{ke(n)}return t}function lr(e){var t=or(e),n=(Ue||e.f&Ze)&&e.deps!==null?qt:ye;De(e,n),e.equals(t)||(e.v=t,e.wv=yr())}function fn(e){ar(e),pt(e,0),De(e,ot),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Mi(e){q===null&&Y===null&&li(),Y!==null&&Y.f&Ze&&oi(),hn&&ai()}function Ni(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ct(e,t,n,r=!0){var i=(e&kt)!==0,a=q,o={ctx:Z,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Fe,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var s=et;try{jn(!0),$t(o),o.f|=Zn}catch(u){throw Pe(o),u}finally{jn(s)}}else t!==null&&Ut(o);var c=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Jn)===0;if(!c&&!i&&r&&(a!==null&&Ni(o,a),Y!==null&&Y.f&Se)){var v=Y;(v.children??(v.children=[])).push(o)}return o}function Oi(e){const t=ct(wt,null,!1);return De(t,ye),t.teardown=e,t}function Ht(e){Mi();var t=q!==null&&(q.f&Ee)!==0&&Z!==null&&!Z.m;if(t){var n=Z;(n.e??(n.e=[])).push({fn:e,effect:q,reaction:Y})}else{var r=Bt(e);return r}}function Ri(e){const t=ct(kt,e,!0);return(n={})=>new Promise(r=>{n.outro?_t(t,()=>{Pe(t),r(void 0)}):(Pe(t),r(void 0))})}function Bt(e){return ct(Gn,e,!1)}function sr(e){return ct(wt,e,!0)}function M(e){return xt(e)}function xt(e,t=0){return ct(wt|Rt|t,e,!0)}function We(e,t=!0){return ct(wt|Ee,e,!0,t)}function cr(e){var t=e.teardown;if(t!==null){const n=hn,r=Y;Mn(!0),Le(null);try{t.call(null)}finally{Mn(n),Le(r)}}}function ur(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)fn(t[n])}}function dr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;Pe(n,t),n=r}}function qi(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ee||Pe(t),t=n}}function Pe(e,t=!0){var n=!1;if((t||e.f&ti)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:Ft(r);r.remove(),r=a}n=!0}dr(e,t&&!n),ur(e),pt(e,0),De(e,ot);var o=e.transitions;if(o!==null)for(const c of o)c.stop();cr(e);var s=e.parent;s!==null&&s.first!==null&&vr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function vr(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 _t(e,t){var n=[];_n(e,n,!0),fr(n,()=>{Pe(e),t&&t()})}function fr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function _n(e,t,n){if(!(e.f&Ie)){if(e.f^=Ie,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&lt)!==0||(r.f&Ee)!==0;_n(r,t,a?n:!1),r=i}}}function ht(e){_r(e,!0)}function _r(e,t){if(e.f&Ie){Et(e)&&$t(e),e.f^=Ie;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&lt)!==0||(n.f&Ee)!==0;_r(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Dt=!1,en=[];function hr(){Dt=!1;const e=en.slice();en=[],Qr(e)}function St(e){Dt||(Dt=!0,queueMicrotask(hr)),en.push(e)}function Fi(){Dt&&hr()}function mr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const gr=0,Hi=1;let At=!1,Ct=gr,mt=!1,gt=null,et=!1,hn=!1;function jn(e){et=e}function Mn(e){hn=e}let $e=[],tt=0;let Y=null;function Le(e){Y=e}let q=null;function ke(e){q=e}let Ae=null;function Bi(e){Ae=e}let de=null,ge=0,qe=null;function Vi(e){qe=e}let pr=1,tn=0,Ue=!1,Z=null;function yr(){return++pr}function Vt(){return!st||Z!==null&&Z.l===null}function Et(e){var v;var t=e.f;if(t&Fe)return!0;if(t&qt){var n=e.deps,r=(t&Ze)!==0;if(n!==null){var i,a,o=(t&Lt)!==0,s=r&&q!==null&&!Ue,c=n.length;if(o||s){for(i=0;i<c;i++)a=n[i],(o||!((v=a==null?void 0:a.reactions)!=null&&v.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Lt)}for(i=0;i<c;i++)if(a=n[i],Et(a)&&lr(a),a.wv>e.wv)return!0}(!r||q!==null&&!Ue)&&De(e,ye)}return!1}function zi(e,t){for(var n=t;n!==null;){if(n.f&Xt)try{n.fn(e);return}catch{n.f^=Xt}n=n.parent}throw At=!1,e}function $i(e){return(e.f&ot)===0&&(e.parent===null||(e.parent.f&Xt)===0)}function zt(e,t,n,r){if(At){if(n===null&&(At=!1),$i(t))throw e;return}n!==null&&(At=!0);{zi(e,t);return}}function wr(e){var d;var t=de,n=ge,r=qe,i=Y,a=Ue,o=Ae,s=Z,c=e.f;de=null,ge=0,qe=null,Y=c&(Ee|kt)?null:e,Ue=!et&&(c&Ze)!==0,Ae=null,Z=e.ctx,tn++;try{var v=(0,e.fn)(),u=e.deps;if(de!==null){var l;if(pt(e,ge),u!==null&&ge>0)for(u.length=ge+de.length,l=0;l<de.length;l++)u[ge+l]=de[l];else e.deps=u=de;if(!Ue)for(l=ge;l<u.length;l++)((d=u[l]).reactions??(d.reactions=[])).push(e)}else u!==null&&ge<u.length&&(pt(e,ge),u.length=ge);return v}finally{de=t,ge=n,qe=r,Y=i,Ue=a,Ae=o,Z=s}}function Ui(e,t){let n=t.reactions;if(n!==null){var r=Wr.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&Se&&(de===null||!de.includes(t))&&(De(t,qt),t.f&(Ze|Lt)||(t.f^=Lt),pt(t,0))}function pt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ui(e,n[r])}function $t(e){var t=e.f;if(!(t&ot)){De(e,ye);var n=q,r=Z;q=e;try{t&Rt?qi(e):dr(e),ur(e),cr(e);var i=wr(e);e.teardown=typeof i=="function"?i:null,e.wv=pr;var a=e.deps,o;Jt&&_i&&e.f&Fe}catch(s){zt(s,e,n,r||e.ctx)}finally{q=n}}}function kr(){if(tt>1e3){tt=0;try{si()}catch(e){if(gt!==null)zt(e,gt,null);else throw e}}tt++}function br(e){var t=e.length;if(t!==0){kr();var n=et;et=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&ye||(i.f^=ye);var a=[];xr(i,a),Ki(a)}}finally{et=n}}}function Ki(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(ot|Ie)))try{Et(r)&&($t(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?vr(r):r.fn=null))}catch(i){zt(i,r,null,r.ctx)}}}function Wi(){if(mt=!1,tt>1001)return;const e=$e;$e=[],br(e),mt||(tt=0,gt=null)}function Ut(e){Ct===gr&&(mt||(mt=!0,queueMicrotask(Wi))),gt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(kt|Ee)){if(!(n&ye))return;t.f^=ye}}$e.push(t)}function xr(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&Ee)!==0,o=a&&(i&ye)!==0,s=n.next;if(!o&&!(i&Ie))if(i&wt){if(a)n.f^=ye;else try{Et(n)&&$t(n)}catch(l){zt(l,n,null,n.ctx)}var c=n.first;if(c!==null){n=c;continue}}else i&Gn&&r.push(n);if(s===null){let l=n.parent;for(;l!==null;){if(e===l)break e;var v=l.next;if(v!==null){n=v;continue e}l=l.parent}}n=s}for(var u=0;u<r.length;u++)c=r[u],t.push(c),xr(c,t)}function Sr(e){var t=Ct,n=$e;try{kr();const i=[];Ct=Hi,$e=i,mt=!1,br(n);var r=e==null?void 0:e();return Fi(),($e.length>0||i.length>0)&&Sr(),tt=0,gt=null,r}finally{Ct=t,$e=n}}async function Nn(){await Promise.resolve(),Sr()}function f(e){var u;var t=e.f,n=(t&Se)!==0;if(n&&t&ot){var r=or(e);return fn(e),r}if(Y!==null){Ae!==null&&Ae.includes(e)&&vi();var i=Y.deps;e.rv<tn&&(e.rv=tn,de===null&&i!==null&&i[ge]===e?ge++:de===null?de=[e]:de.push(e),qe!==null&&q!==null&&q.f&ye&&!(q.f&Ee)&&qe.includes(e)&&(De(q,Fe),Ut(q)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,s=a;o!==null;)if(o.f&Se){var c=o;s=c,o=c.parent}else{var v=o;(u=v.deriveds)!=null&&u.includes(s)||(v.deriveds??(v.deriveds=[])).push(s);break}return n&&(a=e,Et(a)&&lr(a)),e.v}function Ye(e){const t=Y;try{return Y=null,e()}finally{Y=t}}const Yi=-7169;function De(e,t){e.f=e.f&Yi|t}function Gi(e){return Tr().get(e)}function Er(e,t){return Tr().set(e,t),t}function Tr(e){return Z===null&&mr(),Z.c??(Z.c=new Map(Zi(Z)||void 0))}function Zi(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ie(e,t=!1,n){Z={p:Z,c:null,e:null,m:!1,s:e,x:null,l:null},st&&!t&&(Z.l={s:null,u:null,r1:[],r2:pe(!1)})}function ae(e){const t=Z;if(t!==null){e!==void 0&&(t.x=e);const o=t.e;if(o!==null){var n=q,r=Y;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];ke(a.effect),Le(a.reaction),Bt(a.fn)}}finally{ke(n),Le(r)}}Z=t.p,t.m=!0}return e||{}}function Ji(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Xi=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Qi(e){return Xi.includes(e)}const ea={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function ta(e){return e=e.toLowerCase(),ea[e]??e}const na=["touchstart","touchmove"];function ra(e){return na.includes(e)}function ia(e,t){if(t){const n=document.body;e.autofocus=!0,St(()=>{document.activeElement===n&&e.focus()})}}let On=!1;function aa(){On||(On=!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 Ir(e){var t=Y,n=q;Le(null),ke(null);try{return e()}finally{Le(t),ke(n)}}function oa(e,t,n,r=n){e.addEventListener(t,()=>Ir(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),aa()}const Ar=new Set,nn=new Set;function Cr(e,t,n,r){function i(a){if(r.capture||vt.call(t,a),!a.cancelBubble)return Ir(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?St(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function he(e,t,n,r,i){var a={capture:r,passive:i},o=Cr(e,t,n,a);(t===document.body||t===window||t===document)&&Oi(()=>{t.removeEventListener(e,o,a)})}function ve(e){for(var t=0;t<e.length;t++)Ar.add(e[t]);for(var n of nn)n(e)}function vt(e){var k;var t=this,n=t.ownerDocument,r=e.type,i=((k=e.composedPath)==null?void 0:k.call(e))||[],a=i[0]||e.target,o=0,s=e.__root;if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var v=i.indexOf(t);if(v===-1)return;c<=v&&(o=c)}if(a=i[o]||e.target,a!==t){Yr(e,"currentTarget",{configurable:!0,get(){return a||n}});var u=Y,l=q;Le(null),ke(null);try{for(var d,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+r];if(h!==void 0&&!a.disabled)if(sn(h)){var[p,...w]=h;p.apply(a,[e,...w])}else h.call(a,e)}catch(y){d?m.push(y):d=y}if(e.cancelBubble||g===t||g===null)break;a=g}if(d){for(let y of m)queueMicrotask(()=>{throw y});throw d}}finally{e.__root=t,delete e.currentTarget,Le(u),ke(l)}}}function Pr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function rt(e,t){var n=q;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function C(e,t){var n=(t&Ti)!==0,r=(t&Ii)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Pr(a?e:"<!>"+e),n||(i=nt(i)));var o=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var s=nt(o),c=o.lastChild;rt(s,c)}else rt(o,o);return o}}function Te(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Pr(i),s=nt(o);a=nt(s)}var c=a.cloneNode(!0);return rt(c,c),c}}function Me(e=""){{var t=bt(e+"");return rt(t,t),t}}function He(){var e=document.createDocumentFragment(),t=document.createComment(""),n=bt();return e.append(t,n),rt(t,n),e}function b(e,t){e!==null&&e.before(t)}let jt=!0;function Rn(e){jt=e}function V(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 mn(e,t){return la(e,t)}const Je=new Map;function la(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){Pi();var s=new Set,c=l=>{for(var d=0;d<l.length;d++){var m=l[d];if(!s.has(m)){s.add(m);var g=ra(m);t.addEventListener(m,vt,{passive:g});var h=Je.get(m);h===void 0?(document.addEventListener(m,vt,{passive:g}),Je.set(m,1)):Je.set(m,h+1)}}};c(cn(Ar)),nn.add(c);var v=void 0,u=Ri(()=>{var l=n??t.appendChild(bt());return We(()=>{if(a){ie({});var d=Z;d.c=a}i&&(r.$$events=i),jt=o,v=e(l,r)||{},jt=!0,a&&ae()}),()=>{var g;for(var d of s){t.removeEventListener(d,vt);var m=Je.get(d);--m===0?(document.removeEventListener(d,vt),Je.delete(d)):Je.set(d,m)}nn.delete(c),l!==n&&((g=l.parentNode)==null||g.removeChild(l))}});return rn.set(v,u),v}let rn=new WeakMap;function Lr(e,t){const n=rn.get(e);return n?(rn.delete(e),n(t)):Promise.resolve()}function O(e,t,n=!1){var r=e,i=null,a=null,o=_e,s=n?lt:0,c=!1;const v=(l,d=!0)=>{c=!0,u(d,l)},u=(l,d)=>{o!==(o=l)&&(o?(i?ht(i):d&&(i=We(()=>d(r))),a&&_t(a,()=>{a=null})):(a?ht(a):d&&(a=We(()=>d(r))),i&&_t(i,()=>{i=null})))};xt(()=>{c=!1,t(v),c||u(null,null)},s)}let Ke=null;function qn(e){Ke=e}function yt(e,t){return t}function sa(e,t,n,r){for(var i=[],a=t.length,o=0;o<a;o++)_n(t[o].e,i,!0);var s=a>0&&i.length===0&&n!==null;if(s){var c=n.parentNode;Li(c),c.append(n),r.clear(),Re(e,t[0].prev,t[a-1].next)}fr(i,()=>{for(var v=0;v<a;v++){var u=t[v];s||(r.delete(u.k),Re(e,u.prev,u.next)),Pe(u.e,!s)}})}function Ge(e,t,n,r,i,a=null){var o=e,s={flags:t,items:new Map,first:null},c=(t&Qn)!==0;if(c){var v=e;o=v.appendChild(bt())}var u=null,l=!1;xt(()=>{var d=n(),m=sn(d)?d:d==null?[]:cn(d),g=m.length;if(!(l&&g===0)){l=g===0;{var h=Y;ca(m,s,o,i,t,(h.f&Ie)!==0,r)}a!==null&&(g===0?u?ht(u):u=We(()=>a(o)):u!==null&&_t(u,()=>{u=null})),n()}})}function ca(e,t,n,r,i,a,o,s){var te,le,me,ue;var c=(i&mi)!==0,v=(i&(dn|vn))!==0,u=e.length,l=t.items,d=t.first,m=d,g,h=null,p,w=[],k=[],y,A,S,T;if(c)for(T=0;T<u;T+=1)y=e[T],A=o(y,T),S=l.get(A),S!==void 0&&((te=S.a)==null||te.measure(),(p??(p=new Set)).add(S));for(T=0;T<u;T+=1){if(y=e[T],A=o(y,T),S=l.get(A),S===void 0){var j=m?m.e.nodes_start:n;h=da(j,t,h,h===null?t.first:h.next,y,A,T,r,i),l.set(A,h),w=[],k=[],m=h.next;continue}if(v&&ua(S,y,T,i),S.e.f&Ie&&(ht(S.e),c&&((le=S.a)==null||le.unfix(),(p??(p=new Set)).delete(S))),S!==m){if(g!==void 0&&g.has(S)){if(w.length<k.length){var E=k[0],D;h=E.prev;var N=w[0],B=w[w.length-1];for(D=0;D<w.length;D+=1)Fn(w[D],E,n);for(D=0;D<k.length;D+=1)g.delete(k[D]);Re(t,N.prev,B.next),Re(t,h,N),Re(t,B,E),m=E,h=B,T-=1,w=[],k=[]}else g.delete(S),Fn(S,m,n),Re(t,S.prev,S.next),Re(t,S,h===null?t.first:h.next),Re(t,h,S),h=S;continue}for(w=[],k=[];m!==null&&m.k!==A;)(a||!(m.e.f&Ie))&&(g??(g=new Set)).add(m),k.push(m),m=m.next;if(m===null)continue;S=m}w.push(S),h=S,m=S.next}if(m!==null||g!==void 0){for(var U=g===void 0?[]:cn(g);m!==null;)(a||!(m.e.f&Ie))&&U.push(m),m=m.next;var z=U.length;if(z>0){var J=i&Qn&&u===0?n:null;if(c){for(T=0;T<z;T+=1)(me=U[T].a)==null||me.measure();for(T=0;T<z;T+=1)(ue=U[T].a)==null||ue.fix()}sa(t,U,J,l)}}c&&St(()=>{var se;if(p!==void 0)for(S of p)(se=S.a)==null||se.apply()}),q.first=t.first&&t.first.e,q.last=h&&h.e}function ua(e,t,n,r){r&dn&&Qt(e.v,t),r&vn?Qt(e.i,n):e.i=n}function da(e,t,n,r,i,a,o,s,c,v){var u=Ke,l=(c&dn)!==0,d=(c&gi)===0,m=l?d?tr(i):pe(i):i,g=c&vn?pe(o):o,h={i:g,v:m,k:a,a:null,e:null,prev:n,next:r};Ke=h;try{return h.e=We(()=>s(e,m,g),Ci),h.e.prev=n&&n.e,h.e.next=r&&r.e,n===null?t.first=h:(n.next=h,n.e.next=h.e),r!==null&&(r.prev=h,r.e.prev=h.e),h}finally{Ke=u}}function Fn(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=Ft(a);i.before(a),a=o}}function Re(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 ut(e,t,...n){var r=e,i=ze,a;xt(()=>{i!==(i=t())&&(a&&(Pe(a),a=null),a=We(()=>i(r,...n)))},lt)}function va(e,t,n,r,i,a){var o,s,c=null,v=e,u,l=Ke;xt(()=>{const d=t()||null;var m=d==="svg"?er:null;if(d!==o){var g=Ke;qn(l),u&&(d===null?_t(u,()=>{u=null,s=null}):d===s?ht(u):(Pe(u),Rn(!1))),d&&d!==s&&(u=We(()=>{c=m?document.createElementNS(m,d):document.createElement(d),rt(c,c);{var h=c.appendChild(bt());r(c,h)}q.nodes_end=c,v.before(c)})),o=d,o&&(s=o),Rn(!0),qn(g)}},lt)}function Dr(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=Dr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Dr(e))&&(r&&(r+=" "),r+=t);return r}function _a(e){return typeof e=="object"?fa(e):e??""}function ha(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ee(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[ri]=n),n==null?e.removeAttribute(t):typeof n!="string"&&jr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ma(e,t,n,r,i=!1,a=!1,o=!1){var s=t||{},c=e.tagName==="OPTION";for(var v in t)v in n||(n[v]=null);n.class&&(n.class=_a(n.class)),n.class=n.class?n.class+" "+r:r;var u=jr(e),l=e.__attributes??(e.__attributes={});for(const k in n){let y=n[k];if(c&&k==="value"&&y==null){e.value=e.__value="",s[k]=y;continue}var d=s[k];if(y!==d){s[k]=y;var m=k[0]+k[1];if(m!=="$$"){if(m==="on"){const A={},S="$$"+k;let T=k.slice(2);var g=Qi(T);if(Ji(T)&&(T=T.slice(0,-7),A.capture=!0),!g&&d){if(y!=null)continue;e.removeEventListener(T,s[S],A),s[S]=null}if(y!=null)if(g)e[`__${T}`]=y,ve([T]);else{let j=function(E){s[k].call(this,E)};var w=j;s[S]=Cr(T,e,j,A)}else g&&(e[`__${T}`]=void 0)}else if(k==="style"&&y!=null)e.style.cssText=y+"";else if(k==="autofocus")ia(e,!!y);else if(k==="__value"||k==="value"&&y!=null)e.value=e[k]=e.__value=y;else if(k==="selected"&&c)ha(e,y);else{var h=k;i||(h=ta(h));var p=h==="defaultValue"||h==="defaultChecked";if(y==null&&!a&&!p)if(l[k]=null,h==="value"||h==="checked"){let A=e;if(h==="value"){let S=A.defaultValue;A.removeAttribute(h),A.defaultValue=S}else{let S=A.defaultChecked;A.removeAttribute(h),A.defaultChecked=S}}else e.removeAttribute(k);else p||u.includes(h)&&(a||typeof y!="string")?e[h]=y:typeof y!="function"&&ee(e,h,y)}k==="style"&&"__styles"in e&&(e.__styles={})}}}return s}var Hn=new Map;function jr(e){var t=Hn.get(e.nodeName);if(t)return t;Hn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=Gr(r);for(var a in n)n[a].set&&t.push(a);r=Yn(r)}return t}function ce(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 gn(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 ga=()=>performance.now(),je={tick:e=>requestAnimationFrame(e),now:()=>ga(),tasks:new Set};function Mr(){const e=je.now();je.tasks.forEach(t=>{t.c(e)||(je.tasks.delete(t),t.f())}),je.tasks.size!==0&&je.tick(Mr)}function pa(e){let t;return je.tasks.size===0&&je.tick(Mr),{promise:new Promise(n=>{je.tasks.add(t={c:e,f:n})}),abort(){je.tasks.delete(t)}}}function Tt(e,t){e.dispatchEvent(new CustomEvent(t))}function ya(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 Bn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const o=ya(i.trim());t[o]=a.trim()}return t}const wa=e=>e;function ka(e,t,n){var r=Ke,i,a,o,s=null;r.a??(r.a={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),a=this.element.getBoundingClientRect(),i.left!==a.left||i.right!==a.right||i.top!==a.top||i.bottom!==a.bottom){const c=t()(this.element,{from:i,to:a},n==null?void 0:n());o=Mt(this.element,c,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:c,width:v,height:u}=getComputedStyle(e);if(c!=="absolute"&&c!=="fixed"){var l=e.style;s={position:l.position,width:l.width,height:l.height,transform:l.transform},l.position="absolute",l.width=v,l.height=u;var d=e.getBoundingClientRect();if(i.left!==d.left||i.top!==d.top){var m=`translate(${i.left-d.left}px, ${i.top-d.top}px)`;l.transform=l.transform?`${l.transform} ${m}`:m}}}},unfix(){if(s){var c=e.style;c.position=s.position,c.width=s.width,c.height=s.height,c.transform=s.transform}}}),r.a.element=e}function Ce(e,t,n,r){var i=(e&xi)!==0,a=(e&Si)!==0,o=i&&a,s=(e&Ei)!==0,c=o?"both":i?"in":"out",v,u=t.inert,l,d;function m(){var k=Y,y=q;Le(null),ke(null);try{return v??(v=n()(t,(r==null?void 0:r())??{},{direction:c}))}finally{Le(k),ke(y)}}var g={is_global:s,in(){var k;if(t.inert=u,!i){d==null||d.abort(),(k=d==null?void 0:d.reset)==null||k.call(d);return}a||l==null||l.abort(),Tt(t,"introstart"),l=Mt(t,m(),d,1,()=>{Tt(t,"introend"),l==null||l.abort(),l=v=void 0})},out(k){if(!a){k==null||k(),v=void 0;return}t.inert=!0,Tt(t,"outrostart"),d=Mt(t,m(),l,0,()=>{Tt(t,"outroend"),k==null||k()})},stop:()=>{l==null||l.abort(),d==null||d.abort()}},h=q;if((h.transitions??(h.transitions=[])).push(g),i&&jt){var p=s;if(!p){for(var w=h.parent;w&&w.f&lt;)for(;(w=w.parent)&&!(w.f&Rt););p=!w||(w.f&Zn)!==0}p&&Bt(()=>{Ye(()=>g.in())})}}function Mt(e,t,n,r,i){var a=r===1;if(Xr(t)){var o,s=!1;return St(()=>{if(!s){var p=t({direction:a?"in":"out"});o=Mt(e,p,n,r,i)}}),{abort:()=>{s=!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:ze,deactivate:ze,reset:ze,t:()=>r};const{delay:c=0,css:v,tick:u,easing:l=wa}=t;var d=[];if(a&&n===void 0&&(u&&u(0,1),v)){var m=Bn(v(0,1));d.push(m,m)}var g=()=>1-r,h=e.animate(d,{duration:c});return h.onfinish=()=>{var p=(n==null?void 0:n.t())??1-r;n==null||n.abort();var w=r-p,k=t.duration*Math.abs(w),y=[];if(k>0){if(v)for(var A=Math.ceil(k/16.666666666666668),S=0;S<=A;S+=1){var T=p+w*l(S/A),j=v(T,1-T);y.push(Bn(j))}g=()=>{var E=h.currentTime;return p+w*l(E/k)},u&&pa(()=>{if(h.playState!=="running")return!1;var E=g();return u(E,1-E),!0})}h=e.animate(y,{duration:k,fill:"forwards"}),h.onfinish=()=>{g=()=>r,u==null||u(r,1-r),i()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=ze)},deactivate:()=>{i=ze},reset:()=>{r===0&&(u==null||u(1,0))},t:()=>g()}}function ba(e,t,n=t){var r=Vt();oa(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=Yt(e)?Gt(a):a,n(a),r&&a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd;e.value=a??"",s!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(s,e.value.length))}}),Ye(t)==null&&e.value&&n(Yt(e)?Gt(e.value):e.value),sr(()=>{var i=t();Yt(e)&&i===Gt(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Yt(e){var t=e.type;return t==="number"||t==="range"}function Gt(e){return e===""?null:+e}function Vn(e,t){return e===t||(e==null?void 0:e[ft])===t}function it(e={},t,n,r){return Bt(()=>{var i,a;return sr(()=>{i=a,a=[],Ye(()=>{e!==n(...a)&&(t(e,...a),i&&Vn(n(...i),e)&&t(null,...i))})}),()=>{St(()=>{a&&Vn(n(...a),e)&&t(null,...a)})}}),e}let It=!1;function xa(e){var t=It;try{return It=!1,[e(),It]}finally{It=t}}const Sa={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 Ea(e,t,n){return new Proxy({props:e,exclude:t},Sa)}function zn(e){for(var t=q,n=q;t!==null&&!(t.f&(Ee|kt));)t=t.parent;try{return ke(t),e()}finally{ke(n)}}function R(e,t,n,r){var j;var i=(n&pi)!==0,a=!st||(n&yi)!==0,o=(n&ki)!==0,s=(n&bi)!==0,c=!1,v;o?[v,c]=xa(()=>e[t]):v=e[t];var u=ft in e||ni in e,l=o&&(((j=Qe(e,t))==null?void 0:j.set)??(u&&t in e&&(E=>e[t]=E)))||void 0,d=r,m=!0,g=!1,h=()=>(g=!0,m&&(m=!1,s?d=Ye(r):d=r),d);v===void 0&&r!==void 0&&(l&&a&&ci(),v=h(),l&&l(v));var p;if(a)p=()=>{var E=e[t];return E===void 0?h():(m=!0,g=!1,E)};else{var w=zn(()=>(i?W:Di)(()=>e[t]));w.f|=ei,p=()=>{var E=f(w);return E!==void 0&&(d=void 0),E===void 0?d:E}}if(!(n&wi))return p;if(l){var k=e.$$legacy;return function(E,D){return arguments.length>0?((!a||!D||k||c)&&l(D?p():E),E):p()}}var y=!1,A=!1,S=tr(v),T=zn(()=>W(()=>{var E=p(),D=f(S);return y?(y=!1,A=!0,D):(A=!1,S.v=E)}));return i||(T.equals=un),function(E,D){if(arguments.length>0){const N=D?f(T):a&&o?$(E):E;return T.equals(N)||(y=!0,P(S,N),g&&d!==void 0&&(d=N),Ye(()=>f(T))),E}return f(T)}}function dt(e){Z===null&&mr(),st&&Z.l!==null?Ta(Z).m.push(e):Ht(()=>{const t=Ye(e);if(typeof t=="function")return t})}function Ta(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Ia="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ia);const Nr="https://www.playpilot.com",pn="https://partner-api.playpilot.tech/1.0.0",Or="EncryptedToken",Aa="articleReplacementEditToken";async function Rr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=In();if(!n)throw new Error("No token was provided");const r=qr(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(pn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return Ca(r),!0}catch(n){console.error(n)}return!1}function qr(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(Aa);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Or}=`).pop())==null?void 0:i.split(";")[0])||""}function Ca(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Or+"="+e+";"+r+";path=/"}function Fr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Hr(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 Ne=Object.freeze({ArticlePageView:"ali_article_page_view",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"}),Pa="https://insights.playpilot.net";async function Be(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,fetch(Pa,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const La=e=>e;function yn(e){const t=e-1;return t*t*t+1}function $n(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Br(e,{delay:t=0,duration:n=400,easing:r=La}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function Kt(e,{delay:t=0,duration:n=400,easing:r=yn,x:i=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(e),c=+s.opacity,v=s.transform==="none"?"":s.transform,u=c*(1-o),[l,d]=$n(i),[m,g]=$n(a);return{delay:t,duration:n,easing:r,css:(h,p)=>`
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 Jt=!1;var sn=Array.isArray,Yr=Array.prototype.indexOf,cn=Array.from,Gr=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Zr=Object.getOwnPropertyDescriptors,Jr=Object.prototype,Xr=Array.prototype,Yn=Object.getPrototypeOf;function Qr(e){return typeof e=="function"}const ze=()=>{};function ei(e){for(var t=0;t<e.length;t++)e[t]()}function Ln(e,t,n=!1){return e===void 0?n?t():t:e}const Se=2,Gn=4,wt=8,Rt=16,Ee=32,kt=64,Xt=128,Ze=256,Lt=512,ye=1024,Fe=2048,qt=4096,Ie=8192,ot=16384,Zn=32768,lt=65536,ti=1<<17,ni=1<<19,Jn=1<<20,ft=Symbol("$state"),ri=Symbol("legacy props"),ii=Symbol("");function Xn(e){return e===this.v}function ai(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function un(e){return!ai(e,this.v)}function oi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function li(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function si(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ci(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ui(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function di(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function vi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function _i(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let st=!1,hi=!1;function mi(){st=!0}const dn=1,vn=2,Qn=4,gi=8,pi=16,yi=1,wi=2,ki=4,bi=8,xi=16,Si=1,Ei=2,Ti=4,Ii=1,Ai=2,_e=Symbol(),er="http://www.w3.org/2000/svg";function pe(e,t){var n={f:0,v:e,reactions:null,equals:Xn,rv:0,wv:0};return n}function H(e){return Ci(pe(e))}function tr(e,t=!1){var r;const n=pe(e);return t||(n.equals=un),st&&Z!==null&&Z.l!==null&&((r=Z.l).s??(r.s=[])).push(n),n}function Ci(e){return Y!==null&&Y.f&Se&&(Ae===null?Vi([e]):Ae.push(e)),e}function P(e,t){return Y!==null&&Vt()&&Y.f&(Se|Rt)&&(Ae===null||!Ae.includes(e))&&_i(),Qt(e,t)}function Qt(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=yr(),nr(e,Fe),Vt()&&q!==null&&q.f&ye&&!(q.f&Ee)&&(de!==null&&de.includes(e)?(De(q,Fe),Ut(q)):qe===null?zi([e]):qe.push(e))),t}function nr(e,t){var n=e.reactions;if(n!==null)for(var r=Vt(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;s&Fe||!r&&o===q||(De(o,t),s&(ye|Ze)&&(s&Se?nr(o,qt):Ut(o)))}}let Pi=!1;function $(e,t=null,n){if(typeof e!="object"||e===null||ft in e)return e;const r=Yn(e);if(r!==Jr&&r!==Xr)return e;var i=new Map,a=sn(e),o=pe(0);a&&i.set("length",pe(e.length));var s;return new Proxy(e,{defineProperty(u,v,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&di();var l=i.get(v);return l===void 0?(l=pe(c.value),i.set(v,l)):P(l,$(c.value,s)),!0},deleteProperty(u,v){var c=i.get(v);if(c===void 0)v in u&&i.set(v,pe(_e));else{if(a&&typeof v=="string"){var l=i.get("length"),d=Number(v);Number.isInteger(d)&&d<l.v&&P(l,d)}P(c,_e),Dn(o)}return!0},get(u,v,c){var g;if(v===ft)return e;var l=i.get(v),d=v in u;if(l===void 0&&(!d||(g=Qe(u,v))!=null&&g.writable)&&(l=pe($(d?u[v]:_e,s)),i.set(v,l)),l!==void 0){var m=f(l);return m===_e?void 0:m}return Reflect.get(u,v,c)},getOwnPropertyDescriptor(u,v){var c=Reflect.getOwnPropertyDescriptor(u,v);if(c&&"value"in c){var l=i.get(v);l&&(c.value=f(l))}else if(c===void 0){var d=i.get(v),m=d==null?void 0:d.v;if(d!==void 0&&m!==_e)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return c},has(u,v){var m;if(v===ft)return!0;var c=i.get(v),l=c!==void 0&&c.v!==_e||Reflect.has(u,v);if(c!==void 0||q!==null&&(!l||(m=Qe(u,v))!=null&&m.writable)){c===void 0&&(c=pe(l?$(u[v],s):_e),i.set(v,c));var d=f(c);if(d===_e)return!1}return l},set(u,v,c,l){var y;var d=i.get(v),m=v in u;if(a&&v==="length")for(var g=c;g<d.v;g+=1){var h=i.get(g+"");h!==void 0?P(h,_e):g in u&&(h=pe(_e),i.set(g+"",h))}d===void 0?(!m||(y=Qe(u,v))!=null&&y.writable)&&(d=pe(void 0),P(d,$(c,s)),i.set(v,d)):(m=d.v!==_e,P(d,$(c,s)));var p=Reflect.getOwnPropertyDescriptor(u,v);if(p!=null&&p.set&&p.set.call(l,c),!m){if(a&&typeof v=="string"){var w=i.get("length"),k=Number(v);Number.isInteger(k)&&k>=w.v&&P(w,k+1)}Dn(o)}return!0},ownKeys(u){f(o);var v=Reflect.ownKeys(u).filter(d=>{var m=i.get(d);return m===void 0||m.v!==_e});for(var[c,l]of i)l.v!==_e&&!(c in u)&&v.push(c);return v},setPrototypeOf(){vi()}})}function Dn(e,t=1){P(e,e.v+t)}var xe,rr,ir;function Li(){if(xe===void 0){xe=window;var e=Element.prototype,t=Node.prototype;rr=Qe(t,"firstChild").get,ir=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 bt(e=""){return document.createTextNode(e)}function nt(e){return rr.call(e)}function Ft(e){return ir.call(e)}function x(e,t){return nt(e)}function X(e,t){{var n=nt(e);return n instanceof Comment&&n.data===""?Ft(n):n}}function I(e,t=1,n=!1){let r=e;for(;t--;)r=Ft(r);return r}function Di(e){e.textContent=""}function W(e){var t=Se|Fe;q===null?t|=Ze:q.f|=Jn;var n=Y!==null&&Y.f&Se?Y:null;const r={children:null,ctx:Z,deps:null,equals:Xn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??q};return n!==null&&(n.children??(n.children=[])).push(r),r}function ji(e){const t=W(e);return t.equals=un,t}function ar(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&Se?fn(r):Pe(r)}}}function Mi(e){for(var t=e.parent;t!==null;){if(!(t.f&Se))return t;t=t.parent}return null}function or(e){var t,n=q;ke(Mi(e));try{ar(e),t=wr(e)}finally{ke(n)}return t}function lr(e){var t=or(e),n=(Ue||e.f&Ze)&&e.deps!==null?qt:ye;De(e,n),e.equals(t)||(e.v=t,e.wv=yr())}function fn(e){ar(e),pt(e,0),De(e,ot),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Ni(e){q===null&&Y===null&&si(),Y!==null&&Y.f&Ze&&li(),hn&&oi()}function Oi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ct(e,t,n,r=!0){var i=(e&kt)!==0,a=q,o={ctx:Z,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Fe,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var s=et;try{jn(!0),$t(o),o.f|=Zn}catch(c){throw Pe(o),c}finally{jn(s)}}else t!==null&&Ut(o);var u=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Jn)===0;if(!u&&!i&&r&&(a!==null&&Oi(o,a),Y!==null&&Y.f&Se)){var v=Y;(v.children??(v.children=[])).push(o)}return o}function Ri(e){const t=ct(wt,null,!1);return De(t,ye),t.teardown=e,t}function Ht(e){Ni();var t=q!==null&&(q.f&Ee)!==0&&Z!==null&&!Z.m;if(t){var n=Z;(n.e??(n.e=[])).push({fn:e,effect:q,reaction:Y})}else{var r=Bt(e);return r}}function qi(e){const t=ct(kt,e,!0);return(n={})=>new Promise(r=>{n.outro?_t(t,()=>{Pe(t),r(void 0)}):(Pe(t),r(void 0))})}function Bt(e){return ct(Gn,e,!1)}function sr(e){return ct(wt,e,!0)}function M(e){return xt(e)}function xt(e,t=0){return ct(wt|Rt|t,e,!0)}function We(e,t=!0){return ct(wt|Ee,e,!0,t)}function cr(e){var t=e.teardown;if(t!==null){const n=hn,r=Y;Mn(!0),Le(null);try{t.call(null)}finally{Mn(n),Le(r)}}}function ur(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)fn(t[n])}}function dr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;Pe(n,t),n=r}}function Fi(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ee||Pe(t),t=n}}function Pe(e,t=!0){var n=!1;if((t||e.f&ni)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:Ft(r);r.remove(),r=a}n=!0}dr(e,t&&!n),ur(e),pt(e,0),De(e,ot);var o=e.transitions;if(o!==null)for(const u of o)u.stop();cr(e);var s=e.parent;s!==null&&s.first!==null&&vr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function vr(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 _t(e,t){var n=[];_n(e,n,!0),fr(n,()=>{Pe(e),t&&t()})}function fr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function _n(e,t,n){if(!(e.f&Ie)){if(e.f^=Ie,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&lt)!==0||(r.f&Ee)!==0;_n(r,t,a?n:!1),r=i}}}function ht(e){_r(e,!0)}function _r(e,t){if(e.f&Ie){Et(e)&&$t(e),e.f^=Ie;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&lt)!==0||(n.f&Ee)!==0;_r(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Dt=!1,en=[];function hr(){Dt=!1;const e=en.slice();en=[],ei(e)}function St(e){Dt||(Dt=!0,queueMicrotask(hr)),en.push(e)}function Hi(){Dt&&hr()}function mr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const gr=0,Bi=1;let At=!1,Ct=gr,mt=!1,gt=null,et=!1,hn=!1;function jn(e){et=e}function Mn(e){hn=e}let $e=[],tt=0;let Y=null;function Le(e){Y=e}let q=null;function ke(e){q=e}let Ae=null;function Vi(e){Ae=e}let de=null,ge=0,qe=null;function zi(e){qe=e}let pr=1,tn=0,Ue=!1,Z=null;function yr(){return++pr}function Vt(){return!st||Z!==null&&Z.l===null}function Et(e){var v;var t=e.f;if(t&Fe)return!0;if(t&qt){var n=e.deps,r=(t&Ze)!==0;if(n!==null){var i,a,o=(t&Lt)!==0,s=r&&q!==null&&!Ue,u=n.length;if(o||s){for(i=0;i<u;i++)a=n[i],(o||!((v=a==null?void 0:a.reactions)!=null&&v.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Lt)}for(i=0;i<u;i++)if(a=n[i],Et(a)&&lr(a),a.wv>e.wv)return!0}(!r||q!==null&&!Ue)&&De(e,ye)}return!1}function $i(e,t){for(var n=t;n!==null;){if(n.f&Xt)try{n.fn(e);return}catch{n.f^=Xt}n=n.parent}throw At=!1,e}function Ui(e){return(e.f&ot)===0&&(e.parent===null||(e.parent.f&Xt)===0)}function zt(e,t,n,r){if(At){if(n===null&&(At=!1),Ui(t))throw e;return}n!==null&&(At=!0);{$i(e,t);return}}function wr(e){var d;var t=de,n=ge,r=qe,i=Y,a=Ue,o=Ae,s=Z,u=e.f;de=null,ge=0,qe=null,Y=u&(Ee|kt)?null:e,Ue=!et&&(u&Ze)!==0,Ae=null,Z=e.ctx,tn++;try{var v=(0,e.fn)(),c=e.deps;if(de!==null){var l;if(pt(e,ge),c!==null&&ge>0)for(c.length=ge+de.length,l=0;l<de.length;l++)c[ge+l]=de[l];else e.deps=c=de;if(!Ue)for(l=ge;l<c.length;l++)((d=c[l]).reactions??(d.reactions=[])).push(e)}else c!==null&&ge<c.length&&(pt(e,ge),c.length=ge);return v}finally{de=t,ge=n,qe=r,Y=i,Ue=a,Ae=o,Z=s}}function Ki(e,t){let n=t.reactions;if(n!==null){var r=Yr.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&Se&&(de===null||!de.includes(t))&&(De(t,qt),t.f&(Ze|Lt)||(t.f^=Lt),pt(t,0))}function pt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ki(e,n[r])}function $t(e){var t=e.f;if(!(t&ot)){De(e,ye);var n=q,r=Z;q=e;try{t&Rt?Fi(e):dr(e),ur(e),cr(e);var i=wr(e);e.teardown=typeof i=="function"?i:null,e.wv=pr;var a=e.deps,o;Jt&&hi&&e.f&Fe}catch(s){zt(s,e,n,r||e.ctx)}finally{q=n}}}function kr(){if(tt>1e3){tt=0;try{ci()}catch(e){if(gt!==null)zt(e,gt,null);else throw e}}tt++}function br(e){var t=e.length;if(t!==0){kr();var n=et;et=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&ye||(i.f^=ye);var a=[];xr(i,a),Wi(a)}}finally{et=n}}}function Wi(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(ot|Ie)))try{Et(r)&&($t(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?vr(r):r.fn=null))}catch(i){zt(i,r,null,r.ctx)}}}function Yi(){if(mt=!1,tt>1001)return;const e=$e;$e=[],br(e),mt||(tt=0,gt=null)}function Ut(e){Ct===gr&&(mt||(mt=!0,queueMicrotask(Yi))),gt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(kt|Ee)){if(!(n&ye))return;t.f^=ye}}$e.push(t)}function xr(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&Ee)!==0,o=a&&(i&ye)!==0,s=n.next;if(!o&&!(i&Ie))if(i&wt){if(a)n.f^=ye;else try{Et(n)&&$t(n)}catch(l){zt(l,n,null,n.ctx)}var u=n.first;if(u!==null){n=u;continue}}else i&Gn&&r.push(n);if(s===null){let l=n.parent;for(;l!==null;){if(e===l)break e;var v=l.next;if(v!==null){n=v;continue e}l=l.parent}}n=s}for(var c=0;c<r.length;c++)u=r[c],t.push(u),xr(u,t)}function Sr(e){var t=Ct,n=$e;try{kr();const i=[];Ct=Bi,$e=i,mt=!1,br(n);var r=e==null?void 0:e();return Hi(),($e.length>0||i.length>0)&&Sr(),tt=0,gt=null,r}finally{Ct=t,$e=n}}async function Nn(){await Promise.resolve(),Sr()}function f(e){var c;var t=e.f,n=(t&Se)!==0;if(n&&t&ot){var r=or(e);return fn(e),r}if(Y!==null){Ae!==null&&Ae.includes(e)&&fi();var i=Y.deps;e.rv<tn&&(e.rv=tn,de===null&&i!==null&&i[ge]===e?ge++:de===null?de=[e]:de.push(e),qe!==null&&q!==null&&q.f&ye&&!(q.f&Ee)&&qe.includes(e)&&(De(q,Fe),Ut(q)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,s=a;o!==null;)if(o.f&Se){var u=o;s=u,o=u.parent}else{var v=o;(c=v.deriveds)!=null&&c.includes(s)||(v.deriveds??(v.deriveds=[])).push(s);break}return n&&(a=e,Et(a)&&lr(a)),e.v}function Ye(e){const t=Y;try{return Y=null,e()}finally{Y=t}}const Gi=-7169;function De(e,t){e.f=e.f&Gi|t}function Zi(e){return Tr().get(e)}function Er(e,t){return Tr().set(e,t),t}function Tr(e){return Z===null&&mr(),Z.c??(Z.c=new Map(Ji(Z)||void 0))}function Ji(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ie(e,t=!1,n){Z={p:Z,c:null,e:null,m:!1,s:e,x:null,l:null},st&&!t&&(Z.l={s:null,u:null,r1:[],r2:pe(!1)})}function ae(e){const t=Z;if(t!==null){e!==void 0&&(t.x=e);const o=t.e;if(o!==null){var n=q,r=Y;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];ke(a.effect),Le(a.reaction),Bt(a.fn)}}finally{ke(n),Le(r)}}Z=t.p,t.m=!0}return e||{}}function Xi(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Qi=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ea(e){return Qi.includes(e)}const ta={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function na(e){return e=e.toLowerCase(),ta[e]??e}const ra=["touchstart","touchmove"];function ia(e){return ra.includes(e)}function aa(e,t){if(t){const n=document.body;e.autofocus=!0,St(()=>{document.activeElement===n&&e.focus()})}}let On=!1;function oa(){On||(On=!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 Ir(e){var t=Y,n=q;Le(null),ke(null);try{return e()}finally{Le(t),ke(n)}}function la(e,t,n,r=n){e.addEventListener(t,()=>Ir(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),oa()}const Ar=new Set,nn=new Set;function Cr(e,t,n,r){function i(a){if(r.capture||vt.call(t,a),!a.cancelBubble)return Ir(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?St(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function he(e,t,n,r,i){var a={capture:r,passive:i},o=Cr(e,t,n,a);(t===document.body||t===window||t===document)&&Ri(()=>{t.removeEventListener(e,o,a)})}function ve(e){for(var t=0;t<e.length;t++)Ar.add(e[t]);for(var n of nn)n(e)}function vt(e){var k;var t=this,n=t.ownerDocument,r=e.type,i=((k=e.composedPath)==null?void 0:k.call(e))||[],a=i[0]||e.target,o=0,s=e.__root;if(s){var u=i.indexOf(s);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var v=i.indexOf(t);if(v===-1)return;u<=v&&(o=u)}if(a=i[o]||e.target,a!==t){Gr(e,"currentTarget",{configurable:!0,get(){return a||n}});var c=Y,l=q;Le(null),ke(null);try{for(var d,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+r];if(h!==void 0&&!a.disabled)if(sn(h)){var[p,...w]=h;p.apply(a,[e,...w])}else h.call(a,e)}catch(y){d?m.push(y):d=y}if(e.cancelBubble||g===t||g===null)break;a=g}if(d){for(let y of m)queueMicrotask(()=>{throw y});throw d}}finally{e.__root=t,delete e.currentTarget,Le(c),ke(l)}}}function Pr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function rt(e,t){var n=q;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function C(e,t){var n=(t&Ii)!==0,r=(t&Ai)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Pr(a?e:"<!>"+e),n||(i=nt(i)));var o=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var s=nt(o),u=o.lastChild;rt(s,u)}else rt(o,o);return o}}function Te(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Pr(i),s=nt(o);a=nt(s)}var u=a.cloneNode(!0);return rt(u,u),u}}function Me(e=""){{var t=bt(e+"");return rt(t,t),t}}function He(){var e=document.createDocumentFragment(),t=document.createComment(""),n=bt();return e.append(t,n),rt(t,n),e}function b(e,t){e!==null&&e.before(t)}let jt=!0;function Rn(e){jt=e}function V(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 mn(e,t){return sa(e,t)}const Je=new Map;function sa(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){Li();var s=new Set,u=l=>{for(var d=0;d<l.length;d++){var m=l[d];if(!s.has(m)){s.add(m);var g=ia(m);t.addEventListener(m,vt,{passive:g});var h=Je.get(m);h===void 0?(document.addEventListener(m,vt,{passive:g}),Je.set(m,1)):Je.set(m,h+1)}}};u(cn(Ar)),nn.add(u);var v=void 0,c=qi(()=>{var l=n??t.appendChild(bt());return We(()=>{if(a){ie({});var d=Z;d.c=a}i&&(r.$$events=i),jt=o,v=e(l,r)||{},jt=!0,a&&ae()}),()=>{var g;for(var d of s){t.removeEventListener(d,vt);var m=Je.get(d);--m===0?(document.removeEventListener(d,vt),Je.delete(d)):Je.set(d,m)}nn.delete(u),l!==n&&((g=l.parentNode)==null||g.removeChild(l))}});return rn.set(v,c),v}let rn=new WeakMap;function Lr(e,t){const n=rn.get(e);return n?(rn.delete(e),n(t)):Promise.resolve()}function O(e,t,n=!1){var r=e,i=null,a=null,o=_e,s=n?lt:0,u=!1;const v=(l,d=!0)=>{u=!0,c(d,l)},c=(l,d)=>{o!==(o=l)&&(o?(i?ht(i):d&&(i=We(()=>d(r))),a&&_t(a,()=>{a=null})):(a?ht(a):d&&(a=We(()=>d(r))),i&&_t(i,()=>{i=null})))};xt(()=>{u=!1,t(v),u||c(null,null)},s)}let Ke=null;function qn(e){Ke=e}function yt(e,t){return t}function ca(e,t,n,r){for(var i=[],a=t.length,o=0;o<a;o++)_n(t[o].e,i,!0);var s=a>0&&i.length===0&&n!==null;if(s){var u=n.parentNode;Di(u),u.append(n),r.clear(),Re(e,t[0].prev,t[a-1].next)}fr(i,()=>{for(var v=0;v<a;v++){var c=t[v];s||(r.delete(c.k),Re(e,c.prev,c.next)),Pe(c.e,!s)}})}function Ge(e,t,n,r,i,a=null){var o=e,s={flags:t,items:new Map,first:null},u=(t&Qn)!==0;if(u){var v=e;o=v.appendChild(bt())}var c=null,l=!1;xt(()=>{var d=n(),m=sn(d)?d:d==null?[]:cn(d),g=m.length;if(!(l&&g===0)){l=g===0;{var h=Y;ua(m,s,o,i,t,(h.f&Ie)!==0,r)}a!==null&&(g===0?c?ht(c):c=We(()=>a(o)):c!==null&&_t(c,()=>{c=null})),n()}})}function ua(e,t,n,r,i,a,o,s){var te,le,me,ue;var u=(i&gi)!==0,v=(i&(dn|vn))!==0,c=e.length,l=t.items,d=t.first,m=d,g,h=null,p,w=[],k=[],y,A,S,T;if(u)for(T=0;T<c;T+=1)y=e[T],A=o(y,T),S=l.get(A),S!==void 0&&((te=S.a)==null||te.measure(),(p??(p=new Set)).add(S));for(T=0;T<c;T+=1){if(y=e[T],A=o(y,T),S=l.get(A),S===void 0){var j=m?m.e.nodes_start:n;h=va(j,t,h,h===null?t.first:h.next,y,A,T,r,i),l.set(A,h),w=[],k=[],m=h.next;continue}if(v&&da(S,y,T,i),S.e.f&Ie&&(ht(S.e),u&&((le=S.a)==null||le.unfix(),(p??(p=new Set)).delete(S))),S!==m){if(g!==void 0&&g.has(S)){if(w.length<k.length){var E=k[0],D;h=E.prev;var N=w[0],B=w[w.length-1];for(D=0;D<w.length;D+=1)Fn(w[D],E,n);for(D=0;D<k.length;D+=1)g.delete(k[D]);Re(t,N.prev,B.next),Re(t,h,N),Re(t,B,E),m=E,h=B,T-=1,w=[],k=[]}else g.delete(S),Fn(S,m,n),Re(t,S.prev,S.next),Re(t,S,h===null?t.first:h.next),Re(t,h,S),h=S;continue}for(w=[],k=[];m!==null&&m.k!==A;)(a||!(m.e.f&Ie))&&(g??(g=new Set)).add(m),k.push(m),m=m.next;if(m===null)continue;S=m}w.push(S),h=S,m=S.next}if(m!==null||g!==void 0){for(var U=g===void 0?[]:cn(g);m!==null;)(a||!(m.e.f&Ie))&&U.push(m),m=m.next;var z=U.length;if(z>0){var J=i&Qn&&c===0?n:null;if(u){for(T=0;T<z;T+=1)(me=U[T].a)==null||me.measure();for(T=0;T<z;T+=1)(ue=U[T].a)==null||ue.fix()}ca(t,U,J,l)}}u&&St(()=>{var se;if(p!==void 0)for(S of p)(se=S.a)==null||se.apply()}),q.first=t.first&&t.first.e,q.last=h&&h.e}function da(e,t,n,r){r&dn&&Qt(e.v,t),r&vn?Qt(e.i,n):e.i=n}function va(e,t,n,r,i,a,o,s,u,v){var c=Ke,l=(u&dn)!==0,d=(u&pi)===0,m=l?d?tr(i):pe(i):i,g=u&vn?pe(o):o,h={i:g,v:m,k:a,a:null,e:null,prev:n,next:r};Ke=h;try{return h.e=We(()=>s(e,m,g),Pi),h.e.prev=n&&n.e,h.e.next=r&&r.e,n===null?t.first=h:(n.next=h,n.e.next=h.e),r!==null&&(r.prev=h,r.e.prev=h.e),h}finally{Ke=c}}function Fn(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=Ft(a);i.before(a),a=o}}function Re(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 ut(e,t,...n){var r=e,i=ze,a;xt(()=>{i!==(i=t())&&(a&&(Pe(a),a=null),a=We(()=>i(r,...n)))},lt)}function fa(e,t,n,r,i,a){var o,s,u=null,v=e,c,l=Ke;xt(()=>{const d=t()||null;var m=d==="svg"?er:null;if(d!==o){var g=Ke;qn(l),c&&(d===null?_t(c,()=>{c=null,s=null}):d===s?ht(c):(Pe(c),Rn(!1))),d&&d!==s&&(c=We(()=>{u=m?document.createElementNS(m,d):document.createElement(d),rt(u,u);{var h=u.appendChild(bt());r(u,h)}q.nodes_end=u,v.before(u)})),o=d,o&&(s=o),Rn(!0),qn(g)}},lt)}function Dr(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=Dr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _a(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Dr(e))&&(r&&(r+=" "),r+=t);return r}function ha(e){return typeof e=="object"?_a(e):e??""}function ma(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ee(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[ii]=n),n==null?e.removeAttribute(t):typeof n!="string"&&jr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ga(e,t,n,r,i=!1,a=!1,o=!1){var s=t||{},u=e.tagName==="OPTION";for(var v in t)v in n||(n[v]=null);n.class&&(n.class=ha(n.class)),n.class=n.class?n.class+" "+r:r;var c=jr(e),l=e.__attributes??(e.__attributes={});for(const k in n){let y=n[k];if(u&&k==="value"&&y==null){e.value=e.__value="",s[k]=y;continue}var d=s[k];if(y!==d){s[k]=y;var m=k[0]+k[1];if(m!=="$$"){if(m==="on"){const A={},S="$$"+k;let T=k.slice(2);var g=ea(T);if(Xi(T)&&(T=T.slice(0,-7),A.capture=!0),!g&&d){if(y!=null)continue;e.removeEventListener(T,s[S],A),s[S]=null}if(y!=null)if(g)e[`__${T}`]=y,ve([T]);else{let j=function(E){s[k].call(this,E)};var w=j;s[S]=Cr(T,e,j,A)}else g&&(e[`__${T}`]=void 0)}else if(k==="style"&&y!=null)e.style.cssText=y+"";else if(k==="autofocus")aa(e,!!y);else if(k==="__value"||k==="value"&&y!=null)e.value=e[k]=e.__value=y;else if(k==="selected"&&u)ma(e,y);else{var h=k;i||(h=na(h));var p=h==="defaultValue"||h==="defaultChecked";if(y==null&&!a&&!p)if(l[k]=null,h==="value"||h==="checked"){let A=e;if(h==="value"){let S=A.defaultValue;A.removeAttribute(h),A.defaultValue=S}else{let S=A.defaultChecked;A.removeAttribute(h),A.defaultChecked=S}}else e.removeAttribute(k);else p||c.includes(h)&&(a||typeof y!="string")?e[h]=y:typeof y!="function"&&ee(e,h,y)}k==="style"&&"__styles"in e&&(e.__styles={})}}}return s}var Hn=new Map;function jr(e){var t=Hn.get(e.nodeName);if(t)return t;Hn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=Zr(r);for(var a in n)n[a].set&&t.push(a);r=Yn(r)}return t}function ce(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 gn(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 pa=()=>performance.now(),je={tick:e=>requestAnimationFrame(e),now:()=>pa(),tasks:new Set};function Mr(){const e=je.now();je.tasks.forEach(t=>{t.c(e)||(je.tasks.delete(t),t.f())}),je.tasks.size!==0&&je.tick(Mr)}function ya(e){let t;return je.tasks.size===0&&je.tick(Mr),{promise:new Promise(n=>{je.tasks.add(t={c:e,f:n})}),abort(){je.tasks.delete(t)}}}function Tt(e,t){e.dispatchEvent(new CustomEvent(t))}function wa(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 Bn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const o=wa(i.trim());t[o]=a.trim()}return t}const ka=e=>e;function ba(e,t,n){var r=Ke,i,a,o,s=null;r.a??(r.a={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),a=this.element.getBoundingClientRect(),i.left!==a.left||i.right!==a.right||i.top!==a.top||i.bottom!==a.bottom){const u=t()(this.element,{from:i,to:a},n==null?void 0:n());o=Mt(this.element,u,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:u,width:v,height:c}=getComputedStyle(e);if(u!=="absolute"&&u!=="fixed"){var l=e.style;s={position:l.position,width:l.width,height:l.height,transform:l.transform},l.position="absolute",l.width=v,l.height=c;var d=e.getBoundingClientRect();if(i.left!==d.left||i.top!==d.top){var m=`translate(${i.left-d.left}px, ${i.top-d.top}px)`;l.transform=l.transform?`${l.transform} ${m}`:m}}}},unfix(){if(s){var u=e.style;u.position=s.position,u.width=s.width,u.height=s.height,u.transform=s.transform}}}),r.a.element=e}function Ce(e,t,n,r){var i=(e&Si)!==0,a=(e&Ei)!==0,o=i&&a,s=(e&Ti)!==0,u=o?"both":i?"in":"out",v,c=t.inert,l,d;function m(){var k=Y,y=q;Le(null),ke(null);try{return v??(v=n()(t,(r==null?void 0:r())??{},{direction:u}))}finally{Le(k),ke(y)}}var g={is_global:s,in(){var k;if(t.inert=c,!i){d==null||d.abort(),(k=d==null?void 0:d.reset)==null||k.call(d);return}a||l==null||l.abort(),Tt(t,"introstart"),l=Mt(t,m(),d,1,()=>{Tt(t,"introend"),l==null||l.abort(),l=v=void 0})},out(k){if(!a){k==null||k(),v=void 0;return}t.inert=!0,Tt(t,"outrostart"),d=Mt(t,m(),l,0,()=>{Tt(t,"outroend"),k==null||k()})},stop:()=>{l==null||l.abort(),d==null||d.abort()}},h=q;if((h.transitions??(h.transitions=[])).push(g),i&&jt){var p=s;if(!p){for(var w=h.parent;w&&w.f&lt;)for(;(w=w.parent)&&!(w.f&Rt););p=!w||(w.f&Zn)!==0}p&&Bt(()=>{Ye(()=>g.in())})}}function Mt(e,t,n,r,i){var a=r===1;if(Qr(t)){var o,s=!1;return St(()=>{if(!s){var p=t({direction:a?"in":"out"});o=Mt(e,p,n,r,i)}}),{abort:()=>{s=!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:ze,deactivate:ze,reset:ze,t:()=>r};const{delay:u=0,css:v,tick:c,easing:l=ka}=t;var d=[];if(a&&n===void 0&&(c&&c(0,1),v)){var m=Bn(v(0,1));d.push(m,m)}var g=()=>1-r,h=e.animate(d,{duration:u});return h.onfinish=()=>{var p=(n==null?void 0:n.t())??1-r;n==null||n.abort();var w=r-p,k=t.duration*Math.abs(w),y=[];if(k>0){if(v)for(var A=Math.ceil(k/16.666666666666668),S=0;S<=A;S+=1){var T=p+w*l(S/A),j=v(T,1-T);y.push(Bn(j))}g=()=>{var E=h.currentTime;return p+w*l(E/k)},c&&ya(()=>{if(h.playState!=="running")return!1;var E=g();return c(E,1-E),!0})}h=e.animate(y,{duration:k,fill:"forwards"}),h.onfinish=()=>{g=()=>r,c==null||c(r,1-r),i()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=ze)},deactivate:()=>{i=ze},reset:()=>{r===0&&(c==null||c(1,0))},t:()=>g()}}function xa(e,t,n=t){var r=Vt();la(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=Yt(e)?Gt(a):a,n(a),r&&a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd;e.value=a??"",s!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(s,e.value.length))}}),Ye(t)==null&&e.value&&n(Yt(e)?Gt(e.value):e.value),sr(()=>{var i=t();Yt(e)&&i===Gt(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Yt(e){var t=e.type;return t==="number"||t==="range"}function Gt(e){return e===""?null:+e}function Vn(e,t){return e===t||(e==null?void 0:e[ft])===t}function it(e={},t,n,r){return Bt(()=>{var i,a;return sr(()=>{i=a,a=[],Ye(()=>{e!==n(...a)&&(t(e,...a),i&&Vn(n(...i),e)&&t(null,...i))})}),()=>{St(()=>{a&&Vn(n(...a),e)&&t(null,...a)})}}),e}let It=!1;function Sa(e){var t=It;try{return It=!1,[e(),It]}finally{It=t}}const Ea={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 Ta(e,t,n){return new Proxy({props:e,exclude:t},Ea)}function zn(e){for(var t=q,n=q;t!==null&&!(t.f&(Ee|kt));)t=t.parent;try{return ke(t),e()}finally{ke(n)}}function R(e,t,n,r){var j;var i=(n&yi)!==0,a=!st||(n&wi)!==0,o=(n&bi)!==0,s=(n&xi)!==0,u=!1,v;o?[v,u]=Sa(()=>e[t]):v=e[t];var c=ft in e||ri in e,l=o&&(((j=Qe(e,t))==null?void 0:j.set)??(c&&t in e&&(E=>e[t]=E)))||void 0,d=r,m=!0,g=!1,h=()=>(g=!0,m&&(m=!1,s?d=Ye(r):d=r),d);v===void 0&&r!==void 0&&(l&&a&&ui(),v=h(),l&&l(v));var p;if(a)p=()=>{var E=e[t];return E===void 0?h():(m=!0,g=!1,E)};else{var w=zn(()=>(i?W:ji)(()=>e[t]));w.f|=ti,p=()=>{var E=f(w);return E!==void 0&&(d=void 0),E===void 0?d:E}}if(!(n&ki))return p;if(l){var k=e.$$legacy;return function(E,D){return arguments.length>0?((!a||!D||k||u)&&l(D?p():E),E):p()}}var y=!1,A=!1,S=tr(v),T=zn(()=>W(()=>{var E=p(),D=f(S);return y?(y=!1,A=!0,D):(A=!1,S.v=E)}));return i||(T.equals=un),function(E,D){if(arguments.length>0){const N=D?f(T):a&&o?$(E):E;return T.equals(N)||(y=!0,P(S,N),g&&d!==void 0&&(d=N),Ye(()=>f(T))),E}return f(T)}}function dt(e){Z===null&&mr(),st&&Z.l!==null?Ia(Z).m.push(e):Ht(()=>{const t=Ye(e);if(typeof t=="function")return t})}function Ia(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Aa="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Aa);const Nr="https://www.playpilot.com",pn="https://partner-api.playpilot.tech/1.0.0",Or="EncryptedToken",Ca="articleReplacementEditToken";async function Rr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=In();if(!n)throw new Error("No token was provided");const r=qr(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(pn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return Pa(r),!0}catch(n){console.error(n)}return!1}function qr(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(Ca);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Or}=`).pop())==null?void 0:i.split(";")[0])||""}function Pa(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Or+"="+e+";"+r+";path=/"}function Fr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Hr(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 _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),La={"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 fe(e,t=Br()){var n;return((n=La[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(_);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:_.English}const Ne=Object.freeze({ArticlePageView:"ali_article_page_view",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"}),Da="https://insights.playpilot.net";async function Be(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,fetch(Da,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const ja=e=>e;function yn(e){const t=e-1;return t*t*t+1}function $n(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Vr(e,{delay:t=0,duration:n=400,easing:r=ja}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function Kt(e,{delay:t=0,duration:n=400,easing:r=yn,x:i=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(e),u=+s.opacity,v=s.transform==="none"?"":s.transform,c=u*(1-o),[l,d]=$n(i),[m,g]=$n(a);return{delay:t,duration:n,easing:r,css:(h,p)=>`
4
4
  transform: ${v} translate(${(1-h)*l}${d}, ${(1-h)*m}${g});
5
- opacity: ${c-u*p}`}}function Nt(e,{delay:t=0,duration:n=400,easing:r=yn,axis:i="y"}={}){const a=getComputedStyle(e),o=+a.opacity,s=i==="y"?"height":"width",c=parseFloat(a[s]),v=i==="y"?["top","bottom"]:["left","right"],u=v.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),l=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),m=parseFloat(a[`margin${u[0]}`]),g=parseFloat(a[`margin${u[1]}`]),h=parseFloat(a[`border${u[0]}Width`]),p=parseFloat(a[`border${u[1]}Width`]);return{delay:t,duration:n,easing:r,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*o};${s}: ${w*c}px;padding-${v[0]}: ${w*l}px;padding-${v[1]}: ${w*d}px;margin-${v[0]}: ${w*m}px;margin-${v[1]}: ${w*g}px;border-${v[0]}-width: ${w*h}px;border-${v[1]}-width: ${w*p}px;min-${s}: 0`}}function Da(e,{delay:t=0,duration:n=400,easing:r=yn,start:i=0,opacity:a=0}={}){const o=getComputedStyle(e),s=+o.opacity,c=o.transform==="none"?"":o.transform,v=1-i,u=s*(1-a);return{delay:t,duration:n,easing:r,css:(l,d)=>`
6
- transform: ${c} scale(${1-v*d});
7
- opacity: ${s-u*d}
8
- `}}var ja=C('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Ma(e,t){ie(t,!0);let n=R(t,"maxHeight",15);Er("scope","popover");let r=H(null),i=H(!1);dt(async()=>{await Nn(),a(),await Nn(),o()});function a(){if(!f(r))return;const{top:l,right:d,bottom:m,height:g}=f(r).getBoundingClientRect(),h=s();P(i,$(l-h<0&&window.innerHeight-m>l+g));const p=window.innerWidth-d-h;d+h>window.innerWidth&&(f(r).style.left=`${p}px`)}function o(){if(!f(r))return;const{top:l,height:d}=f(r).getBoundingClientRect(),m=s(),g=f(i)?window.innerHeight-l-m:l+d-m;n(Math.min(g,window.innerHeight*.8))}function s(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var c=ja(),v=x(c),u=x(v);ut(u,()=>t.children),it(c,l=>P(r,l),()=>f(r)),M(()=>{ce(c,"flip",f(i)),gn(c,"--max-height",n()?n()+"px":null)}),Ce(3,v,()=>Kt,()=>({duration:100,y:10})),b(e,c),ae()}const Na=[{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"}],_=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),Oa={"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 fe(e,t=Ra()){var n;return((n=Oa[e])==null?void 0:n[t])||e}function Ra(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.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=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:_.English}var qa=C('<div class="genre svelte-13nhocm"> </div>'),Fa=(e,t)=>P(t,!0),Ha=C('<button class="genre expand svelte-13nhocm"> </button>'),Ba=C("<!> <!>",1);function Va(e,t){ie(t,!0);let n=H(!1),r=W(()=>f(n)?t.genres:[t.genres[0]]);var i=Ba(),a=X(i);Ge(a,17,()=>f(r),yt,(c,v)=>{var u=He();const l=W(()=>{var g;return(g=Na.find(h=>h.slug===f(v)))==null?void 0:g.name});var d=X(u);{var m=g=>{var h=qa(),p=x(h);M(()=>V(p,fe(f(l)))),b(g,h)};O(d,g=>{f(l)&&g(m)})}b(c,u)});var o=I(a,2);{var s=c=>{var v=Ha();v.__click=[Fa,n];var u=x(v);M(()=>V(u,`+${t.genres.length-1}`)),b(c,v)};O(o,c=>{!f(n)&&t.genres.length>1&&c(s)})}b(e,i),ae()}ve(["click"]);function za(e){let t=[];for(const n of e){let r=n;const i=t.find(s=>s.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(s=>s.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}hi();var $a=Te('<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 Ua(e){var t=$a();b(e,t)}var Ka=(e,t,n)=>t(n()),Wa=C('<div class="arrow svelte-1f6ryh6"><!></div>'),Ya=C('<a target="_blank" class="playlink svelte-1f6ryh6" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1f6ryh6"> <div><span class="name svelte-1f6ryh6"> </span> <div class="category svelte-1f6ryh6"> </div></div> <!></a>'),Ga=C('<div class="playlink empty svelte-1f6ryh6"> </div>'),Za=C('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function Ja(e,t){ie(t,!0);const n=R(t,"list",3,!1),r=Gi("scope")==="modal",i=W(()=>t.playlinks.filter(h=>!!h.logo_url)),a=W(()=>za(f(i))),o={SVOD:fe("Stream"),BUY:fe("Buy"),RENT:fe("Rent"),TVOD:fe("Rent Or Buy")};function s(h){Be(r?Ne.TitleModalPlaylinkClick:Ne.TitlePopoverPlaylinkClick,t.title,{playlink:h})}var c=Za(),v=X(c),u=x(v);M(()=>V(u,fe("Where To Stream Online")));var l=I(v,2),d=x(l);Ge(d,17,()=>f(a),yt,(h,p)=>{let w=()=>f(p).name,k=()=>f(p).url,y=()=>f(p).logo_url,A=()=>f(p).extra_info.category;var S=Ya();S.__click=[Ka,s,w];var T=x(S),j=I(T,2),E=x(j),D=x(E),N=I(E,2),B=x(N);M(()=>V(B,o[A()]||fe("Stream")));var U=I(j,2);{var z=J=>{var te=Wa(),le=x(te);Ua(le),b(J,te)};O(U,J=>{n()&&J(z)})}M(()=>{ee(S,"href",k()),ee(S,"data-playlink",w()),ee(T,"src",y()),V(D,w())}),b(h,S)});var m=I(d,2);{var g=h=>{var p=Ga(),w=x(p);M(()=>V(w,fe("Title Unavailable"))),b(h,p)};O(m,h=>{t.playlinks.length||h(g)})}M(()=>ce(l,"list",n())),b(e,c),ae()}ve(["click"]);var Xa=(e,t)=>P(t,!0),Qa=C('<button class="show-more svelte-fluzit">Show more</button>'),eo=C('<p class="svelte-fluzit"> </p>'),to=C('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function no(e,t){ie(t,!0);const n=R(t,"blurb",3,""),r=R(t,"limit",3,200);let i=H(!1),a=W(()=>t.text.slice(0,r()));var o=to(),s=x(o),c=x(s),v=I(c);{var u=h=>{var p=Me("...");b(h,p)};O(v,h=>{!f(i)&&t.text.length>r()&&h(u)})}var l=I(v,2);{var d=h=>{var p=Qa();p.__click=[Xa,i],b(h,p)};O(l,h=>{!f(i)&&(t.text.length>r()||n())&&h(d)})}var m=I(s,2);{var g=h=>{var p=eo(),w=x(p);M(()=>V(w,n())),b(h,p)};O(m,h=>{f(i)&&h(g)})}M(()=>V(c,f(i)?t.text:f(a))),b(e,o),ae()}ve(["click"]);var ro=C('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),io=C('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function ao(e,t){var n=io(),r=I(X(n),2);Ge(r,21,()=>t.participants,yt,(i,a)=>{var o=ro(),s=x(o),c=I(s),v=x(c);M(()=>{var d;return V(v,((d=f(a).character)==null?void 0:d.slice(0,20))||"")});var u=I(v);{var l=d=>{var m=Me("...");b(d,m)};O(u,d=>{var m;(m=f(a).character)!=null&&m.length&&d(l)})}M(()=>V(s,`${f(a).name??""} `)),b(i,o)}),b(e,n)}var oo=Te('<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 wn(e){var t=oo();b(e,t)}var lo=C('<div class="top svelte-138sn9z"><img class="poster svelte-138sn9z"></div>'),so=C("<div> </div>"),co=C("<!> <!>",1),uo=C('<div class="content svelte-138sn9z" data-playpilot-link-injections-title=""><header class="header svelte-138sn9z"><!> <h1 class="svelte-138sn9z"> </h1> <div class="info svelte-138sn9z"><div class="imdb svelte-138sn9z"><!> </div> <!> <div> </div> <div class="capitalize svelte-138sn9z"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-138sn9z"><img alt="" class="svelte-138sn9z"></div>',1);function Vr(e,t){ie(t,!0);const n=R(t,"small",3,!1),r=R(t,"compact",3,!1);let i=H(!1);var a=uo(),o=X(a),s=x(o),c=x(s);{var v=z=>{var J=lo(),te=x(J);M(()=>{ee(te,"src",t.title.standing_poster),ee(te,"alt",`Movie poster for '${t.title.title??""}'`),ce(te,"loaded",f(i))}),he("load",te,()=>P(i,!0)),b(z,J)};O(c,z=>{r()||z(v)})}var u=I(c,2),l=x(u),d=I(u,2),m=x(d),g=x(m);wn(g);var h=I(g),p=I(m,2);Va(p,{get genres(){return t.title.genres}});var w=I(p,2),k=x(w),y=I(w,2),A=x(y);M(()=>V(A,fe(`Type: ${t.title.type}`)));var S=I(y,2);{var T=z=>{var J=so(),te=x(J);M(()=>V(te,`${t.title.length??""} ${fe("Minutes")??""}`)),b(z,J)};O(S,z=>{!n()&&t.title.length&&z(T)})}var j=I(s,2),E=x(j);Ja(E,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var D=I(E,2);{var N=z=>{var J=co(),te=X(J);no(te,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var le=I(te,2);{var me=ue=>{ao(ue,{get participants(){return t.title.participants}})};O(le,ue=>{var se;(se=t.title.participants)!=null&&se.length&&ue(me)})}b(z,J)};O(D,z=>{n()||z(N)})}var B=I(o,2),U=x(B);M(()=>{ee(o,"data-playpilot-original-title",t.title.original_title),ce(o,"small",n()),ce(o,"compact",r()),ce(u,"truncate",n()),V(l,t.title.title),V(h,` ${t.title.imdb_score??""}`),V(k,t.title.year),ce(B,"faded",r()),ee(U,"src",t.title.medium_poster)}),b(e,a),ae()}function vo(e,t){ie(t,!0);let n=H(0);Be(Ne.TitlePopoverView,t.title),Ma(e,{get maxHeight(){return f(n)},set maxHeight(r){P(n,$(r))},children:(r,i)=>{var a=W(()=>f(n)<250);Vr(r,{get title(){return t.title},small:!0,get compact(){return f(a)}})},$$slots:{default:!0}}),ae()}var fo=(e,t,n,r)=>t(f(n).title_details,f(r)),_o=C(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),ho=(e,t,n,r)=>t(f(n).title_details,r()),mo=C('<!> <a target="_blank"> </a>',1),go=C(" <!>.",1),po=C("<!> <br>",1),yo=C(" <br>",1),wo=C('<span class="svelte-6p0hvs"><!></span>'),ko=C("<p></p>");function bo(e,t){ie(t,!0);const n=R(t,"onclickmodal",3,c=>null);function r(c,v){Be(Ne.AfterArticlePlaylinkClick,c,{playlink:v})}function i(c,v){Be(Ne.AfterArticleModalButtonClick,c),n()(v)}var a=He(),o=X(a);{var s=c=>{var v=ko();Ge(v,21,()=>t.linkInjections,yt,(u,l)=>{var d=wo();const m=W(()=>{const{key:k,title:y,title_details:A,after_article_style:S}=f(l);return{key:k,title:y,title_details:A,after_article_style:S}}),g=W(()=>{var k;return((k=f(m).title_details)==null?void 0:k.providers)||[]});var h=x(d);{var p=k=>{var y=po(),A=X(y);{var S=j=>{var E=_o(),D=X(E);M(()=>V(D,`"${f(m).title??""}" ${fe("Is Available To Stream")??""} `));var N=I(D),B=x(N);B.__click=[fo,i,m,l];var U=x(B);M(()=>V(U,fe("View Streaming Options"))),b(j,E)},T=j=>{var E=go(),D=X(E);M(()=>V(D,`"${f(m).title??""}" ${fe("Is Available To Stream On")??""} `));var N=I(D);Ge(N,17,()=>f(g),yt,(B,U,z)=>{let J=()=>f(U).name,te=()=>f(U).url;var le=mo(),me=X(le);{var ue=F=>{var Q=Me();M(()=>V(Q,z===f(g).length-1?`, ${fe("And")}`:",")),b(F,Q)};O(me,F=>{z&&F(ue)})}var se=I(me,2);se.__click=[ho,r,m,J];var L=x(se);M(()=>{ee(se,"href",te()),V(L,J())}),b(B,le)}),b(j,E)};O(A,j=>{f(m).after_article_style==="modal_button"?j(S):j(T,!1)})}b(k,y)},w=k=>{var y=yo(),A=X(y);M(()=>V(A,`"${f(m).title??""}" ${fe("Title Unavailable Suffix")??""} `)),b(k,y)};O(h,k=>{f(g).length?k(p):k(w,!1)})}M(()=>ee(d,"data-playpilot-injection-key",f(m).key)),b(u,d)}),b(c,v)};O(o,c=>{t.linkInjections.length&&c(s)})}b(e,a),ae()}ve(["click"]);function xo(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function kn(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function So(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 Eo(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function To(e,t,n,r){const i=xo(t),a=kn(t),o=e.slice(0,r),s=e.slice(r),c=/[-/\\^$*+?.()|[\]{}]/g,v=new RegExp(`${a.replace(c,"\\$&")}|${i.replace(c,"\\$&")}`),u=s.replace(v,n);return o+u}function Xe(e){return kn(e).toLowerCase().replace(/\s+/g,"")}function Io(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const bn="data-playpilot-injection-key",xn=`[${bn}]`,at={};let Pt=null;function Ao(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(o=>{var s;return o.nodeType===Node.TEXT_NODE&&((s=o.nodeValue)==null?void 0:s.trim())!==""})){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 Sn(){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 Co(e,t,n={aiInjections:[],manualInjections:[]}){var u;const r=Ro(n),i=e.map(l=>l.innerText).join(" "),a=Fo(r),o=a.filter(l=>Xe(i).includes(Xe(l.sentence))),s={};for(const l of o){const d=e.findIndex(y=>Xe(y.innerText).includes(Xe(l.sentence))),m=e[d];if(!m)continue;const g=So(l.title,m,["A"]);if(!g||Eo(g))continue;const h=document.createElement("span");h.dataset.playpilotInjectionKey=l.key;const p=document.createElement("a");p.innerText=l.title,p.href=l.playpilot_url,p.dataset.playpilotOriginalTitle=(u=l.title_details)==null?void 0:u.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",h.insertAdjacentElement("beforeend",p);const w=Io(Object.values(s).filter(y=>y.elementIndex===d).map(y=>y.to));m.innerHTML=To(m.innerHTML,l.title,h.outerHTML,w);const k=m.innerHTML.indexOf(h.outerHTML);s[l.key]={elementIndex:d,from:k,to:k+h.outerHTML.length}}Lo(a,t),Po();const c=Ho(r);return c.length&&Mo(e,c,t),Oo(r,s).filter(l=>l.title_details).map((l,d)=>{const m=!l.inactive&&!l.after_article&&!document.querySelector(`[${bn}="${l.key}"]`),g=l.duplicate??(!l.manual&&Bo(l,d,r));return{...l,inactive:l.inactive??!1,duplicate:g,failed:m}})}function Po(){const e=Array.from(document.querySelectorAll(`${xn} 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 Lo(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(bn);if(!a)return;const o=e.find(s=>a===s.key);o&&Do(r,o,t)}),document.querySelectorAll(xn).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(o=>i===o.key);a&&(r.addEventListener("mouseenter",o=>jo(o,a)),r.addEventListener("mouseleave",()=>Ot(a)))})}function Do(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Ot(t))}function jo(e,t){if(at[t.key]||window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=mn(vo,{target:n,props:{title:t.title_details}});at[t.key]={injection:t,component:r}}function Ot(e,t=!0){const n=at[e.key];n&&(Lr(n.component,{outro:t}),delete at[e.key])}function Mo(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),Pt=mn(bo,{target:r,props:{linkInjections:t,onclickmodal:n}})}function No(){var e;Pt&&(Lr(Pt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Pt=null)}function an(){Object.values(at).forEach(t=>Ot(t.injection)),document.querySelectorAll(xn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(at).forEach(({injection:t})=>Ot(t,!1)),No()}function Oo(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function Ro({aiInjections:e,manualInjections:t}){return[...e,...t.map(n=>({...n,manual:!0}))]}function qo(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function En(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details}function Fo(e){return zr(e).filter(t=>t.in_text!==!1&&En(t))}function Ho(e){return zr(e).filter(t=>t.after_article===!0&&En(t))}function zr(e){return e.filter(t=>t.removed?!1:t.manual&&!t.removed?!0:!e.some(n=>n.manual&&n.removed&&Tn(n,t)))}function Bo(e,t,n){return n.some((r,i)=>t!==i&&r.manual&&Tn(r,e))}function Tn(e,t){return e.title===t.title&&Xe(e.sentence)===Xe(t.sentence)}function Vo(){const e=Sn();return{heading:zo(e),modified_time:$o(e),published_time:Uo(e)}}function zo(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function $o(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?$r(n):null}function Uo(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?$r(n):null}function $r(e){try{return new Date(e).toISOString()}catch{return null}}function on(){return location.protocol+"//"+location.host+location.pathname}let Zt=null;async function Ur(e,t,{hash:n=Hr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=In(),o=Fr()?await Rr():!1,s=Vo();if(!a)throw new Error("No token was provided");const c=await fetch(pn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:s,page_text:t,...r})});if(!c.ok)throw c;return await c.json()}async function Un(e,t,{requireCompletedResult:n=!1,pollInterval:r=3e3,maxTries:i=600}={}){let a=Hr(t),o=0;Zt&&clearTimeout(Zt);const s=async(c,v)=>{try{const u=await Ur(e,t,{hash:a});if(n&&u.automation_enabled&&u.ai_running)throw new Error;u.link_injections=Kn(u.link_injections||[]),u.ai_injections=Kn(u.ai_injections||[]),c(u);return}catch{if(o++,o>=i){i>1&&console.error("Max poll limit exceeded. Please return later."),c();return}Zt=setTimeout(()=>s(c),r)}};return new Promise(s)}async function Ko(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,i=e.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,playpilot_url:s.playpilot_url,after_article:!!s.after_article,after_article_style:s.after_article_style||null,in_text:s.in_text??!0,inactive:!!s.inactive,removed:!!s.removed}));if(!await Ur(on(),t,{params:{private_token:qr(),automation_enabled:!1,link_injections:i,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}function Kn(e){return e.map(t=>({...t,key:Kr(t.sid)}))}function Kr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function In(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var Wo=Te('<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 Yo(e){var t=Wo();b(e,t)}function An(e,t){ie(t,!0);const n=R(t,"children",3,null),r=R(t,"size",3,"margin(2)"),i=R(t,"onclick",3,()=>null),a=Ea(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var o=He(),s=X(o);va(s,()=>t.href?"a":"button",!1,(c,v)=>{let u;M(()=>{u=ma(c,u,{role:t.href?"link":"button",onclick:i(),class:"button",...a},"svelte-1qqv88o",c.namespaceURI===er,c.nodeName.includes("-")),gn(c,"--size",r())});var l=He(),d=X(l);ut(d,()=>n()??ze),b(v,l)}),b(e,o),ae()}var Go=(e,t)=>t()(),Zo=C('<div class="modal svelte-1riopfw"><div class="dialog svelte-1riopfw" role="dialog"><div class="close svelte-1riopfw"><!></div> <!></div> <div class="backdrop svelte-1riopfw"></div></div>');function Jo(e,t){ie(t,!0);const n=R(t,"onclose",3,()=>null),r=R(t,"onscroll",3,()=>null);Er("scope","modal"),dt(()=>{const l=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=l||""});function i(l){return window.innerWidth<600?Kt(l,{duration:250,y:window.innerHeight}):Da(l,{duration:150,start:.85})}var a=Zo();he("keydown",xe,({key:l})=>{l==="Escape"&&n()()});var o=x(a),s=x(o),c=x(s);An(c,{onclick:()=>n()(),children:(l,d)=>{Yo(l)},$$slots:{default:!0}});var v=I(s,2);ut(v,()=>t.children);var u=I(o,2);u.__click=[Go,n],he("scroll",o,function(...l){var d;(d=r())==null||d.apply(this,l)}),Ce(3,o,()=>i),Ce(3,a,()=>Br,()=>({duration:150})),b(e,a),ae()}ve(["click"]);function Xo(e,t){ie(t,!0),Be(Ne.TitleModalView,t.title);let n=!1;function r(){n||(Be(Ne.TitleModalScroll,t.title),n=!0)}Jo(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Vr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ae()}function Qo(e){const t=e-1;return t*t*t+1}function el(e,{from:t,to:n},r={}){var i=getComputedStyle(e),a=tl(e),o=i.transform==="none"?"":i.transform,[s,c]=i.transformOrigin.split(" ").map(parseFloat),v=t.width/n.width,u=t.height/n.height,l=(t.left+v*s-(n.left+s))/a,d=(t.top+u*c-(n.top+c))/a,{delay:m=0,duration:g=p=>Math.sqrt(p)*120,easing:h=Qo}=r;return{delay:m,duration:typeof g=="function"?g(Math.sqrt(l*l+d*d)):g,easing:h,css:(p,w)=>{var k=w*l,y=w*d,A=p+w*v,S=p+w*u;return`transform: ${o} scale(${A}, ${S}) translate(${k}px, ${y}px);`}}}function tl(e){if("currentCSSZoom"in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var nl=Te('<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 rl(e,t){const n=R(t,"expanded",3,!1);var r=nl();M(()=>ce(r,"expanded",n())),b(e,r)}function il(e,t,n){t(!t()),n()(t())}var al=C('<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 ln(e,t){ie(t,!0);let n=R(t,"active",15),r=R(t,"fullwidth",3,!1),i=R(t,"label",3,""),a=R(t,"onclick",3,()=>null);var o=al();o.__click=[il,n,a];var s=x(o),c=x(s);ut(c,()=>t.children),M(()=>{ee(o,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),ce(o,"active",n()),ce(o,"fullwidth",r())}),b(e,o),ae()}ve(["click"]);var ol=C('<input type="text" class="svelte-1vrer3i">');function Cn(e,t){let n=R(t,"value",15),r=R(t,"label",3,""),i=R(t,"name",3,""),a=R(t,"readonly",3,!1),o=R(t,"oninput",3,()=>null);var s=ol();s.__input=function(...c){var v;(v=o())==null||v.apply(this,c)},M(()=>{ee(s,"name",i()),ee(s,"aria-label",r()),ee(s,"placeholder",r()),s.readOnly=a()}),ba(s,n),b(e,s)}ve(["input"]);var ll=Te('<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>'),sl=Te('<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>'),cl=Te('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Wn(e,t){let n=R(t,"align",3,"bottom");var r=cl(),i=x(r);{var a=s=>{var c=ll();b(s,c)},o=s=>{var c=He(),v=X(c);{var u=l=>{var d=sl();b(l,d)};O(v,l=>{n()==="center"&&l(u)},!0)}b(s,c)};O(i,s=>{n()==="bottom"?s(a):s(o,!1)})}b(e,r)}var ul=C("<!> In-text Playlink",1),dl=C("<!> Bottom Playlink",1),vl=(e,t)=>t().after_article_style="playlinks",fl=(e,t)=>t().after_article_style="modal_button",_l=C('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),hl=C('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function ml(e,t){ie(t,!0);let n=R(t,"linkInjection",7),r=W(()=>n().after_article_style==="modal_button");var i=hl(),a=X(i),o=x(a),s=W(()=>n().in_text??!0);ln(o,{fullwidth:!0,get active(){return f(s)},onclick:d=>{n().in_text=d,n().manual=!0},label:"In-text Playlink",children:(d,m)=>{var g=ul(),h=X(g);Wn(h,{align:"center"}),b(d,g)},$$slots:{default:!0}});var c=I(o,2),v=W(()=>n().after_article??!1);ln(c,{fullwidth:!0,get active(){return f(v)},onclick:d=>{n().after_article=d,n().manual=!0},label:"Bottom Playlink",children:(d,m)=>{var g=dl(),h=X(g);Wn(h,{align:"bottom"}),b(d,g)},$$slots:{default:!0}});var u=I(a,2);{var l=d=>{var m=_l(),g=I(x(m),2),h=x(g);h.__click=[vl,n];var p=I(h,2);p.__click=[fl,n];var w=I(p,2);M(()=>{ee(g,"aria-activedescendant",`playlinks-${(f(r)?"after-article":"in-text")??""}`),ee(h,"aria-selected",!f(r)||null),ce(h,"active",!f(r)),ee(p,"aria-selected",f(r)||null),ce(p,"active",f(r)),ce(w,"right",f(r))}),Ce(3,m,()=>Nt,()=>({duration:100})),b(d,m)};O(u,d=>{n().after_article&&d(l)})}b(e,i),ae()}ve(["click"]);var gl=C('<div class="alert svelte-1tq7qhv"><!></div>');function Pn(e,t){ie(t,!0);var n=gl(),r=x(n);ut(r,()=>t.children),b(e,n),ae()}var pl=Te('<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 yl(e){var t=pl();b(e,t)}var wl=(e,t)=>P(t,!f(t)),kl=C('<div class="content svelte-1fmy0wh"><!></div>'),bl=C('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function xl(e,t){ie(t,!0);let n=H(!1),r=H(null);function i(u){var d;const l=u.target;l===f(r)||(d=f(r))!=null&&d.contains(l)||P(n,!1)}var a=bl();he("click",xe,i);var o=x(a);o.__click=[wl,n];var s=x(o);yl(s),it(o,u=>P(r,u),()=>f(r));var c=I(o,2);{var v=u=>{var l=kl(),d=x(l);ut(d,()=>t.children),Ce(1,l,()=>Kt,()=>({duration:150,y:5})),b(u,l)};O(c,u=>{f(n)&&u(v)})}M(()=>{ee(o,"aria-label",t.ariaLabel),ee(o,"aria-expanded",f(n))}),b(e,a),ae()}ve(["click"]);function Sl(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var El=C('<span data-testid="length" class="svelte-1bz02u6"> </span>'),Tl=C('<button class="context-menu-action svelte-1bz02u6">Remove</button>'),Il=(e,t)=>P(t,!f(t)),Al=C('<div class="actions svelte-1bz02u6"><button class="expand svelte-1bz02u6" aria-label="Expand"><!></button> <!></div>'),Cl=C('<div class="expanded svelte-1bz02u6"><div class="label svelte-1bz02u6">Link URL</div> <!> <div class="label offset svelte-1bz02u6">Layout options</div> <div class="type-select svelte-1bz02u6"><!></div></div>'),Pl=C('<div class="item svelte-1bz02u6"><div class="header svelte-1bz02u6"><img class="poster svelte-1bz02u6" alt=""> <div class="info"><div class="title svelte-1bz02u6"> </div> <div class="meta svelte-1bz02u6"><span class="svelte-1bz02u6"><!> 7.1</span> <span class="svelte-1bz02u6"> </span> <span class="svelte-1bz02u6"> </span> <!></div></div> <div class="context-menu svelte-1bz02u6"><!></div></div> <div class="content svelte-1bz02u6"><!> <!></div></div>');function Ll(e,t){ie(t,!0);const n=R(t,"linkInjection",15),r=R(t,"onremove",3,()=>null),i=R(t,"onhighlight",3,()=>null),a=W(()=>n()||{}),o=W(()=>f(a).key),s=W(()=>f(a).sentence),c=W(()=>f(a).title_details),v=W(()=>f(a).failed),u=W(()=>f(c));let l=H(!1),d=H(!1),m=H(null);dt(()=>{f(v)&&Be(Ne.InjectionFailed,f(u),{phrase:n().title,sentence:f(s)})});function g(K=!0){p().forEach(re=>{re.classList.toggle("injection-highlight",K)})}function h(K){let G=K.target,re=G==null?void 0:G.dataset.playpilotInjectionKey;G&&!re&&(G=G.closest(`[data-playpilot-injection-key="${f(o)}"]`),re=G==null?void 0:G.dataset.playpilotInjectionKey),P(d,re===f(o)),f(m)&&f(d)&&i()(f(m))}function p(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${f(o)}"]`))}var w=Pl();he("mouseover",xe,h),w.__click=[Sl,g,p];var k=x(w),y=x(k),A=I(y,2),S=x(A),T=x(S),j=I(S,2),E=x(j),D=x(E);wn(D);var N=I(E,2),B=x(N),U=I(N,2),z=x(U),J=I(U,2);{var te=K=>{var G=El(),re=x(G);M(()=>V(re,`${f(u).length??""}m`)),b(K,G)};O(J,K=>{f(u).length&&K(te)})}var le=I(A,2),me=x(le);xl(me,{ariaLabel:"More options",children:(K,G)=>{var re=Tl();re.__click=function(...ne){var oe;(oe=r())==null||oe.apply(this,ne)},b(K,re)},$$slots:{default:!0}});var ue=I(k,2),se=x(ue);{var L=K=>{Pn(K,{children:(G,re)=>{var ne=Me("A match was found, but the link could not be injected.");b(G,ne)},$$slots:{default:!0}})},F=K=>{var G=Al(),re=x(G);re.__click=[Il,l];var ne=x(re);rl(ne,{get expanded(){return f(l)}});var oe=I(re,2),be=W(()=>!n().inactive);ln(oe,{label:"Visible",get active(){return f(be)},onclick:Oe=>{n(n().inactive=!Oe,!0),n(n().manual=!0,!0)},children:(Oe,Wt)=>{var Ve=Me("Visible");b(Oe,Ve)},$$slots:{default:!0}}),M(()=>ee(re,"aria-expanded",f(l))),b(K,G)};O(se,K=>{f(v)?K(L):K(F,!1)})}var Q=I(se,2);{var we=K=>{var G=Cl(),re=I(x(G),2);Cn(re,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(be){n(n().playpilot_url=be,!0)}});var ne=I(re,4),oe=x(ne);ml(oe,{get linkInjection(){return n()}}),Ce(3,G,()=>Nt,()=>({duration:100})),b(K,G)};O(Q,K=>{f(l)&&K(we)})}it(w,K=>P(m,K),()=>f(m)),M(()=>{ce(w,"highlighted",f(d)),ee(y,"src",f(u).standing_poster),V(T,f(u).title),V(B,f(u).year),V(z,f(u).type)}),he("mouseenter",w,()=>g(!0)),he("mouseleave",w,()=>g(!1)),Ce(6,w,()=>Nt,()=>({duration:200})),b(e,w),ae()}ve(["click"]);var Dl=C('<button class="drag-handle svelte-bwc0q8" aria-label="Move editor"></button>');function jl(e,t){ie(t,!0);let n=R(t,"element",7),r=R(t,"position",23,()=>({x:0,y:0})),i=R(t,"limit",19,()=>({x:0,y:0})),a=R(t,"onchange",3,()=>null),o=!1,s={x:0,y:0},c=r();dt(()=>{v(r().x,r().y)});function v(h,p){const w=window.innerWidth,k=window.innerHeight,y=n().clientWidth,A=n().clientHeight;h=Math.min(Math.max(h,i().x),w-y-i().x),p=Math.min(Math.max(p,i().y),k-A-i().y),n().style.right=h+"px",n().style.bottom=Math.max(p,i().y)+"px",r({x:h,y:p}),a()(r())}function u(h){var p,w;return{x:h.pageX||((p=h.touches)==null?void 0:p[0].pageX)||0,y:h.pageY||((w=h.touches)==null?void 0:w[0].pageY)||0}}function l(h){o=!0,s=u(h),c=r()}function d(h){if(!o)return;const p=u(h),w=p.x-s.x,k=p.y-s.y,y=c.x-w,A=c.y-k;v(y,A)}function m(){o&&(o=!1)}var g=Dl();he("mousemove",xe,d),he("touchmove",xe,d,void 0,!0),he("mouseup",xe,m),he("touchend",xe,m),he("resize",xe,()=>v(r().x,r().y)),g.__mousedown=l,g.__touchstart=l,b(e,g),ae()}ve(["mousedown","touchstart"]);var Ml=Te('<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 Nl(e){var t=Ml();b(e,t)}async function Ol(e){const t=new Headers({"Content-Type":"application/json"}),n=In();if(!n)throw new Error("No token was provided");const r=await fetch(pn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var Rl=Te('<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 ql(e){var t=Rl();b(e,t)}var Fl=(e,t,n)=>t(f(n)),Hl=C("<div> </div>"),Bl=e=>e.stopImmediatePropagation(),Vl=C('<button class="item svelte-15ml41d"><img class="poster svelte-15ml41d" alt="" width="28" height="42"> <div class="content"><div class="name svelte-15ml41d"> </div> <div class="meta svelte-15ml41d"><div class="imdb svelte-15ml41d"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-15ml41d"><!></a></button>'),zl=C('<em class="empty svelte-15ml41d">No results found</em>'),$l=C('<div class="results svelte-15ml41d"></div>'),Ul=C('<div class="search svelte-15ml41d"><!> <!></div>');function Kl(e,t){ie(t,!0);let n=R(t,"onselect",3,()=>null),r=R(t,"query",15),i=H($([])),a=H(null),o=H(!1);Ht(()=>{r()&&s(r())});async function s(m){P(o,!0),P(a,null);try{P(i,$(await Ol(m)))}finally{P(o,!1)}}function c(m){r(m.title),P(a,$(m)),n()(m)}var v=Ul(),u=x(v);Cn(u,{name:"search",label:"Search...",get value(){return r()},set value(m){r(m)}});var l=I(u,2);{var d=m=>{var g=$l();Ge(g,21,()=>f(i),h=>h.sid,(h,p)=>{var w=Vl();w.__click=[Fl,c,p];var k=x(w),y=I(k,2),A=x(y),S=x(A),T=I(A,2),j=x(T),E=x(j);wn(E);var D=I(E),N=I(j,2),B=x(N),U=I(N,2),z=x(U),J=I(U,2);{var te=ue=>{var se=Hl(),L=x(se);M(()=>V(L,`${f(p).length??""} min`)),b(ue,se)};O(J,ue=>{f(p).length&&ue(te)})}var le=I(y,2);le.__click=[Bl];var me=x(le);ql(me),M(()=>{ee(k,"src",f(p).standing_poster),V(S,f(p).title),V(D,` ${f(p).imdb_score??""}`),V(B,f(p).year),V(z,f(p).type),ee(le,"href",`${Nr}/${f(p).type??""}/${f(p).slug??""}`)}),b(h,w)},h=>{var p=He(),w=X(p);{var k=y=>{var A=zl();b(y,A)};O(w,y=>{f(o)||y(k)})}b(h,p)}),b(m,g)};O(l,m=>{r()&&!f(a)&&m(d)})}b(e,v),ae()}ve(["click"]);function Wl(e,t,n,r,i,a){if(!f(t)||!f(n))return;const o=f(n).type==="movie"?"movie":"show",s=Nr+`/${o}/${f(n).slug}`,c={sid:f(n).sid,title:f(t),sentence:f(r),playpilot_url:s,key:Kr(f(n).sid),title_details:f(n),manual:!0};i.onsave(c),a()()}var Yl=C('<div class="error svelte-c3phlu"><!></div>'),Gl=C('<section class="layout svelte-c3phlu"><div class="header svelte-c3phlu"><!> <h2 class="svelte-c3phlu">Add Playlink manually</h2></div> <p class="svelte-c3phlu">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-c3phlu">Selected text</label> <!> <!> <label for="text" class="svelte-c3phlu">Paired title</label> <!> <button class="save svelte-c3phlu">Add playlink</button></section>');function Zl(e,t){ie(t,!0);let n=R(t,"htmlString",3,""),r=R(t,"onclose",3,()=>null),i=H(""),a=H(""),o=H(null),s=H(""),c=H("");dt(v);function v(){const y=window.getSelection();if(!(y!=null&&y.anchorNode)||!Sn().contains(y.anchorNode.parentElement))return;const A=y.toString().trim();if(!A)return;P(s,""),P(i,$(A)),P(c,$(f(i))),P(a,$(u(y,A)));const S=y.getRangeAt(0).commonAncestorContainer.textContent,T=kn(n());(!S||!T.includes(S))&&P(s,"Selection was not inside of given content")}function u(y,A){const S=y.getRangeAt(0);let T=S.startContainer;if((T.textContent||"").length<=A.length*2&&S.startContainer.parentNode&&(T=S.startContainer.parentNode),!T)return"";const j=T.textContent||"",E=S.startOffset,D=S.endOffset,N=j.slice(0,E).lastIndexOf("."),B=j.slice(D).search(/[.!?]/),U=N===-1?0:N+1,z=B===-1?j.length:D+B+1;return j.slice(U,z).trim()}var l=Gl();he("mouseup",xe,v);var d=x(l),m=x(d);An(m,{get onclick(){return r()},size:"24px",children:(y,A)=>{Nl(y)},$$slots:{default:!0}});var g=I(d,6);Cn(g,{get value(){return f(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var h=I(g,2);{var p=y=>{var A=Yl(),S=x(A);Pn(S,{children:(T,j)=>{var E=Me();M(()=>V(E,f(s))),b(T,E)},$$slots:{default:!0}}),b(y,A)};O(h,y=>{f(s)&&y(p)})}var w=I(h,4);Kl(w,{onselect:y=>P(o,$(y)),get query(){return f(c)},set query(y){P(c,$(y))}});var k=I(w,2);k.__click=[Wl,i,o,a,t,r],M(()=>k.disabled=!f(i)||!f(o)),b(e,l),ae()}ve(["click"]);var Jl=Te('<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 Xl(e){var t=Jl();b(e,t)}var Ql=(e,t,n,r)=>{t.onadd(f(n)),P(r,!0)},es=C('AI links are ready. <strong> </strong> New links will be used next time you refresh the page, or you can insert them now. <button class="button svelte-1ds1k2x">Add AI links</button>',1),ts=(e,t)=>P(t,!0),ns=C('AI links finished running, but no new links were found. <button class="button svelte-1ds1k2x">Dismiss</button>',1),rs=C('<div class="animator svelte-1ds1k2x"></div>'),is=C('<div class="ai-indicator svelte-1ds1k2x"><div class="content svelte-1ds1k2x"><div class="icon svelte-1ds1k2x"><!></div> <div><!></div></div> <div class="border svelte-1ds1k2x"><!></div></div>');function as(e,t){ie(t,!0);let n=H(!0),r=H($([])),i=H(!1);function a(v){P(n,!1),P(r,$(v))}var o=He(),s=X(o);{var c=v=>{var u=is(),l=x(u),d=x(l),m=x(d);Xl(m);var g=I(d,2),h=x(g);{var p=S=>{var T=Me("AI links are currently processing. You can add manual links while this is ongoing.");b(S,T)},w=S=>{var T=He(),j=X(T);{var E=N=>{var B=es(),U=I(X(B)),z=x(U),J=I(U,2);J.__click=[Ql,t,r,i],M(()=>V(z,`${f(r).length??""} New ${(f(r).length>1?"links were":"link was")??""} found.`)),b(N,B)},D=N=>{var B=ns(),U=I(X(B));U.__click=[ts,i],b(N,B)};O(j,N=>{var B;(B=f(r))!=null&&B.length?N(E):N(D,!1)},!0)}b(S,T)};O(h,S=>{f(n)?S(p):S(w,!1)})}var k=I(l,2),y=x(k);{var A=S=>{var T=rs();b(S,T)};O(y,S=>{f(n)&&S(A)})}M(()=>ce(u,"running",f(n))),b(v,u)};O(s,v=>{f(i)||v(c)})}return b(e,o),ae({notifyUserOfNewState:a})}ve(["click"]);async function os(e,t,n,r,i,a,o){try{P(t,!0),P(n,!1),r(await Ko(r(),i())),P(a,$(f(o)))}catch{P(n,!0)}finally{P(t,!1)}}var ls=C('<div class="drag-handle svelte-1qckv40"><!></div>'),ss=C('<div class="loading svelte-1qckv40">Loading...</div>'),cs=C('<div class="bubble svelte-1qckv40"> </div> <!>',1),us=C('<div class="error svelte-1qckv40"><!></div>'),ds=C("<div><!></div>"),vs=C('<div class="empty svelte-1qckv40">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),fs=C('<button class="save svelte-1qckv40"> </button>'),_s=C('<!> <div class="items svelte-1qckv40"></div> <!>',1),hs=C('<div class="panel svelte-1qckv40"><!></div>'),ms=C('<section class="editor playpilot-styled-scrollbar svelte-1qckv40"><!> <header class="header svelte-1qckv40"><h1 class="svelte-1qckv40">Playlinks</h1> <!></header> <!> <!> <!></section>');function gs(e,t){ie(t,!0);let n=R(t,"linkInjections",15),r=R(t,"htmlString",3,""),i=R(t,"loading",3,!1),a=R(t,"aiRunning",3,!1);const o="editor-position";let s=H(null),c=$(JSON.parse(localStorage.getItem(o)||'{ "x": 0, "y": 0 }')),v=H(!1),u=H(!1),l=H(!1),d=H(0),m=H(""),g=H(void 0);const h=W(()=>JSON.stringify(n())),p=W(()=>f(m)!==f(h)),w=W(()=>n().filter(L=>L.title_details&&!L.removed&&!L.duplicate));Ht(()=>{i()||Ye(()=>P(m,$(f(h))))});function k(L){localStorage.setItem(o,JSON.stringify(L))}function y(L){const F=n().findIndex(Q=>Q.key===L);n(n()[F].manual=!0,!0),n(n()[F].removed=!0,!0),n([...n()])}function A(L){if(!f(s))return;const F=L.offsetTop,Q=F+L.offsetHeight,we=f(s).scrollTop,K=we+f(s).clientHeight;F>=we&&Q<=K||f(s).scrollTo({top:F-f(s).clientHeight/2,behavior:"smooth"})}function S(L){const F=L.target;P(d,$(F.scrollTop))}function T(L){const F=L.filter(Q=>{if(En(Q))return!n().some(we=>Tn(Q,we))});f(g).notifyUserOfNewState(F)}var j=ms(),E=x(j);{var D=L=>{var F=ls(),Q=x(F);jl(Q,{get element(){return f(s)},get position(){return c},limit:{x:16,y:16},onchange:k}),b(L,F)};O(E,L=>{f(s)&&L(D)})}var N=I(E,2),B=I(x(N),2);{var U=L=>{var F=ss();b(L,F)},z=L=>{var F=cs(),Q=X(F),we=x(Q),K=I(Q,2);An(K,{onclick:()=>P(v,!0),size:"24px","aria-label":"Add manual injection",children:(G,re)=>{var ne=Me("+");b(G,ne)},$$slots:{default:!0}}),M(()=>{ee(Q,"aria-label",`${n().length??""} found playlinks`),V(we,n().length)}),b(L,F)};O(B,L=>{i()?L(U):L(z,!1)})}var J=I(N,2);{var te=L=>{it(as(L,{onadd:F=>F.forEach(Q=>n().push(Q))}),F=>P(g,$(F)),()=>f(g))};O(J,L=>{!i()&&a()&&L(te)})}var le=I(J,2);{var me=L=>{var F=_s(),Q=X(F);{var we=ne=>{var oe=us(),be=x(oe);Pn(be,{children:(Oe,Wt)=>{var Ve=Me("Something went wrong, check your links below.");b(Oe,Ve)},$$slots:{default:!0}}),Ce(7,oe,()=>Nt,()=>({duration:150})),b(ne,oe)};O(Q,ne=>{f(l)&&ne(we)})}var K=I(Q,2);Ge(K,29,()=>f(w),ne=>ne.key,(ne,oe)=>{var be=ds();const Oe=W(()=>n().findIndex(Ve=>Ve.key===f(oe).key));var Wt=x(be);Ll(Wt,{onremove:()=>y(f(oe).key),onhighlight:A,get linkInjection(){return n()[f(Oe)]},set linkInjection(Ve){n(n()[f(Oe)]=Ve,!0)}}),ka(be,()=>el,()=>({duration:300})),b(ne,be)},ne=>{var oe=vs();b(ne,oe)});var G=I(K,2);{var re=ne=>{var oe=fs();oe.__click=[os,u,l,n,r,m,h];var be=x(oe);M(()=>{oe.disabled=f(u),V(be,f(u)?"Saving...":"Save links")}),Ce(1,oe,()=>Br,()=>({duration:100})),b(ne,oe)};O(G,ne=>{f(p)&&n().length&&ne(re)})}b(L,F)};O(le,L=>{i()||L(me)})}var ue=I(le,2);{var se=L=>{var F=hs(),Q=x(F);Zl(Q,{get htmlString(){return r()},onclose:()=>P(v,!1),onsave:we=>n().push(we)}),M(()=>gn(F,"top",`${f(d)??""}px`)),Ce(3,F,()=>Kt,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),b(L,F)};O(ue,L=>{f(v)&&L(se)})}return it(j,L=>P(s,L),()=>f(s)),M(()=>{ce(j,"panel-open",f(v)),ce(j,"loading",i())}),he("scroll",j,S),b(e,j),ae({requestNewAIInjections:T})}ve(["click"]);var ps=C('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!></div>');function ys(e,t){ie(t,!0);const n=Sn(),r=Ao(n),i=r.map(E=>E.outerHTML).join(""),a=Fr();let o=H(null),s=H(null),c=H(!1),v=H(!0),u=H($([])),l=H(void 0);const d=W(()=>f(o)||{}),m=W(()=>Ln(f(d).ai_injections,()=>[],!0)),g=W(()=>Ln(f(d).link_injections,()=>[],!0));Ht(()=>{a&&p()}),dt(()=>(Be(Ne.ArticlePageView),h(),()=>an()));async function h(){var D;if(a&&P(c,$(await Rr())),P(o,$(await Un(on(),i,{maxTries:1}))),w({aiInjections:f(m),manualInjections:f(g)}),P(v,!1),!((D=f(o))!=null&&D.ai_running)||!a)return;const E=await Un(on(),i,{requireCompletedResult:!0});f(l).requestNewAIInjections((E==null?void 0:E.ai_injections)||[])}function p(){an(),w(qo(f(u)))}function w(E={aiInjections:f(m),manualInjections:f(g)}){if(!f(m).length&&!f(g).length)return;const D=Co(r,k,E);JSON.stringify(D)!==JSON.stringify(f(u))&&P(u,$(D))}function k(E){P(s,$(E))}var y=ps(),A=x(y);{var S=E=>{var D=W(()=>{var N,B;return((N=f(o))==null?void 0:N.ai_running)&&((B=f(o))==null?void 0:B.automation_enabled)});it(gs(E,{htmlString:i,get loading(){return f(v)},get aiRunning(){return f(D)},get linkInjections(){return f(u)},set linkInjections(N){P(u,$(N))}}),N=>P(l,$(N)),()=>f(l))};O(A,E=>{a&&f(c)&&E(S)})}var T=I(A,2);{var j=E=>{Xo(E,{get title(){return f(s).title_details},onclose:()=>P(s,null)})};O(T,E=>{f(s)&&f(s).title_details&&E(j)})}b(e,y),ae()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",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.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=mn(ys,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),an()}};
5
+ opacity: ${u-c*p}`}}function Nt(e,{delay:t=0,duration:n=400,easing:r=yn,axis:i="y"}={}){const a=getComputedStyle(e),o=+a.opacity,s=i==="y"?"height":"width",u=parseFloat(a[s]),v=i==="y"?["top","bottom"]:["left","right"],c=v.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),l=parseFloat(a[`padding${c[0]}`]),d=parseFloat(a[`padding${c[1]}`]),m=parseFloat(a[`margin${c[0]}`]),g=parseFloat(a[`margin${c[1]}`]),h=parseFloat(a[`border${c[0]}Width`]),p=parseFloat(a[`border${c[1]}Width`]);return{delay:t,duration:n,easing:r,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*o};${s}: ${w*u}px;padding-${v[0]}: ${w*l}px;padding-${v[1]}: ${w*d}px;margin-${v[0]}: ${w*m}px;margin-${v[1]}: ${w*g}px;border-${v[0]}-width: ${w*h}px;border-${v[1]}-width: ${w*p}px;min-${s}: 0`}}function Ma(e,{delay:t=0,duration:n=400,easing:r=yn,start:i=0,opacity:a=0}={}){const o=getComputedStyle(e),s=+o.opacity,u=o.transform==="none"?"":o.transform,v=1-i,c=s*(1-a);return{delay:t,duration:n,easing:r,css:(l,d)=>`
6
+ transform: ${u} scale(${1-v*d});
7
+ opacity: ${s-c*d}
8
+ `}}var Na=C('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Oa(e,t){ie(t,!0);let n=R(t,"maxHeight",15);Er("scope","popover");let r=H(null),i=H(!1);dt(async()=>{await Nn(),a(),await Nn(),o()});function a(){if(!f(r))return;const{top:l,right:d,bottom:m,height:g}=f(r).getBoundingClientRect(),h=s();P(i,$(l-h<0&&window.innerHeight-m>l+g));const p=window.innerWidth-d-h;d+h>window.innerWidth&&(f(r).style.left=`${p}px`)}function o(){if(!f(r))return;const{top:l,height:d}=f(r).getBoundingClientRect(),m=s(),g=f(i)?window.innerHeight-l-m:l+d-m;n(Math.min(g,window.innerHeight*.8))}function s(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var u=Na(),v=x(u),c=x(v);ut(c,()=>t.children),it(u,l=>P(r,l),()=>f(r)),M(()=>{ce(u,"flip",f(i)),gn(u,"--max-height",n()?n()+"px":null)}),Ce(3,v,()=>Kt,()=>({duration:100,y:10})),b(e,u),ae()}const Ra=[{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 qa=C('<div class="genre svelte-13nhocm"> </div>'),Fa=(e,t)=>P(t,!0),Ha=C('<button class="genre expand svelte-13nhocm"> </button>'),Ba=C("<!> <!>",1);function Va(e,t){ie(t,!0);let n=H(!1),r=W(()=>f(n)?t.genres:[t.genres[0]]);var i=Ba(),a=X(i);Ge(a,17,()=>f(r),yt,(u,v)=>{var c=He();const l=W(()=>{var g;return(g=Ra.find(h=>h.slug===f(v)))==null?void 0:g.name});var d=X(c);{var m=g=>{var h=qa(),p=x(h);M(()=>V(p,fe(f(l)))),b(g,h)};O(d,g=>{f(l)&&g(m)})}b(u,c)});var o=I(a,2);{var s=u=>{var v=Ha();v.__click=[Fa,n];var c=x(v);M(()=>V(c,`+${t.genres.length-1}`)),b(u,v)};O(o,u=>{!f(n)&&t.genres.length>1&&u(s)})}b(e,i),ae()}ve(["click"]);function za(e){let t=[];for(const n of e){let r=n;const i=t.find(s=>s.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(s=>s.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}mi();var $a=Te('<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 Ua(e){var t=$a();b(e,t)}var Ka=(e,t,n)=>t(n()),Wa=C('<div class="arrow svelte-1f6ryh6"><!></div>'),Ya=C('<a target="_blank" class="playlink svelte-1f6ryh6" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1f6ryh6"> <div><span class="name svelte-1f6ryh6"> </span> <div class="category svelte-1f6ryh6"> </div></div> <!></a>'),Ga=C('<div class="playlink empty svelte-1f6ryh6"> </div>'),Za=C('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function Ja(e,t){ie(t,!0);const n=R(t,"list",3,!1),r=Zi("scope")==="modal",i=W(()=>t.playlinks.filter(h=>!!h.logo_url)),a=W(()=>za(f(i))),o={SVOD:fe("Stream"),BUY:fe("Buy"),RENT:fe("Rent"),TVOD:fe("Rent Or Buy")};function s(h){Be(r?Ne.TitleModalPlaylinkClick:Ne.TitlePopoverPlaylinkClick,t.title,{playlink:h})}var u=Za(),v=X(u),c=x(v);M(()=>V(c,fe("Where To Stream Online")));var l=I(v,2),d=x(l);Ge(d,17,()=>f(a),yt,(h,p)=>{let w=()=>f(p).name,k=()=>f(p).url,y=()=>f(p).logo_url,A=()=>f(p).extra_info.category;var S=Ya();S.__click=[Ka,s,w];var T=x(S),j=I(T,2),E=x(j),D=x(E),N=I(E,2),B=x(N);M(()=>V(B,o[A()]||fe("Stream")));var U=I(j,2);{var z=J=>{var te=Wa(),le=x(te);Ua(le),b(J,te)};O(U,J=>{n()&&J(z)})}M(()=>{ee(S,"href",k()),ee(S,"data-playlink",w()),ee(T,"src",y()),V(D,w())}),b(h,S)});var m=I(d,2);{var g=h=>{var p=Ga(),w=x(p);M(()=>V(w,fe("Title Unavailable"))),b(h,p)};O(m,h=>{t.playlinks.length||h(g)})}M(()=>ce(l,"list",n())),b(e,u),ae()}ve(["click"]);var Xa=(e,t)=>P(t,!0),Qa=C('<button class="show-more svelte-fluzit">Show more</button>'),eo=C('<p class="svelte-fluzit"> </p>'),to=C('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function no(e,t){ie(t,!0);const n=R(t,"blurb",3,""),r=R(t,"limit",3,200);let i=H(!1),a=W(()=>t.text.slice(0,r()));var o=to(),s=x(o),u=x(s),v=I(u);{var c=h=>{var p=Me("...");b(h,p)};O(v,h=>{!f(i)&&t.text.length>r()&&h(c)})}var l=I(v,2);{var d=h=>{var p=Qa();p.__click=[Xa,i],b(h,p)};O(l,h=>{!f(i)&&(t.text.length>r()||n())&&h(d)})}var m=I(s,2);{var g=h=>{var p=eo(),w=x(p);M(()=>V(w,n())),b(h,p)};O(m,h=>{f(i)&&h(g)})}M(()=>V(u,f(i)?t.text:f(a))),b(e,o),ae()}ve(["click"]);var ro=C('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),io=C('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function ao(e,t){var n=io(),r=I(X(n),2);Ge(r,21,()=>t.participants,yt,(i,a)=>{var o=ro(),s=x(o),u=I(s),v=x(u);M(()=>{var d;return V(v,((d=f(a).character)==null?void 0:d.slice(0,20))||"")});var c=I(v);{var l=d=>{var m=Me("...");b(d,m)};O(c,d=>{var m;(m=f(a).character)!=null&&m.length&&d(l)})}M(()=>V(s,`${f(a).name??""} `)),b(i,o)}),b(e,n)}var oo=Te('<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 wn(e){var t=oo();b(e,t)}var lo=C('<div class="top svelte-138sn9z"><img class="poster svelte-138sn9z"></div>'),so=C("<div> </div>"),co=C("<!> <!>",1),uo=C('<div class="content svelte-138sn9z" data-playpilot-link-injections-title=""><header class="header svelte-138sn9z"><!> <h1 class="svelte-138sn9z"> </h1> <div class="info svelte-138sn9z"><div class="imdb svelte-138sn9z"><!> </div> <!> <div> </div> <div class="capitalize svelte-138sn9z"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-138sn9z"><img alt="" class="svelte-138sn9z"></div>',1);function zr(e,t){ie(t,!0);const n=R(t,"small",3,!1),r=R(t,"compact",3,!1);let i=H(!1);var a=uo(),o=X(a),s=x(o),u=x(s);{var v=z=>{var J=lo(),te=x(J);M(()=>{ee(te,"src",t.title.standing_poster),ee(te,"alt",`Movie poster for '${t.title.title??""}'`),ce(te,"loaded",f(i))}),he("load",te,()=>P(i,!0)),b(z,J)};O(u,z=>{r()||z(v)})}var c=I(u,2),l=x(c),d=I(c,2),m=x(d),g=x(m);wn(g);var h=I(g),p=I(m,2);Va(p,{get genres(){return t.title.genres}});var w=I(p,2),k=x(w),y=I(w,2),A=x(y);M(()=>V(A,fe(`Type: ${t.title.type}`)));var S=I(y,2);{var T=z=>{var J=so(),te=x(J);M(()=>V(te,`${t.title.length??""} ${fe("Minutes")??""}`)),b(z,J)};O(S,z=>{!n()&&t.title.length&&z(T)})}var j=I(s,2),E=x(j);Ja(E,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var D=I(E,2);{var N=z=>{var J=co(),te=X(J);no(te,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var le=I(te,2);{var me=ue=>{ao(ue,{get participants(){return t.title.participants}})};O(le,ue=>{var se;(se=t.title.participants)!=null&&se.length&&ue(me)})}b(z,J)};O(D,z=>{n()||z(N)})}var B=I(o,2),U=x(B);M(()=>{ee(o,"data-playpilot-original-title",t.title.original_title),ce(o,"small",n()),ce(o,"compact",r()),ce(c,"truncate",n()),V(l,t.title.title),V(h,` ${t.title.imdb_score??""}`),V(k,t.title.year),ce(B,"faded",r()),ee(U,"src",t.title.medium_poster)}),b(e,a),ae()}function vo(e,t){ie(t,!0);let n=H(0);Be(Ne.TitlePopoverView,t.title),Oa(e,{get maxHeight(){return f(n)},set maxHeight(r){P(n,$(r))},children:(r,i)=>{var a=W(()=>f(n)<250);zr(r,{get title(){return t.title},small:!0,get compact(){return f(a)}})},$$slots:{default:!0}}),ae()}var fo=(e,t,n,r)=>t(f(n).title_details,f(r)),_o=C(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),ho=(e,t,n,r)=>t(f(n).title_details,r()),mo=C('<!> <a target="_blank"> </a>',1),go=C(" <!>.",1),po=C("<!> <br>",1),yo=C(" <br>",1),wo=C('<span class="svelte-6p0hvs"><!></span>'),ko=C("<p></p>");function bo(e,t){ie(t,!0);const n=R(t,"onclickmodal",3,u=>null);function r(u,v){Be(Ne.AfterArticlePlaylinkClick,u,{playlink:v})}function i(u,v){Be(Ne.AfterArticleModalButtonClick,u),n()(v)}var a=He(),o=X(a);{var s=u=>{var v=ko();Ge(v,21,()=>t.linkInjections,yt,(c,l)=>{var d=wo();const m=W(()=>{const{key:k,title:y,title_details:A,after_article_style:S}=f(l);return{key:k,title:y,title_details:A,after_article_style:S}}),g=W(()=>{var k;return((k=f(m).title_details)==null?void 0:k.providers)||[]});var h=x(d);{var p=k=>{var y=po(),A=X(y);{var S=j=>{var E=_o(),D=X(E);M(()=>V(D,`"${f(m).title??""}" ${fe("Is Available To Stream")??""} `));var N=I(D),B=x(N);B.__click=[fo,i,m,l];var U=x(B);M(()=>V(U,fe("View Streaming Options"))),b(j,E)},T=j=>{var E=go(),D=X(E);M(()=>V(D,`"${f(m).title??""}" ${fe("Is Available To Stream On")??""} `));var N=I(D);Ge(N,17,()=>f(g),yt,(B,U,z)=>{let J=()=>f(U).name,te=()=>f(U).url;var le=mo(),me=X(le);{var ue=F=>{var Q=Me();M(()=>V(Q,z===f(g).length-1?`, ${fe("And")}`:",")),b(F,Q)};O(me,F=>{z&&F(ue)})}var se=I(me,2);se.__click=[ho,r,m,J];var L=x(se);M(()=>{ee(se,"href",te()),V(L,J())}),b(B,le)}),b(j,E)};O(A,j=>{f(m).after_article_style==="modal_button"?j(S):j(T,!1)})}b(k,y)},w=k=>{var y=yo(),A=X(y);M(()=>V(A,`"${f(m).title??""}" ${fe("Title Unavailable Suffix")??""} `)),b(k,y)};O(h,k=>{f(g).length?k(p):k(w,!1)})}M(()=>ee(d,"data-playpilot-injection-key",f(m).key)),b(c,d)}),b(u,v)};O(o,u=>{t.linkInjections.length&&u(s)})}b(e,a),ae()}ve(["click"]);function xo(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function kn(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function So(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 Eo(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function To(e,t,n,r){const i=xo(t),a=kn(t),o=e.slice(0,r),s=e.slice(r),u=/[-/\\^$*+?.()|[\]{}]/g,v=new RegExp(`${a.replace(u,"\\$&")}|${i.replace(u,"\\$&")}`),c=s.replace(v,n);return o+c}function Xe(e){return kn(e).toLowerCase().replace(/\s+/g,"")}function Io(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const bn="data-playpilot-injection-key",xn=`[${bn}]`,at={};let Pt=null;function Ao(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(o=>{var s;return o.nodeType===Node.TEXT_NODE&&((s=o.nodeValue)==null?void 0:s.trim())!==""})){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 Sn(){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 Co(e,t,n={aiInjections:[],manualInjections:[]}){var c;const r=Ro(n),i=e.map(l=>l.innerText).join(" "),a=Fo(r),o=a.filter(l=>Xe(i).includes(Xe(l.sentence))),s={};for(const l of o){const d=e.findIndex(y=>Xe(y.innerText).includes(Xe(l.sentence))),m=e[d];if(!m)continue;const g=So(l.title,m,["A"]);if(!g||Eo(g))continue;const h=document.createElement("span");h.dataset.playpilotInjectionKey=l.key;const p=document.createElement("a");p.innerText=l.title,p.href=l.playpilot_url,p.dataset.playpilotOriginalTitle=(c=l.title_details)==null?void 0:c.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",h.insertAdjacentElement("beforeend",p);const w=Io(Object.values(s).filter(y=>y.elementIndex===d).map(y=>y.to));m.innerHTML=To(m.innerHTML,l.title,h.outerHTML,w);const k=m.innerHTML.indexOf(h.outerHTML);s[l.key]={elementIndex:d,from:k,to:k+h.outerHTML.length}}Lo(a,t),Po();const u=Ho(r);return u.length&&Mo(e,u,t),Oo(r,s).filter(l=>l.title_details).map((l,d)=>{const m=!l.inactive&&!l.after_article&&!document.querySelector(`[${bn}="${l.key}"]`),g=l.duplicate??(!l.manual&&Bo(l,d,r));return{...l,inactive:l.inactive??!1,duplicate:g,failed:m}})}function Po(){const e=Array.from(document.querySelectorAll(`${xn} 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 Lo(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(bn);if(!a)return;const o=e.find(s=>a===s.key);o&&Do(r,o,t)}),document.querySelectorAll(xn).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(o=>i===o.key);a&&(r.addEventListener("mouseenter",o=>jo(o,a)),r.addEventListener("mouseleave",()=>Ot(a)))})}function Do(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Ot(t))}function jo(e,t){if(at[t.key]||window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=mn(vo,{target:n,props:{title:t.title_details}});at[t.key]={injection:t,component:r}}function Ot(e,t=!0){const n=at[e.key];n&&(Lr(n.component,{outro:t}),delete at[e.key])}function Mo(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),Pt=mn(bo,{target:r,props:{linkInjections:t,onclickmodal:n}})}function No(){var e;Pt&&(Lr(Pt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Pt=null)}function an(){Object.values(at).forEach(t=>Ot(t.injection)),document.querySelectorAll(xn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(at).forEach(({injection:t})=>Ot(t,!1)),No()}function Oo(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function Ro({aiInjections:e,manualInjections:t}){return[...e,...t.map(n=>({...n,manual:!0}))]}function qo(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function En(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details}function Fo(e){return $r(e).filter(t=>t.in_text!==!1&&En(t))}function Ho(e){return $r(e).filter(t=>t.after_article===!0&&En(t))}function $r(e){return e.filter(t=>t.removed?!1:t.manual&&!t.removed?!0:!e.some(n=>n.manual&&n.removed&&Tn(n,t)))}function Bo(e,t,n){return n.some((r,i)=>t!==i&&r.manual&&Tn(r,e))}function Tn(e,t){return e.title===t.title&&Xe(e.sentence)===Xe(t.sentence)}function Vo(){const e=Sn();return{heading:zo(e),modified_time:$o(e),published_time:Uo(e)}}function zo(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function $o(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?Ur(n):null}function Uo(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?Ur(n):null}function Ur(e){try{return new Date(e).toISOString()}catch{return null}}function on(){return location.protocol+"//"+location.host+location.pathname}let Zt=null;async function Kr(e,t,{hash:n=Hr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=In(),o=Fr()?await Rr():!1,s=Br(),u=Vo();if(!a)throw new Error("No token was provided");const v=await fetch(pn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${s}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:u,page_text:t,...r})});if(!v.ok)throw v;return await v.json()}async function Un(e,t,{requireCompletedResult:n=!1,pollInterval:r=3e3,maxTries:i=600}={}){let a=Hr(t),o=0;Zt&&clearTimeout(Zt);const s=async(u,v)=>{try{const c=await Kr(e,t,{hash:a});if(n&&c.automation_enabled&&c.ai_running)throw new Error;c.link_injections=Kn(c.link_injections||[]),c.ai_injections=Kn(c.ai_injections||[]),u(c);return}catch{if(o++,o>=i){i>1&&console.error("Max poll limit exceeded. Please return later."),u();return}Zt=setTimeout(()=>s(u),r)}};return new Promise(s)}async function Ko(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,i=e.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,playpilot_url:s.playpilot_url,after_article:!!s.after_article,after_article_style:s.after_article_style||null,in_text:s.in_text??!0,inactive:!!s.inactive,removed:!!s.removed}));if(!await Kr(on(),t,{params:{private_token:qr(),automation_enabled:!1,link_injections:i,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}function Kn(e){return e.map(t=>({...t,key:Wr(t.sid)}))}function Wr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function In(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var Wo=Te('<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 Yo(e){var t=Wo();b(e,t)}function An(e,t){ie(t,!0);const n=R(t,"children",3,null),r=R(t,"size",3,"margin(2)"),i=R(t,"onclick",3,()=>null),a=Ta(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var o=He(),s=X(o);fa(s,()=>t.href?"a":"button",!1,(u,v)=>{let c;M(()=>{c=ga(u,c,{role:t.href?"link":"button",onclick:i(),class:"button",...a},"svelte-1qqv88o",u.namespaceURI===er,u.nodeName.includes("-")),gn(u,"--size",r())});var l=He(),d=X(l);ut(d,()=>n()??ze),b(v,l)}),b(e,o),ae()}var Go=(e,t)=>t()(),Zo=C('<div class="modal svelte-1riopfw"><div class="dialog svelte-1riopfw" role="dialog"><div class="close svelte-1riopfw"><!></div> <!></div> <div class="backdrop svelte-1riopfw"></div></div>');function Jo(e,t){ie(t,!0);const n=R(t,"onclose",3,()=>null),r=R(t,"onscroll",3,()=>null);Er("scope","modal"),dt(()=>{const l=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=l||""});function i(l){return window.innerWidth<600?Kt(l,{duration:250,y:window.innerHeight}):Ma(l,{duration:150,start:.85})}var a=Zo();he("keydown",xe,({key:l})=>{l==="Escape"&&n()()});var o=x(a),s=x(o),u=x(s);An(u,{onclick:()=>n()(),children:(l,d)=>{Yo(l)},$$slots:{default:!0}});var v=I(s,2);ut(v,()=>t.children);var c=I(o,2);c.__click=[Go,n],he("scroll",o,function(...l){var d;(d=r())==null||d.apply(this,l)}),Ce(3,o,()=>i),Ce(3,a,()=>Vr,()=>({duration:150})),b(e,a),ae()}ve(["click"]);function Xo(e,t){ie(t,!0),Be(Ne.TitleModalView,t.title);let n=!1;function r(){n||(Be(Ne.TitleModalScroll,t.title),n=!0)}Jo(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{zr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ae()}function Qo(e){const t=e-1;return t*t*t+1}function el(e,{from:t,to:n},r={}){var i=getComputedStyle(e),a=tl(e),o=i.transform==="none"?"":i.transform,[s,u]=i.transformOrigin.split(" ").map(parseFloat),v=t.width/n.width,c=t.height/n.height,l=(t.left+v*s-(n.left+s))/a,d=(t.top+c*u-(n.top+u))/a,{delay:m=0,duration:g=p=>Math.sqrt(p)*120,easing:h=Qo}=r;return{delay:m,duration:typeof g=="function"?g(Math.sqrt(l*l+d*d)):g,easing:h,css:(p,w)=>{var k=w*l,y=w*d,A=p+w*v,S=p+w*c;return`transform: ${o} scale(${A}, ${S}) translate(${k}px, ${y}px);`}}}function tl(e){if("currentCSSZoom"in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var nl=Te('<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 rl(e,t){const n=R(t,"expanded",3,!1);var r=nl();M(()=>ce(r,"expanded",n())),b(e,r)}function il(e,t,n){t(!t()),n()(t())}var al=C('<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 ln(e,t){ie(t,!0);let n=R(t,"active",15),r=R(t,"fullwidth",3,!1),i=R(t,"label",3,""),a=R(t,"onclick",3,()=>null);var o=al();o.__click=[il,n,a];var s=x(o),u=x(s);ut(u,()=>t.children),M(()=>{ee(o,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),ce(o,"active",n()),ce(o,"fullwidth",r())}),b(e,o),ae()}ve(["click"]);var ol=C('<input type="text" class="svelte-1vrer3i">');function Cn(e,t){let n=R(t,"value",15),r=R(t,"label",3,""),i=R(t,"name",3,""),a=R(t,"readonly",3,!1),o=R(t,"oninput",3,()=>null);var s=ol();s.__input=function(...u){var v;(v=o())==null||v.apply(this,u)},M(()=>{ee(s,"name",i()),ee(s,"aria-label",r()),ee(s,"placeholder",r()),s.readOnly=a()}),xa(s,n),b(e,s)}ve(["input"]);var ll=Te('<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>'),sl=Te('<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>'),cl=Te('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Wn(e,t){let n=R(t,"align",3,"bottom");var r=cl(),i=x(r);{var a=s=>{var u=ll();b(s,u)},o=s=>{var u=He(),v=X(u);{var c=l=>{var d=sl();b(l,d)};O(v,l=>{n()==="center"&&l(c)},!0)}b(s,u)};O(i,s=>{n()==="bottom"?s(a):s(o,!1)})}b(e,r)}var ul=C("<!> In-text Playlink",1),dl=C("<!> Bottom Playlink",1),vl=(e,t)=>t().after_article_style="playlinks",fl=(e,t)=>t().after_article_style="modal_button",_l=C('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),hl=C('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function ml(e,t){ie(t,!0);let n=R(t,"linkInjection",7),r=W(()=>n().after_article_style==="modal_button");var i=hl(),a=X(i),o=x(a),s=W(()=>n().in_text??!0);ln(o,{fullwidth:!0,get active(){return f(s)},onclick:d=>{n().in_text=d,n().manual=!0},label:"In-text Playlink",children:(d,m)=>{var g=ul(),h=X(g);Wn(h,{align:"center"}),b(d,g)},$$slots:{default:!0}});var u=I(o,2),v=W(()=>n().after_article??!1);ln(u,{fullwidth:!0,get active(){return f(v)},onclick:d=>{n().after_article=d,n().manual=!0},label:"Bottom Playlink",children:(d,m)=>{var g=dl(),h=X(g);Wn(h,{align:"bottom"}),b(d,g)},$$slots:{default:!0}});var c=I(a,2);{var l=d=>{var m=_l(),g=I(x(m),2),h=x(g);h.__click=[vl,n];var p=I(h,2);p.__click=[fl,n];var w=I(p,2);M(()=>{ee(g,"aria-activedescendant",`playlinks-${(f(r)?"after-article":"in-text")??""}`),ee(h,"aria-selected",!f(r)||null),ce(h,"active",!f(r)),ee(p,"aria-selected",f(r)||null),ce(p,"active",f(r)),ce(w,"right",f(r))}),Ce(3,m,()=>Nt,()=>({duration:100})),b(d,m)};O(c,d=>{n().after_article&&d(l)})}b(e,i),ae()}ve(["click"]);var gl=C('<div class="alert svelte-1tq7qhv"><!></div>');function Pn(e,t){ie(t,!0);var n=gl(),r=x(n);ut(r,()=>t.children),b(e,n),ae()}var pl=Te('<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 yl(e){var t=pl();b(e,t)}var wl=(e,t)=>P(t,!f(t)),kl=C('<div class="content svelte-1fmy0wh"><!></div>'),bl=C('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function xl(e,t){ie(t,!0);let n=H(!1),r=H(null);function i(c){var d;const l=c.target;l===f(r)||(d=f(r))!=null&&d.contains(l)||P(n,!1)}var a=bl();he("click",xe,i);var o=x(a);o.__click=[wl,n];var s=x(o);yl(s),it(o,c=>P(r,c),()=>f(r));var u=I(o,2);{var v=c=>{var l=kl(),d=x(l);ut(d,()=>t.children),Ce(1,l,()=>Kt,()=>({duration:150,y:5})),b(c,l)};O(u,c=>{f(n)&&c(v)})}M(()=>{ee(o,"aria-label",t.ariaLabel),ee(o,"aria-expanded",f(n))}),b(e,a),ae()}ve(["click"]);function Sl(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var El=C('<span data-testid="length" class="svelte-1bz02u6"> </span>'),Tl=C('<button class="context-menu-action svelte-1bz02u6">Remove</button>'),Il=(e,t)=>P(t,!f(t)),Al=C('<div class="actions svelte-1bz02u6"><button class="expand svelte-1bz02u6" aria-label="Expand"><!></button> <!></div>'),Cl=C('<div class="expanded svelte-1bz02u6"><div class="label svelte-1bz02u6">Link URL</div> <!> <div class="label offset svelte-1bz02u6">Layout options</div> <div class="type-select svelte-1bz02u6"><!></div></div>'),Pl=C('<div class="item svelte-1bz02u6"><div class="header svelte-1bz02u6"><img class="poster svelte-1bz02u6" alt=""> <div class="info"><div class="title svelte-1bz02u6"> </div> <div class="meta svelte-1bz02u6"><span class="svelte-1bz02u6"><!> 7.1</span> <span class="svelte-1bz02u6"> </span> <span class="svelte-1bz02u6"> </span> <!></div></div> <div class="context-menu svelte-1bz02u6"><!></div></div> <div class="content svelte-1bz02u6"><!> <!></div></div>');function Ll(e,t){ie(t,!0);const n=R(t,"linkInjection",15),r=R(t,"onremove",3,()=>null),i=R(t,"onhighlight",3,()=>null),a=W(()=>n()||{}),o=W(()=>f(a).key),s=W(()=>f(a).sentence),u=W(()=>f(a).title_details),v=W(()=>f(a).failed),c=W(()=>f(u));let l=H(!1),d=H(!1),m=H(null);dt(()=>{f(v)&&Be(Ne.InjectionFailed,f(c),{phrase:n().title,sentence:f(s)})});function g(K=!0){p().forEach(re=>{re.classList.toggle("injection-highlight",K)})}function h(K){let G=K.target,re=G==null?void 0:G.dataset.playpilotInjectionKey;G&&!re&&(G=G.closest(`[data-playpilot-injection-key="${f(o)}"]`),re=G==null?void 0:G.dataset.playpilotInjectionKey),P(d,re===f(o)),f(m)&&f(d)&&i()(f(m))}function p(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${f(o)}"]`))}var w=Pl();he("mouseover",xe,h),w.__click=[Sl,g,p];var k=x(w),y=x(k),A=I(y,2),S=x(A),T=x(S),j=I(S,2),E=x(j),D=x(E);wn(D);var N=I(E,2),B=x(N),U=I(N,2),z=x(U),J=I(U,2);{var te=K=>{var G=El(),re=x(G);M(()=>V(re,`${f(c).length??""}m`)),b(K,G)};O(J,K=>{f(c).length&&K(te)})}var le=I(A,2),me=x(le);xl(me,{ariaLabel:"More options",children:(K,G)=>{var re=Tl();re.__click=function(...ne){var oe;(oe=r())==null||oe.apply(this,ne)},b(K,re)},$$slots:{default:!0}});var ue=I(k,2),se=x(ue);{var L=K=>{Pn(K,{children:(G,re)=>{var ne=Me("A match was found, but the link could not be injected.");b(G,ne)},$$slots:{default:!0}})},F=K=>{var G=Al(),re=x(G);re.__click=[Il,l];var ne=x(re);rl(ne,{get expanded(){return f(l)}});var oe=I(re,2),be=W(()=>!n().inactive);ln(oe,{label:"Visible",get active(){return f(be)},onclick:Oe=>{n(n().inactive=!Oe,!0),n(n().manual=!0,!0)},children:(Oe,Wt)=>{var Ve=Me("Visible");b(Oe,Ve)},$$slots:{default:!0}}),M(()=>ee(re,"aria-expanded",f(l))),b(K,G)};O(se,K=>{f(v)?K(L):K(F,!1)})}var Q=I(se,2);{var we=K=>{var G=Cl(),re=I(x(G),2);Cn(re,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(be){n(n().playpilot_url=be,!0)}});var ne=I(re,4),oe=x(ne);ml(oe,{get linkInjection(){return n()}}),Ce(3,G,()=>Nt,()=>({duration:100})),b(K,G)};O(Q,K=>{f(l)&&K(we)})}it(w,K=>P(m,K),()=>f(m)),M(()=>{ce(w,"highlighted",f(d)),ee(y,"src",f(c).standing_poster),V(T,f(c).title),V(B,f(c).year),V(z,f(c).type)}),he("mouseenter",w,()=>g(!0)),he("mouseleave",w,()=>g(!1)),Ce(6,w,()=>Nt,()=>({duration:200})),b(e,w),ae()}ve(["click"]);var Dl=C('<button class="drag-handle svelte-bwc0q8" aria-label="Move editor"></button>');function jl(e,t){ie(t,!0);let n=R(t,"element",7),r=R(t,"position",23,()=>({x:0,y:0})),i=R(t,"limit",19,()=>({x:0,y:0})),a=R(t,"onchange",3,()=>null),o=!1,s={x:0,y:0},u=r();dt(()=>{v(r().x,r().y)});function v(h,p){const w=window.innerWidth,k=window.innerHeight,y=n().clientWidth,A=n().clientHeight;h=Math.min(Math.max(h,i().x),w-y-i().x),p=Math.min(Math.max(p,i().y),k-A-i().y),n().style.right=h+"px",n().style.bottom=Math.max(p,i().y)+"px",r({x:h,y:p}),a()(r())}function c(h){var p,w;return{x:h.pageX||((p=h.touches)==null?void 0:p[0].pageX)||0,y:h.pageY||((w=h.touches)==null?void 0:w[0].pageY)||0}}function l(h){o=!0,s=c(h),u=r()}function d(h){if(!o)return;const p=c(h),w=p.x-s.x,k=p.y-s.y,y=u.x-w,A=u.y-k;v(y,A)}function m(){o&&(o=!1)}var g=Dl();he("mousemove",xe,d),he("touchmove",xe,d,void 0,!0),he("mouseup",xe,m),he("touchend",xe,m),he("resize",xe,()=>v(r().x,r().y)),g.__mousedown=l,g.__touchstart=l,b(e,g),ae()}ve(["mousedown","touchstart"]);var Ml=Te('<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 Nl(e){var t=Ml();b(e,t)}async function Ol(e){const t=new Headers({"Content-Type":"application/json"}),n=In();if(!n)throw new Error("No token was provided");const r=await fetch(pn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var Rl=Te('<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 ql(e){var t=Rl();b(e,t)}var Fl=(e,t,n)=>t(f(n)),Hl=C("<div> </div>"),Bl=e=>e.stopImmediatePropagation(),Vl=C('<button class="item svelte-15ml41d"><img class="poster svelte-15ml41d" alt="" width="28" height="42"> <div class="content"><div class="name svelte-15ml41d"> </div> <div class="meta svelte-15ml41d"><div class="imdb svelte-15ml41d"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-15ml41d"><!></a></button>'),zl=C('<em class="empty svelte-15ml41d">No results found</em>'),$l=C('<div class="results svelte-15ml41d"></div>'),Ul=C('<div class="search svelte-15ml41d"><!> <!></div>');function Kl(e,t){ie(t,!0);let n=R(t,"onselect",3,()=>null),r=R(t,"query",15),i=H($([])),a=H(null),o=H(!1);Ht(()=>{r()&&s(r())});async function s(m){P(o,!0),P(a,null);try{P(i,$(await Ol(m)))}finally{P(o,!1)}}function u(m){r(m.title),P(a,$(m)),n()(m)}var v=Ul(),c=x(v);Cn(c,{name:"search",label:"Search...",get value(){return r()},set value(m){r(m)}});var l=I(c,2);{var d=m=>{var g=$l();Ge(g,21,()=>f(i),h=>h.sid,(h,p)=>{var w=Vl();w.__click=[Fl,u,p];var k=x(w),y=I(k,2),A=x(y),S=x(A),T=I(A,2),j=x(T),E=x(j);wn(E);var D=I(E),N=I(j,2),B=x(N),U=I(N,2),z=x(U),J=I(U,2);{var te=ue=>{var se=Hl(),L=x(se);M(()=>V(L,`${f(p).length??""} min`)),b(ue,se)};O(J,ue=>{f(p).length&&ue(te)})}var le=I(y,2);le.__click=[Bl];var me=x(le);ql(me),M(()=>{ee(k,"src",f(p).standing_poster),V(S,f(p).title),V(D,` ${f(p).imdb_score??""}`),V(B,f(p).year),V(z,f(p).type),ee(le,"href",`${Nr}/${f(p).type??""}/${f(p).slug??""}`)}),b(h,w)},h=>{var p=He(),w=X(p);{var k=y=>{var A=zl();b(y,A)};O(w,y=>{f(o)||y(k)})}b(h,p)}),b(m,g)};O(l,m=>{r()&&!f(a)&&m(d)})}b(e,v),ae()}ve(["click"]);function Wl(e,t,n,r,i,a){if(!f(t)||!f(n))return;const o=f(n).type==="movie"?"movie":"show",s=Nr+`/${o}/${f(n).slug}`,u={sid:f(n).sid,title:f(t),sentence:f(r),playpilot_url:s,key:Wr(f(n).sid),title_details:f(n),manual:!0};i.onsave(u),a()()}var Yl=C('<div class="error svelte-c3phlu"><!></div>'),Gl=C('<section class="layout svelte-c3phlu"><div class="header svelte-c3phlu"><!> <h2 class="svelte-c3phlu">Add Playlink manually</h2></div> <p class="svelte-c3phlu">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-c3phlu">Selected text</label> <!> <!> <label for="text" class="svelte-c3phlu">Paired title</label> <!> <button class="save svelte-c3phlu">Add playlink</button></section>');function Zl(e,t){ie(t,!0);let n=R(t,"htmlString",3,""),r=R(t,"onclose",3,()=>null),i=H(""),a=H(""),o=H(null),s=H(""),u=H("");dt(v);function v(){const y=window.getSelection();if(!(y!=null&&y.anchorNode)||!Sn().contains(y.anchorNode.parentElement))return;const A=y.toString().trim();if(!A)return;P(s,""),P(i,$(A)),P(u,$(f(i))),P(a,$(c(y,A)));const S=y.getRangeAt(0).commonAncestorContainer.textContent,T=kn(n());(!S||!T.includes(S))&&P(s,"Selection was not inside of given content")}function c(y,A){const S=y.getRangeAt(0);let T=S.startContainer;if((T.textContent||"").length<=A.length*2&&S.startContainer.parentNode&&(T=S.startContainer.parentNode),!T)return"";const j=T.textContent||"",E=S.startOffset,D=S.endOffset,N=j.slice(0,E).lastIndexOf("."),B=j.slice(D).search(/[.!?]/),U=N===-1?0:N+1,z=B===-1?j.length:D+B+1;return j.slice(U,z).trim()}var l=Gl();he("mouseup",xe,v);var d=x(l),m=x(d);An(m,{get onclick(){return r()},size:"24px",children:(y,A)=>{Nl(y)},$$slots:{default:!0}});var g=I(d,6);Cn(g,{get value(){return f(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var h=I(g,2);{var p=y=>{var A=Yl(),S=x(A);Pn(S,{children:(T,j)=>{var E=Me();M(()=>V(E,f(s))),b(T,E)},$$slots:{default:!0}}),b(y,A)};O(h,y=>{f(s)&&y(p)})}var w=I(h,4);Kl(w,{onselect:y=>P(o,$(y)),get query(){return f(u)},set query(y){P(u,$(y))}});var k=I(w,2);k.__click=[Wl,i,o,a,t,r],M(()=>k.disabled=!f(i)||!f(o)),b(e,l),ae()}ve(["click"]);var Jl=Te('<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 Xl(e){var t=Jl();b(e,t)}var Ql=(e,t,n,r)=>{t.onadd(f(n)),P(r,!0)},es=C('AI links are ready. <strong> </strong> New links will be used next time you refresh the page, or you can insert them now. <button class="button svelte-1ds1k2x">Add AI links</button>',1),ts=(e,t)=>P(t,!0),ns=C('AI links finished running, but no new links were found. <button class="button svelte-1ds1k2x">Dismiss</button>',1),rs=C('<div class="animator svelte-1ds1k2x"></div>'),is=C('<div class="ai-indicator svelte-1ds1k2x"><div class="content svelte-1ds1k2x"><div class="icon svelte-1ds1k2x"><!></div> <div><!></div></div> <div class="border svelte-1ds1k2x"><!></div></div>');function as(e,t){ie(t,!0);let n=H(!0),r=H($([])),i=H(!1);function a(v){P(n,!1),P(r,$(v))}var o=He(),s=X(o);{var u=v=>{var c=is(),l=x(c),d=x(l),m=x(d);Xl(m);var g=I(d,2),h=x(g);{var p=S=>{var T=Me("AI links are currently processing. You can add manual links while this is ongoing.");b(S,T)},w=S=>{var T=He(),j=X(T);{var E=N=>{var B=es(),U=I(X(B)),z=x(U),J=I(U,2);J.__click=[Ql,t,r,i],M(()=>V(z,`${f(r).length??""} New ${(f(r).length>1?"links were":"link was")??""} found.`)),b(N,B)},D=N=>{var B=ns(),U=I(X(B));U.__click=[ts,i],b(N,B)};O(j,N=>{var B;(B=f(r))!=null&&B.length?N(E):N(D,!1)},!0)}b(S,T)};O(h,S=>{f(n)?S(p):S(w,!1)})}var k=I(l,2),y=x(k);{var A=S=>{var T=rs();b(S,T)};O(y,S=>{f(n)&&S(A)})}M(()=>ce(c,"running",f(n))),b(v,c)};O(s,v=>{f(i)||v(u)})}return b(e,o),ae({notifyUserOfNewState:a})}ve(["click"]);async function os(e,t,n,r,i,a,o){try{P(t,!0),P(n,!1),r(await Ko(r(),i())),P(a,$(f(o)))}catch{P(n,!0)}finally{P(t,!1)}}var ls=C('<div class="drag-handle svelte-1qckv40"><!></div>'),ss=C('<div class="loading svelte-1qckv40">Loading...</div>'),cs=C('<div class="bubble svelte-1qckv40"> </div> <!>',1),us=C('<div class="error svelte-1qckv40"><!></div>'),ds=C("<div><!></div>"),vs=C('<div class="empty svelte-1qckv40">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),fs=C('<button class="save svelte-1qckv40"> </button>'),_s=C('<!> <div class="items svelte-1qckv40"></div> <!>',1),hs=C('<div class="panel svelte-1qckv40"><!></div>'),ms=C('<section class="editor playpilot-styled-scrollbar svelte-1qckv40"><!> <header class="header svelte-1qckv40"><h1 class="svelte-1qckv40">Playlinks</h1> <!></header> <!> <!> <!></section>');function gs(e,t){ie(t,!0);let n=R(t,"linkInjections",15),r=R(t,"htmlString",3,""),i=R(t,"loading",3,!1),a=R(t,"aiRunning",3,!1);const o="editor-position";let s=H(null),u=$(JSON.parse(localStorage.getItem(o)||'{ "x": 0, "y": 0 }')),v=H(!1),c=H(!1),l=H(!1),d=H(0),m=H(""),g=H(void 0);const h=W(()=>JSON.stringify(n())),p=W(()=>f(m)!==f(h)),w=W(()=>n().filter(L=>L.title_details&&!L.removed&&!L.duplicate));Ht(()=>{i()||Ye(()=>P(m,$(f(h))))});function k(L){localStorage.setItem(o,JSON.stringify(L))}function y(L){const F=n().findIndex(Q=>Q.key===L);n(n()[F].manual=!0,!0),n(n()[F].removed=!0,!0),n([...n()])}function A(L){if(!f(s))return;const F=L.offsetTop,Q=F+L.offsetHeight,we=f(s).scrollTop,K=we+f(s).clientHeight;F>=we&&Q<=K||f(s).scrollTo({top:F-f(s).clientHeight/2,behavior:"smooth"})}function S(L){const F=L.target;P(d,$(F.scrollTop))}function T(L){const F=L.filter(Q=>{if(En(Q))return!n().some(we=>Tn(Q,we))});f(g).notifyUserOfNewState(F)}var j=ms(),E=x(j);{var D=L=>{var F=ls(),Q=x(F);jl(Q,{get element(){return f(s)},get position(){return u},limit:{x:16,y:16},onchange:k}),b(L,F)};O(E,L=>{f(s)&&L(D)})}var N=I(E,2),B=I(x(N),2);{var U=L=>{var F=ss();b(L,F)},z=L=>{var F=cs(),Q=X(F),we=x(Q),K=I(Q,2);An(K,{onclick:()=>P(v,!0),size:"24px","aria-label":"Add manual injection",children:(G,re)=>{var ne=Me("+");b(G,ne)},$$slots:{default:!0}}),M(()=>{ee(Q,"aria-label",`${n().length??""} found playlinks`),V(we,n().length)}),b(L,F)};O(B,L=>{i()?L(U):L(z,!1)})}var J=I(N,2);{var te=L=>{it(as(L,{onadd:F=>F.forEach(Q=>n().push(Q))}),F=>P(g,$(F)),()=>f(g))};O(J,L=>{!i()&&a()&&L(te)})}var le=I(J,2);{var me=L=>{var F=_s(),Q=X(F);{var we=ne=>{var oe=us(),be=x(oe);Pn(be,{children:(Oe,Wt)=>{var Ve=Me("Something went wrong, check your links below.");b(Oe,Ve)},$$slots:{default:!0}}),Ce(7,oe,()=>Nt,()=>({duration:150})),b(ne,oe)};O(Q,ne=>{f(l)&&ne(we)})}var K=I(Q,2);Ge(K,29,()=>f(w),ne=>ne.key,(ne,oe)=>{var be=ds();const Oe=W(()=>n().findIndex(Ve=>Ve.key===f(oe).key));var Wt=x(be);Ll(Wt,{onremove:()=>y(f(oe).key),onhighlight:A,get linkInjection(){return n()[f(Oe)]},set linkInjection(Ve){n(n()[f(Oe)]=Ve,!0)}}),ba(be,()=>el,()=>({duration:300})),b(ne,be)},ne=>{var oe=vs();b(ne,oe)});var G=I(K,2);{var re=ne=>{var oe=fs();oe.__click=[os,c,l,n,r,m,h];var be=x(oe);M(()=>{oe.disabled=f(c),V(be,f(c)?"Saving...":"Save links")}),Ce(1,oe,()=>Vr,()=>({duration:100})),b(ne,oe)};O(G,ne=>{f(p)&&n().length&&ne(re)})}b(L,F)};O(le,L=>{i()||L(me)})}var ue=I(le,2);{var se=L=>{var F=hs(),Q=x(F);Zl(Q,{get htmlString(){return r()},onclose:()=>P(v,!1),onsave:we=>n().push(we)}),M(()=>gn(F,"top",`${f(d)??""}px`)),Ce(3,F,()=>Kt,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),b(L,F)};O(ue,L=>{f(v)&&L(se)})}return it(j,L=>P(s,L),()=>f(s)),M(()=>{ce(j,"panel-open",f(v)),ce(j,"loading",i())}),he("scroll",j,S),b(e,j),ae({requestNewAIInjections:T})}ve(["click"]);var ps=C('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!></div>');function ys(e,t){ie(t,!0);const n=Sn(),r=Ao(n),i=r.map(E=>E.outerHTML).join(""),a=Fr();let o=H(null),s=H(null),u=H(!1),v=H(!0),c=H($([])),l=H(void 0);const d=W(()=>f(o)||{}),m=W(()=>Ln(f(d).ai_injections,()=>[],!0)),g=W(()=>Ln(f(d).link_injections,()=>[],!0));Ht(()=>{a&&p()}),dt(()=>(Be(Ne.ArticlePageView),h(),()=>an()));async function h(){var D;if(a&&P(u,$(await Rr())),P(o,$(await Un(on(),i,{maxTries:1}))),w({aiInjections:f(m),manualInjections:f(g)}),P(v,!1),!((D=f(o))!=null&&D.ai_running)||!a)return;const E=await Un(on(),i,{requireCompletedResult:!0});f(l).requestNewAIInjections((E==null?void 0:E.ai_injections)||[])}function p(){an(),w(qo(f(c)))}function w(E={aiInjections:f(m),manualInjections:f(g)}){if(!f(m).length&&!f(g).length)return;const D=Co(r,k,E);JSON.stringify(D)!==JSON.stringify(f(c))&&P(c,$(D))}function k(E){P(s,$(E))}var y=ps(),A=x(y);{var S=E=>{var D=W(()=>{var N,B;return((N=f(o))==null?void 0:N.ai_running)&&((B=f(o))==null?void 0:B.automation_enabled)});it(gs(E,{htmlString:i,get loading(){return f(v)},get aiRunning(){return f(D)},get linkInjections(){return f(c)},set linkInjections(N){P(c,$(N))}}),N=>P(l,$(N)),()=>f(l))};O(A,E=>{a&&f(u)&&E(S)})}var T=I(A,2);{var j=E=>{Xo(E,{get title(){return f(s).title_details},onclose:()=>P(s,null)})};O(T,E=>{f(s)&&f(s).title_details&&E(j)})}b(e,y),ae()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",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.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=mn(ys,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),an()}};
9
9
 
10
10
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
package/src/lib/api.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { authorize, getAuthToken, isEditorialModeEnabled } from './auth'
2
2
  import { apiBaseUrl } from './constants'
3
3
  import { stringToHash } from './hash'
4
+ import { getLanguage } from './localization'
4
5
  import { getPageMetaData } from './meta'
5
6
  import { getFullUrlPath } from './url'
6
7
 
@@ -21,11 +22,12 @@ export async function fetchLinkInjections(url, html, { hash = stringToHash(html)
21
22
  const headers = new Headers({ 'Content-Type': 'application/json' })
22
23
  const apiToken = getApiToken()
23
24
  const isEditorialMode = isEditorialModeEnabled() ? await authorize() : false
25
+ const language = getLanguage()
24
26
  const metadata = getPageMetaData()
25
27
 
26
28
  if (!apiToken) throw new Error('No token was provided')
27
29
 
28
- const response = await fetch(apiBaseUrl + `/external-pages/?api-token=${apiToken}&include_title_details=true${isEditorialMode ? '&editorial_mode_enabled=true' : ''}`, {
30
+ const response = await fetch(apiBaseUrl + `/external-pages/?api-token=${apiToken}&include_title_details=true${isEditorialMode ? '&editorial_mode_enabled=true' : ''}&language=${language}`, {
29
31
  headers,
30
32
  method: 'POST',
31
33
  body: JSON.stringify(({
@@ -2,6 +2,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest'
2
2
  import { fetchLinkInjections, pollLinkInjections } from '$lib/api'
3
3
  import { fakeFetch } from '../helpers'
4
4
  import { authorize, isEditorialModeEnabled } from '$lib/auth'
5
+ import { Language } from '$lib/enums/Language'
5
6
 
6
7
  vi.mock('$lib/auth', async importActual => {
7
8
  const actual = await importActual()
@@ -101,6 +102,27 @@ describe('$lib/api', () => {
101
102
  expect.any(Object),
102
103
  )
103
104
  })
105
+
106
+ it('Should call fetch with given language', async () => {
107
+ fakeFetch({ response: 'Some response' })
108
+
109
+ await fetchLinkInjections('https://some-url', 'some-html', { hash: 'some-hash' })
110
+
111
+ expect(global.fetch).toHaveBeenCalledWith(
112
+ expect.stringContaining(`&language=${Language.English}`),
113
+ expect.anything(),
114
+ )
115
+
116
+ // @ts-ignore
117
+ window.PlayPilotLinkInjections = { token: 'token', language: Language.Swedish }
118
+
119
+ await fetchLinkInjections('https://some-url', 'some-html', { hash: 'some-hash' })
120
+
121
+ expect(global.fetch).toHaveBeenCalledWith(
122
+ expect.stringContaining(`&language=${Language.Swedish}`),
123
+ expect.anything(),
124
+ )
125
+ })
104
126
  })
105
127
 
106
128
  describe('pollLinkInjections', () => {