@playpilot/tpi 3.1.0 → 3.2.0-beta.2

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.
Files changed (42) hide show
  1. package/dist/link-injections.js +8 -7
  2. package/package.json +1 -1
  3. package/src/lib/actions/heading.ts +11 -0
  4. package/src/lib/api.ts +1 -3
  5. package/src/lib/auth.ts +13 -1
  6. package/src/lib/constants.ts +2 -0
  7. package/src/lib/enums/TrackingEvent.ts +1 -0
  8. package/src/lib/linkInjection.ts +43 -32
  9. package/src/lib/scss/_mixins.scss +8 -0
  10. package/src/lib/scss/global.scss +6 -6
  11. package/src/lib/scss/variables.scss +2 -0
  12. package/src/lib/stores/organization.ts +4 -0
  13. package/src/lib/tracking.ts +14 -1
  14. package/src/lib/types/injection.d.ts +5 -0
  15. package/src/routes/+layout.svelte +6 -2
  16. package/src/routes/+page.svelte +31 -13
  17. package/src/routes/components/Description.svelte +2 -3
  18. package/src/routes/components/Editorial/AIIndicator.svelte +85 -91
  19. package/src/routes/components/Editorial/Alert.svelte +12 -2
  20. package/src/routes/components/Editorial/Editor.svelte +82 -61
  21. package/src/routes/components/Editorial/EditorItem.svelte +32 -7
  22. package/src/routes/components/Editorial/ManualInjection.svelte +10 -9
  23. package/src/routes/components/Editorial/PlaylinkTypeSelect.svelte +14 -0
  24. package/src/routes/components/Editorial/ResizeHandle.svelte +1 -1
  25. package/src/routes/components/Editorial/Search/TitleSearchItem.svelte +7 -5
  26. package/src/routes/components/Icons/IconWarning.svelte +5 -0
  27. package/src/routes/components/Modal.svelte +2 -0
  28. package/src/routes/components/Playlinks.svelte +12 -11
  29. package/src/routes/components/Popover.svelte +2 -0
  30. package/src/routes/components/Title.svelte +3 -2
  31. package/src/routes/components/TitlePopover.svelte +1 -1
  32. package/src/tests/lib/auth.test.js +31 -1
  33. package/src/tests/lib/linkInjection.test.js +87 -48
  34. package/src/tests/lib/tracking.test.js +61 -1
  35. package/src/tests/routes/+page.test.js +94 -4
  36. package/src/tests/routes/components/Editorial/AiIndicator.test.js +28 -42
  37. package/src/tests/routes/components/Editorial/Alert.test.js +10 -3
  38. package/src/tests/routes/components/Editorial/Editor.test.js +15 -0
  39. package/src/tests/routes/components/Editorial/EditorItem.test.js +32 -7
  40. package/src/tests/routes/components/Editorial/PlaylinkTypeSelect.test.js +13 -1
  41. package/src/tests/routes/components/Title.test.js +2 -2
  42. package/svelte.config.js +1 -0
@@ -1,10 +1,11 @@
1
1
  (() => {
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-1rj31xw{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-1rj31xw h1:where(.svelte-1rj31xw){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-1rj31xw h1:where(.svelte-1rj31xw){margin-top:0}.content.svelte-1rj31xw{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-1rj31xw{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-1rj31xw{padding:32px 0 16px;background:transparent}.small.svelte-1rj31xw .header:where(.svelte-1rj31xw){padding-top:16px}.compact.svelte-1rj31xw .header:where(.svelte-1rj31xw){padding:0 0 16px}.top.svelte-1rj31xw{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-1rj31xw{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-1rj31xw{opacity:1}.info.svelte-1rj31xw{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-1rj31xw .info:where(.svelte-1rj31xw){gap:8px 12px}.imdb.svelte-1rj31xw{display:flex;align-items:center;gap:4px}.imdb.svelte-1rj31xw svg{margin-top:-2px}.small.svelte-1rj31xw .imdb:where(.svelte-1rj31xw) svg{margin-top:0;width:12px;height:12px}.background.svelte-1rj31xw{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter));z-index:0}.background.svelte-1rj31xw:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%);z-index:1}.background.svelte-1rj31xw img:where(.svelte-1rj31xw){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-1rj31xw img.loaded:where(.svelte-1rj31xw){opacity:1}.background.svelte-1rj31xw img.blur:where(.svelte-1rj31xw){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-1rj31xw{opacity:.15}.capitalize.svelte-1rj31xw{text-transform:capitalize}.truncate.svelte-1rj31xw{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}p.svelte-pfvkex{font-weight:var(--playpilot-after-article-text-font-weight, normal)}span.svelte-pfvkex{display:block}button.svelte-pfvkex{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-pfvkex:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1qqv88o{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:var(--playpilot-button-padding, 0);background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1qqv88o:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-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-1lxtpkd{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-1lxtpkd:hover,.item.highlighted.svelte-1lxtpkd{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-1lxtpkd{outline:2px solid var(--playpilot-primary)}.header.svelte-1lxtpkd{display:flex;gap:16px;width:100%}.poster.svelte-1lxtpkd{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-1lxtpkd .poster:where(.svelte-1lxtpkd){opacity:.35}.title.svelte-1lxtpkd{font-size:14px;word-break:break-word}.sentence.svelte-1lxtpkd{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-1lxtpkd em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-1lxtpkd{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;margin:0;background:transparent;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;font-style:italic;text-decoration:underline}.expand-sentence.svelte-1lxtpkd:hover{color:var(--playpilot-text-color)}.content.svelte-1lxtpkd{padding-top:8px}.inactive.svelte-1lxtpkd .info:where(.svelte-1lxtpkd){opacity:.35}.context-menu.svelte-1lxtpkd{margin:0 -4px 0 auto}.context-menu-action.svelte-1lxtpkd{-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-1lxtpkd:hover{color:var(--playpilot-text-color)}.actions.svelte-1lxtpkd{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-1lxtpkd{-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-1lxtpkd:hover{filter:brightness(1.2)}.expanded.svelte-1lxtpkd{padding-top:16px}.type-select.svelte-1lxtpkd{margin-top:8px}.label.svelte-1lxtpkd{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-1lxtpkd{margin-top:12px}.drag-handle.svelte-19mcc5g{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:8px;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-19mcc5g:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-19mcc5g:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-19mcc5g:active{cursor:grabbing}.drag-handle.svelte-19mcc5g:before{display:block;content:"";position:absolute;top:20%;right:0;bottom:60%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.resize-handle.svelte-sxkuxk{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:0;width:100%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-sxkuxk:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-sxkuxk:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-sxkuxk:active{cursor:grabbing}.resize-handle.svelte-sxkuxk:before{display:block;content:"";position:absolute;top:0;right:20%;left:20%;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-tbzvlp{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left;font-size:.85rem}.item.hoverable.svelte-tbzvlp{cursor:pointer}.item.hoverable.svelte-tbzvlp:hover{background:var(--playpilot-lighter)}.item.svelte-tbzvlp:last-child{border-bottom:0}.poster.svelte-tbzvlp{width:28px;border-radius:4px;height:auto;background:var(--playpilot-dark)}.name.svelte-tbzvlp{color:var(--playpilot-text-color)}.meta.svelte-tbzvlp{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-tbzvlp{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-tbzvlp{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-tbzvlp:hover{color:vaR(--playpilot-text-color)}.search.svelte-1olb8n0{position:relative}.results.svelte-1olb8n0{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.empty.svelte-1olb8n0{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.selected.svelte-1olb8n0{margin:8px 0;border-radius:.5rem;border:2px solid var(--playpilot-green)}h2.svelte-l7tw17{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}p.svelte-l7tw17,label.svelte-l7tw17{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-l7tw17{display:block;margin-top:16px}.layout.svelte-l7tw17{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-l7tw17{display:flex;align-items:center;gap:8px;margin-bottom:16px}.error.svelte-l7tw17{margin-top:8px}.save.svelte-l7tw17{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-green);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color)}.save.svelte-l7tw17:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-l7tw17{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}.ai-indicator.svelte-7ilatt{position:relative;margin:0 8px}.content.svelte-7ilatt{position:relative;display:flex;gap:8px;background:var(--playpilot-light);padding:8px;margin:2px;border-radius:.5rem;font-size:12px;line-height:1.5;z-index:1;color:var(--playpilot-text-color-alt);overflow:hidden}.icon.svelte-7ilatt{color:var(--playpilot-green)}.border.svelte-7ilatt{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-7ilatt .border:where(.svelte-7ilatt){background:var(--playpilot-light)}@keyframes svelte-7ilatt-rotate{to{rotate:360deg}}.animator.svelte-7ilatt{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-7ilatt-rotate 2s infinite linear;filter:blur(5rem)}.button.svelte-7ilatt{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-7ilatt:hover{color:#fff}@keyframes svelte-7ilatt-fake-load{0%{width:0%}2%{width:20%}70%{width:85%}to{width:90%}}.loading-bar.svelte-7ilatt{position:absolute;bottom:0;left:0;height:.15em;border-radius:0 .25rem .25rem 0;background:linear-gradient(to right,var(--playpilot-light),var(--playpilot-green));animation:svelte-7ilatt-fake-load forwards;animation-duration:20s}h1.svelte-1w749wn{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.editor.svelte-1w749wn{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(50vh,800px);min-height:10rem;margin:0;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.panel-open.svelte-1w749wn{overflow:hidden}.loading.svelte-1w749wn{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handle.svelte-1w749wn{opacity:0;transition:opacity .15s}.editor.svelte-1w749wn:hover .handle:where(.svelte-1w749wn){opacity:1}.header.svelte-1w749wn{z-index:5;position:sticky;top:-16px;margin:-16px -16px 0;padding:16px 16px 16px 24px;border:0;background:var(--playpilot-dark);display:flex;align-items:center}.loading.svelte-1w749wn .header:where(.svelte-1w749wn){margin:-16px}.bubble.svelte-1w749wn{-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-1w749wn{padding-top:8px;margin-bottom:auto}.empty.svelte-1w749wn{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1w749wn{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);font-size:.85rem;cursor:pointer}.save.svelte-1w749wn:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1w749wn{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1w749wn{margin-top:8px}.panel.svelte-1w749wn{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}.trigger.svelte-qee95d{position:fixed;bottom:16px;right:16px}.button.svelte-qee95d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;border:0;padding:12px;border-radius:50%;background:var(--playpilot-light);box-shadow:var(--playpilot-shadow-large);transition:transform 50ms;line-height:24px;text-align:center;font-size:13.6px}.button.svelte-qee95d:hover{filter:brightness(1.1);transform:scale(1.05)}.button.svelte-qee95d svg{width:100%}.close.svelte-qee95d{display:flex;text-align:center;justify-content:center;position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:4px;background:var(--playpilot-content);color:#fff}.close.svelte-qee95d svg{width:12px}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533}[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 r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const tn=!1;var vn=Array.isArray,tr=Array.prototype.indexOf,_n=Array.from,nr=Object.defineProperty,at=Object.getOwnPropertyDescriptor,ir=Object.getOwnPropertyDescriptors,rr=Object.prototype,ar=Array.prototype,Xn=Object.getPrototypeOf;function lr(e){return typeof e=="function"}const Ye=()=>{};function or(e){for(var t=0;t<e.length;t++)e[t]()}function Nn(e,t,n=!1){return e===void 0?n?t():t:e}const Ce=2,Qn=4,St=8,qt=16,je=32,Et=64,nn=128,et=256,Nt=512,we=1024,Ue=2048,Bt=4096,Le=8192,dt=16384,ei=32768,ft=65536,sr=1<<17,cr=1<<19,ti=1<<20,pt=Symbol("$state"),ur=Symbol("legacy props"),dr=Symbol("");function ni(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 fr(e,t){return e!==t}function hn(e){return!ii(e,this.v)}function vr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function _r(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function hr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function mr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function gr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function pr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function yr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function wr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function kr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let vt=!1,br=!1;function xr(){vt=!0}const mn=1,gn=2,ri=4,Sr=8,Er=16,Tr=1,Ir=2,Ar=4,Cr=8,Pr=16,jr=1,Lr=2,Mr=4,Dr=1,Nr=2,_e=Symbol(),ai="http://www.w3.org/2000/svg";function ye(e,t){var n={f:0,v:e,reactions:null,equals:ni,rv:0,wv:0};return n}function U(e){return Or(ye(e))}function li(e,t=!1){var i;const n=ye(e);return t||(n.equals=hn),vt&&J!==null&&J.l!==null&&((i=J.l).s??(i.s=[])).push(n),n}function Or(e){return Z!==null&&Z.f&Ce&&(Me===null?Gr([e]):Me.push(e)),e}function j(e,t){return Z!==null&&At()&&Z.f&(Ce|qt)&&(Me===null||!Me.includes(e))&&kr(),rn(e,t)}function rn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Si(),oi(e,Ue),At()&&K!==null&&K.f&we&&!(K.f&je)&&(fe!==null&&fe.includes(e)?(Oe(K,Ue),Yt(K)):Ve===null?Zr([e]):Ve.push(e))),t}function oi(e,t){var n=e.reactions;if(n!==null)for(var i=At(),r=n.length,a=0;a<r;a++){var l=n[a],o=l.f;o&Ue||!i&&l===K||(Oe(l,t),o&(we|et)&&(o&Ce?oi(l,Bt):Yt(l)))}}let Rr=!1;function G(e,t=null,n){if(typeof e!="object"||e===null||pt in e)return e;const i=Xn(e);if(i!==rr&&i!==ar)return e;var r=new Map,a=vn(e),l=ye(0);a&&r.set("length",ye(e.length));var o;return new Proxy(e,{defineProperty(c,d,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&pr();var s=r.get(d);return s===void 0?(s=ye(f.value),r.set(d,s)):j(s,G(f.value,o)),!0},deleteProperty(c,d){var f=r.get(d);if(f===void 0)d in c&&r.set(d,ye(_e));else{if(a&&typeof d=="string"){var s=r.get("length"),v=Number(d);Number.isInteger(v)&&v<s.v&&j(s,v)}j(f,_e),On(l)}return!0},get(c,d,f){var g;if(d===pt)return e;var s=r.get(d),v=d in c;if(s===void 0&&(!v||(g=at(c,d))!=null&&g.writable)&&(s=ye(G(v?c[d]:_e,o)),r.set(d,s)),s!==void 0){var m=u(s);return m===_e?void 0:m}return Reflect.get(c,d,f)},getOwnPropertyDescriptor(c,d){var f=Reflect.getOwnPropertyDescriptor(c,d);if(f&&"value"in f){var s=r.get(d);s&&(f.value=u(s))}else if(f===void 0){var v=r.get(d),m=v==null?void 0:v.v;if(v!==void 0&&m!==_e)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return f},has(c,d){var m;if(d===pt)return!0;var f=r.get(d),s=f!==void 0&&f.v!==_e||Reflect.has(c,d);if(f!==void 0||K!==null&&(!s||(m=at(c,d))!=null&&m.writable)){f===void 0&&(f=ye(s?G(c[d],o):_e),r.set(d,f));var v=u(f);if(v===_e)return!1}return s},set(c,d,f,s){var x;var v=r.get(d),m=d in c;if(a&&d==="length")for(var g=f;g<v.v;g+=1){var _=r.get(g+"");_!==void 0?j(_,_e):g in c&&(_=ye(_e),r.set(g+"",_))}v===void 0?(!m||(x=at(c,d))!=null&&x.writable)&&(v=ye(void 0),j(v,G(f,o)),r.set(d,v)):(m=v.v!==_e,j(v,G(f,o)));var p=Reflect.getOwnPropertyDescriptor(c,d);if(p!=null&&p.set&&p.set.call(s,f),!m){if(a&&typeof d=="string"){var y=r.get("length"),w=Number(d);Number.isInteger(w)&&w>=y.v&&j(y,w+1)}On(l)}return!0},ownKeys(c){u(l);var d=Reflect.ownKeys(c).filter(v=>{var m=r.get(v);return m===void 0||m.v!==_e});for(var[f,s]of r)s.v!==_e&&!(f in c)&&d.push(f);return d},setPrototypeOf(){yr()}})}function On(e,t=1){j(e,e.v+t)}var ve,si,ci;function Hr(){if(ve===void 0){ve=window;var e=Element.prototype,t=Node.prototype;si=at(t,"firstChild").get,ci=at(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 Tt(e=""){return document.createTextNode(e)}function Ze(e){return si.call(e)}function Vt(e){return ci.call(e)}function S(e,t){return Ze(e)}function ee(e,t){{var n=Ze(e);return n instanceof Comment&&n.data===""?Vt(n):n}}function T(e,t=1,n=!1){let i=e;for(;t--;)i=Vt(i);return i}function Fr(e){e.textContent=""}function Y(e){var t=Ce|Ue;K===null?t|=et:K.f|=ti;var n=Z!==null&&Z.f&Ce?Z:null;const i={children:null,ctx:J,deps:null,equals:ni,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??K};return n!==null&&(n.children??(n.children=[])).push(i),i}function qr(e){const t=Y(e);return t.equals=hn,t}function ui(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&Ce?pn(i):Pe(i)}}}function Br(e){for(var t=e.parent;t!==null;){if(!(t.f&Ce))return t;t=t.parent}return null}function di(e){var t,n=K;Se(Br(e));try{ui(e),t=Ei(e)}finally{Se(n)}return t}function fi(e){var t=di(e),n=(Ge||e.f&et)&&e.deps!==null?Bt:we;Oe(e,n),e.equals(t)||(e.v=t,e.wv=Si())}function pn(e){ui(e),bt(e,0),Oe(e,dt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Vr(e){K===null&&Z===null&&hr(),Z!==null&&Z.f&et&&_r(),wn&&vr()}function Ur(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function _t(e,t,n,i=!0){var r=(e&Et)!==0,a=K,l={ctx:J,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Ue,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var o=lt;try{Rn(!0),Wt(l),l.f|=ei}catch(f){throw Pe(l),f}finally{Rn(o)}}else t!==null&&Yt(l);var c=n&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&ti)===0;if(!c&&!r&&i&&(a!==null&&Ur(l,a),Z!==null&&Z.f&Ce)){var d=Z;(d.children??(d.children=[])).push(l)}return l}function Kr(e){const t=_t(St,null,!1);return Oe(t,we),t.teardown=e,t}function Ut(e){Vr();var t=K!==null&&(K.f&je)!==0&&J!==null&&!J.m;if(t){var n=J;(n.e??(n.e=[])).push({fn:e,effect:K,reaction:Z})}else{var i=Kt(e);return i}}function zr(e){const t=_t(Et,e,!0);return(n={})=>new Promise(i=>{n.outro?st(t,()=>{Pe(t),i(void 0)}):(Pe(t),i(void 0))})}function Kt(e){return _t(Qn,e,!1)}function vi(e){return _t(St,e,!0)}function F(e){return tt(e)}function tt(e,t=0){return _t(St|qt|t,e,!0)}function Fe(e,t=!0){return _t(St|je,e,!0,t)}function _i(e){var t=e.teardown;if(t!==null){const n=wn,i=Z;Hn(!0),Ne(null);try{t.call(null)}finally{Hn(n),Ne(i)}}}function hi(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)pn(t[n])}}function mi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;Pe(n,t),n=i}}function Wr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&je||Pe(t),t=n}}function Pe(e,t=!0){var n=!1;if((t||e.f&cr)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:Vt(i);i.remove(),i=a}n=!0}mi(e,t&&!n),hi(e),bt(e,0),Oe(e,dt);var l=e.transitions;if(l!==null)for(const c of l)c.stop();_i(e);var o=e.parent;o!==null&&o.first!==null&&gi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function gi(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function st(e,t){var n=[];yn(e,n,!0),pi(n,()=>{Pe(e),t&&t()})}function pi(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function yn(e,t,n){if(!(e.f&Le)){if(e.f^=Le,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&ft)!==0||(i.f&je)!==0;yn(i,t,a?n:!1),i=r}}}function yt(e){yi(e,!0)}function yi(e,t){if(e.f&Le){Ct(e)&&Wt(e),e.f^=Le;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&ft)!==0||(n.f&je)!==0;yi(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Ot=!1,an=[];function wi(){Ot=!1;const e=an.slice();an=[],or(e)}function It(e){Ot||(Ot=!0,queueMicrotask(wi)),an.push(e)}function Yr(){Ot&&wi()}function ki(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const bi=0,$r=1;let Lt=!1,Mt=bi,wt=!1,kt=null,lt=!1,wn=!1;function Rn(e){lt=e}function Hn(e){wn=e}let $e=[],ot=0;let Z=null;function Ne(e){Z=e}let K=null;function Se(e){K=e}let Me=null;function Gr(e){Me=e}let fe=null,pe=0,Ve=null;function Zr(e){Ve=e}let xi=1,ln=0,Ge=!1,J=null;function Si(){return++xi}function At(){return!vt||J!==null&&J.l===null}function Ct(e){var d;var t=e.f;if(t&Ue)return!0;if(t&Bt){var n=e.deps,i=(t&et)!==0;if(n!==null){var r,a,l=(t&Nt)!==0,o=i&&K!==null&&!Ge,c=n.length;if(l||o){for(r=0;r<c;r++)a=n[r],(l||!((d=a==null?void 0:a.reactions)!=null&&d.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);l&&(e.f^=Nt)}for(r=0;r<c;r++)if(a=n[r],Ct(a)&&fi(a),a.wv>e.wv)return!0}(!i||K!==null&&!Ge)&&Oe(e,we)}return!1}function Jr(e,t){for(var n=t;n!==null;){if(n.f&nn)try{n.fn(e);return}catch{n.f^=nn}n=n.parent}throw Lt=!1,e}function Xr(e){return(e.f&dt)===0&&(e.parent===null||(e.parent.f&nn)===0)}function zt(e,t,n,i){if(Lt){if(n===null&&(Lt=!1),Xr(t))throw e;return}n!==null&&(Lt=!0);{Jr(e,t);return}}function Ei(e){var v;var t=fe,n=pe,i=Ve,r=Z,a=Ge,l=Me,o=J,c=e.f;fe=null,pe=0,Ve=null,Z=c&(je|Et)?null:e,Ge=!lt&&(c&et)!==0,Me=null,J=e.ctx,ln++;try{var d=(0,e.fn)(),f=e.deps;if(fe!==null){var s;if(bt(e,pe),f!==null&&pe>0)for(f.length=pe+fe.length,s=0;s<fe.length;s++)f[pe+s]=fe[s];else e.deps=f=fe;if(!Ge)for(s=pe;s<f.length;s++)((v=f[s]).reactions??(v.reactions=[])).push(e)}else f!==null&&pe<f.length&&(bt(e,pe),f.length=pe);return d}finally{fe=t,pe=n,Ve=i,Z=r,Ge=a,Me=l,J=o}}function Qr(e,t){let n=t.reactions;if(n!==null){var i=tr.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&Ce&&(fe===null||!fe.includes(t))&&(Oe(t,Bt),t.f&(et|Nt)||(t.f^=Nt),bt(t,0))}function bt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)Qr(e,n[i])}function Wt(e){var t=e.f;if(!(t&dt)){Oe(e,we);var n=K,i=J;K=e;try{t&qt?Wr(e):mi(e),hi(e),_i(e);var r=Ei(e);e.teardown=typeof r=="function"?r:null,e.wv=xi;var a=e.deps,l;tn&&br&&e.f&Ue}catch(o){zt(o,e,n,i||e.ctx)}finally{K=n}}}function Ti(){if(ot>1e3){ot=0;try{mr()}catch(e){if(kt!==null)zt(e,kt,null);else throw e}}ot++}function Ii(e){var t=e.length;if(t!==0){Ti();var n=lt;lt=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&we||(r.f^=we);var a=[];Ai(r,a),ea(a)}}finally{lt=n}}}function ea(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(dt|Le)))try{Ct(i)&&(Wt(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?gi(i):i.fn=null))}catch(r){zt(r,i,null,i.ctx)}}}function ta(){if(wt=!1,ot>1001)return;const e=$e;$e=[],Ii(e),wt||(ot=0,kt=null)}function Yt(e){Mt===bi&&(wt||(wt=!0,queueMicrotask(ta))),kt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Et|je)){if(!(n&we))return;t.f^=we}}$e.push(t)}function Ai(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&je)!==0,l=a&&(r&we)!==0,o=n.next;if(!l&&!(r&Le))if(r&St){if(a)n.f^=we;else try{Ct(n)&&Wt(n)}catch(s){zt(s,n,null,n.ctx)}var c=n.first;if(c!==null){n=c;continue}}else r&Qn&&i.push(n);if(o===null){let s=n.parent;for(;s!==null;){if(e===s)break e;var d=s.next;if(d!==null){n=d;continue e}s=s.parent}}n=o}for(var f=0;f<i.length;f++)c=i[f],t.push(c),Ai(c,t)}function Ci(e){var t=Mt,n=$e;try{Ti();const r=[];Mt=$r,$e=r,wt=!1,Ii(n);var i=e==null?void 0:e();return Yr(),($e.length>0||r.length>0)&&Ci(),ot=0,kt=null,i}finally{Mt=t,$e=n}}async function Fn(){await Promise.resolve(),Ci()}function u(e){var f;var t=e.f,n=(t&Ce)!==0;if(n&&t&dt){var i=di(e);return pn(e),i}if(Z!==null){Me!==null&&Me.includes(e)&&wr();var r=Z.deps;e.rv<ln&&(e.rv=ln,fe===null&&r!==null&&r[pe]===e?pe++:fe===null?fe=[e]:fe.push(e),Ve!==null&&K!==null&&K.f&we&&!(K.f&je)&&Ve.includes(e)&&(Oe(K,Ue),Yt(K)))}else if(n&&e.deps===null)for(var a=e,l=a.parent,o=a;l!==null;)if(l.f&Ce){var c=l;o=c,l=c.parent}else{var d=l;(f=d.deriveds)!=null&&f.includes(o)||(d.deriveds??(d.deriveds=[])).push(o);break}return n&&(a=e,Ct(a)&&fi(a)),e.v}function Je(e){const t=Z;try{return Z=null,e()}finally{Z=t}}const na=-7169;function Oe(e,t){e.f=e.f&na|t}function ia(e){return ji().get(e)}function Pi(e,t){return ji().set(e,t),t}function ji(e){return J===null&&ki(),J.c??(J.c=new Map(ra(J)||void 0))}function ra(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function re(e,t=!1,n){J={p:J,c:null,e:null,m:!1,s:e,x:null,l:null},vt&&!t&&(J.l={s:null,u:null,r1:[],r2:ye(!1)})}function ae(e){const t=J;if(t!==null){e!==void 0&&(t.x=e);const l=t.e;if(l!==null){var n=K,i=Z;t.e=null;try{for(var r=0;r<l.length;r++){var a=l[r];Se(a.effect),Ne(a.reaction),Kt(a.fn)}}finally{Se(n),Ne(i)}}J=t.p,t.m=!0}return e||{}}function aa(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const la=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function oa(e){return la.includes(e)}const sa={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function ca(e){return e=e.toLowerCase(),sa[e]??e}const ua=["touchstart","touchmove"];function da(e){return ua.includes(e)}function fa(e,t){if(t){const n=document.body;e.autofocus=!0,It(()=>{document.activeElement===n&&e.focus()})}}let qn=!1;function va(){qn||(qn=!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 Li(e){var t=Z,n=K;Ne(null),Se(null);try{return e()}finally{Ne(t),Se(n)}}function _a(e,t,n,i=n){e.addEventListener(t,()=>Li(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),va()}const Mi=new Set,on=new Set;function Di(e,t,n,i){function r(a){if(i.capture||gt.call(t,a),!a.cancelBubble)return Li(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?It(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function se(e,t,n,i,r){var a={capture:i,passive:r},l=Di(e,t,n,a);(t===document.body||t===window||t===document)&&Kr(()=>{t.removeEventListener(e,l,a)})}function ue(e){for(var t=0;t<e.length;t++)Mi.add(e[t]);for(var n of on)n(e)}function gt(e){var w;var t=this,n=t.ownerDocument,i=e.type,r=((w=e.composedPath)==null?void 0:w.call(e))||[],a=r[0]||e.target,l=0,o=e.__root;if(o){var c=r.indexOf(o);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=r.indexOf(t);if(d===-1)return;c<=d&&(l=c)}if(a=r[l]||e.target,a!==t){nr(e,"currentTarget",{configurable:!0,get(){return a||n}});var f=Z,s=K;Ne(null),Se(null);try{for(var v,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var _=a["__"+i];if(_!==void 0&&!a.disabled)if(vn(_)){var[p,...y]=_;p.apply(a,[e,...y])}else _.call(a,e)}catch(x){v?m.push(x):v=x}if(e.cancelBubble||g===t||g===null)break;a=g}if(v){for(let x of m)queueMicrotask(()=>{throw x});throw v}}finally{e.__root=t,delete e.currentTarget,Ne(f),Se(s)}}}function kn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Xe(e,t){var n=K;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&Dr)!==0,i=(t&Nr)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=kn(a?e:"<!>"+e),n||(r=Ze(r)));var l=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var o=Ze(l),c=l.lastChild;Xe(o,c)}else Xe(l,l);return l}}function Ee(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var l=kn(r),o=Ze(l);a=Ze(o)}var c=a.cloneNode(!0);return Xe(c,c),c}}function Ke(e=""){{var t=Tt(e+"");return Xe(t,t),t}}function ze(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Tt();return e.append(t,n),Xe(t,n),e}function k(e,t){e!==null&&e.before(t)}let Rt=!0;function Bn(e){Rt=e}function $(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 bn(e,t){return ha(e,t)}const it=new Map;function ha(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:l=!0}){Hr();var o=new Set,c=s=>{for(var v=0;v<s.length;v++){var m=s[v];if(!o.has(m)){o.add(m);var g=da(m);t.addEventListener(m,gt,{passive:g});var _=it.get(m);_===void 0?(document.addEventListener(m,gt,{passive:g}),it.set(m,1)):it.set(m,_+1)}}};c(_n(Mi)),on.add(c);var d=void 0,f=zr(()=>{var s=n??t.appendChild(Tt());return Fe(()=>{if(a){re({});var v=J;v.c=a}r&&(i.$$events=r),Rt=l,d=e(s,i)||{},Rt=!0,a&&ae()}),()=>{var g;for(var v of o){t.removeEventListener(v,gt);var m=it.get(v);--m===0?(document.removeEventListener(v,gt),it.delete(v)):it.set(v,m)}on.delete(c),s!==n&&((g=s.parentNode)==null||g.removeChild(s))}});return sn.set(d,f),d}let sn=new WeakMap;function Ni(e,t){const n=sn.get(e);return n?(sn.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var i=e,r=null,a=null,l=_e,o=n?ft:0,c=!1;const d=(s,v=!0)=>{c=!0,f(v,s)},f=(s,v)=>{l!==(l=s)&&(l?(r?yt(r):v&&(r=Fe(()=>v(i))),a&&st(a,()=>{a=null})):(a?yt(a):v&&(a=Fe(()=>v(i))),r&&st(r,()=>{r=null})))};tt(()=>{c=!1,t(d),c||f(null,null)},o)}function Oi(e,t,n){var i=e,r=_e,a,l=At()?fr:ii;tt(()=>{l(r,r=t())&&(a&&st(a),a=Fe(()=>n(i)))})}function xt(e,t){return t}function ma(e,t,n,i){for(var r=[],a=t.length,l=0;l<a;l++)yn(t[l].e,r,!0);var o=a>0&&r.length===0&&n!==null;if(o){var c=n.parentNode;Fr(c),c.append(n),i.clear(),Be(e,t[0].prev,t[a-1].next)}pi(r,()=>{for(var d=0;d<a;d++){var f=t[d];o||(i.delete(f.k),Be(e,f.prev,f.next)),Pe(f.e,!o)}})}function Qe(e,t,n,i,r,a=null){var l=e,o={flags:t,items:new Map,first:null},c=(t&ri)!==0;if(c){var d=e;l=d.appendChild(Tt())}var f=null,s=!1;tt(()=>{var v=n(),m=vn(v)?v:v==null?[]:_n(v),g=m.length;if(!(s&&g===0)){s=g===0;{var _=Z;ga(m,o,l,r,t,(_.f&Le)!==0,i)}a!==null&&(g===0?f?yt(f):f=Fe(()=>a(l)):f!==null&&st(f,()=>{f=null})),n()}})}function ga(e,t,n,i,r,a,l,o){var z,W,ne,ke;var c=(r&Sr)!==0,d=(r&(mn|gn))!==0,f=e.length,s=t.items,v=t.first,m=v,g,_=null,p,y=[],w=[],x,P,E,b;if(c)for(b=0;b<f;b+=1)x=e[b],P=l(x,b),E=s.get(P),E!==void 0&&((z=E.a)==null||z.measure(),(p??(p=new Set)).add(E));for(b=0;b<f;b+=1){if(x=e[b],P=l(x,b),E=s.get(P),E===void 0){var M=m?m.e.nodes_start:n;_=ya(M,t,_,_===null?t.first:_.next,x,P,b,i,r),s.set(P,_),y=[],w=[],m=_.next;continue}if(d&&pa(E,x,b,r),E.e.f&Le&&(yt(E.e),c&&((W=E.a)==null||W.unfix(),(p??(p=new Set)).delete(E))),E!==m){if(g!==void 0&&g.has(E)){if(y.length<w.length){var A=w[0],C;_=A.prev;var q=y[0],D=y[y.length-1];for(C=0;C<y.length;C+=1)Vn(y[C],A,n);for(C=0;C<w.length;C+=1)g.delete(w[C]);Be(t,q.prev,D.next),Be(t,_,q),Be(t,D,A),m=A,_=D,b-=1,y=[],w=[]}else g.delete(E),Vn(E,m,n),Be(t,E.prev,E.next),Be(t,E,_===null?t.first:_.next),Be(t,_,E),_=E;continue}for(y=[],w=[];m!==null&&m.k!==P;)(a||!(m.e.f&Le))&&(g??(g=new Set)).add(m),w.push(m),m=m.next;if(m===null)continue;E=m}y.push(E),_=E,m=E.next}if(m!==null||g!==void 0){for(var R=g===void 0?[]:_n(g);m!==null;)(a||!(m.e.f&Le))&&R.push(m),m=m.next;var V=R.length;if(V>0){var O=r&ri&&f===0?n:null;if(c){for(b=0;b<V;b+=1)(ne=R[b].a)==null||ne.measure();for(b=0;b<V;b+=1)(ke=R[b].a)==null||ke.fix()}ma(t,R,O,s)}}c&&It(()=>{var ge;if(p!==void 0)for(E of p)(ge=E.a)==null||ge.apply()}),K.first=t.first&&t.first.e,K.last=_&&_.e}function pa(e,t,n,i){i&mn&&rn(e.v,t),i&gn?rn(e.i,n):e.i=n}function ya(e,t,n,i,r,a,l,o,c,d){var f=(c&mn)!==0,s=(c&Er)===0,v=f?s?li(r):ye(r):r,m=c&gn?ye(l):l,g={i:m,v,k:a,a:null,e:null,prev:n,next:i};try{return g.e=Fe(()=>o(e,v,m),Rr),g.e.prev=n&&n.e,g.e.next=i&&i.e,n===null?t.first=g:(n.next=g,n.e.next=g.e),i!==null&&(i.prev=g,i.e.prev=g.e),g}finally{}}function Vn(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var l=Vt(a);r.before(a),a=l}}function Be(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 wa(e,t,n,i,r){var a=e,l="",o;tt(()=>{l!==(l=t()??"")&&(o!==void 0&&(Pe(o),o=void 0),l!==""&&(o=Fe(()=>{var c=l+"",d=kn(c);Xe(Ze(d),d.lastChild),a.before(d)})))})}function ht(e,t,...n){var i=e,r=Ye,a;tt(()=>{r!==(r=t())&&(a&&(Pe(a),a=null),a=Fe(()=>r(i,...n)))},ft)}function ka(e,t,n,i,r,a){var l,o,c=null,d=e,f;tt(()=>{const s=t()||null;var v=s==="svg"?ai:null;s!==l&&(f&&(s===null?st(f,()=>{f=null,o=null}):s===o?yt(f):(Pe(f),Bn(!1))),s&&s!==o&&(f=Fe(()=>{c=v?document.createElementNS(v,s):document.createElement(s),Xe(c,c);{var m=c.appendChild(Tt());i(c,m)}K.nodes_end=c,d.before(c)})),l=s,l&&(o=l),Bn(!0))},ft)}function Ri(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ri(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function ba(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ri(e))&&(i&&(i+=" "),i+=t);return i}function xa(e){return typeof e=="object"?ba(e):e??""}function Sa(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ie(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[dr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Hi(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ea(e,t,n,i,r=!1,a=!1,l=!1){var o=t||{},c=e.tagName==="OPTION";for(var d in t)d in n||(n[d]=null);n.class&&(n.class=xa(n.class)),n.class=n.class?n.class+" "+i:i;var f=Hi(e),s=e.__attributes??(e.__attributes={});for(const w in n){let x=n[w];if(c&&w==="value"&&x==null){e.value=e.__value="",o[w]=x;continue}var v=o[w];if(x!==v){o[w]=x;var m=w[0]+w[1];if(m!=="$$"){if(m==="on"){const P={},E="$$"+w;let b=w.slice(2);var g=oa(b);if(aa(b)&&(b=b.slice(0,-7),P.capture=!0),!g&&v){if(x!=null)continue;e.removeEventListener(b,o[E],P),o[E]=null}if(x!=null)if(g)e[`__${b}`]=x,ue([b]);else{let M=function(A){o[w].call(this,A)};var y=M;o[E]=Di(b,e,M,P)}else g&&(e[`__${b}`]=void 0)}else if(w==="style"&&x!=null)e.style.cssText=x+"";else if(w==="autofocus")fa(e,!!x);else if(w==="__value"||w==="value"&&x!=null)e.value=e[w]=e.__value=x;else if(w==="selected"&&c)Sa(e,x);else{var _=w;r||(_=ca(_));var p=_==="defaultValue"||_==="defaultChecked";if(x==null&&!a&&!p)if(s[w]=null,_==="value"||_==="checked"){let P=e;if(_==="value"){let E=P.defaultValue;P.removeAttribute(_),P.defaultValue=E}else{let E=P.defaultChecked;P.removeAttribute(_),P.defaultChecked=E}}else e.removeAttribute(w);else p||f.includes(_)&&(a||typeof x!="string")?e[_]=x:typeof x!="function"&&ie(e,_,x)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return o}var Un=new Map;function Hi(e){var t=Un.get(e.nodeName);if(t)return t;Un.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=ir(i);for(var a in n)n[a].set&&t.push(a);i=Xn(i)}return t}function oe(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 $t(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Ta=()=>performance.now(),He={tick:e=>requestAnimationFrame(e),now:()=>Ta(),tasks:new Set};function Fi(){const e=He.now();He.tasks.forEach(t=>{t.c(e)||(He.tasks.delete(t),t.f())}),He.tasks.size!==0&&He.tick(Fi)}function Ia(e){let t;return He.tasks.size===0&&He.tick(Fi),{promise:new Promise(n=>{He.tasks.add(t={c:e,f:n})}),abort(){He.tasks.delete(t)}}}function Pt(e,t){e.dispatchEvent(new CustomEvent(t))}function Aa(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 Kn(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const l=Aa(r.trim());t[l]=a.trim()}return t}const Ca=e=>e;function De(e,t,n,i){var r=(e&jr)!==0,a=(e&Lr)!==0,l=r&&a,o=(e&Mr)!==0,c=l?"both":r?"in":"out",d,f=t.inert,s,v;function m(){var w=Z,x=K;Ne(null),Se(null);try{return d??(d=n()(t,(i==null?void 0:i())??{},{direction:c}))}finally{Ne(w),Se(x)}}var g={is_global:o,in(){var w;if(t.inert=f,!r){v==null||v.abort(),(w=v==null?void 0:v.reset)==null||w.call(v);return}a||s==null||s.abort(),Pt(t,"introstart"),s=cn(t,m(),v,1,()=>{Pt(t,"introend"),s==null||s.abort(),s=d=void 0})},out(w){if(!a){w==null||w(),d=void 0;return}t.inert=!0,Pt(t,"outrostart"),v=cn(t,m(),s,0,()=>{Pt(t,"outroend"),w==null||w()})},stop:()=>{s==null||s.abort(),v==null||v.abort()}},_=K;if((_.transitions??(_.transitions=[])).push(g),r&&Rt){var p=o;if(!p){for(var y=_.parent;y&&y.f&ft;)for(;(y=y.parent)&&!(y.f&qt););p=!y||(y.f&ei)!==0}p&&Kt(()=>{Je(()=>g.in())})}}function cn(e,t,n,i,r){var a=i===1;if(lr(t)){var l,o=!1;return It(()=>{if(!o){var p=t({direction:a?"in":"out"});l=cn(e,p,n,i,r)}}),{abort:()=>{o=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:Ye,deactivate:Ye,reset:Ye,t:()=>i};const{delay:c=0,css:d,tick:f,easing:s=Ca}=t;var v=[];if(a&&n===void 0&&(f&&f(0,1),d)){var m=Kn(d(0,1));v.push(m,m)}var g=()=>1-i,_=e.animate(v,{duration:c});return _.onfinish=()=>{var p=(n==null?void 0:n.t())??1-i;n==null||n.abort();var y=i-p,w=t.duration*Math.abs(y),x=[];if(w>0){if(d)for(var P=Math.ceil(w/16.666666666666668),E=0;E<=P;E+=1){var b=p+y*s(E/P),M=d(b,1-b);x.push(Kn(M))}g=()=>{var A=_.currentTime;return p+y*s(A/w)},f&&Ia(()=>{if(_.playState!=="running")return!1;var A=g();return f(A,1-A),!0})}_=e.animate(x,{duration:w,fill:"forwards"}),_.onfinish=()=>{g=()=>i,f==null||f(i,1-i),r()}},{abort:()=>{_&&(_.cancel(),_.effect=null,_.onfinish=Ye)},deactivate:()=>{r=Ye},reset:()=>{i===0&&(f==null||f(1,0))},t:()=>g()}}function Pa(e,t,n=t){var i=At();_a(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=Xt(e)?Qt(a):a,n(a),i&&a!==(a=t())){var l=e.selectionStart,o=e.selectionEnd;e.value=a??"",o!==null&&(e.selectionStart=l,e.selectionEnd=Math.min(o,e.value.length))}}),Je(t)==null&&e.value&&n(Xt(e)?Qt(e.value):e.value),vi(()=>{var r=t();Xt(e)&&r===Qt(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Xt(e){var t=e.type;return t==="number"||t==="range"}function Qt(e){return e===""?null:+e}function zn(e,t){return e===t||(e==null?void 0:e[pt])===t}function ct(e={},t,n,i){return Kt(()=>{var r,a;return vi(()=>{r=a,a=[],Je(()=>{e!==n(...a)&&(t(e,...a),r&&zn(n(...r),e)&&t(null,...r))})}),()=>{It(()=>{a&&zn(n(...a),e)&&t(null,...a)})}}),e}let jt=!1;function ja(e){var t=jt;try{return jt=!1,[e(),jt]}finally{jt=t}}const La={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 Ma(e,t,n){return new Proxy({props:e,exclude:t},La)}function Wn(e){for(var t=K,n=K;t!==null&&!(t.f&(je|Et));)t=t.parent;try{return Se(t),e()}finally{Se(n)}}function B(e,t,n,i){var M;var r=(n&Tr)!==0,a=!vt||(n&Ir)!==0,l=(n&Cr)!==0,o=(n&Pr)!==0,c=!1,d;l?[d,c]=ja(()=>e[t]):d=e[t];var f=pt in e||ur in e,s=l&&(((M=at(e,t))==null?void 0:M.set)??(f&&t in e&&(A=>e[t]=A)))||void 0,v=i,m=!0,g=!1,_=()=>(g=!0,m&&(m=!1,o?v=Je(i):v=i),v);d===void 0&&i!==void 0&&(s&&a&&gr(),d=_(),s&&s(d));var p;if(a)p=()=>{var A=e[t];return A===void 0?_():(m=!0,g=!1,A)};else{var y=Wn(()=>(r?Y:qr)(()=>e[t]));y.f|=sr,p=()=>{var A=u(y);return A!==void 0&&(v=void 0),A===void 0?v:A}}if(!(n&Ar))return p;if(s){var w=e.$$legacy;return function(A,C){return arguments.length>0?((!a||!C||w||c)&&s(C?p():A),A):p()}}var x=!1,P=!1,E=li(d),b=Wn(()=>Y(()=>{var A=p(),C=u(E);return x?(x=!1,P=!0,C):(P=!1,E.v=A)}));return r||(b.equals=hn),function(A,C){if(arguments.length>0){const q=C?u(b):a&&l?G(A):A;return b.equals(q)||(x=!0,j(E,q),g&&v!==void 0&&(v=q),Je(()=>u(b))),A}return u(b)}}function nt(e){J===null&&ki(),vt&&J.l!==null?Da(J).m.push(e):Ut(()=>{const t=Je(e);if(typeof t=="function")return t})}function Da(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Na="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Na);const qi="https://www.playpilot.com",Gt="https://partner-api.playpilot.tech/1.0.0",xn="EncryptedToken",Oa="articleReplacementEditToken";async function Bi(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=Jt();if(!n)throw new Error("No token was provided");const i=Sn(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(Gt+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return Ra(i),!0}catch(n){console.error(n)}return!1}function Sn(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(Oa);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${xn}=`).pop())==null?void 0:r.split(";")[0])||""}function Ra(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=xn+"="+e+";"+i+";path=/"}function Ha(){document.cookie=xn+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Vi(){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 Ui(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}const h=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),Fa={"Where To Stream Online":{[h.English]:"Where to stream online",[h.Swedish]:"Var kan man streama online",[h.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[h.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[h.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[h.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[h.English]:"An error occurred",[h.Swedish]:"Ett fel inträffade",[h.Danish]:"Der opstod en fejl"},"Title Unavailable":{[h.English]:"This title is not currently available to stream.",[h.Swedish]:"Den här titeln går inte att streama just nu.",[h.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[h.English]:"is not currently available to stream.",[h.Swedish]:"går inte att streama just nu.",[h.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[h.English]:"is available to stream on",[h.Swedish]:"finns att streama på",[h.Danish]:"kan streames på"},"Is Available To Stream":{[h.English]:"is available to stream.",[h.Swedish]:"finns att streama.",[h.Danish]:"kan streames."},"View Streaming Options":{[h.English]:"View streaming options",[h.Swedish]:"Se streamingalternativ",[h.Danish]:"Se streamingmuligheder"},And:{[h.English]:"and",[h.Swedish]:"och",[h.Danish]:"og"},Minutes:{[h.English]:"minutes",[h.Swedish]:"minuter",[h.Danish]:"minutter"},"Type: movie":{[h.English]:"Movie",[h.Swedish]:"Film",[h.Danish]:"Film"},"Type: series":{[h.English]:"Series",[h.Swedish]:"Serie",[h.Danish]:"Serie"},Stream:{[h.English]:"Stream",[h.Swedish]:"Streama",[h.Danish]:"Stream"},Buy:{[h.English]:"Buy",[h.Swedish]:"Köp",[h.Danish]:"Køb"},Rent:{[h.English]:"Rent",[h.Swedish]:"Hyra",[h.Danish]:"Lej"},"Rent Or Buy":{[h.English]:"Rent or Buy",[h.Swedish]:"Hyra",[h.Danish]:"Lej eller køb"},All:{[h.English]:"All",[h.Swedish]:"Alla",[h.Danish]:"Alle"},Unscripted:{[h.English]:"Unscripted",[h.Swedish]:"Oscripterat",[h.Danish]:"Umanuskriptet"},Independent:{[h.English]:"Independent",[h.Swedish]:"Indie",[h.Danish]:"Indie"},"Game Show":{[h.English]:"Game Show",[h.Swedish]:"Gameshow",[h.Danish]:"Quizshow"},"Film Noir":{[h.English]:"Film Noir",[h.Swedish]:"Film noir",[h.Danish]:"Film noir"},Entertainment:{[h.English]:"Entertainment",[h.Swedish]:"Underhållning",[h.Danish]:"Underholdning"},News:{[h.English]:"News",[h.Swedish]:"Nyheter",[h.Danish]:"Nyheder"},Short:{[h.English]:"Short",[h.Swedish]:"Kortfilm",[h.Danish]:"Kortfilm"},Bollywood:{[h.English]:"Bollywood",[h.Swedish]:"Bollywood",[h.Danish]:"Bollywood"},Concert:{[h.English]:"Concert",[h.Swedish]:"Konsert",[h.Danish]:"Koncert"},Arthouse:{[h.English]:"Arthouse",[h.Swedish]:"Arthouse",[h.Danish]:"Arthouse"},"Alternate Version":{[h.English]:"Alternate Version",[h.Swedish]:"Alternativ version",[h.Danish]:"Alternativ version"},"Reality TV":{[h.English]:"Reality TV",[h.Swedish]:"Reality-TV",[h.Danish]:"Reality-TV"},Culture:{[h.English]:"Culture",[h.Swedish]:"Kultur",[h.Danish]:"Kultur"},Drama:{[h.English]:"Drama",[h.Swedish]:"Drama",[h.Danish]:"Drama"},Crime:{[h.English]:"Crime",[h.Swedish]:"Kriminal",[h.Danish]:"Krimi"},Western:{[h.English]:"Western",[h.Swedish]:"Western",[h.Danish]:"Western"},Thriller:{[h.English]:"Thriller",[h.Swedish]:"Thriller",[h.Danish]:"Thriller"},Animation:{[h.English]:"Animation",[h.Swedish]:"Animerat",[h.Danish]:"Animation"},Mystery:{[h.English]:"Mystery",[h.Swedish]:"Mysterium",[h.Danish]:"Mysterium"},Science:{[h.English]:"Science",[h.Swedish]:"Vetenskap",[h.Danish]:"Videnskab"},Nature:{[h.English]:"Nature",[h.Swedish]:"Natur",[h.Danish]:"Natur"},War:{[h.English]:"War",[h.Swedish]:"Krig",[h.Danish]:"Krig"},"Sci-Fi":{[h.English]:"Sci-Fi",[h.Swedish]:"Sci-fi",[h.Danish]:"Sci-fi"},Documentary:{[h.English]:"Documentary",[h.Swedish]:"Dokumentär",[h.Danish]:"Dokumentar"},"Stand-up":{[h.English]:"Stand-up",[h.Swedish]:"Standup",[h.Danish]:"Stand-up"},"Talk Show":{[h.English]:"Talk Show",[h.Swedish]:"Talkshow",[h.Danish]:"Talkshow"},Fantasy:{[h.English]:"Fantasy",[h.Swedish]:"Fantasy",[h.Danish]:"Fantasy"},History:{[h.English]:"History",[h.Swedish]:"Historia",[h.Danish]:"Historie"},Adventure:{[h.English]:"Adventure",[h.Swedish]:"Äventyr",[h.Danish]:"Eventyr"},Action:{[h.English]:"Action",[h.Swedish]:"Action",[h.Danish]:"Action"},Horror:{[h.English]:"Horror",[h.Swedish]:"Skräck",[h.Danish]:"Gyser"},Comedy:{[h.English]:"Comedy",[h.Swedish]:"Komedi",[h.Danish]:"Komedie"},Biography:{[h.English]:"Biography",[h.Swedish]:"Biografi",[h.Danish]:"Biografi"},Music:{[h.English]:"Music",[h.Swedish]:"Musik",[h.Danish]:"Musik"},Sport:{[h.English]:"Sport",[h.Swedish]:"Sport",[h.Danish]:"Sport"},Romance:{[h.English]:"Romance",[h.Swedish]:"Romantik",[h.Danish]:"Romantik"},Kids:{[h.English]:"Kids",[h.Swedish]:"Barn",[h.Danish]:"Børn"},Lifestyle:{[h.English]:"Lifestyle",[h.Swedish]:"Livsstil",[h.Danish]:"Livsstil"},Musical:{[h.English]:"Musical",[h.Swedish]:"Musikal",[h.Danish]:"Musical"},Anime:{[h.English]:"Anime",[h.Swedish]:"Anime",[h.Danish]:"Anime"},Family:{[h.English]:"Family",[h.Swedish]:"Familj",[h.Danish]:"Familie"}};function he(e,t=Ki()){var n;return((n=Fa[e])==null?void 0:n[t])||e}function Ki(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(h);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");return n&&t.includes(n)?n:h.English}const xe=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed"}),qa="https://insights.playpilot.net";async function Ae(e,t=null,n={}){const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,fetch(qa,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const Ba=e=>e;function En(e){const t=e-1;return t*t*t+1}function Yn(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function zi(e,{delay:t=0,duration:n=400,easing:i=Ba}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function Zt(e,{delay:t=0,duration:n=400,easing:i=En,x:r=0,y:a=0,opacity:l=0}={}){const o=getComputedStyle(e),c=+o.opacity,d=o.transform==="none"?"":o.transform,f=c*(1-l),[s,v]=Yn(r),[m,g]=Yn(a);return{delay:t,duration:n,easing:i,css:(_,p)=>`
4
- transform: ${d} translate(${(1-_)*s}${v}, ${(1-_)*m}${g});
5
- opacity: ${c-f*p}`}}function Ht(e,{delay:t=0,duration:n=400,easing:i=En,axis:r="y"}={}){const a=getComputedStyle(e),l=+a.opacity,o=r==="y"?"height":"width",c=parseFloat(a[o]),d=r==="y"?["top","bottom"]:["left","right"],f=d.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),s=parseFloat(a[`padding${f[0]}`]),v=parseFloat(a[`padding${f[1]}`]),m=parseFloat(a[`margin${f[0]}`]),g=parseFloat(a[`margin${f[1]}`]),_=parseFloat(a[`border${f[0]}Width`]),p=parseFloat(a[`border${f[1]}Width`]);return{delay:t,duration:n,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*l};${o}: ${y*c}px;padding-${d[0]}: ${y*s}px;padding-${d[1]}: ${y*v}px;margin-${d[0]}: ${y*m}px;margin-${d[1]}: ${y*g}px;border-${d[0]}-width: ${y*_}px;border-${d[1]}-width: ${y*p}px;min-${o}: 0`}}function Va(e,{delay:t=0,duration:n=400,easing:i=En,start:r=0,opacity:a=0}={}){const l=getComputedStyle(e),o=+l.opacity,c=l.transform==="none"?"":l.transform,d=1-r,f=o*(1-a);return{delay:t,duration:n,easing:i,css:(s,v)=>`
6
- transform: ${c} scale(${1-d*v});
7
- opacity: ${o-f*v}
8
- `}}var Ua=I('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Ka(e,t){re(t,!0);let n=B(t,"maxHeight",15);Pi("scope","popover");let i=U(null),r=U(!1);nt(async()=>{await Fn(),a(),await Fn(),l()});function a(){if(!u(i))return;const{top:s,right:v,bottom:m,height:g}=u(i).getBoundingClientRect(),_=o();j(r,G(s-_<0&&window.innerHeight-m>s+g));const p=window.innerWidth-v-_;v+_>window.innerWidth&&(u(i).style.left=`${p}px`)}function l(){if(!u(i))return;const{top:s,height:v}=u(i).getBoundingClientRect(),m=o(),g=u(r)?window.innerHeight-s-m:s+v-m;n(Math.min(g,window.innerHeight*.8))}function o(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var c=Ua(),d=S(c),f=S(d);ht(f,()=>t.children),ct(c,s=>j(i,s),()=>u(i)),F(()=>{oe(c,"flip",u(r)),$t(c,"--max-height",n()?n()+"px":null)}),De(3,d,()=>Zt,()=>({duration:100,y:10})),k(e,c),ae()}const za=[{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 Wa=I('<div class="genre svelte-13nhocm"> </div>'),Ya=(e,t)=>j(t,!0),$a=I('<button class="genre expand svelte-13nhocm"> </button>'),Ga=I("<!> <!>",1);function Za(e,t){re(t,!0);let n=U(!1);const i=Y(()=>u(n)?t.genres:[t.genres[0]]);var r=Ga(),a=ee(r);Qe(a,17,()=>u(i),xt,(c,d)=>{var f=ze();const s=Y(()=>{var g;return(g=za.find(_=>_.slug===u(d)))==null?void 0:g.name});var v=ee(f);{var m=g=>{var _=Wa(),p=S(_);F(()=>$(p,he(u(s)))),k(g,_)};H(v,g=>{u(s)&&g(m)})}k(c,f)});var l=T(a,2);{var o=c=>{var d=$a();d.__click=[Ya,n];var f=S(d);F(()=>$(f,`+${t.genres.length-1}`)),k(c,d)};H(l,c=>{!u(n)&&t.genres.length>1&&c(o)})}k(e,r),ae()}ue(["click"]);function Ja(e){let t=[];for(const n of e){let i=n;const r=t.find(o=>o.name===i.name),a=r==null?void 0:r.extra_info.category,l=i.extra_info.category;(a==="RENT"&&l==="BUY"||a==="BUY"&&l==="RENT")&&(t=t.filter(o=>o.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}xr();var Xa=Ee('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Qa(e){var t=Xa();k(e,t)}var el=(e,t,n)=>t(n()),tl=I('<div class="arrow svelte-1f6ryh6"><!></div>'),nl=I('<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>'),il=I('<div class="playlink empty svelte-1f6ryh6"> </div>'),rl=I('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function al(e,t){re(t,!0);const n=B(t,"list",3,!1),i=ia("scope")==="modal",r=Y(()=>t.playlinks.filter(_=>!!_.logo_url)),a=Y(()=>Ja(u(r))),l={SVOD:he("Stream"),BUY:he("Buy"),RENT:he("Rent"),TVOD:he("Rent Or Buy")};function o(_){Ae(i?xe.TitleModalPlaylinkClick:xe.TitlePopoverPlaylinkClick,t.title,{playlink:_})}var c=rl(),d=ee(c),f=S(d);F(()=>$(f,he("Where To Stream Online")));var s=T(d,2),v=S(s);Qe(v,17,()=>u(a),xt,(_,p)=>{let y=()=>u(p).name,w=()=>u(p).url,x=()=>u(p).logo_url,P=()=>u(p).extra_info.category;var E=nl();E.__click=[el,o,y];var b=S(E),M=T(b,2),A=S(M),C=S(A),q=T(A,2),D=S(q);F(()=>$(D,l[P()]||he("Stream")));var R=T(M,2);{var V=O=>{var z=tl(),W=S(z);Qa(W),k(O,z)};H(R,O=>{n()&&O(V)})}F(()=>{ie(E,"href",w()),ie(E,"data-playlink",y()),ie(b,"src",x()),$(C,y())}),k(_,E)});var m=T(v,2);{var g=_=>{var p=il(),y=S(p);F(()=>$(y,he("Title Unavailable"))),k(_,p)};H(m,_=>{t.playlinks.length||_(g)})}F(()=>oe(s,"list",n())),k(e,c),ae()}ue(["click"]);var ll=(e,t)=>j(t,!0),ol=I('<button class="show-more svelte-fluzit">Show more</button>'),sl=I('<p class="svelte-fluzit"> </p>'),cl=I('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function ul(e,t){re(t,!0);const n=B(t,"blurb",3,""),i=B(t,"limit",3,200);let r=U(!1);const a=Y(()=>t.text.slice(0,i()));var l=cl(),o=S(l),c=S(o),d=T(c);{var f=_=>{var p=Ke("...");k(_,p)};H(d,_=>{!u(r)&&t.text.length>i()&&_(f)})}var s=T(d,2);{var v=_=>{var p=ol();p.__click=[ll,r],k(_,p)};H(s,_=>{!u(r)&&(t.text.length>i()||n())&&_(v)})}var m=T(o,2);{var g=_=>{var p=sl(),y=S(p);F(()=>$(y,n())),k(_,p)};H(m,_=>{u(r)&&_(g)})}F(()=>$(c,u(r)?t.text:u(a))),k(e,l),ae()}ue(["click"]);var dl=I('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),fl=I('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function vl(e,t){var n=fl(),i=T(ee(n),2);Qe(i,21,()=>t.participants,xt,(r,a)=>{var l=dl(),o=S(l),c=T(o),d=S(c);F(()=>{var v;return $(d,((v=u(a).character)==null?void 0:v.slice(0,20))||"")});var f=T(d);{var s=v=>{var m=Ke("...");k(v,m)};H(f,v=>{var m;(m=u(a).character)!=null&&m.length&&v(s)})}F(()=>$(o,`${u(a).name??""} `)),k(r,l)}),k(e,n)}var _l=Ee('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function Wi(e){var t=_l();k(e,t)}var hl=I('<div class="top svelte-1rj31xw"><img class="poster svelte-1rj31xw"></div>'),ml=I("<div> </div>"),gl=I("<!> <!>",1),pl=I('<img alt="" class="svelte-1rj31xw">'),yl=I('<div class="content svelte-1rj31xw" data-playpilot-link-injections-title=""><div class="header svelte-1rj31xw"><!> <h1 class="svelte-1rj31xw"> </h1> <div class="info svelte-1rj31xw"><div class="imdb svelte-1rj31xw"><!> </div> <!> <div> </div> <div class="capitalize svelte-1rj31xw"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-1rj31xw"><!></div>',1);function Yi(e,t){re(t,!0);const n=B(t,"small",3,!1),i=B(t,"compact",3,!1);let r=U(!1),a=U(!1),l=U(!1);var o=yl(),c=ee(o),d=S(c),f=S(d);{var s=z=>{var W=hl(),ne=S(W);F(()=>{ie(ne,"src",t.title.standing_poster),ie(ne,"alt",`Movie poster for '${t.title.title??""}'`),oe(ne,"loaded",u(r))}),se("load",ne,()=>j(r,!0)),k(z,W)};H(f,z=>{i()||z(s)})}var v=T(f,2),m=S(v),g=T(v,2),_=S(g),p=S(_);Wi(p);var y=T(p),w=T(_,2);Za(w,{get genres(){return t.title.genres}});var x=T(w,2),P=S(x),E=T(x,2),b=S(E);F(()=>$(b,he(`Type: ${t.title.type}`)));var M=T(E,2);{var A=z=>{var W=ml(),ne=S(W);F(()=>$(ne,`${t.title.length??""} ${he("Minutes")??""}`)),k(z,W)};H(M,z=>{!n()&&t.title.length&&z(A)})}var C=T(d,2),q=S(C);al(q,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var D=T(q,2);{var R=z=>{var W=gl(),ne=ee(W);ul(ne,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var ke=T(ne,2);{var ge=Re=>{vl(Re,{get participants(){return t.title.participants}})};H(ke,Re=>{var Te;(Te=t.title.participants)!=null&&Te.length&&Re(ge)})}k(z,W)};H(D,z=>{n()||z(R)})}var V=T(c,2),O=S(V);Oi(O,()=>u(l),z=>{var W=pl();F(()=>{ie(W,"src",u(l)?t.title.standing_poster:t.title.medium_poster),oe(W,"loaded",u(a)),oe(W,"blur",u(l))}),se("load",W,()=>j(a,!0)),se("error",W,()=>j(l,!0)),k(z,W)}),F(()=>{ie(c,"data-playpilot-original-title",t.title.original_title),oe(c,"small",n()),oe(c,"compact",i()),oe(v,"truncate",n()),$(m,t.title.title),$(y,` ${t.title.imdb_score??""}`),$(P,t.title.year),oe(V,"faded",i())}),k(e,o),ae()}function wl(e,t){re(t,!0);let n=U(0);Ae(xe.TitlePopoverView,t.title),Ka(e,{get maxHeight(){return u(n)},set maxHeight(i){j(n,G(i))},children:(i,r)=>{var a=Y(()=>u(n)<250);Yi(i,{get title(){return t.title},small:!0,get compact(){return u(a)}})},$$slots:{default:!0}}),ae()}var kl=(e,t,n,i)=>t(u(n).title_details,u(i)),bl=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),xl=(e,t,n,i)=>t(u(n).title_details,i()),Sl=I('<!> <a target="_blank"> </a>',1),El=I(" <!>.",1),Tl=I("<!> <br>",1),Il=I(" <br>",1),Al=I('<span class="svelte-pfvkex"><!></span>'),Cl=I('<p class="svelte-pfvkex"></p>');function Pl(e,t){re(t,!0);const n=B(t,"onclickmodal",3,c=>null);function i(c,d){Ae(xe.AfterArticlePlaylinkClick,c,{playlink:d})}function r(c,d){Ae(xe.AfterArticleModalButtonClick,c),n()(d)}var a=ze(),l=ee(a);{var o=c=>{var d=Cl();Qe(d,21,()=>t.linkInjections,xt,(f,s)=>{var v=Al();const m=Y(()=>{const{key:w,title:x,title_details:P,after_article_style:E}=u(s);return{key:w,title:x,title_details:P,after_article_style:E}}),g=Y(()=>{var w;return((w=u(m).title_details)==null?void 0:w.providers)||[]});var _=S(v);{var p=w=>{var x=Tl(),P=ee(x);{var E=M=>{var A=bl(),C=ee(A);F(()=>$(C,`"${u(m).title??""}" ${he("Is Available To Stream")??""} `));var q=T(C),D=S(q);D.__click=[kl,r,m,s];var R=S(D);F(()=>$(R,he("View Streaming Options"))),k(M,A)},b=M=>{var A=El(),C=ee(A);F(()=>$(C,`"${u(m).title??""}" ${he("Is Available To Stream On")??""} `));var q=T(C);Qe(q,17,()=>u(g),xt,(D,R,V)=>{let O=()=>u(R).name,z=()=>u(R).url;var W=Sl(),ne=ee(W);{var ke=Te=>{var X=Ke();F(()=>$(X,V===u(g).length-1?`, ${he("And")}`:",")),k(Te,X)};H(ne,Te=>{V&&Te(ke)})}var ge=T(ne,2);ge.__click=[xl,i,m,O];var Re=S(ge);F(()=>{ie(ge,"href",z()),$(Re,O())}),k(D,W)}),k(M,A)};H(P,M=>{u(m).after_article_style==="modal_button"?M(E):M(b,!1)})}k(w,x)},y=w=>{var x=Il(),P=ee(x);F(()=>$(P,`"${u(m).title??""}" ${he("Title Unavailable Suffix")??""} `)),k(w,x)};H(_,w=>{u(g).length?w(p):w(y,!1)})}F(()=>ie(v,"data-playpilot-injection-key",u(m).key)),k(f,v)}),k(c,d)};H(l,c=>{t.linkInjections.length&&c(o)})}k(e,a),ae()}ue(["click"]);function jl(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Tn(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Ll(e,t,n=[]){var a,l;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((l=r.parentNode)==null?void 0:l.nodeName)||"")););return r}function Ml(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function Dl(e,t,n,i){const r=jl(t),a=Tn(t),l=e.slice(0,i),o=e.slice(i),c=/[-/\\^$*+?.()|[\]{}]/g,d=new RegExp(`${a.replace(c,"\\$&")}|${r.replace(c,"\\$&")}`),f=o.replace(d,n);return l+f}function rt(e){return Tn(e).toLowerCase().replace(/\s+/g,"")}function Nl(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let l=Math.max(0,r-a),o=l+n;o>e.length&&(o=e.length,l=Math.max(0,o-n));let c=e.slice(l,o).trim();return l>0&&(c="…"+c),o<e.length&&(c+="…"),c}function Ol(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const In="data-playpilot-injection-key",An=`[${In}]`,ut={};let un=null,Dt=null;function Rl(e){const t=[],n=[e];for(;n.length>0;){const i=n.pop();if(t.includes(i)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(i.tagName))continue;const r=Array.from(i.childNodes).some(l=>{var o;return l.nodeType===Node.TEXT_NODE&&((o=l.nodeValue)==null?void 0:o.trim())!==""});if(r&&i.tagName==="LI"){const l=i.closest("ul, ol");l&&!t.includes(l)&&t.push(l);continue}if(r){t.push(i);continue}const a=Array.from(i.children);for(let l=a.length-1;l>=0;l--)n.push(a[l])}return t}function Cn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function Hl(e,t,n={aiInjections:[],manualInjections:[]}){var f;const i=Wl(n);if(!i)return[];const r=e.map(s=>s.innerText).join(" "),a=$l(i),l=a.filter(s=>rt(r).includes(rt(s.sentence))),o={};for(const s of l){const v=e.findIndex(x=>rt(x.innerText).includes(rt(s.sentence))),m=e[v];if(!m)continue;const g=Ll(s.title,m,["A"]);if(!g||Ml(g))continue;const _=document.createElement("span");_.dataset.playpilotInjectionKey=s.key;const p=document.createElement("a");p.innerText=s.title,p.href=s.playpilot_url,p.dataset.playpilotOriginalTitle=(f=s.title_details)==null?void 0:f.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",_.insertAdjacentElement("beforeend",p);const y=Ol(Object.values(o).filter(x=>x.elementIndex===v).map(x=>x.to));m.innerHTML=Dl(m.innerHTML,s.title,_.outerHTML,y);const w=m.innerHTML.indexOf(_.outerHTML);o[s.key]={elementIndex:v,from:w,to:w+_.outerHTML.length}}ql(a,t),Fl();const c=Gl(i);return c.length&&Ul(e,c,t),zl(i,o).filter(s=>s.title_details).map((s,v)=>{const m=!s.inactive&&!s.after_article&&!document.querySelector(`[${In}="${s.key}"]`),g=s.duplicate??(!s.manual&&Zl(s,v,i));return{...s,inactive:s.inactive??!1,duplicate:g,failed:m}})}function Fl(){const e=Array.from(document.querySelectorAll(`${An} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function ql(e,t){window.addEventListener("click",i=>{const r=i.target;if(!(r!=null&&r.parentElement))return;const a=r.parentElement.getAttribute(In);if(!a)return;const l=e.find(o=>a===o.key);l&&Bl(i,l,t)}),Array.from(document.querySelectorAll(An)).forEach(i=>{const r=i.dataset.playpilotInjectionKey,a=e.find(l=>r===l.key);a&&(i.addEventListener("mouseenter",l=>Vl(l,a)),i.addEventListener("mouseleave",()=>Ft(a)))})}function Bl(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Ft(t))}function Vl(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget;un=n,setTimeout(()=>{if(ut[t.key]||un!==n)return;const i=bn(wl,{target:n,props:{title:t.title_details}});ut[t.key]={injection:t,component:i}},100)}function Ft(e,t=!0){const n=ut[e.key];un=null,n&&(Ni(n.component,{outro:t}),delete ut[e.key])}function Ul(e,t,n){var o,c;if(!t.length)return;const i=document.createElement("div"),r=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,a=(r?document.querySelector(r):null)||e[e.length-1],l=((c=window.PlayPilotLinkInjections)==null?void 0:c.after_article_insert_position)||"afterend";i.dataset.playpilotAfterArticlePlaylinks="true",a.insertAdjacentElement(l,i),Dt=bn(Pl,{target:i,props:{linkInjections:t,onclickmodal:n}})}function Kl(){var e;Dt&&(Ni(Dt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Dt=null)}function dn(){Object.values(ut).forEach(t=>Ft(t.injection)),document.querySelectorAll(An).forEach(t=>t.outerHTML=t.textContent||""),Object.values(ut).forEach(({injection:t})=>Ft(t,!1)),Kl()}function zl(e,t){return e.sort((n,i)=>{const r=t[n.key],a=t[i.key];return!r&&a?1:r&&!a?-1:!r&&!a?0:(r==null?void 0:r.elementIndex)!==(a==null?void 0:a.elementIndex)?((r==null?void 0:r.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((r==null?void 0:r.from)||0)-((a==null?void 0:a.from)||0)})}function Wl({aiInjections:e,manualInjections:t}){return[...e,...t.map(n=>({...n,manual:!0}))]}function Yl(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function Pn(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details}function $l(e){return $i(e).filter(t=>t.in_text!==!1&&Pn(t))}function Gl(e){return $i(e).filter(t=>t.after_article===!0&&Pn(t))}function $i(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&jn(n,t)))}function Zl(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&jn(i,e))}function jn(e,t){return e.title===t.title&&rt(e.sentence)===rt(t.sentence)}function Jl(){const e=Cn();return{heading:Xl(e),modified_time:Ql(e),published_time:eo(e)}}function Xl(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Ql(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?Gi(n):null}function eo(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?Gi(n):null}function Gi(e){try{return new Date(e).toISOString()}catch{return null}}function Zi(){return location.protocol+"//"+location.host+location.pathname}let en=null;async function Ji(e,t,{hash:n=Ui(t),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=Jt(),l=Vi()?await Bi():!1,o=Ki(),c=Jl();if(!a)throw new Error("No token was provided");const d=await fetch(Gt+`/external-pages/?api-token=${a}&include_title_details=true${l?"&editorial_mode_enabled=true":""}&language=${o}`,{headers:r,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:c,page_text:t,...i})});if(!d.ok)throw d;return await d.json()}async function $n(e,t,{requireCompletedResult:n=!1,pollInterval:i=3e3,maxTries:r=600}={}){let a=Ui(t),l=0;en&&clearTimeout(en);const o=async(c,d)=>{try{const f=await Ji(e,t,{hash:a});if(n&&f.automation_enabled&&f.ai_running)throw new Error;f.link_injections=Gn(f.link_injections||[]),f.ai_injections=Gn(f.ai_injections||[]),c(f);return}catch{if(l++,l>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),c();return}en=setTimeout(()=>o(c),i)}};return new Promise(o)}async function to(e,t){var l;const n=(l=window.PlayPilotLinkInjections)==null?void 0:l.selector,r=e.filter(o=>o.manual).map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive,removed:!!o.removed}));if(!await Ji(Zi(),t,{params:{private_token:Sn(),automation_enabled:!1,link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function no(){const e=new Headers({"Content-Type":"application/json"}),t=Jt();if(!t)throw new Error("No token was provided");const n=await fetch(Gt+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function Gn(e){return e.map(t=>({...t,key:Xi(t.sid)}))}function Xi(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function Jt(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function io(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var ro=Ee('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Qi(e){var t=ro();k(e,t)}function Ln(e,t){re(t,!0);const n=B(t,"size",3,"margin(2)"),i=B(t,"onclick",3,()=>null),r=Ma(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=ze(),l=ee(a);ka(l,()=>t.href?"a":"button",!1,(o,c)=>{let d;F(()=>{d=Ea(o,d,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",o.namespaceURI===ai,o.nodeName.includes("-")),$t(o,"--size",n())});var f=ze(),s=ee(f);ht(s,()=>t.children??Ye),k(c,f)}),k(e,a),ae()}var ao=(e,t)=>t()(),lo=I('<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 oo(e,t){re(t,!0);const n=B(t,"onclose",3,()=>null),i=B(t,"onscroll",3,()=>null);Pi("scope","modal"),nt(()=>{const s=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=s||""});function r(s){return window.innerWidth<600?Zt(s,{duration:250,y:window.innerHeight}):Va(s,{duration:150,start:.85})}var a=lo();se("keydown",ve,({key:s})=>{s==="Escape"&&n()()});var l=S(a),o=S(l),c=S(o);Ln(c,{onclick:()=>n()(),children:(s,v)=>{Qi(s)},$$slots:{default:!0}});var d=T(o,2);ht(d,()=>t.children);var f=T(l,2);f.__click=[ao,n],se("scroll",l,function(...s){var v;(v=i())==null||v.apply(this,s)}),De(3,l,()=>r),De(3,a,()=>zi,()=>({duration:150})),k(e,a),ae()}ue(["click"]);function so(e,t){re(t,!0),Ae(xe.TitleModalView,t.title);let n=!1;function i(){n||(Ae(xe.TitleModalScroll,t.title),n=!0)}oo(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{Yi(r,{get title(){return t.title}})},$$slots:{default:!0}}),ae()}var co=Ee('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function uo(e,t){const n=B(t,"expanded",3,!1);var i=co();F(()=>oe(i,"expanded",n())),k(e,i)}function fo(e,t,n){t(!t()),n()(t())}var vo=I('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function fn(e,t){re(t,!0);let n=B(t,"active",15),i=B(t,"fullwidth",3,!1),r=B(t,"label",3,""),a=B(t,"onclick",3,()=>null);var l=vo();l.__click=[fo,n,a];var o=S(l),c=S(o);ht(c,()=>t.children),F(()=>{ie(l,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),oe(l,"active",n()),oe(l,"fullwidth",i())}),k(e,l),ae()}ue(["click"]);var _o=I('<input type="text" class="svelte-1vrer3i">');function Mn(e,t){let n=B(t,"value",15),i=B(t,"label",3,""),r=B(t,"name",3,""),a=B(t,"readonly",3,!1),l=B(t,"oninput",3,()=>null);var o=_o();o.__input=function(...c){var d;(d=l())==null||d.apply(this,c)},F(()=>{ie(o,"name",r()),ie(o,"aria-label",i()),ie(o,"placeholder",i()),o.readOnly=a()}),Pa(o,n),k(e,o)}ue(["input"]);var ho=Ee('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),mo=Ee('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),go=Ee('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Zn(e,t){const n=B(t,"align",3,"bottom");var i=go(),r=S(i);{var a=o=>{var c=ho();k(o,c)},l=o=>{var c=ze(),d=ee(c);{var f=s=>{var v=mo();k(s,v)};H(d,s=>{n()==="center"&&s(f)},!0)}k(o,c)};H(r,o=>{n()==="bottom"?o(a):o(l,!1)})}k(e,i)}var po=I("<!> In-text Playlink",1),yo=I("<!> Bottom Playlink",1),wo=(e,t)=>t().after_article_style="playlinks",ko=(e,t)=>t().after_article_style="modal_button",bo=I('<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>'),xo=I('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function So(e,t){re(t,!0);const n=B(t,"linkInjection",7),i=Y(()=>n().after_article_style==="modal_button");var r=xo(),a=ee(r),l=S(a),o=Y(()=>n().in_text??!0);fn(l,{fullwidth:!0,get active(){return u(o)},onclick:v=>{n().in_text=v,n().manual=!0},label:"In-text Playlink",children:(v,m)=>{var g=po(),_=ee(g);Zn(_,{align:"center"}),k(v,g)},$$slots:{default:!0}});var c=T(l,2),d=Y(()=>n().after_article??!1);fn(c,{fullwidth:!0,get active(){return u(d)},onclick:v=>{n().after_article=v,n().manual=!0},label:"Bottom Playlink",children:(v,m)=>{var g=yo(),_=ee(g);Zn(_,{align:"bottom"}),k(v,g)},$$slots:{default:!0}});var f=T(a,2);{var s=v=>{var m=bo(),g=T(S(m),2),_=S(g);_.__click=[wo,n];var p=T(_,2);p.__click=[ko,n];var y=T(p,2);F(()=>{ie(g,"aria-activedescendant",`playlinks-${(u(i)?"after-article":"in-text")??""}`),ie(_,"aria-selected",!u(i)||null),oe(_,"active",!u(i)),ie(p,"aria-selected",u(i)||null),oe(p,"active",u(i)),oe(y,"right",u(i))}),De(3,m,()=>Ht,()=>({duration:100})),k(v,m)};H(f,v=>{n().after_article&&v(s)})}k(e,r),ae()}ue(["click"]);var Eo=I('<div class="alert svelte-1tq7qhv"><!></div>');function Dn(e,t){re(t,!0);var n=Eo(),i=S(n);ht(i,()=>t.children),k(e,n),ae()}var To=Ee('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Io(e){var t=To();k(e,t)}var Ao=(e,t)=>j(t,!u(t)),Co=I('<div class="content svelte-1fmy0wh"><!></div>'),Po=I('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function jo(e,t){re(t,!0);let n=U(!1),i=U(null);function r(f){var v;const s=f.target;s===u(i)||(v=u(i))!=null&&v.contains(s)||j(n,!1)}var a=Po();se("click",ve,r);var l=S(a);l.__click=[Ao,n];var o=S(l);Io(o),ct(l,f=>j(i,f),()=>u(i));var c=T(l,2);{var d=f=>{var s=Co(),v=S(s);ht(v,()=>t.children),De(1,s,()=>Zt,()=>({duration:150,y:5})),k(f,s)};H(c,f=>{u(n)&&f(d)})}F(()=>{ie(l,"aria-label",t.ariaLabel),ie(l,"aria-expanded",u(n))}),k(e,a),ae()}ue(["click"]);function Lo(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}var Mo=(e,t)=>j(t,!u(t)),Do=I('<button class="expand-sentence svelte-1lxtpkd"> </button>'),No=I('<button class="context-menu-action svelte-1lxtpkd">Remove</button>'),Oo=(e,t)=>j(t,!u(t)),Ro=I('<div class="actions svelte-1lxtpkd"><button class="expand svelte-1lxtpkd" aria-label="Expand"><!></button> <!></div>'),Ho=I('<div class="expanded svelte-1lxtpkd"><div class="label svelte-1lxtpkd">Link URL</div> <!> <div class="label offset svelte-1lxtpkd">Layout options</div> <div class="type-select svelte-1lxtpkd"><!></div></div>'),Fo=I('<div class="item svelte-1lxtpkd"><div class="header svelte-1lxtpkd"><img class="poster svelte-1lxtpkd" alt="" width="32" height="48"> <div class="info svelte-1lxtpkd"><div class="title svelte-1lxtpkd"> </div> <div class="sentence svelte-1lxtpkd"><!> <!></div></div> <div class="context-menu svelte-1lxtpkd"><!></div></div> <div class="content svelte-1lxtpkd"><!> <!></div></div>');function qo(e,t){re(t,!0);const n=B(t,"linkInjection",15),i=B(t,"onremove",3,()=>null),r=B(t,"onhighlight",3,()=>null),a=Y(()=>n()||{}),l=Y(()=>u(a).key),o=Y(()=>u(a).sentence),c=Y(()=>u(a).title_details),d=Y(()=>u(a).failed),f=Y(()=>u(a).inactive),s=Y(()=>u(c)),v=Y(()=>Nl(n().sentence,n().title,60));let m=U(!1),g=U(!1),_=U(!1),p=U(null);nt(()=>{u(d)&&Ae(xe.InjectionFailed,u(s),{phrase:n().title,sentence:u(o)})});function y(X=!0){x().forEach(le=>{le.classList.toggle("injection-highlight",X)})}function w(X){let te=X.target,le=te==null?void 0:te.dataset.playpilotInjectionKey;te&&!le&&(te=te.closest(`[data-playpilot-injection-key="${u(l)}"]`),le=te==null?void 0:te.dataset.playpilotInjectionKey),j(_,le===u(l)),u(p)&&u(_)&&r()(u(p))}function x(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${u(l)}"]`))}var P=Fo();se("mouseover",ve,w),P.__click=[Lo,y,x];var E=S(P),b=S(E),M=T(b,2),A=S(M),C=S(A),q=T(A,2),D=S(q);wa(D,()=>(u(g)?u(o):u(v)).replace(n().title,`<em>${n().title}</em>`));var R=T(D,2);{var V=X=>{var te=Do();te.__click=[Mo,g];var le=S(te);F(()=>$(le,u(g)?"Less":"More")),k(X,te)};H(R,X=>{u(v).length<u(o).length&&X(V)})}var O=T(M,2),z=S(O);jo(z,{ariaLabel:"More options",children:(X,te)=>{var le=No();le.__click=function(...L){var N;(N=i())==null||N.apply(this,L)},k(X,le)},$$slots:{default:!0}});var W=T(E,2),ne=S(W);{var ke=X=>{Dn(X,{children:(te,le)=>{var L=Ke("A match was found, but the link could not be injected.");k(te,L)},$$slots:{default:!0}})},ge=X=>{var te=Ro(),le=S(te);le.__click=[Oo,m];var L=S(le);uo(L,{get expanded(){return u(m)}});var N=T(le,2),Q=Y(()=>u(f)?"Inactive":"Visible"),me=Y(()=>!n().inactive);fn(N,{get label(){return u(Q)},get active(){return u(me)},onclick:be=>{n(n().inactive=!be,!0),n(n().manual=!0,!0)},children:(be,We)=>{var Ie=Ke();F(()=>$(Ie,u(f)?"Inactive":"Visible")),k(be,Ie)},$$slots:{default:!0}}),F(()=>ie(le,"aria-expanded",u(m))),k(X,te)};H(ne,X=>{u(d)?X(ke):X(ge,!1)})}var Re=T(ne,2);{var Te=X=>{var te=Ho(),le=T(S(te),2);Mn(le,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(Q){n(n().playpilot_url=Q,!0)}});var L=T(le,4),N=S(L);So(N,{get linkInjection(){return n()}}),De(3,te,()=>Ht,()=>({duration:100})),k(X,te)};H(Re,X=>{u(m)&&X(Te)})}ct(P,X=>j(p,X),()=>u(p)),F(()=>{oe(P,"highlighted",u(_)),oe(P,"inactive",u(f)),ie(b,"src",u(s).standing_poster),$(C,u(s).title)}),se("mouseenter",P,()=>y(!0)),se("mouseleave",P,()=>y(!1)),De(6,P,()=>Ht,()=>({duration:200})),k(e,P),ae()}ue(["click"]);var Bo=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function Vo(e,t){re(t,!0);let n=B(t,"element",7),i=B(t,"position",23,()=>({x:0,y:0})),r=B(t,"limit",19,()=>({x:0,y:0})),a=B(t,"onchange",3,()=>null),l=!1,o={x:0,y:0},c=i();nt(()=>{d(i().x,i().y)});function d(_,p){const y=window.innerWidth,w=window.innerHeight,x=n().clientWidth,P=n().clientHeight;_=Math.min(Math.max(_,r().x),y-x-r().x),p=Math.min(Math.max(p,r().y),w-P-r().y),n().style.right=_+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:_,y:p}),a()(i())}function f(_){var p,y;return{x:_.pageX||((p=_.touches)==null?void 0:p[0].pageX)||0,y:_.pageY||((y=_.touches)==null?void 0:y[0].pageY)||0}}function s(_){l=!0,o=f(_),c=i()}function v(_){if(!l)return;const p=f(_),y=p.x-o.x,w=p.y-o.y,x=c.x-y,P=c.y-w;d(x,P)}function m(){l&&(l=!1)}var g=Bo();se("mousemove",ve,v),se("touchmove",ve,v,void 0,!0),se("mouseup",ve,m),se("touchend",ve,m),se("resize",ve,()=>d(i().x,i().y)),g.__mousedown=s,g.__touchstart=s,k(e,g),ae()}ue(["mousedown","touchstart"]);var Uo=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function Ko(e,t){re(t,!0);let n=B(t,"element",7),i=B(t,"height",7,200),r=B(t,"onchange",3,()=>null);const a=16;let l=!1,o=0,c=i();nt(()=>{i()&&d(i())});function d(_){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(_,m()));n().style.height=`${y}px`,i(y),r()(y)}function f(_){var p,y;l=!0,o=_.pageY||((y=(p=_.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,c=n().clientHeight}function s(_){var x,P;if(!l)return;const p=_.pageY||((P=(x=_.touches)==null?void 0:x[0])==null?void 0:P.pageY)||0,y=o-p,w=c+y;d(w)}function v(){l=!1}function m(){const _=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-_,0)}var g=Uo();se("mousemove",ve,s),se("touchmove",ve,s,void 0,!0),se("mouseup",ve,v),se("touchend",ve,v),se("resize",ve,()=>d(i())),g.__mousedown=f,g.__touchstart=f,k(e,g),ae()}ue(["mousedown","touchstart"]);var zo=Ee('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Wo(e){var t=zo();k(e,t)}async function Yo(e){const t=new Headers({"Content-Type":"application/json"}),n=Jt();if(!n)throw new Error("No token was provided");const i=await fetch(Gt+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var $o=Ee('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Go(e){var t=$o();k(e,t)}var Zo=I("<div> </div>"),Jo=e=>e.stopImmediatePropagation(),Xo=I('<button class="item svelte-tbzvlp"><img class="poster svelte-tbzvlp" alt="" width="28" height="42"> <div class="content"><div class="name svelte-tbzvlp"> </div> <div class="meta svelte-tbzvlp"><div class="imdb svelte-tbzvlp"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-tbzvlp"><!></a></button>');function Jn(e,t){re(t,!0);const n=B(t,"hoverable",3,!0),i=B(t,"onclick",3,()=>null);var r=Xo();r.__click=function(...E){var b;(b=i())==null||b.apply(this,E)};var a=S(r),l=T(a,2),o=S(l),c=S(o),d=T(o,2),f=S(d),s=S(f);Wi(s);var v=T(s),m=T(f,2),g=S(m),_=T(m,2),p=S(_),y=T(_,2);{var w=E=>{var b=Zo(),M=S(b);F(()=>$(M,`${t.title.length??""} min`)),k(E,b)};H(y,E=>{t.title.length&&E(w)})}var x=T(l,2);x.__click=[Jo];var P=S(x);Go(P),F(()=>{oe(r,"hoverable",n()),ie(a,"src",t.title.standing_poster),$(c,t.title.title),$(v,` ${t.title.imdb_score??""}`),$(g,t.title.year),$(p,t.title.type),ie(x,"href",`${qi}/${t.title.type??""}/${t.title.slug??""}`)}),k(e,r),ae()}ue(["click"]);var Qo=I('<em class="empty svelte-1olb8n0">No results found</em>'),es=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),ts=I('<div class="selected svelte-1olb8n0"><!></div>'),ns=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function is(e,t){re(t,!0);let n=B(t,"onselect",3,()=>null),i=B(t,"query",15),r=U(G([])),a=U(null),l=U(!1);Ut(()=>{i()&&o(i())});async function o(_){j(l,!0);try{j(r,G(await Yo(_)))}finally{j(l,!1)}}function c(_){i(_.title),j(a,G(_)),n()(_)}var d=ns(),f=S(d);Mn(f,{oninput:()=>j(a,null),name:"search",label:"Search...",get value(){return i()},set value(_){i(_)}});var s=T(f,2);{var v=_=>{var p=es();Qe(p,21,()=>u(r),y=>y.sid,(y,w)=>{Jn(y,{get title(){return u(w)},onclick:()=>c(u(w))})},y=>{var w=ze(),x=ee(w);{var P=E=>{var b=Qo();k(E,b)};H(x,E=>{u(l)||E(P)})}k(y,w)}),k(_,p)};H(s,_=>{i()&&!u(a)&&_(v)})}var m=T(s,2);{var g=_=>{var p=ts(),y=S(p);Jn(y,{get title(){return u(a)},hoverable:!1}),k(_,p)};H(m,_=>{u(a)&&_(g)})}k(e,d),ae()}function rs(e,t,n,i,r,a){if(!u(t)||!u(n))return;const l=u(n).type==="movie"?"movie":"show",o=qi+`/${l}/${u(n).slug}`,c={sid:u(n).sid,title:u(t),sentence:u(i),playpilot_url:o,key:Xi(u(n).sid),title_details:u(n),manual:!0};r.onsave(c),a()()}var as=I('<div class="error svelte-l7tw17"><!></div>'),ls=I('<label for="text" class="svelte-l7tw17">Paired title</label> <!>',1),os=I('<section class="layout svelte-l7tw17"><div class="header svelte-l7tw17"><!> <h2 class="svelte-l7tw17">Add Playlink manually</h2></div> <p class="svelte-l7tw17">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-l7tw17">Selected text</label> <!> <!> <!> <button class="save svelte-l7tw17">Add playlink</button></section>');function ss(e,t){re(t,!0);let n=B(t,"htmlString",3,""),i=B(t,"onclose",3,()=>null),r=U(""),a=U(""),l=U(null),o=U(""),c=U("");nt(d);function d(){const b=window.getSelection();if(!(b!=null&&b.anchorNode)||b.anchorNode.parentElement&&!Cn().contains(b.anchorNode.parentElement))return;const M=b.toString().trim();if(!M)return;j(o,""),j(r,G(M));const A=b.getRangeAt(0).cloneContents();if(Array.from(A.childNodes).filter(R=>{var V;return(V=R.textContent)==null?void 0:V.trim()}).length>1){j(o,"Selection contains multiple items. Selection may not contain a mix of styled and non styled text. Please select the text more directly.");return}j(c,G(u(r))),j(a,G(f(b,M)));const q=b.getRangeAt(0).commonAncestorContainer.textContent,D=Tn(n());(!q||!D.includes(q))&&j(o,"Selection was not inside of given content")}function f(b,M){const A=b.getRangeAt(0);let C=A.startContainer;for(;(C.textContent||"").length<=M.length*3&&C.parentNode;)C=C.parentNode;if(!C||!C.textContent)return"";const q=C.textContent,D=s(C,A.startContainer,A.startOffset),R=s(C,A.endContainer,A.endOffset),V=q.slice(0,D).lastIndexOf("."),O=q.slice(R).match(/[.!?]/),z=O?R+O.index:q.length,W=V===-1?0:V+1,ne=z;return q.slice(W,ne+1).trim()}function s(b,M,A){let C=0;const q=b,D=R=>{var V;if(R===M)return C+=A,!0;R.nodeType===Node.TEXT_NODE&&(C+=((V=R.textContent)==null?void 0:V.length)||0);for(let O=R.firstChild;O;O=O.nextSibling)if(D(O))return!0;return!1};return D(q),C}function v(b){var M,A;j(l,G(b)),(A=(M=window.getSelection())==null?void 0:M.removeAllRanges)==null||A.call(M)}var m=os();se("mouseup",ve,d);var g=S(m),_=S(g);Ln(_,{get onclick(){return i()},size:"24px",children:(b,M)=>{Wo(b)},$$slots:{default:!0}});var p=T(g,6);Mn(p,{get value(){return u(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var y=T(p,2);{var w=b=>{var M=as(),A=S(M);Dn(A,{children:(C,q)=>{var D=Ke();F(()=>$(D,u(o))),k(C,D)},$$slots:{default:!0}}),k(b,M)};H(y,b=>{u(o)&&b(w)})}var x=T(y,2);{var P=b=>{var M=ls(),A=T(ee(M),2);Oi(A,()=>u(a)+u(r),C=>{is(C,{onselect:v,get query(){return u(c)},set query(q){j(c,G(q))}})}),k(b,M)};H(x,b=>{u(o)||b(P)})}var E=T(x,2);E.__click=[rs,r,l,a,t,i],F(()=>E.disabled=!u(r)||!u(l)),k(e,m),ae()}ue(["click"]);var cs=Ee('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function us(e){var t=cs();k(e,t)}var ds=I('AI links are currently processing. This can take several minutes.<br class="svelte-7ilatt"> You can add manual links while this is ongoing.',1),fs=(e,t,n,i)=>{t.onadd(u(n)),j(i,!0)},vs=I('AI links are ready. <strong class="svelte-7ilatt"> </strong> New links will be used next time you refresh the page, or you can insert them now. <button class="button svelte-7ilatt">Add AI links</button>',1),_s=(e,t)=>j(t,!0),hs=I('AI links finished running, but no new links were found. <button class="button svelte-7ilatt">Dismiss</button>',1),ms=I('<div class="loading-bar svelte-7ilatt" data-testid="loading-bar"></div>'),gs=I('<div class="animator svelte-7ilatt"></div>'),ps=I('<div class="ai-indicator svelte-7ilatt"><div class="content svelte-7ilatt"><div class="icon svelte-7ilatt"><!></div> <div class="svelte-7ilatt"><!></div> <!></div> <div class="border svelte-7ilatt"><!></div></div>');function ys(e,t){re(t,!0);const n=B(t,"htmlString",3,""),i=Y(()=>Math.min(Math.max(n().length*30,6e4),6e5));let r=U(!0),a=U(G([])),l=U(!1);function o(s){j(r,!1),j(a,G(s))}var c=ze(),d=ee(c);{var f=s=>{var v=ps(),m=S(v),g=S(m),_=S(g);us(_);var p=T(g,2),y=S(p);{var w=C=>{var q=ds();k(C,q)},x=C=>{var q=ze(),D=ee(q);{var R=O=>{var z=vs(),W=T(ee(z)),ne=S(W),ke=T(W,2);ke.__click=[fs,t,a,l],F(()=>$(ne,`${u(a).length??""} New ${(u(a).length>1?"links were":"link was")??""} found.`)),k(O,z)},V=O=>{var z=hs(),W=T(ee(z));W.__click=[_s,l],k(O,z)};H(D,O=>{var z;(z=u(a))!=null&&z.length?O(R):O(V,!1)},!0)}k(C,q)};H(y,C=>{u(r)?C(w):C(x,!1)})}var P=T(p,2);{var E=C=>{var q=ms();F(()=>$t(q,"animation-duration",`${u(i)??""}ms`)),k(C,q)};H(P,C=>{u(r)&&C(E)})}var b=T(m,2),M=S(b);{var A=C=>{var q=gs();k(C,q)};H(M,C=>{u(r)&&C(A)})}F(()=>oe(v,"running",u(r))),k(s,v)};H(d,s=>{u(l)||s(f)})}return k(e,c),ae({notifyUserOfNewState:o})}ue(["click"]);async function ws(e,t,n,i,r,a,l){try{j(t,!0),j(n,!1),i(await to(i(),r())),j(a,G(u(l)))}catch{j(n,!0)}finally{j(t,!1)}}var ks=I('<div class="handle svelte-1w749wn"><!></div>'),bs=I('<!> <div class="handle svelte-1w749wn"><!></div>',1),xs=I('<div class="loading svelte-1w749wn">Loading...</div>'),Ss=I('<div class="bubble svelte-1w749wn"> </div> <!>',1),Es=I('<div class="error svelte-1w749wn"><!></div>'),Ts=I('<div class="empty svelte-1w749wn">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Is=I('<button class="save svelte-1w749wn"> </button>'),As=I('<!> <div class="items svelte-1w749wn"></div> <!>',1),Cs=I('<div class="panel playpilot-styled-scrollbar svelte-1w749wn"><!></div>'),Ps=I('<section class="editor playpilot-styled-scrollbar svelte-1w749wn"><header class="header svelte-1w749wn"><!> <h1 class="svelte-1w749wn">Playlinks</h1> <!></header> <!> <!> <!></section>');function js(e,t){re(t,!0);let n=B(t,"linkInjections",15),i=B(t,"htmlString",3,""),r=B(t,"loading",3,!1),a=B(t,"aiRunning",3,!1);const l="editor-position",o="editor-height";let c=U(null),d=G(JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }')),f=G(parseInt(localStorage.getItem(o)||"0")),s=U(!1),v=U(!1),m=U(!1),g=U(0),_=U(""),p=U(void 0);const y=Y(()=>JSON.stringify(n())),w=Y(()=>u(_)!==u(y)),x=Y(()=>n().filter(L=>L.title_details&&!L.removed&&!L.duplicate&&(L.manual||!L.manual&&!L.failed))),P=Y(()=>E(u(x)));Ut(()=>{r()||Je(()=>{j(_,G(u(y))),q()})});function E(L){return L.sort((N,Q)=>N.failed!==Q.failed?N.failed?1:-1:N.title_details.title.localeCompare(Q.title_details.title))}function b(L,N){localStorage.setItem(L,N)}function M(L){const N=n().findIndex(Q=>Q.key===L);n(n()[N].manual=!0,!0),n(n()[N].removed=!0,!0),n([...n()])}function A(L){if(!u(c))return;const N=L.offsetTop,Q=N+L.offsetHeight,me=u(c).scrollTop,be=me+u(c).clientHeight;N>=me&&Q<=be||u(c).scrollTo({top:N-u(c).clientHeight/2,behavior:"smooth"})}function C(L){const N=L.target;j(g,G(N.scrollTop))}function q(){const L={total:n().length,failed_automatic:n().filter(N=>N.failed&&!N.manual).length,failed_manual:n().filter(N=>N.failed&&N.manual).length,final_injected:u(x).length};Ae(xe.TotalInjectionsCount,null,L)}function D(L){const N=L.filter(Q=>{if(Pn(Q))return!n().some(me=>jn(Q,me))});u(p).notifyUserOfNewState(N)}var R=Ps(),V=S(R),O=S(V);{var z=L=>{var N=bs(),Q=ee(N);{var me=Ie=>{var ce=ks(),de=S(ce);Ko(de,{get element(){return u(c)},get height(){return f},onchange:qe=>b(o,JSON.stringify(qe))}),k(Ie,ce)};H(Q,Ie=>{r()||Ie(me)})}var be=T(Q,2),We=S(be);Vo(We,{get element(){return u(c)},get position(){return d},limit:{x:16,y:16},onchange:Ie=>b(l,JSON.stringify(Ie))}),k(L,N)};H(O,L=>{u(c)&&L(z)})}var W=T(O,4);{var ne=L=>{var N=xs();k(L,N)},ke=L=>{var N=Ss(),Q=ee(N),me=S(Q),be=T(Q,2);Ln(be,{onclick:()=>j(s,!0),size:"24px","aria-label":"Add manual injection",children:(We,Ie)=>{var ce=Ke("+");k(We,ce)},$$slots:{default:!0}}),F(()=>{ie(Q,"aria-label",`${u(x).length??""} found playlinks`),$(me,u(x).length)}),k(L,N)};H(W,L=>{r()?L(ne):L(ke,!1)})}var ge=T(V,2);{var Re=L=>{ct(ys(L,{get htmlString(){return i()},onadd:N=>N.forEach(Q=>n().push(Q))}),N=>j(p,G(N)),()=>u(p))};H(ge,L=>{!r()&&a()&&L(Re)})}var Te=T(ge,2);{var X=L=>{var N=As(),Q=ee(N);{var me=ce=>{var de=Es(),qe=S(de);Dn(qe,{children:(mt,Hs)=>{var er=Ke("Something went wrong, check your links below.");k(mt,er)},$$slots:{default:!0}}),De(7,de,()=>Ht,()=>({duration:150})),k(ce,de)};H(Q,ce=>{u(m)&&ce(me)})}var be=T(Q,2);Qe(be,21,()=>u(P),ce=>ce.key,(ce,de)=>{const qe=Y(()=>n().findIndex(mt=>mt.key===u(de).key));qo(ce,{onremove:()=>M(u(de).key),onhighlight:A,get linkInjection(){return n()[u(qe)]},set linkInjection(mt){n(n()[u(qe)]=mt,!0)}})},ce=>{var de=Ts();k(ce,de)});var We=T(be,2);{var Ie=ce=>{var de=Is();de.__click=[ws,v,m,n,i,_,y];var qe=S(de);F(()=>{de.disabled=u(v),$(qe,u(v)?"Saving...":"Save links")}),De(1,de,()=>zi,()=>({duration:100})),k(ce,de)};H(We,ce=>{u(w)&&n().length&&ce(Ie)})}k(L,N)};H(Te,L=>{r()||L(X)})}var te=T(Te,2);{var le=L=>{var N=Cs(),Q=S(N);ss(Q,{get htmlString(){return i()},onclose:()=>j(s,!1),onsave:me=>n().push(me)}),F(()=>$t(N,"top",`${u(g)??""}px`)),De(3,N,()=>Zt,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(L,N)};H(te,L=>{u(s)&&L(le)})}return ct(R,L=>j(c,L),()=>u(c)),F(()=>{oe(R,"panel-open",u(s)),oe(R,"loading",r())}),se("scroll",R,C),k(e,R),ae({requestNewAIInjections:D})}ue(["click"]);var Ls=Ee('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function Ms(e){var t=Ls();k(e,t)}var Ds=I('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function Ns(e,t){var n=Ds(),i=S(n);i.__click=function(...o){var c;(c=t.onclick)==null||c.apply(this,o)};var r=S(i);Ms(r);var a=T(i,2);a.__click=function(...o){var c;(c=t.onclose)==null||c.apply(this,o)};var l=S(a);Qi(l),k(e,n)}ue(["click"]);var Os=I('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!> <!></div>');function Rs(e,t){re(t,!0);const n=Cn(),i=Rl(n),r=i.map(D=>D.outerHTML).join("");let a=U(null),l=U(null),o=U(G(Vi())),c=U(!!Sn()),d=U(!1),f=U(!0),s=U(G([])),v=U(void 0);const m=Y(()=>u(a)||{}),g=Y(()=>Nn(u(m).ai_injections,()=>[],!0)),_=Y(()=>Nn(u(m).link_injections,()=>[],!0));Ut(()=>{u(o)&&y()}),nt(()=>{if(!io())return Ae(xe.ArticlePageView),p(),()=>dn()});async function p(){var V;j(f,!0),u(o)&&j(d,G(await Bi()));const D=Zi();try{const O=await no();if(!u(o)&&(O!=null&&O.exclude_urls_pattern)&&D.match(O.exclude_urls_pattern))return}catch(O){Ae(xe.FetchingConfigFailed),console.error("TPI Config failed to fetch",O);return}if(j(a,G(await $n(D,r,{maxTries:1}))),w({aiInjections:u(g),manualInjections:u(_)}),j(f,!1),!((V=u(a))!=null&&V.ai_running)||!u(o))return;const R=await $n(D,r,{requireCompletedResult:!0});u(v).requestNewAIInjections((R==null?void 0:R.ai_injections)||[])}function y(){dn(),w(Yl(u(s)))}function w(D={aiInjections:u(g),manualInjections:u(_)}){const R=Hl(i,x,D);JSON.stringify(R)!==JSON.stringify(u(s))&&j(s,G(R));const V=R.filter(O=>!O.failed);V.length&&(u(o)||Ae(xe.ArticleInjected,null,{manual:V.filter(O=>O.manual).length,ai:V.filter(O=>!O.manual).length}))}function x(D){j(l,G(D))}var P=Os(),E=S(P);{var b=D=>{Ns(D,{onclick:()=>{j(o,!0),p()},onclose:()=>{j(c,!1),Ha()}})};H(E,D=>{u(c)&&!u(o)&&D(b)})}var M=T(E,2);{var A=D=>{var R=Y(()=>{var V,O;return((V=u(a))==null?void 0:V.ai_running)&&((O=u(a))==null?void 0:O.automation_enabled)});ct(js(D,{htmlString:r,get loading(){return u(f)},get aiRunning(){return u(R)},get linkInjections(){return u(s)},set linkInjections(V){j(s,G(V))}}),V=>j(v,G(V)),()=>u(v))};H(M,D=>{u(o)&&u(d)&&D(A)})}var C=T(M,2);{var q=D=>{so(D,{get title(){return u(l).title_details},onclose:()=>j(l,null)})};H(C,D=>{u(l)&&u(l).title_details&&D(q)})}k(e,P),ae()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,app:null,initialize(e={token:"",selector:"",after_article_selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=bn(Rs,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),dn()}};
2
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-qkpa3e{--offset: 8px;position:absolute;top:calc((var(--offset) - 1px) * -1);left:0;width:calc(100vw - 32px);max-width:320px;padding:var(--offset) 0;transform:translateY(calc(-100% + var(--offset)));z-index:2147483647}.popover.svelte-qkpa3e svg{fill:none}.popover.flip.svelte-qkpa3e{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-qkpa3e{cursor:default;position:relative;border-radius:var(--playpilot-popover-border-radius, 16px);background:var(--playpilot-popover-background, var(--playpilot-light));box-shadow:var(--playpilot-popover-shadow, var(--playpilot-shadow-large));max-height:min(var(--max-height),560px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden}.genre.svelte-13nhocm{display:flex;flex-wrap:wrap;background:var(--playpilot-genre-background, var(--playpilot-content));border:0;border-radius:var(--playpilot-genre-border-radius, 16px);padding:4px 8px;font-family:var(--playpilot-genre-font-family, inherit);font-weight:var(--playpilot-playlink-font-weight, inherit);text-transform:var(--playpilot-genre-text-transform, none);color:var(--playpilot-genre-text-color, var(--playpilot-text-color-alt));line-height:1;font-size:inherit}.genre.svelte-13nhocm:is(button:where(.svelte-13nhocm)):hover{cursor:pointer;filter:var(--playpilot-genre-hover-filter, brightness(1.1));background:var(--playpilot-genre-hover-background, var(--playpilot-genre-background, var(--playpilot-content)))}img.svelte-1itidbd{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1itidbd{height:40px;width:40px}}.heading.svelte-1itidbd{margin:0;color:var(--playpilot-playlinks-title-color, var(--playpilot-text-color-alt));font-family:var(--playpilot-playlinks-title-font-family, inherit);font-weight:var(--playpilot-playlinks-title-font-weight, lighter);font-size:var(--playpilot-playlinks-title-font-size, 14px);line-height:normal}.playlinks.svelte-1itidbd{box-sizing:border-box;display:flex;gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px;overflow:auto;scrollbar-width:none}.playlinks.svelte-1itidbd::-webkit-scrollbar{display:none}.list.svelte-1itidbd{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1itidbd img:where(.svelte-1itidbd){height:32px;width:32px}}.playlink.svelte-1itidbd{display:flex;align-items:center;gap:12px;padding:12px;background:var(--playpilot-playlink-background, var(--playpilot-lighter));box-shadow:var(--playpilot-playlink-shadow, var(--playpilot-shadow));border-radius:var(--playpilot-playlink-border-radius, 8px);color:var(--playpilot-playlink-text-color, var(--playpilot-text-color-alt))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal);text-decoration:none!important;white-space:nowrap;font-size:12px;line-height:1}.playlink.svelte-1itidbd:hover,.playlink.svelte-1itidbd:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)))!important;text-decoration:none!important}.playlink.svelte-1itidbd img:where(.svelte-1itidbd){margin:0}.list.svelte-1itidbd .playlink:where(.svelte-1itidbd){padding:8px;gap:8px}.name.svelte-1itidbd{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1itidbd{margin-top:8px;font-size:10px;color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.empty.svelte-1itidbd{white-space:initial;line-height:1.35}.arrow.svelte-1itidbd{margin-left:auto;padding:0 8px}.paragraph.svelte-1u3je71{display:block;margin:16px 0 0}.show-more.svelte-1u3je71{display:inline;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;background:transparent;border:0;color:var(--playpilot-read-more-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-read-more-font-weight, inherit);font-family:inherit;font-size:inherit}.show-more.svelte-1u3je71:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}h2.svelte-15oguej{margin:24px 0 16px;font-size:var(--playpilot-cast-title-font-size, 18px);line-height:normal;font-weight:inherit;color:var(--playpilot-cast-title-text-color, var(--playpilot-text-color))}.participants.svelte-15oguej{display:flex;gap:16px;width:calc(100% + 32px);padding:0 16px;margin:0 -16px;overflow:auto;white-space:nowrap;scrollbar-width:none}.participants.svelte-15oguej::-webkit-scrollbar{display:none}.character.svelte-15oguej{color:var(--playpilot-cast-character-text-color, var(--playpilot-text-color-alt));font-style:italic}.heading.svelte-16h1v3j{margin:8px 0;color:var(--playpilot-detail-title-text-color, #fff);font-family:var(--playpilot-detail-title-font-family, inherit);font-weight:var(--playpilot-detail-title-font-weight, lighter);font-size:var(--playpilot-detail-title-font-size, 24px);line-height:normal;font-style:var(--playpilot-detail-title-font-style, normal)}.small.svelte-16h1v3j .heading:where(.svelte-16h1v3j){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-16h1v3j .heading:where(.svelte-16h1v3j){margin-top:0}.content.svelte-16h1v3j{z-index:1;position:relative;padding:16px;color:var(--playpilot-detail-text-color, var(--playpilot-text-color));font-family:var(--playpilot-detail-font-family, var(--playpilot-font-family));font-weight:var(--playpilot-detail-font-weight, normal);font-size:var(--playpilot-detail-font-size, 14px);line-height:normal;font-style:normal}.content.small.svelte-16h1v3j{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-16h1v3j{padding:32px 0 16px;background:transparent}.small.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding-top:16px}.compact.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding:0 0 16px}.top.svelte-16h1v3j{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-16h1v3j{display:block;width:72px;margin:0;aspect-ratio:2/3;border-radius:var(--playpilot-detail-image-border-radius, 8px);background:var(--playpilot-detail-image-background, var(--playpilot-content));box-shadow:var(--playpilot-detail-image-shadow, var(--playpilot-shadow));opacity:0}.poster.loaded.svelte-16h1v3j{opacity:1}.info.svelte-16h1v3j{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-16h1v3j .info:where(.svelte-16h1v3j){gap:8px 12px}.imdb.svelte-16h1v3j{display:flex;align-items:center;gap:4px}.imdb.svelte-16h1v3j svg{margin-top:-2px}.small.svelte-16h1v3j .imdb:where(.svelte-16h1v3j) svg{margin-top:0;width:12px;height:12px}.background.svelte-16h1v3j{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter));z-index:0}.background.svelte-16h1v3j:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%);z-index:1}.background.svelte-16h1v3j img:where(.svelte-16h1v3j){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-16h1v3j img.loaded:where(.svelte-16h1v3j){opacity:1}.background.svelte-16h1v3j img.blur:where(.svelte-16h1v3j){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-16h1v3j{opacity:.15}.capitalize.svelte-16h1v3j{text-transform:capitalize}.truncate.svelte-16h1v3j{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}p.svelte-pfvkex{font-weight:var(--playpilot-after-article-text-font-weight, normal)}span.svelte-pfvkex{display:block}button.svelte-pfvkex{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-pfvkex:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1qqv88o{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:var(--playpilot-button-padding, 0);background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1qqv88o:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-wrncjp{z-index:2147483647;position:fixed;display:flex;justify-content:center;align-items:flex-start;top:0;left:0;width:100%;height:100%;background:var(--playpilot-detail-backdrop, rgba(0, 0, 0, .65))}@media (min-width: 600px){.modal.svelte-wrncjp{padding:32px}}.modal.svelte-wrncjp svg{fill:none}.dialog.svelte-wrncjp{position:relative;width:100%;max-width:600px;max-height:80vh;overflow:auto;margin-top:auto;border-radius:var(--playpilot-detail-border-radius, 16px 16px 0 0);background:var(--playpilot-detail-background, var(--playpilot-light))}@media (min-width: 600px){.dialog.svelte-wrncjp{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-wrncjp{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-wrncjp{--playpilot-button-background: var(--playpilot-modal-close-button-background, var(--playpilot-content));--playpilot-button-shadow: var(--playpilot-modal-close-button-shadow, var(--playpilot-shadow));--playpilot-button-padding: var(--playpilot-modal-close-button-padding, .5rem);--playpilot-button-text-color: var(--playpilot-modal-close-button-text-color, var(--playpilot-text-color-alt));z-index:5;position:absolute;top:16px;right:16px}.close.svelte-wrncjp:hover{filter:brightness(1.1)}svg.svelte-by11ix{transition:transform .1s}.expanded.svelte-by11ix{transform:rotate(180deg)}.switch.svelte-91s87b{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;border:0;padding:0;background:transparent;cursor:pointer}.fullwidth.svelte-91s87b{width:100%;justify-content:space-between}.label.svelte-91s87b{display:flex;align-items:center;gap:8px;margin-right:8px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color-alt);font-size:12px}.switch.svelte-91s87b:hover .label:where(.svelte-91s87b){color:var(--playpilot-text-color)}.track.svelte-91s87b{position:relative;width:32px;height:20px;border-radius:16px;background:var(--playpilot-content);transition:background-color .1s}.active.svelte-91s87b .track:where(.svelte-91s87b){background:var(--playpilot-green)}.knob.svelte-91s87b{position:absolute;top:2px;left:2px;height:16px;width:16px;border-radius:50%;background:#fff;transition:left .1s}.active.svelte-91s87b .knob:where(.svelte-91s87b){left:14px}input.svelte-1vrer3i{width:100%;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}input.svelte-1vrer3i:focus{background:var(--playpilot-lighter);outline:1px solid white}input.svelte-1vrer3i::placeholder{color:var(--playpilot-text-color-alt);opacity:.75}.alert.svelte-18si0a5{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}.alert.warning.svelte-18si0a5{border-color:var(--playpilot-warning);background:var(--playpilot-warning-dark)}.alert.svelte-18si0a5 a{color:currentColor}.switches.svelte-1shw34x{display:flex;flex-direction:column;gap:12px}button.svelte-1shw34x{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:32px;padding:8px;background:transparent;font-family:var(--playpilot-font-family);font-size:10.4px;color:var(--playpilot-text-color-alt);cursor:pointer}button.svelte-1shw34x:hover,button.active.svelte-1shw34x{color:var(--playpilot-text-color)}.group.svelte-1shw34x{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:4px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}.active-marker.svelte-1shw34x{z-index:0;position:absolute;width:calc(50% - 8px);height:calc(100% - 8px);left:4px;top:4px;border-radius:32px;background:var(--playpilot-content);transition:left .1s}.right.svelte-1shw34x{left:calc(50% + 4px)}.label.svelte-1shw34x{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1shw34x{margin-top:8px}button.svelte-1fmy0wh{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-1fmy0wh:hover{cursor:pointer;color:#fff}.context-menu.svelte-1fmy0wh{position:relative}.content.svelte-1fmy0wh{z-index:1;position:absolute;top:100%;right:0;max-height:80px;max-width:160px;border-radius:8px;background:var(--playpilot-lighter)}.item.svelte-8gd2db{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-8gd2db:hover,.item.highlighted.svelte-8gd2db{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-8gd2db{outline:2px solid var(--playpilot-primary)}.header.svelte-8gd2db{display:flex;gap:16px;width:100%}.poster.svelte-8gd2db{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-8gd2db .poster:where(.svelte-8gd2db){opacity:.35}.title.svelte-8gd2db{font-size:14px;word-break:break-word}.sentence.svelte-8gd2db{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-8gd2db em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-8gd2db{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;margin:0;background:transparent;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;font-style:italic;text-decoration:underline}.expand-sentence.svelte-8gd2db:hover{color:var(--playpilot-text-color)}.content.svelte-8gd2db{padding-top:8px}.inactive.svelte-8gd2db .info:where(.svelte-8gd2db){opacity:.35}.context-menu.svelte-8gd2db{margin:0 -4px 0 auto}.context-menu-action.svelte-8gd2db{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:16px;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-8gd2db:hover{color:var(--playpilot-text-color)}.actions.svelte-8gd2db{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-8gd2db{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:50%;background:var(--playpilot-content);color:var(--playpilot-text-color);box-shadow:var(--playpilot-shadow);cursor:pointer}.expand.svelte-8gd2db:hover{filter:brightness(1.2)}.expanded.svelte-8gd2db{padding-top:16px}.type-select.svelte-8gd2db{margin-top:8px}.label.svelte-8gd2db{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-8gd2db{margin-top:12px}.warning.svelte-8gd2db{margin:0 auto 0 8px}.warning.svelte-8gd2db svg{display:block}.drag-handle.svelte-19mcc5g{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:8px;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-19mcc5g:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-19mcc5g:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-19mcc5g:active{cursor:grabbing}.drag-handle.svelte-19mcc5g:before{display:block;content:"";position:absolute;top:20%;right:0;bottom:60%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.resize-handle.svelte-sxkuxk{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:0;width:100%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-sxkuxk:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-sxkuxk:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-sxkuxk:active{cursor:grabbing}.resize-handle.svelte-sxkuxk:before{display:block;content:"";position:absolute;top:0;right:20%;left:20%;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-rjq94e{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left;font-size:13.6px}.item.hoverable.svelte-rjq94e{cursor:pointer}.item.hoverable.svelte-rjq94e:hover{background:var(--playpilot-lighter)}.item.svelte-rjq94e:last-child{border-bottom:0}.poster.svelte-rjq94e{flex:0 0 auto;height:auto;width:28px;aspect-ratio:28/42;border-radius:4px;background:var(--playpilot-content)}.name.svelte-rjq94e{color:var(--playpilot-text-color)}.meta.svelte-rjq94e{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-rjq94e{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-rjq94e{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-rjq94e:hover{color:vaR(--playpilot-text-color)}.search.svelte-1olb8n0{position:relative}.results.svelte-1olb8n0{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.empty.svelte-1olb8n0{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.selected.svelte-1olb8n0{margin:8px 0;border-radius:.5rem;border:2px solid var(--playpilot-green)}p.svelte-1i8p6op,label.svelte-1i8p6op{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-1i8p6op{display:block;margin-top:16px}.layout.svelte-1i8p6op{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-1i8p6op{display:flex;align-items:center;gap:8px;margin-bottom:16px}.heading.svelte-1i8p6op{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}.error.svelte-1i8p6op{margin-top:8px}.save.svelte-1i8p6op{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-green);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color)}.save.svelte-1i8p6op:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-1i8p6op{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}a.svelte-1l4sxuh{color:currentColor}.ai-indicator.svelte-1l4sxuh{position:relative;margin:0 8px}.content.svelte-1l4sxuh{position:relative;display:flex;gap:8px;background:var(--playpilot-light);padding:8px;margin:2px;border-radius:.5rem;font-size:12px;line-height:1.5;z-index:1;color:var(--playpilot-text-color-alt);overflow:hidden}.message.svelte-1l4sxuh{display:flex;margin-top:4px;font-style:italic}.icon.svelte-1l4sxuh{color:var(--playpilot-green)}.border.svelte-1l4sxuh{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.5rem;background:var(--playpilot-green);overflow:hidden;transition:background-color .5s}.running.svelte-1l4sxuh .border:where(.svelte-1l4sxuh){background:var(--playpilot-light)}@keyframes svelte-1l4sxuh-rotate{to{rotate:360deg}}.animator.svelte-1l4sxuh{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-1l4sxuh-rotate 2s infinite linear;filter:blur(5rem)}.loading-bar.svelte-1l4sxuh{display:grid;grid-template-columns:auto 3em;align-items:center}.loading-bar-progress.svelte-1l4sxuh{height:.5em;border-radius:.25rem;background:var(--playpilot-dark)}.loading-bar-fill.svelte-1l4sxuh{height:100%;border-radius:.25rem;background:var(--playpilot-green);transition:width .2s}.loading-bar-label.svelte-1l4sxuh{text-align:right}@keyframes svelte-1l4sxuh-fade{0%,to{opacity:0}25%,75%{opacity:1}}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh){animation:svelte-1l4sxuh-fade 2s infinite}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(1){animation-delay:.2s}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(2){animation-delay:.4s}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(3){animation-delay:.6s}.editor.svelte-1b2vpoj{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(70vh,640px);min-height:10rem;margin:0;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.editor.svelte-1b2vpoj svg{fill:none}.panel-open.svelte-1b2vpoj{overflow:hidden}.loading.svelte-1b2vpoj{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handles.svelte-1b2vpoj,.header.svelte-1b2vpoj{z-index:20;position:sticky;top:-16px;margin:-16px -16px 0}.handle.svelte-1b2vpoj{opacity:0;transition:opacity .15s}.editor.svelte-1b2vpoj:hover .handle:where(.svelte-1b2vpoj){opacity:1}.header.svelte-1b2vpoj{z-index:5;display:flex;align-items:center;padding:16px 16px 16px 24px;margin:0 -16px;border:0;background:var(--playpilot-dark)}.loading.svelte-1b2vpoj .header:where(.svelte-1b2vpoj){margin:-16px}.heading.svelte-1b2vpoj{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.bubble.svelte-1b2vpoj{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;border:0;padding:0;margin-right:auto;border-radius:50%;background:var(--playpilot-green);line-height:24px;text-align:center;font-size:13.6px}.items.svelte-1b2vpoj{padding-top:8px;margin-bottom:auto}.empty.svelte-1b2vpoj{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1b2vpoj{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);font-size:.85rem;cursor:pointer}.save.svelte-1b2vpoj:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1b2vpoj{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1b2vpoj{margin-top:8px}.alert.svelte-1b2vpoj{margin:0 8px 8px}.panel.svelte-1b2vpoj{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}.trigger.svelte-qee95d{position:fixed;bottom:16px;right:16px}.button.svelte-qee95d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;border:0;padding:12px;border-radius:50%;background:var(--playpilot-light);box-shadow:var(--playpilot-shadow-large);transition:transform 50ms;line-height:24px;text-align:center;font-size:13.6px}.button.svelte-qee95d:hover{filter:brightness(1.1);transform:scale(1.05)}.button.svelte-qee95d svg{width:100%}.close.svelte-qee95d{display:flex;text-align:center;justify-content:center;position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:4px;background:var(--playpilot-content);color:#fff}.close.svelte-qee95d svg{width:12px}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533;--playpilot-warning: #f7c74e;--playpilot-warning-dark: #413c23}[data-playpilot-injection-key]{position:relative}.playpilot-injection-highlight{outline:4px solid var(--playpilot-primary)!important;outline-offset:8px!important;border-radius:.8px;scroll-margin:80px}.playpilot-styled-scrollbar{scrollbar-color:var(--playpilot-content-light) var(--playpilot-lighter);scrollbar-width:thin}.playpilot-styled-scrollbed::-webkit-scrollbar{width:12px}.playpilot-styled-scrollbed::-webkit-scrollbar-track{background:var(--playpilot-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb{border:2px solid var(--playpilot-light);border-radius:16px;background:var(--playpilot-lighter)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:hover{background:var(--playpilot-content-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:active{background:var(--playpilot-text-color-alt)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight]{font-weight:var(--playpilot-injection-font-weight)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color]{color:var(--playpilot-injection-text-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color-hover]:hover{color:var(--playpilot-injection-text-color-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration]{text-decoration:var(--playpilot-injection-text-decoration)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration-hover]:hover{text-decoration:var(--playpilot-injection-text-decoration-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color]{background-color:var(--playpilot-injection-background-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color-hover]:hover{background-color:var(--playpilot-injection-background-color-hover)}.playpilot-link-injections.svelte-4l9ehd *{box-sizing:border-box}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
3
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const yn=!1;var jn=Array.isArray,Tr=Array.prototype.indexOf,Nn=Array.from,Ar=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,mi=Object.getOwnPropertyDescriptors,Ir=Object.prototype,Cr=Array.prototype,Ln=Object.getPrototypeOf;function _t(e){return typeof e=="function"}const Ne=()=>{};function Pr(e){for(var t=0;t<e.length;t++)e[t]()}function Yt(e,t,n=!1){return e===void 0?n?t():t:e}const Le=2,pi=4,Lt=8,Xt=16,De=32,Mt=64,wn=128,lt=256,$t=512,we=1024,et=2048,Qt=4096,Re=8192,wt=16384,yi=32768,kt=65536,jr=1<<17,Nr=1<<19,wi=1<<20,Xe=Symbol("$state"),ki=Symbol("legacy props"),Lr=Symbol("");function bi(e){return e===this.v}function en(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Mr(e,t){return e!==t}function Mn(e){return!en(e,this.v)}function Dr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Or(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Rr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Hr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Fr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function qr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Br(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Vr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ur(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let bt=!1,Wr=!1;function Kr(){bt=!0}const Dn=1,On=2,xi=4,zr=8,Yr=16,$r=1,Zr=2,Gr=4,Jr=8,Xr=16,Qr=1,ea=2,ta=4,na=1,ia=2,ve=Symbol(),Si="http://www.w3.org/2000/svg";function pe(e,t){var n={f:0,v:e,reactions:null,equals:bi,rv:0,wv:0};return n}function z(e){return ra(pe(e))}function Ei(e,t=!1){var i;const n=pe(e);return t||(n.equals=Mn),bt&&Q!==null&&Q.l!==null&&((i=Q.l).s??(i.s=[])).push(n),n}function ra(e){return J!==null&&J.f&Le&&(He===null?ga([e]):He.push(e)),e}function N(e,t){return J!==null&&Ht()&&J.f&(Le|Xt)&&(He===null||!He.includes(e))&&Ur(),kn(e,t)}function kn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Ui(),Ti(e,et),Ht()&&K!==null&&K.f&we&&!(K.f&De)&&(de!==null&&de.includes(e)?(qe(K,et),on(K)):Qe===null?ma([e]):Qe.push(e))),t}function Ti(e,t){var n=e.reactions;if(n!==null)for(var i=Ht(),r=n.length,a=0;a<r;a++){var o=n[a],l=o.f;l&et||!i&&o===K||(qe(o,t),l&(we|lt)&&(l&Le?Ti(o,Qt):on(o)))}}let Ai=!1;function Z(e,t=null,n){if(typeof e!="object"||e===null||Xe in e)return e;const i=Ln(e);if(i!==Ir&&i!==Cr)return e;var r=new Map,a=jn(e),o=pe(0);a&&r.set("length",pe(e.length));var l;return new Proxy(e,{defineProperty(d,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&qr();var c=r.get(u);return c===void 0?(c=pe(f.value),r.set(u,c)):N(c,Z(f.value,l)),!0},deleteProperty(d,u){var f=r.get(u);if(f===void 0)u in d&&r.set(u,pe(ve));else{if(a&&typeof u=="string"){var c=r.get("length"),h=Number(u);Number.isInteger(h)&&h<c.v&&N(c,h)}N(f,ve),Xn(o)}return!0},get(d,u,f){var m;if(u===Xe)return e;var c=r.get(u),h=u in d;if(c===void 0&&(!h||(m=Je(d,u))!=null&&m.writable)&&(c=pe(Z(h?d[u]:ve,l)),r.set(u,c)),c!==void 0){var g=s(c);return g===ve?void 0:g}return Reflect.get(d,u,f)},getOwnPropertyDescriptor(d,u){var f=Reflect.getOwnPropertyDescriptor(d,u);if(f&&"value"in f){var c=r.get(u);c&&(f.value=s(c))}else if(f===void 0){var h=r.get(u),g=h==null?void 0:h.v;if(h!==void 0&&g!==ve)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return f},has(d,u){var g;if(u===Xe)return!0;var f=r.get(u),c=f!==void 0&&f.v!==ve||Reflect.has(d,u);if(f!==void 0||K!==null&&(!c||(g=Je(d,u))!=null&&g.writable)){f===void 0&&(f=pe(c?Z(d[u],l):ve),r.set(u,f));var h=s(f);if(h===ve)return!1}return c},set(d,u,f,c){var S;var h=r.get(u),g=u in d;if(a&&u==="length")for(var m=f;m<h.v;m+=1){var v=r.get(m+"");v!==void 0?N(v,ve):m in d&&(v=pe(ve),r.set(m+"",v))}h===void 0?(!g||(S=Je(d,u))!=null&&S.writable)&&(h=pe(void 0),N(h,Z(f,l)),r.set(u,h)):(g=h.v!==ve,N(h,Z(f,l)));var p=Reflect.getOwnPropertyDescriptor(d,u);if(p!=null&&p.set&&p.set.call(c,f),!g){if(a&&typeof u=="string"){var y=r.get("length"),w=Number(u);Number.isInteger(w)&&w>=y.v&&N(y,w+1)}Xn(o)}return!0},ownKeys(d){s(o);var u=Reflect.ownKeys(d).filter(h=>{var g=r.get(h);return g===void 0||g.v!==ve});for(var[f,c]of r)c.v!==ve&&!(f in d)&&u.push(f);return u},setPrototypeOf(){Br()}})}function Xn(e,t=1){N(e,e.v+t)}var fe,Ii,Ci;function aa(){if(fe===void 0){fe=window;var e=Element.prototype,t=Node.prototype;Ii=Je(t,"firstChild").get,Ci=Je(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Dt(e=""){return document.createTextNode(e)}function at(e){return Ii.call(e)}function tn(e){return Ci.call(e)}function b(e,t){return at(e)}function te(e,t){{var n=at(e);return n instanceof Comment&&n.data===""?tn(n):n}}function T(e,t=1,n=!1){let i=e;for(;t--;)i=tn(i);return i}function oa(e){e.textContent=""}function W(e){var t=Le|et;K===null?t|=lt:K.f|=wi;var n=J!==null&&J.f&Le?J:null;const i={children:null,ctx:Q,deps:null,equals:bi,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??K};return n!==null&&(n.children??(n.children=[])).push(i),i}function la(e){const t=W(e);return t.equals=Mn,t}function Pi(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&Le?Rn(i):Me(i)}}}function sa(e){for(var t=e.parent;t!==null;){if(!(t.f&Le))return t;t=t.parent}return null}function ji(e){var t,n=K;Ie(sa(e));try{Pi(e),t=Wi(e)}finally{Ie(n)}return t}function Ni(e){var t=ji(e),n=(rt||e.f&lt)&&e.deps!==null?Qt:we;qe(e,n),e.equals(t)||(e.v=t,e.wv=Ui())}function Rn(e){Pi(e),Pt(e,0),qe(e,wt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function ca(e){K===null&&J===null&&Rr(),J!==null&&J.f&lt&&Or(),qn&&Dr()}function ua(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function xt(e,t,n,i=!0){var r=(e&Mt)!==0,a=K,o={ctx:Q,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|et,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=ht;try{Qn(!0),an(o),o.f|=yi}catch(f){throw Me(o),f}finally{Qn(l)}}else t!==null&&on(o);var d=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&wi)===0;if(!d&&!r&&i&&(a!==null&&ua(o,a),J!==null&&J.f&Le)){var u=J;(u.children??(u.children=[])).push(o)}return o}function da(e){const t=xt(Lt,null,!1);return qe(t,we),t.teardown=e,t}function nn(e){ca();var t=K!==null&&(K.f&De)!==0&&Q!==null&&!Q.m;if(t){var n=Q;(n.e??(n.e=[])).push({fn:e,effect:K,reaction:J})}else{var i=Ot(e);return i}}function fa(e){const t=xt(Mt,e,!0);return(n={})=>new Promise(i=>{n.outro?mt(t,()=>{Me(t),i(void 0)}):(Me(t),i(void 0))})}function Ot(e){return xt(pi,e,!1)}function Hn(e){return xt(Lt,e,!0)}function R(e){return st(e)}function st(e,t=0){return xt(Lt|Xt|t,e,!0)}function Ke(e,t=!0){return xt(Lt|De,e,!0,t)}function Li(e){var t=e.teardown;if(t!==null){const n=qn,i=J;ei(!0),Fe(null);try{t.call(null)}finally{ei(n),Fe(i)}}}function Mi(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)Rn(t[n])}}function Di(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;Me(n,t),n=i}}function va(e){for(var t=e.first;t!==null;){var n=t.next;t.f&De||Me(t),t=n}}function Me(e,t=!0){var n=!1;if((t||e.f&Nr)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:tn(i);i.remove(),i=a}n=!0}Di(e,t&&!n),Mi(e),Pt(e,0),qe(e,wt);var o=e.transitions;if(o!==null)for(const d of o)d.stop();Li(e);var l=e.parent;l!==null&&l.first!==null&&Oi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Oi(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function mt(e,t){var n=[];Fn(e,n,!0),Ri(n,()=>{Me(e),t&&t()})}function Ri(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function Fn(e,t,n){if(!(e.f&Re)){if(e.f^=Re,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&kt)!==0||(i.f&De)!==0;Fn(i,t,a?n:!1),i=r}}}function At(e){Hi(e,!0)}function Hi(e,t){if(e.f&Re){Ft(e)&&an(e),e.f^=Re;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&kt)!==0||(n.f&De)!==0;Hi(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Zt=!1,bn=[];function Fi(){Zt=!1;const e=bn.slice();bn=[],Pr(e)}function Rt(e){Zt||(Zt=!0,queueMicrotask(Fi)),bn.push(e)}function _a(){Zt&&Fi()}function qi(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const Bi=0,ha=1;let Wt=!1,Kt=Bi,It=!1,Ct=null,ht=!1,qn=!1;function Qn(e){ht=e}function ei(e){qn=e}let it=[],gt=0;let J=null;function Fe(e){J=e}let K=null;function Ie(e){K=e}let He=null;function ga(e){He=e}let de=null,me=0,Qe=null;function ma(e){Qe=e}let Vi=1,xn=0,rt=!1,Q=null;function Ui(){return++Vi}function Ht(){return!bt||Q!==null&&Q.l===null}function Ft(e){var u;var t=e.f;if(t&et)return!0;if(t&Qt){var n=e.deps,i=(t&lt)!==0;if(n!==null){var r,a,o=(t&$t)!==0,l=i&&K!==null&&!rt,d=n.length;if(o||l){for(r=0;r<d;r++)a=n[r],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=$t)}for(r=0;r<d;r++)if(a=n[r],Ft(a)&&Ni(a),a.wv>e.wv)return!0}(!i||K!==null&&!rt)&&qe(e,we)}return!1}function pa(e,t){for(var n=t;n!==null;){if(n.f&wn)try{n.fn(e);return}catch{n.f^=wn}n=n.parent}throw Wt=!1,e}function ya(e){return(e.f&wt)===0&&(e.parent===null||(e.parent.f&wn)===0)}function rn(e,t,n,i){if(Wt){if(n===null&&(Wt=!1),ya(t))throw e;return}n!==null&&(Wt=!0);{pa(e,t);return}}function Wi(e){var h;var t=de,n=me,i=Qe,r=J,a=rt,o=He,l=Q,d=e.f;de=null,me=0,Qe=null,J=d&(De|Mt)?null:e,rt=!ht&&(d&lt)!==0,He=null,Q=e.ctx,xn++;try{var u=(0,e.fn)(),f=e.deps;if(de!==null){var c;if(Pt(e,me),f!==null&&me>0)for(f.length=me+de.length,c=0;c<de.length;c++)f[me+c]=de[c];else e.deps=f=de;if(!rt)for(c=me;c<f.length;c++)((h=f[c]).reactions??(h.reactions=[])).push(e)}else f!==null&&me<f.length&&(Pt(e,me),f.length=me);return u}finally{de=t,me=n,Qe=i,J=r,rt=a,He=o,Q=l}}function wa(e,t){let n=t.reactions;if(n!==null){var i=Tr.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&Le&&(de===null||!de.includes(t))&&(qe(t,Qt),t.f&(lt|$t)||(t.f^=$t),Pt(t,0))}function Pt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)wa(e,n[i])}function an(e){var t=e.f;if(!(t&wt)){qe(e,we);var n=K,i=Q;K=e;try{t&Xt?va(e):Di(e),Mi(e),Li(e);var r=Wi(e);e.teardown=typeof r=="function"?r:null,e.wv=Vi;var a=e.deps,o;yn&&Wr&&e.f&et}catch(l){rn(l,e,n,i||e.ctx)}finally{K=n}}}function Ki(){if(gt>1e3){gt=0;try{Hr()}catch(e){if(Ct!==null)rn(e,Ct,null);else throw e}}gt++}function zi(e){var t=e.length;if(t!==0){Ki();var n=ht;ht=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&we||(r.f^=we);var a=[];Yi(r,a),ka(a)}}finally{ht=n}}}function ka(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(wt|Re)))try{Ft(i)&&(an(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Oi(i):i.fn=null))}catch(r){rn(r,i,null,i.ctx)}}}function ba(){if(It=!1,gt>1001)return;const e=it;it=[],zi(e),It||(gt=0,Ct=null)}function on(e){Kt===Bi&&(It||(It=!0,queueMicrotask(ba))),Ct=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Mt|De)){if(!(n&we))return;t.f^=we}}it.push(t)}function Yi(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&De)!==0,o=a&&(r&we)!==0,l=n.next;if(!o&&!(r&Re))if(r&Lt){if(a)n.f^=we;else try{Ft(n)&&an(n)}catch(c){rn(c,n,null,n.ctx)}var d=n.first;if(d!==null){n=d;continue}}else r&pi&&i.push(n);if(l===null){let c=n.parent;for(;c!==null;){if(e===c)break e;var u=c.next;if(u!==null){n=u;continue e}c=c.parent}}n=l}for(var f=0;f<i.length;f++)d=i[f],t.push(d),Yi(d,t)}function $i(e){var t=Kt,n=it;try{Ki();const r=[];Kt=ha,it=r,It=!1,zi(n);var i=e==null?void 0:e();return _a(),(it.length>0||r.length>0)&&$i(),gt=0,Ct=null,i}finally{Kt=t,it=n}}async function ti(){await Promise.resolve(),$i()}function s(e){var f;var t=e.f,n=(t&Le)!==0;if(n&&t&wt){var i=ji(e);return Rn(e),i}if(J!==null){He!==null&&He.includes(e)&&Vr();var r=J.deps;e.rv<xn&&(e.rv=xn,de===null&&r!==null&&r[me]===e?me++:de===null?de=[e]:de.push(e),Qe!==null&&K!==null&&K.f&we&&!(K.f&De)&&Qe.includes(e)&&(qe(K,et),on(K)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Le){var d=o;l=d,o=d.parent}else{var u=o;(f=u.deriveds)!=null&&f.includes(l)||(u.deriveds??(u.deriveds=[])).push(l);break}return n&&(a=e,Ft(a)&&Ni(a)),e.v}function ze(e){const t=J;try{return J=null,e()}finally{J=t}}const xa=-7169;function qe(e,t){e.f=e.f&xa|t}function Sa(e){return Gi().get(e)}function Zi(e,t){return Gi().set(e,t),t}function Gi(e){return Q===null&&qi(),Q.c??(Q.c=new Map(Ea(Q)||void 0))}function Ea(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ae(e,t=!1,n){Q={p:Q,c:null,e:null,m:!1,s:e,x:null,l:null},bt&&!t&&(Q.l={s:null,u:null,r1:[],r2:pe(!1)})}function oe(e){const t=Q;if(t!==null){const o=t.e;if(o!==null){var n=K,i=J;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),Fe(a.reaction),Ot(a.fn)}}finally{Ie(n),Fe(i)}}Q=t.p,t.m=!0}return{}}function Ta(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Xe in e)Sn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Xe in n&&Sn(n)}}}function Sn(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Sn(e[i],t)}catch{}const n=Ln(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=mi(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function Aa(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Ia=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ca(e){return Ia.includes(e)}const Pa={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function ja(e){return e=e.toLowerCase(),Pa[e]??e}const Na=["touchstart","touchmove"];function La(e){return Na.includes(e)}function Ma(e,t){if(t){const n=document.body;e.autofocus=!0,Rt(()=>{document.activeElement===n&&e.focus()})}}let ni=!1;function Da(){ni||(ni=!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 Ji(e){var t=J,n=K;Fe(null),Ie(null);try{return e()}finally{Fe(t),Ie(n)}}function Oa(e,t,n,i=n){e.addEventListener(t,()=>Ji(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),Da()}const Xi=new Set,En=new Set;function Qi(e,t,n,i){function r(a){if(i.capture||Tt.call(t,a),!a.cancelBubble)return Ji(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Rt(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function re(e,t,n,i,r){var a={capture:i,passive:r},o=Qi(e,t,n,a);(t===document.body||t===window||t===document)&&da(()=>{t.removeEventListener(e,o,a)})}function ce(e){for(var t=0;t<e.length;t++)Xi.add(e[t]);for(var n of En)n(e)}function Tt(e){var w;var t=this,n=t.ownerDocument,i=e.type,r=((w=e.composedPath)==null?void 0:w.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var d=r.indexOf(l);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var u=r.indexOf(t);if(u===-1)return;d<=u&&(o=d)}if(a=r[o]||e.target,a!==t){Ar(e,"currentTarget",{configurable:!0,get(){return a||n}});var f=J,c=K;Fe(null),Ie(null);try{for(var h,g=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+i];if(v!==void 0&&!a.disabled)if(jn(v)){var[p,...y]=v;p.apply(a,[e,...y])}else v.call(a,e)}catch(S){h?g.push(S):h=S}if(e.cancelBubble||m===t||m===null)break;a=m}if(h){for(let S of g)queueMicrotask(()=>{throw S});throw h}}finally{e.__root=t,delete e.currentTarget,Fe(f),Ie(c)}}}function Bn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function ot(e,t){var n=K;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&na)!==0,i=(t&ia)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=Bn(a?e:"<!>"+e),n||(r=at(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=at(o),d=o.lastChild;ot(l,d)}else ot(o,o);return o}}function ke(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Bn(r),l=at(o);a=at(l)}var d=a.cloneNode(!0);return ot(d,d),d}}function Ye(e=""){{var t=Dt(e+"");return ot(t,t),t}}function tt(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Dt();return e.append(t,n),ot(t,n),e}function k(e,t){e!==null&&e.before(t)}let Gt=!0;function ii(e){Gt=e}function $(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 Vn(e,t){return Ra(e,t)}const ft=new Map;function Ra(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){aa();var l=new Set,d=c=>{for(var h=0;h<c.length;h++){var g=c[h];if(!l.has(g)){l.add(g);var m=La(g);t.addEventListener(g,Tt,{passive:m});var v=ft.get(g);v===void 0?(document.addEventListener(g,Tt,{passive:m}),ft.set(g,1)):ft.set(g,v+1)}}};d(Nn(Xi)),En.add(d);var u=void 0,f=fa(()=>{var c=n??t.appendChild(Dt());return Ke(()=>{if(a){ae({});var h=Q;h.c=a}r&&(i.$$events=r),Gt=o,u=e(c,i)||{},Gt=!0,a&&oe()}),()=>{var m;for(var h of l){t.removeEventListener(h,Tt);var g=ft.get(h);--g===0?(document.removeEventListener(h,Tt),ft.delete(h)):ft.set(h,g)}En.delete(d),c!==n&&((m=c.parentNode)==null||m.removeChild(c))}});return Tn.set(u,f),u}let Tn=new WeakMap;function er(e,t){const n=Tn.get(e);return n?(Tn.delete(e),n(t)):Promise.resolve()}function O(e,t,n=!1){var i=e,r=null,a=null,o=ve,l=n?kt:0,d=!1;const u=(c,h=!0)=>{d=!0,f(h,c)},f=(c,h)=>{o!==(o=c)&&(o?(r?At(r):h&&(r=Ke(()=>h(i))),a&&mt(a,()=>{a=null})):(a?At(a):h&&(a=Ke(()=>h(i))),r&&mt(r,()=>{r=null})))};st(()=>{d=!1,t(u),d||f(null,null)},l)}function tr(e,t,n){var i=e,r=ve,a,o=Ht()?Mr:en;st(()=>{o(r,r=t())&&(a&&mt(a),a=Ke(()=>n(i)))})}function pt(e,t){return t}function Ha(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)Fn(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var d=n.parentNode;oa(d),d.append(n),i.clear(),Ge(e,t[0].prev,t[a-1].next)}Ri(r,()=>{for(var u=0;u<a;u++){var f=t[u];l||(i.delete(f.k),Ge(e,f.prev,f.next)),Me(f.e,!l)}})}function nt(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},d=(t&xi)!==0;if(d){var u=e;o=u.appendChild(Dt())}var f=null,c=!1;st(()=>{var h=n(),g=jn(h)?h:h==null?[]:Nn(h),m=g.length;if(!(c&&m===0)){c=m===0;{var v=J;Fa(g,l,o,r,t,(v.f&Re)!==0,i)}a!==null&&(m===0?f?At(f):f=Ke(()=>a(o)):f!==null&&mt(f,()=>{f=null})),n()}})}function Fa(e,t,n,i,r,a,o,l){var V,Y,ee,se;var d=(r&zr)!==0,u=(r&(Dn|On))!==0,f=e.length,c=t.items,h=t.first,g=h,m,v=null,p,y=[],w=[],S,j,x,E;if(d)for(E=0;E<f;E+=1)S=e[E],j=o(S,E),x=c.get(j),x!==void 0&&((V=x.a)==null||V.measure(),(p??(p=new Set)).add(x));for(E=0;E<f;E+=1){if(S=e[E],j=o(S,E),x=c.get(j),x===void 0){var C=g?g.e.nodes_start:n;v=Ba(C,t,v,v===null?t.first:v.next,S,j,E,i,r),c.set(j,v),y=[],w=[],g=v.next;continue}if(u&&qa(x,S,E,r),x.e.f&Re&&(At(x.e),d&&((Y=x.a)==null||Y.unfix(),(p??(p=new Set)).delete(x))),x!==g){if(m!==void 0&&m.has(x)){if(y.length<w.length){var A=w[0],M;v=A.prev;var q=y[0],L=y[y.length-1];for(M=0;M<y.length;M+=1)ri(y[M],A,n);for(M=0;M<w.length;M+=1)m.delete(w[M]);Ge(t,q.prev,L.next),Ge(t,v,q),Ge(t,L,A),g=A,v=L,E-=1,y=[],w=[]}else m.delete(x),ri(x,g,n),Ge(t,x.prev,x.next),Ge(t,x,v===null?t.first:v.next),Ge(t,v,x),v=x;continue}for(y=[],w=[];g!==null&&g.k!==j;)(a||!(g.e.f&Re))&&(m??(m=new Set)).add(g),w.push(g),g=g.next;if(g===null)continue;x=g}y.push(x),v=x,g=x.next}if(g!==null||m!==void 0){for(var F=m===void 0?[]:Nn(m);g!==null;)(a||!(g.e.f&Re))&&F.push(g),g=g.next;var U=F.length;if(U>0){var B=r&xi&&f===0?n:null;if(d){for(E=0;E<U;E+=1)(ee=F[E].a)==null||ee.measure();for(E=0;E<U;E+=1)(se=F[E].a)==null||se.fix()}Ha(t,F,B,c)}}d&&Rt(()=>{var be;if(p!==void 0)for(x of p)(be=x.a)==null||be.apply()}),K.first=t.first&&t.first.e,K.last=v&&v.e}function qa(e,t,n,i){i&Dn&&kn(e.v,t),i&On?kn(e.i,n):e.i=n}function Ba(e,t,n,i,r,a,o,l,d,u){var f=(d&Dn)!==0,c=(d&Yr)===0,h=f?c?Ei(r):pe(r):r,g=d&On?pe(o):o,m={i:g,v:h,k:a,a:null,e:null,prev:n,next:i};try{return m.e=Ke(()=>l(e,h,g),Ai),m.e.prev=n&&n.e,m.e.next=i&&i.e,n===null?t.first=m:(n.next=m,n.e.next=m.e),i!==null&&(i.prev=m,i.e.prev=m.e),m}finally{}}function ri(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=tn(a);r.before(a),a=o}}function Ge(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 Va(e,t,n,i,r){var a=e,o="",l;st(()=>{o!==(o=t()??"")&&(l!==void 0&&(Me(l),l=void 0),o!==""&&(l=Ke(()=>{var d=o+"",u=Bn(d);ot(at(u),u.lastChild),a.before(u)})))})}function St(e,t,...n){var i=e,r=Ne,a;st(()=>{r!==(r=t())&&(a&&(Me(a),a=null),a=Ke(()=>r(i,...n)))},kt)}function Ua(e,t,n,i,r,a){var o,l,d=null,u=e,f;st(()=>{const c=t()||null;var h=c==="svg"?Si:null;c!==o&&(f&&(c===null?mt(f,()=>{f=null,l=null}):c===l?At(f):(Me(f),ii(!1))),c&&c!==l&&(f=Ke(()=>{d=h?document.createElementNS(h,c):document.createElement(c),ot(d,d);{var g=d.appendChild(Dt());i(d,g)}K.nodes_end=d,u.before(d)})),o=c,o&&(l=o),ii(!0))},kt)}function ln(e,t,n){Ot(()=>{var i=ze(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};Hn(()=>{var o=n();Ta(o),r&&en(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function nr(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=nr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Wa(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=nr(e))&&(i&&(i+=" "),i+=t);return i}function Ka(e){return typeof e=="object"?Wa(e):e??""}function za(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ie(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Lr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ir(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ya(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},d=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=Ka(n.class)),n.class=n.class?n.class+" "+i:i;var f=ir(e),c=e.__attributes??(e.__attributes={});for(const w in n){let S=n[w];if(d&&w==="value"&&S==null){e.value=e.__value="",l[w]=S;continue}var h=l[w];if(S!==h){l[w]=S;var g=w[0]+w[1];if(g!=="$$"){if(g==="on"){const j={},x="$$"+w;let E=w.slice(2);var m=Ca(E);if(Aa(E)&&(E=E.slice(0,-7),j.capture=!0),!m&&h){if(S!=null)continue;e.removeEventListener(E,l[x],j),l[x]=null}if(S!=null)if(m)e[`__${E}`]=S,ce([E]);else{let C=function(A){l[w].call(this,A)};var y=C;l[x]=Qi(E,e,C,j)}else m&&(e[`__${E}`]=void 0)}else if(w==="style"&&S!=null)e.style.cssText=S+"";else if(w==="autofocus")Ma(e,!!S);else if(w==="__value"||w==="value"&&S!=null)e.value=e[w]=e.__value=S;else if(w==="selected"&&d)za(e,S);else{var v=w;r||(v=ja(v));var p=v==="defaultValue"||v==="defaultChecked";if(S==null&&!a&&!p)if(c[w]=null,v==="value"||v==="checked"){let j=e;if(v==="value"){let x=j.defaultValue;j.removeAttribute(v),j.defaultValue=x}else{let x=j.defaultChecked;j.removeAttribute(v),j.defaultChecked=x}}else e.removeAttribute(w);else p||f.includes(v)&&(a||typeof S!="string")?e[v]=S:typeof S!="function"&&ie(e,v,S)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var ai=new Map;function ir(e){var t=ai.get(e.nodeName);if(t)return t;ai.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=mi(i);for(var a in n)n[a].set&&t.push(a);i=Ln(i)}return t}function $a(e,t,n){var i=e.__className,r=Za(t);(i!==r||Ai)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Za(e,t){return(e??"")+""}function le(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 sn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Ga=()=>performance.now(),Ue={tick:e=>requestAnimationFrame(e),now:()=>Ga(),tasks:new Set};function rr(){const e=Ue.now();Ue.tasks.forEach(t=>{t.c(e)||(Ue.tasks.delete(t),t.f())}),Ue.tasks.size!==0&&Ue.tick(rr)}function Ja(e){let t;return Ue.tasks.size===0&&Ue.tick(rr),{promise:new Promise(n=>{Ue.tasks.add(t={c:e,f:n})}),abort(){Ue.tasks.delete(t)}}}function Vt(e,t){e.dispatchEvent(new CustomEvent(t))}function Xa(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function oi(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=Xa(r.trim());t[o]=a.trim()}return t}const Qa=e=>e;function Ee(e,t,n,i){var r=(e&Qr)!==0,a=(e&ea)!==0,o=r&&a,l=(e&ta)!==0,d=o?"both":r?"in":"out",u,f=t.inert,c,h;function g(){var w=J,S=K;Fe(null),Ie(null);try{return u??(u=n()(t,(i==null?void 0:i())??{},{direction:d}))}finally{Fe(w),Ie(S)}}var m={is_global:l,in(){var w;if(t.inert=f,!r){h==null||h.abort(),(w=h==null?void 0:h.reset)==null||w.call(h);return}a||c==null||c.abort(),Vt(t,"introstart"),c=An(t,g(),h,1,()=>{Vt(t,"introend"),c==null||c.abort(),c=u=void 0})},out(w){if(!a){w==null||w(),u=void 0;return}t.inert=!0,Vt(t,"outrostart"),h=An(t,g(),c,0,()=>{Vt(t,"outroend"),w==null||w()})},stop:()=>{c==null||c.abort(),h==null||h.abort()}},v=K;if((v.transitions??(v.transitions=[])).push(m),r&&Gt){var p=l;if(!p){for(var y=v.parent;y&&y.f&kt;)for(;(y=y.parent)&&!(y.f&Xt););p=!y||(y.f&yi)!==0}p&&Ot(()=>{ze(()=>m.in())})}}function An(e,t,n,i,r){var a=i===1;if(_t(t)){var o,l=!1;return Rt(()=>{if(!l){var p=t({direction:a?"in":"out"});o=An(e,p,n,i,r)}}),{abort:()=>{l=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:Ne,deactivate:Ne,reset:Ne,t:()=>i};const{delay:d=0,css:u,tick:f,easing:c=Qa}=t;var h=[];if(a&&n===void 0&&(f&&f(0,1),u)){var g=oi(u(0,1));h.push(g,g)}var m=()=>1-i,v=e.animate(h,{duration:d});return v.onfinish=()=>{var p=(n==null?void 0:n.t())??1-i;n==null||n.abort();var y=i-p,w=t.duration*Math.abs(y),S=[];if(w>0){if(u)for(var j=Math.ceil(w/16.666666666666668),x=0;x<=j;x+=1){var E=p+y*c(x/j),C=u(E,1-E);S.push(oi(C))}m=()=>{var A=v.currentTime;return p+y*c(A/w)},f&&Ja(()=>{if(v.playState!=="running")return!1;var A=m();return f(A,1-A),!0})}v=e.animate(S,{duration:w,fill:"forwards"}),v.onfinish=()=>{m=()=>i,f==null||f(i,1-i),r()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=Ne)},deactivate:()=>{r=Ne},reset:()=>{i===0&&(f==null||f(1,0))},t:()=>m()}}function eo(e,t,n=t){var i=Ht();Oa(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=gn(e)?mn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),ze(t)==null&&e.value&&n(gn(e)?mn(e.value):e.value),Hn(()=>{var r=t();gn(e)&&r===mn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function gn(e){var t=e.type;return t==="number"||t==="range"}function mn(e){return e===""?null:+e}function li(e,t){return e===t||(e==null?void 0:e[Xe])===t}function qt(e={},t,n,i){return Ot(()=>{var r,a;return Hn(()=>{r=a,a=[],ze(()=>{e!==n(...a)&&(t(e,...a),r&&li(n(...r),e)&&t(null,...r))})}),()=>{Rt(()=>{a&&li(n(...a),e)&&t(null,...a)})}}),e}function to(e,t,n){if(e==null)return t(void 0),Ne;const i=ze(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}let Ut=!1;function no(e){var t=Ut;try{return Ut=!1,[e(),Ut]}finally{Ut=t}}const io={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 ro(e,t,n){return new Proxy({props:e,exclude:t},io)}const ao={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];_t(r)&&(r=r());const a=Je(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=Je(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===Xe||t===ki)return!1;for(let n of e.props)if(_t(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){_t(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function oo(...e){return new Proxy({props:e},ao)}function si(e){for(var t=K,n=K;t!==null&&!(t.f&(De|Mt));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function D(e,t,n,i){var C;var r=(n&$r)!==0,a=!bt||(n&Zr)!==0,o=(n&Jr)!==0,l=(n&Xr)!==0,d=!1,u;o?[u,d]=no(()=>e[t]):u=e[t];var f=Xe in e||ki in e,c=o&&(((C=Je(e,t))==null?void 0:C.set)??(f&&t in e&&(A=>e[t]=A)))||void 0,h=i,g=!0,m=!1,v=()=>(m=!0,g&&(g=!1,l?h=ze(i):h=i),h);u===void 0&&i!==void 0&&(c&&a&&Fr(),u=v(),c&&c(u));var p;if(a)p=()=>{var A=e[t];return A===void 0?v():(g=!0,m=!1,A)};else{var y=si(()=>(r?W:la)(()=>e[t]));y.f|=jr,p=()=>{var A=s(y);return A!==void 0&&(h=void 0),A===void 0?h:A}}if(!(n&Gr))return p;if(c){var w=e.$$legacy;return function(A,M){return arguments.length>0?((!a||!M||w||d)&&c(M?p():A),A):p()}}var S=!1,j=!1,x=Ei(u),E=si(()=>W(()=>{var A=p(),M=s(x);return S?(S=!1,j=!0,M):(j=!1,x.v=A)}));return r||(E.equals=Mn),function(A,M){if(arguments.length>0){const q=M?s(E):a&&o?Z(A):A;return E.equals(q)||(S=!0,N(x,q),m&&h!==void 0&&(h=q),ze(()=>s(E))),A}return s(E)}}function ct(e){Q===null&&qi(),bt&&Q.l!==null?lo(Q).m.push(e):nn(()=>{const t=ze(e);if(typeof t=="function")return t})}function lo(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const so="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(so);const ar="https://www.playpilot.com",cn="https://partner-api.playpilot.tech/1.0.0",or="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",ye=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed"}),vt=[];function lr(e,t=Ne){let n=null;const i=new Set;function r(l){if(en(e,l)&&(e=l,n)){const d=!vt.length;for(const u of i)u[1](),vt.push(u,e);if(d){for(let u=0;u<vt.length;u+=2)vt[u][0](vt[u+1]);vt.length=0}}}function a(l){r(l(e))}function o(l,d=Ne){const u=[l,d];return i.add(u),i.size===1&&(n=t(r,a)||Ne),l(e),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:a,subscribe:o}}function ci(e){let t;return to(e,n=>t=n)(),t}const sr=lr(null),cr=lr(null),co="https://insights.playpilot.net";async function Te(e,t=null,n={}){const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,n.organization_sid=ci(sr),n.domain_sid=ci(cr),fetch(co,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}function uo({organizationSid:e=null,domainSid:t=null}){sr.set(e||null),cr.set(t||null)}const Un="EncryptedToken",ur="articleReplacementEditToken";async function dr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=vn();if(!n)throw new Error("No token was provided");const i=Wn(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(cn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return fo(i),!0}catch(n){console.error(n),Te(ye.AuthFailed)}finally{_o()}return!1}function Wn(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(ur);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${Un}=`).pop())==null?void 0:r.split(";")[0])||""}function fo(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=Un+"="+e+";"+i+";path=/"}function vo(){document.cookie=Un+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; 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 _o(){const e=new URL(window.location.href);e.searchParams.delete(ur),window.history.replaceState({},"",e)}function vr(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),ho={"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 _e(e,t=_r()){var n;return((n=ho[e])==null?void 0:n[t])||e}function _r(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");return n&&t.includes(n)?n:_.English}const go=e=>e;function Kn(e){const t=e-1;return t*t*t+1}function ui(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function zn(e,{delay:t=0,duration:n=400,easing:i=go}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function un(e,{delay:t=0,duration:n=400,easing:i=Kn,x:r=0,y:a=0,opacity:o=0}={}){const l=getComputedStyle(e),d=+l.opacity,u=l.transform==="none"?"":l.transform,f=d*(1-o),[c,h]=ui(r),[g,m]=ui(a);return{delay:t,duration:n,easing:i,css:(v,p)=>`
4
+ transform: ${u} translate(${(1-v)*c}${h}, ${(1-v)*g}${m});
5
+ opacity: ${d-f*p}`}}function jt(e,{delay:t=0,duration:n=400,easing:i=Kn,axis:r="y"}={}){const a=getComputedStyle(e),o=+a.opacity,l=r==="y"?"height":"width",d=parseFloat(a[l]),u=r==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(a[`padding${f[0]}`]),h=parseFloat(a[`padding${f[1]}`]),g=parseFloat(a[`margin${f[0]}`]),m=parseFloat(a[`margin${f[1]}`]),v=parseFloat(a[`border${f[0]}Width`]),p=parseFloat(a[`border${f[1]}Width`]);return{delay:t,duration:n,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${l}: ${y*d}px;padding-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*h}px;margin-${u[0]}: ${y*g}px;margin-${u[1]}: ${y*m}px;border-${u[0]}-width: ${y*v}px;border-${u[1]}-width: ${y*p}px;min-${l}: 0`}}function mo(e,{delay:t=0,duration:n=400,easing:i=Kn,start:r=0,opacity:a=0}={}){const o=getComputedStyle(e),l=+o.opacity,d=o.transform==="none"?"":o.transform,u=1-r,f=l*(1-a);return{delay:t,duration:n,easing:i,css:(c,h)=>`
6
+ transform: ${d} scale(${1-u*h});
7
+ opacity: ${l-f*h}
8
+ `}}var po=I('<div class="popover svelte-qkpa3e" tabindex="-1" aria-hidden="true"><div class="dialog svelte-qkpa3e"><!></div></div>');function yo(e,t){ae(t,!0);let n=D(t,"maxHeight",15);Zi("scope","popover");let i=z(null),r=z(!1);ct(async()=>{await ti(),a(),await ti(),o()});function a(){if(!s(i))return;const{top:c,right:h,bottom:g,height:m}=s(i).getBoundingClientRect(),v=l();N(r,Z(c-v<0&&window.innerHeight-g>c+m));const p=window.innerWidth-h-v;h+v>window.innerWidth&&(s(i).style.left=`${p}px`)}function o(){if(!s(i))return;const{top:c,height:h}=s(i).getBoundingClientRect(),g=l(),m=s(r)?window.innerHeight-c-g:c+h-g;n(Math.min(m,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var d=po(),u=b(d),f=b(u);St(f,()=>t.children),qt(d,c=>N(i,c),()=>s(i)),R(()=>{le(d,"flip",s(r)),sn(d,"--max-height",n()?n()+"px":null)}),Ee(3,u,()=>un,()=>({duration:100,y:10})),k(e,d),oe()}const wo=[{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 ko=I('<div class="genre svelte-13nhocm"> </div>'),bo=(e,t)=>N(t,!0),xo=I('<button class="genre expand svelte-13nhocm"> </button>'),So=I("<!> <!>",1);function Eo(e,t){ae(t,!0);let n=z(!1);const i=W(()=>s(n)?t.genres:[t.genres[0]]);var r=So(),a=te(r);nt(a,17,()=>s(i),pt,(d,u)=>{var f=tt();const c=W(()=>{var m;return(m=wo.find(v=>v.slug===s(u)))==null?void 0:m.name});var h=te(f);{var g=m=>{var v=ko(),p=b(v);R(()=>$(p,_e(s(c)))),k(m,v)};O(h,m=>{s(c)&&m(g)})}k(d,f)});var o=T(a,2);{var l=d=>{var u=xo();u.__click=[bo,n];var f=b(u);R(()=>$(f,`+${t.genres.length-1}`)),k(d,u)};O(o,d=>{!s(n)&&t.genres.length>1&&d(l)})}k(e,r),oe()}ce(["click"]);function To(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(l=>l.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function Ae(e,t=1){e.role="heading",e.ariaLevel=t.toString()}Kr();var Ao=ke('<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 Io(e){var t=Ao();k(e,t)}var Co=(e,t,n)=>t(n()),Po=I('<div class="arrow svelte-1itidbd"><!></div>'),jo=I('<a target="_blank" class="playlink svelte-1itidbd" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1itidbd"> <div><span class="name svelte-1itidbd"> </span> <div class="category svelte-1itidbd"> </div></div> <!></a>'),No=I('<div class="playlink empty svelte-1itidbd"> </div>'),Lo=I('<div class="heading svelte-1itidbd"> </div> <div class="playlinks svelte-1itidbd"><!> <!></div>',1);function Mo(e,t){ae(t,!0);const n=D(t,"list",3,!1),i=Sa("scope")==="modal",r=W(()=>t.playlinks.filter(v=>!!v.logo_url)),a=W(()=>To(s(r))),o={SVOD:_e("Stream"),BUY:_e("Buy"),RENT:_e("Rent"),TVOD:_e("Rent Or Buy")};function l(v){Te(i?ye.TitleModalPlaylinkClick:ye.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var d=Lo(),u=te(d),f=b(u);R(()=>$(f,_e("Where To Stream Online"))),ln(u,(v,p)=>Ae==null?void 0:Ae(v,p),()=>2);var c=T(u,2),h=b(c);nt(h,17,()=>s(a),pt,(v,p)=>{let y=()=>s(p).name,w=()=>s(p).url,S=()=>s(p).logo_url,j=()=>s(p).extra_info.category;var x=jo();x.__click=[Co,l,y];var E=b(x),C=T(E,2),A=b(C),M=b(A),q=T(A,2),L=b(q);R(()=>$(L,o[j()]||_e("Stream")));var F=T(C,2);{var U=B=>{var V=Po(),Y=b(V);Io(Y),k(B,V)};O(F,B=>{n()&&B(U)})}R(()=>{ie(x,"href",w()),ie(x,"data-playlink",y()),ie(E,"src",S()),$(M,y())}),k(v,x)});var g=T(h,2);{var m=v=>{var p=No(),y=b(p);R(()=>$(y,_e("Title Unavailable"))),k(v,p)};O(g,v=>{t.playlinks.length||v(m)})}R(()=>le(c,"list",n())),k(e,d),oe()}ce(["click"]);var Do=(e,t)=>N(t,!0),Oo=I('<button class="show-more svelte-1u3je71">Show more</button>'),Ro=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Ho=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Fo(e,t){ae(t,!0);const n=D(t,"blurb",3,""),i=D(t,"limit",3,200);let r=z(!1);const a=W(()=>t.text.slice(0,i()));var o=Ho(),l=b(o),d=b(l),u=T(d);{var f=v=>{var p=Ye("...");k(v,p)};O(u,v=>{!s(r)&&t.text.length>i()&&v(f)})}var c=T(u,2);{var h=v=>{var p=Oo();p.__click=[Do,r],k(v,p)};O(c,v=>{!s(r)&&(t.text.length>i()||n())&&v(h)})}var g=T(l,2);{var m=v=>{var p=Ro(),y=b(p);R(()=>$(y,n())),k(v,p)};O(g,v=>{s(r)&&v(m)})}R(()=>$(d,s(r)?t.text:s(a))),k(e,o),oe()}ce(["click"]);var qo=I('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Bo=I('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Vo(e,t){var n=Bo(),i=T(te(n),2);nt(i,21,()=>t.participants,pt,(r,a)=>{var o=qo(),l=b(o),d=T(l),u=b(d);R(()=>{var h;return $(u,((h=s(a).character)==null?void 0:h.slice(0,20))||"")});var f=T(u);{var c=h=>{var g=Ye("...");k(h,g)};O(f,h=>{var g;(g=s(a).character)!=null&&g.length&&h(c)})}R(()=>$(l,`${s(a).name??""} `)),k(r,o)}),k(e,n)}var Uo=ke('<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 hr(e){var t=Uo();k(e,t)}var Wo=I('<div class="top svelte-16h1v3j"><img class="poster svelte-16h1v3j"></div>'),Ko=I("<div> </div>"),zo=I("<!> <!>",1),Yo=I('<img alt="" class="svelte-16h1v3j">'),$o=I('<div class="content svelte-16h1v3j" data-playpilot-link-injections-title=""><div class="header svelte-16h1v3j"><!> <div class="heading svelte-16h1v3j"> </div> <div class="info svelte-16h1v3j"><div class="imdb svelte-16h1v3j"><!> </div> <!> <div> </div> <div class="capitalize svelte-16h1v3j"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-16h1v3j"><!></div>',1);function gr(e,t){ae(t,!0);const n=D(t,"small",3,!1),i=D(t,"compact",3,!1);let r=z(!1),a=z(!1),o=z(!1);var l=$o(),d=te(l),u=b(d),f=b(u);{var c=V=>{var Y=Wo(),ee=b(Y);R(()=>{ie(ee,"src",t.title.standing_poster),ie(ee,"alt",`Movie poster for '${t.title.title??""}'`),le(ee,"loaded",s(r))}),re("load",ee,()=>N(r,!0)),k(V,Y)};O(f,V=>{i()||V(c)})}var h=T(f,2),g=b(h);ln(h,V=>Ae==null?void 0:Ae(V));var m=T(h,2),v=b(m),p=b(v);hr(p);var y=T(p),w=T(v,2);Eo(w,{get genres(){return t.title.genres}});var S=T(w,2),j=b(S),x=T(S,2),E=b(x);R(()=>$(E,_e(`Type: ${t.title.type}`)));var C=T(x,2);{var A=V=>{var Y=Ko(),ee=b(Y);R(()=>$(ee,`${t.title.length??""} ${_e("Minutes")??""}`)),k(V,Y)};O(C,V=>{!n()&&t.title.length&&V(A)})}var M=T(u,2),q=b(M);Mo(q,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var L=T(q,2);{var F=V=>{var Y=zo(),ee=te(Y);Fo(ee,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var se=T(ee,2);{var be=Be=>{Vo(Be,{get participants(){return t.title.participants}})};O(se,Be=>{var Ce;(Ce=t.title.participants)!=null&&Ce.length&&Be(be)})}k(V,Y)};O(L,V=>{n()||V(F)})}var U=T(d,2),B=b(U);tr(B,()=>s(o),V=>{var Y=Yo();R(()=>{ie(Y,"src",s(o)?t.title.standing_poster:t.title.medium_poster),le(Y,"loaded",s(a)),le(Y,"blur",s(o))}),re("load",Y,()=>N(a,!0)),re("error",Y,()=>N(o,!0)),k(V,Y)}),R(()=>{ie(d,"data-playpilot-original-title",t.title.original_title),le(d,"small",n()),le(d,"compact",i()),le(h,"truncate",n()),$(g,t.title.title),$(y,` ${t.title.imdb_score??""}`),$(j,t.title.year),le(U,"faded",i())}),k(e,l),oe()}function Zo(e,t){ae(t,!0);let n=z(0);Te(ye.TitlePopoverView,t.title),yo(e,{get maxHeight(){return s(n)},set maxHeight(i){N(n,Z(i))},children:(i,r)=>{var a=W(()=>!!s(n)&&s(n)<250);gr(i,{get title(){return t.title},small:!0,get compact(){return s(a)}})},$$slots:{default:!0}}),oe()}var Go=(e,t,n,i)=>t(s(n).title_details,s(i)),Jo=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),Xo=(e,t,n,i)=>t(s(n).title_details,i()),Qo=I('<!> <a target="_blank"> </a>',1),el=I(" <!>.",1),tl=I("<!> <br>",1),nl=I(" <br>",1),il=I('<span class="svelte-pfvkex"><!></span>'),rl=I('<p class="svelte-pfvkex"></p>');function al(e,t){ae(t,!0);const n=D(t,"onclickmodal",3,d=>null);function i(d,u){Te(ye.AfterArticlePlaylinkClick,d,{playlink:u})}function r(d,u){Te(ye.AfterArticleModalButtonClick,d),n()(u)}var a=tt(),o=te(a);{var l=d=>{var u=rl();nt(u,21,()=>t.linkInjections,pt,(f,c)=>{var h=il();const g=W(()=>{const{key:w,title:S,title_details:j,after_article_style:x}=s(c);return{key:w,title:S,title_details:j,after_article_style:x}}),m=W(()=>{var w;return((w=s(g).title_details)==null?void 0:w.providers)||[]});var v=b(h);{var p=w=>{var S=tl(),j=te(S);{var x=C=>{var A=Jo(),M=te(A);R(()=>$(M,`"${s(g).title??""}" ${_e("Is Available To Stream")??""} `));var q=T(M),L=b(q);L.__click=[Go,r,g,c];var F=b(L);R(()=>$(F,_e("View Streaming Options"))),k(C,A)},E=C=>{var A=el(),M=te(A);R(()=>$(M,`"${s(g).title??""}" ${_e("Is Available To Stream On")??""} `));var q=T(M);nt(q,17,()=>s(m),pt,(L,F,U)=>{let B=()=>s(F).name,V=()=>s(F).url;var Y=Qo(),ee=te(Y);{var se=Ce=>{var ut=Ye();R(()=>$(ut,U===s(m).length-1?`, ${_e("And")}`:",")),k(Ce,ut)};O(ee,Ce=>{U&&Ce(se)})}var be=T(ee,2);be.__click=[Xo,i,g,B];var Be=b(be);R(()=>{ie(be,"href",V()),$(Be,B())}),k(L,Y)}),k(C,A)};O(j,C=>{s(g).after_article_style==="modal_button"?C(x):C(E,!1)})}k(w,S)},y=w=>{var S=nl(),j=te(S);R(()=>$(j,`"${s(g).title??""}" ${_e("Title Unavailable Suffix")??""} `)),k(w,S)};O(v,w=>{s(m).length?w(p):w(y,!1)})}R(()=>ie(h,"data-playpilot-injection-key",s(g).key)),k(f,h)}),k(d,u)};O(o,d=>{t.linkInjections.length&&d(l)})}k(e,a),oe()}ce(["click"]);function ol(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Yn(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function di(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function fi(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function ll(e,t,n,i){const r=ol(t),a=Yn(t),o=e.slice(0,i),l=e.slice(i),d=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(d,"\\$&")}|${r.replace(d,"\\$&")}`),f=l.replace(u,n);return o+f}function We(e){return Yn(e).toLowerCase().replace(/\s+/g,"")}function sl(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let d=e.slice(o,l).trim();return o>0&&(d="…"+d),l<e.length&&(d+="…"),d}function cl(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const $n="data-playpilot-injection-key",Zn=`[${$n}]`,yt={};let In=null,zt=null;function mr(e){const t=[],n=[e];for(;n.length>0;){const i=n.pop();if(t.includes(i)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(i.tagName))continue;const r=Array.from(i.childNodes).some(o=>{var l;return o.nodeType===Node.TEXT_NODE&&((l=o.nodeValue)==null?void 0:l.trim())!==""});if(r&&i.tagName==="LI"){const o=i.closest("ul, ol");o&&!t.includes(o)&&t.push(o);continue}if(r){t.push(i);continue}const a=Array.from(i.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function dn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function ul(e,t,n={aiInjections:[],manualInjections:[]}){var f;const i=ml(n);if(!i)return[];const r=We(e.map(c=>c.innerText).join(" ")),a=yl(i),o=a.filter(c=>r.includes(We(c.sentence))),l={},d={};for(const c of o){const h=e.findIndex(E=>We(E.innerText).includes(We(c.sentence))),g=e[h];if(!g)continue;const m=di(c.title,g,["A"]);if(!(m!=null&&m.nodeValue)||fi(m)){const E=di(c.title,g);E&&fi(E)&&(d[c.key]="Given text is already inside of a link.");continue}const v=document.createElement("span");v.dataset.playpilotInjectionKey=c.key;const p=document.createElement("a");p.innerText=c.title,p.href=c.playpilot_url,p.dataset.playpilotOriginalTitle=(f=c.title_details)==null?void 0:f.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",v.insertAdjacentElement("beforeend",p);const y=cl(Object.values(l).filter(E=>E.elementIndex===h).map(E=>E.to)),w=g.innerHTML.indexOf(m.nodeValue),S=g.innerHTML.indexOf(c.sentence),j=Math.max(y,w,S,0);g.innerHTML=ll(g.innerHTML,c.title,v.outerHTML,j);const x=g.innerHTML.indexOf(v.outerHTML);l[c.key]={elementIndex:h,from:x,to:x+v.outerHTML.length}}fl(a,t),dl();const u=wl(i);return u.length&&hl(e,u,t),i.filter(c=>c.title_details).map((c,h)=>{const g=c.duplicate??(!c.manual&&kl(c,h,i)),m=document.querySelector(`[${$n}="${c.key}"]`),v=fn(c)&&!c.inactive&&!c.after_article&&!m,p=v?d[c.key]||(r.includes(We(c.sentence))?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...c,inactive:c.inactive??!1,duplicate:g,failed:v,failed_message:p}})}function dl(){const e=Array.from(document.querySelectorAll(`${Zn} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function fl(e,t){window.addEventListener("click",i=>{const r=i.target;if(!(r!=null&&r.parentElement))return;const a=r.parentElement.getAttribute($n);if(!a)return;const o=e.find(l=>a===l.key);o&&vl(i,o,t)}),Array.from(document.querySelectorAll(Zn)).forEach(i=>{const r=i.dataset.playpilotInjectionKey,a=e.find(o=>r===o.key);a&&(i.addEventListener("mouseenter",o=>_l(o,a)),i.addEventListener("mouseleave",()=>Jt(a)))})}function vl(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Jt(t))}function _l(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget;In=n,setTimeout(()=>{if(yt[t.key]||In!==n)return;const i=Vn(Zo,{target:n,props:{title:t.title_details}});yt[t.key]={injection:t,component:i}},100)}function Jt(e,t=!0){const n=yt[e.key];In=null,n&&(er(n.component,{outro:t}),delete yt[e.key])}function hl(e,t,n){var l,d;if(!t.length)return;const i=document.createElement("div"),r=(l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_selector,a=(r?document.querySelector(r):null)||e[e.length-1],o=((d=window.PlayPilotLinkInjections)==null?void 0:d.after_article_insert_position)||"afterend";i.dataset.playpilotAfterArticlePlaylinks="true",a.insertAdjacentElement(o,i),zt=Vn(al,{target:i,props:{linkInjections:t,onclickmodal:n}})}function gl(){var e;zt&&(er(zt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),zt=null)}function Cn(){Object.values(yt).forEach(t=>Jt(t.injection)),document.querySelectorAll(Zn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(yt).forEach(({injection:t})=>Jt(t,!1)),gl()}function ml({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function pl(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function pr(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&fn(e)}function fn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function yl(e){return yr(e).filter(t=>t.in_text!==!1&&pr(t))}function wl(e){return yr(e).filter(t=>t.after_article===!0&&pr(t))}function yr(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&wr(n,t)))}function kl(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&wr(i,e))}function wr(e,t){return e.title===t.title&&We(e.sentence)===We(t.sentence)}function bl(){const e=dn();return{heading:xl(e),modified_time:Sl(e),published_time:El(e)}}function xl(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Sl(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?kr(n):null}function El(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?kr(n):null}function kr(e){try{return new Date(e).toISOString()}catch{return null}}function br(){return location.protocol+"//"+location.host+location.pathname}let pn=null;async function xr(e,t,{hash:n=vr(t),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=vn(),o=fr()?await dr():!1,l=_r(),d=bl();if(!a)throw new Error("No token was provided");const u=await fetch(cn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:d,page_text:t,...i})});if(!u.ok)throw u;return await u.json()}async function vi(e,t,{requireCompletedResult:n=!1,pollInterval:i=3e3,maxTries:r=600}={}){let a=vr(t),o=0;pn&&clearTimeout(pn);const l=async(d,u)=>{try{const f=await xr(e,t,{hash:a});if(n&&f.automation_enabled&&f.ai_running)throw new Error;f.link_injections=_i(f.link_injections||[]),f.ai_injections=_i(f.ai_injections||[]),d(f);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),d();return}pn=setTimeout(()=>l(d),i)}};return new Promise(l)}async function Tl(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.removed}));if(!await xr(br(),t,{params:{private_token:Wn(),link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Al(){const e=new Headers({"Content-Type":"application/json"}),t=vn();if(!t)throw new Error("No token was provided");const n=await fetch(cn+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function _i(e){return e.map(t=>({...t,key:Sr(t.sid)}))}function Sr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function vn(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Il(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Cl=ke('<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 Er(e){var t=Cl();k(e,t)}function Gn(e,t){ae(t,!0);const n=D(t,"size",3,"margin(2)"),i=D(t,"onclick",3,()=>null),r=ro(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=tt(),o=te(a);Ua(o,()=>t.href?"a":"button",!1,(l,d)=>{let u;R(()=>{u=Ya(l,u,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===Si,l.nodeName.includes("-")),sn(l,"--size",n())});var f=tt(),c=te(f);St(c,()=>t.children??Ne),k(d,f)}),k(e,a),oe()}var Pl=(e,t)=>t()(),jl=I('<div class="modal svelte-wrncjp"><div class="dialog svelte-wrncjp" role="dialog"><div class="close svelte-wrncjp"><!></div> <!></div> <div class="backdrop svelte-wrncjp"></div></div>');function Nl(e,t){ae(t,!0);const n=D(t,"onclose",3,()=>null),i=D(t,"onscroll",3,()=>null);Zi("scope","modal"),ct(()=>{const c=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=c||""});function r(c){return window.innerWidth<600?un(c,{duration:250,y:window.innerHeight}):mo(c,{duration:150,start:.85})}var a=jl();re("keydown",fe,({key:c})=>{c==="Escape"&&n()()});var o=b(a),l=b(o),d=b(l);Gn(d,{onclick:()=>n()(),children:(c,h)=>{Er(c)},$$slots:{default:!0}});var u=T(l,2);St(u,()=>t.children);var f=T(o,2);f.__click=[Pl,n],re("scroll",o,function(...c){var h;(h=i())==null||h.apply(this,c)}),Ee(3,o,()=>r),Ee(3,a,()=>zn,()=>({duration:150})),k(e,a),oe()}ce(["click"]);function Ll(e,t){ae(t,!0),Te(ye.TitleModalView,t.title);let n=!1;function i(){n||(Te(ye.TitleModalScroll,t.title),n=!0)}Nl(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{gr(r,{get title(){return t.title}})},$$slots:{default:!0}}),oe()}var Ml=ke('<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 Dl(e,t){const n=D(t,"expanded",3,!1);var i=Ml();R(()=>le(i,"expanded",n())),k(e,i)}var Ol=ke('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Rl(e){var t=Ol();k(e,t)}function Hl(e,t,n){t(!t()),n()(t())}var Fl=I('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function Pn(e,t){ae(t,!0);let n=D(t,"active",15),i=D(t,"fullwidth",3,!1),r=D(t,"label",3,""),a=D(t,"onclick",3,()=>null);var o=Fl();o.__click=[Hl,n,a];var l=b(o),d=b(l);St(d,()=>t.children),R(()=>{ie(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),le(o,"active",n()),le(o,"fullwidth",i())}),k(e,o),oe()}ce(["click"]);var ql=I('<input type="text" class="svelte-1vrer3i">');function Jn(e,t){let n=D(t,"value",15),i=D(t,"label",3,""),r=D(t,"name",3,""),a=D(t,"readonly",3,!1),o=D(t,"oninput",3,()=>null);var l=ql();l.__input=function(...d){var u;(u=o())==null||u.apply(this,d)},R(()=>{ie(l,"name",r()),ie(l,"aria-label",i()),ie(l,"placeholder",i()),l.readOnly=a()}),eo(l,n),k(e,l)}ce(["input"]);var Bl=ke('<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>'),Vl=ke('<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>'),Ul=ke('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function hi(e,t){const n=D(t,"align",3,"bottom");var i=Ul(),r=b(i);{var a=l=>{var d=Bl();k(l,d)},o=l=>{var d=tt(),u=te(d);{var f=c=>{var h=Vl();k(c,h)};O(u,c=>{n()==="center"&&c(f)},!0)}k(l,d)};O(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var Wl=I("<div><!></div>");function Nt(e,t){ae(t,!0);const n=D(t,"type",3,"error");var i=Wl(),r=b(i);St(r,()=>t.children),R(()=>$a(i,`alert ${n()??""} svelte-18si0a5`)),k(e,i),oe()}var Kl=I("<!> In-text Playlink",1),zl=I("<!> Bottom Playlink",1),Yl=I('<div class="alert svelte-1shw34x"><!></div>'),$l=(e,t)=>t().after_article_style="playlinks",Zl=(e,t)=>t().after_article_style="modal_button",Gl=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),Jl=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function Xl(e,t){ae(t,!0);const n=D(t,"linkInjection",7),i=W(()=>n().after_article_style==="modal_button");var r=Jl(),a=te(r),o=b(a),l=W(()=>n().in_text??!0);Pn(o,{fullwidth:!0,get active(){return s(l)},onclick:m=>{n().in_text=m,n().manual=!0},label:"In-text Playlink",children:(m,v)=>{var p=Kl(),y=te(p);hi(y,{align:"center"}),k(m,p)},$$slots:{default:!0}});var d=T(o,2),u=W(()=>n().after_article??!1);Pn(d,{fullwidth:!0,get active(){return s(u)},onclick:m=>{n().after_article=m,n().manual=!0},label:"Bottom Playlink",children:(m,v)=>{var p=zl(),y=te(p);hi(y,{align:"bottom"}),k(m,p)},$$slots:{default:!0}});var f=T(a,2);{var c=m=>{var v=Yl(),p=b(v);Nt(p,{type:"warning",children:(y,w)=>{var S=Ye("At least one layout option must be selected for the playlink to be visible.");k(y,S)},$$slots:{default:!0}}),Ee(3,v,()=>jt,()=>({duration:200})),k(m,v)};O(f,m=>{fn(n())||m(c)})}var h=T(f,2);{var g=m=>{var v=Gl(),p=T(b(v),2),y=b(p);y.__click=[$l,n];var w=T(y,2);w.__click=[Zl,n];var S=T(w,2);R(()=>{ie(p,"aria-activedescendant",`playlinks-${(s(i)?"after-article":"in-text")??""}`),ie(y,"aria-selected",!s(i)||null),le(y,"active",!s(i)),ie(w,"aria-selected",s(i)||null),le(w,"active",s(i)),le(S,"right",s(i))}),Ee(3,v,()=>jt,()=>({duration:100})),k(m,v)};O(h,m=>{n().after_article&&m(g)})}k(e,r),oe()}ce(["click"]);var Ql=ke('<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 es(e){var t=Ql();k(e,t)}var ts=(e,t)=>N(t,!s(t)),ns=I('<div class="content svelte-1fmy0wh"><!></div>'),is=I('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function rs(e,t){ae(t,!0);let n=z(!1),i=z(null);function r(f){var h;const c=f.target;c===s(i)||(h=s(i))!=null&&h.contains(c)||N(n,!1)}var a=is();re("click",fe,r);var o=b(a);o.__click=[ts,n];var l=b(o);es(l),qt(o,f=>N(i,f),()=>s(i));var d=T(o,2);{var u=f=>{var c=ns(),h=b(c);St(h,()=>t.children),Ee(1,c,()=>un,()=>({duration:150,y:5})),k(f,c)};O(d,f=>{s(n)&&f(u)})}R(()=>{ie(o,"aria-label",t.ariaLabel),ie(o,"aria-expanded",s(n))}),k(e,a),oe()}ce(["click"]);function as(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}var os=(e,t)=>N(t,!s(t)),ls=I('<button class="expand-sentence svelte-8gd2db"> </button>'),ss=I('<button class="context-menu-action svelte-8gd2db">Remove</button>'),cs=(e,t)=>N(t,!s(t)),us=I('<div class="warning svelte-8gd2db" aria-label="Invalid playlink settings"><!></div>'),ds=I('<div class="actions svelte-8gd2db"><button class="expand svelte-8gd2db" aria-label="Expand"><!></button> <!> <!></div>'),fs=I('<div class="expanded svelte-8gd2db"><div class="label svelte-8gd2db">Link URL</div> <!> <div class="label offset svelte-8gd2db">Layout options</div> <div class="type-select svelte-8gd2db"><!></div></div>'),vs=I('<div class="item svelte-8gd2db"><div class="header svelte-8gd2db"><img class="poster svelte-8gd2db" alt="" width="32" height="48"> <div class="info svelte-8gd2db"><div class="title svelte-8gd2db"> </div> <div class="sentence svelte-8gd2db"><!> <!></div></div> <div class="context-menu svelte-8gd2db"><!></div></div> <div class="content svelte-8gd2db"><!> <!></div></div>');function _s(e,t){ae(t,!0);const n=D(t,"linkInjection",15),i=D(t,"onremove",3,()=>null),r=D(t,"onhighlight",3,()=>null),a=W(()=>n()||{}),o=W(()=>s(a).key),l=W(()=>s(a).sentence),d=W(()=>s(a).title_details),u=W(()=>s(a).failed),f=W(()=>s(a).failed_message),c=W(()=>s(a).inactive),h=W(()=>s(d)),g=W(()=>sl(n().sentence,n().title,60));let m=z(!1),v=z(!1),p=z(!1),y=z(null);ct(()=>{s(u)&&Te(ye.InjectionFailed,s(h),{phrase:n().title,sentence:s(l)})});function w(G=!0){j().forEach(P=>{P.classList.toggle("playpilot-injection-highlight",G)})}function S(G){let X=G.target,P=X==null?void 0:X.dataset.playpilotInjectionKey;X&&!P&&(X=X.closest(`[data-playpilot-injection-key="${s(o)}"]`),P=X==null?void 0:X.dataset.playpilotInjectionKey),N(p,P===s(o)),s(y)&&s(p)&&r()(s(y))}function j(){const G=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${s(o)}"]`));return G.length?G:mr(dn()).filter(X=>We(X.innerText).includes(We(n().sentence)))||[]}var x=vs();re("mouseover",fe,S),x.__click=[as,w,j];var E=b(x),C=b(E),A=T(C,2),M=b(A),q=b(M),L=T(M,2),F=b(L);Va(F,()=>(s(v)?s(l):s(g)).replace(n().title,`<em>${n().title}</em>`));var U=T(F,2);{var B=G=>{var X=ls();X.__click=[os,v];var P=b(X);R(()=>$(P,s(v)?"Less":"More")),k(G,X)};O(U,G=>{s(g).length<s(l).length&&G(B)})}var V=T(A,2),Y=b(V);rs(Y,{ariaLabel:"More options",children:(G,X)=>{var P=ss();P.__click=function(...H){var ne;(ne=i())==null||ne.apply(this,H)},k(G,P)},$$slots:{default:!0}});var ee=T(E,2),se=b(ee);{var be=G=>{Nt(G,{children:(X,P)=>{var H=Ye();R(()=>$(H,s(f))),k(X,H)},$$slots:{default:!0}})},Be=G=>{var X=ds(),P=b(X);P.__click=[cs,m];var H=b(P);Dl(H,{get expanded(){return s(m)}});var ne=T(P,2);{var he=Pe=>{var $e=us(),Ze=b($e);Rl(Ze),Ee(3,$e,()=>zn,()=>({duration:100})),k(Pe,$e)};O(ne,Pe=>{fn(n())||Pe(he)})}var xe=T(ne,2),Ve=W(()=>s(c)?"Inactive":"Visible"),Se=W(()=>!n().inactive);Pn(xe,{get label(){return s(Ve)},get active(){return s(Se)},onclick:Pe=>{n(n().inactive=!Pe,!0),n(n().manual=!0,!0)},children:(Pe,$e)=>{var Ze=Ye();R(()=>$(Ze,s(c)?"Inactive":"Visible")),k(Pe,Ze)},$$slots:{default:!0}}),R(()=>ie(P,"aria-expanded",s(m))),k(G,X)};O(se,G=>{s(u)?G(be):G(Be,!1)})}var Ce=T(se,2);{var ut=G=>{var X=fs(),P=T(b(X),2);Jn(P,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(he){n(n().playpilot_url=he,!0)}});var H=T(P,4),ne=b(H);Xl(ne,{get linkInjection(){return n()}}),Ee(3,X,()=>jt,()=>({duration:100})),k(G,X)};O(Ce,G=>{s(m)&&G(ut)})}qt(x,G=>N(y,G),()=>s(y)),R(()=>{le(x,"highlighted",s(p)),le(x,"inactive",s(c)),ie(C,"src",s(h).standing_poster),$(q,s(h).title)}),re("mouseenter",x,()=>w(!0)),re("mouseleave",x,()=>w(!1)),re("error",C,({target:G})=>G.src=or),Ee(6,x,()=>jt,()=>({duration:200})),k(e,x),oe()}ce(["click"]);var hs=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function gs(e,t){ae(t,!0);let n=D(t,"element",7),i=D(t,"position",23,()=>({x:0,y:0})),r=D(t,"limit",19,()=>({x:0,y:0})),a=D(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},d=i();ct(()=>{u(i().x,i().y)});function u(v,p){const y=window.innerWidth,w=window.innerHeight,S=n().clientWidth,j=n().clientHeight;v=Math.min(Math.max(v,r().x),y-S-r().x),p=Math.min(Math.max(p,r().y),w-j-r().y),n().style.right=v+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:v,y:p}),a()(i())}function f(v){var p,y;return{x:v.pageX||((p=v.touches)==null?void 0:p[0].pageX)||0,y:v.pageY||((y=v.touches)==null?void 0:y[0].pageY)||0}}function c(v){o=!0,l=f(v),d=i()}function h(v){if(!o)return;const p=f(v),y=p.x-l.x,w=p.y-l.y,S=d.x-y,j=d.y-w;u(S,j)}function g(){o&&(o=!1)}var m=hs();re("mousemove",fe,h),re("touchmove",fe,h,void 0,!0),re("mouseup",fe,g),re("touchend",fe,g),re("resize",fe,()=>u(i().x,i().y)),m.__mousedown=c,m.__touchstart=c,k(e,m),oe()}ce(["mousedown","touchstart"]);var ms=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function ps(e,t){ae(t,!0);let n=D(t,"element",7),i=D(t,"height",7,200),r=D(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,d=i();ct(()=>{i()&&u(i())});function u(v){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(v,g()));n().style.height=`${y}px`,i(y),r()(y)}function f(v){var p,y;o=!0,l=v.pageY||((y=(p=v.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,d=n().clientHeight}function c(v){var S,j;if(!o)return;const p=v.pageY||((j=(S=v.touches)==null?void 0:S[0])==null?void 0:j.pageY)||0,y=l-p,w=d+y;u(w)}function h(){o=!1}function g(){const v=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-v,0)}var m=ms();re("mousemove",fe,c),re("touchmove",fe,c,void 0,!0),re("mouseup",fe,h),re("touchend",fe,h),re("resize",fe,()=>{i()&&u(i())}),m.__mousedown=f,m.__touchstart=f,k(e,m),oe()}ce(["mousedown","touchstart"]);var ys=ke('<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 ws(e){var t=ys();k(e,t)}async function ks(e){const t=new Headers({"Content-Type":"application/json"}),n=vn();if(!n)throw new Error("No token was provided");const i=await fetch(cn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var bs=ke('<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 xs(e){var t=bs();k(e,t)}var Ss=I("<div> </div>"),Es=e=>e.stopImmediatePropagation(),Ts=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function gi(e,t){ae(t,!0);const n=D(t,"hoverable",3,!0),i=D(t,"onclick",3,()=>null);var r=Ts();r.__click=function(...x){var E;(E=i())==null||E.apply(this,x)};var a=b(r),o=T(a,2),l=b(o),d=b(l),u=T(l,2),f=b(u),c=b(f);hr(c);var h=T(c),g=T(f,2),m=b(g),v=T(g,2),p=b(v),y=T(v,2);{var w=x=>{var E=Ss(),C=b(E);R(()=>$(C,`${t.title.length??""} min`)),k(x,E)};O(y,x=>{t.title.length&&x(w)})}var S=T(o,2);S.__click=[Es];var j=b(S);xs(j),R(()=>{le(r,"hoverable",n()),ie(a,"src",t.title.standing_poster),$(d,t.title.title),$(h,` ${t.title.imdb_score??""}`),$(m,t.title.year),$(p,t.title.type),ie(S,"href",`${ar}/${t.title.type??""}/${t.title.slug??""}`)}),re("error",a,({target:x})=>x.src=or),k(e,r),oe()}ce(["click"]);var As=I('<em class="empty svelte-1olb8n0">No results found</em>'),Is=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Cs=I('<div class="selected svelte-1olb8n0"><!></div>'),Ps=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function js(e,t){ae(t,!0);let n=D(t,"onselect",3,()=>null),i=D(t,"query",15),r=z(Z([])),a=z(null),o=z(!1);nn(()=>{i()&&l(i())});async function l(v){N(o,!0);try{N(r,Z(await ks(v)))}finally{N(o,!1)}}function d(v){i(v.title),N(a,Z(v)),n()(v)}var u=Ps(),f=b(u);Jn(f,{oninput:()=>N(a,null),name:"search",label:"Search...",get value(){return i()},set value(v){i(v)}});var c=T(f,2);{var h=v=>{var p=Is();nt(p,21,()=>s(r),y=>y.sid,(y,w)=>{gi(y,{get title(){return s(w)},onclick:()=>d(s(w))})},y=>{var w=tt(),S=te(w);{var j=x=>{var E=As();k(x,E)};O(S,x=>{s(o)||x(j)})}k(y,w)}),k(v,p)};O(c,v=>{i()&&!s(a)&&v(h)})}var g=T(c,2);{var m=v=>{var p=Cs(),y=b(p);gi(y,{get title(){return s(a)},hoverable:!1}),k(v,p)};O(g,v=>{s(a)&&v(m)})}k(e,u),oe()}function Ns(e,t,n,i,r,a){if(!s(t)||!s(n))return;const o=s(n).type==="movie"?"movie":"show",l=ar+`/${o}/${s(n).slug}`,d={sid:s(n).sid,title:s(t),sentence:s(i),playpilot_url:l,key:Sr(s(n).sid),title_details:s(n),manual:!0};r.onsave(d),a()()}var Ls=I('<div class="error svelte-1i8p6op"><!></div>'),Ms=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Ds=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function Os(e,t){ae(t,!0);let n=D(t,"htmlString",3,""),i=D(t,"onclose",3,()=>null),r=z(""),a=z(""),o=z(null),l=z(""),d=z("");ct(u);function u(){const C=window.getSelection();if(!(C!=null&&C.anchorNode)||C.anchorNode.parentElement&&!dn().contains(C.anchorNode.parentElement))return;const A=C.toString().trim();if(!A)return;N(l,""),N(r,Z(A));const M=C.getRangeAt(0).cloneContents();if(Array.from(M.childNodes).filter(U=>{var B;return(B=U.textContent)==null?void 0:B.trim()}).length>1){N(l,"Selection contains multiple items. Selection may not contain a mix of styled and non styled text. Please select the text more directly.");return}N(d,Z(s(r))),N(a,Z(f(C,A)));const L=C.getRangeAt(0).commonAncestorContainer.textContent,F=Yn(n());(!L||!F.includes(L))&&N(l,"Selection was not inside of given content")}function f(C,A){const M=C.getRangeAt(0);let q=M.startContainer;for(;(q.textContent||"").length<=A.length*3&&q.parentNode;)q=q.parentNode;if(!q||!q.textContent)return"";const L=q.textContent,F=c(q,M.startContainer,M.startOffset),U=c(q,M.endContainer,M.endOffset),B=L.slice(0,F).lastIndexOf("."),V=L.slice(U).match(/[.!?]/),Y=V?U+V.index:L.length,ee=B===-1?0:B+1,se=Y;return L.slice(ee,se+1).trim()}function c(C,A,M){let q=0;const L=C,F=U=>{var B;if(U===A)return q+=M,!0;U.nodeType===Node.TEXT_NODE&&(q+=((B=U.textContent)==null?void 0:B.length)||0);for(let V=U.firstChild;V;V=V.nextSibling)if(F(V))return!0;return!1};return F(L),q}function h(C){var A,M;N(o,Z(C)),(M=(A=window.getSelection())==null?void 0:A.removeAllRanges)==null||M.call(A)}var g=Ds();re("mouseup",fe,u);var m=b(g),v=b(m);Gn(v,{get onclick(){return i()},size:"24px",children:(C,A)=>{ws(C)},$$slots:{default:!0}});var p=T(v,2);ln(p,(C,A)=>Ae==null?void 0:Ae(C,A),()=>2);var y=T(m,6);Jn(y,{get value(){return s(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var w=T(y,2);{var S=C=>{var A=Ls(),M=b(A);Nt(M,{children:(q,L)=>{var F=Ye();R(()=>$(F,s(l))),k(q,F)},$$slots:{default:!0}}),k(C,A)};O(w,C=>{s(l)&&C(S)})}var j=T(w,2);{var x=C=>{var A=Ms(),M=T(te(A),2);tr(M,()=>s(a)+s(r),q=>{js(q,{onselect:h,get query(){return s(d)},set query(L){N(d,Z(L))}})}),k(C,A)};O(j,C=>{s(l)||C(x)})}var E=T(j,2);E.__click=[Ns,r,o,a,t,i],R(()=>E.disabled=!s(r)||!s(o)),k(e,g),oe()}ce(["click"]);var Rs=ke('<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 Hs(e){var t=Rs();k(e,t)}var Fs=I('<strong class="svelte-1l4sxuh">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1l4sxuh">Partner Portal</a>',1),qs=I('<span class="svelte-1l4sxuh">.</span>'),Bs=I(`AI links are currently processing. This can take several minutes. We'll automatically insert all found injections once ready. <div class="message svelte-1l4sxuh"> <span class="ellipses svelte-1l4sxuh"></span></div> <div class="loading-bar svelte-1l4sxuh"><div class="loading-bar-progress svelte-1l4sxuh"><div class="loading-bar-fill svelte-1l4sxuh" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1l4sxuh"> </div></div>`,1),Vs=I('<div class="animator svelte-1l4sxuh" data-test-id="animator"></div>'),Us=I('<div class="ai-indicator svelte-1l4sxuh"><div class="content svelte-1l4sxuh"><div class="icon svelte-1l4sxuh"><!></div> <div class="svelte-1l4sxuh"><!></div></div> <div class="border svelte-1l4sxuh"><!></div></div>');function Ws(e,t){const n=D(t,"aiRunning",3,!1),i=D(t,"automationEnabled",3,!1),r=D(t,"message",3,""),a=D(t,"percentage",3,0);var o=Us(),l=b(o),d=b(l),u=b(d);Hs(u);var f=T(d,2),c=b(f);{var h=y=>{var w=Fs();k(y,w)},g=y=>{var w=tt(),S=te(w);{var j=x=>{var E=Bs(),C=T(te(E)),A=b(C),M=T(A);nt(M,20,()=>({length:3}),pt,(Y,ee)=>{var se=qs();k(Y,se)});var q=T(C,2),L=b(q),F=b(L);const U=W(()=>`${Math.max(a(),3)??""}%`);R(()=>sn(F,"width",s(U)));var B=T(L,2),V=b(B);R(()=>{$(A,`${r()??""} `),$(V,`${a()??""}%`)}),k(x,E)};O(S,x=>{n()&&x(j)},!0)}k(y,w)};O(c,y=>{i()?y(g,!1):y(h)})}var m=T(l,2),v=b(m);{var p=y=>{var w=Vs();k(y,w)};O(v,y=>{n()&&y(p)})}R(()=>le(o,"running",n())),k(e,o)}async function Ks(e,t,n,i,r,a,o){try{N(t,!0),N(n,!1),i(await Tl(i(),r())),N(a,Z(s(o)))}catch{N(n,!0)}finally{N(t,!1)}}var zs=I('<div class="handles svelte-1b2vpoj"><div class="handle svelte-1b2vpoj"><!></div> <div class="handle svelte-1b2vpoj"><!></div></div>'),Ys=I('<div class="loading svelte-1b2vpoj">Loading...</div>'),$s=I('<div class="bubble svelte-1b2vpoj"> </div> <!>',1),Zs=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
9
+ Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal</a>`,1),Gs=I('<div class="alert svelte-1b2vpoj"><!></div>'),Js=I('<div class="error svelte-1b2vpoj"><!></div>'),Xs=I('<div class="empty svelte-1b2vpoj">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Qs=I('<button class="save svelte-1b2vpoj"> </button>'),ec=I('<div class="items svelte-1b2vpoj"></div> <!>',1),tc=I("<!> <!> <!> <!>",1),nc=I('<div class="panel playpilot-styled-scrollbar svelte-1b2vpoj"><!></div>'),ic=I('<section class="editor playpilot-styled-scrollbar svelte-1b2vpoj"><!> <header class="header svelte-1b2vpoj"><div class="heading svelte-1b2vpoj">Playlinks</div> <!></header> <!> <!></section>');function rc(e,t){ae(t,!0);let n=D(t,"linkInjections",15),i=D(t,"htmlString",3,""),r=D(t,"loading",3,!1),a=D(t,"injectionsEnabled",3,!1),o=D(t,"aiStatus",19,()=>({}));const l="editor-position",d="editor-height";let u=z(null),f=Z(JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }')),c=Z(parseInt(localStorage.getItem(d)||"0")),h=z(!1),g=z(!1),m=z(!1),v=z(0),p=z("");const y=W(()=>JSON.stringify(n())),w=W(()=>s(p)&&s(p)!==s(y)),S=W(()=>n().filter(P=>P.title_details&&!P.removed&&!P.duplicate&&(P.manual||!P.manual&&!P.failed))),j=W(()=>C(s(S))),x=W(()=>Yt(o().automationEnabled,!1)),E=W(()=>Yt(o().aiRunning,!1));nn(()=>{r()||ze(()=>{requestAnimationFrame(()=>N(p,Z(s(y)))),F()})});function C(P){return P.sort((H,ne)=>H.failed!==ne.failed?H.failed?1:-1:H.title_details.title.localeCompare(ne.title_details.title))}function A(P,H){localStorage.setItem(P,H)}function M(P){const H=n().findIndex(ne=>ne.key===P);n(n()[H].manual=!0,!0),n(n()[H].removed=!0,!0),n([...n()])}function q(P){if(!s(u))return;const H=P.offsetTop,ne=H+P.offsetHeight,he=s(u).scrollTop,xe=he+s(u).clientHeight;H>=he&&ne<=xe||s(u).scrollTo({top:H-s(u).clientHeight/2,behavior:"smooth"})}function L(P){const H=P.target;N(v,Z(H.scrollTop))}function F(){const P={total:n().length,failed_automatic:n().filter(H=>H.failed&&!H.manual).length,failed_manual:n().filter(H=>H.failed&&H.manual).length,final_injected:s(S).length};Te(ye.TotalInjectionsCount,null,P)}var U=ic(),B=b(U);{var V=P=>{var H=zs(),ne=b(H),he=b(ne);ps(he,{get element(){return s(u)},get height(){return c},onchange:Se=>A(d,JSON.stringify(Se))});var xe=T(ne,2),Ve=b(xe);gs(Ve,{get element(){return s(u)},get position(){return f},limit:{x:16,y:16},onchange:Se=>A(l,JSON.stringify(Se))}),k(P,H)};O(B,P=>{s(u)&&!r()&&P(V)})}var Y=T(B,2),ee=b(Y);ln(ee,P=>Ae==null?void 0:Ae(P));var se=T(ee,2);{var be=P=>{var H=Ys();k(P,H)},Be=P=>{var H=tt(),ne=te(H);{var he=xe=>{var Ve=$s(),Se=te(Ve),Pe=b(Se),$e=T(Se,2);Gn($e,{onclick:()=>N(h,!0),size:"24px","aria-label":"Add manual injection",children:(Ze,ue)=>{var je=Ye("+");k(Ze,je)},$$slots:{default:!0}}),R(()=>{ie(Se,"aria-label",`${s(S).length??""} found playlinks`),$(Pe,s(S).length)}),k(xe,Ve)};O(ne,xe=>{s(E)||xe(he)},!0)}k(P,H)};O(se,P=>{r()?P(be):P(Be,!1)})}var Ce=T(Y,2);{var ut=P=>{var H=tc(),ne=te(H);{var he=ue=>{var je=Gs(),dt=b(je);Nt(dt,{type:"warning",children:(Et,_n)=>{var ge=Zs();k(Et,ge)},$$slots:{default:!0}}),k(ue,je)};O(ne,ue=>{a()||ue(he)})}var xe=T(ne,2);{var Ve=ue=>{Ws(ue,oo(o))};O(xe,ue=>{(s(E)||!s(x))&&ue(Ve)})}var Se=T(xe,2);{var Pe=ue=>{var je=Js(),dt=b(je);Nt(dt,{children:(Et,_n)=>{var ge=Ye("Something went wrong, check your links below.");k(Et,ge)},$$slots:{default:!0}}),Ee(7,je,()=>jt,()=>({duration:150})),k(ue,je)};O(Se,ue=>{s(m)&&ue(Pe)})}var $e=T(Se,2);{var Ze=ue=>{var je=ec(),dt=te(je);nt(dt,21,()=>s(j),ge=>ge.key,(ge,Oe)=>{const Bt=W(()=>n().findIndex(hn=>hn.key===s(Oe).key));_s(ge,{onremove:()=>M(s(Oe).key),onhighlight:q,get linkInjection(){return n()[s(Bt)]},set linkInjection(hn){n(n()[s(Bt)]=hn,!0)}})},ge=>{var Oe=Xs();k(ge,Oe)});var Et=T(dt,2);{var _n=ge=>{var Oe=Qs();Oe.__click=[Ks,g,m,n,i,p,y];var Bt=b(Oe);R(()=>{Oe.disabled=s(g),$(Bt,s(g)?"Saving...":"Save links")}),Ee(1,Oe,()=>zn,()=>({duration:100})),k(ge,Oe)};O(Et,ge=>{s(w)&&n().length&&ge(_n)})}k(ue,je)};O($e,ue=>{s(E)||ue(Ze)})}k(P,H)};O(Ce,P=>{r()||P(ut)})}var G=T(Ce,2);{var X=P=>{var H=nc(),ne=b(H);Os(ne,{get htmlString(){return i()},onclose:()=>N(h,!1),onsave:he=>n().push(he)}),R(()=>sn(H,"top",`${s(v)??""}px`)),Ee(3,H,()=>un,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(P,H)};O(G,P=>{s(h)&&P(X)})}qt(U,P=>N(u,P),()=>s(u)),R(()=>{le(U,"panel-open",s(h)),le(U,"loading",r())}),re("scroll",U,L),k(e,U),oe()}ce(["click"]);var ac=ke('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function oc(e){var t=ac();k(e,t)}var lc=I('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function sc(e,t){var n=lc(),i=b(n);i.__click=function(...l){var d;(d=t.onclick)==null||d.apply(this,l)};var r=b(i);oc(r);var a=T(i,2);a.__click=function(...l){var d;(d=t.onclose)==null||d.apply(this,l)};var o=b(a);Er(o),k(e,n)}ce(["click"]);var cc=I('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!> <!></div>');function uc(e,t){ae(t,!0);const n=dn(),i=mr(n),r=i.map(L=>L.outerHTML).join("");let a=z(null),o=z(null),l=z(Z(fr())),d=z(!!Wn()),u=z(!1),f=z(!0),c=z(Z([])),h=z(void 0);const g=W(()=>s(a)||{}),m=W(()=>Yt(s(g).ai_injections,()=>[],!0)),v=W(()=>Yt(s(g).link_injections,()=>[],!0));nn(()=>{s(l)&&!s(f)&&y()}),ct(()=>{if(!Il())return(async()=>(await p(),Te(ye.ArticlePageView)))(),()=>Cn()});async function p(){N(f,!0),s(l)&&N(u,Z(await dr()));const L=br();try{const F=await Al();if(!s(l)&&(F!=null&&F.exclude_urls_pattern)&&L.match(F.exclude_urls_pattern))return}catch(F){Te(ye.FetchingConfigFailed),console.error("TPI Config failed to fetch",F);return}if(N(a,Z(await vi(L,r,{maxTries:1}))),N(f,!1),!!s(a)){if(uo({organizationSid:s(a).organization_sid,domainSid:s(a).domain_sid}),!s(a).ai_running||!s(a).automation_enabled){w({aiInjections:s(m),manualInjections:s(v)});return}s(l)&&(N(a,Z(await vi(L,r,{requireCompletedResult:!0}))),w({aiInjections:s(m),manualInjections:s(v)}))}}function y(){Cn(),w(pl(s(c)))}function w(L={aiInjections:s(m),manualInjections:s(v)}){const F=ul(i,S,L);JSON.stringify(F)!==JSON.stringify(s(c))&&N(c,Z(F));const U=F.filter(B=>!B.failed);U.length&&(s(l)||Te(ye.ArticleInjected,null,{manual:U.filter(B=>B.manual).length,ai:U.filter(B=>!B.manual).length}))}function S(L){N(o,Z(L))}var j=cc(),x=b(j);{var E=L=>{sc(L,{onclick:()=>{N(l,!0),p()},onclose:()=>{N(d,!1),vo()}})};O(x,L=>{s(d)&&!s(l)&&L(E)})}var C=T(x,2);{var A=L=>{var F=W(()=>{var B;return(B=s(a))==null?void 0:B.injections_enabled}),U=W(()=>{var B,V,Y,ee,se;return{automationEnabled:(B=s(a))==null?void 0:B.automation_enabled,aiRunning:((V=s(a))==null?void 0:V.ai_running)&&((Y=s(a))==null?void 0:Y.automation_enabled),message:(ee=s(a))==null?void 0:ee.ai_progress_message,percentage:(se=s(a))==null?void 0:se.ai_progress_percentage}});qt(rc(L,{htmlString:r,get loading(){return s(f)},get injectionsEnabled(){return s(F)},get aiStatus(){return s(U)},get linkInjections(){return s(c)},set linkInjections(B){N(c,Z(B))}}),B=>N(h,Z(B)),()=>s(h))};O(C,L=>{s(l)&&s(u)&&L(A)})}var M=T(C,2);{var q=L=>{Ll(L,{get title(){return s(o).title_details},onclose:()=>N(o,null)})};O(M,L=>{s(o)&&s(o).title_details&&L(q)})}k(e,j),oe()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,app:null,initialize(e={token:"",selector:"",after_article_selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=Vn(uc,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),Cn()}};
9
10
 
10
11
  })();