/*
* Copyright (C) 2016-2023 Jones Magloire @Joxit
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* @license AGPL
*/
!function(){"use strict";
/* Riot WIP, @license MIT */var e=new Map,t=Symbol("riot-component"),r=new Set,a="is",n="mount",o="update",i="unmount",s="shouldUpdate",l="onBeforeMount",u="onMounted",p="onBeforeUpdate",c="onUpdated",d="onBeforeUnmount",m="onUnmounted",h="props",g="state",v="slots",f="root",y=Symbol("pure"),x=Symbol("is_updating"),b=Symbol("parent"),T=Symbol("attributes"),A=Symbol("template");function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r3?(n=h===a)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=m&&((n=r<2&&ma||a>h)&&(o[4]=r,o[5]=a,d.n=h,s=0))}if(n||r>1)return i;throw c=!0,a}return function(n,p,h){if(u>1)throw TypeError("Generator is already running");for(c&&1===p&&m(p,h),s=p,l=h;(t=s<2?e:l)||!c;){o||(s?s<3?(s>1&&(d.n=-1),m(s,l)):d.n=l:d.v=l);try{if(u=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(c=d.n<0)?l:r.call(a,d))!==i)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:c}}}(r,n,o),!0),u}var i={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var p=[][a]?t(t([][a]())):(_(t={},a,function(){return this}),t),c=u.prototype=s.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_(e,n,"GeneratorFunction")),e.prototype=Object.create(c),e}return l.prototype=u,_(c,"constructor",u),_(u,"constructor",l),l.displayName="GeneratorFunction",_(u,n,"GeneratorFunction"),_(c),_(c,n,"Generator"),_(c,a,function(){return this}),_(c,"toString",function(){return"[object Generator]"}),(j=function(){return{w:o,m:d}})()}function _(e,t,r,a){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}_=function(e,t,r,a){function o(t,r){_(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!a,configurable:!a,writable:!a}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},_(e,t,r,a)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function G(e,t){return w(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(l=(a=o.call(r)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){u=!0,n=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return s}}(e,t)||F(e,t)||D()}function V(e){return w(e)||O(e)||F(e)||D()}function z(e){return function(e){if(Array.isArray(e))return E(e)}(e)||O(e)||F(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function F(e,t){if(e){if("string"==typeof e)return E(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}function X(e){var t="function"==typeof Map?new Map:void 0;return X=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return C(e,arguments,N(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,e)},X(e)}function W(){W=function(e,t){return new r(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function r(e,a,n){var o=RegExp(e,a);return t.set(o,n||t.get(e)),P(o,r.prototype)}function a(e,r){var a=t.get(r);return Object.keys(a).reduce(function(t,r){var n=a[r];if("number"==typeof n)t[r]=e[n];else{for(var o=0;void 0===e[n[o]]&&o+1]+)(>|$)/g,function(e,t,r){if(""===r)return e;var a=o[t];return Array.isArray(a)?"$"+a.join("$"):"number"==typeof a?"$"+a:""}))}if("function"==typeof n){var i=this;return e[Symbol.replace].call(this,r,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(a(e,i)),n.apply(this,e)})}return e[Symbol.replace].call(this,r,n)},W.apply(this,arguments)
/* Riot WIP, @license MIT */}var q=1,K=4,J={ATTRIBUTE:0,EVENT:q,TEXT:2,VALUE:3,REF:K};function Y(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function Q(e,t){throw new Error(e,{cause:t})}function Z(e){var t=this,r=new Map,a=function(a){return(r.has(a)||r.set(a,e.call(t,a)))&&r.get(a)};return a.cache=r,a}function ee(e){return e.reduce(function(e,t){var r=t.value,a=t.type;switch(!0){case t.type===K:break;case!t.name&&0===a:return L(L({},e),r);case 3===a:e.value=t.value;break;default:e[Y(t.name)]=t.value}return e},{})}
/* Riot WIP, @license MIT */function te(e,t){return $(e)===t}function re(e){var t=e.ownerSVGElement;return!!t||null===t}function ae(e){return"template"===e.tagName.toLowerCase()}function ne(e){return te(e,"function")}function oe(e){return!ie(e)&&e.constructor===Object}function ie(e){return null==e}function se(){return this}function le(e){return ne(e)?e.prototype&&e.prototype.constructor?new e:e():e}function ue(e){return Array.from(e.attributes).reduce(function(e,t){return e[Y(t.name)]=t.value,e},{})}function pe(e){for(;e.firstChild;)e.removeChild(e.firstChild)}var ce=function(e){return e.remove()},de=function(e,t){return t&&t.parentNode&&t.parentNode.insertBefore(e,t)},me=function(e,t){return t&&t.parentNode&&t.parentNode.replaceChild(e,t)},he=R(R(R(R(R({},n,function(e){this.el=e}),o,se),i,function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r?ce(this.el):r||pe(this.el)}),"clone",function(){return L({},this)}),"createDOM",se),ge={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function ve(e,t,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object.defineProperty(e,t,L({value:r,enumerable:!1,writable:!1,configurable:!0},a)),e}function fe(e,t,r){return Object.entries(t).forEach(function(t){var a=G(t,2),n=a[0],o=a[1];ve(e,n,o,r)}),e}function ye(e,t){return Object.entries(t).forEach(function(t){var r=G(t,2),a=r[0],n=r[1];e[a]||(e[a]=n)}),e}var xe=Symbol(),be=Symbol();function Te(e){var t=e.dom.cloneNode(!0),r=function(){var e=document.createTextNode(""),t=document.createTextNode("");return e[xe]=!0,t[be]=!0,{head:e,tail:t}}(),a=r.head,n=r.tail;return{avoidDOMInjection:!0,fragment:t,head:a,tail:n,children:[a].concat(z(Array.from(t.childNodes)),[n])}}var Ae=Symbol("unmount"),Ee={nodes:[],mount:function(e,t){return this.update(e,t)},update:function(e,t){var r=this.placeholder,a=this.nodes,n=this.childrenMap,o=e===Ae?null:this.evaluate(e),i=function(e,t,r,a){var n=a.condition,o=a.template,i=a.childrenMap,s=a.itemName,l=a.getKey,u=a.indexName,p=a.root,c=a.isTemplateTag,d=new Map,m=[],h=[];return e.forEach(function(e,a){var g=function(e,t){var r=t.itemName,a=t.indexName,n=t.index,o=t.item;ve(e,r,o),a&&ve(e,a,n);return e}(Object.create(t),{itemName:s,indexName:u,index:a,item:e}),v=l?l(g):a,f=i.get(v),y=[];if(!function(e,t){return!!e&&!e(t)}(n,g)){var x=!f,b=f?f.template:o.clone(),T=b.el||p.cloneNode(),A=c&&x?Te(b):b.meta;x?m.push(function(){return b.mount(T,g,r,A)}):m.push(function(){return b.update(g,r)}),c?y.push.apply(y,z(A.children)):y.push(T),i.delete(v),h.push.apply(h,y),d.set(v,{nodes:y,template:b,context:g,index:a})}}),{newChildrenMap:d,batches:m,futureNodes:h}}(o?Array.from(o):[],e,t,this),s=i.newChildrenMap,l=i.batches,u=i.futureNodes;return function(e,t,r,a){for(var n=t.length,o=e.length,i=n,s=0,l=0,u=null;sm-l)for(var v=r(e[s],0);l1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e?e({slots:t,attributes:r}):Fe(function(e){return e.reduce(function(e,t){return e+t.html},"")}(t),[].concat(z(function(e){return e.reduce(function(e,t){var r=t.bindings;return e.concat(r)},[])}(t)),[{expressions:r.map(function(e){return L({type:0},e)})}]))}(this.getComponent(r),this.slots,this.attributes),this.tag.mount(this.node,e)),this},unmount:function(e,t,r){return this.tag&&this.tag.unmount(r),this}};var Ve=R(R(R(R(R({},1,function(e,t){var r=t.evaluate,a=t.template,n=document.createTextNode("");return de(n,e),ce(e),L(L({},we),{},{node:e,evaluate:r,placeholder:n,template:a.createDOM(e)})}),2,function(e,t){var r,a,n=t.expressions;return r=n.map(function(t){return Me(e,t)}),["mount","update","unmount"].reduce(function(e,t){return L(L({},e),{},R({},t,function(e){return r.map(function(r){return r[t](e)})&&a}))},{})}),0,function(e,t){var r=t.evaluate,a=t.condition,n=t.itemName,o=t.indexName,i=t.getKey,s=t.template,l=document.createTextNode(""),u=e.cloneNode();return de(l,e),ce(e),L(L({},Ee),{},{childrenMap:new Map,node:e,root:u,condition:a,evaluate:r,isTemplateTag:ae(u),template:s.createDOM(e),getKey:i,indexName:o,itemName:n,placeholder:l})}),3,function(e,t){var r=t.evaluate,a=t.getComponent,n=t.slots,o=t.attributes;return L(L({},Ge),{},{node:e,evaluate:r,slots:n,attributes:o,getComponent:a})}),4,function(e,t){var r=t.name,a=t.attributes,n=t.template;return L(L({},_e),{},{attributes:a,template:n,node:e,name:r})});function ze(e,t){return e.map(function(e){return 2===e.type?L(L({},e),{},{childNodeIndex:e.childNodeIndex+t}):e})}function He(e,t){return re(e)?function(e,t){return t.ownerDocument.importNode((new window.DOMParser).parseFromString('"),"application/xml").documentElement,!0)}(t,e):function(e,t){var r=ae(t)?t:document.createElement("template");return r.innerHTML=e,r.content}(t,e)}var $e={createDOM:function(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?He(e,t):t)}(e,this.html)||document.createDocumentFragment(),this},mount:function(e,t,r){var a=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e||Q("Please provide DOM node to mount properly your template"),this.el&&this.unmount(t);var o=n.fragment,i=n.children,s=n.avoidDOMInjection,l=(i?i[0]:e).parentNode,u=ae(e),p=u?function(e,t,r){var a=Array.from(e.childNodes);return Math.max(a.indexOf(t),a.indexOf(r.head)+1,0)}(l,e,n):null;this.createDOM(e);var c=o||this.dom.cloneNode(!0);return this.el=u?l:e,this.children=u?i||Array.from(c.childNodes):null,!s&&c&&function(e,t){switch(!0){case re(e):!function(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}(t,e);break;case ae(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}(e,c),this.bindings=this.bindingsData.map(function(e){return function(e,t,r){var a=t.selector,n=t.type,o=t.redundantAttribute,i=t.expressions,s=a?e.querySelector(a):e;o&&s.removeAttribute(o);var l=i||[];return(Ve[n]||Ve[2])(s,L(L({},t),{},{expressions:r&&!a?ze(l,r):l}))}(a.el,e,p)}),this.bindings.forEach(function(e){return e.mount(t,r)}),this.meta=n,this},update:function(e,t){return this.bindings.forEach(function(r){return r.update(e,t)}),this},unmount:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.el;if(!a)return this;switch(this.bindings.forEach(function(a){return a.unmount(e,t,r)}),!0){case a[y]||null===r:break;case Array.isArray(this.children):!function(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:[];return L(L({},$e),{},{html:e,bindingsData:t})}
/* Riot v9.4.11, @license MIT */var Xe=Object.freeze(R(R(R({},n,se),o,se),i,se)),We=function(e,r){return e[t]=r};
/* Riot v9.4.11, @license MIT */function qe(e){return[n,o,i].reduce(function(t,r){return t[r]=e(r),t},{})}
/* Riot v9.4.11, @license MIT */
/* Riot WIP, @license MIT */
function Ke(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}
/* Riot WIP, @license MIT */function Je(e,t){return Ke("string"==typeof e?(t||document).querySelectorAll(e):e)}var Ye=Object.freeze({$:function(e){return Je(e,this.root)[0]},$$:function(e){return Je(e,this.root)}}),Qe=Object.freeze(R(R(R(R(R(R(R({},s,se),l,se),u,se),p,se),c,se),d,se),m,se)),Ze=function(e){return 1===e.length?e[0]:e};function et(e,t,r){var a="object"===$(t)?t:R({},t,r),n=Object.keys(a);return Ke(e).forEach(function(e){n.forEach(function(t){return e.setAttribute(t,a[t])})}),e}function tt(e,t){return function(e,t,r){var a=[t];return Ze(Ke(e).map(function(e){return Ze(a.map(function(t){return e[r](t)}))}))}(e,t,"getAttribute")}var rt,at=new Map,nt=function(){return rt||(et(rt=Je("style[riot]")[0]||document.createElement("style"),"type","text/css"),rt.parentNode||document.head.appendChild(rt),rt)},ot={CSS_BY_NAME:at,add:function(e,t){return at.has(e)||(at.set(e,t),this.inject()),this},inject:function(){return nt().innerHTML=z(at.values()).join("\n"),this},remove:function(e){return at.has(e)&&(at.delete(e),this.inject()),this}};
/* Riot WIP, @license MIT */
function it(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return ve(t,y,!1),this[b]=a,this[T]=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map(function(t){return Me(e,t)}),r={};return Object.assign(r,L({expressions:t},qe(function(e){return function(a){return t.forEach(function(t){return t[e](a)}),r}})))}(t,i).mount(a),ve(this,h,Object.freeze(L(L({},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(L({},ue(e)),le(t))}(t,E)),ee(this[T].expressions)))),this[g]=lt(this[g],r),this[A]=this.template.createDOM(t).clone(),We(t,this),e.name&&st(t,e.name),ve(this,f,t),ve(this,v,o),this[l](this[h],this[g]),this[A].mount(t,this,a),this[u](this[h],this[g]),this},update:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this[b]=t,this[T].update(t));var r=ut(this[A]),n=L(L({},ue({attributes:Array.from(this[f].attributes).filter(function(e){var t=e.name;return!r.includes(t)})})),ee(this[T].expressions));n[a];var o,i,l=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(le(e)).reduce(function(e,t){var r,a=G(t,2),n=a[0],o=a[1];return e[(r=n,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=ht(o),e},{})}(t.exports?t.exports.components:{});return function(a){return a===t.name?mt(t):r[a]||e.get(a)}},mt=Z(ht);function ht(e){var t=e.css,r=e.template,a=e.exports,o=e.name,i=r?function(e,t,r){return e(Fe,J,ge,r)}(r,0,dt(e)):he;return function(e){var s=e.slots,l=e.attributes,u=e.props;if(a&&a[y])return function(e,t){var r=t.slots,a=t.attributes,o=t.props,i=t.css;t.template&&Q("Pure components can not have html"),i&&Q("Pure components do not have css");var s=ye(e({slots:r,attributes:a,props:o}),Xe);return qe(function(e){return function(){for(var t=arguments.length,r=new Array(t),a=0;a0?a:0)}},{key:"setStyles",value:function(e){this.wave.setAttribute("style",this.convertStyle({top:"".concat(this.start.x,"px"),left:"".concat(this.start.y,"px"),transform:"scale(".concat(this.maxScale,")"),"transition-duration":"".concat(this.duration,"ms"),"transition-timing-function":"cubic-bezier(0.250, 0.460, 0.450, 0.940)",background:this.color,opacity:e}))}},{key:"convertStyle",value:function(e){var t="";return Object.keys(e).forEach(function(r){e.hasOwnProperty(r)&&(t+=r+":"+e[r]+";")}),t}}])}(function(){return k(function e(){I(this,e)},[{key:"receiveBound",value:function(){var e;this.container||console.error("Yor class must contain a container. It is DOM Element. Define please this.container property.");var t=this.container&&this.container.ownerDocument,r=t.documentElement;"undefined"!==$(this.container.getBoundingClientRect)&&(e=this.container.getBoundingClientRect());var a=this.getWindow(t);return this.mix(e,{size:Math.max(e.width,e.height),offsetTop:e.top+a.pageYOffset-r.clientTop,offsetLeft:e.left+a.pageXOffset-r.clientLeft})}},{key:"isWindow",value:function(e){return null!==e&&e===e.window}},{key:"getWindow",value:function(e){return this.isWindow(e)?e:9===e.nodeType&&e.defaultView}},{key:"mix",value:function(e,t){for(var r in e)r in t||(t[r]=e[r]);return t}}])}()),xt={css:null,exports:{onMounted(){this._waves=[],this._events=[]},launch(e){var t=new yt(this.$("#waves"),this.props,e);this._waves.push(t),this.props.onWaveStart&&this.props.onWaveStart(t),this._events.length||(this._events.push(e.target.addEventListener("mouseup",()=>this.hold())),this._events.push(e.target.addEventListener("mouseleave",()=>this.hold())))},hold(){this._waves[this._waves.length-1]&&this._waves[this._waves.length-1].waveOut(this.waveOut),this._waves[this._waves.length-1]&&this._waves.slice(this._waves.length-1,1)},waveOut(){this.props.onWaveEnd&&this.props.onWaveEnd()}},template:(e,t,r,a)=>e('',[{redundantAttribute:"expr112",selector:"[expr112]",expressions:[{type:t.EVENT,name:"onmousedown",evaluate:e=>e.launch}]}]),name:"material-waves"},bt=function(e){return""===e||"true"===e},Tt=function(e){if("function"==typeof e){var t=C(Array,Array.prototype.slice.call(arguments)).slice(1);e.apply(void 0,z(t))}},At={array:function(e){if(!e)return[];for(var t=[],r=0;r{Tt(e.onClick,t)}},onUpdated(e,t){this.updateAttributes(e,t)},updateAttributes(e,t){Et.forEach(r=>{bt(e[r])?(this.root.firstElementChild.setAttribute(r,!0),t.attributes[r]=!0):t.attributes[r]=!1});const r=t.attributes.inverted?e.color:e.textColor,a=t.attributes.inverted?e.textColor:e.color;this.root.firstElementChild.style.background=a,this.root.firstElementChild.style.color=r,t.attributes.outlined&&(this.root.firstElementChild.style["border-color"]=a,this.root.firstElementChild.style.color=r,this.root.firstElementChild.style.background="")},onWaveStart(e){Tt(this.props.onWaveStart,e)},onWaveEnd(e){Tt(this.props.onWaveEnd,e)},attributeToBool:bt},template:(e,t,r,a)=>e('',[{type:r.IF,evaluate:e=>e.props.href,redundantAttribute:"expr73",selector:"[expr73]",template:e('
',[{redundantAttribute:"expr80",selector:"[expr80]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["checkbox ",e.state.checked?"checked":""].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{redundantAttribute:"expr81",selector:"[expr81]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr82",selector:"[expr82]"},{redundantAttribute:"expr83",selector:"[expr83]",expressions:[{type:t.VALUE,evaluate:e=>e.state.checked}]}])},It={css:null,exports:{state:{transition:!1,opened:!1},onBeforeUpdate(e,t){t.opened!==e.opened&&(t.transition=!0,setTimeout(()=>this.update({opened:e.opened,transition:!1}),e.opened?0:200))},onUpdated(e,t){e.onClick&&this.$$(".material-dropdown-item").forEach((e,t)=>{e.onclick=r=>{const a=e.attributes.getNamedItem("item");r.target.item=a&&a.value,r.target.index=t,Tt(this.props.onClick,r)}})}},template:(e,t,r,a)=>e('',[{type:r.IF,evaluate:e=>e.props.opened||e.state.opened,redundantAttribute:"expr84",selector:"[expr84]",template:e('',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["material-dropdown-container ",!!e.state.transition&&"opening"," ",e.props.animation||"top"].join("")}]},{type:r.IF,evaluate:e=>!e.props.items,redundantAttribute:"expr85",selector:"[expr85]",template:e('',[{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr86",selector:"[expr86]"}])},{type:r.EACH,getKey:null,condition:null,template:e('',[{type:r.IF,evaluate:e=>!e.item.href,redundantAttribute:"expr88",selector:"[expr88]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.item.title].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["material-dropdown-item ",e.props.selected===e.key?"selected":""].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"item",evaluate:e=>e.item.name||e.item.title}]}])},{type:r.IF,evaluate:e=>e.item.href,redundantAttribute:"expr89",selector:"[expr89]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.item.title].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.item.href},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["material-dropdown-item ",e.props.selected===e.key?"selected":""].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"item",evaluate:e=>e.item.name||e.item.title},{type:t.ATTRIBUTE,isBoolean:!1,name:"title",evaluate:e=>e.item.title}]}])}]),redundantAttribute:"expr87",selector:"[expr87]",itemName:"item",indexName:"key",evaluate:e=>e.props.items}])}])},Ct=function(){return k(function e(t){if(I(this,e),t||console.debug("Sorry, but for using validate mixin you should add an opts argument"),this.type=t.type,t.valid){if(this.validationType="function"==typeof t.valid?"Function":"Regexp","Regexp"===this.validationType)try{this.validationRegexp=new RegExp(t.valid)}catch(e){throw new Error("Something wrong with your regular expression!. Checkout --- ".concat(e))}"Function"===this.validationType&&(this.validationFunction=t.valid||!1)}else t&&-1!=Object.keys(this.base).indexOf(this.type)&&(this.validationType="Type")},[{key:"base",get:function(){return{email:/^(([\w\.\-_]+)@[\w\-\_]+(\.\w+){1,}|)$/i,number:/^(\d+|)$/i,tel:/^((\+|\d)?([\d\-\(\)\#])|)+$/i,url:/([--:\w?@%&+~#=]*\.[a-z]{2,4}\/{0,2})((?:[?&](?:\w+)=(?:\w+))+|[--:\w?@%&+~#=]+)?/i}}},{key:"validate",value:function(e){return!this.validationType||this["validateBy"+this.validationType](e)}},{key:"validateByFunction",value:function(e){if(this.validationFunction)return this.validationFunction(e)}},{key:"validateByRegexp",value:function(e){if(this.validationRegexp)return this.validationRegexp.test(e)}},{key:"validateByType",value:function(e){return this.base[this.type].test(e)}}])}();const kt=["disabled","rounded","outlined","inverted","icon"];var Rt={css:null,exports:{state:{focused:!1,showIcon:!1,value:"",disabled:!1,required:!1,error:!1},components:{MaterialButton:wt},onMounted(e,t){if(this.required="",this.notSupportedTypes=["date","color","datetime","month","range","time"],-1!=this.notSupportedTypes.indexOf(this.props.type))throw new Error(`Sorry but we do not support ${this.props.type} type yet!`);this.validator=new Ct(this.props),this.update({showIcon:!1,value:this.props.value||""}),this.$("input").addEventListener("focus",this.changeFocus),this.$("input").addEventListener("blur",this.changeFocus),this.updateAttributes(e,t)},onBeforeUpdate(e,t){this.state.value=this.$("input").value,this.state.error=0!==t.value.length&&!this.validator.validate(t.value)||0===t.value.length&&bt(e.required)},onUpdated(e,t){this.updateAttributes(e,t)},updateAttributes(e,t){const r=function(e,t){return e.reduce(function(e,r){return e[r]=bt(t[r]),e},{})}(kt,e),a=r.inverted?e.textColor:e.color,n=r.inverted?e.color:e.textColor;At.children(this.$(".underline")).forEach(e=>e.style.background=a),this.$("input").style.color=n,this.$("label")&&(this.$("label").style.color=e.labelColor||n),(r.outlined||r.rounded)&&(this.$(".input-content").style["border-color"]=a)},changeFocus(e){if(bt(this.props.disabled))return!1;const t=this.$("input")==document.activeElement;this.state.focused!=t&&(this.update({focused:t}),Tt(this.props.onFocus,t,e))},changeValue(e){this.update({value:this.$("input").value}),Tt(this.props.onValueChange,this.$("input").value,e)},iconClickHandler(e){Tt.call(this,this.props.onIconClick,e)},attributeToBool:bt},template:(e,t,r,a)=>e('
Mixed Content: The page at ``\n was loaded over HTTPS, but requested an insecure server endpoint ``.\n
This request may has been blocked; the content must be served over HTTPS.
\n You may unset the option `REGISTRY_URL` and set the registry server container URL in\n `NGINX_PROXY_PASS_URL`. It\'s usually the name of your container, and it should be on the same\n network as the UI.\n
',[{redundantAttribute:"expr29",selector:"[expr29]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["`",e.props.url,"` does not seems to be a correct URL, should starts with http:// or https://."].join("")}]}])},{type:r.IF,evaluate:e=>"PAGINATION_NUMBER_INVALID"===e.props.code,redundantAttribute:"expr30",selector:"[expr30]",template:e('
\n A default limit of 1000 images in catalog has been added in docker registry server\n v2.8.2 (May 11, 2023) and we\n cannot exceed this value without configuration.\n
\n The new default value for the UI is 1000 since\n 2.5.0 and was 100000 from\n 0.3.6.\n
Possible fixes
\n You can update the environment variable\n of your\n docker registry server or you can update your\n /etc/docker/registry/config.yml configuration of your docker registry server and add\n those lines:\n
\ncatalog:\n maxentries: \n
\n If you don\'t need that many images, you can reduce the number of elements fetch by the\n docker registry UI with the environment variable CATALOG_ELEMENTS_LIMIT=1000.\n
Configuration environment variables are : CATALOG_MIN_BRANCHES and CATALOG_MAX_BRANCHES
',[{redundantAttribute:"expr34",selector:"[expr34]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Wrong configuration for the branching feature: ",e.props.message].join("")}]}])}]),name:"error-page"};const xn="version-notification:latest",bn="version-notification:expiration-date";var Tn,An={css:'version-notification,[is="version-notification"]{ display: inline; }version-notification svg,[is="version-notification"] svg{ margin-left: 10px; cursor: pointer; }version-notification material-popup material-button > a:first-child,[is="version-notification"] material-popup material-button > a:first-child{ display: flex; align-items: center; }version-notification material-popup .material-popup-content code,[is="version-notification"] material-popup .material-popup-content code{ background-color: var(--hover-background); padding: 0 5px; border-radius: 4px; line-height: 1.5em; }version-notification material-popup .material-popup-content b,[is="version-notification"] material-popup .material-popup-content b{ color: var(--accent-text); }',exports:{onMounted(e,t){const r=aa(localStorage.getItem(xn)),a=parseInt(localStorage.getItem(bn));r&&r.tag_name&&this.update({tag_name:r.tag_name,latest:r}),(isNaN(a)||(new Date).getTime()>a)&&this.checkForUpdates(e,t)},onUpdated(e,t){const r=this.$("span");r&&(r.innerHTML=(new DOMParser).parseFromString('\n',"image/svg+xml").firstElementChild.outerHTML)},onClose(){this.update({open:!1})},onClick(){this.update({open:!0})},checkForUpdates(e,t){const r=new ca,a=this;r.addEventListener("load",function(){if(localStorage.setItem(bn,(new Date).getTime()+6048e5),200===this.status){const t=aa(this.responseText);t&&a.tag_name!==t.tag_name&&!ra(e.version,t.tag_name)&&e.onNotify("A new version of Docker Registry UI is available!"),localStorage.setItem(xn,this.responseText),a.update({tag_name:t.tag_name,latest:t})}else 404!==this.status&&(e.onNotify("Cannot check for new updates. Will try again in 24 hours. See the browser console."),console.error("Cannot check for new Docker Registry UI updates. This is most likely a GitHub issue. You don't need to worry about it."),console.error(`Got status code ${this.status} from Github API with response ${this.responseText}`))}),r.open("GET","https://api.github.com/repos/joxit/docker-registry-ui/releases/latest"),r.send()},isNewestVersion:ra},template:(e,t,r,a)=>e('',[{type:r.IF,evaluate:e=>e.state.tag_name&&!e.isNewestVersion(e.props.version,e.state.tag_name),redundantAttribute:"expr35",selector:"[expr35]",template:e(null,[{expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]}])},{type:r.TAG,getComponent:a,evaluate:e=>"material-popup",slots:[{id:"default",html:'