From 9c051c80df4ee2897b0b0a5532761bd42350b0b6 Mon Sep 17 00:00:00 2001 From: "Dima Snisarenko (CI)" Date: Fri, 10 Nov 2023 07:22:34 +0000 Subject: [PATCH] Automatically update gh-pages [skip ci] --- examples.html | 2 +- index.html | 2 +- js/index.1.1c1172a8.js | 2 -- js/index.1.1c1172a8.js.map | 1 - js/index.1.d06bde03.js | 2 ++ js/index.1.d06bde03.js.map | 1 + 6 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 js/index.1.1c1172a8.js delete mode 100644 js/index.1.1c1172a8.js.map create mode 100644 js/index.1.d06bde03.js create mode 100644 js/index.1.d06bde03.js.map diff --git a/examples.html b/examples.html index 13c2955..9db34e8 100644 --- a/examples.html +++ b/examples.html @@ -1,4 +1,4 @@ -Image Comparison Slider - React, Vue, Angular - Usage Examples

Usage Examples

Installation and usage instructions are available on GitHub.

All images in the examples are given width="100%" property to make them responsive.

Default settings

+Image Comparison Slider - React, Vue, Angular - Usage Examples

Usage Examples

Installation and usage instructions are available on GitHub.

All images in the examples are given width="100%" property to make them responsive.

Default settings

diff --git a/index.html b/index.html index 504c19e..98c3a07 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Image Comparison Slider - React, Vue, Angular
First image example
Compare two images. Before and after.
Now try to use or arrows on the keyboard.
Amazing, isn't it?
Your star will make a big difference for this project.
Second image example
This free open source slider component was created to demonstrate the difference between two images. For example, to show the difference before and after applying photo effects or filters, to compare photos of rooms before and after construction, or to show landscape changes over time. The component is well suited for news portals, artists, or design portfolios.
Because it is a web component, it is compatible with almost any JS framework, web application, or design system. In addition, this component offers a wide range of settings - the examples section provides many ideas and styling techniques. The setup and settings documentation is available on the component's GitHub page.

Features

  • Mobile-friendly
    Mobile-friendly
  • Accessible
    Accessible
  • Responsive
    Responsive
  • Compact
    Compact
  • Adjustable
    Adjustable
  • Supports modern JS frameworks
    Supports modern JS frameworks
What it looks like on default / See more examples
First image example Second image example
© 2019 – Made with love and care by sneas .
\ No newline at end of file +Image Comparison Slider - React, Vue, Angular
First image example
Compare two images. Before and after.
Now try to use or arrows on the keyboard.
Amazing, isn't it?
Your star will make a big difference for this project.
Second image example
This free open source slider component was created to demonstrate the difference between two images. For example, to show the difference before and after applying photo effects or filters, to compare photos of rooms before and after construction, or to show landscape changes over time. The component is well suited for news portals, artists, or design portfolios.
Because it is a web component, it is compatible with almost any JS framework, web application, or design system. In addition, this component offers a wide range of settings - the examples section provides many ideas and styling techniques. The setup and settings documentation is available on the component's GitHub page.

Features

  • Mobile-friendly
    Mobile-friendly
  • Accessible
    Accessible
  • Responsive
    Responsive
  • Compact
    Compact
  • Adjustable
    Adjustable
  • Supports modern JS frameworks
    Supports modern JS frameworks
What it looks like on default / See more examples
First image example Second image example
© 2019 – Made with love and care by sneas .
\ No newline at end of file diff --git a/js/index.1.1c1172a8.js b/js/index.1.1c1172a8.js deleted file mode 100644 index ad27ba7..0000000 --- a/js/index.1.1c1172a8.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var t={9251:()=>{(()=>{"use strict";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,s){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e="rendered",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return"mousedown"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height},o=document.createElement("template");o.innerHTML='
';const n={ArrowLeft:-1,ArrowRight:1},r=["horizontal","vertical"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),h=t=>({x:t.pageX,y:t.pageY});class d extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.handle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=h(t);this.slideToPage(e)}},this.bodyUserSelectStyle="",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=h(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.handle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if("horizontal"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:"open"}),i=document.createElement("style");i.innerHTML=t.Z,this.getAttribute("nonce")&&i.setAttribute("nonce",this.getAttribute("nonce")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById("first"),this.secondElement=e.getElementById("second"),this.handleElement=e.getElementById("handle")}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover="false"!==t.toString().toLowerCase(),this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&"disabled"===this.getAttribute("keyboard")?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle"),this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){"hover"===t&&(this.hover=i),"direction"===t&&(this.direction=i),"keyboard"===t&&(this.keyboard="disabled"===i?"disabled":"enabled")}setExposure(t=0){var e;this.exposure=(e=this.exposure+t)<0?0:e>100?100:e,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(t=0){this.setExposure(t);const e=new Event("slide");this.dispatchEvent(e)}slideToPage(t){"horizontal"===this.slideDirection&&this.slideToPageX(t.x),"vertical"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}"undefined"!=typeof window&&window.customElements.define("img-comparison-slider",d)})()})()}},e={};function i(s){var o=e[s];if(void 0!==o)return o.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";i(9251)})()})(); -//# sourceMappingURL=index.1.1c1172a8.js.map \ No newline at end of file diff --git a/js/index.1.1c1172a8.js.map b/js/index.1.1c1172a8.js.map deleted file mode 100644 index 0f787cc..0000000 --- a/js/index.1.1c1172a8.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/index.1.1c1172a8.js","mappings":"uBAAA,MAAM,aAAa,IAAIA,EAAE,CAAC,IAAI,CAACA,EAAEC,EAAEC,KAAKA,EAAEC,EAAEF,EAAE,CAACG,EAAE,IAAIC,IAAI,IAAIC,EAAEJ,EAAE,KAAKK,EAAEL,EAAEG,EAAEC,EAAJJ,IAAS,SAAUF,GAAG,OAAOA,EAAE,EAAG,IAAGO,EAAEC,KAAK,CAACR,EAAES,GAAG,spFAAspF,KAAK,MAAMJ,EAAEE,GAAG,IAAIP,IAAIA,EAAEU,QAAQ,SAASV,GAAG,IAAIC,EAAE,GAAG,OAAOA,EAAEU,SAAS,WAAW,OAAOC,KAAKC,KAAI,SAAUZ,GAAG,IAAIC,EAAEF,EAAEC,GAAG,OAAOA,EAAE,GAAG,UAAUa,OAAOb,EAAE,GAAG,MAAMa,OAAOZ,EAAE,KAAKA,CAAE,IAAGa,KAAK,GAAG,EAAEd,EAAEC,EAAE,SAASF,EAAEE,EAAEI,GAAG,iBAAiBN,IAAIA,EAAE,CAAC,CAAC,KAAKA,EAAE,MAAM,IAAIO,EAAE,CAAC,EAAE,GAAGD,EAAE,IAAI,IAAID,EAAE,EA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AAOC,eAAeb,EAASgF,EAAK,CAAElE,YAAY,EAAMC,IAAKwH,EAAWvD,IAE1E,ECNDgD,EAAoBnI,EAAI,CAAC2I,EAAKC,IAAU7H,OAAOI,UAAUC,eAAeC,KAAKsH,EAAKC,G","sources":["webpack://@img-comparison-slider/www/../img-comparison-slider/dist/index.js","webpack://@img-comparison-slider/www/webpack/bootstrap","webpack://@img-comparison-slider/www/webpack/runtime/compat get default export","webpack://@img-comparison-slider/www/webpack/runtime/define property getters","webpack://@img-comparison-slider/www/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["(()=>{\"use strict\";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:\" \";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',\"\"]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?\"@media \".concat(e[2],\" {\").concat(i,\"}\"):i})).join(\"\")},e.i=function(t,i,s){\"string\"==typeof t&&(t=[[null,t,\"\"]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e=\"rendered\",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return\"mousedown\"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height},o=document.createElement(\"template\");o.innerHTML='
';const n={ArrowLeft:-1,ArrowRight:1},r=[\"horizontal\",\"vertical\"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),h=t=>({x:t.pageX,y:t.pageY});class d extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute(\"value\")?parseFloat(this.getAttribute(\"value\")):50,this.slideOnHover=!1,this.slideDirection=\"horizontal\",this.keyboard=\"enabled\",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.handle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=h(t);this.slideToPage(e)}},this.bodyUserSelectStyle=\"\",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener(\"mousemove\",this.onMouseMove),window.addEventListener(\"mouseup\",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=h(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect=\"none\"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener(\"mousemove\",this.onMouseMove),window.removeEventListener(\"mouseup\",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.handle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if(\"horizontal\"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove(\"focused\")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add(\"focused\")},this.onKeyDown=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:\"open\"}),i=document.createElement(\"style\");i.innerHTML=t.Z,this.getAttribute(\"nonce\")&&i.setAttribute(\"nonce\",this.getAttribute(\"nonce\")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById(\"first\"),this.secondElement=e.getElementById(\"second\"),this.handleElement=e.getElementById(\"handle\")}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover=\"false\"!==t.toString().toLowerCase(),this.removeEventListener(\"mousemove\",this.onMouseMove),this.slideOnHover&&this.addEventListener(\"mousemove\",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return[\"hover\",\"direction\"]}connectedCallback(){this.hasAttribute(\"tabindex\")||(this.tabIndex=0),this.addEventListener(\"dragstart\",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute(\"keyboard\")&&\"disabled\"===this.getAttribute(\"keyboard\")?\"disabled\":\"enabled\",this.addEventListener(\"keydown\",this.onKeyDown),this.addEventListener(\"keyup\",this.onKeyUp),this.addEventListener(\"focus\",this.onFocus),this.addEventListener(\"blur\",this.onBlur),this.addEventListener(\"touchstart\",this.onTouchStart,{passive:!0}),this.addEventListener(\"touchmove\",this.onTouchMove,{passive:!1}),this.addEventListener(\"touchend\",this.onTouchEnd),this.addEventListener(\"mousedown\",this.onMouseDown),this.handle=this.hasAttribute(\"handle\"),this.hover=this.hasAttribute(\"hover\")?this.getAttribute(\"hover\"):this.slideOnHover,this.direction=this.hasAttribute(\"direction\")?this.getAttribute(\"direction\"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){\"hover\"===t&&(this.hover=i),\"direction\"===t&&(this.direction=i),\"keyboard\"===t&&(this.keyboard=\"disabled\"===i?\"disabled\":\"enabled\")}setExposure(t=0){var e;this.exposure=(100,(e=this.exposure+t)<0?0:e>100?100:e),this.firstElement.style.setProperty(\"--exposure\",100-this.exposure+\"%\")}slide(t=0){this.setExposure(t);const e=new Event(\"slide\");this.dispatchEvent(e)}slideToPage(t){\"horizontal\"===this.slideDirection&&this.slideToPageX(t.x),\"vertical\"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty(\"--transition-time\",\"100ms\"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty(\"--transition-time\",\"var(--keyboard-transition-time)\");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\")}}\"undefined\"!=typeof window&&window.customElements.define(\"img-comparison-slider\",d)})()})();\n//# sourceMappingURL=index.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["t","e","i","d","Z","n","s","o","push","id","exports","toString","this","map","concat","join","length","r","a","h","__esModule","default","Object","defineProperty","enumerable","get","prototype","hasOwnProperty","call","getBoundingClientRect","type","clientX","clientY","touches","x","width","y","height","document","createElement","innerHTML","ArrowLeft","ArrowRight","pageX","pageY","HTMLElement","constructor","super","exposure","hasAttribute","parseFloat","getAttribute","slideOnHover","slideDirection","keyboard","isMouseDown","animationDirection","isFocused","handle","onMouseMove","slideToPage","bodyUserSelectStyle","onMouseDown","handleElement","preventDefault","window","addEventListener","onWindowMouseUp","enableTransition","focus","body","style","userSelect","removeEventListener","touchStartPoint","isTouchComparing","hasTouchMoved","onTouchStart","onTouchMove","Math","abs","onTouchEnd","onBlur","stopSlideAnimation","firstElement","classList","remove","onFocus","add","onKeyDown","key","startSlideAnimation","onKeyUp","resetDimensions","imageWidth","offsetWidth","imageHeight","offsetHeight","attachShadow","mode","setAttribute","appendChild","content","cloneNode","getElementById","secondElement","value","setExposure","hover","toLowerCase","direction","slide","includes","observedAttributes","connectedCallback","tabIndex","ResizeObserver","observe","passive","contains","disconnectedCallback","transitionTimer","clearTimeout","attributeChangedCallback","setProperty","Event","dispatchEvent","slideToPageX","slideToPageY","left","scrollX","top","scrollY","setTimeout","requestAnimationFrame","customElements","define","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","module","__webpack_modules__","getter","definition","obj","prop"],"sourceRoot":""} \ No newline at end of file diff --git a/js/index.1.d06bde03.js b/js/index.1.d06bde03.js new file mode 100644 index 0000000..b1b8241 --- /dev/null +++ b/js/index.1.d06bde03.js @@ -0,0 +1,2 @@ +(()=>{var t={9251:()=>{(()=>{"use strict";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,s){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e="rendered",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return"mousedown"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height},o=document.createElement("template");o.innerHTML='
';const n={ArrowLeft:-1,ArrowRight:1},r=["horizontal","vertical"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),d=t=>({x:t.pageX,y:t.pageY});class h extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=d(t);this.slideToPage(e)}},this.bodyUserSelectStyle="",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=d(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.dragByHandle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if("horizontal"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:"open"}),i=document.createElement("style");i.innerHTML=t.Z,this.getAttribute("nonce")&&i.setAttribute("nonce",this.getAttribute("nonce")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById("first"),this.handleElement=e.getElementById("handle")}set handle(t){this.dragByHandle=!!t}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover="false"!==t.toString().toLowerCase(),this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&"disabled"===this.getAttribute("keyboard")?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle")?this.getAttribute("handle"):this.dragByHandle,this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){"hover"===t&&(this.hover=i),"direction"===t&&(this.direction=i),"keyboard"===t&&(this.keyboard="disabled"===i?"disabled":"enabled")}setExposure(t=0){var e;this.exposure=(e=this.exposure+t)<0?0:e>100?100:e,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(t=0){this.setExposure(t);const e=new Event("slide");this.dispatchEvent(e)}slideToPage(t){"horizontal"===this.slideDirection&&this.slideToPageX(t.x),"vertical"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}"undefined"!=typeof window&&window.customElements.define("img-comparison-slider",h)})()})()}},e={};function i(s){var o=e[s];if(void 0!==o)return o.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";i(9251)})()})(); +//# sourceMappingURL=index.1.d06bde03.js.map \ No newline at end of file diff --git a/js/index.1.d06bde03.js.map b/js/index.1.d06bde03.js.map new file mode 100644 index 0000000..52cb23c --- /dev/null +++ b/js/index.1.d06bde03.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js/index.1.d06bde03.js","mappings":"uBAAA,MAAM,aAAa,IAAIA,EAAE,CAAC,IAAI,CAACA,EAAEC,EAAEC,KAAKA,EAAEC,EAAEF,EAAE,CAACG,EAAE,IAAIC,IAAI,IAAIC,EAAEJ,EAAE,KAAKK,EAAEL,EAAEG,EAAEC,EAAJJ,IAAS,SAAUF,GAAG,OAAOA,EAAE,EAAG,IAAGO,EAAEC,KAAK,CAACR,EAAES,GAAG,spFAAspF,KAAK,MAAMJ,EAAEE,GAAG,IAAIP,IAAIA,EAAEU,QAAQ,SAASV,GAAG,IAAIC,EAAE,GAAG,OAAOA,EAAEU,SAAS,WAAW,OAAOC,KAAKC,KAAI,SAAUZ,GAAG,IAAIC,EAAEF,EAAEC,GAAG,OAAOA,EAAE,GAAG,UAAUa,OAAOb,EAAE,GAAG,MAAMa,OAAOZ,EAAE,KAAKA,CAAE,IAAGa,KAAK,GAAG,EAAEd,EAAEC,EAAE,SAASF,EAAEE,EAAEI,GAAG,iBAAiBN,IAAIA,EAAE,CAAC,CAAC,KAAKA,EAAE,MAAM,IAAIO,EAAE,CAAC,EAAE,GAAGD,EAAE,IAAI,IAAID,EAAE,EAA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AAOsD,EACXP,EAAoBnI,EAAE0I,EAAYtD,KAAS+C,EAAoBnI,EAAEG,EAASiF,IAC5ErE,OAAOC,eAAeb,EAASiF,EAAK,CAAEnE,YAAY,EAAMC,IAAKwH,EAAWtD,IAE1E,ECND+C,EAAoBnI,EAAI,CAAC2I,EAAKC,IAAU7H,OAAOI,UAAUC,eAAeC,KAAKsH,EAAKC,G","sources":["webpack://@img-comparison-slider/www/../img-comparison-slider/dist/index.js","webpack://@img-comparison-slider/www/webpack/bootstrap","webpack://@img-comparison-slider/www/webpack/runtime/compat get default export","webpack://@img-comparison-slider/www/webpack/runtime/define property getters","webpack://@img-comparison-slider/www/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["(()=>{\"use strict\";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:\" \";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',\"\"]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?\"@media \".concat(e[2],\" {\").concat(i,\"}\"):i})).join(\"\")},e.i=function(t,i,s){\"string\"==typeof t&&(t=[[null,t,\"\"]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e=\"rendered\",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return\"mousedown\"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height},o=document.createElement(\"template\");o.innerHTML='
';const n={ArrowLeft:-1,ArrowRight:1},r=[\"horizontal\",\"vertical\"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),h=t=>({x:t.pageX,y:t.pageY});class d extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute(\"value\")?parseFloat(this.getAttribute(\"value\")):50,this.slideOnHover=!1,this.slideDirection=\"horizontal\",this.keyboard=\"enabled\",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=h(t);this.slideToPage(e)}},this.bodyUserSelectStyle=\"\",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener(\"mousemove\",this.onMouseMove),window.addEventListener(\"mouseup\",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=h(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect=\"none\"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener(\"mousemove\",this.onMouseMove),window.removeEventListener(\"mouseup\",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.dragByHandle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if(\"horizontal\"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove(\"focused\")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add(\"focused\")},this.onKeyDown=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:\"open\"}),i=document.createElement(\"style\");i.innerHTML=t.Z,this.getAttribute(\"nonce\")&&i.setAttribute(\"nonce\",this.getAttribute(\"nonce\")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById(\"first\"),this.handleElement=e.getElementById(\"handle\")}set handle(t){this.dragByHandle=!!t}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover=\"false\"!==t.toString().toLowerCase(),this.removeEventListener(\"mousemove\",this.onMouseMove),this.slideOnHover&&this.addEventListener(\"mousemove\",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return[\"hover\",\"direction\"]}connectedCallback(){this.hasAttribute(\"tabindex\")||(this.tabIndex=0),this.addEventListener(\"dragstart\",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute(\"keyboard\")&&\"disabled\"===this.getAttribute(\"keyboard\")?\"disabled\":\"enabled\",this.addEventListener(\"keydown\",this.onKeyDown),this.addEventListener(\"keyup\",this.onKeyUp),this.addEventListener(\"focus\",this.onFocus),this.addEventListener(\"blur\",this.onBlur),this.addEventListener(\"touchstart\",this.onTouchStart,{passive:!0}),this.addEventListener(\"touchmove\",this.onTouchMove,{passive:!1}),this.addEventListener(\"touchend\",this.onTouchEnd),this.addEventListener(\"mousedown\",this.onMouseDown),this.handle=this.hasAttribute(\"handle\")?this.getAttribute(\"handle\"):this.dragByHandle,this.hover=this.hasAttribute(\"hover\")?this.getAttribute(\"hover\"):this.slideOnHover,this.direction=this.hasAttribute(\"direction\")?this.getAttribute(\"direction\"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){\"hover\"===t&&(this.hover=i),\"direction\"===t&&(this.direction=i),\"keyboard\"===t&&(this.keyboard=\"disabled\"===i?\"disabled\":\"enabled\")}setExposure(t=0){var e;this.exposure=(100,(e=this.exposure+t)<0?0:e>100?100:e),this.firstElement.style.setProperty(\"--exposure\",100-this.exposure+\"%\")}slide(t=0){this.setExposure(t);const e=new Event(\"slide\");this.dispatchEvent(e)}slideToPage(t){\"horizontal\"===this.slideDirection&&this.slideToPageX(t.x),\"vertical\"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty(\"--transition-time\",\"100ms\"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty(\"--transition-time\",\"var(--keyboard-transition-time)\");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\")}}\"undefined\"!=typeof window&&window.customElements.define(\"img-comparison-slider\",d)})()})();\n//# sourceMappingURL=index.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["t","e","i","d","Z","n","s","o","push","id","exports","toString","this","map","concat","join","length","r","a","h","__esModule","default","Object","defineProperty","enumerable","get","prototype","hasOwnProperty","call","getBoundingClientRect","type","clientX","clientY","touches","x","width","y","height","document","createElement","innerHTML","ArrowLeft","ArrowRight","pageX","pageY","HTMLElement","constructor","super","exposure","hasAttribute","parseFloat","getAttribute","slideOnHover","slideDirection","keyboard","isMouseDown","animationDirection","isFocused","dragByHandle","onMouseMove","slideToPage","bodyUserSelectStyle","onMouseDown","handle","handleElement","preventDefault","window","addEventListener","onWindowMouseUp","enableTransition","focus","body","style","userSelect","removeEventListener","touchStartPoint","isTouchComparing","hasTouchMoved","onTouchStart","onTouchMove","Math","abs","onTouchEnd","onBlur","stopSlideAnimation","firstElement","classList","remove","onFocus","add","onKeyDown","key","startSlideAnimation","onKeyUp","resetDimensions","imageWidth","offsetWidth","imageHeight","offsetHeight","attachShadow","mode","setAttribute","appendChild","content","cloneNode","getElementById","value","setExposure","hover","toLowerCase","direction","slide","includes","observedAttributes","connectedCallback","tabIndex","ResizeObserver","observe","passive","contains","disconnectedCallback","transitionTimer","clearTimeout","attributeChangedCallback","setProperty","Event","dispatchEvent","slideToPageX","slideToPageY","left","scrollX","top","scrollY","setTimeout","requestAnimationFrame","customElements","define","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","module","__webpack_modules__","getter","definition","obj","prop"],"sourceRoot":""} \ No newline at end of file