mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
17 lines
38 KiB
JavaScript
17 lines
38 KiB
JavaScript
|
|
var app=function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function r(){return Object.create(null)}function l(t){t.forEach(o)}function i(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e,n,o){if(t){const r=a(t,e,n,o);return t[0](r)}}function a(t,e,o,r){return t[1]&&r?n(o.ctx.slice(),t[1](r(e))):o.ctx}function u(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|r[o];return t}return e.dirty|r}return e.dirty}function f(t,e,n,o,r,l){if(r){const i=a(e,n,o,l);t.p(i,r)}}function d(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}const p="undefined"!=typeof window;let h=p?()=>window.performance.now():()=>Date.now(),m=p?t=>requestAnimationFrame(t):t;const g=new Set;function v(t){g.forEach((e=>{e.c(t)||(g.delete(e),e.f())})),0!==g.size&&m(v)}function $(t){let e;return 0===g.size&&m(v),{promise:new Promise((n=>{g.add(e={c:t,f:n})})),abort(){g.delete(e)}}}function b(t,e){t.appendChild(e)}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function x(t){const e=S("style");return function(t,e){b(t.head||t,e),e.sheet}(y(t),e),e.sheet}function _(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function k(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function S(t){return document.createElement(t)}function j(t){return document.createTextNode(t)}function O(){return j(" ")}function C(){return j("")}function N(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function P(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function M(t,e){t.value=null==e?"":e}function I(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function T(t,e){for(let n=0;n<t.options.length;n+=1){const o=t.options[n];if(o.__value===e)return void(o.selected=!0)}t.selectedIndex=-1}function E(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function R(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}const G=new Map;let B,U=0;function D(t,e,n,o,r,l,i,s=0){const c=16.666/o;let a="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*l(t);a+=100*t+`%{${i(o,1-o)}}\n`}const u=a+`100% {${i(n,1-n)}}\n}`,f=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,d=y(t),{stylesheet:p,rules:h}=G.get(d)||function(t,e){const n={stylesheet:x(e),rules:{}};return G.set(t,n),n}(d,t);h[f]||(h[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const m=t.style.animation||"";return t.style.animation=`${m?`${m}, `:""}${f} ${o}ms linear ${r}ms 1 both`,U+=1,f}function A(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),U-=r,U||m((()=>{U||(G.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&w(e)})),G.clear())})))}function F(n,o,r,l){if(!o)return t;const i=n.getBoundingClientRect();if(o.left===i.left&&o.right===i.right&&o.top===i.top&&o.bottom===i.bottom)return t;const{delay:s=0,duration:c=300,easing:a=e,start:u=h()+s,end:f=u+c,tick:d=t,css:p}=r(n,{from:o,to:i},l);let m,g=!0,v=!1;function b(){p&&A(n,m),g=!1}return $((t=>{if(!v&&t>=u&&(v=!0),v&&t>=f&&(d(1,0),b()),!g)return!1;if(v){const e=0+1*a((t-u)/c);d(e,1-e)}return!0})),p&&(m=D(n,0,1,c,s,a,p)),s||(v=!0),d(0,1),b}function L(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:n,height:o}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=o,J(t,r)}}function J(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const o=getComputedSt
|
||
|
|
/*! *****************************************************************************
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */function Ct(t){var{fallback:e}=t,o=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}(t,["fallback"]);const r=new Map,l=new Map;function s(t,r,l){return(s,c)=>(t.set(c.key,{rect:s.getBoundingClientRect()}),()=>{if(r.has(c.key)){const{rect:t}=r.get(c.key);return r.delete(c.key),function(t,e,r){const{delay:l=0,duration:s=(t=>30*Math.sqrt(t)),easing:c=jt}=n(n({},o),r),a=e.getBoundingClientRect(),u=t.left-a.left,f=t.top-a.top,d=t.width/a.width,p=t.height/a.height,h=Math.sqrt(u*u+f*f),m=getComputedStyle(e),g="none"===m.transform?"":m.transform,v=+m.opacity;return{delay:l,duration:i(s)?s(h):s,easing:c,css:(t,e)=>`\n\t\t\t\topacity: ${t*v};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${g} translate(${e*u}px,${e*f}px) scale(${t+(1-t)*d}, ${t+(1-t)*p});\n\t\t\t`}}(t,s,c)}return t.delete(c.key),e&&e(s,c,l)})}return[s(l,r,!1),s(r,l,!0)]}function Nt(t,{from:e,to:n},o={}){const r=getComputedStyle(t),l="none"===r.transform?"":r.transform,[s,c]=r.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*s/n.width-(n.left+s),u=e.top+e.height*c/n.height-(n.top+c),{delay:f=0,duration:d=(t=>120*Math.sqrt(t)),easing:p=jt}=o;return{delay:f,duration:i(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(t,o)=>{const r=o*a,i=o*u,s=t+o*e.width/n.width,c=t+o*e.height/n.height;return`transform: ${l} translate(${r}px, ${i}px) scale(${s}, ${c});`}}}function Pt(e){let n,o,r,l,i,s,c,a,u,f,d;return{c(){n=S("div"),o=S("div"),r=S("div"),l=O(),i=S("div"),s=O(),c=S("div"),a=O(),u=S("div"),f=j(e[0]),d=j("%"),P(r,"class","gauge-fill gauge-bg svelte-1er7lpr"),P(i,"class","gauge-fill svelte-1er7lpr"),I(i,"transform","rotate(-"+e[2]+"deg)"),I(i,"box-shadow","inset 0 0 60px -5px "+e[1]),P(c,"class","gauge-white svelte-1er7lpr"),P(u,"class","gauge-value svelte-1er7lpr"),P(o,"class","gauge-overflow svelte-1er7lpr"),P(n,"class","gauge svelte-1er7lpr")},m(t,e){_(t,n,e),b(n,o),b(o,r),b(o,l),b(o,i),b(o,s),b(o,c),b(o,a),b(o,u),b(u,f),b(u,d)},p(t,[e]){4&e&&I(i,"transform","rotate(-"+t[2]+"deg)"),2&e&&I(i,"box-shadow","inset 0 0 60px -5px "+t[1]),1&e&&q(f,t[0])},i:t,o:t,d(t){t&&w(n)}}}function qt(t,e,n){let o,r,{title:l}=e,{value:i=l}=e,{thresholds:s="90,100"}=e,{colors:c="#7CFC00,#FFD700,#FF0000"}=e;return t.$$set=t=>{"title"in t&&n(3,l=t.title),"value"in t&&n(0,i=t.value),"thresholds"in t&&n(4,s=t.thresholds),"colors"in t&&n(5,c=t.colors)},t.$$.update=()=>{if(49&t.$$.dirty){const t=String(s).split(","),e=t.indexOf(t.find((t=>i<parseInt(t,10)))),r=String(c).split(",");n(1,o=r[e]||r[r.length-1])}1&t.$$.dirty&&n(2,r=1.8*(100-i))},[i,o,r,l,s,c]}class Mt extends St{constructor(t){super(),kt(this,t,qt,Pt,s,{title:3,value:0,thresholds:4,colors:5})}}const It=t=>({}),Tt=t=>({});function Et(t){let e,n,o,r,i,s,a,p,h,m,g,v,$;const y=t[4].header,x=c(y,t,t[3],Tt),k=t[4].default,j=c(k,t,t[3],null);return{c(){e=S("div"),n=O(),o=S("div"),x&&x.c(),r=O(),i=S("hr"),s=O(),j&&j.c(),a=O(),p=S("hr"),h=O(),m=S("button"),m.textContent="Close",P(e,"class","modal-background svelte-5a6h72"),I(m,"float","right"),I(m,"margin-right","2%"),I(m,"border","1px solid lightblue"),I(m,"border-radius","8px"),m.autofocus=!0,P(m,"class","svelte-5a6h72"),P(o,"class","modal svelte-5a6h72"),P(o,"role","dialog"),P(o,"aria-modal","true")},m(l,c){_(l,e,c),_(l,n,c),_(l,o,c),x&&x.m(o,null),b(o,r),b(o,i),b(o,s),j&&j.m(o,null),b(o,a),b(o,p),b(o,h),b(o,m),t[5](o),g=!0,m.focus(),v||($=[N(window,"keydown",t[2]),N(e,"click",t[1]),N(m,"click",t[1])],v=!0)},p(t,[e]){x&&x.p&&(!g||8&e)&&f(x,y,t,t[3],g?u(y,t[3],e,It):d(t[3]),Tt),j&&j.p&&(!g||8&e)&&f(j,k,t,t[3],g?u(k,t[3],e,null):d(t[3]),null)},i(t){g||(dt(x,t),dt(j,t),g=!0)},o(t){pt(x,t),pt(j,t),g=!1},d(r){r&&w(e),r&&w(n),r&&w(o),x&&x.d(r),j&&j.d(r),t[5](null),v=!1,l($)}}}function Rt(t,e,n){let{$$slots:o={},$$scope:r}
|
||
|
|
//# sourceMappingURL=bundle.js.map
|