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AAiBD,SApCO,CAAR;AAqCD,OAtCM,CAAP;AADoB;AAwCrB;;AACY,MAATd,SAAS,GAAG;AACd,WAAO,KAAKjB,IAAL,KAAc,WAArB;AACD;;AACD2C,EAAAA,MAAM,GAAG;AACP,UAAMC,IAAI,GAAGjD,4DAAU,CAAC,IAAD,CAAvB;AACA,WAAQN,qDAAC,CAACI,iDAAD,EAAO;AAAEoD,MAAAA,IAAI,EAAE,cAAR;AAAwBC,MAAAA,KAAK,EAAE;AAC3C,SAACF,IAAD,GAAQ,IADmC;AAE3C,qBAAa,KAAK3B;AAFyB;AAA/B,KAAP,CAAT;AAID;;AACK,MAAFV,EAAE,GAAG;AAAE,WAAOhB,qDAAU,CAAC,IAAD,CAAjB;AAA0B;;AAvEd,CAAzB;;AAyEA,MAAMmD,YAAY,GAAIK,MAAD,IAAY;AAC/BA,EAAAA,MAAM,CAACb,SAAP,CAAiBC,GAAjB,CAAqB,UAArB;AACAM,EAAAA,UAAU,CAAC,MAAM;AACfM,IAAAA,MAAM,CAACC,MAAP;AACD,GAFS,EAEP,GAFO,CAAV;AAGD,CALD;;AAMA,MAAM9B,OAAO,GAAG,EAAhB;AACA,MAAMG,oBAAoB,GAAG,GAA7B;AACAxB,YAAY,CAACuC,KAAb,GAAqBxC,eAArB","sources":["./node_modules/@ionic/core/dist/esm/ion-ripple-effect.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, f as readTask, c as writeTask, h, i as getElement, H as Host } from './index-06cd27b1.js';\nimport { b as getIonMode } from './ionic-global-a049bcbf.js';\n\nconst rippleEffectCss = \":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}\";\n\nlet RippleEffect = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * Sets the type of ripple-effect:\n *\n * - `bounded`: the ripple effect expands from the user's click position\n * - `unbounded`: the ripple effect expands from the center of the button and overflows the container.\n *\n * NOTE: Surfaces for bounded ripples should have the overflow property set to hidden,\n * while surfaces for unbounded ripples should have it set to visible.\n */\n this.type = 'bounded';\n }\n /**\n * Adds the ripple effect to the parent element.\n *\n * @param x The horizontal coordinate of where the ripple should start.\n * @param y The vertical coordinate of where the ripple should start.\n */\n async addRipple(x, y) {\n return new Promise(resolve => {\n readTask(() => {\n const rect = this.el.getBoundingClientRect();\n const width = rect.width;\n const height = rect.height;\n const hypotenuse = Math.sqrt(width * width + height * height);\n const maxDim = Math.max(height, width);\n const maxRadius = this.unbounded ? maxDim : hypotenuse + PADDING;\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const finalScale = maxRadius / initialSize;\n let posX = x - rect.left;\n let posY = y - rect.top;\n if (this.unbounded) {\n posX = width * 0.5;\n posY = height * 0.5;\n }\n const styleX = posX - initialSize * 0.5;\n const styleY = posY - initialSize * 0.5;\n const moveX = width * 0.5 - posX;\n const moveY = height * 0.5 - posY;\n writeTask(() => {\n const div = document.createElement('div');\n div.classList.add('ripple-effect');\n const style = div.style;\n style.top = styleY + 'px';\n style.left = styleX + 'px';\n style.width = style.height = initialSize + 'px';\n style.setProperty('--final-scale', `${finalScale}`);\n style.setProperty('--translate-end', `${moveX}px, ${moveY}px`);\n const container = this.el.shadowRoot || this.el;\n container.appendChild(div);\n setTimeout(() => {\n resolve(() => {\n removeRipple(div);\n });\n }, 225 + 100);\n });\n });\n });\n }\n get unbounded() {\n return this.type === 'unbounded';\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { role: \"presentation\", class: {\n [mode]: true,\n 'unbounded': this.unbounded\n } }));\n }\n get el() { return getElement(this); }\n};\nconst removeRipple = (ripple) => {\n ripple.classList.add('fade-out');\n setTimeout(() => {\n ripple.remove();\n }, 200);\n};\nconst PADDING = 10;\nconst INITIAL_ORIGIN_SCALE = 0.5;\nRippleEffect.style = rippleEffectCss;\n\nexport { RippleEffect as ion_ripple_effect };\n"],"names":["r","registerInstance","f","readTask","c","writeTask","h","i","getElement","H","Host","b","getIonMode","rippleEffectCss","RippleEffect","constructor","hostRef","type","addRipple","x","y","Promise","resolve","rect","el","getBoundingClientRect","width","height","hypotenuse","Math","sqrt","maxDim","max","maxRadius","unbounded","PADDING","initialSize","floor","INITIAL_ORIGIN_SCALE","finalScale","posX","left","posY","top","styleX","styleY","moveX","moveY","div","document","createElement","classList","add","style","setProperty","container","shadowRoot","appendChild","setTimeout","removeRipple","render","mode","role","class","ripple","remove","ion_ripple_effect"],"sourceRoot":"webpack:///"}