1!function(){"use strict";!function(){const t={NODE_ENV:"production",SOME_OBJECT:{one:1,two:[1,2],three:"3"},UNUSED:null};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,t)}catch(t){}globalThis.process={env:t}}();let t="complete"===document.readyState||"interactive"===document.readyState;const e=[],i=s=>{if("complete"===document.readyState||"interactive"===document.readyState){if(t=!0,document.removeEventListener("readystatechange",i),!document.body)return void console.warn("jsidea.ready() not triggered because the document.body is not available yet.");for(const t of e)t();e.slice(0)}};document.addEventListener("readystatechange",i);const s=i=>{t?i():e.push(i)};const n=new class{_loaded=!1;_hashCounter=0;_components=[];constructor(){s(()=>{this.updateAll(),this.handleDomChanges(),this._loaded=!0})}handleDomChanges(){if(!("MutationObserver"in window))return void setInterval(()=>{this.updateAll()},100);let t=!1;new MutationObserver(e=>{t||(t=!0,queueMicrotask(()=>{t=!1,this.updateAll()}))}).observe(document,{subtree:!0,childList:!0,attributes:!1,characterData:!1})}register(t){const e="hash"+this._hashCounter++,{selector:i,callback:s,once:n=!1}=t,a=i.split(",");for(let t=0;t<a.length;++t)a[t]+=`:not([data-inithash~="${e}"])`;const o={selector:a.join(","),callback:s,once:n,hash:e};return this._components.push(o),this._loaded&&this.update(o),{registration:o,dispose:()=>{const t=this._components.indexOf(o);t>=0&&this._components.splice(t,1)}}}update(t){let e=0;if(document.querySelectorAll(t.selector).forEach(i=>{if(i.hasAttribute("data-inithash")){let e=i.getAttribute("data-inithash");if(-1!==e.indexOf(t.hash))return;e+=" "+t.hash,i.setAttribute("data-inithash",e)}else i.setAttribute("data-inithash",t.hash);t.callback(i),e++}),e>0&&t.once){const e=this._components.indexOf(t);e>=0&&this._components.splice(e,1)}return e}updateAll(){let t=0;const e=this._components.slice();for(const i of e)t+=this.update(i);return t}};class a{static TO_DEG=180/Math.PI;static TO_RAD=Math.PI/180;static YEAR_MILLISECONDS=31536e6;static DAY_MILLISECONDS=864e5;static clamp(t,e,i){if(e>i){var s=i;i=e,e=s}return t<e?e:t>i?i:t}static ceilToPowerOfTwo(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}static randomBetweeen(t,e){return Math.floor(Math.random()*(e-t+1)+t)}static precision(t,e){return Math.round(t*e)/e}static rangeContainsRange(t,e,i,s){return t<=i&&e>=s||(t<=i&&e>=i||(t<=s&&e>=s||t>=i&&e<=s))}static ratio(t,e,i){return(t-e)/(i-e)}static interpolate(t,e,i){return e+(i-e)*t}static isBetween(t,e,i){return t>=e&&t<=i}static clampAvg(t,e,i,s=.5){return e>i?i+(e-i)*s:t<e?e:t>i?i:t}static clampFade(t,e,i,s=.5){return t<e?t+(e-t)*(1-s):t>i?i+(t-i)*s:t}static clampMin(t,e){return t<e?e:t}static clampMax(t,e){return t>e?e:t}static roundTo(t,e){return 0===e?t:Math.round(t/e)*e}static floorTo(t,e){return t-t%e}static ceilTo(t,e){return 0===e||t%e===0?t:t+(e-t%e)}static prec(t,e=4){var i=Math.pow(10,e-1);return Math.round(t*i)/i}static valueFromCss(t,e){return t.indexOf("%")>0?parseFloat(t.replace("%",""))/100*e:parseFloat(t.replace("px",""))}static averageAngle(t){var e=t.length;if(0==e)return 0;for(var i=t[0],s=1;s<e;++s)i+=.5*a.shortRotation(i,t[s]);return i}static shortRotation(t,e){var i=(e-t)%360;return i!=i%180&&(i=i<0?i+360:i-360),i}static clampAngle(t,e,i,s){return e=a.clampMin(t+a.shortRotation(t,e),i),(e=a.clampMax(t+a.shortRotation(t,e),s)%360)<0&&(e+=360),e}static parse(t,e){return t=parseFloat(t),isNaN(t)?e:t}static wrap(t,e){if(e<=1)return 0;var i=e-1;return t<0?i+(t+1)%e:t>i?t%e:t}static relation(t,e,i){return"number"==typeof t?t:"string"==typeof t?(t=t.trim().toLowerCase(),/^[+-]?[0-9]+([.][0-9]+)?([eE][+-]?[0-9]+)?$/.test(t)?parseFloat(t):t.indexOf("%")>0?a.parse(t.replace("%",""),i)/100*e:t.indexOf("px")>0?a.parse(t.replace("px",""),i):t.indexOf("pt")>0?a.parse(t.replace("pt",""),i):t.indexOf("vw")>0?a.parse(t.replace("vw",""),i)/100*window.innerWidth:t.indexOf("vh")>0?a.parse(t.replace("vh",""),i)/100*window.innerHeight:t.indexOf("vm")>0?a.parse(t.replace("vm",""),i)/100*Math.min(window.innerWidth,window.innerHeight):t.indexOf("em")>0?a.parse(t.replace("em",""),i):"top"===t||"left"===t||"start"===t?0:"center"===t||"middle"===t?.5*e:"bottom"===t||"right"===t||"end"===t?e:i):i}static relationCalced(t,e,i){if("number"==typeof t)return t;if("string"==typeof t){for(var s=(t=t.trim().toLowerCase()).split(" "),n=0,a="+",o=0;o<s.length;++o){var r=s[o].trim();if(o%2!=1){var l=this.relation(r,e,i);"+"==a?n+=l:"-"==a&&(n-=l)}else"+"==r?a="+":"-"==r&&(a="-")}return n}return i}}class o{static MONTH_EN=["January","February","March","April","May","June","July","August","September","October","November","December"];static MONTH_DE=["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];static DAY_EN=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"];static DAY_DE=["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"];static thousandSeparator(t){for(var e=(t=Math.round(t))<0,i=Math.abs(t).toString(),s="",n=0,a=i.length-1;a>=0;--a)s=i[a]+s,++n%3==0&&a>0&&(s="."+s);return e?"-"+s:s}static levenstein(t,e){if(!t||!e)return(e||t).length;var i,s,n=[];for(i=0;i<=e.length;n[i]=[i++]);for(s=0;s<=t.length;n[0][s]=s++);for(i=1;i<=e.length;i++)for(s=1;s<=t.length;s++)n[i][s]=e.charAt(i-1)==t.charAt(s-1)?n[i-1][s-1]:n[i][s]=Math.min(n[i-1][s-1]+1,Math.min(n[i][s-1]+1,n[i-1][s]+1));return n[e.length][t.length]}static trim(t,e="\\s"){return t.replace(new RegExp("^"+e+"+|"+e+"+$","g"),"")}static rtrim(t,e="\\s"){return t.replace(new RegExp(e+"+$"),"")}static ltrim(t,e="\\s"){return t.replace(new RegExp("^"+e+"+"),"")}static stripTags(t){return(t||"").replace(/(<([^>]+)>)/gi,"")}static fileSize(t,e=!1){return a.precision(9.53674e-7*t,100).toFixed(2)+" MB"}static ext(t){var e=t.lastIndexOf(".");return t.substr(e+1).toLowerCase()}static month(t,e="de"){return"de"==e?o.MONTH_DE[a.clamp(t,0,11)]:o.MONTH_EN[a.clamp(t,0,11)]}static day(t,e="de"){return"de"==e?o.DAY_DE[a.clamp(t,0,6)]:o.DAY_EN[a.clamp(t,0,6)]}static escapeHtml(t){return t?(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/"):""}static escapeAttr(t){return t?(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}static replaceNewline(t,e="<br>"){return t?t.replace(/(?:\r\n|\r|\n)/g,e):""}static replaceAll(t,e,i=""){return t.replace(new RegExp(this.escapeRegExp(e),"g"),i)}static escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static toDate(t){var e=parseInt(t.substr(0,4)),i=parseInt(t.substr(5,2))-1,s=parseInt(t.substr(8,2));if(t.length<=10)return new Date(e,i,s);var n=parseInt(t.substr(11,2)),a=parseInt(t.substr(14,2)),o=parseInt(t.substr(17,2));return new Date(e,i,s,n,a,o)}static loremIpsumWords="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue. Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat. Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique. Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis. Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi. Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin semper, ante vitae sollicitudin posuere, metus quam iaculis nibh, vitae scelerisque nunc massa eget pede. Sed velit urna, interdum vel, ultricies vel, faucibus at, quam. Donec elit est, consectetuer eget, consequat quis, tempus quis, wisi. In in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Donec ullamcorper fringilla eros. Fusce in sapien eu purus dapibus commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras faucibus condimentum odio. Sed ac ligula. Aliquam at eros. Etiam at ligula et tellus ullamcorper ultrices. In fermentum, lorem non cursus porttitor, diam urna accumsan lacus, sed interdum wisi nibh nec nisl. Ut tincidunt volutpat urna. Mauris eleifend nulla eget mauris. Sed cursus quam id felis. Curabitur posuere quam vel nibh. Cras dapibus dapibus nisl. Vestibulum quis dolor a felis congue vehicula. Maecenas pede purus, tristique ac, tempus eget, egestas quis, mauris. Curabitur non eros. Nullam hendrerit bibendum justo. Fusce iaculis, est quis lacinia pretium, pede metus molestie lacus, at gravida wisi ante at libero. Quisque ornare placerat risus. Ut molestie magna at mi. Integer aliquet mauris et nibh. Ut mattis ligula posuere velit. Nunc sagittis. Curabitur varius fringilla nisl. Duis pretium mi euismod erat. Maecenas id augue. Nam vulputate. Duis a quam non neque lobortis malesuada. Praesent euismod. Donec nulla augue, venenatis scelerisque, dapibus a, consequat at, leo. Pellentesque libero lectus, tristique ac, consectetuer sit amet, imperdiet ut, justo. Sed aliquam odio vitae tortor. Proin hendrerit tempus arcu. In hac habitasse platea dictumst. Suspendisse potenti. Vivamus vitae massa adipiscing est lacinia sodales. Donec metus massa, mollis vel, tempus placerat, vestibulum condimentum, ligula. Nunc lacus metus, posuere eget, lacinia eu, varius quis, libero. Aliquam nonummy adipiscing augue".split(" ");static loremIpsum(t,e=!1){var i="",s=0;e&&(s=Math.floor(100*Math.random()));for(var n=0;n<t;++n)i+=this.loremIpsumWords[(n+s)%(this.loremIpsumWords.length-1)]+" ";return i.trim()}static randomString(t){for(var e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ",s=0;s<t;++s)e+=i.charAt(Math.floor(63*Math.random()));return e}static fill(t,e,i){if(t.length>=e)return t;for(var s=t.length;s<e;++s)t+=i.charAt(0);return t}static fillHead(t,e,i){if(t.length>=e)return t;for(var s=t.length;s<e;++s)t=i.charAt(0)+t;return t}static lines(t,e=8,i=3,s="Â-\n "){t=(t=(t=t.trim()).replace(/­/gi,"Â")).replace(/\<br\s*\/?\>/gi,"\n"),i<=0&&(t=t.replace(/\u00AD/gi,""));for(var n=[],a=[],o="",r=0;r<t.length;++r){"Â"===(h=t.charAt(r))&&o.length<i||(-1!==s.indexOf(h)?o.length>0&&(n.push(o),a.push(h),o=""):o+=h)}o&&(n.push(o),a.push(""));var l=[],c="";for(r=0;r<n.length;++r){o=n[r];var h=a[r];c.length+o.length>e&&c.trim().length>0&&("Â"===a[r-1]&&(c+="-"),l.push(c.trim()),c=""),"Â"!=h&&(o+=h),c+=o}return c&&l.push(c.trim()),l}
1static clamp(t,e,i="...",s=3,n=" -+,._;/\\"){if(t.length<e)return t;for(var a=t.substr(0,e),o=a.length,r=n.length,l=!1,c=o-3;c>=0;c--){for(var h=a.charAt(c),d=0;d<r;++d)if(n.charAt(d)==h){l=!0;break}if(l)break}return l?t.substr(0,++c)+i:a.substr(0,e-3)+i}}class r{signal;listener;context;namespace;once=!1;enabled=!0;constructor(t,e,i,s){this.signal=t,this.listener=e,this.context=i,this.namespace=s}execute(t){this.listener&&this.listener.apply(this.context,t)}remove(){console.warn("Slot.remove() is deprecated. Use Slot.dispose() instead."),this.dispose()}dispose(){if(this.signal){var t=this.signal;this.signal=null,t.remove(this.listener,this.context)}this.context=null,this.namespace=null,this.listener=null}}class l extends r{wait=0;_timeout=null;_args=null;execute(t){this.wait<=0?this.listener.apply(this.context,t):(this.cancel(),this._args=t,this._timeout=setTimeout(()=>{this.enabled&&this.listener.apply(this.context,t),this._args=null},this.wait))}immediate(){this.cancel(),this._args&&(this.enabled&&this.listener.apply(this.context,this._args),this._args=null)}cancel(){this._timeout&&clearTimeout(this._timeout),this._timeout=null}dispose(){this.cancel(),this._timeout=null,super.dispose()}}class c extends r{_timeout=0;_isThrottling=!1;_args=null;execute(t){this._isThrottling?this._args=t:(this._args=t,this.immediate())}get isThrottling(){return this._isThrottling}immediate(){window.cancelAnimationFrame(this._timeout),this._timeout=null,this._args?(this.enabled&&this.listener.apply(this.context,this._args),this._args=null,this._isThrottling=!0,this._timeout=window.requestAnimationFrame(()=>{this._isThrottling=!1,this._args&&this.immediate()})):this._isThrottling=!1}cancel(){window.cancelAnimationFrame(this._timeout),this._timeout=null,this._args=null,this._isThrottling=!1}dispose(){this.cancel(),this._timeout=null,super.dispose()}}class h extends r{wait=0;_timeout=null;_isThrottling=!1;_args=null;execute(t){this.wait<=0?this.enabled&&this.listener.apply(this.context,t):this._isThrottling?this._args=t:(this._args=t,this.immediate())}get isThrottling(){return this._isThrottling}immediate(){clearTimeout(this._timeout),this._timeout=null,this._args?(this.enabled&&this.listener.apply(this.context,this._args),this._args=null,this._isThrottling=!0,this._timeout=setTimeout(()=>{this._isThrottling=!1,this._args&&this.immediate()},this.wait)):this._isThrottling=!1}cancel(){clearTimeout(this._timeout),this._timeout=null,this._args=null,this._isThrottling=!1}dispose(){this.cancel(),this._timeout=null,super.dispose()}}class d{_enabled=!0;_slots=[];_dispatched=null;constructor(){}get dispatched(){return Boolean(this._dispatched)}get enabled(){return this._enabled}set enabled(t){this._enabled=t}get length(){return this._slots.length}dispatch(...t){if(!this.enabled)return;this._dispatched=t;const e=this._slots.slice();for(var i,s=e.length,n=0;n<s;++n)if((i=e[n]).enabled){if(i.once){const t=this._slots.indexOf(i);-1!==t&&this._slots.splice(t,1)}i.execute(t)}}once(t,e=null,i=null){var s=this.add(t,e,i);return s.once=!0,s}add(t,e=null,i=null){var s=new r(this,t,e,i);return this._slots.push(s),s}debounce(t,e=100,i=null,s=null){var n=new l(this,t,i,s);return n.wait=e,this._slots.push(n),n}throttle(t,e=100,i=null,s=null){var n=new h(this,t,i,s);return n.wait=e,this._slots.push(n),n}nextFrame(t,e=null,i=null){var s=new c(this,t,e,i);return this._slots.push(s),s}on(t,e=null,i=null){var s=this.add(t,e,i);return this._dispatched&&queueMicrotask(()=>{s.execute(this._dispatched)}),s}async promise(t=!0,e=0){return new Promise((i,s)=>{if(t&&this._dispatched)i(this._dispatched);else{var n=null,a=this.once((...t)=>{n&&clearTimeout(n),i(t)});e>0&&(n=setTimeout(()=>{a.dispose(),s()},e))}})}remove(t,e=null){var i=this.getSlots(t,e);if(0===i.length)return null;for(var s of i)this._slots.splice(this._slots.indexOf(s),1),s.signal&&s.dispose();return i}clear(){if(0===this._slots.length)return;const t=this._slots.slice();for(var e of t)e.dispose();this._slots.splice(0,this._slots.length)}getSlots(t,e){var i=[];if("string"==typeof t)for(var s of this._slots)s.namespace===t&&i.push(s);else for(var s of this._slots)s.listener===t&&s.context===e&&i.push(s);return i}dispose(){this._dispatched=null,this.clear(),this._slots=null}cancel(){for(var t of this._slots)(t instanceof l||t instanceof h)&&t.cancel()}static create(){return new d}static _namespace=0;static getUniqueNamespace(){return"signal-ns-"+this._namespace++}}
1const u=new class{specials={mouseenter:!0,mouseleave:!0,pointerenter:!0,pointerleave:!0};on(t){var e=t.selector,i=t.thisArg,s=void 0!==t.once&&t.once,n=!1,a={capture:void 0===t.capture||t.capture,types:Array.isArray(t.type)?t.type.slice():[t.type],scope:t.scope||document,passive:void 0!==t.passive&&t.passive,listener:o=>{if(!n){var r=o.target,l=this.specials[o.type];if(!e)return t.listener.call(void 0===i?r:i,{event:o,target:o.target}),void(s&&a.dispose());for(;r;){if("function"==typeof r.matches&&r.matches(e))return t.listener.call(void 0===i?r:i,{event:o,target:r}),void(s&&a.dispose());if(l)return;r=r.parentElement}}},dispose:()=>{if(!n){for(var e of a.types)if(Array.isArray(a.scope))for(const t of a.scope)t.removeEventListener(e,a.listener,a.capture);else a.scope.removeEventListener(e,a.listener,a.capture);t=null,i=null,a=null,n=!0}}};for(var o of a.types)if(Array.isArray(a.scope))for(const t of a.scope)t.addEventListener(o,a.listener,{passive:a.passive,capture:a.capture});else a.scope.addEventListener(o,a.listener,{passive:a.passive,capture:a.capture});return t.disposables&&t.disposables.push(a),a}},p=u.on.bind(u);function m(...t){return _(new Set,...t)}function _(t,...e){const i={};for(let s=0;s<e.length;s++)if(e[s]&&!t.has(e[s])){t.add(e[s]);for(let n in e[s])if(void 0===e[s][n]);else if(e[s][n]===i[n]);else if(g(e[s][n])&&g(i[n]))i[n]=_(t,i[n],e[s][n]);else{const t=e[s][n];i[n]=Array.isArray(t)?t.slice():t}}return i}function g(t){return!!t&&("object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype)}const v=window.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent);const f=new class{mimeTypes={"text/plain":["txt"],"text/html":["html","htm"],"text/css":["css"],"text/javascript":["js"],"application/javascript":["js"],"application/json":["json"],"application/ld+json":["jsonld"],"application/xml":["xml"],"application/pdf":["pdf"],"application/zip":["zip"],"application/x-rar-compressed":["rar"],"image/jpeg":["jpg","jpeg","jfif","pjpeg","pjp"],"image/png":["png"],"image/gif":["gif"],"image/bmp":["bmp"],"image/webp":["webp"],"image/svg+xml":["svg","svgz"],"video/mp4":["mp4","m4v"],"video/x-matroska":["mkv"],"video/quicktime":["mov"],"video/x-msvideo":["avi"],"video/webm":["webm"],"audio/mpeg":["mp3","mpeg","mpga"],"audio/ogg":["ogg","opus"],"audio/wav":["wav"],"audio/webm":["weba"],"application/msword":["doc","docx"],"application/vnd.ms-excel":["xls","xlsx"],"application/vnd.ms-powerpoint":["ppt","pptx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.apple.installer+xml":["mpkg"],"application/x-shockwave-flash":["swf"]};get method(){return"download"in HTMLAnchorElement.prototype&&!v?"anchor":"msSaveOrOpenBlob"in navigator?"ms":"popup"}saveUrl(t,e={}){const i=this.method;if("anchor"===i){const i=document.createElementNS("http://www.w3.org/1999/xhtml","a");i.download=e.name,i.rel="noopener",i.href=t,i.origin!==location.origin?this.corsEnabled(i.href)?this.download(t,e):(i.target="_blank",this.click(i)):this.click(i)}else if("ms"===i)if(this.corsEnabled(t))this.download(t,e);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout(()=>{this.click(s)})}else if("popup"===i)return this.download(t,e)}saveString(t,e={}){return this.saveBlob(new Blob([t],{type:"text/plain"}),e)}saveFile(t,e={}){return this.saveBlob(t,e)}saveBlob(t,e={}){e=m({autoBom:!1,name:"download"},e);const i=this.method,s=e.name;if("anchor"===i){const e=window.URL||window.webkitURL,i=document.createElementNS("http://www.w3.org/1999/xhtml","a");i.download=s,i.rel="noopener",i.href=e.createObjectURL(t),setTimeout(()=>{e.revokeObjectURL(i.href)},3e4),setTimeout(()=>{this.click(i)},0)}else if("ms"===i)navigator.msSaveOrOpenBlob(this.bom(t,e),s);else if("popup"===i){let e=open("","_blank");e&&(e.document.title=e.document.body.innerText="downloading...");
1const i="application/octet-stream"===t.type,s=/constructor/i.test(window.HTMLElement+"")||window.safari,n=/CriOS\/[\d]+/.test(navigator.userAgent);if((n||i&&s||v)&&"undefined"!=typeof FileReader){const i=new FileReader;i.onloadend=function(){var t=i.result;t=n?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),e?e.location.href=t:window.location.href=t,e=null},i.readAsDataURL(t)}else{const i=window.URL||window.webkitURL,s=i.createObjectURL(t);e?e.location=s:location.href=s,e=null,setTimeout(()=>{i.revokeObjectURL(s)},3e4)}}}bom(t,e){return e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}download(t,e){const i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=()=>{this.saveBlob(i.response,e)},i.onerror=()=>{console.error("could not download file")},i.send()}corsEnabled(t){const e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}click(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(i){var e=document.createEvent("MouseEvents");
1e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}};class b{onChange=d.create();_activeLanguages=null;_current;_fallbacks={de:["en"],en:["de"],fr:["en"],uk:["en"]};constructor(t={}){(t=m({current:"html",fallbackLanguage:"de"},t)).activeLanguages&&t.activeLanguages.length>0&&(this._activeLanguages=t.activeLanguages.slice());let e=null;if("html"===t.current){const t=document.documentElement.getAttribute("lang");if(t)e=t.toLowerCase().substring(0,2);else if(window.top!==window.self)try{const t=window.top.document.documentElement.getAttribute("lang");t&&(e=t.toLowerCase().substring(0,2))}catch(t){}}else e="user"===t.current?navigator.language.toLowerCase().substring(0,2):t.current;if(e||(this._activeLanguages?(e=this._activeLanguages[0],console.warn(`Language not resolved. Fallback to first supported language code "${e}".`)):(e=t.fallbackLanguage,console.warn(`Language not resolved. Fallback to "${e}".`))),this._activeLanguages&&-1===this._activeLanguages.indexOf(e)&&(console.warn(`Cannot set language code "${e}" because it is not included in the active languages. Fallback to first supported language code "${this._activeLanguages[0]}".`),e=this._activeLanguages[0]),t.fallbacks)for(let e in t.fallbacks)this.setFallbacks(e,t.fallbacks[e]);this._current=e}get current(){return this._current}set current(t){this._activeLanguages&&-1===this._activeLanguages.indexOf(t)?console.warn(`Cannot set language code "${t}" because it is not included in the active languages.`):this._current!==t&&(this._current=t,this.onChange.dispatch(this))}setFallbacks(t,e){this._fallbacks[t]=e.slice()}getFallbacks(t){return this._fallbacks[t]?this._fallbacks[t].slice():[]}}const y=new b;const w=["idle","progress","success","warning","errored"];class x{element;onClick=d.create();onToggle=d.create();onStateChange=d.create();_key;_disposables=[];_isDirty=!1;_icon;_label;_tooltip;_active=!1;_disabled=!1;_state="idle";_stateResetTimeout=null;_html;_htmlElement;constructor(t){this._key=t.key,this._icon=t.icon,this._label=t.label,this._tooltip=t.tooltip,this._html=t.html,this._htmlElement=t.htmlElement,this._state=t.state??"idle",this.element=document.createElement("button"),this.element.type="button",this.element.classList.add("jsidea-admin-bar__item"),this.element.dataset.key=this._key,t.onClick&&this.onClick.add(t.onClick),t.onToggle&&this.onToggle.add(t.onToggle),t.onStateChange&&this.onStateChange.add(t.onStateChange),this.element.addEventListener("click",()=>{this.onClick.dispatch(this)}),t.onInit?.(this),this.render()}setDirty(){this._isDirty||(this._isDirty=!0,requestAnimationFrame(()=>{this._isDirty=!1,this.render()}))}render(){for(const t of this._disposables)t.dispose();for(this._disposables=[];this.element.firstChild;)this.element.removeChild(this.element.firstChild);const t=this.getValue(this._tooltip);t?this.element.setAttribute("title",t):this.element.removeAttribute("title"),this.element.classList.toggle("jsidea-admin-bar__item--active",this._active),this.element.classList.toggle("jsidea-admin-bar__item--disabled",this._disabled);for(const t of w)this.element.classList.toggle(`jsidea-admin-bar__item--${t}`,this._state===t);this.element.dataset.state=this._state,this.element.setAttribute("aria-busy","progress"===this._state?"true":"false");const e=this.getValue(this._icon);if(e){const t=document.createElement("div");t.className="jsidea-admin-bar__item-icon "+e,this.element.appendChild(t)}const i=this.getValue(this._label);if(i){const t=document.createElement("div");t.classList.add("jsidea-admin-bar__item-label"),t.textContent=i,this.element.appendChild(t)}const s=this.getValue(this._html);s&&this.element.insertAdjacentHTML("beforeend",s);const n=this.getValue(this._htmlElement);n&&this.element.appendChild(n)}getValue(t){return jsidea.isLiteral(t)&&null!==t?this._disabled&&void 0!==t.disabled?t.disabled:"idle"!==this._state&&void 0!==t[this._state]?t[this._state]:this._active&&void 0!==t.active?t.active:t.default:t}get icon(){return this._icon}set icon(t){this._icon!==t&&(this._icon=t,this.setDirty())}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this.setDirty())}get tooltip(){return this._tooltip}set tooltip(t){this._tooltip!==t&&(this._tooltip=t,this.setDirty())}get html(){return this._html}set html(t){this._html!==t&&(this._html=t,this.setDirty())}get htmlElement(){return this._htmlElement}set htmlElement(t){this._htmlElement!==t&&(this._htmlElement=t,this.setDirty())}get active(){return this._active}set active(t){this._active!==t&&(this._active=t,this.setDirty(),this.onToggle.dispatch(this))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this.setDirty())}get state(){return this._state}set state(t){this.setState(t)}setState(t,e){null!==this._stateResetTimeout&&(clearTimeout(this._stateResetTimeout),this._stateResetTimeout=null),void 0!==e&&e>=0&&"idle"!==t&&(this._stateResetTimeout=setTimeout(()=>{this._stateResetTimeout=null,this.setState("idle")},e)),this._state!==t&&(this._state=t,this.setDirty(),this.onStateChange.dispatch(this))}get isBusy(){return"progress"===this._state}store(t,e){try{localStorage.setItem(`jsidea-admin-bar-item-${this._key}-${t}`,JSON.stringify(e))}catch(t){console.warn("Unable to store item in localStorage",t)}}retrieve(t){try{const e=localStorage.getItem(`jsidea-admin-bar-item-${this._key}-${t}`);return null===e?null:JSON.parse(e)}catch(t){return console.warn("Unable to retrieve item from localStorage",t),null}}}class T{_bar;constructor(t){this._bar=t,this.addOutlineDebug(),this.addSiteLoadDebug(),this.addFpsDebug()}addFpsDebug(){this._bar.add({key:"fps",label:"--",tooltip:"Frames Per Second",icon:"fal fa-tachometer-alt-fast",onInit:t=>{let e=t.retrieve("show-canvas")||!1;const i=document.createElement("canvas");i.classList.add("debug-view-window__fps-canvas"),i.width=50,i.height=22,e&&(t.htmlElement=i),t.onClick.add(()=>{e=!e,t.store("show-canvas",e),t.htmlElement=e?i:null});const s=i.getContext("2d",{willReadFrequently:!0});s.imageSmoothingEnabled=!1,s.lineWidth=1;let n="";let a=jsidea.Signal.create();a.throttle(()=>{const a=Math.round(o).toString();if(n!==a&&(n=a,t.label=n),!e)return;s.globalCompositeOperation="copy",s.drawImage(s.canvas,-2,0),s.globalCompositeOperation="source-over",s.beginPath(),s.strokeStyle="#0F0",s.lineWidth=2;const r=i.width-1,l=i.height-i.height*jsidea.Calc.clamp(o/60,0,1);s.moveTo(r,l),s.lineTo(r,i.height),s.stroke()},100);let o=0,r=0;const l=[];jsidea.Tick.add(()=>{const t=performance.now();for(;l.length>0&&l[0]<=t-1e3;)l.shift();l.push(t),o=l.length,r>80?a.dispatch():r++})}})}addSiteLoadDebug(){this._bar.add({key:"site-load",icon:"fal fa-stopwatch",onInit:t=>{const e=window.performance.getEntriesByType("navigation");if(e&&e.length>0){const i=e[0],s=(i.responseStart-i.requestStart)/1e3;t.label=isNaN(s)?"?":s.toFixed(2),t.tooltip="Time to First Byte in seconds"}}})}addOutlineDebug(){this._bar.add({key:"outline",icon:"fal fa-border-all",tooltip:"Show outline",onClick:t=>{t.active=!t.active},onInit:t=>{t.active=t.retrieve("active")||!1;let e=!1;const i=[];let s=null;const n=document.createElement("div");n.classList.add("jsidea-g-debug-outline-info-box");const a=document.createElement("div");a.setAttribute("inert","true"),a.classList.add("jsidea-g-debug-outline-bounds");const o=t=>{s!==t&&(s&&s.classList.remove("jsidea-g-debug-outline-target"),s=t,s&&s.classList.add("jsidea-g-debug-outline-target"))},r=()=>{if(!s)return void(a.parentElement&&a.parentElement.removeChild(a));const t=s.getBoundingClientRect();a.style.width=t.width+"px",a.style.height=t.height+"px",a.style.transform=`translate(${t.left}px, ${t.top}px)`,a.parentElement||document.body.appendChild(a)},l=()=>{if(!s)return void(n.parentElement&&n.parentElement.removeChild(n));let t="";1!==window.devicePixelRatio?(t+=`<div>Width: ${s.offsetWidth} | DPX ${Math.round(s.offsetWidth*window.devicePixelRatio)}</div>`,t+=`<div>Height: ${s.offsetHeight} | DPX ${Math.round(s.offsetHeight*window.devicePixelRatio)}</div>`,t+=`<div>Device Pixel Ratio: ${window.devicePixelRatio.toFixed(2)}</div>`):(t+=`<div>Width: ${s.offsetWidth}</div>`,t+=`<div>Height: ${s.offsetHeight}</div>`);let e=window.getComputedStyle(s);t+=`<div>Font Size: ${e.fontSize}</div>`,t+=`<div>Margin: ${e.marginTop} ${e.marginRight} ${e.marginBottom} ${e.marginLeft}</div>`,t+=`<div>Padding: ${e.paddingTop} ${e.paddingRight} ${e.paddingBottom} ${e.paddingLeft}</div>`,t+=`<div>Tag: <${s.tagName.toLowerCase()}></div>`,n.innerHTML=t;const i=s.getBoundingClientRect();n.style.transform=`translate(${Math.max(i.left,0)}px, ${Math.max(i.top-n.offsetHeight,0)}px)`,n.parentElement||document.body.appendChild(n)},c=()=>
1{if(t.active!==e)if(e=t.active,e)i.push(jsidea.event.on({type:"mousemove",capture:!0,listener:t=>{t.event.clientX,t.event.clientY}}),jsidea.Tick.add(()=>{o(document.querySelector(":where(\n *:not(\n .jsidea-admin-bar,\n .jsidea-admin-bar *,\n #wpadminbar,\n #wpadminbar *,\n .jsidea-g-debug-outline-info-box,\n .jsidea-g-debug-outline-info-box *\n )\n ):hover:not(:has(:hover))")),r(),l()}));else{o(null),r(),l();for(const t of i)t.dispose();i.length=0}};c(),t.onToggle.add(c);const h=()=>{document.body.classList.toggle("jsidea-g-debug-outline",t.active)};t.onToggle.add(()=>{t.store("active",t.active),h()}),h()}})}}const E=new class{_elements=[];_quad={points:[new DOMPoint,new DOMPoint,new DOMPoint,new DOMPoint]};constructor(){for(var t=0;t<4;++t){var e=document.createElement("div");e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.transformOrigin="0 0",this._elements.push(e)}}parse(t,e){return t=parseFloat(t),isNaN(t)?e:t}extract(t){const e=window.getComputedStyle(t),i=1e3,s=1e3,n=-this.parse(e.borderLeftWidth,0),a=-this.parse(e.borderTopWidth,0),o=n+i,r=a+s;this._elements[0].style.transform="translate("+n+"px, "+a+"px)",this._elements[1].style.transform="translate("+o+"px, "+a+"px)",this._elements[2].style.transform="translate("+o+"px, "+r+"px)",this._elements[3].style.transform="translate("+n+"px, "+r+"px)",t.shadowRoot?this.inject(t.shadowRoot):this.inject(t);for(var l=0;l<4;++l){const t=this._elements[l].getBoundingClientRect(),e=this._quad.points[l];e.x=t.left,e.y=t.top}this.reject();const c=[new DOMPoint(0,0),new DOMPoint(i,0),new DOMPoint(i,s),new DOMPoint(0,s)],h=[this._quad.points[0],this._quad.points[1],this._quad.points[2],this._quad.points[3]];return this.getDOMMatrixFromPoints(c,h)}inject(t){for(var e of this._elements)t.appendChild(e)}reject(){for(var t of this._elements)t.parentElement&&t.parentElement.removeChild(t)}getDOMMatrixFromPoints(t,e){const i=[],s=[];for(let n=0;n<4;n++){const{x:a,y:o}=t[n],{x:r,y:l}=e[n];i.push([a,o,1,0,0,0,-r*a,-r*o]),s.push(r),i.push([0,0,0,a,o,1,-l*a,-l*o]),s.push(l)}const n=this.solveLinearSystem(i,s);return n[8]=1,new DOMMatrix([n[0],n[3],0,n[6],n[1],n[4],0,n[7],0,0,1,0,n[2],n[5],0,n[8]])}solveLinearSystem(t,e){const i=t.length,s=t.map((t,i)=>[...t,e[i]]);for(let t=0;t<i;t++){let e=t;for(let n=t+1;n<i;n++)Math.abs(s[n][t])>Math.abs(s[e][t])&&(e=n);[s[t],s[e]]=[s[e],s[t]];for(let e=t+1;e<i;e++){const n=s[e][t]/s[t][t];for(let a=t;a<=i;a++)s[e][a]-=n*s[t][a]}}const n=new Array(i).fill(0);for(let t=i-1;t>=0;t--){n[t]=s[t][i]/s[t][t];for(let e=t-1;e>=0;e--)s[e][i]-=s[e][t]*n[t]}return n}};class S{element=null;sceneTransform=null;inverseSceneTransform=null;mode=null;constructor(t,e){this.update(t,e)}static create(t,e){return new S(t,e)}update(t,e){return this.element=t,this.mode=e||E,this.element?(this.sceneTransform=this.mode.extract(this.element),this.inverseSceneTransform=this.sceneTransform.inverse()):(this.sceneTransform=null,this.inverseSceneTransform=null),this}toLocal(t){return this.unproject(t,this.inverseSceneTransform)}static toLocal(t,e,i){return S.create(t,i).toLocal(e)}toLocalDelta(t){return this.deltaTransform(t,this.inverseSceneTransform)}static toLocalDelta(t,e,i){return S.create(t,i).toLocalDelta(e)}toGlobalDelta(t){return this.deltaTransform(t,this.sceneTransform)}static toGlobalDelta(t,e,i){return S.create(t,i).toGlobalDelta(e)}deltaTransform(t,e){var i=t.x*e.m11+t.y*e.m21+t.z*e.m31,s=t.x*e.m12+t.y*e.m22+t.z*e.m32,n=t.x*e.m13+t.y*e.m23+t.z*e.m33,a=t.x*e.m14+t.y*e.m24+t.z*e.m34;return new DOMPoint(i,s,n,a)}toGlobal(t){return this.project(t,this.sceneTransform)}static toGlobal(t,e,i){return S.create(t,i).toGlobal(e)}localToLocal(t,e){const i=this.toGlobal(e);return t.toLocal(i)}project(t,e){var i=t.z,s=t.x*e.m14+t.y*e.m24+i*e.m34+e.m44,n=t.x*e.m11+t.y*e.m21+i*e.m31+e.m41,a=t.x*e.m12+t.y*e.m22+i*e.m32+e.m42;return 0==s&&(s=1e-4),n/=s,a/=s,s<0&&(n-=e.m41,a-=e.m42,n*=1/s,a*=1/s,n+=e.m41,a+=e.m42),new DOMPoint(n,a,i,s)}unproject(t,e){var i=t.x*e.m11+t.y*e.m21+e.m41,s=t.x*e.m12+t.y*e.m22+e.m42,n=t.x*e.m13+t.y*e.m23+e.m43,a=t.x*e.m14+t.y*e.m24+e.m44,o=i+e.m31,r=s+e.m32,l=n+e.m33,c=a+e.m34;0==a&&(a=1e-4),i/=a,s/=a,0==c&&(c=1e-4),o/=c,r/=c;var h=(l/=c)-(n/=a);if(0==h)return new DOMPoint(i,s,n,a);var d=-n/h;return i+=d*(o-i),s+=d*(r-s),new DOMPoint(i,s,n,a)}}const C=new class{extract(t){const e=t.getBoundingClientRect(),i=new DOMMatrix;let s=e.x,n=e.y;i.translateSelf(s,n,0);const a=window.getComputedStyle(t);let o=parseFloat(a.width),r=parseFloat(a.height);var l=NaN;e.width!==o&&0!==o&&(l=e.width/o);var c=NaN;return e.height!==r&&0!==r&&(c=e.height/r),isNaN(l)&&isNaN(c)?(l=1,c=1):isNaN(l)?l=c:isNaN(c)&&(c=l),1===l&&1===c||i.scaleSelf(l,c,1),i}};
1class j{static keyCode(t){return t.keyCode}static is(t,...e){var i=this.keyCode(t);for(var s of e)if(s===i)return!0;return!1}static BACKSPACE=8;static TAB=9;static ENTER=13;static SHIFT=16;static CTRL=17;static ALT=18;static PAUSE=19;static CAPS_LOCK=20;static ESCAPE=27;static SPACE=32;static PAGE_UP=33;static PAGE_DOWN=34;static END=35;static HOME=36;static LEFT_ARROW=37;static UP_ARROW=38;static RIGHT_ARROW=39;static DOWN_ARROW=40;static INSERT=45;static DELETE=46;static KEY_0=48;static KEY_1=49;static KEY_2=50;static KEY_3=51;static KEY_4=52;static KEY_5=53;static KEY_6=54;static KEY_7=55;static KEY_8=56;static KEY_9=57;static KEY_A=65;static KEY_B=66;static KEY_C=67;static KEY_D=68;static KEY_E=69;static KEY_F=70;static KEY_G=71;static KEY_H=72;static KEY_I=73;static KEY_J=74;static KEY_K=75;static KEY_L=76;static KEY_M=77;static KEY_N=78;static KEY_O=79;static KEY_P=80;static KEY_Q=81;static KEY_R=82;static KEY_S=83;static KEY_T=84;static KEY_U=85;static KEY_V=86;static KEY_W=87;static KEY_X=88;static KEY_Y=89;static KEY_Z=90;static LEFT_META=91;static RIGHT_META=92;static SELECT=93;static NUMPAD_0=96;static NUMPAD_1=97;static NUMPAD_2=98;static NUMPAD_3=99;static NUMPAD_4=100;static NUMPAD_5=101;static NUMPAD_6=102;static NUMPAD_7=103;static NUMPAD_8=104;static NUMPAD_9=105;static MULTIPLY=106;static ADD=107;static SUBTRACT=109;static DECIMAL=110;static DIVIDE=111;static F1=112;static F2=113;static F3=114;static F4=115;static F5=116;static F6=117;static F7=118;static F8=119;static F9=120;static F10=121;static F11=122;static F12=123;static NUM_LOCK=144;static SCROLL_LOCK=145;static SEMICOLON=186;static EQUALS=187;static COMMA=188;static DASH=189;static PERIOD=190;static FORWARD_SLASH=191;static GRAVE_ACCENT=192;static OPEN_BRACKET=219;static BACK_SLASH=220;static CLOSE_BRACKET=221;static SINGLE_QUOTE=222}
1class M{static functions=[{slug:"cubicInOut"},{slug:"cubicIn"},{slug:"cubicOut"},{slug:"linear"},{slug:"quadIn"},{slug:"quadOut"},{slug:"quadInOut"},{slug:"quartIn"},{slug:"quartOut"},{slug:"quartInOut"},{slug:"quintIn"},{slug:"quintOut"},{slug:"quintInOut"},{slug:"sineIn"},{slug:"sineOut"},{slug:"sineInOut"},{slug:"expoIn"},{slug:"expoOut"},{slug:"expoInOut"},{slug:"circIn"},{slug:"circOut"},{slug:"circInOut"},{slug:"backIn"},{slug:"backOut"},{slug:"backInOut"},{slug:"elasticIn"},{slug:"elasticOut"},{slug:"elasticInOut"},{slug:"bounceIn"},{slug:"bounceOut"},{slug:"bounceInOut"}];static cubicInOut(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}static cubicIn(t){return t*t*t}static cubicOut(t){return--t*t*t+1}static linear(t){return t}static quadIn(t){return t*t}static quadOut(t){return t*(2-t)}static quadInOut(t){return t<.5?2*t*t:(4-2*t)*t-1}static quartIn(t){return t*t*t*t}static quartOut(t){return 1- --t*t*t*t}static quartInOut(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t}static quintIn(t){return t*t*t*t*t}static quintOut(t){return 1+--t*t*t*t*t}static quintInOut(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}static sineIn(t){return 1-Math.cos(t*Math.PI/2)}static sineOut(t){return Math.sin(t*Math.PI/2)}static sineInOut(t){return.5*(1-Math.cos(Math.PI*t))}static expoIn(t){return 0===t?0:Math.pow(2,10*(t-1))}static expoOut(t){return 1===t?1:1-Math.pow(2,-10*t)}static expoInOut(t){return 0===t||1===t?t:(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))}static circIn(t){return 1-Math.sqrt(1-t*t)}static circOut(t){return Math.sqrt(1- --t*t)}static circInOut(t){return t<.5?.5*(1-Math.sqrt(1-4*t*t)):.5*(Math.sqrt(1- -4*--t*t)+1)}static backIn(t){return t*t*(2.70158*t-1.70158)}static backOut(t){return--t*t*(2.70158*t+1.70158)+1}static backInOut(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}static elasticIn(t){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)}static elasticOut(t){return 0===t||1===t?t:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1}static elasticInOut(t){return 0===t||1===t?t:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}static bounceIn(t){return 1-M.bounceOut(1-t)}static bounceOut(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}static bounceInOut(t){return t<.5?.5*M.bounceIn(2*t):.5*M.bounceOut(2*t-1)+.5}}let L=!1;class O{_element=null;_active=!1;_onKeyDown;_listening=!1;_options=[];_useInert=!1;_resetInertRestore=null;constructor(t=null,e=!1){this._onKeyDown=t=>this.onKeyDown(t),this._active=e,this.setElement(t);"inert"in HTMLElement.prototype?this._useInert=!0:(this._useInert=!1,console.warn("The browser does not support the inert attribute. jsidea.TabTrap may not function as expected. Consider including a polyfill such as https://github.com/WICG/inert")),L||console.warn("Do not instantiate jsidea.TabTrap use a constant jsidea.tabTrap instance instead.")}push(t){if(t=m({focusBefore:document.activeElement},t),this._options.push(t),this.setElement(t.element),t.focus)this.focus(t.focus);else if(document.activeElement&&!1===t.element.contains(document.activeElement))try{document.activeElement.blur()}catch(t){}}pop(){const t=this._options.pop(),e=this._options[this._options.length-1];this.setElement(e?.element||null),setTimeout(()=>{if("function"==typeof t?.focusBefore){const e=t.focusBefore();e&&e.focus()}else if(t?.focusBefore)t.focusBefore.focus();else if(e?.focus)this.focus(e.focus);else if(e&&document.activeElement)try{document.activeElement.blur()}catch(t){}})}getElement(){return this._element}
1setElement(t){if(this._element!==t&&(this._element=t,this.listening=this._active&&null!==this._element,this._useInert&&(this._resetInertRestore&&(this._resetInertRestore(),this._resetInertRestore=null),this._element))){const t=Array.from(document.querySelectorAll("[data-prevent-inert], [data-prevent-inert='true']"));t.push(this._element||document.body),this._resetInertRestore=this.inertAllExcept(document.body,t)}}inertAllExcept(t,e){const i=[];return function t(s){if(!e.includes(s)&&!s.hasAttribute("inert")){if(!e.some(t=>s.contains(t)))return s.setAttribute("inert",""),void i.push(s);for(const e of Array.from(s.children))t(e)}}(t),function(){for(const t of i)t.removeAttribute("inert")}}get element(){return this._element}set element(t){console.warn("TabTrap.element is deprecated. Use TabTrap.push() and TabTrap.pop()."),this.setElement(t)}focus(t="first"){if(this._element){var e=this.getTabbableNodes(),i=NaN;if("first"===t?i=0:"last"===t?i=e.length-1:"number"==typeof t?i=t:"object"==typeof t&&(i=e.indexOf(t)),!isNaN(i)&&e[i])e[i].focus();else if(document.activeElement)try{document.activeElement.blur()}catch(t){}}}onKeyDown(t){if(j.is(t,j.TAB)){t.preventDefault();var e=this.getTabbableNodes();if(0===e.length)return void this._element?.focus();if(!document.activeElement)return void e[0].focus();var i=e.indexOf(document.activeElement);if(-1===i)return void e[0].focus();t.shiftKey?-1===i||0===i?e[e.length-1].focus():i>0&&e[i-1].focus():-1===i||i===e.length-1?e[0].focus():i<e.length-1&&e[i+1].focus()}}getTabbableNodes(){if(!this._element)return[];var t=Array.prototype.slice.apply(this._element.querySelectorAll(["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"].join(","))),e=[];for(var i of t)this.isNodeMatchingSelectorFocusable(i)&&e.push(i);return e}isNodeMatchingSelectorFocusable(t){return!(!t||t.hasAttribute("disabled")||this.isHiddenInput(t)||this.isHidden(t)||this.isTabDisabled(t)||this.isInert(t))}isInert(t){if(t.hasAttribute("inert"))return!0;for(var e=t;e;){if(e.hasAttribute("inert"))return!0;e=e.parentElement}return!1}isHidden(t){if("hidden"===getComputedStyle(t).visibility)return!0;for(var e=t;e;){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}isTabDisabled(t){return void 0!==t.tabIndex&&t.tabIndex<0}isInput(t){return"INPUT"===t.tagName}isHiddenInput(t){return this.isInput(t)&&"hidden"===t.type}get active(){return this._active}_triggeredActive=!1;set active(t){this._triggeredActive||(this._triggeredActive=!0,console.warn("Do not use jsidea.TabTrap.active use jsidea.TabTrap.element instead.")),this._active!=t&&(this._active=t,this.listening=this._active&&null!==this._element)}get listening(){return this._listening}set listening(t){this._listening!=t&&(this._listening=t,this._useInert||(t?document.addEventListener("keydown",this._onKeyDown,!0):document.removeEventListener("keydown",this._onKeyDown,!0)))}}L=!0;const k=new O(null,!0);L=!1;class A{constructor(){}static create(...t){return new D(...t)}}class D extends d{_elements=[];static _observer=null;static _instances=[];constructor(...t){super(),D.createObserver(),D._instances.push(this),this.addElements(...t)}get element(){return this._elements[0]}set element(t){if(this._elements[0]!=t)if(this._elements.length>0){if(this.removeElements(this._elements[0]),t&&(this.addElements(t),this._elements.length>1)){const e=this._elements.indexOf(t);this._elements.splice(e,1),this._elements.unshift(t)}}else t&&this.addElements(t)}addElements(...t){for(const e of t)e&&-1===this._elements.indexOf(e)&&(this.isObserved(e)||D._observer.observe(e),this._elements.push(e));return this}removeElements(...t){for(const e of t){if(!e)continue;const t=this._elements.indexOf(e);-1!==t&&(this._elements.splice(t,1),this.isObserved(e)||D._observer.unobserve(e))}return this}isObserved(t){for(const e of D._instances)if(-1!==e._elements.indexOf(t))return!0;return!1}dispose(){this.removeElements(...this._elements),this._elements=null,D._instances.splice(D._instances.indexOf(this),1),super.dispose()}static createObserver(){this._observer||(this._observer=new ResizeObserver(t=>{const e=new Map;for(const i of t)for(const t of D._instances)-1!==t._elements.indexOf(i.target)&&(e.has(t)||e.set(t,[]),e.get(t).push(i));for(const t of e){const[e,i]=t;e.dispatch(i)}}))}}const I=new class{onChange=d.create();onChangeDefault=d.create();onChangeLarge=d.create();onChangeDynamic=d.create();onChangeSmall=d.create();_vw;_vh;_lvw;_lvh;_dvw;_dvh;_svw;_svh;_isDirty=!1;constructor(){const t=window.innerWidth,e=window.innerHeight;this._vw=t,this._vh=e,this._lvw=t,this._lvh=e,this._dvw=t,this._dvh=e,this._svw=t,this._svh=e,document.body?this.create():document.addEventListener("DOMContentLoaded",()=>{document.body?this.create():console.error("ViewportSize: document.body is still not available after DOMContentLoaded")})}create(){this.createElement("100vw","100vh",(t,e)=>{this._vw=t,this._vh=e,this.onChangeDefault.dispatch(this),this.setDirty()}),this.createElement("100svw","100svh",(t,e)=>{this._svw=t,this._svh=e,this.onChangeSmall.dispatch(this),this.setDirty()}),this.createElement("100lvw","100lvh",(t,e)=>{this._lvw=t,this._lvh=e,this.onChangeLarge.dispatch(this),this.setDirty()}),this.createElement("100dvw","100dvh",(t,e)=>{this._dvw=t,this._dvh=e,this.onChangeDynamic.dispatch(this),this.setDirty()})}setDirty(){this._isDirty||(this._isDirty=!0,queueMicrotask(()=>{this._isDirty=!1,this.onChange.dispatch(this)}))}createElement(t,e,i){const s=document.createElement("div");s.style.visibility="hidden",s.style.pointerEvents="none",s.style.position="fixed",s.style.contain="strict",s.style.width=t,s.style.height=e,s.style.left="100%",s.setAttribute("aria-hidden","true"),s.setAttribute("inert",""),document.body.appendChild(s);A.create(s).add(t=>{const e=t[0].contentRect.width||window.innerWidth,s=t[0].contentRect.height||window.innerHeight;i(e,s)});const n=window.getComputedStyle(s),o=a.parse(n.width,0)||window.innerWidth,r=a.parse(n.height,0)||window.innerHeight;return i(o,r),s}get vw(){return this._vw}get vh(){return this._vh}get lvw(){return this._lvw}get lvh(){return this._lvh}get dvw(){return this._dvw}get dvh(){return this._dvh}get svw(){return this._svw}get svh(){return this._svh}toString(){return`ViewportSize: vw: ${this.vw}, vh: ${this.vh}, lvw: ${this.lvw}, lvh: ${this.lvh}, dvw: ${this.dvw}, dvh: ${this.dvh}, svw: ${this.svw}, svh: ${this.svh}`}};var P="object"==typeof global&&global&&global.Object===Object&&global,N="object"==typeof self&&self&&self.Object===Object&&self,R=P||N||Function("return this")(),F=R.Symbol,U=Object.prototype,Y=U.hasOwnProperty,q=U.toString,B=F?F.toStringTag:void 0;var X=Object.prototype.toString;var H=F?F.toStringTag:void 0;
vendor: 4,540 bytes, line 1
1function $(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":H&&H in Object(t)?function(t){var e=Y.call(t,B),i=t[B];try{t[B]=void 0;var s=!0}catch(t){}var n=q.call(t);return s&&(e?t[B]=i:delete t[B]),n}(t):function(t){return X.call(t)}(t)}function V(t){return null!=t&&"object"==typeof t}var W=Array.isArray;function K(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function z(t){if(!K(t))return!1;var e=$(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var G=R["__core-js_shared__"],J=function(){var t=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var Z=Function.prototype.toString;function Q(t){if(null!=t){try{return Z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var tt=/^\[object .+?Constructor\]$/,et=Function.prototype,it=Object.prototype,st=et.toString,nt=it.hasOwnProperty,at=RegExp("^"+st.call(nt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ot(t){return!(!K(t)||(e=t,J&&J in e))&&(z(t)?at:tt).test(Q(t));var e}function rt(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return ot(i)?i:void 0}var lt=rt(R,"WeakMap"),ct=Object.create,ht=function(){function t(){}return function(e){if(!K(e))return{};if(ct)return ct(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();var dt=function(){try{var t=rt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var ut=/^(?:0|[1-9]\d*)$/;function pt(t,e){var i=typeof t;return!!(e=e??9007199254740991)&&("number"==i||"symbol"!=i&&ut.test(t))&&t>-1&&t%1==0&&t<e}function mt(t,e,i){"__proto__"==e&&dt?dt(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function _t(t,e){return t===e||t!=t&&e!=e}var gt=Object.prototype.hasOwnProperty;function vt(t,e,i){var s=t[e];gt.call(t,e)&&_t(s,i)&&(void 0!==i||e in t)||mt(t,e,i)}function ft(t,e,i,s){var n=!i;i||(i={});for(var a=-1,o=e.length;++a<o;){var r=e[a],l=void 0;void 0===l&&(l=t[r]),n?mt(i,r,l):vt(i,r,l)}return i}function bt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function yt(t){return null!=t&&bt(t.length)&&!z(t)}var wt=Object.prototype;function xt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||wt)}function Tt(t){return V(t)&&"[object Arguments]"==$(t)}var Et=Object.prototype,St=Et.hasOwnProperty,Ct=Et.propertyIsEnumerable,jt=Tt(function(){return arguments}())?Tt:function(t){return V(t)&&St.call(t,"callee")&&!Ct.call(t,"callee")};var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,Ot=Lt&&Lt.exports===Mt?R.Buffer:void 0,kt=(Ot?Ot.isBuffer:void 0)||function(){return!1},At={};function Dt(t){return function(e){return t(e)}}At["[object Float32Array]"]=At["[object Float64Array]"]=At["[object Int8Array]"]=At["[object Int16Array]"]=At["[object Int32Array]"]=At["[object Uint8Array]"]=At["[object Uint8ClampedArray]"]=At["[object Uint16Array]"]=At["[object Uint32Array]"]=!0,At["[object Arguments]"]=At["[object Array]"]=At["[object ArrayBuffer]"]=At["[object Boolean]"]=At["[object DataView]"]=At["[object Date]"]=At["[object Error]"]=At["[object Function]"]=At["[object Map]"]=At["[object Number]"]=At["[object Object]"]=At["[object RegExp]"]=At["[object Set]"]=At["[object String]"]=At["[object WeakMap]"]=!1;var It="object"==typeof exports&&exports&&!exports.nodeType&&exports,Pt=It&&"object"==typeof module&&module&&!module.nodeType&&module,Nt=Pt&&Pt.exports===It&&P.process,Rt=function(){try{var t=Pt&&Pt.require&&Pt.require("util").types;return t||Nt&&Nt.binding&&Nt.binding("util")}catch(t){}}(),Ft=Rt&&Rt.isTypedArray,Ut=Ft?Dt(Ft):function(t){return V(t)&&bt(t.length)&&!!At[$(t)]},Yt=Object.prototype.hasOwnProperty;function qt(t,e){var i=W(t),s=!i&&jt(t),n=!i&&!s&&kt(t),a=!i&&!s&&!n&&Ut(t),o=i||s||n||a,r=o?function(t,e){for(var i=-1,s=Array(t);++i<t;)s[i]=e(i);return s}(t.length,String):[],l=r.length;for(var c in t)!e&&!Yt.call(t,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pt(c,l))||r.push(c);return r}function Bt(t,e){return function(i){return t(e(i))}}var Xt=Bt(Object.keys,Object),Ht=Object.prototype.hasOwnProperty;function $t(t){return yt(t)?qt(t):function(t){if(!xt(t))return Xt(t);var e=[];for(var i in Object(t))Ht.call(t,i)&&"constructor"!=i&&e.push(i);return e}(t)}var Vt=Object.prototype.hasOwnProperty;function Wt(t){if(!K(t))return function(t){var e=[];
vendor: 4,679 bytes, line 1
1if(null!=t)for(var i in Object(t))e.push(i);return e}(t);var e=xt(t),i=[];for(var s in t)("constructor"!=s||!e&&Vt.call(t,s))&&i.push(s);return i}var Kt=rt(Object,"create");var zt=Object.prototype.hasOwnProperty;var Gt=Object.prototype.hasOwnProperty;function Jt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Zt(t,e){for(var i=t.length;i--;)if(_t(t[i][0],e))return i;return-1}Jt.prototype.clear=function(){this.__data__=Kt?Kt(null):{},this.size=0},Jt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Jt.prototype.get=function(t){var e=this.__data__;if(Kt){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return zt.call(e,t)?e[t]:void 0},Jt.prototype.has=function(t){var e=this.__data__;return Kt?void 0!==e[t]:Gt.call(e,t)},Jt.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Kt&&void 0===e?"__lodash_hash_undefined__":e,this};var Qt=Array.prototype.splice;function te(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(t){var e=this.__data__,i=Zt(e,t);return!(i<0)&&(i==e.length-1?e.pop():Qt.call(e,i,1),--this.size,!0)},te.prototype.get=function(t){var e=this.__data__,i=Zt(e,t);return i<0?void 0:e[i][1]},te.prototype.has=function(t){return Zt(this.__data__,t)>-1},te.prototype.set=function(t,e){var i=this.__data__,s=Zt(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this};var ee=rt(R,"Map");function ie(t,e){var i,s,n=t.__data__;return("string"==(s=typeof(i=e))||"number"==s||"symbol"==s||"boolean"==s?"__proto__"!==i:null===i)?n["string"==typeof e?"string":"hash"]:n.map}function se(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function ne(t,e){for(var i=-1,s=e.length,n=t.length;++i<s;)t[n+i]=e[i];return t}se.prototype.clear=function(){this.size=0,this.__data__={hash:new Jt,map:new(ee||te),string:new Jt}},se.prototype.delete=function(t){var e=ie(this,t).delete(t);return this.size-=e?1:0,e},se.prototype.get=function(t){return ie(this,t).get(t)},se.prototype.has=function(t){return ie(this,t).has(t)},se.prototype.set=function(t,e){var i=ie(this,t),s=i.size;return i.set(t,e),this.size+=i.size==s?0:1,this};var ae=Bt(Object.getPrototypeOf,Object);function oe(t){var e=this.__data__=new te(t);this.size=e.size}function re(t,e){return t&&ft(e,function(t){return yt(t)?qt(t,!0):Wt(t)}(e),t)}oe.prototype.clear=function(){this.__data__=new te,this.size=0},oe.prototype.delete=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i},oe.prototype.get=function(t){return this.__data__.get(t)},oe.prototype.has=function(t){return this.__data__.has(t)},oe.prototype.set=function(t,e){var i=this.__data__;if(i instanceof te){var s=i.__data__;if(!ee||s.length<199)return s.push([t,e]),this.size=++i.size,this;i=this.__data__=new se(s)}return i.set(t,e),this.size=i.size,this};var le="object"==typeof exports&&exports&&!exports.nodeType&&exports,ce=le&&"object"==typeof module&&module&&!module.nodeType&&module,he=ce&&ce.exports===le?R.Buffer:void 0,de=he?he.allocUnsafe:void 0;function ue(){return[]}var pe=Object.prototype.propertyIsEnumerable,me=Object.getOwnPropertySymbols,_e=me?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var i=-1,s=null==t?0:t.length,n=0,a=[];++i<s;){var o=t[i];e(o,i,t)&&(a[n++]=o)}return a}(me(t),function(e){return pe.call(t,e)}))}:ue;var ge=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ne(e,_e(t)),t=ae(t);return e}:ue;function ve(t){return function(t,e,i){var s=e(t);return W(t)?s:ne(s,i(t))}(t,$t,_e)}var fe=rt(R,"DataView"),be=rt(R,"Promise"),ye=rt(R,"Set"),we="[object Map]",xe="[object Promise]",Te="[object Set]",Ee="[object WeakMap]",Se="[object DataView]",Ce=Q(fe),je=Q(ee),Me=Q(be),Le=Q(ye),Oe=Q(lt),ke=$;(fe&&ke(new fe(new ArrayBuffer(1)))!=Se||ee&&ke(new ee)!=we||be&&ke(be.resolve())!=xe||ye&&ke(new ye)!=Te||lt&&ke(new lt)!=Ee)&&(ke=function(t){var e=$(t),i="[object Object]"==e?t.constructor:void 0,s=i?Q(i):"";if(s)switch(s){case Ce:return Se;case je:return we;case Me:return xe;case Le:return Te;case Oe:return Ee}return e});var Ae=Object.prototype.hasOwnProperty;var De=R.Uint8Array;var Ie=/\w*$/;var Pe=F?F.prototype:void 0,Ne=Pe?Pe.valueOf:void 0;function Re(t,e,i){var s,n,a,o,r,l=t.constructor;switch(e){case"[object ArrayBuffer]":return r=new(o=t).constructor(o.byteLength),new De(r).set(new De(o)),r;case"[object Boolean]":case"[object Date]":return new l(+t);case"[object DataView]":return a=(n=t).buffer,new n.constructor(a,n.byteOffset,n.byteLength);
1case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t){var e=t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,Ie.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return s=t,Ne?Object(Ne.call(s)):{}}}var Fe=Rt&&Rt.isMap,Ue=Fe?Dt(Fe):function(t){return V(t)&&"[object Map]"==ke(t)};var Ye=Rt&&Rt.isSet,qe=Ye?Dt(Ye):function(t){return V(t)&&"[object Set]"==ke(t)},Be="[object Arguments]",Xe="[object Function]",He="[object Object]",$e={};function Ve(t,e,i,s,n,a){var o,r=2&e;if(void 0!==o)return o;if(!K(t))return t;var l=W(t);if(l)return o=function(t){var e=t.length,i=new t.constructor(e);return e&&"string"==typeof t[0]&&Ae.call(t,"index")&&(i.index=t.index,i.input=t.input),i}(t),function(t,e){var i=-1,s=t.length;for(e||(e=Array(s));++i<s;)e[i]=t[i];return e}(t,o);var c=ke(t),h=c==Xe||"[object GeneratorFunction]"==c;if(kt(t))return function(t){var e=t.length,i=de?de(e):new t.constructor(e);return t.copy(i),i}(t);if(c==He||c==Be||h&&!n)return o=h?{}:function(t){return"function"!=typeof t.constructor||xt(t)?{}:ht(ae(t))}(t),r?function(t,e){return ft(t,ge(t),e)}(t,re(o,t)):function(t,e){return ft(t,_e(t),e)}(t,function(t,e){return t&&ft(e,$t(e),t)}(o,t));if(!$e[c])return n?t:{};o=Re(t,c),a||(a=new oe);var d=a.get(t);if(d)return d;a.set(t,o),qe(t)?t.forEach(function(s){o.add(Ve(s,e,i,s,t,a))}):Ue(t)&&t.forEach(function(s,n){o.set(n,Ve(s,e,i,n,t,a))});var u=l?void 0:ve(t);return function(t,e){for(var i=-1,s=null==t?0:t.length;++i<s&&!1!==e(t[i],i,t););}(u||t,function(s,n){u&&(s=t[n=s]),vt(o,n,Ve(s,e,i,n,t,a))}),o}$e[Be]=$e["[object Array]"]=$e["[object ArrayBuffer]"]=$e["[object DataView]"]=$e["[object Boolean]"]=$e["[object Date]"]=$e["[object Float32Array]"]=$e["[object Float64Array]"]=$e["[object Int8Array]"]=$e["[object Int16Array]"]=$e["[object Int32Array]"]=$e["[object Map]"]=$e["[object Number]"]=$e[He]=$e["[object RegExp]"]=$e["[object Set]"]=$e["[object String]"]=$e["[object Symbol]"]=$e["[object Uint8Array]"]=$e["[object Uint8ClampedArray]"]=$e["[object Uint16Array]"]=$e["[object Uint32Array]"]=!0,$e["[object Error]"]=$e[Xe]=$e["[object WeakMap]"]=!1;function We(t){return Ve(t,4)}class Ke{onUpdate=d.create();static _dirty=[];_target;_container;_rangeStart;_rangeEnd;_ratio=0;_disposables=[];_isDirtyTriggerUpdate=!1;_batchUpdates=!0;constructor(t){t=m({container:t.target.ownerDocument,rangeStart:{rangeName:"contain",offset:0},rangeEnd:{rangeName:"contain",offset:100}},t),this._target=t.target,this._container=t.container,this.setRangeStart(t.rangeStart),this.setRangeEnd(t.rangeEnd),"function"==typeof t.onUpdate&&this.onUpdate.add(t.onUpdate),this._disposables.push(this.onUpdate,u.on({type:"scroll",passive:!0,scope:this._container,listener:()=>{this.update()}}));const e=A.create(this._target,this.isDocument(this._container)?this._container.body:this._container);this._disposables.push(e),e.add(()=>{this.update()}),this.updateInternal(!1),this.onUpdate.dispatch(this)}getTop(t,e,i){if(Array.isArray(t)){const s="number"==typeof t[0]?t[0]*i.height:a.relation(t[0],i.height,0),n="number"==typeof t[1]?t[1]*e.height:a.relation(t[1],e.height,0);return e.top+n-s}{const s=t.rangeName,n=t.offset;let o=0,r=0;if("contain"===s)o=Math.max(e.bottom-i.height,e.top),r=Math.min(e.bottom-i.height,e.top);else if("cover"===s)o=e.bottom,r=e.top-i.height;else if("entry"===s)o=e.bottom,r=Math.max(e.bottom-i.height,e.top);else if("entry-crossing"===s)o=e.bottom,r=e.bottom-i.height;else if("exit"===s)o=Math.min(e.bottom-i.height,e.top),r=e.top-i.height;else{if("exit-crossing"!==s)return console.warn(`Unknown range name "${s}".`),0;o=e.top,r=e.top-i.height}if(o<r){const t=o;o=r,r=t}return a.interpolate(n/100,o,r)}}nullifyTransform(t,e){const{x:i,y:s,width:n,height:a}=e,o=t.split(/\(|,|\)/).slice(1,-1).map(t=>parseFloat(t));if(6==o.length){const t=o,e=t[0]*t[3]-t[1]*t[2];return new DOMRect((i*t[3]-s*t[2]+t[2]*t[5]-t[4]*t[3])/e,(-i*t[1]+s*t[0]+t[4]*t[1]-t[0]*t[5])/e,n/t[0],a/t[3])}return new DOMRect(i,s,n,a)}isDocument(t){return t instanceof Document||this._target.ownerDocument===t}update(){this.updateInternal(!0)}updateInternal(t){let e,i;e=this.isDocument(this._container)?new DOMRect(0,0,I.lvw,I.lvh):this._container.getBoundingClientRect();const s=window.getComputedStyle(this._target);if("none"!==s.transform){if(i=new DOMRect(a.parse(s.left,0),a.parse(s.top,0),this._target.offsetWidth,this._target.offsetHeight),this._target.parentElement){const t=this._target.parentElement.getBoundingClientRect();i.x+=t.x,i.y+=t.y}}else i=this._target.getBoundingClientRect();let n=this.getTop(this._rangeStart||{rangeName:"contain",offset:0},e,i),o=this.getTop(this._rangeEnd||{rangeName:"contain",offset:100},e,i),r=a.ratio(i.y,n,o);r=a.clamp(r,0,1),r<=.001?r=0:r>=.999&&(r=1),this._ratio!==r&&(this._ratio=r,t&&(this._batchUpdates?this.setDirtyTriggerUpdate():this.onUpdate.dispatch(this)))}setDirtyTriggerUpdate(){this._isDirtyTriggerUpdate||(this._isDirtyTriggerUpdate=!0,Ke._dirty.push(this),1===Ke._dirty.length&&requestAnimationFrame(()=>{for(let t=0;t<Ke._dirty.length;t++)Ke._dirty[t].onUpdate.dispatch(Ke._dirty[t]),Ke._dirty[t]._isDirtyTriggerUpdate=!1;Ke._dirty=[]}))}get ratio(){return this._ratio}get rangeStart(){return this._rangeStart?Array.isArray(this._rangeStart)?this._rangeStart.slice():We(this._rangeStart):null}set rangeStart(t){this.setRangeStart(t),this.update()}setRangeStart(t){t?Array.isArray(t)?this._rangeStart=t.slice():this._rangeStart=m({rangeName:"contain",offset:0},t):this._rangeStart=null}get rangeEnd(){return this._rangeEnd?Array.isArray(this._rangeEnd)?this._rangeEnd.slice():We(this._rangeEnd):null}set rangeEnd(t){this.setRangeEnd(t),this.update()}setRangeEnd(t){t?Array.isArray(t)?this._rangeEnd=t.slice():this._rangeEnd=m({rangeName:"contain",offset:100},t):this._rangeEnd=null}
1dispose(){this._disposables.forEach(t=>{t.dispose()}),this.onUpdate=null,this._disposables=null,this._target=null,this._container=null,this._rangeStart=null,this._rangeEnd=null;const t=Ke._dirty.indexOf(this);-1!==t&&Ke._dirty.splice(t,1)}}class ze{onDispose=d.create();onClose=d.create();onHide=d.create();onShow=d.create();onRemove=d.create();element;options;focusBefore;uid;static _uid=0;_content;_disposables=[];_removeTimeout=null;_closed=!1;constructor(t,e){if(this.focusBefore=e,this.uid="modal-"+ ++ze._uid,t=m({closable:!0,layout:"center",title:"",width:500,height:"auto",maxHeight:"auto",maxWidth:"auto",contentPadding:"var(--jsidea-global__body__padding, 24px)",chromeless:!1,stackingMode:"hide"},t),this.options=t,this.element=document.createElement("div"),t.width){const e="number"==typeof t.width?t.width+"px":t.width;this.element.style.setProperty("--jsidea-modal__box__width",e)}if(t.height){const e="number"==typeof t.height?t.height+"px":t.height;this.element.style.setProperty("--jsidea-modal__box__height",e)}if(t.maxWidth){const e="number"==typeof t.maxWidth?t.maxWidth+"px":t.maxWidth;this.element.style.setProperty("--jsidea-modal__box__maxWidth",e)}if(t.maxHeight){const e="number"==typeof t.maxHeight?t.maxHeight+"px":t.maxHeight;this.element.style.setProperty("--jsidea-modal__box__maxHeight",e)}"number"==typeof t.contentPadding?this.element.style.setProperty("--jsidea-modal__content__padding",t.contentPadding+"px"):t.contentPadding&&this.element.style.setProperty("--jsidea-modal__content__padding",t.contentPadding),this.element.className="jsidea-modal jsidea-modal--closed jsidea-modal--layout-"+t.layout,t.className&&this.element.classList.add(...t.className.split(" ")),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-modal","true"),this.element.innerHTML='\n <div class="jsidea-modal__background"></div>\n <div class="jsidea-modal__box">\n <div class="jsidea-modal__toolbar">\n <div class="jsidea-modal__toolbar-title"><span></span></div>\n <div class="jsidea-modal__toolbar-fill"></div>\n <button class="jsidea-modal__toolbar-button" data-modal-action="close">\n <i class="fal fa-times"></i>\n </button>\n </div>\n <div class="jsidea-modal__content"></div>\n </div>\n ',t.chromeless&&this.element.classList.add("jsidea-modal--chromeless"),this._content=this.element.querySelector(".jsidea-modal__content"),this.closable=t.closable,t.title&&(this.title=t.title);let i=null;i="function"==typeof t.content?t.content(this):t.content,"string"==typeof i?this._content.innerHTML=i:(this._content.innerHTML="",this._content.appendChild(i));let s=!1,n=0;this._disposables.push(u.on({scope:this.element,type:"click",selector:'[data-modal-action="close"]',listener:t=>{this.active&&(s&&Date.now()-n<400||this.close())}})),this._disposables.push(u.on({scope:document,type:"keydown",listener:t=>{this.active&&(j.is(t.event,j.ENTER,j.SPACE)&&(s=t.event.repeat,s&&(n=Date.now())),t.event.repeat||j.is(t.event,j.ESCAPE)&&this.options.closable&&this.close())}})),"function"==typeof t.onDispose&&this.onDispose.add(t.onDispose),"function"==typeof t.onClose&&this.onClose.add(t.onClose),"function"==typeof t.onHide&&this.onHide.add(t.onHide),"function"==typeof t.onShow&&this.onShow.add(t.onShow),"function"==typeof t.onRemove&&this.onRemove.add(t.onRemove),"function"==typeof t.onInit&&t.onInit(this)}close(){this._closed?console.warn("Modal.close() called multiple times."):(this._closed=!0,this.onClose.dispatch(this))}get active(){return this.element.classList.contains("jsidea-modal--active")}set active(t){this.element.classList.toggle("jsidea-modal--active",t)}get title(){return this.element.querySelector(".jsidea-modal__toolbar-title>span").textContent}set title(t){this.element.querySelector(".jsidea-modal__toolbar-title>span").textContent=t}get closable(){return this.element.classList.contains("jsidea-modal--closable")}set closable(t){this.element.classList.toggle("jsidea-modal--closable",t),this.element.querySelector(".jsidea-modal__background").setAttribute("data-modal-action",t?"close":"none")}get visible(){return!this.element.classList.contains("jsidea-modal--closed")}set visible(t){this.visible!=t&&(this.element.classList.toggle("jsidea-modal--closed",!t),t?document.body.appendChild(this.element):(this._removeTimeout&&clearTimeout(this._removeTimeout),this._removeTimeout=setTimeout(()=>{!this.visible&&this.element.parentNode&&(this.element.remove(),this.onRemove.dispatch(this))},400)),t?this.onShow.dispatch(this):this.onHide.dispatch(this))}dispose(){this.onDispose.dispatch(this);let t=this;t.element.remove(),t.element=null,t.options=null,t.onRemove.dispose(),t.onRemove=null,t.onHide.dispose(),t.onHide=null,t.onDispose.dispose(),t.onDispose=null,t.onClose.dispose(),t.onClose=null,t.onShow.dispose(),t.onShow=null,t.focusBefore=null,this._content=null,this._removeTimeout&&(clearTimeout(this._removeTimeout),this._removeTimeout=null);for(let t of this._disposables)t.dispose();this._disposables=null}}const Ge=new class{_stack=[];_current=null;_optionsLookup={};constructor(){window.addEventListener("popstate",t=>{!this._current&&t.state&&t.state.modalUid||!this._current||t.state&&t.state.modalUid===this._current.uid||this._current.close()})}show(t){const e=document.activeElement;let i=new ze(t,e);return this._stack.push(i),i.onClose.add(()=>{history.state&&history.state.modalUid===i.uid&&history.back();const t=this._stack.indexOf(i);this.current===i&&(this.current=this._stack[t-1]||null),this._stack.splice(t,1),setTimeout(()=>{i.dispose(),i=null},400)}),history.pushState({modalUid:i.uid},"",location.href),this.current=i,i}clearStack(){this._stack.forEach(t=>t.close())}get current(){return this._current}set current(t){if(this._current===t)return;const e=this._current?.focusBefore;if(this._current){const e=this._current;e.active=!1,this._current=null,"close"===e.options.stackingMode?(e.visible=!1,t&&e.close()):"hide"===e.options.stackingMode?e.visible=!1:"stack"===e.options.stackingMode&&(t?console.warn("Modal stackingMode 'stack' not implemented yet."):e.visible=!1),k.setElement(null)}if(this._current=t,this._current?(this._current.active=!0,this._current.visible=!0,k.setElement(this._current.element),this._current.options.focus&&k.focus(this._current.options.focus),document.documentElement.classList.contains("jsidea-modal__root--open")||(document.documentElement.style.setProperty("--jsidea-modal__scrollbarWidth",window.innerWidth-document.documentElement.clientWidth+"px"),document.documentElement.classList.add("jsidea-modal__root--open"))):setTimeout(()=>{this._current||document.documentElement.classList.remove("jsidea-modal__root--open")},400),!this._current&&e)try{e.focus()}catch{}}};class Je{static onChange=d.create();static get isFullscreen(){return!!this.element}
1static get element(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null}static enter(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}static exit(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}static get isSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}}var Ze,Qe;document.addEventListener("fullscreenchange",()=>{Je.onChange.dispatch(Je.isFullscreen)}),document.addEventListener("webkitfullscreenchange",()=>{Je.onChange.dispatch(Je.isFullscreen)}),document.addEventListener("mozfullscreenchange",()=>{Je.onChange.dispatch(Je.isFullscreen)}),document.addEventListener("MSFullscreenChange",()=>{Je.onChange.dispatch(Je.isFullscreen)}),function(t){t[t.NONE=0]="NONE",t[t.START=1]="START",t[t.MOVE=2]="MOVE",t[t.END=4]="END",t[t.CANCEL=8]="CANCEL",t[t.ALL=15]="ALL"}(Ze||(Ze={})),function(t){t[t.NONE=0]="NONE",t[t.MOUSE=16]="MOUSE",t[t.TOUCH=32]="TOUCH",t[t.ALL=48]="ALL"}(Qe||(Qe={}));class ti{id=0;sessionId=0;state=Ze.NONE;event=null;x=0;y=0;originX=0;originY=0;moveX=0;moveY=0;deltaTime=0;deltaX=0;deltaY=0;velocityX=0;velocityY=0;distance=0;creationTime=0;changeTime=0;multitouch=!1;intervalTime=0;intervalX=0;intervalY=0}var ei={};class ii{static DEFAULT={maxPointers:-1,stopPropagation:!1,preventDefault:!1,filter:!0,useCapture:!1,passive:!1,allowedMouseButtons:[0]};onDown=d.create();onMove=d.create();onUp=d.create();onClear=d.create();onStart=d.create();onChangeActive=d.create();maxPointers=-1;stopPropagation=!1;preventDefault=!1;filter=!1;allowedMouseButtons=[0];pointer;_pointers=[];_down;_move;_up;_cancel;_useCapture=!1;_passive=!1;_element=null;_enabled=!0;_mouseEventId=-1;_eventTargets=[];_disposables=[];static _eventToPointerState={touchstart:Ze.START,touchmove:Ze.MOVE,touchend:Ze.END,touchcancel:Ze.CANCEL,mousedown:Ze.START,mousemove:Ze.MOVE,mouseup:Ze.END};static _eventToPointerType={touchstart:Qe.TOUCH,touchmove:Qe.TOUCH,touchend:Qe.TOUCH,touchcancel:Qe.TOUCH,mousedown:Qe.MOUSE,mousemove:Qe.MOUSE,mouseup:Qe.MOUSE};static _sessionId=1;constructor(t=null,e=null){this.pointer=this.createPointer();var i=0,s=0,n=0;this._down=t=>{if(this._enabled&&this.applyFilter(t)){if(this.applyStopPropagation(t),this.applyPreventDefault(t),-1!==t.type.indexOf("mouse"))if(this.getTime()-n<500){var e=t,a=e.clientX-i,o=e.clientY-s;if(Math.sqrt(a*a+o*o)<20)return}var r=this.count;if(!(-1!=this.maxPointers&&r>=this.maxPointers)){var l=this.addPointer(t);if(l){if(this.updateGlobalPointer(Ze.START,l,t),1===this.pointers.length&&this.onStart.dispatch(l,this),!this.onDown)return;this.onDown.dispatch(l,this)}if(l){let e=t.target;if(t.composed){let i=t.composedPath();i.length>0&&(e=i[0])}var c=-1!==this._eventTargets.indexOf(e)&&e!=this._element;0!==r&&c||(c||this._eventTargets.push(e),this.addEventListenerActive(e,r)),0===r&&this.onChangeActive.dispatch(!0)}}}},this._move=t=>{if(this.applyFilter(t)){this.applyStopPropagation(t),this.applyPreventDefault(t);var e=this.movePointer(t);e&&(this.updateGlobalPointer(Ze.MOVE,e,t),this.onMove.dispatch(e,this))}},this._up=t=>{if(this.applyFilter(t)){this.applyStopPropagation(t),this.applyPreventDefault(t);var e=this.removePointer(t);if(e&&(this.updateGlobalPointer(Ze.END,e,t),this.onUp.dispatch(e,this)),e&&0===this.count){if(-1!==t.type.indexOf("touch")){var a=t;i=a.changedTouches[0].clientX,s=a.changedTouches[0].clientY,n=this.getTime()}this.removeEventListenerActive(),this.onChangeActive.dispatch(!1),this.onClear.dispatch()}}else this.removePointer(t)},this._cancel=()=>{this.cancel()},this._disposables.push(Je.onChange.add(t=>{this._cancel()})),this.element=t,e!==ei&&this.setOptions(e)}checkFlag(t,e){if("boolean"==typeof t)return t;var i=ii._eventToPointerState[e.type],s=ii._eventToPointerType[e.type];if("function"==typeof t)return t(e,i,s);
1var n=Boolean(t&Ze.ALL),a=Boolean(t&Qe.ALL);return a&&n?Boolean(t&i)&&Boolean(t&s):a?Boolean(t&s):!!n&&Boolean(t&i)}applyFilter(t){return this.checkFlag(this.filter,t)}applyPreventDefault(t){if(!t.cancelable)return!1;var e=this.checkFlag(this.preventDefault,t);if(e)try{t.preventDefault()}catch(t){return!1}return e}applyStopPropagation(t){var e=this.checkFlag(this.stopPropagation,t);if(e)try{t.stopPropagation()}catch(t){return!1}return e}createPointer(){const t=new ti;return 0===this._pointers.length?(ii._sessionId++,t.sessionId=ii._sessionId):t.sessionId=this._pointers[0].sessionId,t}updateGlobalPointer(t,e,i){var s=ii.center(this._pointers),n={clientX:s?s.x:0,clientY:s?s.y:0};this.pointer.sessionId=e[0]?.sessionId||0,t===Ze.START?(this.pointer.x=n.clientX,this.pointer.y=n.clientY,this.updatePointer(this.pointer,t,n,i)):t===Ze.MOVE?this.updatePointer(this.pointer,t,n,i):t!==Ze.END&&t!==Ze.CANCEL||this.updatePointer(this.pointer,t,this._pointers.length>0?n:null,i)}start(t){this.cancel(),this._down(t)}cancel(){if(0!==this._pointers.length){for(var t of this._pointers)t.state=Ze.CANCEL,this.updatePointer(t,Ze.CANCEL,{clientX:t.x,clientY:t.y},t.event);var e=this._pointers.slice();this._pointers=[],this.onUp.dispatch(e,this),this.removeEventListenerActive(),this.onChangeActive.dispatch(!1),this.onClear.dispatch()}}setOptions(t){t=m({},ii.DEFAULT,t),this.maxPointers=t.maxPointers,this.allowedMouseButtons=t.allowedMouseButtons,this.stopPropagation=t.stopPropagation,this.preventDefault=t.preventDefault,this.useCapture=t.useCapture,this.passive=t.passive,this.filter=t.filter}addEventListener(){this._element&&(this._element.addEventListener("mousedown",this._down,this.getEventListenerOptions()),this._element.addEventListener("touchstart",this._down,this.getEventListenerOptions()))}removeEventListener(){this._element&&(this._element.removeEventListener("mousedown",this._down,this.getEventListenerOptions()),this._element.removeEventListener("touchstart",this._down,this.getEventListenerOptions())),this.removeEventListenerActive()}addEventListenerActive(t,e){0===e&&(document.addEventListener("mousemove",this._move,this.getEventListenerOptions()),document.addEventListener("mouseup",this._up,this.getEventListenerOptions()),window.addEventListener("dragend",this._cancel,this.getEventListenerOptions()),window.addEventListener("blur",this._cancel,this.getEventListenerOptions())),t.addEventListener("touchmove",this._move,this.getEventListenerOptions()),t.addEventListener("touchend",this._up,this.getEventListenerOptions()),t.addEventListener("touchcancel",this._up,this.getEventListenerOptions())}removeEventListenerActive(){for(var t of(document.removeEventListener("mousemove",this._move,this.getEventListenerOptions()),document.removeEventListener("mouseup",this._up,this.getEventListenerOptions()),window.removeEventListener("dragend",this._cancel,this.getEventListenerOptions()),window.removeEventListener("blur",this._cancel,this.getEventListenerOptions()),this._eventTargets))t.removeEventListener("touchmove",this._move,this.getEventListenerOptions()),t.removeEventListener("touchend",this._up,this.getEventListenerOptions()),t.removeEventListener("touchcancel",this._up,this.getEventListenerOptions());this._eventTargets=[]}getEventListenerOptions(){return{capture:this._useCapture,passive:this._passive}}get useCapture(){return this._useCapture}set useCapture(t){this._useCapture!==t&&(this.cancel(),this.removeEventListener(),this._useCapture=t,this.addEventListener())}get passive(){return this._passive}set passive(t){this._passive!==t&&(this.cancel(),this.removeEventListener(),this._passive=t,this.addEventListener())}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&(t||this.cancel(),this._enabled=t)}get element(){return this._element}set element(t){if(this._element!==t){this._element&&(this.cancel(),this.removeEventListener());var e=this._element;this._element=t,this._element&&this.addEventListener(),this.onChangeElement(t,e)}}onChangeElement(t,e){}get rect(){return ii.rect(this.pointers)}get center(){return ii.center(this.pointers)}get first(){return this.pointers.length>0?new DOMPoint(this.pointers[0].x,this.pointers[0].y):null}getTime(){return Date.now()}addPointer(t){if(t instanceof MouseEvent)return-1===this.allowedMouseButtons.indexOf(t.button)||this.getPointer(t.pointerId||this._mouseEventId)?null:((s=this.createPointer()).id=t.pointerId||this._mouseEventId,this.updatePointer(s,Ze.START,t,t),this._pointers.push(s),[s]);for(var e=[],i=0;i<t.changedTouches.length;++i){var s,n=t.changedTouches[i];if(!this.getPointer(n.identifier))(s=this.createPointer()).id=n.identifier,this.updatePointer(s,Ze.START,n,t),this._pointers.push(s),e.push(s)}return e.length>0?e:null}movePointer(t){if(t instanceof MouseEvent)return(s=this.getPointer(t.pointerId||this._mouseEventId))?(this.updatePointer(s,Ze.MOVE,t,t),[s]):null;for(var e=[],i=0;i<t.changedTouches.length;++i){var s,n=t.changedTouches[i];(s=this.getPointer(n.identifier))&&(this.updatePointer(s,Ze.MOVE,n,t),e.push(s))}return e.length>0?e:null}removePointer(t){if(t instanceof MouseEvent)return(s=this.getPointer(t.pointerId||this._mouseEventId))?(s.event=t,this.updatePointer(s,Ze.END,null,t),this._pointers.splice(this._pointers.indexOf(s),1),[s]):null;for(var e=[],i=0;i<t.changedTouches.length;++i){var s,n=t.changedTouches[i];(s=this.getPointer(n.identifier))&&(s.event=t,this.updatePointer(s,Ze.END,null,t),e.push(s),this._pointers.splice(this._pointers.indexOf(s),1))}return e.length>0?e:null}updatePointer(t,e,i,s){var n=this.getTime();if(t.state=e,t.event=s,e===Ze.START)t.deltaTime=0,t.changeTime=n,t.x=i.clientX,t.y=i.clientY,t.deltaX=0,t.deltaY=0,t.originX=i.clientX,t.originY=i.clientY,t.moveX=0,t.moveY=0,t.distance=0,t.velocityX=0,t.velocityY=0,t.creationTime=n,t.multitouch=this._pointers.length>1,t.intervalTime=n,t.intervalX=t.x,t.intervalY=t.y;else if(e===Ze.MOVE){if(t.x===i.clientX&&t.y===i.clientY)return;t.deltaTime=n-t.changeTime,t.changeTime=n,t.deltaX=i.clientX-t.x,t.deltaY=i.clientY-t.y,t.moveX+=Math.abs(t.deltaX),t.moveY+=Math.abs(t.deltaY),t.distance=Math.sqrt(t.moveX*t.moveX+t.moveY*t.moveY),t.x=i.clientX,t.y=i.clientY;var o=a.clampMin(n-t.intervalTime,1e-4);
1if(o>25||!t.velocityX&&!t.velocityY){var r=t.x-t.intervalX,l=t.y-t.intervalY;t.velocityX=r/o,t.velocityY=l/o,t.intervalX=t.x,t.intervalY=t.y,t.intervalTime=n}}else if(e===Ze.END||e===Ze.CANCEL)if(t.deltaTime=n-t.changeTime,t.changeTime=n,i)t.x=i.clientX,t.y=i.clientY;else{var c=1-a.clampMax(t.deltaTime,250)/250;t.velocityX*=c,t.velocityY*=c}}getPointer(t){for(var e of this._pointers)if(e.id===t)return e;return null}get distance(){return ii.distance(this._pointers)}get pointers(){return this._pointers}get count(){return this._pointers.length}static center(t){if(!t||0===t.length)return null;if(1===t.length)return new DOMPoint(t[0].x,t[0].y);var e=0,i=0;for(var s of t)e+=s.x,i+=s.y;return new DOMPoint(e/t.length,i/t.length)}static lifetime(t){if(!t||0===t.length)return 0;var e=Number.MAX_VALUE;for(var i of t)e=Math.min(i.creationTime,e);return Date.now()-e}static distance(t){var e=this.rect(t);return e?Math.sqrt(e.width*e.width+e.height*e.height):0}static angle(t){if(!t||t.length<2)return 0;var e=t[0],i=t[t.length-1];return Math.atan2(e.y-i.y,e.x-i.x)}static rect(t){if(!t||t.length<=1)return null;var e=Number.MAX_VALUE,i=-Number.MAX_VALUE,s=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(var a of t)e=Math.min(e,a.x),i=Math.max(i,a.x),s=Math.min(s,a.y),n=Math.max(n,a.y);return new DOMRect(e,s,i-e,n-s)}dispose(){for(var t of(this.removeEventListener(),this._element=null,this.onDown.dispose(),this.onDown=null,this.onMove.dispose(),this.onMove=null,this.onChangeActive.dispose(),this.onChangeActive=null,this.onUp.dispose(),this.onClear.dispose(),this.onClear=null,this.onUp=null,this._down=null,this._move=null,this._up=null,this._cancel=null,this._pointers=null,this.pointer=null,this._disposables))t.dispose();this._disposables=null}}class si{onIdle=d.create();onReset=d.create();_isIdle=!0;_duration;_timeoutId=null;_enabled=!1;_disposables=[];_scope;_preventIdle=null;constructor(t){t=m({duration:30,enabled:!0,scope:document},t),this._preventIdle=t.preventIdle||null,this._duration=t.duration,this._scope=t.scope,this.enabled=t.enabled,this.reset(),this._isIdle=!0}reset(){this._enabled&&(this._isIdle&&this.onReset.dispatch(),this._isIdle=!1,null!==this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=window.setTimeout(()=>{this._timeoutId=null,this._preventIdle&&this._preventIdle()?this.reset():this.idle()},1e3*this._duration))}idle(){this._isIdle||(null!==this._timeoutId&&clearTimeout(this._timeoutId),this._isIdle=!0,this.onIdle.dispatch())}get isIdle(){return this._isIdle}get duration(){return this._duration}set duration(t){this._duration=t,this.reset()}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&(this._enabled=t,this._enabled?(this._disposables.push(u.on({scope:this._scope,type:["mousedown","mousemove","click","keydown","touchstart","focusin","wheel"],listener:()=>this.reset(),capture:!0,passive:!0}
1)),this.reset()):(this._isIdle=!0,this._disposables.forEach(t=>t.dispose()),this._disposables=[],null!==this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)))}dispose(){this._disposables.forEach(t=>t.dispose()),this._disposables=[],null!==this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),this.onIdle.dispose(),this.onIdle=null}}const ni=new si({duration:30,scope:document,enabled:!1}),ai=d.create(),oi=()=>{ai.dispatch(),requestAnimationFrame(oi)};requestAnimationFrame(oi);class ri{_element;_videoControl;_disposables=[];constructor(t){this._videoControl=t.videoControl,this._element=document.createElement("div"),this._element.className="jsidea-video-control__item"}get element(){return this._element}preventIdle(){return!1}dispose(){this._disposables.forEach(t=>t.dispose()),this._disposables.length=0,this._element.remove(),this._element=null,this._videoControl=null,this._disposables=null}}class li extends ri{_label;_labelElement;constructor(t){super(t),this._element.classList.add("jsidea-video-control__item--label"),this._labelElement=document.createElement("span"),this._labelElement.className="jsidea-video-control__label",this._element.appendChild(this._labelElement),void 0!==t.label&&(this.label=t.label)}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._labelElement.textContent=this._label)}dispose(){super.dispose(),this._label=null}}class ci extends li{constructor(t){super(t),this._element.classList.add("jsidea-video-control__item--duration"),this.updateTimeString(),this._disposables.push(this._videoControl.onTimeUpdate.add(()=>{this.updateTimeString()}),this._videoControl.onStateChange.add(()=>{this.updateTimeString()}))}updateTimeString(){if(!this._videoControl.ready)return void(this.label="--:-- / --:--");const t=this._videoControl.video.currentTime,e=this._videoControl.video.duration;this.label=`${hi(t)} / ${hi(e)}`}dispose(){super.dispose()}}function hi(t){const e=Math.floor(t/60),i=Math.floor(t%60);return`${e.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}class di extends ri{_button;_icon;constructor(t){super(t),this._element.classList.add("jsidea-video-control__item--button"),this._button=document.createElement("button"),this._button.className="jsidea-video-control__button",this._element.appendChild(this._button),void 0!==t.icon&&(this.icon=t.icon),void 0!==t.disabled&&(this.disabled=t.disabled)}get disabled(){return this._button.disabled}set disabled(t){this._button.disabled=t}get icon(){return this._icon}set icon(t){this._icon!==t&&(this._icon=t,this._button.innerHTML=`<span class="jsidea-video-control__button-icon ${t}"></span>`)}dispose(){super.dispose(),this._button.remove(),this._button=null}}class ui extends ri{_track;_fill;_fillRest;_thumb;_tooltip;_tooltipLabel;_actor;constructor(t){super(t),this._element.classList.add("jsidea-video-control__item--seekbar"),this._element.innerHTML='\n <div class="jsidea-video-control__seekbar-track">\n <div class="jsidea-video-control__seekbar-fill"></div>\n <div class="jsidea-video-control__seekbar-fill-rest"></div>\n <button class="jsidea-video-control__seekbar-thumb" type="button" aria-label="Seek">\n <span class="jsidea-video-control__seekbar-tooltip">\n <span class="jsidea-video-control__seekbar-tooltip-label"></span>\n </span>\n </button>\n </div>\n ',this._track=this._element.querySelector(".jsidea-video-control__seekbar-track"),this._fill=this._element.querySelector(".jsidea-video-control__seekbar-fill"),this._fillRest=this._element.querySelector(".jsidea-video-control__seekbar-fill-rest"),this._thumb=this._element.querySelector(".jsidea-video-control__seekbar-thumb"),this._tooltip=this._element.querySelector(".jsidea-video-control__seekbar-tooltip"),this._tooltipLabel=this._element.querySelector(".jsidea-video-control__seekbar-tooltip-label"),this._disposables.push(u.on({type:"keydown",scope:this._thumb,listener:t=>{if(this._videoControl.ready)if(j.is(t.event,j.LEFT_ARROW)){t.event.preventDefault();const e=this._videoControl.video;e.currentTime=Math.max(0,e.currentTime-5),this._videoControl.onPlayFrame.dispatch()}else if(j.is(t.event,j.RIGHT_ARROW)){t.event.preventDefault();const e=this._videoControl.video;e.currentTime=Math.min(e.duration,e.currentTime+5),this._videoControl.onPlayFrame.dispatch()}}}));const e=new ii(this._element);this._actor=e,e.preventDefault=!0;const i=t=>{const e=this._track.getBoundingClientRect(),i=t-e.left;return 100*jsidea.Calc.clamp(i/e.width,0,1)},s=()=>
1{if(!this._videoControl.video)return 0;const t=this._videoControl.video.currentTime,e=this._videoControl.video.duration;return e>0?100*jsidea.Calc.clamp(t/e,0,1):0},n=()=>{if(!this._videoControl.video)return;let t=0;if(e.pointers.length>0){t=i(e.pointer.x);const s=t/100*this._videoControl.video.duration;this._tooltipLabel.textContent=hi(s)}else t=s();this._fill.style.width=`${t}%`,this._fillRest.style.left=`${t}%`,this._thumb.style.left=`${t}%`};e.onStart.add(n),e.onMove.add(n),e.onStart.add(()=>{this._thumb.classList.add("jsidea-video-control__seekbar-thumb--dragging")}),e.onClear.add(()=>{if(this._thumb.classList.remove("jsidea-video-control__seekbar-thumb--dragging"),!this._videoControl.ready||e.pointers.length>0)return;const t=i(e.pointer.x)/100*this._videoControl.video.duration;this._videoControl.video.currentTime=t}),this._disposables.push(this._videoControl.onPlayFrame.add(()=>{!this._videoControl.ready||e.pointers.length>0||n()}))}preventIdle(){return this._actor.pointers.length>0}dispose(){super.dispose(),this._track=null,this._fill=null,this._fillRest=null,this._thumb=null,this._tooltip=null,this._tooltipLabel=null,this._actor.dispose(),this._actor=null}}class pi extends di{constructor(t){super(t),this._element.classList.add("jsidea-video-control__item--toggle-button"),this._videoControl.onStateChange.add(()=>{this.updateIcon()}),this.updateIcon(),this._disposables.push(u.on({type:"click",scope:this._button,listener:t=>{this._videoControl.video&&(this._videoControl.paused?this._videoControl.video.play():this._videoControl.video.pause())}}))}updateIcon(){this._videoControl.paused?this.icon="fas fa-play":this.icon="fas fa-pause"}}class mi extends di{constructor(t){super(t),this._element.classList.add("jsidea-video-control__item--volume-button"),this._videoControl.bindToVideo((t,e)=>{e.push(u.on({type:"volumechange",scope:t,listener:()=>{this.updateIcon()}}))}),this.updateIcon(),this._disposables.push(u.on({type:"click",scope:this._button,listener:t=>{this._videoControl.video&&(this._videoControl.video.muted=!this._videoControl.video.muted)}}))}updateIcon(){this._videoControl.video.muted||0===this._videoControl.video.volume?this.icon="fas fa-volume-mute":this.icon="fas fa-volume-up"}}class _i extends di{_container;constructor(t){super(t),this._container=t.container,this._element.classList.add("jsidea-video-control__item--fullscreen-button"),this._videoControl.onStateChange.add(()=>{this.updateIcon()}),this._disposables.push(Je.onChange.add(t=>{this.updateIcon()})),this.updateIcon(),this._disposables.push(u.on({type:"click",scope:this._button,listener:t=>{Je.isFullscreen&&Je.element===this._container?Je.exit():Je.enter(this._container)}}))}updateIcon(){const t=Je.isFullscreen&&Je.element===this._container;this._container.classList.toggle("jsidea-video-control-container--fullscreen",t),this.icon=t?"fas fa-compress":"fas fa-expand"}static get isSupported(){return Je.isSupported}}class gi{getMinX(t,e=t.scale){return t.contentWidth*e<t.width?bi.Center.getMinX(t,e):bi.Cover.getMinX(t,e)}getMaxX(t,e=t.scale){return t.contentWidth*e<t.width?bi.Center.getMaxX(t,e):bi.Cover.getMaxX(t,e)}getMinY(t,e=t.scale){return t.contentHeight*e<t.height?bi.Center.getMinY(t,e):bi.Cover.getMinY(t,e)}getMaxY(t,e=t.scale){return t.contentHeight*e<t.height?bi.Center.getMaxY(t,e):bi.Cover.getMaxY(t,e)}}class vi{getMinX(t,e=t.scale){return.5*(t.width-t.contentWidth*e)}getMaxX(t,e=t.scale){return.5*(t.width-t.contentWidth*e)}getMinY(t,e=t.scale){return.5*(t.height-t.contentHeight*e)}getMaxY(t,e=t.scale){return.5*(t.height-t.contentHeight*e)}}class fi{getMinX(t,e=t.scale){return t.contentWidth*e<t.width?0:t.width-t.contentWidth*e}getMaxX(t,e=t.scale){var i=t.contentWidth*e;return i<t.width?t.width-i:0}getMinY(t,e=t.scale){return t.contentHeight*e<t.height?0:t.height-t.contentHeight*e}getMaxY(t,e=t.scale){var i=t.contentHeight*e;return i<t.height?t.height-i:0}}class bi{static Center=new vi;static Auto=new gi;static Cover=new fi}class yi{maxScale;constructor(t=Number.MAX_VALUE){this.maxScale=t}getScale(t){var e=t.width/t.contentWidth,i=t.height/t.contentHeight;return Math.min(e,i,this.maxScale)}}class wi{getScale(t){var e=t.width/t.contentWidth,i=t.height/t.contentHeight;return Math.max(e,i)}}class xi{getScale(t){return t.width/t.contentWidth}}class Ti{getScale(t){return t.width/t.contentWidth}}class Ei{getScale(t){return t.scale}}class Si{getScale(t){return 1}}class Ci{getScale(t){return t.height/t.contentHeight}}class ji{static Contain=new yi;static ContainMaxOriginal=new yi(1);static Cover=new wi;static CoverWidth=new xi;static Letterbox=new Ti;static Pillarbox=new Ci;
1static None=new Ei;static Original=new Si}class Mi{getTransform(t,e,i){var s=t.containerToContent(.5*e,.5*i);return{scale:t.scale,x:.5*t.width-s.x*t.scale,y:.5*t.height-s.y*t.scale}}}class Li{maxScale;constructor(t=Number.MAX_VALUE){this.maxScale=t}getTransform(t,e,i){var s=Math.min(ji.Contain.getScale(t),this.maxScale);return{scale:s,x:.5*t.width-.5*t.contentWidth*s,y:.5*t.height-.5*t.contentHeight*s}}}class Oi{static Center=new Mi;static Contain=new Li;static ContainMaxOriginal=new Li(1)}class ki{apply(t,e,i){i.ctrlKey?Ii.Zoom.apply(t,e,i):Ii.Scroll.apply(t,e,i)}}class Ai{apply(t,e,i){var s=t.getTransformTarget();s.y-=100*e,t.setTransformClamped(s,.3)}}class Di{apply(t,e,i){var s=t.scaleTarget;s*=e<0?1.5:1/1.5,t.scaleAtGlobal(s,i.clientX,i.clientY,.3)}}class Ii{static Scroll=new Ai;static Zoom=new Di;static CtrlZoom=new ki}class Pi extends ti{isClick=!1;isDoubleClick=!1}class Ni extends ii{static DEFAULT={maxDistance:30,maxDoubleClickDistance:30,maxLifetime:1200,doubleClick:!1,doubleClickTime:400,repeatInterval:200,repeatStartTime:500,keyboardSupport:!1};onClick=d.create();onDoubleClick=d.create();onRepeat=d.create();maxLifetime;maxDistance;doubleClick;doubleClickTime;maxDoubleClickDistance;repeatInterval;repeatStartTime;keyboardSupport;repeatTimeout=0;clickTimeout=0;_onKeyUp=null;constructor(t=null,e=null){super(null,ei),this._onKeyUp=t=>this.onKeyDown(t),e!==ei&&this.setOptions(e),this.element=t;let i=0,s=0;var n=()=>{if(this.onRepeat){this.onRepeat.dispatch(++i,this),clearTimeout(this.repeatTimeout);var t=this.repeatStartTime;i>1&&(t=this.repeatInterval),this.repeatTimeout=setTimeout(()=>n(),t)}else clearTimeout(this.repeatTimeout)};this.onDown.add(t=>{s++,this.pointers.length>1||0==i&&n()}),this.onUp.add(t=>{this.pointers.length>0||(clearInterval(this.repeatTimeout),i=0)}),this.onClear.add(t=>{s=0});var a=NaN,o=NaN,r=NaN;this.onUp.add(t=>{if(0===this.count)if(s>1)a=NaN;else{var e=ii.lifetime(t);if((h=t[0]).distance<=this.maxDistance&&e<=this.maxLifetime)if(this.doubleClick)if(isNaN(a))a=h.x,o=h.y,r=(new Date).getTime(),clearTimeout(this.clickTimeout),this.clickTimeout=setTimeout(()=>{var e=h,i=t;this.onClick.dispatch(e,i,this),a=NaN},this.doubleClickTime+5);else{var i=h.x-a,n=h.y-o,l=Math.sqrt(i*i+n*n),c=(new Date).getTime()-r;if(clearTimeout(this.clickTimeout),c<=this.doubleClickTime&&l<this.maxDoubleClickDistance){for(var h of t)h.isDoubleClick=!0;this.pointer.isDoubleClick=!0,this.onDoubleClick.dispatch(h,t,this)}else this.onClick.dispatch(h,t,this);a=NaN}else h.isClick=!0,this.onClick.dispatch(h,t,this)}})}createPointer(){return new Pi}onChangeElement(t,e){e&&e.removeEventListener("keydown",this._onKeyUp),t&&t.addEventListener("keydown",this._onKeyUp)}onKeyDown(t){this.keyboardSupport&&j.is(t,j.ENTER,j.SPACE)&&(this.onClick.dispatch(this.pointer,this.pointers,this),this.onRepeat.dispatch(1,this))}setOptions(t){t=m({},Ni.DEFAULT,t),this.maxDistance=t.maxDistance,this.maxLifetime=t.maxLifetime,this.doubleClick=t.doubleClick,this.doubleClickTime=t.doubleClickTime,this.maxDoubleClickDistance=t.maxDoubleClickDistance,this.repeatInterval=t.repeatInterval,this.repeatStartTime=t.repeatStartTime,this.keyboardSupport=t.keyboardSupport,super.setOptions(t)}dispose(){this.onClick.dispose(),this.onClick=null,this.onDoubleClick.dispose(),this.onDoubleClick=null,this.onRepeat.dispose(),this.onRepeat=null,clearTimeout(this.clickTimeout),clearTimeout(this.repeatTimeout),this.element=null,super.dispose()}}class Ri{static DEFAULT_TRANSFORM_MODE=C;onTransform=d.create();onScale=d.create();onTranslate=d.create();onResize=d.create();onClick=d.create();onUserAction=d.create();element;elasticityX=0;elasticityY=0;elasticityScale=0;flingX=200;flingY=200;wheel=Ii.Zoom;resizeBehaviour=Oi.Center;limitX=bi.Auto;limitY=bi.Auto;minScale=ji.Contain;maxScale=ji.Original;tranformMode=C;pinch=!0;pan=!0;_viewContent=null;_container;_content;_matrix=new DOMMatrix;_scaleTarget=NaN;_xTarget=NaN;_yTarget=NaN;_lastWidth=0;_lastHeight=0;_lastX=0;_lastY=0;_lastScale=1;_tween=null;_clampOffsetX=0;_clampOffsetY=0;_clampOffsetScale=0;_pivotLocal=null;_distance=1;_distanceScale=1;_actor;_wheelListener;_resizeListener;_lastPointerUpTime=0;_onResize;constructor(t){t=m({doubleClickZoom:!0},t||{}),this.tranformMode=Ri.DEFAULT_TRANSFORM_MODE,this.element=document.createElement("div"),this.element.className="jsidea-scroll-view",this.element.innerHTML='<div class="jsidea-scroll-view-container"><div class="jsidea-scroll-view-content"></div></div>',this._container=this.element.querySelector(".jsidea-scroll-view-container"),this._container.tabIndex=0,this._content=this.element.querySelector(".jsidea-scroll-view-content"),this._actor=new Ni(this._container,{doubleClick:t.doubleClickZoom,preventDefault:!0}),this._wheelListener=t=>this.handleMouseWheel(t),this._resizeListener=()=>this.resize(),this._actor.onDoubleClick.add(this.handleDoubleClick,this),this._actor.onDown.add(this.handleDown,this),this._actor.onMove.add(this.handleMove,this),this._actor.onUp.add(this.handleUp,this),this._actor.onClick.add(t=>{this.onClick.dispatch(this,t),this.onUserAction.dispatch(this)}),this._container.addEventListener("wheel",this._wheelListener,{passive:!1}),this._onResize=A.create(this.element),this._onResize.add(this._resizeListener)}handleDoubleClick(t){var e=this.getMinScale(),i=this.getMaxScale(),s=this.scale-e<i-this.scale?i:e;this.scaleAtGlobal(s,t.x,t.y,.3),this.onUserAction.dispatch(this)}cancel(){this.killTween(),this._actor.cancel()}handleDown(t){this._content.classList.add("dragging"),this.killTween(),this.updatePivot(!1),this._actor.pointers.length>1&&(this._distance=this._actor.distance),this.onUserAction.dispatch(this)}handleMove(t){var e=this._actor.center,i=this.screenToContent(e.x,e.y),s=0,n=0;if(this.pan&&(s=i.x-this._pivotLocal.x,n=i.y-this._pivotLocal.y,this._matrix.translateSelf(s,n)),this.pinch&&this._actor.pointers.length>1){var a=this._distanceScale*(this._actor.distance/this._distance),o=this.clampScale(a,this.elasticityScale),r=this.scaleAtCalc(o,i.x+s,i.y+n,!1);this._matrix.m11=r.scale,this._matrix.m22=r.scale,this._matrix.m41=r.x,this._matrix.m42=r.y,this._clampOffsetScale=a-o}var l=this.clampX(this._matrix.m41,this._matrix.m11,this.elasticityX),c=this.clampY(this._matrix.m42,this._matrix.m11,this.elasticityY);if(this._clampOffsetX=this._matrix.m41-l,this._clampOffsetY=this._matrix.m42-c,this._matrix.m41=l,this._matrix.m42=c,this.updateTransform(),this.pan&&(!this.elasticityX||!this.elasticityY)){var h=this.screenToContent(e.x,e.y);this.elasticityX||(this._pivotLocal.x=h.x),this.elasticityY||(this._pivotLocal.y=h.y)}this.pinch&&!this.elasticityScale&&(this._distanceScale=this.scale,this._distance=this._actor.distance),this.onUserAction.dispatch(this)}handleUp(t){if(this.updatePivot(!0),this._actor.pointers.length>1&&(this._distance=this._actor.distance),0===this._actor.pointers.length){this._clampOffsetX=0,this._clampOffsetY=0,this._clampOffsetScale=0,this._content.classList.remove("dragging");var e=t[0];if(!e.isDoubleClick){var i=this.clampScale(this.scale),s=this.containerToContent(.5*this.width,.5*this.height),n=this.scaleAtCalc(i,s.x,s.y),a=.3;if(this.pan&&(this.flingX>0||this.flingY>0))if(Math.sqrt(e.velocityX*e.velocityX+e.velocityY*e.velocityY)>.1){var o=S.toLocalDelta(this._container,new DOMPoint(e.velocityX,e.velocityY,0),this.tranformMode);this.flingX>0&&(n.x=this.clampX(n.x+o.x*this.flingX,i)),this.flingY>
10&&(n.y=this.clampY(n.y+o.y*this.flingY,i)),a=.5}this.setTransform(n,a)}}this._lastPointerUpTime=(new Date).getTime(),this.onUserAction.dispatch(this)}updatePivot(t){if(this._actor.pointers.length>0){var e=this._actor.center;if(this._actor.pointers.length>1&&(this._distanceScale=this.scale,this._distance=this._actor.distance),t||this._actor.pointers.length>1){if(this.elasticityX>0||this.elasticityY>0){var i=S.toGlobalDelta(this.element,new DOMPoint(this._clampOffsetX,this._clampOffsetY,0),this.tranformMode);this.elasticityX>0&&(e.x-=i.x),this.elasticityY>0&&(e.y-=i.y)}this.elasticityScale>0&&(this._distanceScale+=this._clampOffsetScale)}this._pivotLocal=this.screenToContent(e.x,e.y)}}handleMouseWheel(t){try{t.preventDefault()}catch(t){}if(!(this._actor.pointers.length>0)){var e=t.deltaY<0?-1:1;this.wheel.apply(this,e,t),this.onUserAction.dispatch(this)}}scaleAtGlobal(t,e,i,s=0){var n=this.screenToContent(e,i);this.scaleAt(t,n.x,n.y,s)}scaleAt(t,e,i,s=0){this.setTransform(this.scaleAtCalc(t,e,i),s)}scaleAtCenter(t,e=.5,i=.5,s=0){this.setTransform(this.scaleAtCalc(t,this.contentWidth*e,this.contentHeight*i),s)}scaleAtCalc(t,e,i,s=!0){s&&(t=this.clampScale(t));var n=t/this.scale,a=DOMMatrix.fromMatrix(this._matrix);return a.translateSelf(e,i),a.scaleSelf(n,n),a.translateSelf(-e,-i),{scale:t,x:s?this.clampX(a.m41,t):a.m41,y:s?this.clampY(a.m42,t):a.m42}}lookAt(t,e,i=this.scale,s=0){i=this.clampScale(i),this.setTransform({scale:i,x:this.clampX(.5*this.width-t*i,i),y:this.clampY(.5*this.height-e*i,i)},s)}killTween(){this._tween&&(this._tween.kill(),this._tween=null)}getTransform(){return{scale:this.scale,x:this.x,y:this.y}}getTransformTarget(){return{scale:isNaN(this._scaleTarget)?this._matrix.m11:this._scaleTarget,x:isNaN(this._xTarget)?this._matrix.m41:this._xTarget,y:isNaN(this._yTarget)?this._matrix.m42:this._yTarget}}setTransformClamped(t,e=0){this.setTransform(this.clampTransform(t),e)}clampTransform(t){return t.scale=this.clampScale(t.scale),t.x=this.clampX(t.x,t.scale),t.y=this.clampY(t.y,t.scale),t}setTransform(t,e=0){this.killTween(),e<=0?(this._matrix.m11=t.scale,this._matrix.m22=t.scale,this._matrix.m41=t.x,this._matrix.m42=t.y,this.updateTransform()):(this._xTarget=t.x,this._yTarget=t.y,this._scaleTarget=t.scale,this._tween=gsap.to(this._matrix,{duration:e,m11:t.scale,m22:t.scale,m41:t.x,m42:t.y,onUpdate:()=>{this.updateTransform()},onComplete:()=>{this._tween=null,this._matrix.m11=t.scale,this._matrix.m22=t.scale,this._xTarget=NaN,this._yTarget=NaN,this._scaleTarget=NaN}}))}resize(){0===this._lastWidth&&(this._lastWidth=this.width,this._lastHeight=this.height);var t=this._lastWidth,e=this._lastHeight,i=this.resizeBehaviour.getTransform(this,t,e);this._lastWidth=this.width,this._lastHeight=this.height,i?this.setTransformClamped(i):(this.clamp(),this.updateTransform()),this.onResize.dispatch(this,t,e)}get x(){return this._matrix.m41}set x(t){t=this.clampX(t),this._matrix.m41!==t&&(this._matrix.m41=t,this.updateTransform())}get xTarget(){return isNaN(this._xTarget)?this.x:this._xTarget}get y(){return this._matrix.m42}set y(t){t=this.clampY(t),this._matrix.m42!==t&&(this._matrix.m42=t,this.updateTransform())}get yTarget(){return isNaN(this._yTarget)?this.y:this._yTarget}get scale(){return this._matrix.m11}set scale(t){t=this.clampScale(t),this._matrix.m11!==t&&(this._matrix.m11=t,this._matrix.m22=t,this.updateTransform())}get scaleTarget(){return isNaN(this._scaleTarget)?this.scale:this._scaleTarget}applyScale(t,e=0){var i=this.parseScaleLimit(t),s={scale:this.clampScale(i),x:this.clampX(this.x,i),y:this.clampY(this.y,i)};this.setTransform(s,e)}applyLimit(t,e=0){var i={scale:this.scale,x:this.clampX(a.clamp(this.x,t.getMinX(this,this.scale),t.getMaxX(this,this.scale))),y:this.clampY(a.clamp(this.y,t.getMinY(this,this.scale),t.getMaxY(this,this.scale)))};this.setTransform(i,e)}screenToContent(t,e){return S.toLocal(this._content,new DOMPoint(t,e),this.tranformMode)}contentToScreen(t,e){return S.toGlobal(this._content,new DOMPoint(t,e),this.tranformMode)}containerToContent(t,e){var i=(t-this.x)/this.scale,s=(e-this.y)/this.scale;return new DOMPoint(i,s)}contentToContainer(t,e){var i=t*this.scale+this.x,s=e*this.scale+this.y;return new DOMPoint(i,s)}updateTransform(){this._content.style.transform=this._matrix.toString();var t=this.getTransform();this.onTransform.dispatch(t);var e=this.scale;e!=this._lastScale&&(this._lastScale=e,this.onScale.dispatch(t));var i=this.x,s=this.y;i==this._lastX&&s==this._lastY||(this._lastX=i,this._lastY=s,this.onTranslate.dispatch(t))}hasOverflow(t=!1){return this.hasOverflowHorizontal(t)||this.hasOverflowVertical(t)}hasOverflowVertical(t=!1){return Math.floor(this.contentHeight*(t?this.scaleTarget:this.scale))-.01>this.height}hasOverflowHorizontal(t=!1){return Math.floor(this.contentWidth*(t?this.scaleTarget:this.scale))-.01>this.width}
1hasOverflowLeft(){return this.x<-.01}hasOverflowRight(){return this.x+this.contentWidth*this.scale-.01>this.width}hasOverflowTop(){return this.y<-.01}hasOverflowBottom(){return this.y+this.contentHeight*this.scale-.01>this.height}clamp(){this._matrix.m11=this.clampScale(this.scale),this._matrix.m22=this._matrix.m11,this._matrix.m41=this.clampX(this._matrix.m41,this._matrix.m11),this._matrix.m42=this.clampY(this._matrix.m42,this._matrix.m11)}clampScale(t,e=0){return e>=1?t:e>0?a.clampFade(t,this.getMinScale(),this.getMaxScale(),e):a.clamp(t,this.getMinScale(),this.getMaxScale())}getMaxScale(){return Math.max(this.parseScaleLimit(this.minScale),this.parseScaleLimit(this.maxScale))}getMinScale(){return Math.min(this.parseScaleLimit(this.minScale),this.parseScaleLimit(this.maxScale))}parseScaleLimit(t){return"number"==typeof t?t:t.getScale(this)}clampX(t,e=this.scale,i=0){return i>=1?t:i>0?a.clampFade(t,this.limitX.getMinX(this,e),this.limitX.getMaxX(this,e),i):a.clamp(t,this.limitX.getMinX(this,e),this.limitX.getMaxX(this,e))}clampY(t,e=this.scale,i=0){return i>=1?t:i>0?a.clampFade(t,this.limitY.getMinY(this,e),this.limitY.getMaxY(this,e),i):a.clamp(t,this.limitY.getMinY(this,e),this.limitY.getMaxY(this,e))}get content(){return this._viewContent}set content(t){this._viewContent!==t&&(this.killTween(),this._viewContent&&this._viewContent.element.remove(),this._viewContent=t,this._viewContent&&(this._content.style.width=this._viewContent.width+"px",this._content.style.height=this._viewContent.height+"px",this._content.appendChild(this._viewContent.element),this._matrix.m11=this.getMinScale(),this._matrix.m22=this._matrix.m11,this.clamp(),this.updateTransform()))}get width(){return this.element.offsetWidth||10}get height(){return this.element.offsetHeight||10}get contentWidth(){return this._viewContent?this._viewContent.width:0}get contentHeight(){return this._viewContent?this._viewContent.height:0}dispose(){this.killTween(),this.onScale.dispose(),this.onScale=null,this.onTransform.dispose(),this.onTransform=null,this.onTranslate.dispose(),this.onTranslate=null,this._container.removeEventListener("wheel",this._wheelListener),this._container=null,this._onResize.dispose(),this._actor.dispose(),this._onResize=null,this._actor=null,this._container=null,this._content=null,this._viewContent=null,this._matrix=null,this.element.remove()}}class Fi{static DEFAULT={minDistance:20,maxLifetime:600};onSwipe=d.create();minDistance;maxLifetime;_direction="left";_actor;constructor(t=null){this._actor=t?.actor||(t?.element?new ii(t?.element):null),this._actor?(t?.onSwipe&&this.onSwipe.add(t.onSwipe),t!==ei&&this.setOptions(t),this._actor.onUp.add(t=>{if(0===this._actor.count&&!this._actor.pointer.multitouch){var e=ii.lifetime(t),i=t[0];if(i.distance>=this.minDistance&&e<=this.maxLifetime){var s="left";s=Math.abs(i.moveX)>Math.abs(i.moveY)?i.x-i.originX>0?"right":"left":i.y-i.originY>0?"down":"up",this._direction=s,this.onSwipe.dispatch(s,this)}}})):console.error("Swipe: No actor or element provided for swipe detection.")}get direction(){return this._direction}setOptions(t){t=m({},Fi.DEFAULT,t),this.minDistance=t.minDistance,this.maxLifetime=t.maxLifetime}}const Ui={};const Yi=["administrator","editor","author","contributor","subscriber","none"];class qi{constructor(){let t=document.getElementById("jsidea-meta-config");if(!t&&window.top!==window.self)try{if(t=window.top.document.getElementById("jsidea-meta-config"),!t)throw new Error("Missing meta tag in window.top: #jsidea-meta-config")}catch(t){return void console.error(t)}if(window.top!==window.self&&!window.top.jsidea&&window.jsidea&&(window.top.jsidea=window.jsidea),t){try{jsidea.wp.config=JSON.parse(t.textContent)}catch(t){return jsidea.wp.config={},void console.error("Could not parse meta config json",t)}jsidea.wp.aria=new jsidea.AriaManager,jsidea.wp.user=new jsidea.WpUser,jsidea.wp.playerSync=new jsidea.PlayerSync,jsidea.wp.animation=new jsidea.AnimationView,jsidea.wp.adminBar=new jsidea.AdminBar,jsidea.wp.link=new jsidea.LinkSupport,jsidea.wp.config.showAdminBar&&jsidea.wp.adminBar.setReady(),this.addMediaBreakpointDebug(),this.addBlockTemplatesExport()}else console.error("Missing meta tag:","#jsidea-meta-config")}addBlockTemplatesExport(){const t=jsidea.wp.config;if(!t.isLocal||!t.blockTemplatesExportRestUrl)return;const e="Gutenberg-Templates aus der Datenbank ins Theme speichern und aus der Datenbank löschen";jsidea.wp.adminBar.add({key:"export-block-templates",icon:{default:"fal fa-file-export",progress:"fal fa-spinner fa-spin",success:"fal fa-check",warning:"fal fa-exclamation-triangle",errored:"fal fa-times"},tooltip:e,onClick:async i=>{if(!i.isBusy&&window.confirm("Alle Gutenberg-Templates und Template-Teile des aktiven Themes werden aus der Datenbank ins Theme geschrieben (templates/ und parts/) und anschlieÃend aus der Datenbank gelöscht.\n\nErst danach verwendet WordPress die Theme-Dateien.\n\nFortfahren?")){i.tooltip=e,i.state="progress";try{const e=await fetch(t.blockTemplatesExportRestUrl,{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":t.restNonce??"",Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({delete:!0})}),s=await e.json().catch(()=>null);if(!e.ok)throw new Error(s?.message??`HTTP error! status: ${e.status}`);const n=s?.written??[],a=s?.skipped??[],o=s?.deleted??[],r=s?.errors??[],l=s?.notices??[],c=[`Theme: ${s?.theme??"?"}`,`Geschrieben: ${n.length}`,`Unverändert: ${a.length}`,`Aus DB gelöscht: ${o.length}`];r.length&&c.push(`Fehler: ${r.length}`),l.length&&c.push(`Hinweise (theme.json): ${l.length}`),i.tooltip=c.join("\n"),console.groupCollapsed("[jsidea.core] [AdminBar] Block templates exported"),console.log("written",n),console.log("skipped",a),console.log("deleted",o),r.length&&console.warn("errors",r);for(const t of l)console.info(t.message);console.groupEnd(),i.setState(r.length?"errored":l.length?"warning":"success",4e3)}catch(t){console.error("[jsidea.core] [AdminBar] Block template export failed:",t),i.tooltip=`Export fehlgeschlagen: ${t instanceof Error?t.message:String(t)}`,i.setState("errored",6e3)}}}})}addMediaBreakpointDebug(){jsidea.wp.adminBar.add({key:"media-breakpoints",onInit:t=>{const e=["xs","s","m","l","xl","xxl"],i={};for(const t of e){const e=`--jsidea-bp--${t}`,s=getComputedStyle(document.documentElement).getPropertyValue(e).trim();let n=parseInt(s.replace("px",""));isNaN(n)?console.warn(`Could not parse breakpoint value for size ${t}: ${s}`):i[t]={start:n,end:0}}e.forEach((t,s)=>{const n=i[t];s<e.length-1?n.end=i[e[s+1]].start-1:n.end=1/0}
1);const s={};s.mobile={start:i.xs.start,end:i.s.start-1,icon:"fal fa-mobile",label:"Mobile"},s.landscape={start:i.s.start,end:i.m.start-1,icon:"fal fa-mobile fa-rotate-90",label:"Landscape"},s.tablet={start:i.m.start,end:i.l.start-1,icon:"fal fa-tablet",label:"Tablet"},s.desktop={start:i.l.start,end:1/0,icon:"fal fa-desktop",label:"Desktop"};let n=[];for(const t of e){const e=i[t];n.push(`${t.toUpperCase()}: ${e.start}px - ${e.end===1/0?"â":e.end+"px"}`)}for(const t in s){const e=s[t];n.push(`${t.charAt(0).toUpperCase()+t.slice(1)}: ${e.start}px - ${e.end===1/0?"â":e.end+"px"}`)}t.tooltip=n.join("\n");const a=["breakpoints","compact","icon","text"];let o=t.retrieve("mode")||"breakpoints";const r=()=>{let n,a=window.innerWidth,r="unknown";for(const t of e){const e=i[t];if(a>=e.start&&a<=e.end){r=t;break}}for(const t in s){const e=s[t];if(a>=e.start&&a<=e.end){n=e;break}}"breakpoints"===o?t.html=`${n.label}`:"compact"===o?t.html=`<span class="${n.icon}" title="${n.label}"></span> ${r.toUpperCase()}`:"icon"===o?t.html=`<span class="${n.icon}"></span>`:"text"===o?t.html=`${n.label} | ${r.toUpperCase()}`:(console.warn("Unknown mode for media breakpoint admin bar:",o),t.html=`${n.label}`)};r(),t.onClick.add(()=>{let e=a.indexOf(o);e=(e+1)%a.length,o=a[e],t.store("mode",o),r()}),window.addEventListener("resize",()=>{r()})}})}static get supported(){return document.body?document.body.classList.contains("jsidea-wp")||document.body.classList.contains("wp-admin")||document.body.classList.contains("block-editor-iframe__body"):(console.warn("Document body is not available, cannot determine if WordPress environment is supported."),!1)}}class Bi{static fromTo({targets:t,timeline:e,itemOptions:i},s,n){e.fromTo(t,s,{...n,stagger:i.stagging,duration:i.duration})}static register(t){t.register({key:"fade-in",title:"Fade In",create:t=>{Bi.fromTo(t,{opacity:0},{opacity:1,clearProps:"opacity"})}}),t.register({key:"fade-out",title:"Fade Out",create:t=>{Bi.fromTo(t,{opacity:1},{opacity:0})}}),t.register({key:"fade-up",title:"Fade Up",create:t=>{Bi.fromTo(t,{opacity:.15,transform:"none"},{opacity:1,transform:"translate3d(0, 32px, 0)",clearProps:"opacity,transform"})}}),t.register({key:"slide-up",title:"Slide Up",create:t=>{Bi.fromTo(t,{transform:"translate3d(0, 64px, 0)",opacity:0},{transform:"none",opacity:1,clearProps:"transform,opacity"})}}),t.register({key:"scale-up",title:"Scale Up",create:t=>{Bi.fromTo(t,{transform:"scale(0.9)",opacity:0}
1,{transform:"none",opacity:1,clearProps:"transform, opacity"})}}),t.register({key:"clip-path-inset",title:"Clip Path Inset",create:t=>{Bi.fromTo(t,{transform:"scale(0.8)",opacity:.3},{transform:"none",opacity:1,clearProps:"transform, opacity"})}}),t.register({key:"text-lines",title:"Text Lines (Experimental)",filter:({props:t})=>"jsidea/text-box"===t.name,create:({targets:t,timeline:e,itemOptions:i})=>{SplitText.create(t[0],{type:"chars, words",reduceWhiteSpace:!1,autoSplit:!0,onSplit:t=>e.from(t.chars,{duration:i.duration,stagger:i.stagging||.2,opacity:.25,clearProps:"opacity"})})}}),t.register({key:"line-stagging",title:"Line Stagging (Experimental)",filter:({props:t})=>"jsidea/text-box"===t.name,create:({targets:t,timeline:e,itemOptions:i})=>{var s=0;SplitText.create(t[0],{type:"lines",reduceWhiteSpace:!1,autoSplit:!0,onSplit:t=>{const n=e.getById("p-");n&&e.remove(n);var a=e.fromTo(t.lines,{id:"p-",rotationX:-100,transformOrigin:"50% 50% -30px",opacity:0},{duration:i.duration,stagger:i.stagging||.2,rotationX:0,transformOrigin:"50% 50% 0px",opacity:1,ease:"power2.inOut",onUpdate:()=>{a&&(s=a.progress())},onComplete:()=>{i.once&&t.revert()}},0);let o=s;a.progress(0),a.progress(o)}})}})}}class Xi{isReady=!0;onReady=jsidea.Signal.create();onEnterFrame=jsidea.Signal.create();_timeline;_controller;_element;_completed=0;_progress=0;constructor(t,e,i){this._element=t,i=jsidea.merge({name:"fade-in",once:!0,stagging:0,start:0,end:1,duration:"0.7s",timeline:null,scrollView:null},i),i?.once&&"viewport-in"!==i?.timeline?.kind&&(i.once=!1);let s=[t];i.stagging?(s=Array.from(t.querySelectorAll(".jsidea-animation--stagging")),0===s.length&&(console.warn("Stagging is enabled but no elements with class .jsidea-animation--stagging found. Falling back to single element."),s=[t])):i.stagging=void 0;let n=.7;i.duration&&(n=parseFloat(i.duration),i.duration.endsWith("ms")&&(n/=1e3)),this._timeline=e.create(i.name||"fade-in",s,{...i,stagging:i.stagging,duration:n}),i.stagging&&(n+=i.stagging*(s.length-1)),this._controller=new jsidea.PlayerController({once:i.once,start:i.start,end:i.end,duration:n,loop:!1,scrollView:i.scrollView,timeline:i.timeline,player:this,element:t})}get progress(){return this._progress}set progress(t){t=jsidea.Calc.clamp(t,0,1),this._progress!==t&&(this._progress=t,this._element.style.setProperty("--jsidea-animation--progress",t.toString()),this._timeline&&this._timeline.timeline.progress(t,!1),this.onEnterFrame.dispatch(this),t>=1&&(this._completed++,this._completed))}dispose(){this._controller.dispose(),this._controller=null,this._timeline&&this._timeline.dispose(),this._timeline=null}}var Hi={__proto__:null,ADMIN_BAR_ITEM_STATES:w,Actor:ii,ActorNonOptions:ei,AdminBar:class{_element;_windows;_barWrapper;_bar;_ready=!1;_options=[];_usedKeys=new Set;constructor(){this._element=document.createElement("div"),this._element.classList.add("jsidea-admin-bar"),this._element.setAttribute("data-prevent-inert","true"),this._windows=document.createElement("div"),this._windows.classList.add("jsidea-admin-bar__windows"),this._element.appendChild(this._windows),this._barWrapper=document.createElement("div"),this._barWrapper.classList.add("jsidea-admin-bar__bar-wrapper"),this._element.appendChild(this._barWrapper),this._bar=document.createElement("div"),this._bar.classList.add("jsidea-admin-bar__bar"),this._barWrapper.appendChild(this._bar);const t=document.createElement("button");t.type="button",t.classList.add("jsidea-admin-bar__toggle"),t.setAttribute("aria-label","Admin-Leiste umschalten"),this._barWrapper.appendChild(t),this._element.classList.toggle("jsidea-admin-bar--expanded","1"===localStorage.getItem("jsidea-admin-bar-expanded"));const e=()=>{const e=this._element.classList.contains("jsidea-admin-bar--expanded"),i=e?"fa-chevron-left":"fa-chevron-right";t.innerHTML=`<span class="fal ${i}" aria-hidden="true"></span>`,t.setAttribute("aria-expanded",e?"true":"false")};t.addEventListener("click",()=>{this._element.classList.toggle("jsidea-admin-bar--expanded"),e(),localStorage.setItem("jsidea-admin-bar-expanded",this._element.classList.contains("jsidea-admin-bar--expanded")?"1":"0")}),e(),new T(this)}setReady(){if(!this._ready){this._ready=!0;for(const t of this._options)this.createItem(t);this._options=[],document.body.appendChild(this._element)}}add(t){this._usedKeys.has(t.key)?console.warn(`[jsidea.core] [AdminBar] Item with key "${t.key}" already exists in the admin bar. Skipping duplicate.`):(this._usedKeys.add(t.key),this._ready?this.createItem(t):this._options.push(t))}has(t){return this._usedKeys.has(t)}createItem(t){const e=new x(t);this._bar.appendChild(e.element)}},AdminBarItem:x,AnimationView:class{registrations={};constructor(){console.log("[jsidea.core]","[AnimationView]"),Bi.register(this),window.dispatchEvent(new CustomEvent("jsidea-register-animation",{bubbles:!1,cancelable:!1,detail:{view:this}})),jsidea.wp.config.isAdmin||jsidea.component.register({selector:"[data-jsidea-animation]",callback:t=>
1{const e=jsidea.merge({name:"fade-in",once:!0,stagging:0,start:0,end:1},JSON.parse(t.getAttribute("data-jsidea-animation")));new Xi(t,this,e),t.classList.add("jsidea-animation--ready")}})}register(t){this.registrations[t.key]=t}create(t,e,i){let s=gsap.timeline();return s.pause(),this.registrations[t]?(this.registrations[t].create({targets:Array.isArray(e)?e:[e],timeline:s,itemOptions:i}),{timeline:s,dispose:()=>{s.kill(),s=null,this.registrations[t]&&"function"==typeof this.registrations[t].dispose&&this.registrations[t].dispose({targets:Array.isArray(e)?e:[e],timeline:s,itemOptions:i})}}):(console.warn(`Animation "${t}" not found.`),null)}},AriaManager:class{constructor(){this.handleButtonRole()}handleButtonRole(){u.on({type:"keydown",selector:'[data-jsidea-role="button"]',listener:t=>{if(j.is(t.event,j.ENTER,j.SPACE)){const e=t.target.getBoundingClientRect(),i=e.left+e.width/2,s=e.top+e.height/2;t.target.dispatchEvent(new MouseEvent("click",{bubbles:!0,ctrlKey:t.event.ctrlKey,shiftKey:t.event.shiftKey,altKey:t.event.altKey,metaKey:t.event.metaKey,view:t.event.view,detail:0,screenX:i,screenY:s,clientX:i+(window.pageXOffset||document.documentElement.scrollLeft),clientY:s+(window.pageYOffset||document.documentElement.scrollTop)}))}}})}},Calc:a,Click:Ni,Ease:M,Idle:ni,IdleClass:si,KeyCode:j,Language:b,LinkSupport:class{constructor(){u.on({type:"keydown",scope:document,passive:!1,selector:".jsidea-link-support",listener:t=>{!t.event.repeat&&j.is(t.event,j.ENTER,j.SPACE)&&(t.event.preventDefault(),t.target.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0,ctrlKey:t.event.ctrlKey,shiftKey:t.event.shiftKey,metaKey:t.event.metaKey,altKey:t.event.altKey})))}}),u.on({type:"click",scope:document,selector:".jsidea-link-support",listener:t=>{const e=t.target,i=e.getAttribute("data-href"),s=t.event.ctrlKey?"_blank":e.getAttribute("data-target")||"_self",n=e.getAttribute("data-rel")||"";i?window.open(i,s,n):console.warn("LinkSupport: Missing href attribute")}})}},List:class{_height;_offset;_element=null;_provider=null;_content;_buffer=[];_visible=!0;_onResize;_scrollListener=null;_dataVisible=new Map;_filter=t=>t.visible;_reducedMotion;constructor(t,e=null,i=0){this._height=t,this._offset=i,this._content=document.createElement("div"),this._content.classList.add("jsidea-list-content"),this._onResize=A.create(),this._onResize.add(()=>{this.update()}),this._reducedMotion=window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null,this.element=e}get visible(){return this._visible}set visible(t){this._visible!==t&&(this._visible=t,this._content.classList.toggle("jsidea-hidden",!t),t&&this.update())}scrollTo(t,e={}){if(!(this._visible&&t&&this._element&&this._provider&&this._dataVisible.get(t.id)))return;const i=this.getDataList().indexOf(t);if(-1===i)return void console.warn("You cannot scroll to an element which is not part of the provider items.");let s=e.align||"auto";const n=void 0===e.tween?0:e.tween,a=void 0===e.ifNeeded||e.ifNeeded,o=void 0===e.marginTop?0:e.marginTop,r=void 0===e.marginBottom?0:e.marginBottom,l=i*this._height-o+this._content.offsetTop-this._element.scrollTop,c=this._element.clientHeight-(r+(i+1)*this._height+this._content.offsetTop-this._element.scrollTop);if(a&&l>=0&&c>=0)return;let h;"auto"===s&&(s=l<0?"top":"bottom"),"top"===s?h=i*this._height+this._content.offsetTop-o:"bottom"===s&&(h=i*this._height+this._content.offsetTop,h-=this._element.clientHeight-this._height-r),this.scrollTop(h,n)}scrollTop(t,e=0){this._visible&&this._element&&(t=a.clamp(t,0,this._element.scrollHeight-this._element.clientHeight),e>0&&this._reducedMotion&&this._reducedMotion.matches&&(e=0),e<=0?this._element.scrollTop=t:gsap.to(this._element,{duration:e,scrollTop:t}))}refresh(){for(var t of this._buffer)t.index=-1,t.element&&t.element.remove();if(this._dataVisible.clear(),this._provider&&"function"!=typeof this._filter)for(let t of this._provider.dataList)this._dataVisible.set(t.id,!0);else if(this._provider&&"function"==typeof this._filter)for(let t of this._provider.dataList)this._dataVisible.set(t.i
1d,this._filter(t));this.update()}setFilter(t){this._filter=t,this.refresh()}updateData(t){if(t)for(var e of("function"==typeof this._filter?this._dataVisible.set(t.id,this._filter(t)):this._dataVisible.set(t.id,!0),this._buffer))e.data===t&&this._provider.update(e.data,e.visual)}getDataList(){var t=[];for(var e of this._provider.dataList)this._dataVisible.get(e.id)&&t.push(e);return t}get height(){return this._height}set height(t){this._height!=t&&(this._height=t,this.refresh())}update(){if(!this._visible||!this._element||!this._provider)return void(this._content.style.height="0");const t=this.getDataList(),e=t.length*this._height;this._content.style.height=e+this._offset+"px";const i=Math.ceil(this._element.offsetHeight/this._height)+2+2;if(this._buffer.length<i){const t=i-this._buffer.length;for(let e=0;e<t;++e){const t=document.createElement("div");t.classList.add("jsidea-list-item");const e={element:t},i={visual:e,index:-1,element:t,data:null};this._provider.prepare(e),this._buffer.push(i)}}let s=Math.floor(a.clampMin(this._element.scrollTop-this._content.offsetTop,0)/this._height),n=a.clamp(s+(i-3),0,t.length-1);s=a.clampMin(s-1,0),n=a.clampMax(n+1,t.length-1);for(let t of this._buffer)-1!==t.index&&(t.index<s||t.index>n)&&(t.element.remove(),t.index=-1,t.data=null);let o=0;for(let e=s;e<=n;++e){if(!t[e]){console.warn(`Data list lookup for data-index ${e} failed.`);continue}const i=this.getDataLookup(e);i?(-1===i.index&&(i.data=t[e],i.element.style.top=e*this._height+"px",i.index=e,this._provider.update(i.data,i.visual),o>=this._content.children.length?this._content.appendChild(i.element):this._content.insertBefore(i.element,this._content.children[o])),o++):console.warn(`Data lookup for data-index ${e} failed.`)}}getDataLookup(t){for(let e of this._buffer)if(e.index===t)return e;for(let t of this._buffer)if(-1===t.index)return t;return null}get element(){return this._element}set element(t){this._element!==t&&(this._scrollListener&&(this._scrollListener.dispose(),this._scrollListener=null),this._element&&(this._element.classList.remove("jsidea-list"),this._content.remove()),this._element=t,this._element&&(this._element.classList.add("jsidea-list"),this._element.appendChild(this._content),this._scrollListener=u.on({type:"scroll",passive:!0,scope:this._element,listener:t=>{this.update()}}),this.refresh()),this._onResize.element=t)}get provider(){return this._provider}set provider(t){this._provider!==t&&(this._provider=t,this.refresh())}get contentElement(){return this._content}},Modal:ze,PlayerController:class{isReady=!0;onReady=d.create();onEnterFrame=d.create();_player;_timeline;_element;_scrollView;_once;_loop;_progress=0;_disposables=[];_start;_end;_duration;constructor(t){const{player:e,timeline:i,element:s,scrollView:n,once:a}=t;if(this._once=a,this._player=e,this._timeline=i||{kind:"viewport-in",name:""},this._element=s,this._scrollView=n,this._start=void 0===t.start?0:t.start,this._end=void 0===t.end?1:t.end,this._duration=t.duration||1,this._loop=t.loop||!1,"scroll"===i?.kind||"scroll-self"===i?.kind)this.setScrollTimeline();else if("viewport-in"===i?.kind)this.setViewportIn();else{if("image-sequence"!==i?.kind&&"lottie"!==i?.kind)return void console.warn(`Unsupported timeline kind "${i?.kind}".`);this.setSyncPlayer()}}get progress(){return this._progress}set progress(t){this.setProgress(t)}setProgress(t){if(this._progress=a.clamp(t,0,1),this._player.isReady)if(0===this._start&&1===this._end)this._player.progress=t;else{const e=this._end-this._start,i=(t-this._start)/e,s=a.clamp(i,0,1);this._player.progress=s}this.onEnterFrame.dispatch(this)}setSyncPlayer(){this._player;const t=this._timeline;this._disposables.push(Ui.playerSync.registerConsumer({guid:t.guid,kind:t.kind,onInit:t=>{t.isReady?this.setProgress(t.progress):this._disposables.push(t.onReady.once(()=>{this.setProgress(t.progress)}))},onProgress:(t,e)=>{this.setProgress(e)},onDispose:()=>{this.dispose()}}))}setViewportIn(){const t=this._element,e=this._player,i=this._once,s=this._loop,n=this._duration,a=gsap.to(this,{duration:n,ease:"none",onUpdate:()=>{this.setProgress(a.progress())},onComplete:()=>{if(i&&!s)return this.setProgress(1),void this.dispose();s?a.restart():a.pause()}});a.pause(),this._disposables.push({dispose:()=>{a.kill()}});let o=!1;const r=()=>{e.isReady&&(o?s||i?a.play():i||a.play(0,!0):s?a.pause():i?(this.setProgress(1),this.dispose()):i||(this.setProgress(0),a.pause(0,!0)))};this._disposables.push(e.onReady.add(()=>{o&&r()}));const l=new IntersectionObserver(t=>{o!=t[0].isIntersecting&&(o=t[0].isIntersecting,r())});l.observe(t),this._disposables.push({dispose:()=>{l.disconnect()}})}setScrollTimeline(){const t=this._element,e=this._player,i=this._timeline,s=this._scrollView;let n;if("scroll-self"===i.kind?n=t:"scroll"===i.kind&&(n=t.ownerDocument.querySelector(`.jsidea-scroll-timeline--${i.guid}`)),!n)return void console.warn(`No target found for play controller "${i?.guid}".`);const a=s,o=new Ke({target:n,rangeStart:a?.rangeStart,rangeEnd:a?.rangeEnd,onUpdate:t=>{this.setProgress(t.ratio)}});this._disposables.push(e.onReady.add(()=>{e.progress=o.ratio})),this._disposables.push(o)}
1dispose(){this._disposables&&(this._disposables.forEach(t=>t.dispose()),this._disposables=null,this._element=null,this._player=null,this._scrollView=null,this._timeline=null)}},PlayerSync:class{_players=new Map;_consumers=new Map;registerPlayer(t){if(!t.guid)return console.error("Player guid is required."),null;if(!t.kind)return console.error("Player kind is required."),null;const e=t.kind+"|"+t.guid;if(this._players.has(e))return console.error(`Player with key ${e} already registered.`),null;if(this._players.set(e,t),this._consumers.has(e)){const i=this._consumers.get(e);for(const e of i)e?.onInit&&e.onInit(t.player),e?.onProgress&&t.player.isReady&&e.onProgress(t.player,t.player.progress)}const i=t.player.onEnterFrame.add(()=>{if(!this._consumers.has(e))return;const i=this._consumers.get(e);for(const e of i)t.player.isReady&&e?.onProgress&&e.onProgress(t.player,t.player.progress)});return{dispose:()=>{i.dispose();const s=this._consumers.get(e);if(s)for(const e of s.slice())e?.onDispose&&e.onDispose(t.player);this._players.delete(e)}}}registerConsumer(t){if(!t.guid)return console.error("Consumer guid is required."),null;if(!t.kind)return console.error("Consumer kind is required."),null;const e=t.kind+"|"+t.guid;this._consumers.has(e)||this._consumers.set(e,[]);if(this._consumers.get(e).push(t),this._players.has(e)){const i=this._players.get(e);t?.onInit&&t.onInit(i.player),i.player.isReady&&t?.onProgress&&t.onProgress(i.player,i.player.progress)}return{dispose:()=>{const i=this._consumers.get(e);if(!i)return;const s=i.indexOf(t);s>=0&&i.splice(s,1),0===i.length&&this._consumers.delete(e)}}}},Pointer:ti,PointerInfoClick:Pi,get PointerState(){return Ze},get PointerType(){return Qe},Resize:A,ResizeSignal:D,ScrollView:Ri,ScrollViewLimit:bi,ScrollViewLimitAuto:gi,ScrollViewLimitCenter:vi,ScrollViewLimitCover:fi,ScrollViewResize:Oi,ScrollViewResizeCenter:Mi,ScrollViewResizeContain:Li,ScrollViewScale:ji,ScrollViewScaleContain:yi,ScrollViewScaleCover:wi,ScrollViewScaleCoverWidth:xi,ScrollViewScaleNone:Ei,ScrollViewScaleOriginal:Si,ScrollViewWheel:Ii,ScrollViewWheelScroll:Ai,ScrollViewWheelZoom:Di,Signal:d,Slot:r,SlotDebounce:l,SlotNextFrame:c,SlotThrottle:h,Swipe:Fi,TabTrap:O,Text:o,Tick:ai,Transform:S,TransformModeInject:E,TransformModeRectangle:C,VideoControl:class{onStateChange=d.create();onPlayFrame=d.create();onTimeUpdate=d.create();_video=null;_element;_controlBar;_disposablesForVideo=[];_disposables=[];_items=[];_bindings=[];_tickSlot=null;_handleTick=!1;constructor(t){t=m({autoHide:!0,clickToggle:!0,visualPlayButton:!1,playButton:!0,controls:{toggleButton:!0,seekbar:!0,duration:!0,volumeButton:!0,fullscreen:!0}},t),this._element=document.createElement("div"),this._element.className="jsidea-video-control";const e=document.createElement("div");if(e.className="jsidea-video-control__background",this._element.appendChild(e),t.clickToggle){const t=document.createElement("button");t.className="jsidea-video-control__pause-layer",t.setAttribute("data-action","pause-layer"),t.setAttribute("aria-label","Video pausieren"),t.tabIndex=-1,e.appendChild(t);const i=document.createElement("button");i.className="jsidea-video-control__play-layer",i.setAttribute("data-action","play-layer"),i.tabIndex=-1,i.setAttribute("aria-label","Video abspielen"),e.appendChild(i)}if(t.playButton){const t=document.createElement("button");t.className="jsidea-video-control__play-button",t.setAttribute("data-action","play"),t.setAttribute("aria-label","Video abspielen"),t.innerHTML='<span class="jsidea-video-control__play-icon fa fa-play"></span>',e.appendChild(t)}if(t.visualPlayButton){const t=document.createElement("button");t.className="jsidea-video-control__play-button jsidea-video-control__play-button--visual",t.innerHTML='<span class="jsidea-video-control__play-icon fa fa-play"></span>',e.appendChild(t)}if(this._controlBar=document.createElement("div"),this._controlBar.className="jsidea-video-control__bar",this._controlBar.classList.add("jsidea-gallery--no-drag"),this._element.appendChild(this._controlBar),t.container.classList.add("jsidea-video-control-container"),this.onStateChange.add(()=>{this.handleTick(!this.paused)}),this.video=t.video,(!0===t.controls||!1!==t.controls&&t.controls.toggleButton)&&this.addItem(new pi({videoControl:this})),(!0===t.controls||!1!==t.controls&&t.controls.seekbar)&&this.addItem(new ui({videoControl:this})),(!0===t.controls||!1!==t.controls&&t.controls.duration)&&this.addItem(new ci({videoControl:this})),(!0===t.controls||!1!==t.controls&&t.controls.volumeButton)&&this.addItem(new mi({videoControl:this})),(!0===t.controls||!1!==t.controls&&t.controls.fullscreen&&_i.isSupported)&&this.addItem(new _i({videoControl:this,container:t.container||document.body})),t.autoHide){this._controlBar.classList.add("jsidea-video-control__bar--auto-hide");let e=!1;const i=()=>!!e||(null!==t.container.querySelector("*:focus-visible")||!!this._items.some(t=>t.preventIdle())),s=new si({scope:t.container,duration:3,preventIdle:i});this._disposables.push(s),u.on({type:["mouseenter"],scope:this._controlBar,capture:!1,disposables:this._disposables,listener:()=>{e=!0}}),u.on({type:["mouseleave"],scope:this._controlBar,capture:!1,disposables:this._disposables,listener:()=>{e=!1}}),u.on({type:["mouseleave"],scope:this._element,capture:!1,disposables:this._disposables,listener:()=>{i()||s.idle()}}),s.onIdle.add(()=>{this._controlBar.classList.toggle("jsidea-video-control__bar--visible",!1)}),s.onReset.add(()=>{this._controlBar.classList.toggle("jsidea-video-control__bar--visible",!0)})}t.container.appendChild(this._element);const i=this._controlBar.children.length>0;i?u.on({type:"pointerdown",scope:this._element,selector:'[data-action="play-layer"]',disposables:this._disposables,listener:e=>{0===e.event.button&&("mouse"!==e.event.pointerType&&t.autoHide&&!this._controlBar.classList.contains("jsidea-video-control__bar--visible")||this._video.play())}}
1):u.on({type:"click",scope:this._element,selector:'[data-action="play-layer"]',disposables:this._disposables,listener:t=>{this._video.play()}}),u.on({type:"click",scope:this._element,selector:'[data-action="play"]',disposables:this._disposables,listener:t=>{this._video.play()}}),i?u.on({type:"pointerdown",scope:this._element,selector:'[data-action="pause-layer"]',disposables:this._disposables,listener:e=>{0===e.event.button&&("mouse"!==e.event.pointerType&&t.autoHide&&!this._controlBar.classList.contains("jsidea-video-control__bar--visible")||this._video.pause())}}):u.on({type:"click",scope:this._element,selector:'[data-action="pause-layer"]',disposables:this._disposables,listener:t=>{this._video.pause()}}),u.on({type:"click",scope:this._element,selector:'[data-action="pause"]',disposables:this._disposables,listener:t=>{this._video.pause()}})}bindToVideo(t){return this._bindings.push(t),this._video&&t(this._video,this._disposablesForVideo),{dispose:()=>{const e=this._bindings.indexOf(t);-1!==e&&this._bindings.splice(e,1)}}}get element(){return this._element}get video(){return this._video}set video(t){if(this._video!==t){if(this._video=t,this._disposablesForVideo.forEach(t=>t.dispose()),this._disposablesForVideo.length=0,this._video?(this.paused=this._video.paused,this.ended=this._video.ended,this.waiting=this._video.readyState<2,this._disposablesForVideo.push(u.on({type:"play",scope:this._video,listener:()=>{this.paused=!1,this.ended=!1}}),u.on({type:"pause",scope:this._video,listener:()=>{this.paused=!0,this.ended=!1}}),u.on({type:"ended",scope:this._video,listener:()=>{this.paused=!0,this.ended=!0}}),u.on({type:"waiting",scope:this._video,listener:()=>{this.waiting=!0}}),u.on({type:"error",scope:this._video,listener:()=>{this.ended=!0,this.paused=!0,this.waiting=!1,console.error("Video error:",this._video.error)}}),u.on({type:"canplay",scope:this._video,listener:()=>{this.waiting=!1,this.ready=!0}}),u.on({type:"timeupdate",scope:this._video,listener:()=>{this.onTimeUpdate.dispatch()}}))):(this.ready=!1,this.paused=!1,this.ended=!1,this.waiting=!1),this._video)for(const t of this._bindings)t(this._video,this._disposablesForVideo);this.handleTick(!this.paused)}}handleTick(t){this._handleTick!==t&&(this._handleTick=t,this._tickSlot&&(this._tickSlot.dispose(),this._tickSlot=null),t&&(this.onPlayFrame.dispatch(),this._tickSlot=ai.add(()=>{this.onPlayFrame.dispatch()})))}get paused(){return this.hasState("paused")}set paused(t){this.paused!==t&&this.toggleState("paused",t)}get ended(){return this.hasState("ended")}set ended(t){this.ended!==t&&this.toggleState("ended",t)}get waiting(){return this.hasState("waiting")}set waiting(t){this.waiting!==t&&this.toggleState("waiting",t)}get ready(){return this.hasState("ready")}set ready(t){this.ready!==t&&this.toggleState("ready",t)}hasState(t){return this._element.classList.contains(`jsidea-video-control--${t}`)}toggleState(t,e){this._element.classList.toggle(`jsidea-video-control--${t}`,e),this.onStateChange.dispatch()}addItem(...t){for(const e of t)this._controlBar.appendChild(e.element),this._items.push(e)}dispose(){this.video=null,this.handleTick(!1),this._tickSlot&&(this._tickSlot.dispose(),this._tickSlot=null),this._controlBar.remove(),this._controlBar=null,this.onStateChange.dispose(),this.onStateChange=null,this.onPlayFrame.dispose(),this.onPlayFrame=null,this.onTimeUpdate.dispose(),this.onTimeUpdate=null,this._bindings.length=0,this._bindings=null,this._disposablesForVideo=null,this._items.forEach(t=>t.dispose()),this._items.length=0,this._items=null,this._disposables.forEac
1h(t=>t.dispose()),this._disposables=null}},ViewTimeline:Ke,WordPressHook:qi,WpUser:class{hasRole(t){return"none"===t||-1!==Ui.config.userRoles.indexOf(t)}hasRoleMin(t){const e=Yi.indexOf(this.role),i=Yi.indexOf(t);return-1===i?(console.warn(`Could not check if user is role "${t}". The role "${t}" is unknown.`),!1):e<=i}hasCap(t){return this.hasRoleMin(t)}exists(){return Ui.config.userRoles.length>0}get role(){const t=Ui.config.userRoles;for(const e of Yi)if(-1!==t.indexOf(e))return e;return"none"}},component:n,event:u,fileSaver:f,isLiteral:g,lang:y,merge:m,mergeShallow:function(...t){const e={};for(let i=0;i<t.length;i++)if(t[i])for(let s in t[i])void 0!==t[i][s]&&t[i].hasOwnProperty(s)&&(e[s]=t[i][s]);return e},modal:Ge,on:p,ready:s,tabTrap:k,uid:function(){var t=46656*Math.random()|0,e=46656*Math.random()|0;return("000"+t.toString(36)).slice(-3)+("000"+e.toString(36)).slice(-3)},viewportSize:I,wait:function(t){return new Promise(e=>{setTimeout(()=>{e()},t)})},wp:Ui};window.jsidea=Hi,s(()=>{window.jsideaWphook?console.warn("jsidea hook already executed"):(document.addEventListener("load",t=>{t.target instanceof HTMLImageElement&&t.target.classList.add("jsidea--loaded")},!0),document.querySelectorAll("img").forEach(t=>{t.complete&&t.classList.add("jsidea--loaded")}),qi.supported&&new qi)})}(); 2//# sourceMappingURL=core.umd.bundle.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.