index-legacy-734c3dbe.js 3.4 KB

1
  1. !function(){const e=["window"];function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}System.register(["./index-legacy-c74454ce.js","./index-legacy-67665670.js"],(function(o,i){"use strict";var u,a,l,c,f,s,v,p,y,d;return{setters:[e=>{u=e.t,a=e.i,l=e.n,c=e.b,f=e.c},e=>{s=e.c,v=e.j,p=e.H,y=e.aA,d=e.o}],execute:function(){function i(e){var t;const n=f(e);return null!=(t=null==n?void 0:n.$el)?t:n}o({a:function(t,n,o={}){const{window:a=b}=o,l=r(o,e);let c;const f=O((()=>a&&"ResizeObserver"in a)),p=()=>{c&&(c.disconnect(),c=void 0)},y=s((()=>Array.isArray(t)?t.map((e=>i(e))):[i(t)])),d=v(y,(e=>{if(p(),f.value&&a){c=new ResizeObserver(n);for(const t of e)t&&c.observe(t,l)}}),{immediate:!0,flush:"post",deep:!0}),w=()=>{p(),d()};return u(w),{isSupported:f,stop:w}},u:function(e={}){const{window:t=b}=e,n=null==t?void 0:t.navigator,r=O((()=>n&&"connection"in n)),o=p(!0),i=p(!1),u=p(void 0),a=p(void 0),l=p(void 0),c=p(void 0),f=p(void 0),s=p(void 0),v=p("unknown"),y=r.value&&n.connection;function d(){n&&(o.value=n.onLine,u.value=o.value?void 0:Date.now(),a.value=o.value?Date.now():void 0,y&&(l.value=y.downlink,c.value=y.downlinkMax,s.value=y.effectiveType,f.value=y.rtt,i.value=y.saveData,v.value=y.type))}return t&&(w(t,"offline",(()=>{o.value=!1,u.value=Date.now()})),w(t,"online",(()=>{o.value=!0,a.value=Date.now()}))),y&&w(y,"change",d,!1),d(),{isSupported:r,isOnline:o,saveData:i,offlineAt:u,onlineAt:a,downlink:l,downlinkMax:c,effectiveType:s,rtt:f,type:v}}});const b=a?window:void 0;function w(...e){let r,o,a,s;if("string"==typeof e[0]||Array.isArray(e[0])?([o,a,s]=e,r=b):[r,o,a,s]=e,!r)return l;Array.isArray(o)||(o=[o]),Array.isArray(a)||(a=[a]);const p=[],y=()=>{p.forEach((e=>e())),p.length=0},d=v((()=>[i(r),f(s)]),(([e,r])=>{if(y(),!e)return;const i=c(r)?function(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},r):r;p.push(...o.flatMap((t=>a.map((n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,i))))))}),{immediate:!0,flush:"post"}),w=()=>{d(),y()};return u(w),w}function O(e){const t=function(){const e=p(!1);return y()&&d((()=>{e.value=!0})),e}();return s((()=>(t.value,Boolean(e()))))}}}}))}();