index-legacy-91c3e837.js 5.1 KB

1
  1. System.register(["./index-legacy-25c522ea.js"],(function(t,e){"use strict";var o,n,r,l,i,u,c,a,s,f;return{setters:[t=>{o=t.r,n=t.bD,r=t.bE,l=t.bF,i=t.bG,u=t.w,c=t.e,a=t.x,s=t.aq,f=t.y}],execute:function(){function e(t){return!!n()&&(r(t),!0)}function v(t){return"function"==typeof t?t():l(t)}t({a:function({window:t=P}={}){if(!t)return{x:o(0),y:o(0)};const e=o(t.scrollX),n=o(t.scrollY);return j(t,"scroll",(()=>{e.value=t.scrollX,n.value=t.scrollY}),{capture:!1,passive:!0}),{x:e,y:n}},b:function(t,e={}){const{throttle:n=0,idle:r=200,onStop:l=p,onScroll:i=p,offset:u={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:f="auto"}=e,m=o(0),y=o(0),h=c({get:()=>m.value,set(t){g(t,void 0)}}),w=c({get:()=>y.value,set(t){g(void 0,t)}});function g(e,o){var n,r,l;const i=v(t);i&&(null==(l=i instanceof Document?document.body:i)||l.scrollTo({top:null!=(n=v(o))?n:w.value,left:null!=(r=v(e))?r:h.value,behavior:v(f)}))}const O=o(!1),x=a({left:!0,right:!1,top:!0,bottom:!1}),A=a({left:!1,right:!1,top:!1,bottom:!1}),P=t=>{O.value&&(O.value=!1,A.left=!1,A.right=!1,A.top=!1,A.bottom=!1,l(t))},E=function(t,e=200,o={}){return d(function(t,e={}){let o,n,r=p;const l=t=>{clearTimeout(t),r(),r=p},i=i=>{const u=v(t),c=v(e.maxWait);return o&&l(o),u<=0||void 0!==c&&c<=0?(n&&(l(n),n=null),Promise.resolve(i())):new Promise(((t,a)=>{r=e.rejectOnCancel?a:t,c&&!n&&(n=setTimeout((()=>{o&&l(o),n=null,t(i())}),c)),o=setTimeout((()=>{n&&l(n),n=null,t(i())}),u)}))};return i}(e,o),t)}(P,n+r),S=t=>{const e=t===window?t.document.documentElement:t===document?t.documentElement:t,{display:o,flexDirection:n}=getComputedStyle(e),r=e.scrollLeft;A.left=r<m.value,A.right=r>m.value;const l=Math.abs(r)<=0+(u.left||0),i=Math.abs(r)+e.clientWidth>=e.scrollWidth-(u.right||0)-M;"flex"===o&&"row-reverse"===n?(x.left=i,x.right=l):(x.left=l,x.right=i),m.value=r;let c=e.scrollTop;t!==document||c||(c=document.body.scrollTop),A.top=c<y.value,A.bottom=c>y.value;const a=Math.abs(c)<=0+(u.top||0),s=Math.abs(c)+e.clientHeight>=e.scrollHeight-(u.bottom||0)-M;"flex"===o&&"column-reverse"===n?(x.top=s,x.bottom=a):(x.top=a,x.bottom=s),y.value=c},T=t=>{const e=t.target===document?t.target.documentElement:t.target;S(e),O.value=!0,E(t),i(t)};return j(t,"scroll",n?b(T,n,!0,!1):T,s),j(t,"scrollend",P,s),{x:h,y:w,isScrolling:O,arrivedState:x,directions:A,measure(){const e=v(t);e&&S(e)}}},c:function(t=1e3,n={}){const{controls:r=!1,immediate:l=!0,callback:c}=n,a=o(0),s=()=>a.value+=1,f=()=>{a.value=0},p=function(t,n=1e3,r={}){const{immediate:l=!0,immediateCallback:c=!1}=r;let a=null;const s=o(!1);function f(){a&&(clearInterval(a),a=null)}function p(){s.value=!1,f()}function d(){const e=v(n);e<=0||(s.value=!0,c&&t(),f(),a=setInterval(t,e))}return l&&m&&d(),(i(n)||"function"==typeof n)&&e(u(n,(()=>{s.value&&m&&d()}))),e(p),{isActive:s,pause:p,resume:d}}(c?()=>{s(),c(a.value)}:s,t,{immediate:l});return r?x({counter:a,reset:f},p):a},d:function(t,n,r={}){const l=r,{window:i=P}=l,a=D(l,["window"]);let v;const m=function(t){const e=function(){const t=o(!1);return s()&&f((()=>{t.value=!0})),t}();return c((()=>(e.value,Boolean(t()))))}((()=>i&&"ResizeObserver"in i)),p=()=>{v&&(v.disconnect(),v=void 0)},d=c((()=>Array.isArray(t)?t.map((t=>A(t))):[A(t)])),b=u(d,(t=>{if(p(),m.value&&i){v=new ResizeObserver(n);for(const e of t)e&&v.observe(e,a)}}),{immediate:!0,flush:"post",deep:!0}),y=()=>{p(),b()};return e(y),{isSupported:m,stop:y}},u:j});const m="undefined"!=typeof window,p=()=>{};function d(t,e){return function(...o){return new Promise(((n,r)=>{Promise.resolve(t((()=>e.apply(this,o)),{fn:e,thisArg:this,args:o})).then(n).catch(r)}))}}function b(t,e=200,o=!1,n=!0,r=!1){return d(function(t,e=!0,o=!0,n=!1){let r,l,i=0,u=!0,c=p;const a=()=>{r&&(clearTimeout(r),r=void 0,c(),c=p)};return s=>{const f=v(t),m=Date.now()-i,p=()=>l=s();return a(),f<=0?(i=Date.now(),p()):(m>f&&(o||!u)?(i=Date.now(),p()):e&&(l=new Promise(((t,e)=>{c=n?e:t,r=setTimeout((()=>{i=Date.now(),u=!0,t(p()),a()}),Math.max(0,f-m))}))),o||r||(r=setTimeout((()=>u=!0),f)),u=!1,l)}}(e,o,n,r),t)}var y=Object.defineProperty,h=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,O=(t,e,o)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,x=(t,e)=>{for(var o in e||(e={}))w.call(e,o)&&O(t,o,e[o]);if(h)for(var o of h(e))g.call(e,o)&&O(t,o,e[o]);return t};function A(t){var e;const o=v(t);return null!=(e=null==o?void 0:o.$el)?e:o}const P=m?window:void 0;function j(...t){let o,n,r,l;if("string"==typeof t[0]||Array.isArray(t[0])?([n,r,l]=t,o=P):[o,n,r,l]=t,!o)return p;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],c=()=>{i.forEach((t=>t())),i.length=0},a=u((()=>[A(o),v(l)]),(([t,e])=>{c(),t&&i.push(...n.flatMap((o=>r.map((n=>((t,e,o,n)=>(t.addEventListener(e,o,n),()=>t.removeEventListener(e,o,n)))(t,o,n,e))))))}),{immediate:!0,flush:"post"}),s=()=>{a(),c()};return e(s),s}var E=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,D=(t,e)=>{var o={};for(var n in t)S.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&E)for(var n of E(t))e.indexOf(n)<0&&T.call(t,n)&&(o[n]=t[n]);return o};const M=1}}}));