@ionic/core 9.0.8-dev.11791470896.15d54667 → 9.0.8-dev.11791991772.1a974f6b

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.
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import{r as t,d as i,a as o,w as a,i as e,h as s,f as r,g as n}from"./p-BpRUsN_W.js";import{i as d,f as h,a as p,d as l,r as c,b as m,p as f}from"./p-CXs4J83x.js";import{C as u,a as b,d as x}from"./p-nCAPr1Ah.js";import{w as v,o as w,g,e as y,r as k,b as A,h as Y}from"./p-Co7eql8D.js";import{c as S}from"./p-B-hirT0v.js";import{g as D}from"./p-C2LaBx3E.js";import{G as E,O,F as C,n as T,d as M,B,h as P,r as N,j as I,k as j,e as R,f as $,g as L}from"./p-C1WYZOZj.js";import{g as z}from"./p-byZM6qHV.js";import{e as F,w as W}from"./p-DQXtveHv.js";import{b as H}from"./p-SEecsUh7.js";import{KEYBOARD_DID_OPEN as V}from"./p-DXXGkPA8.js";import{c as Z}from"./p-7l6ENjIV.js";import{g as _}from"./p-hHmYLOfE.js";import{createGesture as K}from"./p-D0YpjgON.js";import"./p-Dojwmvde.js";import"./p-B_gJaBk0.js";import"./p-BY4FwwBp.js";var U;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(U||(U={}));const G={getEngine(){const t=D();if(t?.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const i=this.getEngine();i&&i.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return U.Default;const{style:i}=await t.getInfo();return i}},X=(t,i)=>{if(1===i)return 0;const o=1/(1-i);return t*o+-i*o},q=()=>{!v||v.innerWidth>=768||G.setStyle({style:U.Dark})},J=(t=U.Default)=>{!v||v.innerWidth>=768||G.setStyle({style:t})},Q=t=>{const i=d(t)?g(t).querySelector(".inner-scroll"):t;return!h(t)&&0===i.scrollTop},tt=async(t,i)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,E)&&(i.isRunning()?i.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},it=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,ot=.915,at=(t,i)=>y(400,t/Math.abs(1.1*i),500),et=(t,i)=>{const o=window.innerHeight,a=t.getBoundingClientRect().top,e=Math.round(1e3*(1-i/(o-a)))/1e3;return Math.max(0,Math.min(1,e))},st=t=>{const{currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:a}=t,e=void 0===o||o<i,s=e?`calc(var(--backdrop-opacity) * ${i})`:"0",r=Z("backdropAnimation").fromTo("opacity",0,s);return e&&r.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:Z("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*i}%)`}]),backdropAnimation:r,contentAnimation:a?void 0:Z("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-i)+"%"},{offset:1,opacity:1,maxHeight:100*i+"%"}])}},rt=t=>{const{currentBreakpoint:i,backdropBreakpoint:o}=t,a=`calc(var(--backdrop-opacity) * ${X(i,o)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],s=[{offset:0,opacity:a},{offset:o,opacity:0},{offset:1,opacity:0}],r=Z("backdropAnimation").keyframes(0!==o?s:e);return{wrapperAnimation:Z("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*i}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:r}},nt=(t,i)=>{const{presentingEl:o,currentBreakpoint:a,expandToScroll:e}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n,contentAnimation:d}=void 0!==a?st(i):{backdropAnimation:Z().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:Z().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&d?.addElement(t.querySelector(".ion-page"));const h=Z("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([r]);if(d&&h.addAnimation(d),o){const t=window.innerWidth<768,i="ION-MODAL"===o.tagName&&void 0!==o.presentingElement,a=g(o),e=Z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${i?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>s.style.setProperty("background-color","black"))).addElement(o).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),h.addAnimation(e)}else if(h.addAnimation(n),i){const t=`translateY(-10px) scale(${i?ot:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const o=Z().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([e,o])}else r.fromTo("opacity","0","1")}else h.addAnimation(n);return h},dt=(t,i,o=500)=>{const{presentingEl:a,currentBreakpoint:e}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n}=void 0!==e?rt(i):{backdropAnimation:Z().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:Z().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=Z("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o).addAnimation(r);if(a){const t=window.innerWidth<768,i="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,o=g(a),e=Z().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(s.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&s.style.setProperty("background-color",""))})),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",o=`translateY(${i?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:o,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(e)}else if(d.addAnimation(n),i){const t=`translateY(-10px) scale(${i?ot:1})`;e.addElement(o.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=Z().addElement(o.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([e,a])}else r.fromTo("opacity","1","0")}else d.addAnimation(n);return d},ht=(t,i)=>{const{currentBreakpoint:o,expandToScroll:a}=i,e=g(t),{wrapperAnimation:s,backdropAnimation:r,contentAnimation:n}=void 0!==o?st(i):{backdropAnimation:Z().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:Z().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};r.addElement(e.querySelector("ion-backdrop")),s.addElement(e.querySelector(".modal-wrapper")),!a&&n?.addElement(t.querySelector(".ion-page"));const d=Z().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([r,s]);return n&&d.addAnimation(n),d},pt=(t,i)=>{const{currentBreakpoint:o}=i,a=g(t),{wrapperAnimation:e,backdropAnimation:s}=void 0!==o?rt(i):{backdropAnimation:Z().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:Z().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return s.addElement(a.querySelector("ion-backdrop")),e.addElement(a.querySelector(".modal-wrapper")),Z().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([s,e])};let lt=null,ct=!1;const mt=()=>{if(null!==lt)return lt;const t=v?.document;if(!t?.body)return 0;const i=t.createElement("div");i.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);",t.body.appendChild(i);const o=parseFloat(getComputedStyle(i).paddingTop)||0;return i.remove(),lt=o,ct||(ct=!0,k((()=>{lt=null,ct=!1}))),o},ft=t=>{const i=getComputedStyle(t),o=T(i.getPropertyValue("--width")),a=T(i.getPropertyValue("--height"));return"fullscreen"===o&&"fullscreen"===a?{vertical:!0,horizontal:!0}:ut(t)},ut=t=>{const i=t.shadowRoot?.querySelector(".modal-wrapper");if(null==i||void 0===v)return{vertical:!1,horizontal:!1};const o=t.classList.contains("overlay-hidden");o&&t.classList.remove("overlay-hidden");const{width:a,height:e}=i.getBoundingClientRect();return o&&t.classList.add("overlay-hidden"),{vertical:e>=v.innerHeight-5,horizontal:a>=v.innerWidth-5}},bt=(t,i)=>{t.style.setProperty("--ion-safe-area-top",i.top),t.style.setProperty("--ion-safe-area-bottom",i.bottom),t.style.setProperty("--ion-safe-area-left",i.left),t.style.setProperty("--ion-safe-area-right",i.right)},xt=class{constructor(o){t(this,o),this.didPresent=i(this,"ionModalDidPresent",7),this.willPresent=i(this,"ionModalWillPresent",7),this.willDismiss=i(this,"ionModalWillDismiss",7),this.didDismiss=i(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=i(this,"ionBreakpointDidChange",7),this.didPresentShorthand=i(this,"didPresent",7),this.willPresentShorthand=i(this,"willPresent",7),this.willDismissShorthand=i(this,"willDismiss",7),this.didDismissShorthand=i(this,"didDismiss",7),this.ionMount=i(this,"ionMount",7),this.ionDragStart=i(this,"ionDragStart",7),this.ionDragMove=i(this,"ionDragMove",7),this.ionDragEnd=i(this,"ionDragEnd",7),this.lockController=S(),this.triggerController=M(),this.coreDelegate=u(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.isPresenting=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="cycle",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:i}=this;"cycle"===i&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,B)},this.onLifecycle=t=>{const i=this.usersElement,o=vt[t.type];if(i&&o){const a=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});i.dispatchEvent(a)}},this.onModalFocus=t=>{const{dragHandleEl:i,el:o}=this;t.target===o&&null==o.shadowRoot?.activeElement&&i&&-1!==i.tabIndex&&i.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,i){!0===t&&!1===i?this.present():!1===t&&!0===i&&this.dismiss()}triggerChanged(){const{trigger:t,el:i,triggerController:o}=this;t&&o.addClickListener(i,t)}onWindowResize(){this.presented&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{const t=this.getSafeAreaContext();if(!t.isCardModal||this.enterAnimation||this.leaveAnimation||this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),!t.isSheetModal&&!t.isCardModal){this.updateSafeAreaOverrides();const{contentEl:t,hasFooter:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(t),this.applyFullscreenSafeAreaTo(t,i)}}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,i)=>t-i)))}connectedCallback(){const{el:t}=this;P(t),this.triggerChanged(),(this.presented||this.isPresenting)&&this.restoreSafeAreaOverrides(),this.presented&&(N(t),this.initParentRemovalObserver())}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.presented&&I()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:i,el:a,htmlAttributes:e}=this,s=this.isSheetModal=void 0!==t&&void 0!==i,r=["aria-label","role"];this.inheritedAttributes=A(a,r),a.parentNode&&(this.cachedOriginalParent=a.parentNode),void 0!==e&&r.forEach((t=>{e[t]&&(this.inheritedAttributes={...this.inheritedAttributes,[t]:e[t]},delete e[t])})),s&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===i||t.includes(i)||o("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),this.htmlAttributes?.id||j(this.el)}componentDidLoad(){!0===this.isOpen&&k((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const i=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:i,delegate:this.workingDelegate=i?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,i){const{canDismiss:o}=this;return"function"==typeof o?o(t,i):o}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:i,el:o}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:s}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await b(s,o,this.component,["ion-page"],this.componentProps,e),Y(o)?await F(this.usersElement):this.keepContentsMounted||await W(),a((()=>this.el.classList.add("show-modal"))),this.isSheetModal=void 0!==this.breakpoints&&void 0!==this.initialBreakpoint,this.isPresenting=!0;const r=void 0!==i;try{this.setInitialSafeAreaOverrides(),r&&"ios"===H(this)&&(this.statusBarStyle=await G.getStyle(),q()),await R(this,"modalEnter",nt,ht,{presentingEl:i,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll})}finally{this.isPresenting=!1}this.updateSafeAreaOverrides(),this.applyFullscreenSafeArea(),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),k((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(V,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():r&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){if("ios"!==H(this))return;const{el:t}=this,i=this.leaveAnimation||e.get("modalLeave",dt),o=this.animation=i(t,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});m(t)?(this.gesture=((t,i,o,a,e,s,r)=>{const n=.5,h=t.offsetHeight;let m=!1,f=!1,u=null,b=!0,x=0;const v=K({el:t,gestureName:"modalSwipeToClose",gesturePriority:O,direction:"y",threshold:10,canStart:t=>{const i=t.event.target;return null===i||!i.closest||(u=p(i),u?Q(u):null===i.closest("ion-footer"))},onStart:o=>{const{deltaY:a}=o;window.getSelection()?.removeAllRanges(),b=!u||!d(u)||u.scrollY,f=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&u&&l(u),i.progressStart(!0,m?1:0),e()},onMove:a=>{const{deltaY:e}=a;e>0&&u&&l(u);const r=a.deltaY/h,d=r>=0&&f,p=d?.2:.9999,c=d?it(r/p):r,m=y(1e-4,c,p);i.progressStep(m),m>=n&&x<n?J(o):m<n&&x>=n&&q(),x=m;const b={currentY:a.currentY,deltaY:a.deltaY,velocityY:a.velocityY,progress:et(t,a.deltaY)};s(b)},onEnd:o=>{const e=o.velocityY,s=o.deltaY/h,d=s>=0&&f,p=d?.2:.9999,l=d?it(s/p):s,x=y(1e-4,l,p),w=!d&&(o.deltaY+1e3*e)/h>=n;let g=w?-.001:.001;w?(i.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=_([0,0],[.32,.72],[0,1],[1,1],x)[0]):(i.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=_([0,0],[1,0],[.68,.28],[1,1],x)[0]);const k=at(w?s*h:(1-x)*h,e);m=w,v.enable(!1),u&&c(u,b),i.onFinish((()=>{w||v.enable(!0)})).progressEnd(w?1:0,g,k);const A=d&&x>p/4;A?tt(t,i):w&&a();const Y=d?A&&"function"==typeof t.canDismiss:w,S={currentY:o.currentY,deltaY:o.deltaY,velocityY:o.velocityY,progress:et(t,o.deltaY),isDismissing:Y};r(S)}});return v})(t,o,this.statusBarStyle??U.Default,(()=>this.cardOnDismiss()),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t))),this.gesture.enable(!0)):f(t)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:i,backdropBreakpoint:o}=this;if(!t||void 0===i)return;const a=this.enterAnimation||e.get("modalEnter",nt),s=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:this.expandToScroll});s.progressStart(!0,1);const{gesture:r,moveSheetToBreakpoint:n,resetContentScroll:h}=((t,i,o,a,e,s,r=[],n,h,l,c,m,f,u)=>{const b={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},x=t.querySelector("ion-content"),v=x?.scrollY??!0,w=o.clientHeight;let A=a,Y=0,S=!1,D=null,E=null,O=null,T=null;const M=r[r.length-1],B=r[0],P=s.childAnimations.find((t=>"wrapperAnimation"===t.id)),N=s.childAnimations.find((t=>"backdropAnimation"===t.id)),I=s.childAnimations.find((t=>"contentAnimation"===t.id)),j=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),i.style.setProperty("pointer-events","auto"),t.classList.remove(C))},R=()=>{t.style.setProperty("pointer-events","none"),i.style.setProperty("pointer-events","none"),t.classList.add(C)},$=i=>{if(!E&&(E=Array.from(t.querySelectorAll("ion-footer")),!E.length))return;const o=t.querySelector(".ion-page");if(T=i,"stationary"===i)E.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),o?.style.removeProperty("padding-bottom"),o?.appendChild(t)}));else{let i=0;E.forEach(((o,a)=>{const e=o.getBoundingClientRect(),s=document.body.getBoundingClientRect();i+=o.clientHeight;const r=e.top-s.top,n=e.left-s.left;if(o.style.setProperty("--pinned-width",`${o.clientWidth}px`),o.style.setProperty("--pinned-height",`${o.clientHeight}px`),o.style.setProperty("--pinned-top",`${r}px`),o.style.setProperty("--pinned-left",`${n}px`),0===a){O=r;const i=t.querySelector("ion-header");i&&(O-=i.clientHeight)}})),E.forEach((t=>{o?.style.setProperty("padding-bottom",`${i}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};P&&N&&(P.keyframes([...b.WRAPPER_KEYFRAMES]),N.keyframes([...b.BACKDROP_KEYFRAMES]),I?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-A),A>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():R()),x&&A!==M&&n&&(x.scrollY=!1);const L=i=>{const{breakpoint:o,canDismiss:a,breakpointOffset:d,animated:h}=i,p=a&&0===o,m=p?A:o,f=0!==m;return A=0,P&&N&&(P.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-m)}%)`}]),N.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${X(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${X(m,e)})`}]),I&&I.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*m+"%"}]),s.progressStep(0)),H.enable(!1),p?tt(t,s):f||l(),!x||m!==r[r.length-1]&&n||(x.scrollY=v),n||0!==m||$("stationary"),new Promise((i=>{s.onFinish((()=>{f?(n||$("stationary"),P&&N?k((()=>{P.keyframes([...b.WRAPPER_KEYFRAMES]),N.keyframes([...b.BACKDROP_KEYFRAMES]),I?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-m),A=m,c(A),A>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():R(),H.enable(!0),i()})):(H.enable(!0),i())):i()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},z=(t,i)=>{const o=F(t+350*i);return r.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t))},F=t=>{const i=Math.round(1e3*(A-t/w))/1e3;return y(0,i,1)},W=t=>{const i=(F(t)-B)/(M-B);return y(0,i,1)},H=K({el:o,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const i=p(t.event.target);return A=h(),!(i&&(!n||1===A))||Q(i)},onStart:i=>{if(window.getSelection()?.removeAllRanges(),S=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===B,!n){const t=p(i.event.target);D=t&&d(t)?g(t).querySelector(".inner-scroll"):t}n||$("moving"),i.deltaY>0&&x&&(x.scrollY=!1),k((()=>{t.focus()})),s.progressStart(!0,1-A),m()},onMove:t=>{if(n||null===O||null===T||(t.currentY>=O&&"moving"===T?$("stationary"):t.currentY<O&&"stationary"===T&&$("moving")),!n&&t.deltaY<=0&&D)return;t.deltaY>0&&x&&(x.scrollY=!1);const i=r.length>1?1-r[1]:void 0,o=1-A+t.deltaY/w,a=void 0!==i&&o>=i&&S,e=a?.95:.9999,d=a&&void 0!==i?i+it((o-i)/(e-i)):o;Y=y(1e-4,d,e),s.progressStep(Y);const h=z(t.deltaY,t.velocityY),p={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:W(t.deltaY),snapBreakpoint:h};f(p)},onEnd:i=>{const o=z(i.deltaY,i.velocityY),a=S&&0===o?"function"==typeof t.canDismiss:0===o,e={currentY:i.currentY,deltaY:i.deltaY,velocityY:i.velocityY,progress:W(i.deltaY),snapBreakpoint:o,isDismissing:a};if(!n&&i.deltaY<=0&&D&&D.scrollTop>0)return $("stationary"),void u({...e,isDismissing:!1});L({breakpoint:o,breakpointOffset:Y,canDismiss:S,animated:!0}),u(e)}});return{gesture:H,moveSheetToBreakpoint:L,resetContentScroll:()=>{x&&(x.scrollY=v)}}})(this.el,this.backdropEl,t,i,o,s,this.sortedBreakpoints,this.expandToScroll,(()=>this.currentBreakpoint??0),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t)));this.gesture=r,this.moveSheetToBreakpoint=n,this.resetSheetContentScroll=h,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||o>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){this.cachedPageParent=this.getOriginalPageParent();const t=this.cachedPageParent;if(!t||"ION-APP"===t.tagName)return;if(Array.from(t.children).some((t=>!(t===this.el||t instanceof HTMLElement&&"none"===window.getComputedStyle(t).display||"TEMPLATE"===t.tagName||"SLOT"===t.tagName||t.nodeType===Node.TEXT_NODE&&!t.textContent?.trim()))))return;t.classList.add("ion-page-overlay-passthrough");const i=t.parentElement;"ION-ROUTER-OUTLET"===i?.tagName&&"ION-APP"!==i.parentElement?.tagName&&(i.style.setProperty("pointer-events","none"),i.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){const t=this.cachedPageParent;if(!t)return;t.classList.remove("ion-page-overlay-passthrough");const i=t.parentElement;i?.hasAttribute("data-overlay-passthrough")&&(i.style.removeProperty("pointer-events"),i.removeAttribute("data-overlay-passthrough")),this.cachedPageParent=void 0}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,E),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,J(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,E),this.gestureAnimationDismissing=!1}))}async dismiss(t,i){if(this.gestureAnimationDismissing&&i!==E)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;const o=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==i&&!await this.checkCanDismiss(t,i))return o(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===H(this)&&J(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(V,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await $(this,t,i,"modalLeave",dt,pt,{presentingEl:e,currentBreakpoint:this.currentBreakpoint??this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await x(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),this.resetSheetContentScroll?.(),this.resetSheetContentScroll=void 0,this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,o(),s}onDidDismiss(){return L(this.el,"ionModalDidDismiss")}onWillDismiss(){return L(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void o("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void o(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:i,moveSheetToBreakpoint:a,canDismiss:e,breakpoints:s,animated:r}=this;i!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-i,canDismiss:void 0!==e&&!0!==e&&0===s[0],animated:r}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:i}=this;if(!t||null==i)return!1;const o=t.filter((t=>0!==t)),a=o.indexOf(i),e=o[(a+1)%o.length];return await this.setCurrentBreakpoint(e),!0}initViewTransitionListener(){"ios"!==H(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){if(!this.presented)return;const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:i}=this;if(!i)return;let o;o=this.currentViewIsPortrait&&!t?((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return Z("portrait-to-landscape-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,s=g(a),r=document.body,n=Z("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=Z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0px) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i).fromTo("filter","contrast(0.85)","contrast(1)");const o=Z().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=Z().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=Z().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>r.style.setProperty("background-color",""))).fromTo("transform",s,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),n.addAnimation([d,o,e])}return n})(this.el,{presentingEl:i}):((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return Z("landscape-to-portrait-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,s=g(a),r=document.body,n=Z("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=Z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i);const o=Z().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=Z().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=Z().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:s}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:s,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),n.addAnimation([d,o,e])}return n})(this.el,{presentingEl:i}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=o,o.play().then((()=>{this.viewTransitionAnimation=void 0,k((()=>this.updateSafeAreaOverrides())),this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===H(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),k((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:i}=this,o=g(t).querySelector(".modal-wrapper");if(o&&(o.style.transform="translateY(0vh)",o.style.opacity="1"),"ION-MODAL"===i?.tagName)if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";i.style.transform=`translateY(${t}) scale(0.915)`}else i.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);t?.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.hasController||this.cachedOriginalParent===document.body||"ION-APP"===this.cachedOriginalParent.tagName||(this.cleanupParentRemovalObserver(),this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{const i=t===this.cachedOriginalParent,o=!!this.cachedOriginalParent&&t.contains?.(this.cachedOriginalParent);return i||o}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0})))}cleanupParentRemovalObserver(){this.parentRemovalObserver?.disconnect(),this.parentRemovalObserver=void 0}onDragStart(){this.ionDragStart.emit()}onDragMove(t){this.ionDragMove.emit(t)}onDragEnd(t){this.ionDragEnd.emit(t)}getSafeAreaContext(){return{isSheetModal:this.isSheetModal,isCardModal:void 0!==this.presentingElement&&"ios"===H(this),presentingElement:this.presentingElement,breakpoints:this.breakpoints,currentBreakpoint:this.currentBreakpoint}}watchHeightForContent(){var t;this.isSheetModal||(this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=(t=()=>{this.el.querySelectorAll("ion-content").forEach((t=>t.recalculateDimensions()))},w(this.el,"--height",(()=>t()))))}setInitialSafeAreaOverrides(){const t={...this.getSafeAreaContext(),coveredAxes:ft(this.el)},i=(t=>{const{isSheetModal:i,isCardModal:o}=t;if(i)return{top:"0px",bottom:"inherit",left:"0px",right:"0px"};if(o)return{top:"inherit",bottom:"inherit",left:"0px",right:"0px"};const{vertical:a,horizontal:e}=t.coveredAxes??{vertical:!0,horizontal:!0};return{top:a?"inherit":"0px",bottom:a?"inherit":"0px",left:e?"inherit":"0px",right:e?"inherit":"0px"}})(t);var o;bt(this.el,i),this.watchHeightForContent(),t.isSheetModal&&(this.updateSheetOffsetTop(),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=(o=t=>this.updateSheetOffsetTop(t),w(v?.document?.body,"--ion-safe-area-top",o,mt())))}updateSheetOffsetTop(t){const i=t??mt();this.el.style.setProperty("--ion-modal-offset-top",`${i}px`)}updateSafeAreaOverrides(){const{wrapperEl:t,el:i}=this,o=this.getSafeAreaContext();if(o.isSheetModal)return;if(o.isCardModal)return;if(!t)return;const a=(t=>{const i=t.getBoundingClientRect();return{top:i.top<=5?"inherit":"0px",bottom:i.bottom>=(v?.innerHeight??0)-5?"inherit":"0px",left:i.left<=5?"inherit":"0px",right:i.right>=(v?.innerWidth??0)-5?"inherit":"0px"}})(t);bt(i,a)}applyFullscreenSafeArea(){const t=this.getSafeAreaContext();if(t.isSheetModal||t.isCardModal)return;const{contentEl:i,hasFooter:o}=this.findContentAndFooter();this.applyFullscreenSafeAreaTo(i,o)}applyFullscreenSafeAreaTo(t,i){t&&!i&&t.style.setProperty("--internal-content-safe-area-padding-bottom","var(--ion-safe-area-bottom, 0px)")}clearContentSafeAreaPadding(t){t&&t.style.removeProperty("--internal-content-safe-area-padding-bottom")}findContentAndFooter(){let t=null,i=!1;for(const o of Array.from(this.el.children)){"ION-CONTENT"===o.tagName&&(t=o),"ION-FOOTER"===o.tagName&&(i=!0);for(const a of Array.from(o.children))"ION-CONTENT"!==a.tagName||t||(t=a),"ION-FOOTER"===a.tagName&&(i=!0)}return{contentEl:t,hasFooter:i}}cleanupSafeAreaOverrides(){var t;(t=this.el).style.removeProperty("--ion-safe-area-top"),t.style.removeProperty("--ion-safe-area-bottom"),t.style.removeProperty("--ion-safe-area-left"),t.style.removeProperty("--ion-safe-area-right"),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=void 0,this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=void 0,this.el.style.removeProperty("--ion-modal-offset-top");const{contentEl:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(i)}restoreSafeAreaOverrides(){this.setInitialSafeAreaOverrides(),this.applyFullscreenSafeArea(),k((()=>{if(!this.presented||!this.el.isConnected||this.isPresenting)return;const{width:t,height:i}=this.el.getBoundingClientRect();0===t&&0===i||this.updateSafeAreaOverrides()}))}render(){const{handle:t,isSheetModal:i,presentingElement:o,htmlAttributes:a,handleBehavior:e,inheritedAttributes:n,focusTrap:d,expandToScroll:h}=this,p=!1!==t&&i,l=H(this),c=void 0!==o&&"ios"===l,m="cycle"===e;return s(r,{key:"17a95bd7722bac2344bea041aff97db17f55c0cf","no-router":!0,tabIndex:m&&i&&p?0:-1,...a,style:{zIndex:`${2e4+this.overlayIndex}`},class:{[l]:!0,"modal-default":!c&&!i,"modal-card":c,"modal-sheet":i,"modal-no-expand-scroll":i&&!h,"overlay-hidden":!0,[C]:!1===d,...z(this.cssClass)},onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus},s("ion-backdrop",{key:"9dab1ef4771c0d847ba2be8672afbaa2748517f3",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===l&&s("div",{key:"64af7ed1c5f552b61fc4b9387b926acc76c8a99a",class:"modal-shadow"}),s("div",{key:"7e76d77d5b2e8f0467bb793facf5aa86f8d01bbe",role:"dialog",...n,"aria-modal":"true",tabIndex:-1,class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t},p&&s("button",{key:"5efc0bb0a59adcc594ac48da9fd90e57908a7ffb",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),s("slot",{key:"6175fcd0b39c086b4e9eb9e96c4d631c2a86774b",onSlotchange:this.onSlotChange})))}get el(){return n(this)}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}}},vt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};xt.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{xt as ion_modal}
package/hydrate/index.js CHANGED
@@ -26343,6 +26343,8 @@ const mdLeaveAnimation$2 = (baseEl, opts) => {
26343
26343
  return baseAnimation;
26344
26344
  };
26345
26345
 
26346
+ /** How far ahead, in milliseconds, a drag's velocity is projected when snapping. */
26347
+ const FLICK_PROJECTION_MS = 350;
26346
26348
  const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, onDragStart, onDragMove, onDragEnd) => {
26347
26349
  // Defaults for the sheet swipe animation
26348
26350
  const defaultBackdrop = [
@@ -26368,6 +26370,11 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26368
26370
  const contentEl = baseEl.querySelector('ion-content');
26369
26371
  // Cache the initial value so the gesture restores it instead of forcing scrolling on.
26370
26372
  const initialContentScrollY = contentEl?.scrollY ?? true;
26373
+ /**
26374
+ * The height of the sheet the user actually sees. This comes from the wrapper
26375
+ * rather than the host element, which is stretched to the full viewport no
26376
+ * matter how tall the sheet itself is.
26377
+ */
26371
26378
  const height = wrapperEl.clientHeight;
26372
26379
  let currentBreakpoint = initialBreakpoint;
26373
26380
  let offset = 0;
@@ -26665,18 +26672,18 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26665
26672
  : step;
26666
26673
  offset = clamp(0.0001, processedStep, maxStep);
26667
26674
  animation.progressStep(offset);
26668
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
26675
+ const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY, detail.velocityY);
26669
26676
  const eventDetail = {
26670
26677
  currentY: detail.currentY,
26671
26678
  deltaY: detail.deltaY,
26672
26679
  velocityY: detail.velocityY,
26673
- progress: calculateProgress(detail.currentY),
26680
+ progress: calculateEventProgress(detail.deltaY),
26674
26681
  snapBreakpoint: snapBreakpoint,
26675
26682
  };
26676
26683
  onDragMove(eventDetail);
26677
26684
  };
26678
26685
  const onEnd = (detail) => {
26679
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
26686
+ const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY, detail.velocityY);
26680
26687
  /**
26681
26688
  * `snapBreakpoint === 0` is not enough on its own. `canDismiss: false`
26682
26689
  * snaps to 0 but never dismisses, since `handleCanDismiss` returns early
@@ -26690,7 +26697,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26690
26697
  currentY: detail.currentY,
26691
26698
  deltaY: detail.deltaY,
26692
26699
  velocityY: detail.velocityY,
26693
- progress: calculateProgress(detail.currentY),
26700
+ progress: calculateEventProgress(detail.deltaY),
26694
26701
  snapBreakpoint,
26695
26702
  isDismissing,
26696
26703
  };
@@ -26866,24 +26873,15 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26866
26873
  });
26867
26874
  };
26868
26875
  /**
26869
- * Calculates the breakpoint based on the current deltaY.
26870
- * This determines where the sheet should snap to when the user releases the
26871
- * gesture.
26876
+ * Decides which breakpoint the sheet should settle on for the current drag.
26872
26877
  *
26873
- * @param deltaY The change in Y position since the gesture started.
26874
- * @returns The snap breakpoint value.
26878
+ * @param deltaY The change in Y position since the gesture started
26879
+ * @param velocityY The velocity in pixels per millisecond
26880
+ * @returns The snap breakpoint value
26875
26881
  */
26876
- const calculateSnapBreakpoint = (deltaY) => {
26877
- /**
26878
- * Calculates the real-time vertical position of the modal.
26879
- * We combine the wrapper's current bounding box position with the
26880
- * gesture's deltaY to account for the physical movement during the drag.
26881
- */
26882
- const currentY = wrapperEl.getBoundingClientRect().top + deltaY;
26883
- /**
26884
- * Convert that pixel position back into a 0 to 1 progress value.
26885
- */
26886
- const currentProgress = calculateProgress(currentY);
26882
+ const calculateSnapBreakpoint = (deltaY, velocityY) => {
26883
+ // Project the drag forward so a quick flick counts.
26884
+ const currentProgress = calculateProgress(deltaY + velocityY * FLICK_PROJECTION_MS);
26887
26885
  /**
26888
26886
  * Find and return the defined breakpoint that is closest to the
26889
26887
  * current progress.
@@ -26894,74 +26892,26 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26894
26892
  return snapBreakpoint;
26895
26893
  };
26896
26894
  /**
26897
- * Calculates the progress of the swipe gesture.
26895
+ * Calculates how open the sheet is part way through a gesture, on the same
26896
+ * 0 to 1 scale as the breakpoints: 1 is fully open and 0 is fully closed.
26898
26897
  *
26899
- * The progress is a value between 0 and 1 that represents how far
26900
- * the swipe has progressed towards closing the modal.
26901
- *
26902
- * A value closer to 1 means the modal is closer to being opened,
26903
- * while a value closer to 0 means the modal is closer to being closed.
26904
- *
26905
- * @param currentY The current Y position of the gesture
26898
+ * @param deltaY The change in Y position since the gesture started
26906
26899
  * @returns The progress of the sheet gesture
26907
26900
  */
26908
- const calculateProgress = (currentY) => {
26909
- const minBreakpoint = breakpoints[0];
26910
- const maxBreakpoint = breakpoints[breakpoints.length - 1];
26911
- /**
26912
- * The lowest point the sheet can be dragged to aka the point at which
26913
- * the sheet is fully closed.
26914
- */
26915
- const maxY = convertBreakpointToY(minBreakpoint);
26916
- /**
26917
- * The highest point the sheet can be dragged to aka the point at which
26918
- * the sheet is fully open.
26919
- */
26920
- const minY = convertBreakpointToY(maxBreakpoint);
26921
- // The total distance between the fully open and fully closed positions.
26922
- const totalDistance = maxY - minY;
26923
- // The distance from the current position to the fully closed position.
26924
- const distanceFromBottom = maxY - currentY;
26925
- /**
26926
- * The progress represents how far the sheet is from the bottom relative
26927
- * to the total distance. When the user starts swiping up, the progress
26928
- * should be close to 1, and when the user has swiped all the way down,
26929
- * the progress should be close to 0.
26930
- */
26931
- const progress = distanceFromBottom / totalDistance;
26901
+ const calculateProgress = (deltaY) => {
26902
+ // Mirrors the animation step in onMove, so the snap matches where the sheet is drawn.
26903
+ const progress = currentBreakpoint - deltaY / height;
26932
26904
  // Round to the nearest thousandth to avoid returning very small decimal
26933
26905
  const roundedProgress = Math.round(progress * 1000) / 1000;
26934
- return Math.max(0, Math.min(1, roundedProgress));
26906
+ return clamp(0, roundedProgress, 1);
26935
26907
  };
26936
26908
  /**
26937
- * Converts a breakpoint value (0 to 1) into a pixel Y coordinate
26938
- * on the screen.
26939
- *
26940
- * @param breakpoint The breakpoint value (e.g., 0.5 for half-open)
26941
- * @returns The pixel Y coordinate on the screen
26909
+ * Scales the progress from the lowest to the highest breakpoint, so the
26910
+ * drag events report 0 at the lowest breakpoint and 1 at the highest.
26942
26911
  */
26943
- const convertBreakpointToY = (breakpoint) => {
26944
- const rect = baseEl.getBoundingClientRect();
26945
- const modalHeight = rect.height;
26946
- // The bottom of the screen.
26947
- const viewportBottom = window.innerHeight;
26948
- /**
26949
- * The active height is how much of the modal is actually showing
26950
- * on the screen for this specific breakpoint.
26951
- */
26952
- const activeHeight = modalHeight * breakpoint;
26953
- /**
26954
- * To find the Y coordinate, start at the bottom of the screen
26955
- * and move up by the active height of the modal.
26956
- *
26957
- * A breakpoint of 1.0 means the active height is the full modal height
26958
- * (fully open). A breakpoint of 0.0 means the active height is 0
26959
- * (fully closed).
26960
- *
26961
- * Since screen Y coordinates get smaller as you go up, we subtract the
26962
- * active height from the viewport bottom.
26963
- */
26964
- return viewportBottom - activeHeight;
26912
+ const calculateEventProgress = (deltaY) => {
26913
+ const progress = (calculateProgress(deltaY) - minBreakpoint) / (maxBreakpoint - minBreakpoint);
26914
+ return clamp(0, progress, 1);
26965
26915
  };
26966
26916
  const gesture = createGesture({
26967
26917
  el: wrapperEl,
package/hydrate/index.mjs CHANGED
@@ -26341,6 +26341,8 @@ const mdLeaveAnimation$2 = (baseEl, opts) => {
26341
26341
  return baseAnimation;
26342
26342
  };
26343
26343
 
26344
+ /** How far ahead, in milliseconds, a drag's velocity is projected when snapping. */
26345
+ const FLICK_PROJECTION_MS = 350;
26344
26346
  const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, onDragStart, onDragMove, onDragEnd) => {
26345
26347
  // Defaults for the sheet swipe animation
26346
26348
  const defaultBackdrop = [
@@ -26366,6 +26368,11 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26366
26368
  const contentEl = baseEl.querySelector('ion-content');
26367
26369
  // Cache the initial value so the gesture restores it instead of forcing scrolling on.
26368
26370
  const initialContentScrollY = contentEl?.scrollY ?? true;
26371
+ /**
26372
+ * The height of the sheet the user actually sees. This comes from the wrapper
26373
+ * rather than the host element, which is stretched to the full viewport no
26374
+ * matter how tall the sheet itself is.
26375
+ */
26369
26376
  const height = wrapperEl.clientHeight;
26370
26377
  let currentBreakpoint = initialBreakpoint;
26371
26378
  let offset = 0;
@@ -26663,18 +26670,18 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26663
26670
  : step;
26664
26671
  offset = clamp(0.0001, processedStep, maxStep);
26665
26672
  animation.progressStep(offset);
26666
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
26673
+ const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY, detail.velocityY);
26667
26674
  const eventDetail = {
26668
26675
  currentY: detail.currentY,
26669
26676
  deltaY: detail.deltaY,
26670
26677
  velocityY: detail.velocityY,
26671
- progress: calculateProgress(detail.currentY),
26678
+ progress: calculateEventProgress(detail.deltaY),
26672
26679
  snapBreakpoint: snapBreakpoint,
26673
26680
  };
26674
26681
  onDragMove(eventDetail);
26675
26682
  };
26676
26683
  const onEnd = (detail) => {
26677
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
26684
+ const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY, detail.velocityY);
26678
26685
  /**
26679
26686
  * `snapBreakpoint === 0` is not enough on its own. `canDismiss: false`
26680
26687
  * snaps to 0 but never dismisses, since `handleCanDismiss` returns early
@@ -26688,7 +26695,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26688
26695
  currentY: detail.currentY,
26689
26696
  deltaY: detail.deltaY,
26690
26697
  velocityY: detail.velocityY,
26691
- progress: calculateProgress(detail.currentY),
26698
+ progress: calculateEventProgress(detail.deltaY),
26692
26699
  snapBreakpoint,
26693
26700
  isDismissing,
26694
26701
  };
@@ -26864,24 +26871,15 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26864
26871
  });
26865
26872
  };
26866
26873
  /**
26867
- * Calculates the breakpoint based on the current deltaY.
26868
- * This determines where the sheet should snap to when the user releases the
26869
- * gesture.
26874
+ * Decides which breakpoint the sheet should settle on for the current drag.
26870
26875
  *
26871
- * @param deltaY The change in Y position since the gesture started.
26872
- * @returns The snap breakpoint value.
26876
+ * @param deltaY The change in Y position since the gesture started
26877
+ * @param velocityY The velocity in pixels per millisecond
26878
+ * @returns The snap breakpoint value
26873
26879
  */
26874
- const calculateSnapBreakpoint = (deltaY) => {
26875
- /**
26876
- * Calculates the real-time vertical position of the modal.
26877
- * We combine the wrapper's current bounding box position with the
26878
- * gesture's deltaY to account for the physical movement during the drag.
26879
- */
26880
- const currentY = wrapperEl.getBoundingClientRect().top + deltaY;
26881
- /**
26882
- * Convert that pixel position back into a 0 to 1 progress value.
26883
- */
26884
- const currentProgress = calculateProgress(currentY);
26880
+ const calculateSnapBreakpoint = (deltaY, velocityY) => {
26881
+ // Project the drag forward so a quick flick counts.
26882
+ const currentProgress = calculateProgress(deltaY + velocityY * FLICK_PROJECTION_MS);
26885
26883
  /**
26886
26884
  * Find and return the defined breakpoint that is closest to the
26887
26885
  * current progress.
@@ -26892,74 +26890,26 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
26892
26890
  return snapBreakpoint;
26893
26891
  };
26894
26892
  /**
26895
- * Calculates the progress of the swipe gesture.
26893
+ * Calculates how open the sheet is part way through a gesture, on the same
26894
+ * 0 to 1 scale as the breakpoints: 1 is fully open and 0 is fully closed.
26896
26895
  *
26897
- * The progress is a value between 0 and 1 that represents how far
26898
- * the swipe has progressed towards closing the modal.
26899
- *
26900
- * A value closer to 1 means the modal is closer to being opened,
26901
- * while a value closer to 0 means the modal is closer to being closed.
26902
- *
26903
- * @param currentY The current Y position of the gesture
26896
+ * @param deltaY The change in Y position since the gesture started
26904
26897
  * @returns The progress of the sheet gesture
26905
26898
  */
26906
- const calculateProgress = (currentY) => {
26907
- const minBreakpoint = breakpoints[0];
26908
- const maxBreakpoint = breakpoints[breakpoints.length - 1];
26909
- /**
26910
- * The lowest point the sheet can be dragged to aka the point at which
26911
- * the sheet is fully closed.
26912
- */
26913
- const maxY = convertBreakpointToY(minBreakpoint);
26914
- /**
26915
- * The highest point the sheet can be dragged to aka the point at which
26916
- * the sheet is fully open.
26917
- */
26918
- const minY = convertBreakpointToY(maxBreakpoint);
26919
- // The total distance between the fully open and fully closed positions.
26920
- const totalDistance = maxY - minY;
26921
- // The distance from the current position to the fully closed position.
26922
- const distanceFromBottom = maxY - currentY;
26923
- /**
26924
- * The progress represents how far the sheet is from the bottom relative
26925
- * to the total distance. When the user starts swiping up, the progress
26926
- * should be close to 1, and when the user has swiped all the way down,
26927
- * the progress should be close to 0.
26928
- */
26929
- const progress = distanceFromBottom / totalDistance;
26899
+ const calculateProgress = (deltaY) => {
26900
+ // Mirrors the animation step in onMove, so the snap matches where the sheet is drawn.
26901
+ const progress = currentBreakpoint - deltaY / height;
26930
26902
  // Round to the nearest thousandth to avoid returning very small decimal
26931
26903
  const roundedProgress = Math.round(progress * 1000) / 1000;
26932
- return Math.max(0, Math.min(1, roundedProgress));
26904
+ return clamp(0, roundedProgress, 1);
26933
26905
  };
26934
26906
  /**
26935
- * Converts a breakpoint value (0 to 1) into a pixel Y coordinate
26936
- * on the screen.
26937
- *
26938
- * @param breakpoint The breakpoint value (e.g., 0.5 for half-open)
26939
- * @returns The pixel Y coordinate on the screen
26907
+ * Scales the progress from the lowest to the highest breakpoint, so the
26908
+ * drag events report 0 at the lowest breakpoint and 1 at the highest.
26940
26909
  */
26941
- const convertBreakpointToY = (breakpoint) => {
26942
- const rect = baseEl.getBoundingClientRect();
26943
- const modalHeight = rect.height;
26944
- // The bottom of the screen.
26945
- const viewportBottom = window.innerHeight;
26946
- /**
26947
- * The active height is how much of the modal is actually showing
26948
- * on the screen for this specific breakpoint.
26949
- */
26950
- const activeHeight = modalHeight * breakpoint;
26951
- /**
26952
- * To find the Y coordinate, start at the bottom of the screen
26953
- * and move up by the active height of the modal.
26954
- *
26955
- * A breakpoint of 1.0 means the active height is the full modal height
26956
- * (fully open). A breakpoint of 0.0 means the active height is 0
26957
- * (fully closed).
26958
- *
26959
- * Since screen Y coordinates get smaller as you go up, we subtract the
26960
- * active height from the viewport bottom.
26961
- */
26962
- return viewportBottom - activeHeight;
26910
+ const calculateEventProgress = (deltaY) => {
26911
+ const progress = (calculateProgress(deltaY) - minBreakpoint) / (maxBreakpoint - minBreakpoint);
26912
+ return clamp(0, progress, 1);
26963
26913
  };
26964
26914
  const gesture = createGesture({
26965
26915
  el: wrapperEl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "9.0.8-dev.11791470896.15d54667",
3
+ "version": "9.0.8-dev.11791991772.1a974f6b",
4
4
  "description": "Base components for Ionic",
5
5
  "engines": {
6
6
  "node": ">= 16"
@@ -80,7 +80,7 @@
80
80
  "@eslint/js": "^9.0.0",
81
81
  "@ionic/eslint-config": "^0.3.0",
82
82
  "@ionic/prettier-config": "^2.0.0",
83
- "@playwright/test": "^1.63.0",
83
+ "@playwright/test": "^1.64.0",
84
84
  "@rollup/plugin-node-resolve": "^8.4.0",
85
85
  "@rollup/plugin-virtual": "^2.0.3",
86
86
  "@stencil/angular-output-target": "^1.4.1",
@@ -102,7 +102,7 @@
102
102
  "fs-extra": "^9.0.1",
103
103
  "jest": "^29.7.0",
104
104
  "jest-cli": "^29.7.0",
105
- "playwright-core": "^1.63.0",
105
+ "playwright-core": "^1.64.0",
106
106
  "prettier": "^2.6.1",
107
107
  "rollup": "^2.26.4",
108
108
  "sass": "^1.33.0",
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{d as t,H as i,i as o,p as e,w as a,e as s,h as r,f as n,t as d}from"./p-Ct2aBEue.js";import{i as h,b as p,a as l,d as c,r as m,f,p as u}from"./p-V1THdfzs.js";import{C as b,a as x,d as v}from"./p-Ba9_OzSY.js";import{p as w,g,e as k,r as y,j as A,l as Y}from"./p-B4IBdPVJ.js";import{c as C}from"./p-B-hirT0v.js";import{g as D}from"./p-CIGNaXM1.js";import{G as S,O as E,F as O,n as M,d as T,B,h as P,r as I,j as N,k as j,e as z,f as R,g as $}from"./p-B02CcbPD.js";import{g as L}from"./p-byZM6qHV.js";import{e as F,w as W}from"./p-C7r5Gja6.js";import{b as H}from"./p-HthJZjZ6.js";import{KEYBOARD_DID_OPEN as V}from"./p-D7-vHX0A.js";import{c as Z}from"./p-ChsJlFCQ.js";import{g as G}from"./p-hHmYLOfE.js";import{createGesture as K}from"./p-D0YpjgON.js";import{w as _}from"./p-ZjP4CjeZ.js";import{d as J}from"./p-DMPsc_0r.js";var U;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(U||(U={}));const X={getEngine(){const t=D();if(t?.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const i=this.getEngine();i&&i.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return U.Default;const{style:i}=await t.getInfo();return i}},q=(t,i)=>{if(1===i)return 0;const o=1/(1-i);return t*o+-i*o},Q=()=>{!_||_.innerWidth>=768||X.setStyle({style:U.Dark})},tt=(t=U.Default)=>{!_||_.innerWidth>=768||X.setStyle({style:t})},it=t=>{const i=h(t)?g(t).querySelector(".inner-scroll"):t;return!p(t)&&0===i.scrollTop},ot=async(t,i)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,S)&&(i.isRunning()?i.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},et=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,at=.915,st=(t,i)=>k(400,t/Math.abs(1.1*i),500),rt=(t,i)=>{const o=window.innerHeight,e=t.getBoundingClientRect().top,a=Math.round(1e3*(1-i/(o-e)))/1e3;return Math.max(0,Math.min(1,a))},nt=t=>{const{currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:e}=t,a=void 0===o||o<i,s=a?`calc(var(--backdrop-opacity) * ${i})`:"0",r=Z("backdropAnimation").fromTo("opacity",0,s);return a&&r.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:Z("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*i}%)`}]),backdropAnimation:r,contentAnimation:e?void 0:Z("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-i)+"%"},{offset:1,opacity:1,maxHeight:100*i+"%"}])}},dt=t=>{const{currentBreakpoint:i,backdropBreakpoint:o}=t,e=`calc(var(--backdrop-opacity) * ${q(i,o)})`,a=[{offset:0,opacity:e},{offset:1,opacity:0}],s=[{offset:0,opacity:e},{offset:o,opacity:0},{offset:1,opacity:0}],r=Z("backdropAnimation").keyframes(0!==o?s:a);return{wrapperAnimation:Z("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*i}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:r}},ht=(t,i)=>{const{presentingEl:o,currentBreakpoint:e,expandToScroll:a}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n,contentAnimation:d}=void 0!==e?nt(i):{backdropAnimation:Z().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:Z().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!a&&d?.addElement(t.querySelector(".ion-page"));const h=Z("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([r]);if(d&&h.addAnimation(d),o){const t=window.innerWidth<768,i="ION-MODAL"===o.tagName&&void 0!==o.presentingElement,e=g(o),a=Z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",e=`translateY(${i?"-10px":t}) scale(0.915)`;a.afterStyles({transform:e}).beforeAddWrite((()=>s.style.setProperty("background-color","black"))).addElement(o).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:e,borderRadius:"10px 10px 0 0"}]),h.addAnimation(a)}else if(h.addAnimation(n),i){const t=`translateY(-10px) scale(${i?at:1})`;a.afterStyles({transform:t}).addElement(e.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const o=Z().afterStyles({transform:t}).addElement(e.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([a,o])}else r.fromTo("opacity","0","1")}else h.addAnimation(n);return h},pt=(t,i,o=500)=>{const{presentingEl:e,currentBreakpoint:a}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n}=void 0!==a?dt(i):{backdropAnimation:Z().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:Z().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=Z("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o).addAnimation(r);if(e){const t=window.innerWidth<768,i="ION-MODAL"===e.tagName&&void 0!==e.presentingElement,o=g(e),a=Z().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(e.style.setProperty("overflow",""),Array.from(s.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&s.style.setProperty("background-color",""))})),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",o=`translateY(${i?"-10px":t}) scale(0.915)`;a.addElement(e).keyframes([{offset:0,filter:"contrast(0.85)",transform:o,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(a)}else if(d.addAnimation(n),i){const t=`translateY(-10px) scale(${i?at:1})`;a.addElement(o.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const e=Z().addElement(o.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([a,e])}else r.fromTo("opacity","1","0")}else d.addAnimation(n);return d},lt=(t,i)=>{const{currentBreakpoint:o,expandToScroll:e}=i,a=g(t),{wrapperAnimation:s,backdropAnimation:r,contentAnimation:n}=void 0!==o?nt(i):{backdropAnimation:Z().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:Z().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};r.addElement(a.querySelector("ion-backdrop")),s.addElement(a.querySelector(".modal-wrapper")),!e&&n?.addElement(t.querySelector(".ion-page"));const d=Z().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([r,s]);return n&&d.addAnimation(n),d},ct=(t,i)=>{const{currentBreakpoint:o}=i,e=g(t),{wrapperAnimation:a,backdropAnimation:s}=void 0!==o?dt(i):{backdropAnimation:Z().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:Z().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return s.addElement(e.querySelector("ion-backdrop")),a.addElement(e.querySelector(".modal-wrapper")),Z().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([s,a])};let mt=null,ft=!1;const ut=()=>{if(null!==mt)return mt;const t=_?.document;if(!t?.body)return 0;const i=t.createElement("div");i.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);",t.body.appendChild(i);const o=parseFloat(getComputedStyle(i).paddingTop)||0;return i.remove(),mt=o,ft||(ft=!0,y((()=>{mt=null,ft=!1}))),o},bt=t=>{const i=getComputedStyle(t),o=M(i.getPropertyValue("--width")),e=M(i.getPropertyValue("--height"));return"fullscreen"===o&&"fullscreen"===e?{vertical:!0,horizontal:!0}:xt(t)},xt=t=>{const i=t.shadowRoot?.querySelector(".modal-wrapper");if(null==i||void 0===_)return{vertical:!1,horizontal:!1};const o=t.classList.contains("overlay-hidden");o&&t.classList.remove("overlay-hidden");const{width:e,height:a}=i.getBoundingClientRect();return o&&t.classList.add("overlay-hidden"),{vertical:a>=_.innerHeight-5,horizontal:e>=_.innerWidth-5}},vt=(t,i)=>{t.style.setProperty("--ion-safe-area-top",i.top),t.style.setProperty("--ion-safe-area-bottom",i.bottom),t.style.setProperty("--ion-safe-area-left",i.left),t.style.setProperty("--ion-safe-area-right",i.right)},wt=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.didPresent=o(this,"ionModalDidPresent",7),this.willPresent=o(this,"ionModalWillPresent",7),this.willDismiss=o(this,"ionModalWillDismiss",7),this.didDismiss=o(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=o(this,"ionBreakpointDidChange",7),this.didPresentShorthand=o(this,"didPresent",7),this.willPresentShorthand=o(this,"willPresent",7),this.willDismissShorthand=o(this,"willDismiss",7),this.didDismissShorthand=o(this,"didDismiss",7),this.ionMount=o(this,"ionMount",7),this.ionDragStart=o(this,"ionDragStart",7),this.ionDragMove=o(this,"ionDragMove",7),this.ionDragEnd=o(this,"ionDragEnd",7),this.lockController=C(),this.triggerController=T(),this.coreDelegate=b(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.isPresenting=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="cycle",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:i}=this;"cycle"===i&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,B)},this.onLifecycle=t=>{const i=this.usersElement,o=gt[t.type];if(i&&o){const e=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});i.dispatchEvent(e)}},this.onModalFocus=t=>{const{dragHandleEl:i,el:o}=this;t.target===o&&null==o.shadowRoot?.activeElement&&i&&-1!==i.tabIndex&&i.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,i){!0===t&&!1===i?this.present():!1===t&&!0===i&&this.dismiss()}triggerChanged(){const{trigger:t,el:i,triggerController:o}=this;t&&o.addClickListener(i,t)}onWindowResize(){this.presented&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{const t=this.getSafeAreaContext();if(!t.isCardModal||this.enterAnimation||this.leaveAnimation||this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),!t.isSheetModal&&!t.isCardModal){this.updateSafeAreaOverrides();const{contentEl:t,hasFooter:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(t),this.applyFullscreenSafeAreaTo(t,i)}}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,i)=>t-i)))}connectedCallback(){const{el:t}=this;P(t),this.triggerChanged(),(this.presented||this.isPresenting)&&this.restoreSafeAreaOverrides(),this.presented&&(I(t),this.initParentRemovalObserver())}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.presented&&N()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:i,el:o,htmlAttributes:a}=this,s=this.isSheetModal=void 0!==t&&void 0!==i,r=["aria-label","role"];this.inheritedAttributes=A(o,r),o.parentNode&&(this.cachedOriginalParent=o.parentNode),void 0!==a&&r.forEach((t=>{a[t]&&(this.inheritedAttributes={...this.inheritedAttributes,[t]:a[t]},delete a[t])})),s&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===i||t.includes(i)||e("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),this.htmlAttributes?.id||j(this.el)}componentDidLoad(){!0===this.isOpen&&y((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const i=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:i,delegate:this.workingDelegate=i?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,i){const{canDismiss:o}=this;return"function"==typeof o?o(t,i):o}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:i,el:o}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:s}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await x(s,o,this.component,["ion-page"],this.componentProps,e),Y(o)?await F(this.usersElement):this.keepContentsMounted||await W(),a((()=>this.el.classList.add("show-modal"))),this.isSheetModal=void 0!==this.breakpoints&&void 0!==this.initialBreakpoint,this.isPresenting=!0;const r=void 0!==i;try{this.setInitialSafeAreaOverrides(),r&&"ios"===H(this)&&(this.statusBarStyle=await X.getStyle(),Q()),await z(this,"modalEnter",ht,lt,{presentingEl:i,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll})}finally{this.isPresenting=!1}this.updateSafeAreaOverrides(),this.applyFullscreenSafeArea(),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),y((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(V,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():r&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){if("ios"!==H(this))return;const{el:t}=this,i=this.leaveAnimation||s.get("modalLeave",pt),o=this.animation=i(t,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});f(t)?(this.gesture=((t,i,o,e,a,s,r)=>{const n=.5,d=t.offsetHeight;let p=!1,f=!1,u=null,b=!0,x=0;const v=K({el:t,gestureName:"modalSwipeToClose",gesturePriority:E,direction:"y",threshold:10,canStart:t=>{const i=t.event.target;return null===i||!i.closest||(u=l(i),u?it(u):null===i.closest("ion-footer"))},onStart:o=>{const{deltaY:e}=o;window.getSelection()?.removeAllRanges(),b=!u||!h(u)||u.scrollY,f=void 0!==t.canDismiss&&!0!==t.canDismiss,e>0&&u&&c(u),i.progressStart(!0,p?1:0),a()},onMove:e=>{const{deltaY:a}=e;a>0&&u&&c(u);const r=e.deltaY/d,h=r>=0&&f,p=h?.2:.9999,l=h?et(r/p):r,m=k(1e-4,l,p);i.progressStep(m),m>=n&&x<n?tt(o):m<n&&x>=n&&Q(),x=m;const b={currentY:e.currentY,deltaY:e.deltaY,velocityY:e.velocityY,progress:rt(t,e.deltaY)};s(b)},onEnd:o=>{const a=o.velocityY,s=o.deltaY/d,h=s>=0&&f,l=h?.2:.9999,c=h?et(s/l):s,x=k(1e-4,c,l),w=!h&&(o.deltaY+1e3*a)/d>=n;let g=w?-.001:.001;w?(i.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=G([0,0],[.32,.72],[0,1],[1,1],x)[0]):(i.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=G([0,0],[1,0],[.68,.28],[1,1],x)[0]);const y=st(w?s*d:(1-x)*d,a);p=w,v.enable(!1),u&&m(u,b),i.onFinish((()=>{w||v.enable(!0)})).progressEnd(w?1:0,g,y);const A=h&&x>l/4;A?ot(t,i):w&&e();const Y=h?A&&"function"==typeof t.canDismiss:w,C={currentY:o.currentY,deltaY:o.deltaY,velocityY:o.velocityY,progress:rt(t,o.deltaY),isDismissing:Y};r(C)}});return v})(t,o,this.statusBarStyle??U.Default,(()=>this.cardOnDismiss()),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t))),this.gesture.enable(!0)):u(t)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:i,backdropBreakpoint:o}=this;if(!t||void 0===i)return;const e=this.enterAnimation||s.get("modalEnter",ht),a=this.animation=e(this.el,{presentingEl:this.presentingElement,currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:this.expandToScroll});a.progressStart(!0,1);const{gesture:r,moveSheetToBreakpoint:n,resetContentScroll:d}=((t,i,o,e,a,s,r=[],n,d,p,c,m,f,u)=>{const b={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==a?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-a,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},x=t.querySelector("ion-content"),v=x?.scrollY??!0,w=o.clientHeight;let A=e,Y=0,C=!1,D=null,S=null,E=null,M=null;const T=r[r.length-1],B=r[0],P=s.childAnimations.find((t=>"wrapperAnimation"===t.id)),I=s.childAnimations.find((t=>"backdropAnimation"===t.id)),N=s.childAnimations.find((t=>"contentAnimation"===t.id)),j=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),i.style.setProperty("pointer-events","auto"),t.classList.remove(O))},z=()=>{t.style.setProperty("pointer-events","none"),i.style.setProperty("pointer-events","none"),t.classList.add(O)},R=i=>{if(!S&&(S=Array.from(t.querySelectorAll("ion-footer")),!S.length))return;const o=t.querySelector(".ion-page");if(M=i,"stationary"===i)S.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),o?.style.removeProperty("padding-bottom"),o?.appendChild(t)}));else{let i=0;S.forEach(((o,e)=>{const a=o.getBoundingClientRect(),s=document.body.getBoundingClientRect();i+=o.clientHeight;const r=a.top-s.top,n=a.left-s.left;if(o.style.setProperty("--pinned-width",`${o.clientWidth}px`),o.style.setProperty("--pinned-height",`${o.clientHeight}px`),o.style.setProperty("--pinned-top",`${r}px`),o.style.setProperty("--pinned-left",`${n}px`),0===e){E=r;const i=t.querySelector("ion-header");i&&(E-=i.clientHeight)}})),S.forEach((t=>{o?.style.setProperty("padding-bottom",`${i}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};P&&I&&(P.keyframes([...b.WRAPPER_KEYFRAMES]),I.keyframes([...b.BACKDROP_KEYFRAMES]),N?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-A),A>a&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():z()),x&&A!==T&&n&&(x.scrollY=!1);const $=i=>{const{breakpoint:o,canDismiss:e,breakpointOffset:d,animated:h}=i,l=e&&0===o,m=l?A:o,f=0!==m;return A=0,P&&I&&(P.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-m)}%)`}]),I.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${q(1-d,a)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${q(m,a)})`}]),N&&N.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*m+"%"}]),s.progressStep(0)),H.enable(!1),l?ot(t,s):f||p(),!x||m!==r[r.length-1]&&n||(x.scrollY=v),n||0!==m||R("stationary"),new Promise((i=>{s.onFinish((()=>{f?(n||R("stationary"),P&&I?y((()=>{P.keyframes([...b.WRAPPER_KEYFRAMES]),I.keyframes([...b.BACKDROP_KEYFRAMES]),N?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-m),A=m,c(A),A>a&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():z(),H.enable(!0),i()})):(H.enable(!0),i())):i()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},L=t=>{const i=o.getBoundingClientRect().top+t,e=F(i);return r.reduce(((t,i)=>Math.abs(i-e)<Math.abs(t-e)?i:t))},F=t=>{const i=r[r.length-1],o=W(r[0]),e=W(i),a=Math.round((o-t)/(o-e)*1e3)/1e3;return Math.max(0,Math.min(1,a))},W=i=>{const o=t.getBoundingClientRect();return window.innerHeight-o.height*i},H=K({el:o,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const i=l(t.event.target);return A=d(),!(i&&(!n||1===A))||it(i)},onStart:i=>{if(window.getSelection()?.removeAllRanges(),C=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===B,!n){const t=l(i.event.target);D=t&&h(t)?g(t).querySelector(".inner-scroll"):t}n||R("moving"),i.deltaY>0&&x&&(x.scrollY=!1),y((()=>{t.focus()})),s.progressStart(!0,1-A),m()},onMove:t=>{if(n||null===E||null===M||(t.currentY>=E&&"moving"===M?R("stationary"):t.currentY<E&&"stationary"===M&&R("moving")),!n&&t.deltaY<=0&&D)return;t.deltaY>0&&x&&(x.scrollY=!1);const i=r.length>1?1-r[1]:void 0,o=1-A+t.deltaY/w,e=void 0!==i&&o>=i&&C,a=e?.95:.9999,d=e&&void 0!==i?i+et((o-i)/(a-i)):o;Y=k(1e-4,d,a),s.progressStep(Y);const h=L(t.deltaY),p={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:F(t.currentY),snapBreakpoint:h};f(p)},onEnd:i=>{const o=L(i.deltaY),e=C&&0===o?"function"==typeof t.canDismiss:0===o,a={currentY:i.currentY,deltaY:i.deltaY,velocityY:i.velocityY,progress:F(i.currentY),snapBreakpoint:o,isDismissing:e};if(!n&&i.deltaY<=0&&D&&D.scrollTop>0)return R("stationary"),void u({...a,isDismissing:!1});$({breakpoint:o,breakpointOffset:Y,canDismiss:C,animated:!0}),u(a)}});return{gesture:H,moveSheetToBreakpoint:$,resetContentScroll:()=>{x&&(x.scrollY=v)}}})(this.el,this.backdropEl,t,i,o,a,this.sortedBreakpoints,this.expandToScroll,(()=>this.currentBreakpoint??0),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t)));this.gesture=r,this.moveSheetToBreakpoint=n,this.resetSheetContentScroll=d,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||o>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){this.cachedPageParent=this.getOriginalPageParent();const t=this.cachedPageParent;if(!t||"ION-APP"===t.tagName)return;if(Array.from(t.children).some((t=>!(t===this.el||t instanceof i&&"none"===window.getComputedStyle(t).display||"TEMPLATE"===t.tagName||"SLOT"===t.tagName||t.nodeType===Node.TEXT_NODE&&!t.textContent?.trim()))))return;t.classList.add("ion-page-overlay-passthrough");const o=t.parentElement;"ION-ROUTER-OUTLET"===o?.tagName&&"ION-APP"!==o.parentElement?.tagName&&(o.style.setProperty("pointer-events","none"),o.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){const t=this.cachedPageParent;if(!t)return;t.classList.remove("ion-page-overlay-passthrough");const i=t.parentElement;i?.hasAttribute("data-overlay-passthrough")&&(i.style.removeProperty("pointer-events"),i.removeAttribute("data-overlay-passthrough")),this.cachedPageParent=void 0}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,S),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,tt(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,S),this.gestureAnimationDismissing=!1}))}async dismiss(t,i){if(this.gestureAnimationDismissing&&i!==S)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;const o=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==i&&!await this.checkCanDismiss(t,i))return o(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===H(this)&&tt(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(V,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await R(this,t,i,"modalLeave",pt,ct,{presentingEl:e,currentBreakpoint:this.currentBreakpoint??this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await v(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),this.resetSheetContentScroll?.(),this.resetSheetContentScroll=void 0,this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,o(),s}onDidDismiss(){return $(this.el,"ionModalDidDismiss")}onWillDismiss(){return $(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void e("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void e(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:i,moveSheetToBreakpoint:o,canDismiss:a,breakpoints:s,animated:r}=this;i!==t&&o&&(this.sheetTransition=o({breakpoint:t,breakpointOffset:1-i,canDismiss:void 0!==a&&!0!==a&&0===s[0],animated:r}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:i}=this;if(!t||null==i)return!1;const o=t.filter((t=>0!==t)),e=o.indexOf(i),a=o[(e+1)%o.length];return await this.setCurrentBreakpoint(a),!0}initViewTransitionListener(){"ios"!==H(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){if(!this.presented)return;const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:i}=this;if(!i)return;let o;o=this.currentViewIsPortrait&&!t?((t,i,o=300)=>{const{presentingEl:e}=i;if(!e)return Z("portrait-to-landscape-transition");const a="ION-MODAL"===e.tagName&&void 0!==e.presentingElement,s=g(e),r=document.body,n=Z("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=Z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(a){const t="translateY(-10px) scale(0.915)",i="translateY(0px) scale(1)";d.addElement(e).afterStyles({transform:i}).fromTo("transform",t,i).fromTo("filter","contrast(0.85)","contrast(1)");const o=Z().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=Z().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),a=Z().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(e).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>r.style.setProperty("background-color",""))).fromTo("transform",s,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),n.addAnimation([d,o,a])}return n})(this.el,{presentingEl:i}):((t,i,o=300)=>{const{presentingEl:e}=i;if(!e)return Z("landscape-to-portrait-transition");const a="ION-MODAL"===e.tagName&&void 0!==e.presentingElement,s=g(e),r=document.body,n=Z("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=Z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(a){const t="translateY(-10px) scale(0.915)",i="translateY(0) scale(1)";d.addElement(e).afterStyles({transform:i}).fromTo("transform",t,i);const o=Z().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=Z().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),a=Z().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(e).afterStyles({transform:s}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:s,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),n.addAnimation([d,o,a])}return n})(this.el,{presentingEl:i}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=o,o.play().then((()=>{this.viewTransitionAnimation=void 0,y((()=>this.updateSafeAreaOverrides())),this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===H(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),y((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:i}=this,o=g(t).querySelector(".modal-wrapper");if(o&&(o.style.transform="translateY(0vh)",o.style.opacity="1"),"ION-MODAL"===i?.tagName)if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";i.style.transform=`translateY(${t}) scale(0.915)`}else i.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);t?.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.hasController||this.cachedOriginalParent===document.body||"ION-APP"===this.cachedOriginalParent.tagName||(this.cleanupParentRemovalObserver(),this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{const i=t===this.cachedOriginalParent,o=!!this.cachedOriginalParent&&t.contains?.(this.cachedOriginalParent);return i||o}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0})))}cleanupParentRemovalObserver(){this.parentRemovalObserver?.disconnect(),this.parentRemovalObserver=void 0}onDragStart(){this.ionDragStart.emit()}onDragMove(t){this.ionDragMove.emit(t)}onDragEnd(t){this.ionDragEnd.emit(t)}getSafeAreaContext(){return{isSheetModal:this.isSheetModal,isCardModal:void 0!==this.presentingElement&&"ios"===H(this),presentingElement:this.presentingElement,breakpoints:this.breakpoints,currentBreakpoint:this.currentBreakpoint}}watchHeightForContent(){var t;this.isSheetModal||(this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=(t=()=>{this.el.querySelectorAll("ion-content").forEach((t=>t.recalculateDimensions()))},w(this.el,"--height",(()=>t()))))}setInitialSafeAreaOverrides(){const t={...this.getSafeAreaContext(),coveredAxes:bt(this.el)},i=(t=>{const{isSheetModal:i,isCardModal:o}=t;if(i)return{top:"0px",bottom:"inherit",left:"0px",right:"0px"};if(o)return{top:"inherit",bottom:"inherit",left:"0px",right:"0px"};const{vertical:e,horizontal:a}=t.coveredAxes??{vertical:!0,horizontal:!0};return{top:e?"inherit":"0px",bottom:e?"inherit":"0px",left:a?"inherit":"0px",right:a?"inherit":"0px"}})(t);var o;vt(this.el,i),this.watchHeightForContent(),t.isSheetModal&&(this.updateSheetOffsetTop(),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=(o=t=>this.updateSheetOffsetTop(t),w(_?.document?.body,"--ion-safe-area-top",o,ut())))}updateSheetOffsetTop(t){const i=t??ut();this.el.style.setProperty("--ion-modal-offset-top",`${i}px`)}updateSafeAreaOverrides(){const{wrapperEl:t,el:i}=this,o=this.getSafeAreaContext();if(o.isSheetModal)return;if(o.isCardModal)return;if(!t)return;const e=(t=>{const i=t.getBoundingClientRect();return{top:i.top<=5?"inherit":"0px",bottom:i.bottom>=(_?.innerHeight??0)-5?"inherit":"0px",left:i.left<=5?"inherit":"0px",right:i.right>=(_?.innerWidth??0)-5?"inherit":"0px"}})(t);vt(i,e)}applyFullscreenSafeArea(){const t=this.getSafeAreaContext();if(t.isSheetModal||t.isCardModal)return;const{contentEl:i,hasFooter:o}=this.findContentAndFooter();this.applyFullscreenSafeAreaTo(i,o)}applyFullscreenSafeAreaTo(t,i){t&&!i&&t.style.setProperty("--internal-content-safe-area-padding-bottom","var(--ion-safe-area-bottom, 0px)")}clearContentSafeAreaPadding(t){t&&t.style.removeProperty("--internal-content-safe-area-padding-bottom")}findContentAndFooter(){let t=null,i=!1;for(const o of Array.from(this.el.children)){"ION-CONTENT"===o.tagName&&(t=o),"ION-FOOTER"===o.tagName&&(i=!0);for(const e of Array.from(o.children))"ION-CONTENT"!==e.tagName||t||(t=e),"ION-FOOTER"===e.tagName&&(i=!0)}return{contentEl:t,hasFooter:i}}cleanupSafeAreaOverrides(){var t;(t=this.el).style.removeProperty("--ion-safe-area-top"),t.style.removeProperty("--ion-safe-area-bottom"),t.style.removeProperty("--ion-safe-area-left"),t.style.removeProperty("--ion-safe-area-right"),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=void 0,this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=void 0,this.el.style.removeProperty("--ion-modal-offset-top");const{contentEl:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(i)}restoreSafeAreaOverrides(){this.setInitialSafeAreaOverrides(),this.applyFullscreenSafeArea(),y((()=>{if(!this.presented||!this.el.isConnected||this.isPresenting)return;const{width:t,height:i}=this.el.getBoundingClientRect();0===t&&0===i||this.updateSafeAreaOverrides()}))}render(){const{handle:t,isSheetModal:i,presentingElement:o,htmlAttributes:e,handleBehavior:a,inheritedAttributes:s,focusTrap:d,expandToScroll:h}=this,p=!1!==t&&i,l=H(this),c=void 0!==o&&"ios"===l,m="cycle"===a;return r(n,{key:"17a95bd7722bac2344bea041aff97db17f55c0cf","no-router":!0,tabIndex:m&&i&&p?0:-1,...e,style:{zIndex:`${2e4+this.overlayIndex}`},class:{[l]:!0,"modal-default":!c&&!i,"modal-card":c,"modal-sheet":i,"modal-no-expand-scroll":i&&!h,"overlay-hidden":!0,[O]:!1===d,...L(this.cssClass)},onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus},r("ion-backdrop",{key:"9dab1ef4771c0d847ba2be8672afbaa2748517f3",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===l&&r("div",{key:"64af7ed1c5f552b61fc4b9387b926acc76c8a99a",class:"modal-shadow"}),r("div",{key:"7e76d77d5b2e8f0467bb793facf5aa86f8d01bbe",role:"dialog",...s,"aria-modal":"true",tabIndex:-1,class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t},p&&r("button",{key:"5efc0bb0a59adcc594ac48da9fd90e57908a7ffb",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),r("slot",{key:"6175fcd0b39c086b4e9eb9e96c4d631c2a86774b",onSlotchange:this.onSlotChange})))}get el(){return this}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}}static get style(){return{ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'}}},[289,"ion-modal",{hasController:[4,"has-controller"],overlayIndex:[2,"overlay-index"],delegate:[16],keyboardClose:[4,"keyboard-close"],enterAnimation:[16],leaveAnimation:[16],breakpoints:[16],expandToScroll:[4,"expand-to-scroll"],initialBreakpoint:[2,"initial-breakpoint"],backdropBreakpoint:[2,"backdrop-breakpoint"],handle:[4],handleBehavior:[1,"handle-behavior"],component:[1],componentProps:[16],cssClass:[1,"css-class"],backdropDismiss:[4,"backdrop-dismiss"],showBackdrop:[4,"show-backdrop"],animated:[4],presentingElement:[16],htmlAttributes:[16],isOpen:[4,"is-open"],trigger:[1],keepContentsMounted:[4,"keep-contents-mounted"],focusTrap:[4,"focus-trap"],canDismiss:[4,"can-dismiss"],isSheetModal:[32],presented:[32],present:[64],dismiss:[64],onDidDismiss:[64],onWillDismiss:[64],setCurrentBreakpoint:[64],getCurrentBreakpoint:[64]},[[9,"resize","onWindowResize"]],{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}]),gt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};function kt(){"undefined"!=typeof customElements&&["ion-modal","ion-backdrop"].forEach((t=>{switch(t){case"ion-modal":customElements.get(d(t))||customElements.define(d(t),wt);break;case"ion-backdrop":customElements.get(d(t))||J()}}))}export{wt as M,kt as d}