angular-t9n
Version:
A translation tool for Angular i18n
1 lines • 66.8 kB
JavaScript
import{a as Zt,b as Jt}from"./chunk-YZWX42DL.js";import{a as Yt,b as Xt}from"./chunk-ZOA5KTCR.js";import{a as en,b as tn}from"./chunk-2GFTPPRY.js";import{b as Gt,e as Ht}from"./chunk-3UMPV344.js";import{a as Qt,b as $t,e as jt,g as xt,i as Ut}from"./chunk-JCOG3QZD.js";import{b as nn}from"./chunk-OHHIBRCV.js";import{$ as Qe,$c as We,Db as se,Eb as j,Fa as $e,Fb as be,Ha as kt,Id as Ge,Mc as Bt,Nc as qt,Oc as S,Pc as q,Sb as Ft,Tb as xe,Tc as Vt,Uc as Ue,Vb as Lt,Xb as zt,Y as E,Yb as Kt,Za as Ve,_ as pe,_c as ie,ac as H,ad as ve,bb as Ot,bd as Wt,da as ge,ea as ye,eb as _e,fb as je,gb as Rt,wa as Ct,wb as Se,xb as It,xc as Ee,za as Dt}from"./chunk-XN5ZPBP6.js";import{a as fe,c as Nt}from"./chunk-4CLCTAJ7.js";function sn(i){return new E(3e3,!1)}function qn(){return new E(3100,!1)}function Qn(){return new E(3101,!1)}function $n(i){return new E(3001,!1)}function Vn(i){return new E(3003,!1)}function jn(i){return new E(3004,!1)}function xn(i,e){return new E(3005,!1)}function Un(){return new E(3006,!1)}function Wn(){return new E(3007,!1)}function Gn(i,e){return new E(3008,!1)}function Hn(i){return new E(3002,!1)}function Yn(i,e,t,n,s){return new E(3010,!1)}function Xn(){return new E(3011,!1)}function Zn(){return new E(3012,!1)}function Jn(){return new E(3200,!1)}function es(){return new E(3202,!1)}function ts(){return new E(3013,!1)}function ns(i){return new E(3014,!1)}function ss(i){return new E(3015,!1)}function is(i){return new E(3016,!1)}function rs(i,e){return new E(3404,!1)}function os(i){return new E(3502,!1)}function as(i){return new E(3503,!1)}function ls(){return new E(3300,!1)}function cs(i){return new E(3504,!1)}function us(i){return new E(3301,!1)}function hs(i,e){return new E(3302,!1)}function ms(i){return new E(3303,!1)}function ds(i,e){return new E(3400,!1)}function fs(i){return new E(3401,!1)}function ps(i){return new E(3402,!1)}function gs(i,e){return new E(3505,!1)}function x(i){switch(i.length){case 0:return new ie;case 1:return i[0];default:return new We(i)}}function _n(i,e,t=new Map,n=new Map){let s=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((_,y)=>{let d=y,g=_;if(y!=="offset")switch(d=i.normalizePropertyName(d,s),g){case ve:g=t.get(y);break;case q:g=n.get(y);break;default:g=i.normalizeStyleValue(y,d,g,s);break}u.set(d,g)}),h||r.push(u),a=u,o=c}),s.length)throw os(s);return r}function yt(i,e,t,n){switch(e){case"start":i.onStart(()=>n(t&&He(t,"start",i)));break;case"done":i.onDone(()=>n(t&&He(t,"done",i)));break;case"destroy":i.onDestroy(()=>n(t&&He(t,"destroy",i)));break}}function He(i,e,t){let n=t.totalTime,s=!!t.disabled,r=_t(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,n??i.totalTime,s),o=i._data;return o!=null&&(r._data=o),r}function _t(i,e,t,n,s="",r=0,o){return{element:i,triggerName:e,fromState:t,toState:n,phaseName:s,totalTime:r,disabled:!!o}}function I(i,e,t){let n=i.get(e);return n||i.set(e,n=t),n}function rn(i){let e=i.indexOf(":"),t=i.substring(1,e),n=i.slice(e+1);return[t,n]}var ys=typeof document>"u"?null:document.documentElement;function St(i){let e=i.parentNode||i.host||null;return e===ys?null:e}function _s(i){return i.substring(1,6)=="ebkit"}var Y=null,on=!1;function Ss(i){Y||(Y=bs()||{},on=Y.style?"WebkitAppearance"in Y.style:!1);let e=!0;return Y.style&&!_s(i)&&(e=i in Y.style,!e&&on&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Y.style)),e}function bs(){return typeof document<"u"?document.body:null}function Sn(i,e){for(;e;){if(e===i)return!0;e=St(e)}return!1}function bn(i,e,t){if(t)return Array.from(i.querySelectorAll(e));let n=i.querySelector(e);return n?[n]:[]}var bt=(()=>{class i{validateStyleProperty(t){return Ss(t)}containsElement(t,n){return Sn(t,n)}getParentElement(t){return St(t)}query(t,n,s){return bn(t,n,s)}computeStyle(t,n,s){return s||""}animate(t,n,s,r,o,a=[],l){return new ie(s,r)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})(),J=class{static NOOP=new bt},ee=class{};var Es=1e3,En="{{",vs="}}",vn="ng-enter",tt="ng-leave",Te="ng-trigger",Ne=".ng-trigger",an="ng-animating",nt=".ng-animating";function $(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:st(parseFloat(e[1]),e[2])}function st(i,e){switch(e){case"s":return i*Es;default:return i}}function Ce(i,e,t){return i.hasOwnProperty("duration")?i:Ts(i,e,t)}function Ts(i,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,s,r=0,o="";if(typeof i=="string"){let a=i.match(n);if(a===null)return e.push(sn(i)),{duration:0,delay:0,easing:""};s=st(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=st(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else s=i;if(!t){let a=!1,l=e.length;s<0&&(e.push(qn()),a=!0),r<0&&(e.push(Qn()),a=!0),a&&e.splice(l,0,sn(i))}return{duration:s,delay:r,easing:o}}function ws(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function Q(i,e,t){e.forEach((n,s)=>{let r=Et(s);t&&!t.has(s)&&t.set(s,i.style[r]),i.style[r]=n})}function Z(i,e){e.forEach((t,n)=>{let s=Et(n);i.style[s]=""})}function ae(i){return Array.isArray(i)?i.length==1?i[0]:Vt(i):i}function As(i,e,t){let n=e.params||{},s=Tn(i);s.length&&s.forEach(r=>{n.hasOwnProperty(r)||t.push($n(r))})}var it=new RegExp(`${En}\\s*(.+?)\\s*${vs}`,"g");function Tn(i){let e=[];if(typeof i=="string"){let t;for(;t=it.exec(i);)e.push(t[1]);it.lastIndex=0}return e}function ce(i,e,t){let n=`${i}`,s=n.replace(it,(r,o)=>{let a=e[o];return a==null&&(t.push(Vn(o)),a=""),a.toString()});return s==n?i:s}var Ms=/-+([a-z0-9])/g;function Et(i){return i.replace(Ms,(...e)=>e[1].toUpperCase())}function Ps(i,e){return i===0||e===0}function Ns(i,e,t){if(t.size&&e.length){let n=e[0],s=[];if(t.forEach((r,o)=>{n.has(o)||s.push(o),n.set(o,r)}),s.length)for(let r=1;r<e.length;r++){let o=e[r];s.forEach(a=>o.set(a,vt(i,a)))}}return e}function R(i,e,t){switch(e.type){case S.Trigger:return i.visitTrigger(e,t);case S.State:return i.visitState(e,t);case S.Transition:return i.visitTransition(e,t);case S.Sequence:return i.visitSequence(e,t);case S.Group:return i.visitGroup(e,t);case S.Animate:return i.visitAnimate(e,t);case S.Keyframes:return i.visitKeyframes(e,t);case S.Style:return i.visitStyle(e,t);case S.Reference:return i.visitReference(e,t);case S.AnimateChild:return i.visitAnimateChild(e,t);case S.AnimateRef:return i.visitAnimateRef(e,t);case S.Query:return i.visitQuery(e,t);case S.Stagger:return i.visitStagger(e,t);default:throw jn(e.type)}}function vt(i,e){return window.getComputedStyle(i)[e]}var Cs=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),De=class extends ee{normalizePropertyName(e,t){return Et(e)}normalizeStyleValue(e,t,n,s){let r="",o=n.toString().trim();if(Cs.has(t)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&s.push(xn(e,n))}return o+r}};var ke="*";function Ds(i,e){let t=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(n=>ks(n,t,e)):t.push(i),t}function ks(i,e,t){if(i[0]==":"){let l=Os(i,t);if(typeof l=="function"){e.push(l);return}i=l}let n=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(ss(i)),e;let s=n[1],r=n[2],o=n[3];e.push(ln(s,o));let a=s==ke&&o==ke;r[0]=="<"&&!a&&e.push(ln(o,s))}function Os(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n)<parseFloat(t);default:return e.push(is(i)),"* => *"}}var we=new Set(["true","1"]),Ae=new Set(["false","0"]);function ln(i,e){let t=we.has(i)||Ae.has(i),n=we.has(e)||Ae.has(e);return(s,r)=>{let o=i==ke||i==s,a=e==ke||e==r;return!o&&t&&typeof s=="boolean"&&(o=s?we.has(i):Ae.has(i)),!a&&n&&typeof r=="boolean"&&(a=r?we.has(e):Ae.has(e)),o&&a}}var wn=":self",Rs=new RegExp(`s*${wn}s*,?`,"g");function An(i,e,t,n){return new rt(i).build(e,t,n)}var cn="",rt=class{_driver;constructor(e){this._driver=e}build(e,t,n){let s=new ot(t);return this._resetContextStyleTimingState(s),R(this,ae(e),s)}_resetContextStyleTimingState(e){e.currentQuerySelector=cn,e.collectedStyles=new Map,e.collectedStyles.set(cn,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,s=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(Un()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==S.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==S.Transition){let l=this.visitTransition(a,t);n+=l.queryCount,s+=l.depCount,o.push(l)}else t.errors.push(Wn())}),{type:S.Trigger,name:e.name,states:r,transitions:o,queryCount:n,depCount:s,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),s=e.options&&e.options.params||null;if(n.containsDynamicStyles){let r=new Set,o=s||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Tn(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(Gn(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:n,options:s?{params:s}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=R(this,ae(e.animation),t),s=Ds(e.expr,t.errors);return{type:S.Transition,matchers:s,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:X(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(n=>R(this,n,t)),options:X(e.options)}}visitGroup(e,t){let n=t.currentTime,s=0,r=e.steps.map(o=>{t.currentTime=n;let a=R(this,o,t);return s=Math.max(s,t.currentTime),a});return t.currentTime=s,{type:S.Group,steps:r,options:X(e.options)}}visitAnimate(e,t){let n=zs(e.timings,t.errors);t.currentAnimateTimings=n;let s,r=e.styles?e.styles:Ue({});if(r.type==S.Keyframes)s=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};n.easing&&(c.easing=n.easing),o=Ue(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,s=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:n,style:s,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],s=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of s)typeof a=="string"?a===q?n.push(a):t.errors.push(Hn(a)):n.push(new Map(Object.entries(a)));let r=!1,o=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(En)>=0){r=!0;break}}}),{type:S.Style,styles:n,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,s=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=s&&r>=h.startTime&&s<=h.endTime&&(t.errors.push(Yn(l,h.startTime,h.endTime,r,s)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:s}),t.options&&As(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Xn()),n;let s=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),C=A.offset!=null?A.offset:Ls(A.styles),P=0;return C!=null&&(r++,P=A.offset=C),l=l||P<0||P>1,a=a||P<c,c=P,o.push(P),A});l&&t.errors.push(Zn()),a&&t.errors.push(Jn());let u=e.steps.length,_=0;r>0&&r<u?t.errors.push(es()):r==0&&(_=s/(u-1));let y=u-1,d=t.currentTime,g=t.currentAnimateTimings,v=g.duration;return h.forEach((w,A)=>{let C=_>0?A==y?1:_*A:o[A],P=C*v;t.currentTime=d+g.delay+P,g.duration=P,this._validateStyleAst(w,t),w.offset=C,n.styles.push(w)}),n}visitReference(e,t){return{type:S.Reference,animation:R(this,ae(e.animation),t),options:X(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:X(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:X(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,s=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=Is(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,I(t.collectedStyles,t.currentQuerySelector,new Map);let a=R(this,ae(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:S.Query,selector:r,limit:s.limit||0,optional:!!s.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:X(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(ts());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Ce(e.timings,t.errors,!0);return{type:S.Stagger,animation:R(this,ae(e.animation),t),timings:n,options:null}}};function Is(i){let e=!!i.split(/\s*,\s*/).find(t=>t==wn);return e&&(i=i.replace(Rs,"")),i=i.replace(/@\*/g,Ne).replace(/@\w+/g,t=>Ne+"-"+t.slice(1)).replace(/:animating/g,nt),[i,e]}function Fs(i){return i?fe({},i):null}var ot=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function Ls(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let t=i;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function zs(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let r=Ce(i,e).duration;return Ye(r,0,"")}let t=i;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=Ye(0,0,"");return r.dynamic=!0,r.strValue=t,r}let s=Ce(t,e);return Ye(s.duration,s.delay,s.easing)}function X(i){return i?(i=fe({},i),i.params&&(i.params=Fs(i.params))):i={},i}function Ye(i,e,t){return{duration:i,delay:e,easing:t}}function Tt(i,e,t,n,s,r,o=null,a=!1){return{type:1,element:i,keyframes:e,preStyleProps:t,postStyleProps:n,duration:s,delay:r,totalTime:s+r,easing:o,subTimeline:a}}var ue=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ks=1,Bs=":enter",qs=new RegExp(Bs,"g"),Qs=":leave",$s=new RegExp(Qs,"g");function Mn(i,e,t,n,s,r=new Map,o=new Map,a,l,c=[]){return new at().buildKeyframes(i,e,t,n,s,r,o,a,l,c)}var at=class{buildKeyframes(e,t,n,s,r,o,a,l,c,h=[]){c=c||new ue;let u=new lt(e,t,c,s,r,h,[]);u.options=l;let _=l.delay?$(l.delay):0;u.currentTimeline.delayNextStep(_),u.currentTimeline.setStyles([o],null,u.errors,l),R(this,n,u);let y=u.timelines.filter(d=>d.containsAnimation());if(y.length&&a.size){let d;for(let g=y.length-1;g>=0;g--){let v=y[g];if(v.element===t){d=v;break}}d&&!d.allowOnlyTimelineStyles()&&d.setStyles([a],null,u.errors,l)}return y.length?y.map(d=>d.buildKeyframes()):[Tt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let s=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,s,s.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let s of e){let r=s?.delay;if(r){let o=typeof r=="number"?r:$(ce(r,s?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(e,t,n){let r=t.currentTimeline.currentTime,o=n.duration!=null?$(n.duration):null,a=n.delay!=null?$(n.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),R(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,s=t,r=e.options;if(r&&(r.params||r.delay)&&(s=t.createSubContext(r),s.transformIntoNewTimeline(),r.delay!=null)){s.previousNode.type==S.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=Oe);let o=$(r.delay);s.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>R(this,o,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>n&&s.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],s=t.currentTimeline.currentTime,r=e.options&&e.options.delay?$(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),R(this,o,a),s=Math.max(s,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(s),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,s=t.params?ce(n,t.params,t.errors):n;return Ce(s,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),s=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),s.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),s.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,s=t.currentAnimateTimings;!s&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=s&&s.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,s=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(s+r),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,s=e.options||{},r=s.delay?$(s.delay):0;r&&(t.previousNode.type===S.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Oe);let o=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!s.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),R(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let _=u.currentTimeline.currentTime;o=Math.max(o,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,s=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;R(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=s.currentTime-u+(s.startTime-n.currentTimeline.startTime)}},Oe={},lt=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Oe;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,n,s,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=s,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new Re(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,s=this.options;n.duration!=null&&(s.duration=$(n.duration)),n.delay!=null&&(s.delay=$(n.delay));let r=n.params;if(r){let o=s.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=ce(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(s=>{n[s]=t[s]})}}return e}createSubContext(e=null,t,n){let s=t||this.element,r=new i(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Oe,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let s={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},r=new ct(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,s,e.stretchStartingKeyframe);return this.timelines.push(r),s}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,s,r,o){let a=[];if(s&&a.push(this.element),e.length>0){e=e.replace(qs,"."+this._enterClassName),e=e.replace($s,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!r&&a.length==0&&o.push(ns(t)),a}},Re=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,n,s){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=s,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new i(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ks,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||q),this._currentKeyframe.set(t,q);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,s){t&&this._previousKeyframe.set("easing",t);let r=s&&s.params||{},o=Vs(e,this._globalTimelineStyles);for(let[a,l]of o){let c=ce(l,r,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??q),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let s=this._styleSummary.get(n);(!s||t.time>s.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,s=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===ve?e.add(u):h===q&&t.add(u)}),n||c.set("offset",l/this.duration),s.push(c)});let r=[...e.values()],o=[...t.values()];if(n){let a=s[0],l=new Map(a);a.set("offset",0),l.set("offset",1),s=[a,l]}return Tt(this.element,s,r,o,this.duration,this.startTime,this.easing,!1)}},ct=class extends Re{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,n,s,r,o,a=!1){super(e,t,o.delay),this.keyframes=n,this.preStyleProps=s,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:s}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=n+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",un(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let _=new Map(e[u]),y=_.get("offset"),d=t+y*n;_.set("offset",un(d/o)),r.push(_)}n=o,t=0,s="",e=r}return Tt(this.element,e,this.preStyleProps,this.postStyleProps,n,t,s,!0)}};function un(i,e=3){let t=Math.pow(10,e-1);return Math.round(i*t)/t}function Vs(i,e){let t=new Map,n;return i.forEach(s=>{if(s==="*"){n??=e.keys();for(let r of n)t.set(r,q)}else for(let[r,o]of s)t.set(r,o)}),t}function hn(i,e,t,n,s,r,o,a,l,c,h,u,_){return{type:0,element:i,triggerName:e,isRemovalTransition:s,fromState:t,fromStyles:r,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:_}}var Xe={},Ie=class{_triggerName;ast;_stateStyles;constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,s){return js(this.ast.matchers,e,t,n,s)}buildStyles(e,t,n){let s=this._stateStyles.get("*");return e!==void 0&&(s=this._stateStyles.get(e?.toString())||s),s?s.buildStyles(t,n):new Map}build(e,t,n,s,r,o,a,l,c,h){let u=[],_=this.ast.options&&this.ast.options.params||Xe,y=a&&a.params||Xe,d=this.buildStyles(n,y,u),g=l&&l.params||Xe,v=this.buildStyles(s,g,u),w=new Set,A=new Map,C=new Map,P=s==="void",te={params:Pn(g,_),delay:this.ast.options?.delay},K=h?[]:Mn(e,t,this.ast.animation,r,o,d,v,te,c,u),D=0;return K.forEach(k=>{D=Math.max(k.duration+k.delay,D)}),u.length?hn(t,this._triggerName,n,s,P,d,v,[],[],A,C,D,u):(K.forEach(k=>{let U=k.element,ne=I(A,U,new Set);k.preStyleProps.forEach(W=>ne.add(W));let wt=I(C,U,new Set);k.postStyleProps.forEach(W=>wt.add(W)),U!==t&&w.add(U)}),hn(t,this._triggerName,n,s,P,d,v,K,[...w.values()],A,C,D))}};function js(i,e,t,n,s){return i.some(r=>r(e,t,n,s))}function Pn(i,e){let t=fe({},e);return Object.entries(i).forEach(([n,s])=>{s!=null&&(t[n]=s)}),t}var ut=class{styles;defaultParams;normalizer;constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,s=Pn(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=ce(o,s,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),n.set(a,o)})}),n}};function xs(i,e,t){return new ht(i,e,t)}var ht=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,t.states.forEach(s=>{let r=s.options&&s.options.params||{};this.states.set(s.name,new ut(s.style,r,n))}),mn(this.states,"true","1"),mn(this.states,"false","0"),t.transitions.forEach(s=>{this.transitionFactories.push(new Ie(e,s,this.states))}),this.fallbackTransition=Us(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,s){return this.transitionFactories.find(o=>o.match(e,t,n,s))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function Us(i,e,t){let n=[(o,a)=>!0],s={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:s,matchers:n,options:null,queryCount:0,depCount:0};return new Ie(i,r,e)}function mn(i,e,t){i.has(e)?i.has(t)||i.set(t,i.get(e)):i.has(t)&&i.set(e,i.get(t))}var Ws=new ue,mt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n}register(e,t){let n=[],s=[],r=An(this._driver,t,n,s);if(n.length)throw as(n);s.length&&void 0,this._animations.set(e,r)}_buildPlayer(e,t,n){let s=e.element,r=_n(this._normalizer,e.keyframes,t,n);return this._driver.animate(s,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let s=[],r=this._animations.get(e),o,a=new Map;if(r?(o=Mn(this._driver,t,r,vn,tt,new Map,new Map,n,Ws,s),o.forEach(h=>{let u=I(a,h.element,new Map);h.postStyleProps.forEach(_=>u.set(_,null))})):(s.push(ls()),o=[]),s.length)throw cs(s);a.forEach((h,u)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(u,y,q))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=x(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw us(e);return t}listen(e,t,n,s){let r=_t(t,"","","");return yt(this._getPlayer(e),n,r,s),()=>{}}command(e,t,n,s){if(n=="register"){this.register(e,s[0]);return}if(n=="create"){let o=s[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(e);break}}},dn="ng-animate-queued",Gs=".ng-animate-queued",Ze="ng-animate-disabled",Hs=".ng-animate-disabled",Ys="ng-star-inserted",Xs=".ng-star-inserted",Zs=[],Nn={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Js={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},z="__ng_removed",he=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),s=n?e.value:e;if(this.value=ti(s),n){let r=e,{value:o}=r,a=Nt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(s=>{n[s]==null&&(n[s]=t[s])})}}},le="void",Je=new he(le),dt=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,n,s){if(!this._triggers.has(t))throw hs(n,t);if(n==null||n.length==0)throw ms(t);if(!ni(n))throw ds(n,t);let r=I(this._elementListeners,e,[]),o={name:t,phase:n,callback:s};r.push(o);let a=I(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,Te),L(e,Te+"-"+t),a.set(t,Je)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw fs(e);return t}trigger(e,t,n,s=!0){let r=this._getTrigger(t),o=new me(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,Te),L(e,Te+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new he(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=Je),!(c.value===le)&&l.value===c.value){if(!ri(l.params,c.params)){let g=[],v=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{Z(e,v),Q(e,w)})}return}let _=I(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),d=!1;if(!y){if(!s)return;y=r.fallbackTransition,d=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:d}),d||(L(e,dn),o.onStart(()=>{re(e,dn)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let v=this._engine.playersByElement.get(e);if(v){let w=v.indexOf(o);w>=0&&v.splice(w,1)}}),this.players.push(o),_.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(s=>s.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,Ne,!0);n.forEach(s=>{if(s[z])return;let r=this._engine.fetchNamespacesByElement(s);r.size?r.forEach(o=>o.triggerLeaveAnimation(s,t,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(e,t,n,s){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,le,s);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),n&&x(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let s=new Set;t.forEach(r=>{let o=r.name;if(s.has(o))return;s.add(o);let l=this._triggers.get(o).fallbackTransition,c=n.get(o)||Je,h=new he(le),u=new me(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let s=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(e):[];if(r&&r.length)s=!0;else{let o=e;for(;o=o.parentNode;)if(n.statesByElement.get(o)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(e),s)n.markElementAsRemoved(this.id,e,!1,t);else{let r=e[z];(!r||r===Nn)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let s=n.player;if(s.destroyed)return;let r=n.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==n.triggerName){let l=_t(r,n.triggerName,n.fromState.value,n.toState.value);l._data=e,yt(n.player,a.phase,l,a.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):t.push(n)}),this._queue=[],t.sort((n,s)=>{let r=n.transition.ast.depCount,o=s.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(n.element,s.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},ft=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new dt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,s=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=s.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||n.unshift(e)}else n.push(e);return s.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let s=this._namespaceLookup[e];s&&s.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let s=this._namespaceList.indexOf(n);s>=0&&this._namespaceList.splice(s,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let s of n.values())if(s.namespaceId){let r=this._fetchNamespace(s.namespaceId);r&&t.add(r)}}return t}trigger(e,t,n,s){if(Me(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,n,s),!0}return!1}insertNode(e,t,n,s){if(!Me(t))return;let r=t[z];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,n)}s&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,Ze)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),re(e,Ze))}removeNode(e,t,n){if(Me(t)){let s=e?this._fetchNamespace(e):null;s?s.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,s,r){this.collectedLeaveElements.push(t),t[z]={namespaceId:e,setForRemoval:s,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,n,s,r){return Me(t)?this._fetchNamespace(e).listen(t,n,s,r):()=>{}}_buildInstruction(e,t,n,s,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,s,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,Ne,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,nt,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return x(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[z];if(t&&t.setForRemoval){if(e[z]=Nn,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Ze)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Hs,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,s)=>this._balanceNamespaceList(n,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++){let s=this.collectedEnterElements[n];L(s,Ys)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let n=[];try{t=this._flushAnimations(n,e)}finally{for(let s=0;s<n.length;s++)n[s]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++){let s=this.collectedLeaveElements[n];this.processLeaveNode(s)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(n=>n()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?x(t).onDone(()=>{n.forEach(s=>s())}):n.forEach(s=>s())}}reportError(e){throw ps(e)}_flushAnimations(e,t){let n=new ue,s=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(m=>{h.add(m);let f=this.driver.query(m,Gs,!0);for(let p=0;p<f.length;p++)h.add(f[p])});let u=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=gn(_,this.collectedEnterElements),d=new Map,g=0;y.forEach((m,f)=>{let p=vn+g++;d.set(f,p),m.forEach(b=>L(b,p))});let v=[],w=new Set,A=new Set;for(let m=0;m<this.collectedLeaveElements.length;m++){let f=this.collectedLeaveElements[m],p=f[z];p&&p.setForRemoval&&(v.push(f),w.add(f),p.hasAnimation?this.driver.query(f,Xs,!0).forEach(b=>w.add(b)):A.add(f))}let C=new Map,P=gn(_,Array.from(w));P.forEach((m,f)=>{let p=tt+g++;C.set(f,p),m.forEach(b=>L(b,p))}),e.push(()=>{y.forEach((m,f)=>{let p=d.get(f);m.forEach(b=>re(b,p))}),P.forEach((m,f)=>{let p=C.get(f);m.forEach(b=>re(b,p))}),v.forEach(m=>{this.processLeaveNode(m)})});let te=[],K=[];for(let m=this._namespaceList.length-1;m>=0;m--)this._namespaceList[m].drainQueuedTransitions(t).forEach(p=>{let b=p.player,M=p.element;if(te.push(b),this.collectedEnterElements.length){let N=M[z];if(N&&N.setForMove){if(N.previousTriggersValues&&N.previousTriggersValues.has(p.triggerName)){let G=N.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let de=F.get(p.triggerName);de.value=G,F.set(p.triggerName,de)}}b.destroy();return}}let B=!u||!this.driver.containsElement(u,M),O=C.get(M),V=d.get(M),T=this._buildInstruction(p,n,V,O,B);if(T.errors&&T.errors.length){K.push(T);return}if(B){b.onStart(()=>Z(M,T.fromStyles)),b.onDestroy(()=>Q(M,T.toStyles)),s.push(b);return}if(p.isFallbackTransition){b.onStart(()=>Z(M,T.fromStyles)),b.onDestroy(()=>Q(M,T.toStyles)),s.push(b);return}let Pt=[];T.timelines.forEach(N=>{N.stretchStartingKeyframe=!0,this.disabledNodes.has(N.element)||Pt.push(N)}),T.timelines=Pt,n.append(M,T.timelines);let Bn={instruction:T,player:b,element:M};o.push(Bn),T.queriedElements.forEach(N=>I(a,N,[]).push(b)),T.preStyleProps.forEach((N,G)=>{if(N.size){let F=l.get(G);F||l.set(G,F=new Set),N.forEach((de,qe)=>F.add(qe))}}),T.postStyleProps.forEach((N,G)=>{let F=c.get(G);F||c.set(G,F=new Set),N.forEach((de,qe)=>F.add(qe))})});if(K.length){let m=[];K.forEach(f=>{m.push(gs(f.triggerName,f.errors))}),te.forEach(f=>f.destroy()),this.reportError(m)}let D=new Map,k=new Map;o.forEach(m=>{let f=m.element;n.has(f)&&(k.set(f,f),this._beforeAnimationBuild(m.player.namespaceId,m.instruction,D))}),s.forEach(m=>{let f=m.element;this._getPreviousPlayers(f,!1,m.namespaceId,m.triggerName,null).forEach(b=>{I(D,f,[]).push(b),b.destroy()})});let U=v.filter(m=>yn(m,l,c)),ne=new Map;pn(ne,this.driver,A,c,q).forEach(m=>{yn(m,l,c)&&U.push(m)});let W=new Map;y.forEach((m,f)=>{pn(W,this.driver,new Set(m),l,ve)}),U.forEach(m=>{let f=ne.get(m),p=W.get(m);ne.set(m,new Map([...f?.entries()??[],...p?.entries()??[]]))});let Be=[],At=[],Mt={};o.forEach(m=>{let{element:f,player:p,instruction:b}=m;if(n.has(f)){if(h.has(f)){p.onDestroy(()=>Q(f,b.toStyles)),p.disabled=!0,p.overrideTotalTime(b.totalTime),s.push(p);return}let M=Mt;if(k.size>1){let O=f,V=[];for(;O=O.parentNode;){let T=k.get(O);if(T){M=T;break}V.push(O)}V.forEach(T=>k.set(T,M))}let B=this._buildAnimation(p.namespaceId,b,D,r,W,ne);if(p.setRealPlayer(B),M===Mt)Be.push(p);else{let O=this.playersByElement.get(M);O&&O.length&&(p.parentPlayer=x(O)),s.push(p)}}else Z(f,b.fromStyles),p.onDestroy(()=>Q(f,b.toStyles)),At.push(p),h.has(f)&&s.push(p)}),At.forEach(m=>{let f=r.get(m.element);if(f&&f.length){let p=x(f);m.setRealPlayer(p)}}),s.forEach(m=>{m.parentPlayer?m.syncPlayerEvents(m.parentPlayer):m.destroy()});for(let m=0;m<v.length;m++){let f=v[m],p=f[z];if(re(f,tt),p&&p.hasAnimation)continue;let b=[];if(a.size){let B=a.get(f);B&&B.length&&b.push(...B);let O=this.driver.query(f,nt,!0);for(let V=0;V<O.length;V++){let T=a.get(O[V]);T&&T.length&&b.push(...T)}}let M=b.filter(B=>!B.destroyed);M.length?si(this,f,M):this.processLeaveNode(f)}return v.length=0,Be.forEach(m=>{this.players.push(m),m.onDone(()=>{m.destroy();let f=this.players.indexOf(m);this.players.splice(f,1)}),m.play()}),Be}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,s,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==le;a.forEach(c=>{c.queued||!l&&c.triggerName!=s||o.push(c)})}}return(n||s)&&(o=o.filter(a=>!(n&&n!=a.namespaceId||s&&s!=a.triggerName))),o}_beforeAnimationBuild(e,t,n){let s=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:s;for(let l of t.timelines){let c=l.element,h=c!==r,u=I(n,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let d=y.getRealPlayer();d.beforeDestroy&&d.beforeDestroy(),y.destroy(),u.push(y)})}Z(r,t.fromStyles)}_buildAnimation(e,t,n,s,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,_=t.timelines.map(d=>{let g=d.element;h.add(g);let v=g[z];if(v&&v.removedBeforeQueried)return new ie(d.duration,d.delay);let w=g!==l,A=ii((n.get(g)||Zs).map(D=>D.getRealPlayer())).filter(D=>{let k=D;return k.element?k.element===g:!1}),C=r.get(g),P=o.get(g),te=_n(this._normalizer,d.keyframes,C,P),K=this._buildPlayer(d,te,A);if(d.subTimeline&&s&&u.add(g),w){let D=new me(e,a,g);D.setRealPlayer(K),c.push(D)}return K});c.forEach(d=>{I(this.playersByQueriedElement,d.element,[]).push(d),d.onDone(()=>ei(this.playersByQueriedElement,d.element,d))}),h.forEach(d=>L(d,an));let y=x(_);return y.onDestroy(()=>{h.forEach(d=>re(d,an)),Q(l,t.toStyles)}),u.forEach(d=>{I(s,d,[]).push(y)}),y}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new ie(e.duration,e.delay)}},me=class{namespaceId;triggerName;element;_player=new ie;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(s=>yt(e,n,void 0,s))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){I(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function ei(i,e,t){let n=i.get(e);if(n){if(n.length){let s=n.indexOf(t);n.splice(s,1)}n.length==0&&i.delete(e)}return n}function ti(i){return i??null}function Me(i){return i&&i.nodeType===1}function ni(i){return i=="start"||i=="done"}function fn(i,e){let t=i.style.display;return i.style.display=e??"none",t}function pn(i,e,t,n,s){let r=[];t.forEach(l=>r.push(fn(l)));let o=[];n.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let _=e.computeStyle(c,u,s);h.set(u,_),(!_||_.length==0)&&(c[z]=Js,o.push(c))}),i.set(c,h)});let a=0;return t.forEach(l=>fn(l,r[a++])),o}function gn(i,e){let t=new Map;if(i.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,s=new Set(e),r=new Map;function o(a){if(!a)return n;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:s.has(c)?l=n:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==n&&t.get(l).push(a)}),t}function L(i,e){i.classList?.add(e)}function re(i,e){i.classList?.remove(e)}function si(i,e,t){x(t).onDone(()=>i.processLeaveNode(e))}function ii(i){let e=[];return Cn(i,e),e}function Cn(i,e){for(let t=0;t<i.length;t++){let n=i[t];n instanceof We?Cn(n.players,e):e.push(n)}}function ri(i,e){let t=Object.keys(i),n=Object.keys(e);if(t.length!=n.length)return!1;for(let s=0;s<t.length;s++){let r=t[s];if(!e.hasOwnProperty(r)||i[r]!==e[r])return!1}return!0}function yn(i,e,t){let n=t.get(i);if(!n)return!1;let s=e.get(i);return s?n.forEach(r=>s.add(r)):e.set(i,n),t.delete(i),!0}var oe=class{_driver;_normalizer;_transitionEngine;_timelineEn