{
  "version": 3,
  "sources": ["gallery-story.js"],
  "sourcesContent": ["import { register } from \"../../core/components.js\";\n\n/**\n * The gallery's steps, read one after another past a screen that stays put:\n * the step crossing the middle of the screen is the current one, and the\n * screen shows it.\n */\nregister(\"gallery-story\", (root) => {\n    const steps = root.find(\"[data-ref=step]\");\n    const screens = root.find(\"[data-ref=screen]\");\n    if (!(\"IntersectionObserver\" in window)) {\n        return;\n    }\n\n    function show(index) {\n        steps.each(function (each) {\n            this.classList.toggle(\"home-galleries__step--current\", each === index);\n        });\n        screens.each(function (each) {\n            this.classList.toggle(\"home-galleries__screen--current\", each === index);\n        });\n    }\n\n    const observer = new IntersectionObserver(\n        (entries) => {\n            entries\n                .filter((entry) => entry.isIntersecting)\n                .forEach((entry) => show(steps.index(entry.target)));\n        },\n        { rootMargin: \"-50% 0px -50% 0px\" },\n    );\n    steps.each(function () {\n        observer.observe(this);\n    });\n});\n"],
  "mappings": "AAAA,OAAS,YAAAA,MAAgB,2BAOzBA,EAAS,gBAAkBC,GAAS,CAChC,MAAMC,EAAQD,EAAK,KAAK,iBAAiB,EACnCE,EAAUF,EAAK,KAAK,mBAAmB,EAC7C,GAAI,EAAE,yBAA0B,QAC5B,OAGJ,SAASG,EAAKC,EAAO,CACjBH,EAAM,KAAK,SAAUI,EAAM,CACvB,KAAK,UAAU,OAAO,gCAAiCA,IAASD,CAAK,CACzE,CAAC,EACDF,EAAQ,KAAK,SAAUG,EAAM,CACzB,KAAK,UAAU,OAAO,kCAAmCA,IAASD,CAAK,CAC3E,CAAC,CACL,CAEA,MAAME,EAAW,IAAI,qBAChBC,GAAY,CACTA,EACK,OAAQC,GAAUA,EAAM,cAAc,EACtC,QAASA,GAAUL,EAAKF,EAAM,MAAMO,EAAM,MAAM,CAAC,CAAC,CAC3D,EACA,CAAE,WAAY,mBAAoB,CACtC,EACAP,EAAM,KAAK,UAAY,CACnBK,EAAS,QAAQ,IAAI,CACzB,CAAC,CACL,CAAC",
  "names": ["register", "root", "steps", "screens", "show", "index", "each", "observer", "entries", "entry"]
}
