From e1aa244ca48b16b07450235017b4d048388c7f31 Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Tue, 12 Jul 2022 10:31:13 +0200 Subject: [PATCH 1/7] import mapboxgl --- src/main/js/pluckr-app/src/PluckrApp.js | 8 +++---- src/main/resources/dist/2a2586f8.js | 28 ------------------------- src/main/resources/dist/sw.js.map | 2 +- 3 files changed, 5 insertions(+), 33 deletions(-) delete mode 100644 src/main/resources/dist/2a2586f8.js diff --git a/src/main/js/pluckr-app/src/PluckrApp.js b/src/main/js/pluckr-app/src/PluckrApp.js index 88f16f3..57bf78d 100644 --- a/src/main/js/pluckr-app/src/PluckrApp.js +++ b/src/main/js/pluckr-app/src/PluckrApp.js @@ -1,7 +1,7 @@ import { LitElement, html, css } from 'lit'; import '@vaadin/text-field'; import '@vaadin/icons'; -import mapbox from '../dist/mapbox-gl.esm.js' +import mapboxgl from '../dist/mapbox-gl.esm.js' import MapboxGeocoder from '../dist/mapbox-gl-geocoder.esm.min.js' export class PluckrApp extends LitElement { @@ -50,7 +50,7 @@ export class PluckrApp extends LitElement { firstUpdated(_changedProperties) { super.firstUpdated(_changedProperties); - this.map = new mapbox.Map({ + this.map = new mapboxgl.Map({ accessToken: 'pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ', container: this.renderRoot.querySelector('#map'), style: 'mapbox://styles/mapbox/streets-v11', @@ -61,7 +61,7 @@ export class PluckrApp extends LitElement { this.map.addControl( new MapboxGeocoder({ accessToken: 'pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ', - mapboxgl: mapbox + mapboxgl: mapboxgl }) ); @@ -76,7 +76,7 @@ export class PluckrApp extends LitElement { .then(data => { console.log('Loaded POIs', data); data.map(p => - new mapbox.Marker() + new mapboxgl.Marker() .setLngLat([p.location.y, p.location.x]) .addTo(this.map) ); diff --git a/src/main/resources/dist/2a2586f8.js b/src/main/resources/dist/2a2586f8.js deleted file mode 100644 index e13239f..0000000 --- a/src/main/resources/dist/2a2586f8.js +++ /dev/null @@ -1,28 +0,0 @@ -function t(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t} -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=n.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(i,t))}return t}toString(){return this.cssText}}const s=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new o(n,t,i)},r=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,i))(e)})(t):t -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;var a;const h=window.trustedTypes,l=h?h.emptyScript:"",u=window.reactiveElementPolyfillSupport,c={toAttribute(t,e){switch(e){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},d=(t,e)=>e!==t&&(e==e||t==t),_={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:d};class p extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||_}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=_){var n,o;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const r=(null!==(o=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==o?o:c.toAttribute)(e,i.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var i,n;const o=this.constructor,s=o._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=o.getPropertyOptions(s),r=t.converter,a=null!==(n=null!==(i=null==r?void 0:r.fromAttribute)&&void 0!==i?i:"function"==typeof r?r:null)&&void 0!==n?n:c.fromAttribute;this._$El=s,this[s]=a(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||d)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var m;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:p}),(null!==(a=globalThis.reactiveElementVersions)&&void 0!==a?a:globalThis.reactiveElementVersions=[]).push("1.3.3");const f=globalThis.trustedTypes,g=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,y="?"+v,x=`<${y}>`,w=document,b=(t="")=>w.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,M=/>/g,E=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,C=/'/g,S=/"/g,k=/^(?:script|style|textarea|title)$/i,Z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),I=new WeakMap,R=w.createTreeWalker(w,129,null,!1),N=(t,e)=>{const i=t.length-1,n=[];let o,s=2===e?"":"",r=A;for(let e=0;e"===h[0]?(r=null!=o?o:A,l=-1):void 0===h[1]?l=-2:(l=r.lastIndex-h[2].length,a=h[1],r=void 0===h[3]?E:'"'===h[3]?S:C):r===S||r===C?r=E:r===z||r===M?r=A:(r=E,o=void 0);const c=r===E&&t[e+1].startsWith("/>")?" ":"";s+=r===A?i+x:l>=0?(n.push(a),i.slice(0,l)+"$lit$"+i.slice(l)+v+c):i+v+(-2===l?(n.push(void 0),e):c)}const a=s+(t[i]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(a):a,n]};class ${constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,s=0;const r=t.length-1,a=this.parts,[h,l]=N(t,e);if(this.el=$.createElement(h,i),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=R.nextNode())&&a.length0){n.textContent=f?f.emptyScript:"";for(let i=0;i{var e;return T(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==B&&P(this._$AH)?this._$AA.nextSibling.data=t:this.k(w.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=$.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new H(o,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new $(t)),e}S(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new j(this.M(b()),this.M(b()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let s=!1;if(void 0===o)t=D(this,t,e,0),s=!P(t)||t!==this._$AH&&t!==O,s&&(this._$AH=t);else{const n=t;let r,a;for(t=o[0],r=0;r{var n,o;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let r=s._$litPart$;if(void 0===r){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;s._$litPart$=r=new j(e.insertBefore(b(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return O}}J.finalized=!0,J._$litElement$=!0,null===(Y=globalThis.litElementHydrateSupport)||void 0===Y||Y.call(globalThis,{LitElement:J});const Q=globalThis.litElementPolyfillSupport; -/* @preserve - * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */ -function tt(t){var e,i,n,o;for(i=1,n=arguments.length;i0?Math.floor(t):Math.ceil(t)};function zt(t,e,i){return t instanceof Tt?t:dt(t)?new Tt(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new Tt(t.x,t.y):new Tt(t,e,i)}function Mt(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=Et(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=Et(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=St(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=St(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,we=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",rt,e),window.removeEventListener("testPassiveEventSupport",rt,e)}catch(t){}return t}(),be=!!document.createElement("canvas").getContext,Pe=!(!document.createElementNS||!jt("svg").createSVGRect),Le=!!Pe&&((Wt=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI)),Te=!Pe&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Ae(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var ze={ie:Vt,ielt9:qt,edge:Gt,webkit:Kt,android:Yt,android23:Xt,androidStock:Qt,opera:te,chrome:ee,gecko:ie,safari:ne,phantom:oe,opera12:se,win:re,ie3d:ae,webkit3d:he,gecko3d:le,any3d:ue,mobile:ce,mobileWebkit:de,mobileWebkit3d:_e,msPointer:pe,pointer:me,touch:ge,touchNative:fe,mobileOpera:ve,mobileGecko:ye,retina:xe,passiveEvents:we,canvas:be,svg:Pe,vml:Te,inlineSvg:Le},Me=ze.msPointer?"MSPointerDown":"pointerdown",Ee=ze.msPointer?"MSPointerMove":"pointermove",Ce=ze.msPointer?"MSPointerUp":"pointerup",Se=ze.msPointer?"MSPointerCancel":"pointercancel",ke={touchstart:Me,touchmove:Ee,touchend:Ce,touchcancel:Se},Ze={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&zi(e);De(t,e)},touchmove:De,touchend:De,touchcancel:De},Oe={},Be=!1;function Ie(t,e,i){return"touchstart"===e&&(Be||(document.addEventListener(Me,Re,!0),document.addEventListener(Ee,Ne,!0),document.addEventListener(Ce,$e,!0),document.addEventListener(Se,$e,!0),Be=!0)),Ze[e]?(i=Ze[e].bind(this,i),t.addEventListener(ke[e],i,!1),i):(console.warn("wrong event specified:",e),L.Util.falseFn)}function Re(t){Oe[t.pointerId]=t}function Ne(t){Oe[t.pointerId]&&(Oe[t.pointerId]=t)}function $e(t){delete Oe[t.pointerId]}function De(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Oe)e.touches.push(Oe[i]);e.changedTouches=[e],t(e)}}var He,je,Ue,We,Fe,Ve=ai(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),qe=ai(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ge="webkitTransition"===qe||"OTransition"===qe?qe+"End":"transitionend";function Ke(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function Ye(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function Xe(t){var e=t.parentNode;e&&e.removeChild(t)}function Je(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Qe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ti(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ei(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=si(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ii(t,e){if(void 0!==t.classList)for(var i=lt(e),n=0,o=i.length;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,St(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=zt((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=zt(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=Et([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var l=s.subtract(a.getCenter()),u=a.extend(s).getSize().subtract(h);o.x+=l.x<0?-u.x:u.x,o.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=tt({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(it(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=tt({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=it(this._handleGeolocationResponse,this),i=it(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new kt(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),Xe(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(wt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)Xe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=Ye("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new Ct(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=St(t),i=zt(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),l=Et(this.project(a,n),this.project(r,n)).getSize(),u=ze.any3d?this.options.zoomSnap:1,c=h.x/l.x,d=h.y/l.y,_=e?Math.max(c,d):Math.min(c,d);return n=this.getScaleZoom(_,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new Tt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new Mt(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(Zt(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(zt(t),e)},layerPointToLatLng:function(t){var e=zt(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(Zt(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Zt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(St(t))},distance:function(t,e){return this.options.crs.distance(Zt(t),Zt(e))},containerPointToLayerPoint:function(t){return zt(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return zt(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(zt(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Zt(t)))},mouseEventToContainerPoint:function(t){return function(t,e){if(!e)return new Tt(t.clientX,t.clientY);var i=fi(e),n=i.boundingClientRect;return new Tt((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=function(t){return"string"==typeof t?document.getElementById(t):t}(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");gi(e,"scroll",this._onScroll,this),this._containerId=ot(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ze.any3d,ii(t,"leaflet-container"+(ze.touch?" leaflet-touch":"")+(ze.retina?" leaflet-retina":"")+(ze.ielt9?" leaflet-oldie":"")+(ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Ke(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),li(this._mapPane,new Tt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ii(t.markerPane,"leaflet-zoom-hide"),ii(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){li(this._mapPane,new Tt(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return wt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){li(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[ot(this._container)]=this;var e=t?yi:gi;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),ze.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){wt(this._resizeRequest),this._resizeRequest=xt((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[ot(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!Ci(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&pi(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=tt({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=ze.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ni(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=Ye("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=Ve,i=this._proxy.style[e];hi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Xe(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();hi(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o))&&(xt((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ii(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(it(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ni(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var Zi=bt.extend({options:{position:"topright"},initialize:function(t){ut(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ii(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Xe(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});ki.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=Ye("div",e+"control-container",this._container);function n(n,o){var s=e+n+" "+e+o;t[n+o]=Ye("div",s,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Xe(this._controlCorners[t]);Xe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Oi=Zi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(ot(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+ot(this),n),this._layerControlInputs.push(e),e.layerId=ot(t.layer),gi(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return i.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ne.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),Bi=Zi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=Ye("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=Ye("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Ai(s),gi(s,"click",Mi),gi(s,"click",o,this),gi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ni(this._zoomInButton,e),ni(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ii(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ii(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});ki.mergeOptions({zoomControl:!0}),ki.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Bi,this.addControl(this.zoomControl))}));var Ii=Zi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=Ye("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=Ye("div",e,i)),t.imperial&&(this._iScale=Ye("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),Ri=Zi.extend({options:{position:"bottomright",prefix:''+(ze.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){ut(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=Ye("div","leaflet-control-attribution"),Ai(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});ki.mergeOptions({attributionControl:!0}),ki.addInitHook((function(){this.options.attributionControl&&(new Ri).addTo(this)})),Zi.Layers=Oi,Zi.Zoom=Bi,Zi.Scale=Ii,Zi.Attribution=Ri;var Ni=bt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ni.addTo=function(t,e){return t.addHandler(e,this),this};var $i,Di=ze.touch?"touchstart mousedown":"mousedown",Hi=Lt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){ut(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(gi(this._dragStartTarget,Di,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Hi._dragging===this&&this.finishDrag(!0),yi(this._dragStartTarget,Di,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ei(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)Hi._dragging===this&&this.finishDrag();else if(!(Hi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Hi._dragging=this,this._preventOutline&&pi(this._element),di(),He(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=function(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}(this._element);this._startPoint=new Tt(e.clientX,e.clientY),this._startPos=ui(this._element),this._parentScale=fi(i);var n="mousedown"===t.type;gi(document,n?"mousemove":"touchmove",this._onMove,this),gi(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new Tt(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)e&&(i.push(t[n]),o=n);oh&&(s=r,h=a);h>i&&(e[s]=1,Wi(t,e,i,n,s),Wi(t,e,i,s,o))}function Fi(t,e,i,n,o){var s,r,a,h=n?$i:qi(t,i),l=qi(e,i);for($i=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=qi(r=Vi(t,e,s=h||l,i,o),i),s===h?(t=r,h=a):(e=r,l=a)}}function Vi(t,e,i,n,o){var s,r,a=e.x-t.x,h=e.y-t.y,l=n.min,u=n.max;return 8&i?(s=t.x+a*(u.y-t.y)/h,r=u.y):4&i?(s=t.x+a*(l.y-t.y)/h,r=l.y):2&i?(s=u.x,r=t.y+h*(u.x-t.x)/a):1&i&&(s=l.x,r=t.y+h*(l.x-t.x)/a),new Tt(s,r,o)}function qi(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function Gi(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Ki(t,e,i,n){var o,s=e.x,r=e.y,a=i.x-s,h=i.y-r,l=a*a+h*h;return l>0&&((o=((t.x-s)*a+(t.y-r)*h)/l)>1?(s=i.x,r=i.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new Tt(s,r)}function Yi(t){return!dt(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Xi(t,e,i){var n,o,s,r,a,h,l,u,c,d=[1,4,2,8];for(o=0,l=t.length;o1e-7;h++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=l=Math.PI/2-2*Math.atan(r*e)-a;return new kt(a*i,t.x*i/n)}},tn=tt({},Bt,{code:"EPSG:3395",projection:Qi,transformation:function(){var t=.5/(Math.PI*Qi.R);return Nt(t,.5,-t,.5)}()}),en=tt({},Bt,{code:"EPSG:4326",projection:Ji,transformation:Nt(1/180,1,-1/180,.5)}),nn=tt({},Ot,{projection:Ji,transformation:Nt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});Ot.Earth=Bt,Ot.EPSG3395=tn,Ot.EPSG3857=Dt,Ot.EPSG900913=Ht,Ot.EPSG4326=en,Ot.Simple=nn;var on=Lt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[ot(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[ot(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});ki.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=ot(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=ot(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return ot(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?dt(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()e)return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=Zt(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Ct,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Yi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Yi(t),n=0,o=t.length;n=2&&e[0]instanceof kt&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){pn.prototype._setLatLngs.call(this,t),Yi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Yi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new Tt(e,e);if(t=new Mt(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;ot.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||pn.prototype._containsPoint.call(this,t,!0)}}),fn=rn.extend({initialize:function(t,e){ut(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=dt(t)?t:t.features;if(o){for(e=0,i=o.length;e0?n:[e.src]}else{dt(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",ii(t,s)):ni(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();li(this._container,e.add(i))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var e=this._map,i=parseInt(Ke(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+i,o=this._containerWidth,s=new Tt(this._containerLeft,-n-this._containerBottom);s._add(ui(this._container));var r=e.layerPointToContainerPoint(s),a=zt(this.options.autoPanPadding),h=zt(this.options.autoPanPaddingTopLeft||a),l=zt(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,d=0;r.x+o+l.x>u.x&&(c=r.x+o-u.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+n+l.y>u.y&&(d=r.y+n-u.y+l.y),r.y-d-h.y<0&&(d=r.y-h.y),(c||d)&&e.fire("autopanstart").panBy([c,d],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return zt(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ki.mergeOptions({closePopupOnClick:!0}),ki.include({openPopup:function(t,e,i){return this._initOverlay(Mn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),on.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Mn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Mi(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof cn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var En=zn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){zn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){zn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=zn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ye("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,l=o.offsetHeight,u=zt(this.options.offset),c=this._getAnchor();"top"===a?(e=h/2,i=l):"bottom"===a?(e=h/2,i=0):"center"===a?(e=h/2,i=l/2):"right"===a?(e=0,i=l/2):"left"===a?(e=h,i=l/2):r.xthis.options.maxZoom||in&&this._retainParent(o,s,r,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new Tt(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),i+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var d=o.min.x;d<=o.max.x;d++){var _=new Tt(d,c);if(_.z=this._tileZoom,this._isValidTile(_)){var p=this._tiles[this._tileCoordsToKey(_)];p?p.current=!0:r.push(_)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;di.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return St(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new Ct(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new Tt(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(Xe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ii(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=rt,t.onmousemove=rt,ze.ielt9&&this.options.opacity<1&&ri(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),it(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&xt(it(this._tileReady,this,t,null,o)),li(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ri(i.el,0),wt(this._fadeFrame),this._fadeFrame=xt(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ii(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze.ielt9||!this._map._fadeAnimated?xt(this._pruneTiles,this):setTimeout(it(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new Tt(this._wrapX?st(t.x,this._wrapX):t.x,this._wrapY?st(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Mt(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Sn=Cn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=ut(this,e)).detectRetina&&ze.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return gi(i,"load",it(this._tileOnLoad,this,e,i)),gi(i,"error",it(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:ze.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return function(t,e){return t.replace(ct,(function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n}))}(this._url,tt(e,this.options))},_tileOnLoad:function(t,e){ze.ielt9?setTimeout(it(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=rt,e.onerror=rt,!e.complete)){e.src=pt;var i=this._tiles[t].coords;Xe(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",pt),Cn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==pt))return Cn.prototype._tileReady.call(this,t,e,i)}});function kn(t,e){return new Sn(t,e)}var Zn=Sn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=tt({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);var o=(e=ut(this,e)).detectRetina&&ze.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Sn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=Et(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===en?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Sn.prototype.getTileUrl.call(this,t);return a+function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return tt(this.wmsParams,t),e||this.redraw(),this}});Sn.WMS=Zn,kn.wms=function(t,e){return new Zn(t,e)};var On=on.extend({options:{padding:.1},initialize:function(t){ut(this,t),ot(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ii(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));ze.any3d?hi(this._container,s,i):li(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Mt(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Bn=On.extend({options:{tolerance:0},getEvents:function(){var t=On.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){On.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");gi(t,"mousemove",this._onMouseMove,this),gi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),gi(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){wt(this._redrawRequest),delete this._ctx,Xe(this._container),yi(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){On.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=ze.retina?2:1;li(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){On.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[ot(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[ot(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Rn={_initContainer:function(){this._container=Ye("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(On.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=In("shape");ii(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=In("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[ot(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;Xe(e),t.removeInteractiveTarget(e),delete this._layers[ot(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=In("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=dt(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=In("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Qe(t._container)},_bringToBack:function(t){ti(t._container)}},Nn=ze.vml?In:jt,$n=On.extend({_initContainer:function(){this._container=Nn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Nn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Xe(this._container),yi(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){On.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),li(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Nn("path");t.options.className&&ii(e,t.options.className),t.options.interactive&&ii(e,"leaflet-interactive"),this._updateStyle(t),this._layers[ot(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Xe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[ot(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Ut(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Qe(t._path)},_bringToBack:function(t){ti(t._path)}});ze.vml&&$n.include(Rn),ki.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&function(t){return ze.canvas?new Bn(t):null}(t)||function(t){return ze.svg||ze.vml?new $n(t):null}(t)}}),mn.extend({initialize:function(t,e){mn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=St(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),$n.create=Nn,$n.pointsToPath=Ut,fn.geometryToLayer=gn,fn.coordsToLatLng=yn,fn.coordsToLatLngs=xn,fn.latLngToCoords=wn,fn.latLngsToCoords=bn,fn.getFeature=Pn,fn.asFeature=Ln,ki.mergeOptions({boxZoom:!0});var Dn=Ni.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){gi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){yi(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Xe(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),He(),di(),this._startPoint=this._map.mouseEventToContainerPoint(t),gi(document,{contextmenu:Mi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=Ye("div","leaflet-zoom-box",this._container),ii(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Mt(this._point,this._startPoint),i=e.getSize();li(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(Xe(this._box),ni(this._container,"leaflet-crosshair")),je(),_i(),yi(document,{contextmenu:Mi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(it(this._resetState,this),0);var e=new Ct(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ki.addInitHook("addHandler","boxZoom",Dn),ki.mergeOptions({doubleClickZoom:!0});var Hn=Ni.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});ki.addInitHook("addHandler","doubleClickZoom",Hn),ki.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var jn=Ni.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Hi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ii(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ni(this._map._container,"leaflet-grab"),ni(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=St(this._map.options.maxBounds);this._offsetLimit=Et(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});ki.addInitHook("addHandler","scrollWheelZoom",Wn);ki.mergeOptions({tapHold:ze.touchNative&&ze.safari&&ze.mobile,tapTolerance:15});var Fn=Ni.extend({addHooks:function(){gi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){yi(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new Tt(e.clientX,e.clientY),this._holdTimeout=setTimeout(it((function(){this._cancel(),this._isTapValid()&&(gi(document,"touchend",zi),gi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),gi(document,"touchend touchcancel contextmenu",this._cancel,this),gi(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){yi(document,"touchend",zi),yi(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),yi(document,"touchend touchcancel contextmenu",this._cancel,this),yi(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new Tt(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});ki.addInitHook("addHandler","tapHold",Fn),ki.mergeOptions({touchZoom:ze.touch,bounceAtZoomLimits:!0});var Vn=Ni.extend({addHooks:function(){ii(this._map._container,"leaflet-touch-zoom"),gi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ni(this._map._container,"leaflet-touch-zoom"),yi(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),gi(document,"touchmove",this._onTouchMove,this),gi(document,"touchend touchcancel",this._onTouchEnd,this),zi(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),wt(this._animRequest);var r=it(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=xt(r,this,!0),zi(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,wt(this._animRequest),yi(document,"touchmove",this._onTouchMove,this),yi(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});ki.addInitHook("addHandler","touchZoom",Vn),ki.BoxZoom=Dn,ki.DoubleClickZoom=Hn,ki.Drag=jn,ki.Keyboard=Un,ki.ScrollWheelZoom=Wn,ki.TapHold=Fn,ki.TouchZoom=Vn;customElements.define("pluckr-app",class extends J{static get properties(){return{title:{type:String},location:{type:Object}}}static get styles(){return s`:host{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;font-size:calc(10px + 2vmin);color:#1a2b42;max-width:960px;margin:0 auto;text-align:center;background-color:var(--pluckr-app-background-color)}main{flex-grow:1}#map{height:1096px;width:1096px}`}constructor(){super(),t(this,"map",null),t(this,"defaultIcon",new an({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII="})),this.title="My app",this.location={x:52.0474828687443,y:5.080036739440433}}firstUpdated(t){var e,i;super.firstUpdated(t),this.map=(e=this.renderRoot.querySelector("#map"),new ki(e,i)).setView([this.location.x,this.location.y],13),kn("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ",{maxZoom:19,attribution:'© Mapbox © OpenStreetMap'}).addTo(this.map),this.map.on("moveend",this.moveEnd.bind(this)),this.loadMarkers(this.map.getBounds())}loadMarkers(t){console.log("Success: ;eihgwe;rghwekl;ge"),fetch(`/api/trees?bbox=${t._northEast.lat},${t._northEast.lng},${t._southWest.lat},${t._southWest.lng}`).then((t=>t.json())).then((t=>{console.log("Loaded POIs",t),t.map((t=>{return(e=[t.location.x,t.location.y],i={icon:this.defaultIcon},new un(e,i)).addTo(this.map);var e,i}))})).catch((t=>{console.error("Impossible to log Points of Interests:",t)}))}moveEnd(t){this.loadMarkers(t.target.getBounds())}render(){return Z`

${this.title}

`}}); diff --git a/src/main/resources/dist/sw.js.map b/src/main/resources/dist/sw.js.map index 1ce1228..81e8099 100644 --- a/src/main/resources/dist/sw.js.map +++ b/src/main/resources/dist/sw.js.map @@ -1 +1 @@ -{"version":3,"file":"sw.js","sources":["../../../../../../../../private/var/folders/4b/jjn7wslx5fl1r5npk147_9b80000gn/T/a8724be573e0d97f416c1dabfa1c598c/sw.js"],"sourcesContent":["import {clientsClaim as workbox_core_clientsClaim} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {registerRoute as workbox_routing_registerRoute} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-routing/registerRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"bd0a6475.js\",\n \"revision\": \"b4aea298ab049d9d93db98f2f89dc5f4\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"86949185ebc1ce841945a76fa5f21673\"\n },\n {\n \"url\": \"mapbox-gl-geocoder.esm.min.js\",\n \"revision\": \"4d4a445462472b4e53d5a0da309c261e\"\n },\n {\n \"url\": \"mapbox-gl.esm.js\",\n \"revision\": \"9c3ae05af3ab19e62b91b371aae8efbe\"\n },\n {\n \"url\": \"mapbox-gl.esm.min.js\",\n \"revision\": \"289a426b3421209ddd1c11c35e258de0\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","NavigationRoute","workbox_precaching_createHandlerBoundToURL"],"mappings":"0nBAuBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,qCAEb,IAE0BC,EAAAC,cAAC,IAAIC,EAAJC,gBAAoCC,0BAA2C"} \ No newline at end of file +{"version":3,"file":"sw.js","sources":["../../../../../../../../private/var/folders/4b/jjn7wslx5fl1r5npk147_9b80000gn/T/bec2369c6dd1d05ca69900335130d7e5/sw.js"],"sourcesContent":["import {clientsClaim as workbox_core_clientsClaim} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {registerRoute as workbox_routing_registerRoute} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-routing/registerRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/Users/julienlengrand-lambert/Developer/pluckr/src/main/js/pluckr-app/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"bd0a6475.js\",\n \"revision\": \"b4aea298ab049d9d93db98f2f89dc5f4\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"86949185ebc1ce841945a76fa5f21673\"\n },\n {\n \"url\": \"mapbox-gl-geocoder.esm.min.js\",\n \"revision\": \"4d4a445462472b4e53d5a0da309c261e\"\n },\n {\n \"url\": \"mapbox-gl.esm.js\",\n \"revision\": \"9c3ae05af3ab19e62b91b371aae8efbe\"\n },\n {\n \"url\": \"mapbox-gl.esm.min.js\",\n \"revision\": \"289a426b3421209ddd1c11c35e258de0\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","NavigationRoute","workbox_precaching_createHandlerBoundToURL"],"mappings":"0nBAuBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,qCAEb,IAE0BC,EAAAC,cAAC,IAAIC,EAAJC,gBAAoCC,0BAA2C"} \ No newline at end of file From 67727d0e7fa2a5ae37f5bcf965dd9f1392ab9899 Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Wed, 13 Jul 2022 16:55:26 +0200 Subject: [PATCH 2/7] Adds Authentication and Sessions dependencies --- build.gradle.kts | 2 + src/main/js/pluckr-app/package-lock.json | 128 ++++++++++++++++++ src/main/js/pluckr-app/package.json | 2 + src/main/js/pluckr-app/src/PluckrApp.js | 39 +++++- .../kotlin/nl/lengrand/pluckr/Application.kt | 28 +++- .../kotlin/nl/lengrand/pluckr/Controller.kt | 5 +- .../nl/lengrand/pluckr/plugins/Routing.kt | 11 ++ 7 files changed, 206 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 24ded25..8e937b3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -31,6 +31,8 @@ dependencies { implementation("io.ktor:ktor-server-call-logging:$ktor_version") implementation("io.ktor:ktor-server-metrics-micrometer:$ktor_version") implementation("io.ktor:ktor-server-cors:$ktor_version") + implementation("io.ktor:ktor-server-sessions:$ktor_version") + implementation("io.ktor:ktor-server-auth:$ktor_version") implementation("org.jetbrains.exposed:exposed-core:$exposedVersion") implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion") diff --git a/src/main/js/pluckr-app/package-lock.json b/src/main/js/pluckr-app/package-lock.json index 4a644cc..48fddeb 100644 --- a/src/main/js/pluckr-app/package-lock.json +++ b/src/main/js/pluckr-app/package-lock.json @@ -10,8 +10,10 @@ "license": "MIT", "dependencies": { "@mapbox/mapbox-gl-geocoder": "^5.0.1", + "@vaadin/app-layout": "^23.1.3", "@vaadin/icon": "^23.1.3", "@vaadin/icons": "^23.1.3", + "@vaadin/tabs": "^23.1.3", "@vaadin/text-field": "^23.1.3", "leaflet": "^1.8.0", "leaflet-geosearch": "jlengrand/leaflet-geosearch#update", @@ -2592,6 +2594,32 @@ "@types/node": "*" } }, + "node_modules/@vaadin/app-layout": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/app-layout/-/app-layout-23.1.3.tgz", + "integrity": "sha512-/v8MX2XrHdxNuCbqUH6ytMzd/DXXE1tF1/1kvKNiQonrMw/0NyCid8A3mA+kqx1f4nx1gKamyKDvHcfqQjEWoQ==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.3", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "node_modules/@vaadin/button": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.3.tgz", + "integrity": "sha512-e4MiQ+ZK04sahtx5dY1x3UC8UZUf0rwI4dQX5CDG3Yi+PltAC4Wlb5SNVG/oazivFg7eCdWJN9GHRArkw9PkXw==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, "node_modules/@vaadin/component-base": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.3.tgz", @@ -2650,6 +2678,33 @@ "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, + "node_modules/@vaadin/item": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/item/-/item-23.1.3.tgz", + "integrity": "sha512-jQsS8bhDMgMq3mfEjvGvnbQC9d3BL9R9+U3fKwkxPa6k8ASaYwtrRGIl3F+oRippAIBf/bDflfC09KjHEDAezA==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "node_modules/@vaadin/tabs": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/tabs/-/tabs-23.1.3.tgz", + "integrity": "sha512-5qY3IcNpct7oTLOPB163Ca2WW5AjHEdKlerhS5QdQtVWYurJZHVfy/tgx+pqo/xflBZsPZKLH/LFd4m4OklnGg==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3", + "@vaadin/item": "^23.1.3", + "@vaadin/vaadin-list-mixin": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, "node_modules/@vaadin/text-field": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.3.tgz", @@ -2669,6 +2724,16 @@ "resolved": "https://registry.npmjs.org/@vaadin/vaadin-development-mode-detector/-/vaadin-development-mode-detector-2.0.5.tgz", "integrity": "sha512-miirBQw10UHjKwRv29iZniXCo41cLg3wFotoyTeUZ2PTGIDk/fZVFr4Q4WVKZrp3D15878vz94nNQROSmPLjdg==" }, + "node_modules/@vaadin/vaadin-list-mixin": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-list-mixin/-/vaadin-list-mixin-23.1.3.tgz", + "integrity": "sha512-PpxHMUY0TSiVCwoxVSgBP1BVApfyEmXaBDgreeJ5Bt7ma+OMf35yrZDNwPqQPNs4cvAfADhDT7DhpWsqkHodOg==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3" + } + }, "node_modules/@vaadin/vaadin-lumo-styles": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.3.tgz", @@ -12262,6 +12327,32 @@ "@types/node": "*" } }, + "@vaadin/app-layout": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/app-layout/-/app-layout-23.1.3.tgz", + "integrity": "sha512-/v8MX2XrHdxNuCbqUH6ytMzd/DXXE1tF1/1kvKNiQonrMw/0NyCid8A3mA+kqx1f4nx1gKamyKDvHcfqQjEWoQ==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.3", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "@vaadin/button": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.3.tgz", + "integrity": "sha512-e4MiQ+ZK04sahtx5dY1x3UC8UZUf0rwI4dQX5CDG3Yi+PltAC4Wlb5SNVG/oazivFg7eCdWJN9GHRArkw9PkXw==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, "@vaadin/component-base": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.3.tgz", @@ -12320,6 +12411,33 @@ "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, + "@vaadin/item": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/item/-/item-23.1.3.tgz", + "integrity": "sha512-jQsS8bhDMgMq3mfEjvGvnbQC9d3BL9R9+U3fKwkxPa6k8ASaYwtrRGIl3F+oRippAIBf/bDflfC09KjHEDAezA==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "@vaadin/tabs": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/tabs/-/tabs-23.1.3.tgz", + "integrity": "sha512-5qY3IcNpct7oTLOPB163Ca2WW5AjHEdKlerhS5QdQtVWYurJZHVfy/tgx+pqo/xflBZsPZKLH/LFd4m4OklnGg==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3", + "@vaadin/item": "^23.1.3", + "@vaadin/vaadin-list-mixin": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, "@vaadin/text-field": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.3.tgz", @@ -12339,6 +12457,16 @@ "resolved": "https://registry.npmjs.org/@vaadin/vaadin-development-mode-detector/-/vaadin-development-mode-detector-2.0.5.tgz", "integrity": "sha512-miirBQw10UHjKwRv29iZniXCo41cLg3wFotoyTeUZ2PTGIDk/fZVFr4Q4WVKZrp3D15878vz94nNQROSmPLjdg==" }, + "@vaadin/vaadin-list-mixin": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-list-mixin/-/vaadin-list-mixin-23.1.3.tgz", + "integrity": "sha512-PpxHMUY0TSiVCwoxVSgBP1BVApfyEmXaBDgreeJ5Bt7ma+OMf35yrZDNwPqQPNs4cvAfADhDT7DhpWsqkHodOg==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3" + } + }, "@vaadin/vaadin-lumo-styles": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.3.tgz", diff --git a/src/main/js/pluckr-app/package.json b/src/main/js/pluckr-app/package.json index 24b66a0..87d6516 100644 --- a/src/main/js/pluckr-app/package.json +++ b/src/main/js/pluckr-app/package.json @@ -15,8 +15,10 @@ }, "dependencies": { "@mapbox/mapbox-gl-geocoder": "^5.0.1", + "@vaadin/app-layout": "^23.1.3", "@vaadin/icon": "^23.1.3", "@vaadin/icons": "^23.1.3", + "@vaadin/tabs": "^23.1.3", "@vaadin/text-field": "^23.1.3", "leaflet": "^1.8.0", "leaflet-geosearch": "jlengrand/leaflet-geosearch#update", diff --git a/src/main/js/pluckr-app/src/PluckrApp.js b/src/main/js/pluckr-app/src/PluckrApp.js index 57bf78d..50b163d 100644 --- a/src/main/js/pluckr-app/src/PluckrApp.js +++ b/src/main/js/pluckr-app/src/PluckrApp.js @@ -1,6 +1,10 @@ import { LitElement, html, css } from 'lit'; import '@vaadin/text-field'; import '@vaadin/icons'; +import '@vaadin/app-layout'; +import '@vaadin/app-layout/vaadin-drawer-toggle.js'; +import '@vaadin/tabs'; + import mapboxgl from '../dist/mapbox-gl.esm.js' import MapboxGeocoder from '../dist/mapbox-gl-geocoder.esm.min.js' @@ -101,13 +105,34 @@ export class PluckrApp extends LitElement { /> -
-

${this.title}

- - - -
-
+ + + + +

${this.title}

+ + + + + + Profile + + + + + + Contact + + + + +
+ + + +
+
+
`; } } diff --git a/src/main/kotlin/nl/lengrand/pluckr/Application.kt b/src/main/kotlin/nl/lengrand/pluckr/Application.kt index 7ee1e57..9314365 100644 --- a/src/main/kotlin/nl/lengrand/pluckr/Application.kt +++ b/src/main/kotlin/nl/lengrand/pluckr/Application.kt @@ -1,13 +1,17 @@ package nl.lengrand.pluckr +import UserSession import io.ktor.serialization.kotlinx.json.* import io.ktor.server.application.* +import io.ktor.server.auth.* import io.ktor.server.engine.* import io.ktor.server.metrics.micrometer.* import io.ktor.server.netty.* import io.ktor.server.plugins.callloging.* import io.ktor.server.plugins.contentnegotiation.* import io.ktor.server.plugins.cors.routing.* +import io.ktor.server.response.* +import io.ktor.server.sessions.* import kotlinx.serialization.json.Json import net.postgis.jdbc.geometry.Point import nl.lengrand.pluckr.plugins.* @@ -18,7 +22,29 @@ fun Application.myapp(){ val database = initDb() - install(CORS) + install(Sessions) { + cookie("user_session") { + cookie.path = "/" + cookie.maxAgeInSeconds = 6000 + } + } + + install(Authentication) { + session("auth-session") { + validate { session -> + if(session.name.startsWith("jet")) { + session + } else { + null + } + } + challenge { + call.respondRedirect("/login") + } + } + } + +// install(CORS) install(ContentNegotiation){ json(Json { prettyPrint = true diff --git a/src/main/kotlin/nl/lengrand/pluckr/Controller.kt b/src/main/kotlin/nl/lengrand/pluckr/Controller.kt index 77ae474..1c83cdd 100644 --- a/src/main/kotlin/nl/lengrand/pluckr/Controller.kt +++ b/src/main/kotlin/nl/lengrand/pluckr/Controller.kt @@ -1,3 +1,4 @@ +import io.ktor.server.auth.* import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -11,6 +12,9 @@ import org.jetbrains.exposed.sql.ResultRow import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.transactions.transaction +@Serializable +data class UserSession(val name: String) : Principal + @Serializable data class Tree( val id: Int? = null, @@ -43,7 +47,6 @@ private fun fromRow(it: ResultRow): Tree { } class Controller(private val database: Database) { - fun getTrees() : ArrayList { val trees : ArrayList = arrayListOf() transaction(database){ diff --git a/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt b/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt index c5f9df9..3b10c12 100644 --- a/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt +++ b/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt @@ -1,10 +1,13 @@ package nl.lengrand.pluckr.plugins import Controller +import UserSession import io.ktor.server.routing.* import io.ktor.server.application.* +import io.ktor.server.auth.* import io.ktor.server.http.content.* import io.ktor.server.response.* +import io.ktor.server.sessions.* import org.jetbrains.exposed.sql.Database fun Application.configureRouting(database: Database) { @@ -12,6 +15,14 @@ fun Application.configureRouting(database: Database) { val controller = Controller(database) routing { + authenticate("auth-form") { + post("/api/login") { + val userName = call.principal()?.name.toString() + call.sessions.set(UserSession(name = userName)) + call.respondRedirect("/hello") + } + } + get("/api/trees") { println("IN HERE FIRST") if(call.request.queryParameters["bbox"] != null){ From 95de43c6fb137c72f7c2eaa1a24d054ec78310d7 Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Sat, 16 Jul 2022 15:55:33 +0200 Subject: [PATCH 3/7] Creates signup form --- src/main/js/pluckr-app/package-lock.json | 337 ++- src/main/js/pluckr-app/package.json | 7 +- src/main/js/pluckr-app/src/PluckrApp.js | 28 +- src/main/js/pluckr-app/src/PluckrLogin.js | 75 + src/main/js/pluckr-app/src/pluckr-login.js | 3 + src/main/resources/dist/c3e72859.js | 3156 ++++++++++++++++++++ 6 files changed, 3492 insertions(+), 114 deletions(-) create mode 100644 src/main/js/pluckr-app/src/PluckrLogin.js create mode 100644 src/main/js/pluckr-app/src/pluckr-login.js create mode 100644 src/main/resources/dist/c3e72859.js diff --git a/src/main/js/pluckr-app/package-lock.json b/src/main/js/pluckr-app/package-lock.json index 48fddeb..d1c5a57 100644 --- a/src/main/js/pluckr-app/package-lock.json +++ b/src/main/js/pluckr-app/package-lock.json @@ -11,10 +11,15 @@ "dependencies": { "@mapbox/mapbox-gl-geocoder": "^5.0.1", "@vaadin/app-layout": "^23.1.3", + "@vaadin/button": "^23.1.3", + "@vaadin/dialog": "^23.1.4", + "@vaadin/form-layout": "^23.1.4", + "@vaadin/horizontal-layout": "^23.1.3", "@vaadin/icon": "^23.1.3", "@vaadin/icons": "^23.1.3", + "@vaadin/password-field": "^23.1.4", "@vaadin/tabs": "^23.1.3", - "@vaadin/text-field": "^23.1.3", + "@vaadin/text-field": "^23.1.4", "leaflet": "^1.8.0", "leaflet-geosearch": "jlengrand/leaflet-geosearch#update", "lit": "^2.0.2", @@ -2608,22 +2613,22 @@ } }, "node_modules/@vaadin/button": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.3.tgz", - "integrity": "sha512-e4MiQ+ZK04sahtx5dY1x3UC8UZUf0rwI4dQX5CDG3Yi+PltAC4Wlb5SNVG/oazivFg7eCdWJN9GHRArkw9PkXw==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.4.tgz", + "integrity": "sha512-RIKl5wdLXfXAgh/6Ld2Goiww5uLR0QLB+In7fWKZmLaK6xByAhsoYeJCjdKjBCA3VwypvWpyy4M2LPdzKjAnzw==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", - "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-material-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "node_modules/@vaadin/component-base": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.3.tgz", - "integrity": "sha512-+RBptC6XS6qbsEBouYuqPby4MwOGgLMjAP0eE+yifr29GZm8Pvfnz7703c9IXp2DdcvCBaNDNvPnsAdEpaAl9A==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.4.tgz", + "integrity": "sha512-qlMY0j2WWuEtVa/XN3yXVPmkrRP6JZ4SqXDpfrOXXmmXPouGPtBkLJ6qskabUyO9BO/pKgiOpVlmWbceu5L5/A==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", @@ -2632,26 +2637,65 @@ "lit": "^2.0.0" } }, - "node_modules/@vaadin/field-base": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.3.tgz", - "integrity": "sha512-rLO6JZj/H/5TtPMLho9U7NmlIHvBe4AtwlEqyjonX7DPw/ThSa2rtt3RKn8CKWTw8Zzgyx00q42CjNsSq2BjPA==", + "node_modules/@vaadin/dialog": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/dialog/-/dialog-23.1.4.tgz", + "integrity": "sha512-/gtSq/b7HaVTqpQBhgHW2qxMxH0VhwnUGuy1ykYYsd40y+A6leVHSzs3I37gsBbyXThw39dAvpq+uE/PLJf5Xg==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", + "@vaadin/component-base": "^23.1.4", + "@vaadin/lit-renderer": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-overlay": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/field-base": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.4.tgz", + "integrity": "sha512-lRJIyKcAKUPj5VIKWy0jyVZuUxWsBETiOEdBc4yQZVlSPCIdSu+LXUUIUychbzRlF8fDFxk/NRIaH/IYG4McCg==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", "lit": "^2.0.0" } }, - "node_modules/@vaadin/icon": { + "node_modules/@vaadin/form-layout": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/form-layout/-/form-layout-23.1.4.tgz", + "integrity": "sha512-jlITymNzINZqCW9tV1rC2TdE38GmCWkbi54J2wkNWtfAlhrASOQhyL0iBnfmOPbL87c5J8LSAfGGblNThTFEEA==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/horizontal-layout": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.3.tgz", - "integrity": "sha512-0rMRYKBlHw5T4WNYFYnVX7eLXevsSNhApfzFWr3T1BVVajSBECVe7eCt+jClibhAAbcNzYhAs8SC/rwY17AcOg==", + "resolved": "https://registry.npmjs.org/@vaadin/horizontal-layout/-/horizontal-layout-23.1.3.tgz", + "integrity": "sha512-dhOAlG0oI0UZXwfDLWJZ7D5T8hFxTNnAplJA0BJ52f42HYzgNLuC8nfokfW81gOI/iIVY+d//IU0JFRfKoJTFA==", "dependencies": { "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "node_modules/@vaadin/icon": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.4.tgz", + "integrity": "sha512-Av8vfElbKCU3alMlkDtofOccG9V3j9sOhqnPQ39HPfo+omAh1Ee6afXr67Qi7KayhpL4uD6po0PMbof1Xz3Qpw==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4", "lit": "^2.0.0" } }, @@ -2667,15 +2711,15 @@ } }, "node_modules/@vaadin/input-container": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.3.tgz", - "integrity": "sha512-+PFd8bWbnVy89HmYNc/uvUV4KuxOvFYBBrsmnpKKW5Tc5wzCMa6vCXEyyDxuiVOkFnHU24P7kBSyqia7HHjaTg==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.4.tgz", + "integrity": "sha512-+C7W/C/pFBFcuLONtPvvJmzXvEI/6YYID9VwpOIigDEvAVI0beJTiM6meHxfUMfxMHwvcUd5Y8hY2r/LOOnXyA==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", - "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-material-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "node_modules/@vaadin/item": { @@ -2691,6 +2735,26 @@ "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, + "node_modules/@vaadin/lit-renderer": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-23.1.4.tgz", + "integrity": "sha512-XkF3t/Ya0NK/+2IyXe/iAS2FPkq/v64J70pkB8mneqUncEceitzQW/ODlf3wXx0wwxniPrsOUvYicD3Lhwu4qQ==", + "dependencies": { + "lit": "^2.0.0" + } + }, + "node_modules/@vaadin/password-field": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/password-field/-/password-field-23.1.4.tgz", + "integrity": "sha512-PkTarFwvLEkLMRsz4niJTDsf+lVmWXfm6UHIE69vbU5s63NUFolEOEyuq8JWYcDICKtvBYQ8uDH4zzpv3N5vmQ==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.4", + "@vaadin/text-field": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4" + } + }, "node_modules/@vaadin/tabs": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/tabs/-/tabs-23.1.3.tgz", @@ -2706,17 +2770,17 @@ } }, "node_modules/@vaadin/text-field": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.3.tgz", - "integrity": "sha512-oYxJDo5AU+lE+vqY7otvYqnSoXf233/iJKISLF4C/d5pofx/GvnDx2/dSopvJ2OSp1S1mn/CaVPazjBeXY7eLg==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.4.tgz", + "integrity": "sha512-pMaPR0KLaXb6PB3lscf7jJKRvUnGdB18oOmJKxiYO1vA0q6U8hUbeZ4ba2vGUl+m7hA6t6DbkTB4SBQdRq3tnQ==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", - "@vaadin/field-base": "^23.1.3", - "@vaadin/input-container": "^23.1.3", - "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-material-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/component-base": "^23.1.4", + "@vaadin/field-base": "^23.1.4", + "@vaadin/input-container": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "node_modules/@vaadin/vaadin-development-mode-detector": { @@ -2735,30 +2799,42 @@ } }, "node_modules/@vaadin/vaadin-lumo-styles": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.3.tgz", - "integrity": "sha512-edfO/By6M8s5tblxj7ze8x2CMgGr0O9ZKPeHatrl+yk1dNZLXKdgCbhZQdQxRrx7GiyVBkim7wDNBkpkWSpdZQ==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.4.tgz", + "integrity": "sha512-zZRpMRJ2xjDAX8FhnhclJIo1l+kySGcyJ+SaFVAa2nB85sC1JWdELmZGwSpCS+ZH1ss6lTp3XY5fniRuPO98WQ==", "dependencies": { "@polymer/iron-icon": "^3.0.0", "@polymer/iron-iconset-svg": "^3.0.0", "@polymer/polymer": "^3.0.0", - "@vaadin/icon": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/icon": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "node_modules/@vaadin/vaadin-material-styles": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.3.tgz", - "integrity": "sha512-VPqa/ZxYa8t7tsxCkK+r/SedU413NDexBmDGmnLhn+zGHaL0qgbXQP/te7p8YCHhyEj/bOxwcgyNTFuPNeQb1w==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.4.tgz", + "integrity": "sha512-GLIMrFbK/jBFg+6LZI3XkVBKqGSzmf/Cd2rIU2+BcpMnOtUNXxe5Ip4WaPgzIJRemSNy1M1eS0GNimSiAS618w==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/vaadin-overlay": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-overlay/-/vaadin-overlay-23.1.4.tgz", + "integrity": "sha512-RvwgdfSDwYDn63fVVm3jrDcWbR47XX2wMon8lJSc+TQ5C43cDCpyhrjHFzR4BU/LJXCIlZ878wUrJYFZKI5QgQ==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "node_modules/@vaadin/vaadin-themable-mixin": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.3.tgz", - "integrity": "sha512-xA+p9lfzUWT+Dd0R8CM+bFBI5qqZFbPL5ZjJ3POx3qd9DGgByG+tUvJlkRCEEDykh9SY6knqh0TbRUqOY3ws5A==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.4.tgz", + "integrity": "sha512-b91SHVU+E7pWnpJooLDOEyqpGfPVOj+L8wTEpL3GJh/ASi0htenslOtqDodpDiAEpVs4gRlo3ZJRtMzQZ7KsGA==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "lit": "^2.0.0" @@ -12341,22 +12417,22 @@ } }, "@vaadin/button": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.3.tgz", - "integrity": "sha512-e4MiQ+ZK04sahtx5dY1x3UC8UZUf0rwI4dQX5CDG3Yi+PltAC4Wlb5SNVG/oazivFg7eCdWJN9GHRArkw9PkXw==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.4.tgz", + "integrity": "sha512-RIKl5wdLXfXAgh/6Ld2Goiww5uLR0QLB+In7fWKZmLaK6xByAhsoYeJCjdKjBCA3VwypvWpyy4M2LPdzKjAnzw==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", - "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-material-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "@vaadin/component-base": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.3.tgz", - "integrity": "sha512-+RBptC6XS6qbsEBouYuqPby4MwOGgLMjAP0eE+yifr29GZm8Pvfnz7703c9IXp2DdcvCBaNDNvPnsAdEpaAl9A==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.4.tgz", + "integrity": "sha512-qlMY0j2WWuEtVa/XN3yXVPmkrRP6JZ4SqXDpfrOXXmmXPouGPtBkLJ6qskabUyO9BO/pKgiOpVlmWbceu5L5/A==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", @@ -12365,26 +12441,65 @@ "lit": "^2.0.0" } }, - "@vaadin/field-base": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.3.tgz", - "integrity": "sha512-rLO6JZj/H/5TtPMLho9U7NmlIHvBe4AtwlEqyjonX7DPw/ThSa2rtt3RKn8CKWTw8Zzgyx00q42CjNsSq2BjPA==", + "@vaadin/dialog": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/dialog/-/dialog-23.1.4.tgz", + "integrity": "sha512-/gtSq/b7HaVTqpQBhgHW2qxMxH0VhwnUGuy1ykYYsd40y+A6leVHSzs3I37gsBbyXThw39dAvpq+uE/PLJf5Xg==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", + "@vaadin/component-base": "^23.1.4", + "@vaadin/lit-renderer": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-overlay": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/field-base": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.4.tgz", + "integrity": "sha512-lRJIyKcAKUPj5VIKWy0jyVZuUxWsBETiOEdBc4yQZVlSPCIdSu+LXUUIUychbzRlF8fDFxk/NRIaH/IYG4McCg==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", "lit": "^2.0.0" } }, - "@vaadin/icon": { + "@vaadin/form-layout": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/form-layout/-/form-layout-23.1.4.tgz", + "integrity": "sha512-jlITymNzINZqCW9tV1rC2TdE38GmCWkbi54J2wkNWtfAlhrASOQhyL0iBnfmOPbL87c5J8LSAfGGblNThTFEEA==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/horizontal-layout": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.3.tgz", - "integrity": "sha512-0rMRYKBlHw5T4WNYFYnVX7eLXevsSNhApfzFWr3T1BVVajSBECVe7eCt+jClibhAAbcNzYhAs8SC/rwY17AcOg==", + "resolved": "https://registry.npmjs.org/@vaadin/horizontal-layout/-/horizontal-layout-23.1.3.tgz", + "integrity": "sha512-dhOAlG0oI0UZXwfDLWJZ7D5T8hFxTNnAplJA0BJ52f42HYzgNLuC8nfokfW81gOI/iIVY+d//IU0JFRfKoJTFA==", "requires": { "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "@vaadin/icon": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.4.tgz", + "integrity": "sha512-Av8vfElbKCU3alMlkDtofOccG9V3j9sOhqnPQ39HPfo+omAh1Ee6afXr67Qi7KayhpL4uD6po0PMbof1Xz3Qpw==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4", "lit": "^2.0.0" } }, @@ -12400,15 +12515,15 @@ } }, "@vaadin/input-container": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.3.tgz", - "integrity": "sha512-+PFd8bWbnVy89HmYNc/uvUV4KuxOvFYBBrsmnpKKW5Tc5wzCMa6vCXEyyDxuiVOkFnHU24P7kBSyqia7HHjaTg==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.4.tgz", + "integrity": "sha512-+C7W/C/pFBFcuLONtPvvJmzXvEI/6YYID9VwpOIigDEvAVI0beJTiM6meHxfUMfxMHwvcUd5Y8hY2r/LOOnXyA==", "requires": { "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", - "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-material-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "@vaadin/item": { @@ -12424,6 +12539,26 @@ "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, + "@vaadin/lit-renderer": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-23.1.4.tgz", + "integrity": "sha512-XkF3t/Ya0NK/+2IyXe/iAS2FPkq/v64J70pkB8mneqUncEceitzQW/ODlf3wXx0wwxniPrsOUvYicD3Lhwu4qQ==", + "requires": { + "lit": "^2.0.0" + } + }, + "@vaadin/password-field": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/password-field/-/password-field-23.1.4.tgz", + "integrity": "sha512-PkTarFwvLEkLMRsz4niJTDsf+lVmWXfm6UHIE69vbU5s63NUFolEOEyuq8JWYcDICKtvBYQ8uDH4zzpv3N5vmQ==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.4", + "@vaadin/text-field": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4" + } + }, "@vaadin/tabs": { "version": "23.1.3", "resolved": "https://registry.npmjs.org/@vaadin/tabs/-/tabs-23.1.3.tgz", @@ -12439,17 +12574,17 @@ } }, "@vaadin/text-field": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.3.tgz", - "integrity": "sha512-oYxJDo5AU+lE+vqY7otvYqnSoXf233/iJKISLF4C/d5pofx/GvnDx2/dSopvJ2OSp1S1mn/CaVPazjBeXY7eLg==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.4.tgz", + "integrity": "sha512-pMaPR0KLaXb6PB3lscf7jJKRvUnGdB18oOmJKxiYO1vA0q6U8hUbeZ4ba2vGUl+m7hA6t6DbkTB4SBQdRq3tnQ==", "requires": { "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", - "@vaadin/field-base": "^23.1.3", - "@vaadin/input-container": "^23.1.3", - "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-material-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/component-base": "^23.1.4", + "@vaadin/field-base": "^23.1.4", + "@vaadin/input-container": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "@vaadin/vaadin-development-mode-detector": { @@ -12468,30 +12603,42 @@ } }, "@vaadin/vaadin-lumo-styles": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.3.tgz", - "integrity": "sha512-edfO/By6M8s5tblxj7ze8x2CMgGr0O9ZKPeHatrl+yk1dNZLXKdgCbhZQdQxRrx7GiyVBkim7wDNBkpkWSpdZQ==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.4.tgz", + "integrity": "sha512-zZRpMRJ2xjDAX8FhnhclJIo1l+kySGcyJ+SaFVAa2nB85sC1JWdELmZGwSpCS+ZH1ss6lTp3XY5fniRuPO98WQ==", "requires": { "@polymer/iron-icon": "^3.0.0", "@polymer/iron-iconset-svg": "^3.0.0", "@polymer/polymer": "^3.0.0", - "@vaadin/icon": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/icon": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "@vaadin/vaadin-material-styles": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.3.tgz", - "integrity": "sha512-VPqa/ZxYa8t7tsxCkK+r/SedU413NDexBmDGmnLhn+zGHaL0qgbXQP/te7p8YCHhyEj/bOxwcgyNTFuPNeQb1w==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.4.tgz", + "integrity": "sha512-GLIMrFbK/jBFg+6LZI3XkVBKqGSzmf/Cd2rIU2+BcpMnOtUNXxe5Ip4WaPgzIJRemSNy1M1eS0GNimSiAS618w==", "requires": { "@polymer/polymer": "^3.0.0", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/vaadin-overlay": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-overlay/-/vaadin-overlay-23.1.4.tgz", + "integrity": "sha512-RvwgdfSDwYDn63fVVm3jrDcWbR47XX2wMon8lJSc+TQ5C43cDCpyhrjHFzR4BU/LJXCIlZ878wUrJYFZKI5QgQ==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "@vaadin/vaadin-themable-mixin": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.3.tgz", - "integrity": "sha512-xA+p9lfzUWT+Dd0R8CM+bFBI5qqZFbPL5ZjJ3POx3qd9DGgByG+tUvJlkRCEEDykh9SY6knqh0TbRUqOY3ws5A==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.4.tgz", + "integrity": "sha512-b91SHVU+E7pWnpJooLDOEyqpGfPVOj+L8wTEpL3GJh/ASi0htenslOtqDodpDiAEpVs4gRlo3ZJRtMzQZ7KsGA==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "lit": "^2.0.0" diff --git a/src/main/js/pluckr-app/package.json b/src/main/js/pluckr-app/package.json index 87d6516..5c80b37 100644 --- a/src/main/js/pluckr-app/package.json +++ b/src/main/js/pluckr-app/package.json @@ -16,10 +16,15 @@ "dependencies": { "@mapbox/mapbox-gl-geocoder": "^5.0.1", "@vaadin/app-layout": "^23.1.3", + "@vaadin/button": "^23.1.3", + "@vaadin/dialog": "^23.1.4", + "@vaadin/form-layout": "^23.1.4", + "@vaadin/horizontal-layout": "^23.1.3", "@vaadin/icon": "^23.1.3", "@vaadin/icons": "^23.1.3", + "@vaadin/password-field": "^23.1.4", "@vaadin/tabs": "^23.1.3", - "@vaadin/text-field": "^23.1.3", + "@vaadin/text-field": "^23.1.4", "leaflet": "^1.8.0", "leaflet-geosearch": "jlengrand/leaflet-geosearch#update", "lit": "^2.0.2", diff --git a/src/main/js/pluckr-app/src/PluckrApp.js b/src/main/js/pluckr-app/src/PluckrApp.js index 50b163d..01ec084 100644 --- a/src/main/js/pluckr-app/src/PluckrApp.js +++ b/src/main/js/pluckr-app/src/PluckrApp.js @@ -1,9 +1,12 @@ import { LitElement, html, css } from 'lit'; +import './pluckr-login'; + import '@vaadin/text-field'; import '@vaadin/icons'; import '@vaadin/app-layout'; import '@vaadin/app-layout/vaadin-drawer-toggle.js'; import '@vaadin/tabs'; +import '@vaadin/button'; import mapboxgl from '../dist/mapbox-gl.esm.js' import MapboxGeocoder from '../dist/mapbox-gl-geocoder.esm.min.js' @@ -42,12 +45,17 @@ export class PluckrApp extends LitElement { height: 1096px; width: 1096px; } + + pluckr-login{ + margin-left: auto; + + } `; } constructor() { super(); - this.title = 'My app'; + this.title = 'Pluckr'; this.location = { x: 52.0474828687443, y: 5.080036739440433}; } @@ -107,25 +115,9 @@ export class PluckrApp extends LitElement { -

${this.title}

- - - - - - Profile - - - - - - Contact - - - - +
diff --git a/src/main/js/pluckr-app/src/PluckrLogin.js b/src/main/js/pluckr-app/src/PluckrLogin.js new file mode 100644 index 0000000..d816ae2 --- /dev/null +++ b/src/main/js/pluckr-app/src/PluckrLogin.js @@ -0,0 +1,75 @@ +import {css, html, LitElement} from "lit"; +import '@vaadin/horizontal-layout'; +import '@vaadin/button'; +import '@vaadin/dialog'; +import '@vaadin/form-layout'; +import '@vaadin/text-field'; +import '@vaadin/password-field'; +import {dialogRenderer} from "@vaadin/dialog/lit"; +import '@vaadin/horizontal-layout'; + +export class PluckrLogin extends LitElement{ + + responsiveSteps = [ + { minWidth: 0, columns: 1 }, + ]; + + static get properties(){ + return { + signUpOpened : { type: Boolean } + }; + } + + static get styles(){ + return css` + + `; + } + + constructor() { + super(); + this.signUpOpened = false; + } + + render(){ + return html` + + Sign up + Login + + + + + + + `; + } + + signUpClicked(){ + this.signUpOpened = true; + console.log("Signup clicked!"); + } + + signUpRenderer(){ + return html` + + + + + + Cancel + Sign up + + + `; + } + + signUp(){ + console.log("Signup clicked!"); + } +} diff --git a/src/main/js/pluckr-app/src/pluckr-login.js b/src/main/js/pluckr-app/src/pluckr-login.js new file mode 100644 index 0000000..62a11d2 --- /dev/null +++ b/src/main/js/pluckr-app/src/pluckr-login.js @@ -0,0 +1,3 @@ +import {PluckrLogin} from "./PluckrLogin.js"; + +customElements.define('pluckr-login', PluckrLogin); diff --git a/src/main/resources/dist/c3e72859.js b/src/main/resources/dist/c3e72859.js new file mode 100644 index 0000000..85c6c42 --- /dev/null +++ b/src/main/resources/dist/c3e72859.js @@ -0,0 +1,3156 @@ +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),i=new WeakMap;class r{constructor(t,i,r){if(this._$cssResult$=!0,r!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let e=this.o;const r=this.t;if(t&&void 0===e){const t=void 0!==r&&1===r.length;t&&(e=i.get(r)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&i.set(r,e))}return e}toString(){return this.cssText}}const n=(t,...i)=>{const n=1===t.length?t[0]:i.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new r(n,t,e)},o=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,e))(i)})(t):t +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;var a;const s=window.trustedTypes,l=s?s.emptyScript:"",h=window.reactiveElementPolyfillSupport,c={toAttribute(t,e){switch(e){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},u=(t,e)=>e!==t&&(e==e||t==t),d={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:u};class p extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const r=this._$Ep(i,e);void 0!==r&&(this._$Ev.set(r,i),t.push(r))})),t}static createProperty(t,e=d){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,i,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(r){const n=this[t];this[e]=r,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||d}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(o(t))}else void 0!==t&&e.push(o(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var e;const i=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,i)=>{t?e.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((t=>{const i=document.createElement("style"),r=window.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=t.cssText,e.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=d){var r,n;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const a=(null!==(n=null===(r=i.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==n?n:c.toAttribute)(e,i.type);this._$El=t,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null}}_$AK(t,e){var i,r;const n=this.constructor,o=n._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=n.getPropertyOptions(o),a=t.converter,s=null!==(r=null!==(i=null==a?void 0:a.fromAttribute)&&void 0!==i?i:"function"==typeof a?a:null)&&void 0!==r?r:c.fromAttribute;this._$El=o,this[o]=s(e,t.type),this._$El=null}}requestUpdate(t,e,i){let r=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var f;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:p}),(null!==(a=globalThis.reactiveElementVersions)&&void 0!==a?a:globalThis.reactiveElementVersions=[]).push("1.3.3");const m=globalThis.trustedTypes,v=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,_=`lit$${(Math.random()+"").slice(9)}$`,g="?"+_,y=`<${g}>`,x=document,b=(t="")=>x.createComment(t),w=t=>null===t||"object"!=typeof t&&"function"!=typeof t,z=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,E=/>/g,A=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,C=/'/g,S=/"/g,I=/^(?:script|style|textarea|title)$/i,P=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),k=P(1),L=P(2),D=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),O=new WeakMap,B=(t,e,i)=>{var r,n;const o=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let a=o._$litPart$;if(void 0===a){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;o._$litPart$=a=new $(e.insertBefore(b(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a},F=x.createTreeWalker(x,129,null,!1),N=(t,e)=>{const i=t.length-1,r=[];let n,o=2===e?"":"",a=M;for(let e=0;e"===l[0]?(a=null!=n?n:M,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?A:'"'===l[3]?S:C):a===S||a===C?a=A:a===T||a===E?a=M:(a=A,n=void 0);const u=a===A&&t[e+1].startsWith("/>")?" ":"";o+=a===M?i+y:h>=0?(r.push(s),i.slice(0,h)+"$lit$"+i.slice(h)+_+u):i+_+(-2===h?(r.push(void 0),e):u)}const s=o+(t[i]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==v?v.createHTML(s):s,r]};class U{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0;const a=t.length-1,s=this.parts,[l,h]=N(t,e);if(this.el=U.createElement(l,i),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=F.nextNode())&&s.length0){r.textContent=m?m.emptyScript:"";for(let i=0;i{var e;return z(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==R&&w(this._$AH)?this._$AA.nextSibling.data=t:this.k(x.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=U.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(i);else{const t=new V(n,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=O.get(t.strings);return void 0===e&&O.set(t.strings,e=new U(t)),e}S(t){z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new $(this.M(b()),this.M(b()),this,this.options)):i=e[r],i._$AI(n),r++;r2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const n=this.strings;let o=!1;if(void 0===n)t=j(this,t,e,0),o=!w(t)||t!==this._$AH&&t!==D,o&&(this._$AH=t);else{const r=t;let a,s;for(t=n[0],a=0;aclass extends t{static get properties(){return{theme:{type:String,reflectToAttribute:!0,observer:"__deprecatedThemePropertyChanged"},_theme:{type:String,readOnly:!0}}}__deprecatedThemePropertyChanged(t){this._set_theme(t)}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,rt=[];function nt(t,e,i={}){var n;t&&(n=t,ht(customElements.get(n))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`)),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof r||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):rt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function ot(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():rt}function at(t=""){let e=0;return 0===t.indexOf("lumo-")||0===t.indexOf("material-")?e=1:0===t.indexOf("vaadin-")&&(e=2),e}function st(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=ot().find((e=>e.moduleId===t));i?e.push(...st(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function lt(t){const e=`${t}-default-theme`,i=ot().filter((i=>i.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`).test(e)))}(i.themeFor,t))).map((t=>({...t,styles:[...st(t),...t.styles],includePriority:at(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:ot().filter((t=>t.moduleId===e))}function ht(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}const ct=t=>class extends(it(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!ht(this)&&function(t,e){const i=document.createElement("style");i.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype),e=(t?t.constructor.__themes:[])||[];this.__themes=[...e,...lt(this.is)];const i=this.__themes.flatMap((t=>t.styles));return i.filter(((t,e)=>e===i.lastIndexOf(t)))}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,ut=n` + :host { + /* Base (background) */ + --lumo-base-color: #fff; + + /* Tint */ + --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3); + --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37); + --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44); + --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5); + --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57); + --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64); + --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7); + --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77); + --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84); + --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9); + --lumo-tint: #fff; + + /* Shade */ + --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05); + --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1); + --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16); + --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26); + --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38); + --lumo-shade-50pct: hsla(214, 45%, 20%, 0.52); + --lumo-shade-60pct: hsla(214, 43%, 19%, 0.6); + --lumo-shade-70pct: hsla(214, 42%, 18%, 0.69); + --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83); + --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94); + --lumo-shade: hsl(214, 35%, 15%); + + /* Contrast */ + --lumo-contrast-5pct: var(--lumo-shade-5pct); + --lumo-contrast-10pct: var(--lumo-shade-10pct); + --lumo-contrast-20pct: var(--lumo-shade-20pct); + --lumo-contrast-30pct: var(--lumo-shade-30pct); + --lumo-contrast-40pct: var(--lumo-shade-40pct); + --lumo-contrast-50pct: var(--lumo-shade-50pct); + --lumo-contrast-60pct: var(--lumo-shade-60pct); + --lumo-contrast-70pct: var(--lumo-shade-70pct); + --lumo-contrast-80pct: var(--lumo-shade-80pct); + --lumo-contrast-90pct: var(--lumo-shade-90pct); + --lumo-contrast: var(--lumo-shade); + + /* Text */ + --lumo-header-text-color: var(--lumo-contrast); + --lumo-body-text-color: var(--lumo-contrast-90pct); + --lumo-secondary-text-color: var(--lumo-contrast-70pct); + --lumo-tertiary-text-color: var(--lumo-contrast-50pct); + --lumo-disabled-text-color: var(--lumo-contrast-30pct); + + /* Primary */ + --lumo-primary-color: hsl(214, 100%, 48%); + --lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76); + --lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13); + --lumo-primary-text-color: hsl(214, 100%, 43%); + --lumo-primary-contrast-color: #fff; + + /* Error */ + --lumo-error-color: hsl(3, 85%, 48%); + --lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5); + --lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1); + --lumo-error-text-color: hsl(3, 89%, 42%); + --lumo-error-contrast-color: #fff; + + /* Success */ + --lumo-success-color: hsl(145, 72%, 30%); + --lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5); + --lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1); + --lumo-success-text-color: hsl(145, 85%, 25%); + --lumo-success-contrast-color: #fff; + } +`,dt=document.createElement("template");dt.innerHTML=``,document.head.appendChild(dt.content);const pt=n` + [theme~='dark'] { + /* Base (background) */ + --lumo-base-color: hsl(214, 35%, 21%); + + /* Tint */ + --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06); + --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14); + --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23); + --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32); + --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41); + --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5); + --lumo-tint-60pct: hsla(214, 82%, 90%, 0.58); + --lumo-tint-70pct: hsla(214, 87%, 92%, 0.69); + --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8); + --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9); + --lumo-tint: hsl(214, 100%, 98%); + + /* Shade */ + --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07); + --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15); + --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23); + --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32); + --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41); + --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5); + --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6); + --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7); + --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8); + --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9); + --lumo-shade: hsl(214, 33%, 13%); + + /* Contrast */ + --lumo-contrast-5pct: var(--lumo-tint-5pct); + --lumo-contrast-10pct: var(--lumo-tint-10pct); + --lumo-contrast-20pct: var(--lumo-tint-20pct); + --lumo-contrast-30pct: var(--lumo-tint-30pct); + --lumo-contrast-40pct: var(--lumo-tint-40pct); + --lumo-contrast-50pct: var(--lumo-tint-50pct); + --lumo-contrast-60pct: var(--lumo-tint-60pct); + --lumo-contrast-70pct: var(--lumo-tint-70pct); + --lumo-contrast-80pct: var(--lumo-tint-80pct); + --lumo-contrast-90pct: var(--lumo-tint-90pct); + --lumo-contrast: var(--lumo-tint); + + /* Text */ + --lumo-header-text-color: var(--lumo-contrast); + --lumo-body-text-color: var(--lumo-contrast-90pct); + --lumo-secondary-text-color: var(--lumo-contrast-70pct); + --lumo-tertiary-text-color: var(--lumo-contrast-50pct); + --lumo-disabled-text-color: var(--lumo-contrast-30pct); + + /* Primary */ + --lumo-primary-color: hsl(214, 90%, 48%); + --lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69); + --lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13); + --lumo-primary-text-color: hsl(214, 90%, 77%); + --lumo-primary-contrast-color: #fff; + + /* Error */ + --lumo-error-color: hsl(3, 79%, 49%); + --lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5); + --lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14); + --lumo-error-text-color: hsl(3, 100%, 80%); + + /* Success */ + --lumo-success-color: hsl(145, 72%, 30%); + --lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5); + --lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1); + --lumo-success-text-color: hsl(145, 85%, 46%); + } + + html { + color: var(--lumo-body-text-color); + background-color: var(--lumo-base-color); + color-scheme: light; + } + + [theme~='dark'] { + color: var(--lumo-body-text-color); + background-color: var(--lumo-base-color); + color-scheme: dark; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + color: var(--lumo-header-text-color); + } + + a:where(:any-link) { + color: var(--lumo-primary-text-color); + } + + a:not(:any-link) { + color: var(--lumo-disabled-text-color); + } + + blockquote { + color: var(--lumo-secondary-text-color); + } + + code, + pre { + background-color: var(--lumo-contrast-10pct); + border-radius: var(--lumo-border-radius-m); + } +`;nt("",pt,{moduleId:"lumo-color"});nt("",[pt,n` + :host { + color: var(--lumo-body-text-color) !important; + background-color: var(--lumo-base-color) !important; + } +`],{moduleId:"lumo-color-legacy"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const ft=n` + :host { + --lumo-size-xs: 1.625rem; + --lumo-size-s: 1.875rem; + --lumo-size-m: 2.25rem; + --lumo-size-l: 2.75rem; + --lumo-size-xl: 3.5rem; + + /* Icons */ + --lumo-icon-size-s: 1.25em; + --lumo-icon-size-m: 1.5em; + --lumo-icon-size-l: 2.25em; + /* For backwards compatibility */ + --lumo-icon-size: var(--lumo-icon-size-m); + } +`,mt=document.createElement("template");mt.innerHTML=``,document.head.appendChild(mt.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const vt=n` + :host { + /* Border radius */ + --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */ + --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */ + --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */ + --lumo-border-radius: 0.25em; /* Deprecated */ + + /* Shadow */ + --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct); + --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct); + --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct); + --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct); + --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct); + + /* Clickable element cursor */ + --lumo-clickable-cursor: default; + } +`,_t=document.createElement("template");_t.innerHTML=``,document.head.appendChild(_t.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const gt=n` + :host { + /* prettier-ignore */ + --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + + /* Font sizes */ + --lumo-font-size-xxs: 0.75rem; + --lumo-font-size-xs: 0.8125rem; + --lumo-font-size-s: 0.875rem; + --lumo-font-size-m: 1rem; + --lumo-font-size-l: 1.125rem; + --lumo-font-size-xl: 1.375rem; + --lumo-font-size-xxl: 1.75rem; + --lumo-font-size-xxxl: 2.5rem; + + /* Line heights */ + --lumo-line-height-xs: 1.25; + --lumo-line-height-s: 1.375; + --lumo-line-height-m: 1.625; + } +`;nt("",n` + html, + :host { + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size, var(--lumo-font-size-m)); + line-height: var(--lumo-line-height-m); + -webkit-text-size-adjust: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + small, + [theme~='font-size-s'] { + font-size: var(--lumo-font-size-s); + line-height: var(--lumo-line-height-s); + } + + [theme~='font-size-xs'] { + font-size: var(--lumo-font-size-xs); + line-height: var(--lumo-line-height-xs); + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-weight: 600; + line-height: var(--lumo-line-height-xs); + margin-top: 1.25em; + } + + h1 { + font-size: var(--lumo-font-size-xxxl); + margin-bottom: 0.75em; + } + + h2 { + font-size: var(--lumo-font-size-xxl); + margin-bottom: 0.5em; + } + + h3 { + font-size: var(--lumo-font-size-xl); + margin-bottom: 0.5em; + } + + h4 { + font-size: var(--lumo-font-size-l); + margin-bottom: 0.5em; + } + + h5 { + font-size: var(--lumo-font-size-m); + margin-bottom: 0.25em; + } + + h6 { + font-size: var(--lumo-font-size-xs); + margin-bottom: 0; + text-transform: uppercase; + letter-spacing: 0.03em; + } + + p, + blockquote { + margin-top: 0.5em; + margin-bottom: 0.75em; + } + + a { + text-decoration: none; + } + + a:where(:any-link):hover { + text-decoration: underline; + } + + hr { + display: block; + align-self: stretch; + height: 1px; + border: 0; + padding: 0; + margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2); + background-color: var(--lumo-contrast-10pct); + } + + blockquote { + border-left: 2px solid var(--lumo-contrast-30pct); + } + + b, + strong { + font-weight: 600; + } + + /* RTL specific styles */ + blockquote[dir='rtl'] { + border-left: none; + border-right: 2px solid var(--lumo-contrast-30pct); + } +`,{moduleId:"lumo-typography"});const yt=document.createElement("template");yt.innerHTML=``,document.head.appendChild(yt.content),nt("vaadin-input-container",n` + :host { + border-radius: var(--lumo-border-radius-m); + background-color: var(--lumo-contrast-10pct); + padding: 0 calc(0.375em + var(--lumo-border-radius-m) / 4 - 1px); + font-weight: 500; + line-height: 1; + position: relative; + cursor: text; + box-sizing: border-box; + } + + /* Used for hover and activation effects */ + :host::after { + content: ''; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + border-radius: inherit; + pointer-events: none; + background-color: var(--lumo-contrast-50pct); + opacity: 0; + transition: transform 0.15s, opacity 0.2s; + transform-origin: 100% 0; + } + + ::slotted(:not([slot$='fix'])) { + cursor: inherit; + min-height: var(--lumo-text-field-size, var(--lumo-size-m)); + padding: 0 0.25em; + --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em); + -webkit-mask-image: var(--_lumo-text-field-overflow-mask-image); + mask-image: var(--_lumo-text-field-overflow-mask-image); + } + + /* Read-only */ + :host([readonly]) { + color: var(--lumo-secondary-text-color); + background-color: transparent; + cursor: default; + } + + :host([readonly])::after { + background-color: transparent; + opacity: 1; + border: 1px dashed var(--lumo-contrast-30pct); + } + + /* Disabled */ + :host([disabled]) { + background-color: var(--lumo-contrast-5pct); + } + + :host([disabled]) ::slotted(*) { + color: var(--lumo-disabled-text-color); + -webkit-text-fill-color: var(--lumo-disabled-text-color); + } + + /* Invalid */ + :host([invalid]) { + background-color: var(--lumo-error-color-10pct); + } + + :host([invalid])::after { + background-color: var(--lumo-error-color-50pct); + } + + /* Slotted icons */ + ::slotted(iron-icon), + ::slotted(vaadin-icon) { + color: var(--lumo-contrast-60pct); + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + + /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */ + ::slotted(iron-icon[icon^='vaadin:']), + ::slotted(vaadin-icon[icon^='vaadin:']) { + padding: 0.25em; + box-sizing: border-box !important; + } + + /* Text align */ + :host([dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em); + } + + @-moz-document url-prefix() { + :host([dir='rtl']) ::slotted(:not([slot$='fix'])) { + mask-image: var(--_lumo-text-field-overflow-mask-image); + } + } + + :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) { + text-align: start; + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-center']) ::slotted(:not([slot$='fix'])) { + text-align: center; + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) { + text-align: end; + --_lumo-text-field-overflow-mask-image: none; + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em); + } + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em); + } + } + + /* RTL specific styles */ + :host([dir='rtl'])::after { + transform-origin: 0% 0; + } + + :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: none; + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em); + } + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em); + } + } + `,{moduleId:"lumo-input-container"}), +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +window.JSCompiler_renameProperty=function(t,e){return t}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +let xt,bt,wt=/(url\()([^)]*)(\))/g,zt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Mt(t,e){if(t&&zt.test(t))return t;if("//"===t)return t;if(void 0===xt){xt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",xt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),xt)try{return new URL(t,e).href}catch(e){return t}return bt||(bt=document.implementation.createHTMLDocument("temp"),bt.base=bt.createElement("base"),bt.head.appendChild(bt.base),bt.anchor=bt.createElement("a"),bt.body.appendChild(bt.anchor)),bt.base.href=e,bt.anchor.href=t,bt.anchor.href||t}function Tt(t,e){return t.replace(wt,(function(t,i,r,n){return i+"'"+Mt(r.replace(/["']/g,""),e)+"'"+n}))}function Et(t){return t.substring(0,t.lastIndexOf("/")+1)} +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/const At=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const Ct=At&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let St=window.Polymer&&window.Polymer.rootPath||Et(document.baseURI||window.location.href),It=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;window.Polymer&&window.Polymer.setPassiveTouchGestures;let Pt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,kt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Lt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Dt=window.Polymer&&window.Polymer.legacyWarnings||!1,Rt=window.Polymer&&window.Polymer.syncInitialRender||!1,Ot=window.Polymer&&window.Polymer.legacyUndefined||!1,Bt=window.Polymer&&window.Polymer.orderedComputed||!1,Ft=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Nt=window.Polymer&&window.Polymer.fastDomIf||!1;window.Polymer&&window.Polymer.suppressTemplateNotifications,window.Polymer&&window.Polymer.legacyNoObservedAttributes;let Ut=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,jt=0; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/const Vt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=jt++;return function(r){let n=r.__mixinSet;if(n&&n[i])return r;let o=e,a=o.get(r);if(!a){a=t(r),o.set(r,a);let e=Object.create(a.__mixinSet||n||null);e[i]=!0,a.__mixinSet=e}return a}}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/let $t={},Gt={};function qt(t,e){$t[t]=Gt[t.toLowerCase()]=e}function Zt(t){return $t[t]||Gt[t.toLowerCase()]}class Ht extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Zt(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,r){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Mt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Et(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Pt&&void 0!==Zt(t))throw qt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,qt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}Ht.prototype.modules=$t,customElements.define("dom-module",Ht);function Wt(t){return Ht.import(t)}function Xt(t){const e=Tt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function Yt(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;tShadyDOM.patch(t):t=>t +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/;function ee(t){return t.indexOf(".")>=0}function ie(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function re(t,e){return 0===e.indexOf(t+".")}function ne(t,e,i){return e+i.slice(t.length)}function oe(t){if(Array.isArray(t)){let e=[];for(let i=0;i1){for(let t=0;tt[1].toUpperCase())))}function pe(t){return he[t]||(he[t]=t.replace(ue,"-$1").toLowerCase())} +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/let fe=0,me=0,ve=[],_e=0,ge=!1,ye=document.createTextNode("");new window.MutationObserver((function(){ge=!1;const t=ve.length;for(let e=0;e{throw t}))}}ve.splice(0,t),me+=t})).observe(ye,{characterData:!0});const xe={run:t=>(ge||(ge=!0,ye.textContent=_e++),ve.push(t),fe++),cancel(t){const e=t-me;if(e>=0){if(!ve[e])throw new Error("invalid async handle: "+t);ve[e]=null}}},be=xe,we=Vt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let r=this.__data[t],n=this._shouldPropertyChange(t,e,r);return n&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),n}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,be.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,r){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,r)}_attributeToProperty(t,e,i){if(!this.__serializing){const r=this.__dataAttributes,n=r&&r[t]||t;this[n]=this._deserializeValue(e,i||this.constructor.typeForProperty(n))}}_propertyToAttribute(t,e,i){this.__serializing=!0,i=arguments.length<3?this[t]:i,this._valueToNodeAttribute(this,i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const r=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=te(t)),void 0===r?t.removeAttribute(i):t.setAttribute(i,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),ze={}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/let Me=HTMLElement.prototype;for(;Me;){let t=Object.getOwnPropertyNames(Me);for(let e=0;etrustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1;const Ee=Vt((t=>{const e=we(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,r)=>{const n=i.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(n,r)):e.setAttribute(r,n)}})();function ke(t){let e=t.getAttribute("is");if(e&&Ae[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];Pe(t,i,e),i.removeAttribute(e)}}return t}function Le(t,e){let i=e.parentInfo&&Le(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function De(t,e,i,r){r.id&&(e[r.id]=i)}function Re(t,e,i){if(i.events&&i.events.length)for(let r,n=0,o=i.events;nclass extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let r=!1,n=t;return"template"!=n.localName||n.hasAttribute("preserve-content")?"slot"===n.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(n,e,i)||r,Ie(n),n.firstChild&&this._parseTemplateChildNodes(n,e,i),n.hasAttributes&&n.hasAttributes()&&(r=this._parseTemplateNodeAttributes(n,e,i)||r),r||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let r,n=t.firstChild,o=0;n;n=r){if("template"==n.localName&&(n=ke(n)),r=n.nextSibling,n.nodeType===Node.TEXT_NODE){let i=r;for(;i&&i.nodeType===Node.TEXT_NODE;)n.textContent+=i.textContent,r=i.nextSibling,t.removeChild(i),i=r;if(e.stripWhiteSpace&&!n.textContent.trim()){t.removeChild(n);continue}}let a={parentIndex:o,parentInfo:i};this._parseTemplateNode(n,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),n.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let r=t,n=this._parseTemplate(r,e);return(n.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),i.templateInfo=n,!0}static _parseTemplateNodeAttributes(t,e,i){let r=!1,n=Array.from(t.attributes);for(let o,a=n.length-1;o=n[a];a--)r=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||r;return r}static _parseTemplateNodeAttribute(t,e,i,r,n){return"on-"===r.slice(0,3)?(t.removeAttribute(r),i.events=i.events||[],i.events.push({name:r.slice(3),value:n}),!0):"id"===r&&(i.id=n,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,n=document.importNode(r,!0);n.__noInsertionPoint=!e.hasInsertionPoint;let o=n.nodeList=new Array(i.length);n.$={};for(let t,r=0,a=i.length;r!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||n.push(t);return{counts:i,ready:n,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=i[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--n[e]&&o.push(e)}))}if(0!==a){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)Qe(t,n,a,o,r);let s;for(;s=a.shift();)ti(t,"",e,i,s)&&Qe(s.methodInfo,n,a,o,r);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;$e(t,n,o,i,r);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}const Je=(t,e,i)=>{let r=0,n=e.length-1,o=-1;for(;r<=n;){const a=r+n>>1,s=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(s<0)r=a+1;else{if(!(s>0)){o=a;break}n=a-1}}o<0&&(o=n+1),e.splice(o,0,t)},Qe=(t,e,i,r,n)=>{const o=e[n?ie(t):t];if(o)for(let e=0;eh.source.length&&"property"==l.kind&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){let r=i[e];e=ne(h.source,l.target,e),s._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(s)}else{let a=n.evaluator._evaluateBinding(t,h,e,i,r,o);a!==Ne&&function(t,e,i,r,n){n=function(t,e,i,r){if(i.isCompound){let n=t.__dataCompoundStorage[i.target];n[r.compoundIndex]=e,e=n.join("")}"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,n,i,r),It&&(n=It(n,i.target,i.kind,e));if("attribute"==i.kind)t._valueToNodeAttribute(e,n,i.target);else{let r=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[Ue.READ_ONLY]&&e[Ue.READ_ONLY][r]||e._setPendingProperty(r,n)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,n)}}(t,s,l,h,a)}}function ni(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,n=new Array(r.length);for(let t=0;t="0"&&r<="9"&&(r="#"),r){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=ie(e),i.structured=ee(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function pi(t,e,i){let r=se(t,i);return void 0===r&&(r=e[i]),r}function fi(t,e,i,r){const n={indexSplices:r};Ot&&!t._overrideLegacyUndefined&&(e.splices=n),t.notifyPath(i+".splices",n),t.notifyPath(i+".length",e.length),Ot&&!t._overrideLegacyUndefined&&(n.indexSplices=[])}function mi(t,e,i,r,n,o){fi(t,e,i,[{index:r,addedCount:n,removed:o,object:e,type:"splice"}])}const vi=Vt((t=>{const e=Be(Ee(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Ue}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(_i.length){let t=_i[_i.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Ue.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Ue.READ_ONLY);let r=Ve(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(i)}_removePropertyEffect(t,e,i){let r=Ve(this,e,!0)[t],n=r.indexOf(i);n>=0&&r.splice(n,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ue.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ue.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ue.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ue.COMPUTE)}_setPendingPropertyOrPath(t,e,i,r){if(r||ie(Array.isArray(t)?t[0]:t)!==t){if(!r){let i=se(this,t);if(!(t=le(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let r=t.__dataLinkedPaths;if(r){let n;for(let o in r){let a=r[o];re(o,e)?(n=ne(o,a,e),t._setPendingPropertyOrPath(n,i,!0,!0)):re(a,e)&&(n=ne(a,o,e),t._setPendingPropertyOrPath(n,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=te(t)),t[e]=i)}_setPendingProperty(t,e,i){let r=this.__dataHasPaths&&ee(t),n=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,n[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[Ue.NOTIFY]&&this[Ue.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e{$e(this,t.propertyEffects,e,i,r,t.nodeList);for(let n=t.firstChild;n;n=n.nextSibling)this._runEffectsForTemplate(n,e,i,r)};t.runEffects?t.runEffects(n,e,r):n(e,r)}linkPaths(t,e){t=oe(t),e=oe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=oe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};fi(this,se(this,t,i),i.path,e)}get(t,e){return se(e||this,t)}set(t,e,i){i?le(i,t,e):this[Ue.READ_ONLY]&&this[Ue.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},r=se(this,t,i),n=r.length,o=r.push(...e);return e.length&&mi(this,r,i.path,n,e.length,[]),o}pop(t){let e={path:""},i=se(this,t,e),r=Boolean(i.length),n=i.pop();return r&&mi(this,i,e.path,i.length,0,[n]),n}splice(t,e,i,...r){let n,o={path:""},a=se(this,t,o);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),n=2===arguments.length?a.splice(e):a.splice(e,i,...r),(r.length||n.length)&&mi(this,a,o.path,e,r.length,n),n}shift(t){let e={path:""},i=se(this,t,e),r=Boolean(i.length),n=i.shift();return r&&mi(this,i,e.path,0,0,[n]),n}unshift(t,...e){let i={path:""},r=se(this,t,i),n=r.unshift(...e);return e.length&&mi(this,r,i.path,0,e.length,[]),n}notifyPath(t,e){let i;if(1==arguments.length){let r={path:""};e=se(this,t,r),i=r.path}else i=Array.isArray(t)?oe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Ue.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let r={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Ue.OBSERVE,{fn:Ze,info:r,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ue.OBSERVE,{fn:Ze,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let i=ui(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");ai(this,i,Ue.OBSERVE,si,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ue.NOTIFY,{fn:Xe,info:{eventName:pe(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ue.REFLECT,{fn:Ye,info:{attrName:e}})}_createComputedProperty(t,e,i){let r=ui(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const n=ai(this,r,Ue.COMPUTE,ti,t,i);Ve(this,"__computeInfo")[t]=n}_marshalArgs(t,e,i){const r=this.__data,n=[];for(let o=0,a=t.length;o1)return Ne;n[o]=h}return n}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==i;if(!r)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=r,r?r.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),_i.push(this);let i=super._stampTemplate(t,e);if(_i.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:r}=e;if(r.length)for(let e=0;en&&r.push({literal:t.slice(n,i.index)});let o=i[1][0],a=Boolean(i[2]),s=i[3].trim(),l=!1,h="",c=-1;"{"==o&&(c=s.indexOf("::"))>0&&(h=s.substring(c+2),s=s.substring(0,c),l=!0);let u=ui(s),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e{const e=we(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof n?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e= +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +function(t){const e={};for(let i in t){const r=t[i];e[i]="function"==typeof r?{type:r}:r}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class n extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return n})),yi=window.ShadyCSS&&window.ShadyCSS.cssBuild,xi=Vt((t=>{const e=gi(vi(t));function i(t,e,i,r){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,r)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,r[i.observer]),t._addPropertyToAttributeMap(e)}function r(t,e,i,r){if(!yi){const n=e.content.querySelectorAll("style"),o=Jt(e),a=function(t){let e=Wt(t);return e?Qt(e):[]}(i),s=e.content.firstElementChild;for(let i=0;i{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}}return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Lt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let r=0;rt}); +/** + * @fileoverview + * @suppress {checkPrototypalTypes} + * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt The complete set of authors may be found + * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + * Google as part of the polymer project is also subject to an additional IP + * rights grant found at http://polymer.github.io/PATENTS.txt + */class wi{constructor(t,e){Ti(t,e);const i=e.reduce(((e,i,r)=>e+zi(i)+t[r+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function zi(t){if(t instanceof wi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Mi=function(t,...e){Ti(t,e);const i=document.createElement("template");let r=e.reduce(((e,i,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof wi)return zi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[r+1]),t[0]);return bi&&(r=bi.createHTML(r)),i.innerHTML=r,i},Ti=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Ei=xi(HTMLElement); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class Ai{static detectScrollType(){const t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let e="reverse";return t.scrollLeft>0?e="default":(t.scrollLeft=2,t.scrollLeft<2&&(e="negative")),document.body.removeChild(t),e}static getNormalizedScrollLeft(t,e,i){const{scrollLeft:r}=i;if("rtl"!==e||!t)return r;switch(t){case"negative":return i.scrollWidth-i.clientWidth+r;case"reverse":return i.scrollWidth-i.clientWidth-r;default:return r}}static setNormalizedScrollLeft(t,e,i,r){if("rtl"===e&&t)switch(t){case"negative":i.scrollLeft=i.clientWidth-i.scrollWidth+r;break;case"reverse":i.scrollLeft=i.scrollWidth-i.clientWidth-r;break;default:i.scrollLeft=r}else i.scrollLeft=r}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const Ci=[];let Si;function Ii(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Pi(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Pi();Ci.forEach((e=>{Ii(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ki=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}static finalize(){super.finalize(),Si||(Si=Ai.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Ii(this,Pi(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const r=Pi(),n=i===r&&-1===Ci.indexOf(this),o=!i&&e&&-1===Ci.indexOf(this),a=i!==r&&e===r;n||o?(this.__subscribe(),Ii(this,r,i)):a&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(t=!0){t?Ci.includes(this)||Ci.push(this):Ci.includes(this)&&Ci.splice(Ci.indexOf(this),1)}__getNormalizedScrollLeft(t){return Ai.getNormalizedScrollLeft(Si,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Ai.setNormalizedScrollLeft(Si,this.getAttribute("dir")||"ltr",t,e)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class Li extends(ct(ki(Ei))){static get is(){return"vaadin-input-container"}static get template(){return Mi` + + + + + `}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}customElements.define(Li.is,Li);const Di=n` + /* Needed for Safari, where ::slotted(...)::placeholder does not work */ + :is(input[slot='input'], textarea[slot='textarea'])::placeholder { + font: inherit; + color: inherit; + } +`,Ri=document.createElement("template");Ri.innerHTML=``,document.head.appendChild(Ri.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Oi=document.createElement("template");Oi.innerHTML='\n \n',document.head.appendChild(Oi.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Bi=n` + :host { + /* Square */ + --lumo-space-xs: 0.25rem; + --lumo-space-s: 0.5rem; + --lumo-space-m: 1rem; + --lumo-space-l: 1.5rem; + --lumo-space-xl: 2.5rem; + + /* Wide */ + --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs); + --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s); + --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m); + --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l); + --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl); + + /* Tall */ + --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2); + --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2); + --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2); + --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2); + --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2); + } +`,Fi=document.createElement("template");Fi.innerHTML=``,document.head.appendChild(Fi.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Ni=n` + [part$='button'] { + flex: none; + width: 1em; + height: 1em; + line-height: 1; + font-size: var(--lumo-icon-size-m); + text-align: center; + color: var(--lumo-contrast-60pct); + transition: 0.2s color; + cursor: var(--lumo-clickable-cursor); + } + + [part$='button']:hover { + color: var(--lumo-contrast-90pct); + } + + :host([disabled]) [part$='button'], + :host([readonly]) [part$='button'] { + color: var(--lumo-contrast-20pct); + cursor: default; + } + + [part$='button']::before { + font-family: 'lumo-icons'; + display: block; + } +`;nt("",Ni,{moduleId:"lumo-field-button"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Ui=n` + :host([has-helper]) [part='helper-text']::before { + content: ''; + display: block; + height: 0.4em; + } + + [part='helper-text'] { + display: block; + color: var(--lumo-secondary-text-color); + font-size: var(--lumo-font-size-xs); + line-height: var(--lumo-line-height-xs); + margin-left: calc(var(--lumo-border-radius-m) / 4); + transition: color 0.2s; + } + + :host(:hover:not([readonly])) [part='helper-text'] { + color: var(--lumo-body-text-color); + } + + :host([disabled]) [part='helper-text'] { + color: var(--lumo-disabled-text-color); + -webkit-text-fill-color: var(--lumo-disabled-text-color); + } + + :host([has-helper][theme~='helper-above-field']) [part='helper-text']::before { + display: none; + } + + :host([has-helper][theme~='helper-above-field']) [part='helper-text']::after { + content: ''; + display: block; + height: 0.4em; + } + + :host([has-helper][theme~='helper-above-field']) [part='label'] { + order: 0; + padding-bottom: 0.4em; + } + + :host([has-helper][theme~='helper-above-field']) [part='helper-text'] { + order: 1; + } + + :host([has-helper][theme~='helper-above-field']) [part='label'] + * { + order: 2; + } + + :host([has-helper][theme~='helper-above-field']) [part='error-message'] { + order: 3; + } +` +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,ji=n` + [part='label'] { + align-self: flex-start; + color: var(--lumo-secondary-text-color); + font-weight: 500; + font-size: var(--lumo-font-size-s); + margin-left: calc(var(--lumo-border-radius-m) / 4); + transition: color 0.2s; + line-height: 1; + padding-right: 1em; + padding-bottom: 0.5em; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: relative; + max-width: 100%; + box-sizing: border-box; + } + + :host([has-label])::before { + margin-top: calc(var(--lumo-font-size-s) * 1.5); + } + + :host([has-label][theme~='small'])::before { + margin-top: calc(var(--lumo-font-size-xs) * 1.5); + } + + :host([has-label]) { + padding-top: var(--lumo-space-m); + } + + :host([required]) [part='required-indicator']::after { + content: var(--lumo-required-field-indicator, '•'); + transition: opacity 0.2s; + color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color)); + position: absolute; + right: 0; + width: 1em; + text-align: center; + } + + :host([invalid]) [part='required-indicator']::after { + color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color)); + } + + [part='error-message'] { + margin-left: calc(var(--lumo-border-radius-m) / 4); + font-size: var(--lumo-font-size-xs); + line-height: var(--lumo-line-height-xs); + color: var(--lumo-error-text-color); + will-change: max-height; + transition: 0.4s max-height; + max-height: 5em; + } + + :host([has-error-message]) [part='error-message']::before, + :host([has-error-message]) [part='error-message']::after { + content: ''; + display: block; + height: 0.4em; + } + + :host(:not([invalid])) [part='error-message'] { + max-height: 0; + overflow: hidden; + } + + /* RTL specific styles */ + + :host([dir='rtl']) [part='label'] { + margin-left: 0; + margin-right: calc(var(--lumo-border-radius-m) / 4); + } + + :host([dir='rtl']) [part='label'] { + padding-left: 1em; + padding-right: 0; + } + + :host([dir='rtl']) [part='required-indicator']::after { + right: auto; + left: 0; + } + + :host([dir='rtl']) [part='error-message'] { + margin-left: 0; + margin-right: calc(var(--lumo-border-radius-m) / 4); + } +`;nt("",ji,{moduleId:"lumo-required-field"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Vi=[ji,Ni,Ui,n` + :host { + --lumo-text-field-size: var(--lumo-size-m); + color: var(--lumo-body-text-color); + font-size: var(--lumo-font-size-m); + font-family: var(--lumo-font-family); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: transparent; + padding: var(--lumo-space-xs) 0; + } + + :host::before { + height: var(--lumo-text-field-size); + box-sizing: border-box; + display: inline-flex; + align-items: center; + } + + :host([focused]:not([readonly])) [part='label'] { + color: var(--lumo-primary-text-color); + } + + :host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) { + -webkit-mask-image: none; + mask-image: none; + } + + ::slotted(:is(input, textarea):placeholder-shown) { + color: var(--lumo-secondary-text-color); + } + + /* Hover */ + :host(:hover:not([readonly]):not([focused])) [part='label'] { + color: var(--lumo-body-text-color); + } + + :host(:hover:not([readonly]):not([focused])) [part='input-field']::after { + opacity: 0.1; + } + + /* Touch device adjustment */ + @media (pointer: coarse) { + :host(:hover:not([readonly]):not([focused])) [part='label'] { + color: var(--lumo-secondary-text-color); + } + + :host(:hover:not([readonly]):not([focused])) [part='input-field']::after { + opacity: 0; + } + + :host(:active:not([readonly]):not([focused])) [part='input-field']::after { + opacity: 0.2; + } + } + + /* Trigger when not focusing using the keyboard */ + :host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after { + transform: scaleX(0); + transition-duration: 0.15s, 1s; + } + + /* Focus-ring */ + :host([focus-ring]) [part='input-field'] { + box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct); + } + + /* Read-only and disabled */ + :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) { + opacity: 0; + } + + /* Disabled style */ + :host([disabled]) { + pointer-events: none; + } + + :host([disabled]) [part='label'], + :host([disabled]) [part='input-field'] ::slotted(*) { + color: var(--lumo-disabled-text-color); + -webkit-text-fill-color: var(--lumo-disabled-text-color); + } + + /* Invalid style */ + :host([invalid][focus-ring]) [part='input-field'] { + box-shadow: 0 0 0 2px var(--lumo-error-color-50pct); + } + + :host([input-prevented]) [part='input-field'] { + animation: shake 0.15s infinite; + } + + @keyframes shake { + 25% { + transform: translateX(4px); + } + 75% { + transform: translateX(-4px); + } + } + + /* Small theme */ + :host([theme~='small']) { + font-size: var(--lumo-font-size-s); + --lumo-text-field-size: var(--lumo-size-s); + } + + :host([theme~='small']) [part='label'] { + font-size: var(--lumo-font-size-xs); + } + + :host([theme~='small']) [part='error-message'] { + font-size: var(--lumo-font-size-xxs); + } + + /* Slotted content */ + [part='input-field'] ::slotted(:not(iron-icon):not(vaadin-icon):not(input):not(textarea)) { + color: var(--lumo-secondary-text-color); + font-weight: 400; + } + + [part='clear-button']::before { + content: var(--lumo-icons-cross); + } +`];nt("",Vi,{moduleId:"lumo-input-field-shared-styles"}), +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +nt("vaadin-text-field",Vi,{moduleId:"lumo-text-field-styles"});const $i=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Gi=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function qi(t,e){if("function"!=typeof t)return;const i=$i.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};const Zi=function(t,e){if(window.Vaadin.developmentMode)return qi(t,e)};function Hi(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(Gi?!(Gi&&Object.keys(Gi).map((t=>Gi[t])).filter((t=>t.productionMode)).length>0):!qi((function(){return!0})))}catch(t){return!1}}()); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +let Wi=0,Xi=0;const Yi=[];let Ki=0,Ji=!1;const Qi=document.createTextNode("");new window.MutationObserver((function(){Ji=!1;const t=Yi.length;for(let e=0;e{throw t}))}}Yi.splice(0,t),Xi+=t})).observe(Qi,{characterData:!0});const tr={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},er={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ir={run(t){Ji||(Ji=!0,Qi.textContent=Ki,Ki+=1),Yi.push(t);const e=Wi;return Wi+=1,e},cancel(t){const e=t-Xi;if(e>=0){if(!Yi[e])throw new Error(`invalid async handle: ${t}`);Yi[e]=null}}}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +class rr{static debounce(t,e,i){return t instanceof rr?t._cancelAsync():t=new rr,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,or.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),or.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let nr,or=new Set; +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +window.Vaadin=window.Vaadin||{},window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Zi(Hi)};const ar=new Set,sr=t=>class extends(ki(t)){static get version(){return"23.1.3"}static finalize(){super.finalize();const{is:t}=this;var e;t&&!ar.has(t)&&(window.Vaadin.registrations.push(this),ar.add(t),window.Vaadin.developmentModeCallback&&(nr=rr.debounce(nr,er,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),e=nr,or.add(e)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add to the HTML document.')}} +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/;function lr(t,e,i){return{index:t,removed:e,addedCount:i}}function hr(t,e,i,r,n,o){let a,s=0,l=0,h=Math.min(i-e,o-n);if(0==e&&0==n&&(s=function(t,e,i){for(let r=0;r0||i>0;){if(0==e){n.push(2),i--;continue}if(0==i){n.push(3),e--;continue}let o,a=t[e-1][i-1],s=t[e-1][i],l=t[e][i-1];o=sur(t)?te(t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){ur(this._target)?this._listenSlots([this._target]):te(this._target).children&&(this._listenSlots(te(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){ur(this._target)?this._unlistenSlots([this._target]):te(this._target).children&&(this._unlistenSlots(te(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,xe.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;ee.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}initNode(t){const{slotInitializer:e}=this;e&&e(this.host,t)}initCustomNode(t){}teardownNode(t){}observe(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new dr(i,(t=>{const e=this.node,i=t.addedNodes.find((t=>t!==e));t.removedNodes.length&&t.removedNodes.forEach((t=>{this.teardownNode(t)})),i&&(e&&e.isConnected&&this.host.removeChild(e),this.node=i,i!==this.defaultNode&&(this.initCustomNode(i),this.initNode(i)))}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class fr extends pr{constructor(t,e){super(t,"input",(()=>document.createElement("input")),((t,i)=>{t.value&&i.setAttribute("value",t.value),t.type&&i.setAttribute("type",t.type);const r=fr._uniqueInputId=1+fr._uniqueInputId||0;t._inputId=`${t.localName}-${r}`,i.id=t._inputId,"function"==typeof e&&e(i)}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const mr=Vt((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */let vr=!1;window.addEventListener("keydown",(()=>{vr=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{vr=!1}),{capture:!0});const _r=Vt((t=>class extends t{get _keyboardActive(){return vr}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),gr=Vt((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),yr=t=>class extends(gr(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,xr=Vt((t=>class extends(_r(yr(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&(this.focusElement.focus(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),br=Vt((t=>class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class wr extends pr{constructor(t){super(t,"error-message",(()=>document.createElement("div")),((t,e)=>{this.__updateErrorId(e),this.__updateHasError()}))}get errorId(){return this.node&&this.node.id}setErrorMessage(t){this.errorMessage=t,this.__updateHasError()}setInvalid(t){this.invalid=t,this.__updateHasError()}initCustomNode(t){this.__updateErrorId(t),t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),this.__updateHasError()}teardownNode(t){let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e)),this.__updateHasError()}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__updateHasError(){const t=this.node,e=Boolean(this.invalid&&this.__isNotEmpty(this.errorMessage));t&&(t.textContent=e?this.errorMessage:"",t.hidden=!e,e?t.setAttribute("role","alert"):t.removeAttribute("role")),this.host.toggleAttribute("has-error-message",e)}__updateErrorId(t){t.id||(t.id=this.defaultId)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function zr(t){return t?new Set(t.split(" ")):new Set}function Mr(t){return[...t].join(" ")} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class Tr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setLabelId(t){this.__setLabelIdToAriaAttribute(t,this.__labelId),this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}get __isGroupField(){return this.__target===this.host}__setLabelIdToAriaAttribute(t,e){this.__setAriaAttributeId("aria-labelledby",t,e)}__setErrorIdToAriaAttribute(t,e){this.__isGroupField?this.__setAriaAttributeId("aria-labelledby",t,e):this.__setAriaAttributeId("aria-describedby",t,e)}__setHelperIdToAriaAttribute(t,e){this.__isGroupField?this.__setAriaAttributeId("aria-labelledby",t,e):this.__setAriaAttributeId("aria-describedby",t,e)}__setAriaRequiredAttribute(t){this.__target&&this.__isGroupField&&(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required"))}__setAriaAttributeId(t,e,i){this.__target&&(i&&function(t,e,i){const r=zr(t.getAttribute(e));r.delete(i),0!==r.size?t.setAttribute(e,Mr(r)):t.removeAttribute(e)}(this.__target,t,i),e&&function(t,e,i){const r=zr(t.getAttribute(e));r.add(i),t.setAttribute(e,Mr(r))}(this.__target,t,e))}} +/** + * @license + * Copyright (c) 2021 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class Er extends pr{constructor(t){super(t,"helper")}get helperId(){return this.node&&this.node.id}initCustomNode(t){this.__updateHelperId(t),this.__observeHelper(t);const e=this.__hasHelper(t);this.__toggleHasHelper(e)}teardownNode(t){this.__helperIdObserver&&this.__helperIdObserver.disconnect();const e=this.getSlotChild();if(e&&e!==this.defaultNode){const t=this.__hasHelper(e);this.__toggleHasHelper(t)}else this.__applyDefaultHelper(this.helperText,e)}setHelperText(t){this.helperText=t;const e=this.getSlotChild();e&&e!==this.defaultNode||this.__applyDefaultHelper(t,e)}__hasHelper(t){return!!t&&(t.children.length>0||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return t&&""!==t.trim()}__applyDefaultHelper(t,e){const i=this.__isNotEmpty(t);i&&!e&&(this.slotFactory=()=>document.createElement("div"),e=this.attachDefaultNode(),this.__updateHelperId(e),this.__observeHelper(e)),e&&(e.textContent=t),this.__toggleHasHelper(i)}__observeHelper(t){this.__helperObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateHelperId(e);else if(i||e.parentElement===this.node){const t=this.__hasHelper(this.node);this.__toggleHasHelper(t)}}))})),this.__helperObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasHelper(t){this.host.toggleAttribute("has-helper",t),this.dispatchEvent(new CustomEvent("helper-changed",{detail:{hasHelper:t,node:this.node}}))}__updateHelperId(t){t.id||(t.id=this.defaultId)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class Ar extends pr{constructor(t){super(t,"label",(()=>document.createElement("label")),((t,e)=>{this.__updateLabelId(e),this.__updateDefaultLabel(this.label),this.__observeLabel(e)}))}get labelId(){return this.node.id}initCustomNode(t){this.__updateLabelId(t);const e=this.__hasLabel(t);this.__toggleHasLabel(e)}teardownNode(t){this.__labelObserver&&this.__labelObserver.disconnect();let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e));const i=this.__hasLabel(e);this.__toggleHasLabel(i)}setLabel(t){this.label=t,this.__updateDefaultLabel(t)}__hasLabel(t){return!!t&&(t.children.length>0||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__observeLabel(t){this.__labelObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateLabelId(e);else if(i||e.parentElement===this.node){const t=this.__hasLabel(this.node);this.__toggleHasLabel(t)}}))})),this.__labelObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasLabel(t){this.host.toggleAttribute("has-label",t),this.dispatchEvent(new CustomEvent("label-changed",{detail:{hasLabel:t,node:this.node}}))}__updateDefaultLabel(t){if(this.defaultNode&&(this.defaultNode.textContent=t,this.defaultNode===this.node)){const e=this.__isNotEmpty(t);this.__toggleHasLabel(e)}}__updateLabelId(t){t.id||(t.id=this.defaultId)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const Cr=Vt((t=>class extends(br(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}get _labelId(){return this._labelController.labelId}get _labelNode(){return this._labelController.node}constructor(){super(),this._labelController=new Ar(this),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Sr=Vt((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!this.required||!!this.value}})),Ir=t=>class extends(Sr(Cr(br(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}get _errorId(){return this._errorController.errorId}get _errorNode(){return this._errorController.node}get _helperId(){return this._helperController.helperId}get _helperNode(){return this._helperController.node}constructor(){super(),this._fieldAriaController=new Tr(this),this._helperController=new Er(this),this._errorController=new wr(this),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController),this._labelController.addEventListener("label-changed",(t=>{const{hasLabel:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("helper-changed",(t=>{const{hasHelper:e,node:i}=t.detail;this.__helperChanged(e,i)}))}__helperChanged(t,e){t?this._fieldAriaController.setHelperId(e.id):this._fieldAriaController.setHelperId(null)}__labelChanged(t,e){t?this._fieldAriaController.setLabelId(e.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{t?this._fieldAriaController.setErrorId(this._errorController.errorId):this._fieldAriaController.setErrorId(null)}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Pr=Vt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),kr=Vt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0}}}constructor(){super(),this._boundOnInput=this._onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}clear(){this.value=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this.inputElement.value=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_onInput(t){this.__userInput=t.isTrusted,this.value=t.target.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(""!==t&&null!=t),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}})),Lr=Vt((t=>class extends(Pr(Sr(kr(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(${this.constructor.constraints.join(", ")})`)}_constraintsChanged(...t){this.invalid&&(this._hasValidConstraints(t)?this.validate():this.invalid=!1)}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),Dr=t=>class extends(xr(Lr(Ir(mr(t))))){static get properties(){return{autoselect:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t)))}_onClearButtonClick(t){t.preventDefault(),this.inputElement.focus(),this.__clear()}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this.__clear())}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__clear(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Rr=t=>class extends(Dr(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String},_enabledCharPattern:{type:String,observer:"_enabledCharPatternChanged"}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_onBlur(t){super._onBlur(t),this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_forwardInputValue(t){super._forwardInputValue(t),this.invalid&&this.validate()}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){this._enabledCharPattern&&!this.__shouldAcceptKey(t)&&t.preventDefault(),super._onKeyDown(t)}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__enabledCharRegExp.test(t.key)}_onPaste(t){if(this._enabledCharPattern){const e=(t.clipboardData||window.clipboardData).getData("text");this.__enabledTextRegExp.test(e)||t.preventDefault()}}_onDrop(t){if(this._enabledCharPattern){const e=t.dataTransfer.getData("text");this.__enabledTextRegExp.test(e)||t.preventDefault()}}_onBeforeInput(t){this._enabledCharPattern&&t.data&&!this.__enabledTextRegExp.test(t.data)&&t.preventDefault()}_enabledCharPatternChanged(t){t&&(this.__enabledCharRegExp=new RegExp(`^${t}$`),this.__enabledTextRegExp=new RegExp(`^${t}*$`))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */; +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class Or{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("label-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const Br=t=>class extends(Lr(t)){static get properties(){return{pattern:{type:String},preventInvalidInput:{type:Boolean}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}_checkInputValue(){if(this.preventInvalidInput){const t=this.inputElement;t&&t.value.length>0&&!this.checkValidity()&&(t.value=this.value||"",this.setAttribute("input-prevented",""),this._inputDebouncer=rr.debounce(this._inputDebouncer,tr.after(200),(()=>{this.removeAttribute("input-prevented")})))}}_onInput(t){this._checkInputValue(),super._onInput(t)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Fr=n`[part=clear-button]{display:none;cursor:default}[part=clear-button]::before{content:'✕'}:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part=clear-button]{display:block}` +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */; +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +nt("vaadin-text-field",[n`:host{display:inline-flex;outline:0}:host::before{content:'\\2003';width:0;display:inline-block}:host([hidden]){display:none!important}:host(:not([has-label])) [part=label]{display:none}` +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,n`[class$=container]{display:flex;flex-direction:column;min-width:100%;max-width:100%;width:var(--vaadin-field-default-width,12em)}` +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Fr],{moduleId:"vaadin-text-field-styles"});class Nr extends(Br(Rr(ct(sr(Ei))))){static get is(){return"vaadin-text-field"}static get template(){return Mi` + + +
+
+ + +
+ + + + + + + + +
+ +
+ +
+ +
+
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength"]}static get constraints(){return[...super.constraints,"maxlength","minlength"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new fr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Or(this.inputElement,this._labelController))}}customElements.define(Nr.is,Nr); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Ur=2,jr=2; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class Vr extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.it=R,t.type!==jr)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===R||null==t)return this.ft=void 0,this.it=t;if(t===D)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Vr.directiveName="unsafeHTML",Vr.resultType=1; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class $r extends Vr{}$r.directiveName="unsafeSVG",$r.resultType=2;const Gr=(t=>(...e)=>({_$litDirective$:t,values:e}))($r); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function qr(t){let e=R;if(t){const i=t.cloneNode(!0);i.removeAttribute("id"),e=L`${Gr(i.innerHTML)}`}return e}function Zr(t){let e=null==t||""===t?R:t;return function(t){return((t,e)=>{var i,r;return void 0===e?void 0!==(null===(i=t)||void 0===i?void 0:i._$litType$):(null===(r=t)||void 0===r?void 0:r._$litType$)===e})(t,Ur)||t===R}(e)||(console.error("[vaadin-icon] Invalid svg passed, please use Lit svg literal."),e=R),e} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Hr={};class Wr extends(sr(Ei)){static get template(){return null}static get is(){return"vaadin-iconset"}static get properties(){return{name:{type:String,observer:"__nameChanged"},size:{type:Number,value:24}}}static getIconset(t){let e=Hr[t];return e||(e=document.createElement("vaadin-iconset"),e.name=t,Hr[t]=e),e}connectedCallback(){super.connectedCallback(),this.style.display="none"}applyIcon(t){this._icons=this._icons||this.__createIconMap();const e=this._icons[this.__getIconId(t)];return{svg:qr(e),size:this.size,viewBox:e?e.getAttribute("viewBox"):null}}__createIconMap(){const t={};return this.querySelectorAll("[id]").forEach((e=>{t[this.__getIconId(e.id)]=e})),t}__getIconId(t){return(t||"").replace(`${this.name}:`,"")}__nameChanged(t,e){e&&(Hr[t]=Wr.getIconset(e),delete Hr[e]),t&&(Hr[t]=this,document.dispatchEvent(new CustomEvent("vaadin-iconset-registered",{detail:t})))}}customElements.define(Wr.is,Wr),nt("vaadin-icon",n` + :host { + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + `,{moduleId:"lumo-icon"});class Xr extends(ct(sr(Ei))){static get template(){return Mi` + + + `}static get is(){return"vaadin-icon"}static get properties(){return{icon:{type:String,observer:"__iconChanged"},svg:{type:Object},size:{type:Number,value:24},__svgElement:Object,__viewBox:String}}static get observers(){return["__svgChanged(svg, __svgElement)"]}constructor(){super(),this.__onIconsetRegistered=this.__onIconsetRegistered.bind(this)}ready(){super.ready(),this.__svgElement=this.shadowRoot.querySelector("svg")}__getIconsetName(t){if(!t)return;return t.split(":")[0]||"vaadin"}__onIconsetRegistered(t){t.detail===this.__getIconsetName(this.icon)&&this.__iconChanged(this.icon)}connectedCallback(){super.connectedCallback(),document.addEventListener("vaadin-iconset-registered",this.__onIconsetRegistered)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("vaadin-iconset-registered",this.__onIconsetRegistered)}__iconChanged(t){if(t){this.__checkDeprecatedIcon(t);const e=this.__getIconsetName(t),i=Wr.getIconset(e),{svg:r,size:n,viewBox:o}=i.applyIcon(t);o&&(this.__viewBox=o),n!==this.size&&(this.size=n),this.svg=r}else this.svg=Zr(null)}__checkDeprecatedIcon(t){const e={"vaadin:buss":"vaadin:bus","vaadin:funcion":"vaadin:function","vaadin:megafone":"vaadin:megaphone","vaadin:palete":"vaadin:palette","vaadin:trendind-down":"vaadin:trending-down"};t in e&&console.warn(`WARNING: The icon "${t}" is deprecated. Use "${e[t]}" instead`)}__svgChanged(t,e){e&&function(t,e){const i=Zr(t);B(i,e)}(t,e)}__computeViewBox(t,e){return e||`0 0 ${t} ${t}`}}customElements.define(Xr.is,Xr); +/** + * @license + * Copyright (c) 2015 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Yr=document.createElement("template");Yr.innerHTML='\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',document.head.appendChild(Yr.content),nt("vaadin-app-layout",n` + [part='navbar']::before { + background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct)); + } + + :host(:not([dir='rtl']):not([overlay])) [part='drawer'] { + border-right: 1px solid var(--lumo-contrast-10pct); + } + + :host([dir='rtl']:not([overlay])) [part='drawer'] { + border-left: 1px solid var(--lumo-contrast-10pct); + } + + :host([overlay]) [part='drawer']::before { + background: var(--lumo-base-color); + } + + [part='navbar']::before, + :host([overlay]) [part='drawer']::before { + position: absolute; + content: ''; + width: 100%; + height: 100%; + z-index: -1; + } + + :host([overlay]) [part='drawer']::before { + background: var(--lumo-base-color); + height: var(--_vaadin-app-layout-drawer-scroll-size, 100%); + } + + [part='backdrop'] { + background-color: var(--lumo-shade-20pct); + opacity: 1; + } + + [part] ::slotted(h2), + [part] ::slotted(h3), + [part] ::slotted(h4) { + margin-top: var(--lumo-space-xs) !important; + margin-bottom: var(--lumo-space-xs) !important; + } + + @supports (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px)) { + [part='navbar']::before { + opacity: 0.8; + } + + [part='navbar'] { + -webkit-backdrop-filter: blur(24px); + backdrop-filter: blur(24px); + } + + :host([overlay]) [part='drawer']::before { + opacity: 0.9; + } + + :host([overlay]) [part='drawer'] { + -webkit-backdrop-filter: blur(24px); + backdrop-filter: blur(24px); + } + } + `,{moduleId:"lumo-app-layout"});const Kr=document.createElement("template");Kr.innerHTML="\n \n",document.head.appendChild(Kr.content); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Jr=t=>t.test(navigator.userAgent),Qr=t=>t.test(navigator.platform);Jr(/Android/),Jr(/Chrome/)&&/Google Inc/.test(navigator.vendor),Jr(/Firefox/);const tn=Qr(/^iPad/)||Qr(/^Mac/)&&navigator.maxTouchPoints>1,en=Qr(/^iPhone/)||tn;Jr(/^((?!chrome|android).)*safari/i);const rn=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})(); +/** + * @license + * Copyright (c) 2018 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function nn(){if(en){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;e&&i>t?document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom",i-t+"px"):document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom","")}}nn(),window.addEventListener("resize",nn); +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +let on=!1,an=[],sn=[];function ln(){on=!0,requestAnimationFrame((function(){on=!1,function(t){for(;t.length;)hn(t.shift())}(an),setTimeout((function(){!function(t){for(let e=0,i=t.length;e{throw t}))}}function cn(t,e,i){on||ln(),sn.push([t,e,i])} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function un(t,e){const i=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===i||0===r?r>i:i>r}function dn(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)un(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(dn(t.slice(0,i)),dn(t.slice(i)))}function pn(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,r=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let n=r>0;r>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{n=pn(t,e)||n})),n}function fn(t){return t.getRootNode().activeElement===t} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const mn=[];class vn{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");mn.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,mn.pop()}__onKeyDown(t){if(this.__trapNode&&this===Array.from(mn).pop()&&"Tab"===t.key){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e)}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,r=this.__focusedElementIndex;e[(e.length+r+i)%e.length].focus()}get __focusableElements(){return function(t){const e=[];return pn(t,e)?dn(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(fn).pop())}} +/** + * @license + * Copyright (c) 2018 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class _n extends(sr(ct(br(Ei)))){static get template(){return Mi` + + +
+
+ +
+
+ +
+ + + `}static get is(){return"vaadin-app-layout"}static get properties(){return{i18n:{type:Object,observer:"__i18nChanged",value:()=>({drawer:"Drawer"})},primarySection:{type:String,value:"navbar",notify:!0,reflectToAttribute:!0,observer:"__primarySectionChanged"},drawerOpened:{type:Boolean,notify:!0,value:!0,reflectToAttribute:!0,observer:"__drawerOpenedChanged"},overlay:{type:Boolean,notify:!0,readOnly:!0,value:!1,reflectToAttribute:!0},closeDrawerOn:{type:String,value:"vaadin-router-location-changed",observer:"_closeDrawerOnChanged"}}}static dispatchCloseOverlayDrawerEvent(){window.dispatchEvent(new CustomEvent("close-overlay-drawer"))}constructor(){super(),this.__boundResizeListener=this._resize.bind(this),this.__drawerToggleClickListener=this._drawerToggleClick.bind(this),this.__closeOverlayDrawerListener=this.__closeOverlayDrawer.bind(this),this.__trapFocusInDrawer=this.__trapFocusInDrawer.bind(this),this.__releaseFocusFromDrawer=this.__releaseFocusFromDrawer.bind(this),this.__focusTrapController=new vn(this)}connectedCallback(){var t,e,i;super.connectedCallback(),this._blockAnimationUntilAfterNextRender(),window.addEventListener("resize",this.__boundResizeListener),this.addEventListener("drawer-toggle-click",this.__drawerToggleClickListener),t=this,e=this._afterFirstRender,on||ln(),an.push([t,e,i]),this._updateTouchOptimizedMode();const r=this.$.navbarTop.firstElementChild;this._navbarChildObserver=new dr(r,(()=>{this._updateTouchOptimizedMode()})),this._touchChildObserver=new dr(this.$.touchSlot,(()=>{this._updateTouchOptimizedMode()})),this._drawerChildObserver=new dr(this.$.drawerSlot,(()=>{this._updateDrawerSize()})),this._updateDrawerSize(),this._updateOverlayMode(),window.addEventListener("close-overlay-drawer",this.__closeOverlayDrawerListener)}ready(){super.ready(),this.addController(this.__focusTrapController),this.__setAriaExpanded()}disconnectedCallback(){super.disconnectedCallback(),this._navbarChildObserver&&this._navbarChildObserver.disconnect(),this._drawerChildObserver&&this._drawerChildObserver.disconnect(),this._touchChildObserver&&this._touchChildObserver.disconnect(),window.removeEventListener("resize",this.__boundResizeListener),this.removeEventListener("drawer-toggle-click",this.__drawerToggleClickListener),window.removeEventListener("close-overlay-drawer",this.__drawerToggleClickListener)}__primarySectionChanged(t){["navbar","drawer"].includes(t)||this.set("primarySection","navbar")}__drawerOpenedChanged(t,e){this.overlay&&(t?(this._updateDrawerHeight(),this.__trapFocusInDrawer()):e&&this.__releaseFocusFromDrawer()),this.__setAriaExpanded()}__i18nChanged(){this.__updateDrawerAriaAttributes()}_afterFirstRender(){this._blockAnimationUntilAfterNextRender(),this._updateOffsetSize()}_drawerToggleClick(t){t.stopPropagation(),this.drawerOpened=!this.drawerOpened}__closeOverlayDrawer(){this.overlay&&(this.drawerOpened=!1)}__setAriaExpanded(){const t=this.querySelector("vaadin-drawer-toggle");t&&t.setAttribute("aria-expanded",this.drawerOpened)}_updateDrawerSize(){const t=this.querySelectorAll("[slot=drawer]").length,e=this.$.drawer;0===t?e.setAttribute("hidden",""):e.removeAttribute("hidden"),this._updateOffsetSize()}_resize(){this._blockAnimationUntilAfterNextRender(),this._updateTouchOptimizedMode(),this._updateOverlayMode()}_updateOffsetSize(){const t=this.$.navbarTop.getBoundingClientRect(),e=this.$.navbarBottom.getBoundingClientRect();this.style.setProperty("--_vaadin-app-layout-navbar-offset-size",`${t.height}px`),this.style.setProperty("--_vaadin-app-layout-navbar-offset-size-bottom",`${e.height}px`);const i=this.$.drawer.getBoundingClientRect();this.style.setProperty("--_vaadin-app-layout-drawer-offset-size",`${i.width}px`)}_updateDrawerHeight(){const{scrollHeight:t,offsetHeight:e}=this.$.drawer,i=t>e?`${t}px`:"100%";this.style.setProperty("--_vaadin-app-layout-drawer-scroll-size",i)}_updateOverlayMode(){const t="true"===this._getCustomPropertyValue("--vaadin-app-layout-drawer-overlay");!this.overlay&&t&&(this._drawerStateSaved=this.drawerOpened,this.drawerOpened=!1),this._setOverlay(t),!this.overlay&&this._drawerStateSaved&&(this.drawerOpened=this._drawerStateSaved,this._drawerStateSaved=null),this._updateDrawerHeight(),this.__updateDrawerAriaAttributes()}__updateDrawerAriaAttributes(){const t=this.$.drawer;this.overlay?(t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-label",this.i18n.drawer)):(t.removeAttribute("role"),t.removeAttribute("aria-modal"),t.removeAttribute("aria-label"))}__drawerTransitionComplete(){return new Promise((t=>{"none"!==this._getCustomPropertyValue("--vaadin-app-layout-transition")?this.$.drawer.addEventListener("transitionend",t,{once:!0}):t()}))}async __trapFocusInDrawer(){await this.__drawerTransitionComplete(),this.drawerOpened&&(this.$.drawer.setAttribute("tabindex","0"),this.__focusTrapController.trapFocus(this.$.drawer))}async __releaseFocusFromDrawer(){if(await this.__drawerTransitionComplete(),this.drawerOpened)return;this.__focusTrapController.releaseFocus(),this.$.drawer.removeAttribute("tabindex");const t=this.querySelector("vaadin-drawer-toggle");t&&(t.focus(),t.setAttribute("focus-ring","focus"))}__onDrawerKeyDown(t){"Escape"===t.key&&this.overlay&&(this.drawerOpened=!1)}_closeDrawerOnChanged(t,e){e&&window.removeEventListener(e,this.__closeOverlayDrawerListener),t&&window.addEventListener(t,this.__closeOverlayDrawerListener)}_onBackdropClick(){this._close()}_onBackdropTouchend(t){t.preventDefault(),this._close()}_close(){this.drawerOpened=!1}_getCustomPropertyValue(t){return(getComputedStyle(this).getPropertyValue(t)||"").trim().toLowerCase()}_updateTouchOptimizedMode(){const t="true"===this._getCustomPropertyValue("--vaadin-app-layout-touch-optimized"),e=this.querySelectorAll('[slot*="navbar"]');e.length>0&&Array.from(e).forEach((e=>{e.getAttribute("slot").indexOf("touch-optimized")>-1&&(e.__touchOptimized=!0),t&&e.__touchOptimized?e.setAttribute("slot","navbar-bottom"):e.setAttribute("slot","navbar")})),0===this.$.navbarTop.querySelector("[name=navbar]").assignedNodes().length?this.$.navbarTop.setAttribute("hidden",""):this.$.navbarTop.removeAttribute("hidden"),t?this.$.navbarBottom.removeAttribute("hidden"):this.$.navbarBottom.setAttribute("hidden",""),this._updateOffsetSize()}_blockAnimationUntilAfterNextRender(){this.setAttribute("no-anim",""),cn(this,(()=>{this.removeAttribute("no-anim")}))}}customElements.define(_n.is,_n);const gn=n` + :host { + /* Sizing */ + --lumo-button-size: var(--lumo-size-m); + min-width: calc(var(--lumo-button-size) * 2); + height: var(--lumo-button-size); + padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2); + margin: var(--lumo-space-xs) 0; + box-sizing: border-box; + /* Style */ + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size-m); + font-weight: 500; + color: var(--_lumo-button-color, var(--lumo-primary-text-color)); + background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct)); + border-radius: var(--lumo-border-radius-m); + cursor: var(--lumo-clickable-cursor); + -webkit-tap-highlight-color: transparent; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + /* Set only for the internal parts so we don’t affect the host vertical alignment */ + [part='label'], + [part='prefix'], + [part='suffix'] { + line-height: var(--lumo-line-height-xs); + } + + [part='label'] { + padding: calc(var(--lumo-button-size) / 6) 0; + } + + :host([theme~='small']) { + font-size: var(--lumo-font-size-s); + --lumo-button-size: var(--lumo-size-s); + } + + :host([theme~='large']) { + font-size: var(--lumo-font-size-l); + --lumo-button-size: var(--lumo-size-l); + } + + /* For interaction states */ + :host::before, + :host::after { + content: ''; + /* We rely on the host always being relative */ + position: absolute; + z-index: 1; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: currentColor; + border-radius: inherit; + opacity: 0; + pointer-events: none; + } + + /* Hover */ + + @media (any-hover: hover) { + :host(:hover)::before { + opacity: 0.02; + } + } + + /* Active */ + + :host::after { + transition: opacity 1.4s, transform 0.1s; + filter: blur(8px); + } + + :host([active])::before { + opacity: 0.05; + transition-duration: 0s; + } + + :host([active])::after { + opacity: 0.1; + transition-duration: 0s, 0s; + transform: scale(0); + } + + /* Keyboard focus */ + + :host([focus-ring]) { + box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct); + } + + :host([theme~='primary'][focus-ring]) { + box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct); + } + + /* Types (primary, tertiary, tertiary-inline */ + + :host([theme~='tertiary']), + :host([theme~='tertiary-inline']) { + background-color: transparent !important; + min-width: 0; + } + + :host([theme~='tertiary']) { + padding: 0 calc(var(--lumo-button-size) / 6); + } + + :host([theme~='tertiary-inline'])::before { + display: none; + } + + :host([theme~='tertiary-inline']) { + margin: 0; + height: auto; + padding: 0; + line-height: inherit; + font-size: inherit; + } + + :host([theme~='tertiary-inline']) [part='label'] { + padding: 0; + overflow: visible; + line-height: inherit; + } + + :host([theme~='primary']) { + background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color)); + color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color)); + font-weight: 600; + min-width: calc(var(--lumo-button-size) * 2.5); + } + + :host([theme~='primary'])::before { + background-color: black; + } + + @media (any-hover: hover) { + :host([theme~='primary']:hover)::before { + opacity: 0.05; + } + } + + :host([theme~='primary'][active])::before { + opacity: 0.1; + } + + :host([theme~='primary'][active])::after { + opacity: 0.2; + } + + /* Colors (success, error, contrast) */ + + :host([theme~='success']) { + color: var(--lumo-success-text-color); + } + + :host([theme~='success'][theme~='primary']) { + background-color: var(--lumo-success-color); + color: var(--lumo-success-contrast-color); + } + + :host([theme~='error']) { + color: var(--lumo-error-text-color); + } + + :host([theme~='error'][theme~='primary']) { + background-color: var(--lumo-error-color); + color: var(--lumo-error-contrast-color); + } + + :host([theme~='contrast']) { + color: var(--lumo-contrast); + } + + :host([theme~='contrast'][theme~='primary']) { + background-color: var(--lumo-contrast); + color: var(--lumo-base-color); + } + + /* Disabled state. Keep selectors after other color variants. */ + + :host([disabled]) { + pointer-events: none; + color: var(--lumo-disabled-text-color); + } + + :host([theme~='primary'][disabled]) { + background-color: var(--lumo-contrast-30pct); + color: var(--lumo-base-color); + } + + :host([theme~='primary'][disabled]) [part] { + opacity: 0.7; + } + + /* Icons */ + + [part] ::slotted(vaadin-icon), + [part] ::slotted(iron-icon) { + display: inline-block; + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + + /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */ + [part] ::slotted(vaadin-icon[icon^='vaadin:']), + [part] ::slotted(iron-icon[icon^='vaadin:']) { + padding: 0.25em; + box-sizing: border-box !important; + } + + [part='prefix'] { + margin-left: -0.25em; + margin-right: 0.25em; + } + + [part='suffix'] { + margin-left: 0.25em; + margin-right: -0.25em; + } + + /* Icon-only */ + + :host([theme~='icon']:not([theme~='tertiary-inline'])) { + min-width: var(--lumo-button-size); + padding-left: calc(var(--lumo-button-size) / 4); + padding-right: calc(var(--lumo-button-size) / 4); + } + + :host([theme~='icon']) [part='prefix'], + :host([theme~='icon']) [part='suffix'] { + margin-left: 0; + margin-right: 0; + } + + /* RTL specific styles */ + + :host([dir='rtl']) [part='prefix'] { + margin-left: 0.25em; + margin-right: -0.25em; + } + + :host([dir='rtl']) [part='suffix'] { + margin-left: -0.25em; + margin-right: 0.25em; + } + + :host([dir='rtl'][theme~='icon']) [part='prefix'], + :host([dir='rtl'][theme~='icon']) [part='suffix'] { + margin-left: 0; + margin-right: 0; + } +`;nt("vaadin-button",gn,{moduleId:"lumo-button"});nt("vaadin-drawer-toggle",[gn,n` + :host { + width: var(--lumo-size-l); + height: var(--lumo-size-l); + min-width: auto; + margin: 0 var(--lumo-space-s); + padding: 0; + background: transparent; + } + + [part='icon'], + [part='icon']::after, + [part='icon']::before { + position: inherit; + height: auto; + width: auto; + background: transparent; + top: auto; + } + + [part='icon']::before { + font-family: lumo-icons; + font-size: var(--lumo-icon-size-m); + content: var(--lumo-icons-menu); + } +`],{moduleId:"lumo-drawer-toggle"}); +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +const yn="string"==typeof document.head.style.touchAction,xn="__polymerGestures",bn="__polymerGesturesHandled",wn="__polymerGesturesTouchAction",zn=["mousedown","mousemove","mouseup","click"],Mn=[0,1,4,2],Tn=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function En(t){return zn.indexOf(t)>-1}let An=!1;function Cn(t){En(t)}!function(){try{const t=Object.defineProperty({},"passive",{get(){An=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Sn=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),In={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Pn(t){const e=t.type;if(!En(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Tn&&(e=Mn[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const kn={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ln(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Dn(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Rn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],On={},Bn=[];function Fn(t){const e=Rn(t);return e.length>0?e[0]:t.target}function Nn(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const r=i[e];if(!r)return;if(!t[bn]&&(t[bn]={},"touch"===e.slice(0,5))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(kn.touch.id=i.identifier),kn.touch.id!==i.identifier)return;yn||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)kn.touch.x=e.clientX,kn.touch.y=e.clientY,kn.touch.scrollDecided=!1;else if("touchmove"===i){if(kn.touch.scrollDecided)return;kn.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Rn(t);for(let t,r=0;rn:"pan-y"===i&&(r=n>o)),r?t.preventDefault():$n("track")}}(t)}const n=t[bn];if(!n.skip){for(let e,i=0;i-1&&e.reset&&e.reset();for(let i,o=0;o{t.style.touchAction=e}));t[wn]=e}(t,r.touchAction)}(t,e,i),!0)}function jn(t){Bn.push(t);for(let e=0;e$n(t)})}function qn(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const r=Math.abs(t.x-e),n=Math.abs(t.y-i);return r>=5||n>=5}function Zn(t,e,i){if(!e)return;const r=t.moves[t.moves.length-2],n=t.moves[t.moves.length-1],o=n.x-t.x,a=n.y-t.y;let s,l=0;r&&(s=n.x-r.x,l=n.y-r.y),Vn(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o,dy:a,ddx:s,ddy:l,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),r=i;for(;r&&r.shadowRoot&&!window.ShadyDOM;){const n=r;if(r=r.shadowRoot.elementFromPoint(t,e),n===r)break;r&&(i=r)}return i}(i.clientX,i.clientY)})}function Hn(t,e,i){const r=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y),o=Fn(i||e);!o||In[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(n)||r<=25&&n<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Fn(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),r=t.pageX,n=t.pageY;return!(r>=i.left&&r<=i.right&&n>=i.top&&n<=i.bottom)}return!1}(e))&&(t.prevent||Vn(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */jn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Dn(this.info)},mousedown(t){if(!Pn(t))return;const e=Fn(t),i=this;Ln(this.info,(t=>{Pn(t)||(Gn("up",e,t),Dn(i.info))}),(t=>{Pn(t)&&Gn("up",e,t),Dn(i.info)})),Gn("down",e,t)},touchstart(t){Gn("down",Fn(t),t.changedTouches[0],t)},touchend(t){Gn("up",Fn(t),t.changedTouches[0],t)}}),jn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Dn(this.info)},mousedown(t){if(!Pn(t))return;const e=Fn(t),i=this,r=t=>{const r=t.clientX,n=t.clientY;qn(i.info,r,n)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&$n("tap"),i.info.addMove({x:r,y:n}),Pn(t)||(i.info.state="end",Dn(i.info)),e&&Zn(i.info,e,t),i.info.started=!0)};Ln(this.info,r,(t=>{i.info.started&&r(t),Dn(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Fn(t),i=t.changedTouches[0],r=i.clientX,n=i.clientY;qn(this.info,r,n)&&("start"===this.info.state&&$n("tap"),this.info.addMove({x:r,y:n}),Zn(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Fn(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Zn(this.info,e,i))}}),jn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){Pn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Pn(t)&&Hn(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Hn(this.info,t.changedTouches[0],t)}});const Wn=t=>class extends(gr(mr(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Un(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Un(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&this._setActive(!0)}_onKeyUp(t){super._onKeyUp(t),this._activeKeys.includes(t.key)&&this._setActive(!1)}_setActive(t){this.toggleAttribute("active",t)}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Xn=t=>class extends(Wn(yr(_r(t)))){static get properties(){return{tabindex:{value:0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class Yn extends(Xn(sr(ct(Ei)))){static get is(){return"vaadin-button"}static get template(){return Mi` + +
+ + + + + + + + + +
+ `}}customElements.define(Yn.is,Yn); +/** + * @license + * Copyright (c) 2018 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class Kn extends Yn{static get template(){return Mi` + + +
+
+ `}static get is(){return"vaadin-drawer-toggle"}static get properties(){return{ariaLabel:{type:String,value:"Toggle navigation panel",reflectToAttribute:!0}}}constructor(){super(),this.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("drawer-toggle-click",{bubbles:!0,composed:!0}))}))}}customElements.define(Kn.is,Kn),nt("vaadin-tab",n` + :host { + box-sizing: border-box; + padding: 0.5rem 0.75rem; + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size-m); + line-height: var(--lumo-line-height-xs); + font-weight: 500; + opacity: 1; + color: var(--lumo-secondary-text-color); + transition: 0.15s color, 0.2s transform; + flex-shrink: 0; + display: flex; + align-items: center; + position: relative; + cursor: var(--lumo-clickable-cursor); + transform-origin: 50% 100%; + outline: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + overflow: hidden; + min-width: var(--lumo-size-m); + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + } + + :host(:not([orientation='vertical'])) { + text-align: center; + } + + :host([orientation='vertical']) { + transform-origin: 0% 50%; + padding: 0.25rem 1rem; + min-height: var(--lumo-size-m); + min-width: 0; + } + + :host(:hover), + :host([focus-ring]) { + color: var(--lumo-body-text-color); + } + + :host([selected]) { + color: var(--lumo-primary-text-color); + transition: 0.6s color; + } + + :host([active]:not([selected])) { + color: var(--lumo-primary-text-color); + transition-duration: 0.1s; + } + + :host::before, + :host::after { + content: ''; + position: absolute; + display: var(--_lumo-tab-marker-display, block); + bottom: 0; + left: 50%; + width: var(--lumo-size-s); + height: 2px; + background-color: var(--lumo-contrast-60pct); + border-radius: var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0 0; + transform: translateX(-50%) scale(0); + transform-origin: 50% 100%; + transition: 0.14s transform cubic-bezier(0.12, 0.32, 0.54, 1); + will-change: transform; + } + + :host([selected])::before, + :host([selected])::after { + background-color: var(--lumo-primary-color); + } + + :host([orientation='vertical'])::before, + :host([orientation='vertical'])::after { + left: 0; + bottom: 50%; + transform: translateY(50%) scale(0); + width: 2px; + height: var(--lumo-size-xs); + border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0; + transform-origin: 100% 50%; + } + + :host::after { + box-shadow: 0 0 0 4px var(--lumo-primary-color); + opacity: 0.15; + transition: 0.15s 0.02s transform, 0.8s 0.17s opacity; + } + + :host([selected])::before, + :host([selected])::after { + transform: translateX(-50%) scale(1); + transition-timing-function: cubic-bezier(0.12, 0.32, 0.54, 1.5); + } + + :host([orientation='vertical'][selected])::before, + :host([orientation='vertical'][selected])::after { + transform: translateY(50%) scale(1); + } + + :host([selected]:not([active]))::after { + opacity: 0; + } + + :host(:not([orientation='vertical'])) ::slotted(a[href]) { + justify-content: center; + } + + :host ::slotted(a) { + display: flex; + width: 100%; + align-items: center; + height: 100%; + margin: -0.5rem -0.75rem; + padding: 0.5rem 0.75rem; + outline: none; + + /* + Override the CSS inherited from \`lumo-color\` and \`lumo-typography\`. + Note: \`!important\` is needed because of the \`:slotted\` specificity. + */ + text-decoration: none !important; + color: inherit !important; + } + + :host ::slotted(vaadin-icon), + :host ::slotted(iron-icon) { + margin: 0 4px; + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + + /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */ + :host ::slotted(vaadin-icon[icon^='vaadin:']), + :host ::slotted(iron-icon[icon^='vaadin:']) { + padding: 0.25rem; + box-sizing: border-box !important; + } + + :host(:not([dir='rtl'])) ::slotted(vaadin-icon:first-child), + :host(:not([dir='rtl'])) ::slotted(iron-icon:first-child) { + margin-left: 0; + } + + :host(:not([dir='rtl'])) ::slotted(vaadin-icon:last-child), + :host(:not([dir='rtl'])) ::slotted(iron-icon:last-child) { + margin-right: 0; + } + + :host([theme~='icon-on-top']) { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + text-align: center; + padding-bottom: 0.5rem; + padding-top: 0.25rem; + } + + :host([theme~='icon-on-top']) ::slotted(a) { + flex-direction: column; + align-items: center; + margin-top: -0.25rem; + padding-top: 0.25rem; + } + + :host([theme~='icon-on-top']) ::slotted(vaadin-icon), + :host([theme~='icon-on-top']) ::slotted(iron-icon) { + margin: 0; + } + + /* Disabled */ + + :host([disabled]) { + pointer-events: none; + opacity: 1; + color: var(--lumo-disabled-text-color); + } + + /* Focus-ring */ + + :host([focus-ring]) { + box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct); + border-radius: var(--lumo-border-radius-m); + } + + /* RTL specific styles */ + + :host([dir='rtl'])::before, + :host([dir='rtl'])::after { + left: auto; + right: 50%; + transform: translateX(50%) scale(0); + } + + :host([dir='rtl'][selected]:not([orientation='vertical']))::before, + :host([dir='rtl'][selected]:not([orientation='vertical']))::after { + transform: translateX(50%) scale(1); + } + + :host([dir='rtl']) ::slotted(vaadin-icon:first-child), + :host([dir='rtl']) ::slotted(iron-icon:first-child) { + margin-right: 0; + } + + :host([dir='rtl']) ::slotted(vaadin-icon:last-child), + :host([dir='rtl']) ::slotted(iron-icon:last-child) { + margin-left: 0; + } + + :host([orientation='vertical'][dir='rtl']) { + transform-origin: 100% 50%; + } + + :host([dir='rtl'][orientation='vertical'])::before, + :host([dir='rtl'][orientation='vertical'])::after { + left: auto; + right: 0; + border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s); + transform-origin: 0% 50%; + } + `,{moduleId:"lumo-tab"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Jn=t=>class extends(Wn(_r(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class Qn extends(sr(ct(Jn(Ei)))){static get template(){return Mi` + + + `}static get is(){return"vaadin-tab"}ready(){super.ready(),this.setAttribute("role","tab")}_onKeyUp(t){const e=this.hasAttribute("active");if(super._onKeyUp(t),e){const t=this.querySelector("a");t&&t.click()}}}customElements.define(Qn.is,Qn),nt("vaadin-tabs",n` + :host { + -webkit-tap-highlight-color: transparent; + } + + :host(:not([orientation='vertical'])) { + box-shadow: inset 0 -1px 0 0 var(--lumo-contrast-10pct); + position: relative; + min-height: var(--lumo-size-l); + } + + :host([orientation='horizontal']) [part='tabs'] ::slotted(vaadin-tab:not([theme~='icon-on-top'])) { + justify-content: center; + } + + :host([orientation='vertical']) { + box-shadow: -1px 0 0 0 var(--lumo-contrast-10pct); + } + + :host([orientation='horizontal']) [part='tabs'] { + margin: 0 0.75rem; + } + + :host([orientation='vertical']) [part='tabs'] { + width: 100%; + margin: 0.5rem 0; + } + + [part='forward-button'], + [part='back-button'] { + position: absolute; + z-index: 1; + font-family: lumo-icons; + color: var(--lumo-tertiary-text-color); + font-size: var(--lumo-icon-size-m); + display: flex; + align-items: center; + justify-content: center; + width: 1.5em; + height: 100%; + transition: 0.2s opacity; + top: 0; + } + + [part='forward-button']:hover, + [part='back-button']:hover { + color: inherit; + } + + :host(:not([dir='rtl'])) [part='forward-button'] { + right: 0; + } + + [part='forward-button']::after { + content: var(--lumo-icons-angle-right); + } + + [part='back-button']::after { + content: var(--lumo-icons-angle-left); + } + + /* Tabs overflow */ + + [part='tabs'] { + --_lumo-tabs-overflow-mask-image: none; + -webkit-mask-image: var(--_lumo-tabs-overflow-mask-image); + mask-image: var(--_lumo-tabs-overflow-mask-image); + } + + /* Horizontal tabs overflow */ + + /* Both ends overflowing */ + :host([overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + 90deg, + transparent 2em, + #000 4em, + #000 calc(100% - 4em), + transparent calc(100% - 2em) + ); + } + + /* End overflowing */ + :host([overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 4em), transparent calc(100% - 2em)); + } + + /* Start overflowing */ + :host([overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent 2em, #000 4em); + } + + /* Vertical tabs overflow */ + + /* Both ends overflowing */ + :host([overflow~='start'][overflow~='end'][orientation='vertical']) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em, #000 calc(100% - 2em), transparent); + } + + /* End overflowing */ + :host([overflow~='end'][orientation='vertical']) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(#000 calc(100% - 2em), transparent); + } + + /* Start overflowing */ + :host([overflow~='start'][orientation='vertical']) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em); + } + + :host [part='tabs'] ::slotted(:not(vaadin-tab)) { + margin-left: var(--lumo-space-m); + } + + /* Centered */ + + :host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:first-of-type) { + margin-inline-start: auto; + } + + :host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:last-of-type) { + margin-inline-end: auto; + } + + /* Small */ + + :host([theme~='small']), + :host([theme~='small']) [part='tabs'] { + min-height: var(--lumo-size-m); + } + + :host([theme~='small']) [part='tabs'] ::slotted(vaadin-tab) { + font-size: var(--lumo-font-size-s); + } + + /* Minimal */ + + :host([theme~='minimal']) { + box-shadow: none; + --_lumo-tab-marker-display: none; + } + + /* Hide-scroll-buttons */ + + :host([theme~='hide-scroll-buttons']) [part='back-button'], + :host([theme~='hide-scroll-buttons']) [part='forward-button'] { + display: none; + } + + /* prettier-ignore */ + :host([theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + 90deg, + transparent, + #000 2em, + #000 calc(100% - 2em), + transparent 100% + ); + } + + :host([theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 2em), transparent 100%); + } + + :host([theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent, #000 2em); + } + + /* Equal-width tabs */ + :host([theme~='equal-width-tabs']) { + flex: auto; + } + + :host([theme~='equal-width-tabs']) [part='tabs'] ::slotted(vaadin-tab) { + flex: 1 0 0%; + } + + /* RTL specific styles */ + + :host([dir='rtl']) [part='forward-button']::after { + content: var(--lumo-icons-angle-left); + } + + :host([dir='rtl']) [part='back-button']::after { + content: var(--lumo-icons-angle-right); + } + + :host([orientation='vertical'][dir='rtl']) { + box-shadow: 1px 0 0 0 var(--lumo-contrast-10pct); + } + + :host([dir='rtl']) [part='forward-button'] { + left: 0; + } + + :host([dir='rtl']) [part='tabs'] ::slotted(:not(vaadin-tab)) { + margin-left: 0; + margin-right: var(--lumo-space-m); + } + + /* Both ends overflowing */ + :host([dir='rtl'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + -90deg, + transparent 2em, + #000 4em, + #000 calc(100% - 4em), + transparent calc(100% - 2em) + ); + } + + /* End overflowing */ + :host([dir='rtl'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 4em), transparent calc(100% - 2em)); + } + + /* Start overflowing */ + :host([dir='rtl'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent 2em, #000 4em); + } + + :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) + [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + -90deg, + transparent, + #000 2em, + #000 calc(100% - 2em), + transparent 100% + ); + } + + :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 2em), transparent 100%); + } + + :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent, #000 2em); + } + `,{moduleId:"lumo-tabs"}); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const to=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect)}))}))})),eo=Vt((t=>class extends t{connectedCallback(){if(super.connectedCallback(),to.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,to.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),to.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&to.unobserve(t)),this.__parent=null}}get _observeParent(){return!1}_onResize(t){}notifyResize(){console.warn("WARNING: Since Vaadin 23, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.")}})),io=t=>class extends t{static get properties(){return{_hasVaadinListMixin:{value:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}ready(){super.ready(),this.addEventListener("keydown",(t=>this._onKeydown(t))),this.addEventListener("click",(t=>this._onClick(t))),this._observer=new dr(this,(()=>{this._setItems(this._filterItems(Array.from(this.children)))}))}_enhanceItems(t,e,i,r){if(!r&&t){this.setAttribute("aria-orientation",e||"vertical"),this.items.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i||0);const r=t[i];t.forEach((t=>t.selected=t===r)),r&&!r.disabled&&this._scrollToItem(i)}}get focused(){return this.getRootNode().activeElement}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){this._searchReset=rr.debounce(this._searchReset,tr.after(500),(()=>this._searchBuf="")),this._searchBuf+=e.toLowerCase();this.items.some((t=>0===t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().indexOf(this._searchBuf)))||(this._searchBuf=e.toLowerCase());const i=1===this._searchBuf.length?t+1:t;return this._getAvailableIndex(i,1,(t=>!(t.disabled||this._isItemHidden(t))&&0===t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().indexOf(this._searchBuf)))}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}_onKeydown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[a-zA-Z0-9]/.test(e)&&1===e.length){const t=this._searchKey(i,e);return void(t>=0&&this._focus(t))}let r,n;const o=this._isRTL?-1:1;this._vertical&&"ArrowUp"===e||!this._vertical&&"ArrowLeft"===e?(n=-o,r=i-o):this._vertical&&"ArrowDown"===e||!this._vertical&&"ArrowRight"===e?(n=o,r=i+o):"Home"===e?(n=1,r=0):"End"===e&&(n=-1,r=this.items.length-1),r=this._getAvailableIndex(r,n,(t=>!(t.disabled||this._isItemHidden(t)))),r>=0&&(this._focus(r),t.preventDefault())}_getAvailableIndex(t,e,i){const r=this.items.length;for(let n=0;"number"==typeof t&&n=r&&(t=0);if(i(this.items[t]))return t}return-1}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(t,1,(t=>!t.disabled));const e=this.items[t];this.items.forEach((t=>t.tabIndex=t===e?0:-1))}_focus(t){const e=this.items[t];this.items.forEach((t=>t.focused=t===e)),this._setFocusable(t),this._scrollToItem(t),this._focusItem(e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}focus(){this._observer&&this._observer.flush();const t=this.querySelector('[tabindex="0"]')||(this.items?this.items[0]:null);this._focusItem(t)}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[t+1]||e).getBoundingClientRect(),o=(this.items[t-1]||e).getBoundingClientRect();let a=0;!this._isRTL&&n[i[1]]>=r[i[1]]||this._isRTL&&n[i[1]]<=r[i[1]]?a=n[i[1]]-r[i[1]]:(!this._isRTL&&o[i[0]]<=r[i[0]]||this._isRTL&&o[i[0]]>=r[i[0]])&&(a=o[i[0]]-r[i[0]]),this._scroll(a)}get _vertical(){return"horizontal"!==this.orientation}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=Ai.detectScrollType(),r=Ai.getNormalizedScrollLeft(i,e,this._scrollerElement)+t;Ai.setNormalizedScrollLeft(i,e,this._scrollerElement,r)}}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class ro extends(eo(sr(io(ct(Ei))))){static get template(){return Mi` + + + +
+ +
+ + + `}static get is(){return"vaadin-tabs"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["__tabsItemsChanged(items, items.*)"]}constructor(){super(),this.__itemsResizeObserver=new ResizeObserver((()=>{setTimeout((()=>this._updateOverflow()))}))}ready(){super.ready(),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),cn(this,(()=>{this._updateOverflow()}))}_onResize(){this._updateOverflow()}__tabsItemsChanged(t){this.__itemsResizeObserver.disconnect(),(t||[]).forEach((t=>{this.__itemsResizeObserver.observe(t)})),this._updateOverflow()}_scrollForward(){this._scroll(-this.__direction*this._scrollOffset)}_scrollBack(){this._scroll(this.__direction*this._scrollOffset)}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return this._vertical||"rtl"!==this.getAttribute("dir")?-1:1}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:this.__getNormalizedScrollLeft(this._scrollerElement),e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;let i=t>0?"start":"";i+=t+this._scrollOffset"start"===t?"end":"start"))),i?this.setAttribute("overflow",i.trim()):this.removeAttribute("overflow")}}customElements.define(ro.is,ro); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const no=n` + :host { + top: var(--lumo-space-m); + right: var(--lumo-space-m); + bottom: var(--lumo-space-m); + left: var(--lumo-space-m); + /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */ + /* stylelint-disable-next-line */ + outline: 0px solid transparent; + } + + [part='overlay'] { + background-color: var(--lumo-base-color); + background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct)); + border-radius: var(--lumo-border-radius-m); + box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m); + color: var(--lumo-body-text-color); + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size-m); + font-weight: 400; + line-height: var(--lumo-line-height-m); + letter-spacing: 0; + text-transform: none; + -webkit-text-size-adjust: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + [part='content'] { + padding: var(--lumo-space-xs); + } + + [part='backdrop'] { + background-color: var(--lumo-shade-20pct); + animation: 0.2s lumo-overlay-backdrop-enter both; + will-change: opacity; + } + + @keyframes lumo-overlay-backdrop-enter { + 0% { + opacity: 0; + } + } + + :host([closing]) [part='backdrop'] { + animation: 0.2s lumo-overlay-backdrop-exit both; + } + + @keyframes lumo-overlay-backdrop-exit { + 100% { + opacity: 0; + } + } + + @keyframes lumo-overlay-dummy-animation { + 0% { + opacity: 1; + } + + 100% { + opacity: 1; + } + } +`; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +function oo(t,e,i,r,n){let o;n&&(o="object"==typeof i&&null!==i,o&&(r=t.__dataTemp[e]));let a=r!==i&&(r==r||i==i);return o&&a&&(t.__dataTemp[e]=i),a}nt("",no,{moduleId:"lumo-overlay"}),nt("vaadin-overlay",no,{moduleId:"lumo-vaadin-overlay"});const ao=Vt((t=>class extends t{_shouldPropertyChange(t,e,i){return oo(this,t,e,i,!0)}}));Vt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return oo(this,t,e,i,this.mutableData)}})),ao._mutablePropertyChange=oo; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +let so=null;function lo(){return so}lo.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:lo,writable:!0}});const ho=vi(lo),co=ao(ho);const uo=vi(class{});class po extends uo{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i can only be templatized once");t.__templatizeOwner=e;let r=(e?e.constructor:po)._parseTemplate(t),n=r.templatizeInstanceClass;n||(n=vo(t,r,i),r.templatizeInstanceClass=n);const o=mo(t);_o(t,r,i,o);let a=class extends n{};return a.prototype._methodHost=o,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=r.hostProps,a}class bo extends(ct(ki(br(Ei)))){static get template(){return Mi` + + +
+
+
+ +
+
+ `}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),this._observer=new dr(this,(t=>{this._setTemplateFromNodes(t.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),en&&(this._boundIosResizeListener=()=>this._detectIosNavbar()),this.__focusTrapController=new vn(this)}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addController(this.__focusTrapController)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;e&&i>t?this.style.setProperty("--vaadin-overlay-viewport-bottom",i-t+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_setTemplateFromNodes(t){this.template=t.filter((t=>t.localName&&"template"===t.localName))[0]||this.template}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}_ironOverlayCanceled(t){t.preventDefault()}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(t,e){this._instance||this._ensureTemplatized(),t?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),cn(this,(()=>{this.focusTrap&&this.__focusTrapController.trapFocus(this.$.overlay);const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this.focusTrap&&this.__focusTrapController.releaseFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(t,e){const i=`__${t}Handler`,r=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",r),delete this[i])};this[i]=r,this.addEventListener("animationend",r)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")}_finishClosing(){document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing")}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){this._exitModalState();const t=this.restoreFocusNode||this.__restoreFocusNode;if(this.restoreFocusOnClose&&t){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&setTimeout((()=>t.focus())),this.__restoreFocusNode=null}this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((t=>t instanceof bo&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0))}get _last(){return this===bo.__attachedInstances.pop()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),bo.__attachedInstances.forEach((t=>{t!==this&&(t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=bo.__attachedInstances;let e;for(;(e=t.pop())&&(e===this||(e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((t=>{t.parentNode===this.content&&this.content.removeChild(t)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(t){this._removeOldContent(),t._Templatizer||(t._Templatizer=xo(t,this,{forwardHostProp(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new t._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const e=t._templateRoot||(t._templateRoot=t.getRootNode());if(e!==document){this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(e.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"");if(t=t.replace(/:host/g,":host-nomatch"),t){const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(t,e,i,r){t!==e?this.template=void 0:i!==r&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i,r,n){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const o=this._oldOwner!==i||this._oldModel!==r;this._oldModel=r,this._oldOwner=i;const a=this._oldTemplate!==t;this._oldTemplate=t;const s=this._oldRenderer!==e;this._oldRenderer=e;const l=this._oldOpened!==n;this._oldOpened=n,s&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),t&&a?this._stampOverlayTemplate(t):e&&(s||l||o)&&n&&this.requestContentUpdate()}_getActiveElement(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}bringToFront(){let t="";const e=bo.__attachedInstances.filter((t=>t!==this)).pop();if(e){t=e.__zIndex+1}this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(bo.is,bo); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +function wo(t){return t.touches?t.touches[0]:t}function zo(t){return t.clientX>=0&&t.clientX<=window.innerWidth&&t.clientY>=0&&t.clientY<=window.innerHeight} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */nt("vaadin-dialog-overlay",[no,n` + /* Optical centering */ + :host::before, + :host::after { + content: ''; + flex-basis: 0; + flex-grow: 1; + } + + :host::after { + flex-grow: 1.1; + } + + [part='overlay'] { + border-radius: var(--lumo-border-radius-l); + box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-xl); + background-image: none; + outline: none; + -webkit-tap-highlight-color: transparent; + } + + [part='content'] { + padding: var(--lumo-space-l); + } + + :host(:is([has-header], [has-title])) [part='header'] + [part='content'] { + padding-top: 0; + } + + [part='header'], + [part='header-content'], + [part='footer'] { + gap: var(--lumo-space-xs) var(--lumo-space-s); + line-height: var(--lumo-line-height-s); + } + + [part='header'] { + padding: var(--lumo-space-m); + background-color: var(--lumo-base-color); + border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */ + } + + [part='footer'] { + padding: var(--lumo-space-s) var(--lumo-space-m); + background-color: var(--lumo-contrast-5pct); + border-radius: 0 0 var(--lumo-border-radius-l) var(--lumo-border-radius-l); /* Needed for Safari */ + } + + [part='title'] { + font-size: var(--lumo-font-size-xl); + font-weight: 600; + color: var(--lumo-header-text-color); + margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m)); + } + + /* No padding */ + :host([theme~='no-padding']) [part='content'] { + padding: 0; + } + + @media (min-height: 320px) { + :host([overflow~='top']) [part='header'] { + box-shadow: 0 1px 0 0 var(--lumo-contrast-10pct); + } + } + + /* Animations */ + + :host([opening]), + :host([closing]) { + animation: 0.25s lumo-overlay-dummy-animation; + } + + :host([opening]) [part='overlay'] { + animation: 0.12s 0.05s vaadin-dialog-enter cubic-bezier(0.215, 0.61, 0.355, 1) both; + } + + @keyframes vaadin-dialog-enter { + 0% { + opacity: 0; + transform: scale(0.95); + } + } + + :host([closing]) [part='overlay'] { + animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both; + } + + :host([closing]) [part='backdrop'] { + animation-delay: 0.05s; + } + + @keyframes vaadin-dialog-exit { + 100% { + opacity: 0; + transform: scale(1.02); + } + } +`],{moduleId:"lumo-dialog"});const Mo=t=>class extends t{static get properties(){return{draggable:{type:Boolean,value:!1,reflectToAttribute:!0},_touchDevice:{type:Boolean,value:rn},__dragHandleClassName:{type:String}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._startDrag=this._startDrag.bind(this),this._drag=this._drag.bind(this),this._stopDrag=this._stopDrag.bind(this),this.$.overlay.$.overlay.addEventListener("mousedown",this._startDrag),this.$.overlay.$.overlay.addEventListener("touchstart",this._startDrag)}_startDrag(t){if(!("touchstart"===t.type&&t.touches.length>1)&&this.draggable&&(0===t.button||t.touches)){const e=this.$.overlay.$.resizerContainer,i=t.target===e,r=t.offsetX>e.clientWidth||t.offsetY>e.clientHeight,n=t.target===this.$.overlay.$.content,o=t.composedPath().some(((t,e)=>{if(!t.classList)return!1;const i=t.classList.contains(this.__dragHandleClassName||"draggable"),r=t.classList.contains("draggable-leaf-only"),n=0===e;return r&&n||i&&(!r||n)}));if(i&&!r||n||o){o||t.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const e=wo(t);this._originalMouseCoords={top:e.pageY,left:e.pageX},window.addEventListener("mouseup",this._stopDrag),window.addEventListener("touchend",this._stopDrag),window.addEventListener("mousemove",this._drag),window.addEventListener("touchmove",this._drag),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}}_drag(t){const e=wo(t);if(zo(e)){const t=this._originalBounds.top+(e.pageY-this._originalMouseCoords.top),i=this._originalBounds.left+(e.pageX-this._originalMouseCoords.left);this.$.overlay.setBounds({top:t,left:i})}}_stopDrag(){window.removeEventListener("mouseup",this._stopDrag),window.removeEventListener("touchend",this._stopDrag),window.removeEventListener("mousemove",this._drag),window.removeEventListener("touchmove",this._drag)}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;nt("vaadin-dialog-overlay",n` + [part='overlay'] { + position: relative; + overflow: visible; + max-height: 100%; + display: flex; + } + + [part='content'] { + box-sizing: border-box; + height: 100%; + } + + .resizer-container { + overflow: auto; + flex-grow: 1; + border-radius: inherit; /* prevent child elements being drawn outside part=overlay */ + } + + [part='overlay'][style] .resizer-container { + min-height: 100%; + width: 100%; + } + + :host(:not([resizable])) .resizer { + display: none; + } + + :host([resizable]) [part='title'] { + cursor: move; + -webkit-user-select: none; + user-select: none; + } + + .resizer { + position: absolute; + height: 16px; + width: 16px; + } + + .resizer.edge { + height: 8px; + width: 8px; + top: -4px; + right: -4px; + bottom: -4px; + left: -4px; + } + + .resizer.edge.n { + width: auto; + bottom: auto; + cursor: ns-resize; + } + + .resizer.ne { + top: -4px; + right: -4px; + cursor: nesw-resize; + } + + .resizer.edge.e { + height: auto; + left: auto; + cursor: ew-resize; + } + + .resizer.se { + bottom: -4px; + right: -4px; + cursor: nwse-resize; + } + + .resizer.edge.s { + width: auto; + top: auto; + cursor: ns-resize; + } + + .resizer.sw { + bottom: -4px; + left: -4px; + cursor: nesw-resize; + } + + .resizer.edge.w { + height: auto; + right: auto; + cursor: ew-resize; + } + + .resizer.nw { + top: -4px; + left: -4px; + cursor: nwse-resize; + } + `,{moduleId:"vaadin-dialog-resizable-overlay-styles"});const To=t=>class extends t{static get properties(){return{resizable:{type:Boolean,value:!1,reflectToAttribute:!0}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._resizeListeners={start:{},resize:{},stop:{}},this._addResizeListeners()}_addResizeListeners(){["n","e","s","w","nw","ne","se","sw"].forEach((t=>{const e=document.createElement("div");this._resizeListeners.start[t]=e=>this._startResize(e,t),this._resizeListeners.resize[t]=e=>this._resize(e,t),this._resizeListeners.stop[t]=()=>this._stopResize(t),1===t.length&&e.classList.add("edge"),e.classList.add("resizer"),e.classList.add(t),e.addEventListener("mousedown",this._resizeListeners.start[t]),e.addEventListener("touchstart",this._resizeListeners.start[t]),this.$.overlay.$.resizerContainer.appendChild(e)}))}_startResize(t,e){if(!("touchstart"===t.type&&t.touches.length>1)&&(0===t.button||t.touches)){t.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const i=wo(t);this._originalMouseCoords={top:i.pageY,left:i.pageX},window.addEventListener("mousemove",this._resizeListeners.resize[e]),window.addEventListener("touchmove",this._resizeListeners.resize[e]),window.addEventListener("mouseup",this._resizeListeners.stop[e]),window.addEventListener("touchend",this._resizeListeners.stop[e]),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}_resize(t,e){const i=wo(t);if(zo(i)){const t=40;e.split("").forEach((e=>{switch(e){case"n":{const e=this._originalBounds.height-(i.pageY-this._originalMouseCoords.top),r=this._originalBounds.top+(i.pageY-this._originalMouseCoords.top);e>t&&this.$.overlay.setBounds({top:r,height:e});break}case"e":{const e=this._originalBounds.width+(i.pageX-this._originalMouseCoords.left);e>t&&this.$.overlay.setBounds({width:e});break}case"s":{const e=this._originalBounds.height+(i.pageY-this._originalMouseCoords.top);e>t&&this.$.overlay.setBounds({height:e});break}case"w":{const e=this._originalBounds.width-(i.pageX-this._originalMouseCoords.left),r=this._originalBounds.left+(i.pageX-this._originalMouseCoords.left);e>t&&this.$.overlay.setBounds({left:r,width:e});break}}}))}}_stopResize(t){window.removeEventListener("mousemove",this._resizeListeners.resize[t]),window.removeEventListener("touchmove",this._resizeListeners.resize[t]),window.removeEventListener("mouseup",this._resizeListeners.stop[t]),window.removeEventListener("touchend",this._resizeListeners.stop[t]),this.dispatchEvent(new CustomEvent("resize",{detail:this._getResizeDimensions()}))}_getResizeDimensions(){const t=this.$.overlay.$.resizerContainer.scrollTop,{width:e,height:i}=getComputedStyle(this.$.overlay.$.overlay),r=this.$.overlay.$.content;r.setAttribute("style","position: absolute; top: 0; right: 0; bottom: 0; left: 0; box-sizing: content-box; height: auto;");const{width:n,height:o}=getComputedStyle(r);return r.removeAttribute("style"),this.$.overlay.$.resizerContainer.scrollTop=t,{width:e,height:i,contentWidth:n,contentHeight:o}}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;let Eo;nt("vaadin-dialog-overlay",n` + [part='header'], + [part='header-content'], + [part='footer'] { + display: flex; + align-items: center; + flex-wrap: wrap; + flex: none; + pointer-events: none; + z-index: 1; + } + + ::slotted([slot='header-content']), + ::slotted([slot='title']), + ::slotted([slot='footer']) { + display: contents; + pointer-events: auto; + } + + [part='header-content'] { + flex: 1; + } + + :host([has-title]) [part='header-content'], + [part='footer'] { + justify-content: flex-end; + } + + :host(:not([has-title]):not([has-header])) [part='header'], + :host(:not([has-header])) [part='header-content'], + :host(:not([has-title])) [part='title'], + :host(:not([has-footer])) [part='footer'] { + display: none !important; + } + + :host(:is([has-title], [has-header], [has-footer])) [part='content'] { + height: auto; + } + + @media (min-height: 320px) { + :host(:is([has-title], [has-header], [has-footer])) .resizer-container { + overflow: hidden; + display: flex; + flex-direction: column; + } + + :host(:is([has-title], [has-header], [has-footer])) [part='content'] { + flex: 1; + overflow: auto; + } + } + + /* + NOTE(platosha): Make some min-width to prevent collapsing of the content + taking the parent width, e. g., and such. + */ + [part='content'] { + min-width: 12em; /* matches the default width */ + } + + :host([has-bounds-set]) [part='overlay'] { + max-width: none; + } + `,{moduleId:"vaadin-dialog-overlay-styles"});class Ao extends bo{static get is(){return"vaadin-dialog-overlay"}static get template(){if(!Eo){Eo=super.template.cloneNode(!0);const t=Eo.content.querySelector('[part="content"]'),e=Eo.content.querySelector('[part="overlay"]'),i=document.createElement("section");i.id="resizerContainer",i.classList.add("resizer-container"),i.appendChild(t),e.appendChild(i);const r=document.createElement("header");r.setAttribute("part","header"),i.insertBefore(r,t);const n=document.createElement("div");n.setAttribute("part","title"),r.appendChild(n);const o=document.createElement("slot");o.setAttribute("name","title"),n.appendChild(o);const a=document.createElement("div");a.setAttribute("part","header-content"),r.appendChild(a);const s=document.createElement("slot");s.setAttribute("name","header-content"),a.appendChild(s);const l=document.createElement("footer");l.setAttribute("part","footer"),i.appendChild(l);const h=document.createElement("slot");h.setAttribute("name","footer"),l.appendChild(h)}return Eo}static get observers(){return["_headerFooterRendererChange(headerRenderer, footerRenderer, opened)","_headerTitleChanged(headerTitle, opened)"]}static get properties(){return{modeless:Boolean,withBackdrop:Boolean,headerTitle:String,headerRenderer:Function,footerRenderer:Function}}ready(){super.ready(),this.__resizeObserver=new ResizeObserver((()=>{this.__updateOverflow()})),this.__resizeObserver.observe(this.$.resizerContainer),this.$.content.addEventListener("scroll",(()=>{this.__updateOverflow()}))}__createContainer(t){const e=document.createElement("div");return e.setAttribute("slot",t),e}__clearContainer(t){t.innerHTML="",delete t._$litPart$}__initContainer(t,e){return t?this.__clearContainer(t):t=this.__createContainer(e),t}_headerFooterRendererChange(t,e,i){const r=this.__oldHeaderRenderer!==t;this.__oldHeaderRenderer=t;const n=this.__oldFooterRenderer!==e;this.__oldFooterRenderer=e;const o=this._oldOpenedFooterHeader!==i;this._oldOpenedFooterHeader=i,this.toggleAttribute("has-header",!!t),this.toggleAttribute("has-footer",!!e),r&&(t?this.headerContainer=this.__initContainer(this.headerContainer,"header-content"):this.headerContainer&&(this.headerContainer.remove(),this.headerContainer=null,this.__updateOverflow())),n&&(e?this.footerContainer=this.__initContainer(this.footerContainer,"footer"):this.footerContainer&&(this.footerContainer.remove(),this.footerContainer=null,this.__updateOverflow())),(t&&(r||o)||e&&(n||o))&&i&&this.requestContentUpdate()}_headerTitleChanged(t,e){this.toggleAttribute("has-title",!!t),e&&(t||this._oldHeaderTitle)&&this.requestContentUpdate(),this._oldHeaderTitle=t}_headerTitleRenderer(){this.headerTitle?(this.headerTitleElement||(this.headerTitleElement=document.createElement("span"),this.headerTitleElement.setAttribute("slot","title"),this.headerTitleElement.classList.add("draggable")),this.appendChild(this.headerTitleElement),this.headerTitleElement.textContent=this.headerTitle):this.headerTitleElement&&(this.headerTitleElement.remove(),this.headerTitleElement=null)}requestContentUpdate(){super.requestContentUpdate(),this.headerContainer&&(this.headerContainer.parentElement||this.appendChild(this.headerContainer),this.headerRenderer&&this.headerRenderer.call(this.owner,this.headerContainer,this.owner)),this.footerContainer&&(this.footerContainer.parentElement||this.appendChild(this.footerContainer),this.footerRenderer&&this.footerRenderer.call(this.owner,this.footerContainer,this.owner)),this._headerTitleRenderer(),this.__updateOverflow()}setBounds(t){const e=this.$.overlay,i={...t};"absolute"!==e.style.position&&(e.style.position="absolute",this.setAttribute("has-bounds-set",""),this.__forceSafariReflow());for(const t in i)"number"==typeof i[t]&&(i[t]=`${i[t]}px`);Object.assign(e.style,i)}getBounds(){const t=this.$.overlay.getBoundingClientRect(),e=this.getBoundingClientRect();return{top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height}}__forceSafariReflow(){const t=this.$.resizerContainer.scrollTop,e=this.$.overlay;e.style.display="block",requestAnimationFrame((()=>{e.style.display="",this.$.resizerContainer.scrollTop=t}))}__updateOverflow(){let t="";if(this.hasAttribute("has-header")||this.hasAttribute("has-footer")||this.headerTitle){const e=this.$.content;e.scrollTop>0&&(t+=" top"),e.scrollTop0&&this.getAttribute("overflow")!==e?this.setAttribute("overflow",e):0===e.length&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")}}customElements.define(Ao.is,Ao);class Co extends(it(sr(Mo(To(Ei))))){static get template(){return Mi` + + + + `}static get is(){return"vaadin-dialog"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},ariaLabel:{type:String,value:""},renderer:Function,headerTitle:String,headerRenderer:Function,footerRenderer:Function,modeless:{type:Boolean,value:!1}}}static get observers(){return["_openedChanged(opened)","_ariaLabelChanged(ariaLabel, headerTitle)","_rendererChanged(renderer, headerRenderer, footerRenderer)"]}ready(){ +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +var t;super.ready(),this.$.overlay.setAttribute("role","dialog"),this.$.overlay.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),this.$.overlay.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: