diff --git a/assets/index-2BckyB3e.js b/assets/index-Br3bskOq.js similarity index 58% rename from assets/index-2BckyB3e.js rename to assets/index-Br3bskOq.js index 673542d..c75957c 100644 --- a/assets/index-2BckyB3e.js +++ b/assets/index-Br3bskOq.js @@ -1,4 +1,4 @@ -var Fr=Object.defineProperty;var on=t=>{throw TypeError(t)};var Wr=(t,e,n)=>e in t?Fr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var g=(t,e,n)=>Wr(t,typeof e!="symbol"?e+"":e,n),de=(t,e,n)=>e.has(t)||on("Cannot "+n);var y=(t,e,n)=>(de(t,e,"read from private field"),n?n.call(t):e.get(t)),C=(t,e,n)=>e.has(t)?on("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),D=(t,e,n,r)=>(de(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),q=(t,e,n)=>(de(t,e,"access private method"),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();const Rr=(t,e)=>{const n=t.width/2-e.width/2,r=t.height/2-e.height/2;return{width:n,height:r}},Hr=(t,e)=>{const n={width:e.width/t.width,height:e.height/t.height},r=Math.min(n.width,n.height),s=t.width*r,i=t.height*r;return{width:s,height:i}};class k{constructor(e=0,n=0){this.x=e,this.y=n}set(e,n){this.x=e,this.y=n}clone(){return new k(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}sub(e){return this.x-=e.x,this.y-=e.y,this}}var xt,Ot;class J extends OffscreenCanvas{constructor(n,r,s,i){super(s,i);g(this,"draggable",!0);g(this,"dragging",!1);g(this,"offset",new k);g(this,"context");g(this,"position");C(this,xt,!0);C(this,Ot,1);this.position=new k(n,r),this.context=this.getContext("2d")}get active(){return y(this,xt)}get order(){return y(this,Ot)}setOrder(n){return D(this,Ot,n),this}setActive(n){return D(this,xt,n),this}setDraggable(n){return this.draggable=n,this}setPosition(n,r){return this.position.set(n,r),this}detectCollision(n){const r=this.position,s=r.clone(),i=new k(this.width,this.height),a=s.add(i);return n.x>=r.x&&n.y>=r.y&&n.x<=a.x&&n.y<=a.y}dragStart(n){this.dragging=!0,this.offset.copy(n).sub(this.position)}drag(n,r){this.dragging&&(this.position.copy(n).sub(this.offset),this.position.x=Math.round(this.position.x/r)*r,this.position.y=Math.round(this.position.y/r)*r)}dragTo(n){this.dragging&&(console.log(n),this.position.copy(n).sub(this.offset))}dragStop(){this.dragging=!1}}xt=new WeakMap,Ot=new WeakMap;var Y,te,bn;class st extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,te);C(this,Y);D(this,Y,new Image(s,i))}setSize(n,r){return this.width=n,this.height=r,this}setSrc(n){return y(this,Y).src=n,this}async render(){if(this.context.canvas.width=this.context.canvas.width,!q(this,te,bn).call(this,y(this,Y).src))return y(this,Y).decode().then(()=>{this.context.drawImage(y(this,Y),0,0,this.width,this.height)})}}Y=new WeakMap,te=new WeakSet,bn=function(n){return n===location.origin+"/undefined"};var Pt,Ct,ee,lt,ut,ne,xn;class jt extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,ne);C(this,Pt,"black");C(this,Ct,"bold");C(this,ee,"Mukta");C(this,lt,24);C(this,ut,"")}async render(){this.context.clearRect(0,0,this.width,this.height),this.context.font=q(this,ne,xn).call(this),this.context.fillStyle=y(this,Pt),this.context.fillText(y(this,ut),0,y(this,lt))}setSize(n){return D(this,lt,n),this}setWeight(n){return D(this,Ct,n),this}setColor(n){return D(this,Pt,n),this}get isEmpty(){return y(this,ut)===""}setWord(n){return D(this,ut,n),this}}Pt=new WeakMap,Ct=new WeakMap,ee=new WeakMap,lt=new WeakMap,ut=new WeakMap,ne=new WeakSet,xn=function(){return`${y(this,Ct)} ${y(this,lt)}px ${y(this,ee)}`};const jr=new Intl.DateTimeFormat("pt-BR",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC"});class Nr extends J{constructor(){super(...arguments);g(this,"calendar",new st(this.position.x,0,180,180).setSize(48,48).setSrc("icons/calendar.svg"));g(this,"clock",new st(this.position.x,0,180,180).setSize(48,48).setSrc("icons/clock.svg"));g(this,"pin",new st(this.position.x,0,1080,180).setSize(48,48).setSrc("icons/pin.svg"));g(this,"date",new jt(0,0,this.width-this.calendar.width,180).setSize(48).setWeight("normal").setColor("#D9D9D9"));g(this,"time",new jt(0,0,this.width-this.clock.width,180).setSize(48).setWeight("normal").setColor("#D9D9D9"));g(this,"location",new jt(0,0,this.width-this.pin.width,180).setSize(48).setWeight("normal").setColor("#D9D9D9"))}async render(){this.context.clearRect(0,0,this.width,this.height);let n=this.height/4-12,r=20;await this.renderDate(r,n),r+=320,await this.renderTime(r,n),n+=66,r=20,await this.renderLocation(r,n)}async renderDate(n,r){this.date.isEmpty||(await this.calendar.render(),this.context.drawImage(this.calendar,n,r)),await this.date.render(),this.context.drawImage(this.date,n+64,r-8)}async renderTime(n,r){this.time.isEmpty||(await this.clock.render(),this.context.drawImage(this.clock,n,r)),await this.time.render(),this.context.drawImage(this.time,n+64,r-8)}async renderLocation(n,r){this.location.isEmpty||(await this.pin.render(),this.context.drawImage(this.pin,n,r)),await this.location.render(),this.context.drawImage(this.location,n+64,r-8)}setDate(n){return this.date.setWord(jr.format(new Date(n))).render(),this}setTime(n){return this.time.setWord(n).render(),this}setLocation(n){return this.location.setWord(n).render(),this}}var Mt,$t,St;class zr extends J{constructor(n,r,s,i){super(n,r,s,i);g(this,"draggable",!1);C(this,Mt,"#2bf84620");C(this,$t,2);C(this,St,6)}get color(){return y(this,Mt)}get line(){return y(this,$t)}get size(){return y(this,St)}async render(){this.context.clearRect(0,0,this.width,this.height);const n=this.width/this.size,r=this.height/this.size;for(let s=0;s{this.context.drawImage(y(this,rt),0,0)})}}rt=new WeakMap;var G,re,On;class kr extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,re);C(this,G);D(this,G,new Image(s-16,i-16))}setSize(n,r){return this.width=n,this.height=r,this}setSrc(n){return y(this,G).src=n,this}async render(){if(this.context.clearRect(0,0,this.width,this.height),!q(this,re,On).call(this,y(this,G).src))return y(this,G).decode().then(()=>{const{width:n,height:r}=y(this,G);this.context.drawImage(y(this,G),8,8,n,r)})}}G=new WeakMap,re=new WeakSet,On=function(n){return n===location.origin+"/undefined"};function Ur(t,e,n){let r=e;for(let s=0;sn)return i+"-"}return r}function Br(t,e,n,r){const s=e+(e?" ":"")+n;return t.measureText(s).width>r?t.measureText(n).width>r?Ur(t,n,r):n:null}function qr(t,e,n){const r=[],s=e.split(" ");let i="";for(const a of s){const O=Br(t,i,a,n);O?(r.push(i),i=O):i+=(i?" ":"")+a}return i&&r.push(i),r}var Et,Tt,se,dt,Dt,ie,Cn;class Pn extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,ie);C(this,Et,"black");C(this,Tt,"bold");C(this,se,"Mukta");C(this,dt,24);C(this,Dt,"")}async render(){this.context.clearRect(0,0,this.width,this.height),this.context.font=q(this,ie,Cn).call(this),this.context.fillStyle=y(this,Et);const n=qr(this.context,y(this,Dt),this.width),r=y(this,dt)*1.2;if(n.length===1){const s=this.height/2+r/4;this.context.fillText(n[0],0,s,this.width)}else if(n.length===2){const s=this.height/2-r/4.4,i=this.height/2+r/1.4;this.context.fillText(n[0],0,s,this.width),this.context.fillText(n[1],0,i,this.width)}}setSize(n){return D(this,dt,n),this}setWeight(n){return D(this,Tt,n),this}setColor(n){return D(this,Et,n),this}setText(n){return D(this,Dt,n),this}}Et=new WeakMap,Tt=new WeakMap,se=new WeakMap,dt=new WeakMap,Dt=new WeakMap,ie=new WeakSet,Cn=function(){return`${y(this,Tt)} ${y(this,dt)}px ${y(this,se)}`};class Vr extends J{constructor(){super(...arguments);g(this,"photo",new kr(this.position.x,0,180,180));g(this,"photoFrame",new Gr(this.position.x,0,180,180));g(this,"title",new Pn(this.position.x+this.photo.position.x,0,this.width-this.photo.width,this.height/4).setSize(48).setWeight("bold").setColor("#62F772"));g(this,"speaker",new jt(this.title.position.x+this.title.width,0,this.width-this.photo.width,this.height/2).setSize(32).setWeight("normal").setColor("#D9D9D9"))}async render(){let n=0,r=40;await this.photo.render().then(()=>this.photo.render()).then(()=>this.context.drawImage(this.photo,r,n)).then(()=>this.photoFrame.render()).then(()=>this.context.drawImage(this.photoFrame,r,n)).then(()=>this.title.render()).then(()=>{n+=40,r+=this.photo.width+r,this.context.drawImage(this.title,r,n)}).then(()=>this.speaker.render()).then(()=>this.context.drawImage(this.speaker,r,n))}setPhoto(n){this.photo.setSrc(n)}setTitle(n){this.title.setText(n)}setSpeaker(n,r){this.speaker.setWord(`${n} - ${r}`)}}class Yr extends HTMLElement{constructor(){super(...arguments);g(this,"shadow")}static get observedAttributes(){return[]}}const Zr=t=>e=>{customElements.define(t,e)},M=(t,e)=>n=>{customElements.define(e,n,{extends:t})};var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! ***************************************************************************** +var Ir=Object.defineProperty;var on=t=>{throw TypeError(t)};var Fr=(t,e,n)=>e in t?Ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var g=(t,e,n)=>Fr(t,typeof e!="symbol"?e+"":e,n),de=(t,e,n)=>e.has(t)||on("Cannot "+n);var y=(t,e,n)=>(de(t,e,"read from private field"),n?n.call(t):e.get(t)),C=(t,e,n)=>e.has(t)?on("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),D=(t,e,n,r)=>(de(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),q=(t,e,n)=>(de(t,e,"access private method"),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();const Wr=(t,e)=>{const n=t.width/2-e.width/2,r=t.height/2-e.height/2;return{width:n,height:r}},Rr=(t,e)=>{const n={width:e.width/t.width,height:e.height/t.height},r=Math.min(n.width,n.height),s=t.width*r,i=t.height*r;return{width:s,height:i}};class G{constructor(e=0,n=0){this.x=e,this.y=n}set(e,n){this.x=e,this.y=n}clone(){return new G(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}sub(e){return this.x-=e.x,this.y-=e.y,this}}var Ot,Pt;class J extends OffscreenCanvas{constructor(n,r,s,i){super(s,i);g(this,"draggable",!0);g(this,"dragging",!1);g(this,"offset",new G);g(this,"context");g(this,"position");C(this,Ot,!0);C(this,Pt,1);this.position=new G(n,r),this.context=this.getContext("2d")}get active(){return y(this,Ot)}get order(){return y(this,Pt)}setOrder(n){return D(this,Pt,n),this}setActive(n){return D(this,Ot,n),this}setDraggable(n){return this.draggable=n,this}setPosition(n,r){return this.position.set(n,r),this}detectCollision(n){const r=this.position,s=r.clone(),i=new G(this.width,this.height),a=s.add(i);return n.x>=r.x&&n.y>=r.y&&n.x<=a.x&&n.y<=a.y}dragStart(n){this.dragging=!0,this.offset.copy(n).sub(this.position)}drag(n,r){this.dragging&&(this.position.copy(n).sub(this.offset),this.position.x=Math.round(this.position.x/r)*r,this.position.y=Math.round(this.position.y/r)*r)}dragTo(n){this.dragging&&(console.log(n),this.position.copy(n).sub(this.offset))}dragStop(){this.dragging=!1}}Ot=new WeakMap,Pt=new WeakMap;var Y,te,bn;class st extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,te);C(this,Y);D(this,Y,new Image(s,i))}setSize(n,r){return this.width=n,this.height=r,this}setSrc(n){return y(this,Y).src=n,this}async render(){if(this.context.canvas.width=this.context.canvas.width,!q(this,te,bn).call(this,y(this,Y).src))return y(this,Y).decode().then(()=>{this.context.drawImage(y(this,Y),0,0,this.width,this.height)})}}Y=new WeakMap,te=new WeakSet,bn=function(n){return n===location.origin+"/undefined"};var Ct,Mt,ee,lt,ut,ne,xn;class yt extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,ne);C(this,Ct,"black");C(this,Mt,"bold");C(this,ee,"Mukta");C(this,lt,24);C(this,ut,"")}async render(){this.context.clearRect(0,0,this.width,this.height),this.context.font=q(this,ne,xn).call(this),this.context.fillStyle=y(this,Ct),this.context.fillText(y(this,ut),0,y(this,lt))}setSize(n){return D(this,lt,n),this}setWeight(n){return D(this,Mt,n),this}setColor(n){return D(this,Ct,n),this}get isEmpty(){return y(this,ut)===""}setWord(n){return D(this,ut,n),this}}Ct=new WeakMap,Mt=new WeakMap,ee=new WeakMap,lt=new WeakMap,ut=new WeakMap,ne=new WeakSet,xn=function(){return`${y(this,Mt)} ${y(this,lt)}px ${y(this,ee)}`};const Hr=new Intl.DateTimeFormat("pt-BR",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC"});class jr extends J{constructor(){super(...arguments);g(this,"calendar",new st(this.position.x,0,180,180).setSize(48,48).setSrc("icons/calendar.svg"));g(this,"clock",new st(this.position.x,0,180,180).setSize(48,48).setSrc("icons/clock.svg"));g(this,"pin",new st(this.position.x,0,1080,180).setSize(48,48).setSrc("icons/pin.svg"));g(this,"date",new yt(0,0,this.width-this.calendar.width,180).setSize(48).setWeight("normal").setColor("#D9D9D9"));g(this,"time",new yt(0,0,this.width-this.clock.width,180).setSize(48).setWeight("normal").setColor("#D9D9D9"));g(this,"location",new yt(0,0,this.width-this.pin.width,180).setSize(48).setWeight("normal").setColor("#D9D9D9"))}async render(){this.context.clearRect(0,0,this.width,this.height);let n=this.height/4-12,r=20;await this.renderDate(r,n),r+=320,await this.renderTime(r,n),n+=66,r=20,await this.renderLocation(r,n)}async renderDate(n,r){this.date.isEmpty||(await this.calendar.render(),this.context.drawImage(this.calendar,n,r)),await this.date.render(),this.context.drawImage(this.date,n+64,r-8)}async renderTime(n,r){this.time.isEmpty||(await this.clock.render(),this.context.drawImage(this.clock,n,r)),await this.time.render(),this.context.drawImage(this.time,n+64,r-8)}async renderLocation(n,r){this.location.isEmpty||(await this.pin.render(),this.context.drawImage(this.pin,n,r)),await this.location.render(),this.context.drawImage(this.location,n+64,r-8)}setDate(n){return this.date.setWord(Hr.format(new Date(n))).render(),this}setTime(n){return this.time.setWord(n).render(),this}setLocation(n){return this.location.setWord(n).render(),this}}var $t,St,Et;class Nr extends J{constructor(n,r,s,i){super(n,r,s,i);g(this,"draggable",!1);C(this,$t,"#2bf84620");C(this,St,2);C(this,Et,6)}get color(){return y(this,$t)}get line(){return y(this,St)}get size(){return y(this,Et)}async render(){this.context.clearRect(0,0,this.width,this.height);const n=this.width/this.size,r=this.height/this.size;for(let s=0;s{this.context.drawImage(y(this,rt),0,0)})}}rt=new WeakMap;var k,re,On;class kr extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,re);C(this,k);D(this,k,new Image(s-16,i-16))}setSize(n,r){return this.width=n,this.height=r,this}setSrc(n){return y(this,k).src=n,this}async render(){if(this.context.clearRect(0,0,this.width,this.height),!q(this,re,On).call(this,y(this,k).src))return y(this,k).decode().then(()=>{const{width:n,height:r}=y(this,k);this.context.drawImage(y(this,k),8,8,n,r)})}}k=new WeakMap,re=new WeakSet,On=function(n){return n===location.origin+"/undefined"};class Gr extends J{constructor(){super(...arguments);g(this,"photo",new kr(60,0,180,180));g(this,"photoFrame",new zr(60,0,180,180));g(this,"title",new yt(this.photo.width+90,20,this.width+40-this.photo.width,90).setSize(48).setWeight("bold").setColor("#62F772"));g(this,"speaker",new yt(this.photo.width+90,90,this.width+40-this.photo.width,90).setSize(32).setWeight("normal").setColor("#D9D9D9"))}async render(){this.context.clearRect(0,0,this.width,this.height),await this.photo.render().then(()=>{this.context.drawImage(this.photo,this.photo.position.x,this.photo.position.y)}),await this.photoFrame.render().then(()=>{this.context.drawImage(this.photoFrame,this.photoFrame.position.x,this.photoFrame.position.y)}),await this.title.render().then(()=>{this.context.drawImage(this.title,this.title.position.x,this.title.position.y)}),await this.speaker.render().then(()=>{this.context.drawImage(this.speaker,this.speaker.position.x,this.speaker.position.y)})}setPhoto(n){this.photo.setSrc(n)}setTitle(n){this.title.setWord(n)}setSpeaker(n,r){this.speaker.setWord(`${n} - ${r}`)}}function Ur(t,e,n){let r=e;for(let s=0;sn)return i+"-"}return r}function Br(t,e,n,r){const s=e+(e?" ":"")+n;return t.measureText(s).width>r?t.measureText(n).width>r?Ur(t,n,r):n:null}function qr(t,e,n){const r=[],s=e.split(" ");let i="";for(const a of s){const O=Br(t,i,a,n);O?(r.push(i),i=O):i+=(i?" ":"")+a}return i&&r.push(i),r}var Tt,Dt,se,dt,Lt,ie,Pn;class Vr extends J{constructor(n,r,s,i){super(n,r,s,i);C(this,ie);C(this,Tt,"black");C(this,Dt,"bold");C(this,se,"Mukta");C(this,dt,24);C(this,Lt,"")}async render(){this.context.clearRect(0,0,this.width,this.height),this.context.font=q(this,ie,Pn).call(this),this.context.fillStyle=y(this,Tt);const n=qr(this.context,y(this,Lt),this.width),r=y(this,dt)*1.2;if(n.length===1){const s=this.height/2+r/4;this.context.fillText(n[0],0,s,this.width)}else if(n.length===2){const s=this.height/2-r/4.4,i=this.height/2+r/1.4;this.context.fillText(n[0],0,s,this.width),this.context.fillText(n[1],0,i,this.width)}}setSize(n){return D(this,dt,n),this}setWeight(n){return D(this,Dt,n),this}setColor(n){return D(this,Tt,n),this}setText(n){return D(this,Lt,n),this}}Tt=new WeakMap,Dt=new WeakMap,se=new WeakMap,dt=new WeakMap,Lt=new WeakMap,ie=new WeakSet,Pn=function(){return`${y(this,Dt)} ${y(this,dt)}px ${y(this,se)}`};class Yr extends HTMLElement{constructor(){super(...arguments);g(this,"shadow")}static get observedAttributes(){return[]}}const Zr=t=>e=>{customElements.define(t,e)},M=(t,e)=>n=>{customElements.define(e,n,{extends:t})};var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -11,15 +11,15 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */var cn;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof an=="object"?an:typeof self=="object"?self:typeof this=="object"?this:O(),r=s(t);typeof n.Reflect<"u"&&(r=s(n.Reflect,r)),e(r,n),typeof n.Reflect>"u"&&(n.Reflect=t);function s(I,N){return function(W,K){Object.defineProperty(I,W,{configurable:!0,writable:!0,value:K}),N&&N(W,K)}}function i(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function O(){return i()||a()}})(function(e,n){var r=Object.prototype.hasOwnProperty,s=typeof Symbol=="function",i=s&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=s&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",O=typeof Object.create=="function",I={__proto__:[]}instanceof Array,N=!O&&!I,W={create:O?function(){return ue(Object.create(null))}:I?function(){return ue({__proto__:null})}:function(){return ue({})},has:N?function(o,c){return r.call(o,c)}:function(o,c){return c in o},get:N?function(o,c){return r.call(o,c)?o[c]:void 0}:function(o,c){return o[c]}},K=Object.getPrototypeOf(Function),A=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Tr(),pt=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Dr(),It=typeof WeakMap=="function"?WeakMap:Lr(),B=s?Symbol.for("@reflect-metadata:registry"):void 0,At=$r(),Ge=Sr(At);function hr(o,c,h,l){if(v(h)){if(!Je(o))throw new TypeError;if(!Qe(c))throw new TypeError;return _r(o,c)}else{if(!Je(o))throw new TypeError;if(!S(c))throw new TypeError;if(!S(l)&&!v(l)&&!at(l))throw new TypeError;return at(l)&&(l=void 0),h=j(h),yr(o,c,h,l)}}e("decorate",hr);function lr(o,c){function h(l,m){if(!S(l))throw new TypeError;if(!v(m)&&!Cr(m))throw new TypeError;qe(o,c,l,m)}return h}e("metadata",lr);function ur(o,c,h,l){if(!S(h))throw new TypeError;return v(l)||(l=j(l)),qe(o,c,h,l)}e("defineMetadata",ur);function dr(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),ke(o,c,h)}e("hasMetadata",dr);function fr(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),ce(o,c,h)}e("hasOwnMetadata",fr);function pr(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),Ue(o,c,h)}e("getMetadata",pr);function mr(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),Be(o,c,h)}e("getOwnMetadata",mr);function vr(o,c){if(!S(o))throw new TypeError;return v(c)||(c=j(c)),Ve(o,c)}e("getMetadataKeys",vr);function wr(o,c){if(!S(o))throw new TypeError;return v(c)||(c=j(c)),Ye(o,c)}e("getOwnMetadataKeys",wr);function gr(o,c,h){if(!S(c))throw new TypeError;if(v(h)||(h=j(h)),!S(c))throw new TypeError;v(h)||(h=j(h));var l=mt(c,h,!1);return v(l)?!1:l.OrdinaryDeleteMetadata(o,c,h)}e("deleteMetadata",gr);function _r(o,c){for(var h=o.length-1;h>=0;--h){var l=o[h],m=l(c);if(!v(m)&&!at(m)){if(!Qe(m))throw new TypeError;c=m}}return c}function yr(o,c,h,l){for(var m=o.length-1;m>=0;--m){var T=o[m],E=T(c,h,l);if(!v(E)&&!at(E)){if(!S(E))throw new TypeError;l=E}}return l}function ke(o,c,h){var l=ce(o,c,h);if(l)return!0;var m=le(c);return at(m)?!1:ke(o,m,h)}function ce(o,c,h){var l=mt(c,h,!1);return v(l)?!1:Xe(l.OrdinaryHasOwnMetadata(o,c,h))}function Ue(o,c,h){var l=ce(o,c,h);if(l)return Be(o,c,h);var m=le(c);if(!at(m))return Ue(o,m,h)}function Be(o,c,h){var l=mt(c,h,!1);if(!v(l))return l.OrdinaryGetOwnMetadata(o,c,h)}function qe(o,c,h,l){var m=mt(h,l,!0);m.OrdinaryDefineOwnMetadata(o,c,h,l)}function Ve(o,c){var h=Ye(o,c),l=le(o);if(l===null)return h;var m=Ve(l,c);if(m.length<=0)return h;if(h.length<=0)return m;for(var T=new pt,E=[],w=0,u=h;w=0&&u=this._keys.length?(this._index=-1,this._keys=c,this._values=c):this._index++,{value:d,done:!1}}return{value:void 0,done:!0}},w.prototype.throw=function(u){throw this._index>=0&&(this._index=-1,this._keys=c,this._values=c),u},w.prototype.return=function(u){return this._index>=0&&(this._index=-1,this._keys=c,this._values=c),{value:u,done:!0}},w}(),l=function(){function w(){this._keys=[],this._values=[],this._cacheKey=o,this._cacheIndex=-2}return Object.defineProperty(w.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),w.prototype.has=function(u){return this._find(u,!1)>=0},w.prototype.get=function(u){var d=this._find(u,!1);return d>=0?this._values[d]:void 0},w.prototype.set=function(u,d){var f=this._find(u,!0);return this._values[f]=d,this},w.prototype.delete=function(u){var d=this._find(u,!1);if(d>=0){for(var f=this._keys.length,p=d+1;pt+"px";var Kr=Object.defineProperty,ts=Object.getOwnPropertyDescriptor,es=(t,e,n,r)=>{for(var s=r>1?void 0:r?ts(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Kr(e,n,s),s};let _e=class extends HTMLDetailsElement{constructor({title:e,open:n=!1}){super();g(this,"summary",document.createElement("summary"));g(this,"section",document.createElement("section"));g(this,"uuid",crypto.randomUUID());g(this,"isClosing",!1);g(this,"isExpanding",!1);g(this,"animation",{root:null,section:null,config:{duration:450,easing:"ease"}});g(this,"onClick",e=>{e.preventDefault(),this.style.overflow="hidden",this.isClosing||!this.open?this.openSection():(this.isExpanding||this.open)&&this.closeSection()});g(this,"expand",()=>{this.isExpanding=!0;const e=tt(this.offsetHeight),n=this.summary?tt(this.summary.offsetHeight+this.section.offsetHeight):tt(75);this.animation.root&&this.animation.section&&(this.animation.root.cancel(),this.animation.section.cancel());const r={duration:400,easing:"ease-out"};this.animation.root=this.animate({height:[e,n]},r),this.animation.section=this.section.animate({opacity:[0,1]},r),this.animation.root.onfinish=()=>this.onAnimationFinish(!0),this.animation.root.oncancel=()=>this.isExpanding=!1});g(this,"onAnimationFinish",e=>{this.open=e,this.animation.root=null,this.animation.section=null,this.isClosing=!1,this.isExpanding=!1,this.style.height=this.style.overflow="",this.section.style.opacity="1"});g(this,"onDragStart",e=>{var n;(n=e.dataTransfer)==null||n.setData("text/plain",this.uuid),this.classList.add("dragging"),this.style.transition="none"});g(this,"onDragOver",e=>{e.preventDefault();const n=this.getDragAfterElement(e.clientY),r=this.parentNode,s=r.querySelector(".dragging");n==null?r.appendChild(s):r.insertBefore(s,n),Array.from(r.children).forEach(i=>{const a=i;a.style.transition="transform 150ms ease",a.style.transform="translateY(0)"})});g(this,"onDrop",e=>{e.preventDefault(),this.classList.remove("dragging"),Array.from(this.parentElement.children).forEach(n=>{const r=n;r.style.transition="",r.style.transform=""})});g(this,"onDragEnd",()=>{this.classList.remove("dragging"),Array.from(this.parentElement.children).forEach(e=>{const n=e;n.style.transition="",n.style.transform=""})});this.open=n,this.summary.textContent=e,this.append(this.summary,this.section),this.ontoggle=r=>r.preventDefault(),this.summary.addEventListener("click",this.onClick)}connectedCallback(){this.open||(this.section.style.opacity="0")}closeSection(){this.isClosing=!0;const e=tt(this.offsetHeight);let n=this.summary?tt(this.summary.offsetHeight):tt(75);this.animation.root&&this.animation.section&&(this.animation.root.cancel(),this.animation.section.cancel()),this.animation.section=this.section.animate({opacity:[1,0]},this.animation.config),this.animation.root=this.animate({height:[e,n]},this.animation.config),this.animation.root.onfinish=()=>this.onAnimationFinish(!1),this.animation.root.oncancel=()=>this.isClosing=!1}openSection(){this.style.height=tt(this.offsetHeight),this.open=!0;const e={uuid:this.uuid},n=new CustomEvent("expand",{detail:e});this.dispatchEvent(n),requestAnimationFrame(this.expand)}getDragAfterElement(e){return Array.from(this.parentElement.querySelectorAll(".ws-accordion-item:not(.dragging)")).reduce((r,s)=>{const i=s.getBoundingClientRect(),a=e-i.top-i.height/2;return a<0&&a>r.offset?{offset:a,element:s}:r},{offset:Number.NEGATIVE_INFINITY,element:null}).element}};_e=es([M("details","cw-accordion-item")],_e);const ns=t=>Array.from(t.children),rs=t=>Object.entries(t),hn=t=>Object.values(t),$n=(t,e=100)=>{const n=setTimeout(t,e);return()=>clearTimeout(n)};var ss=Object.defineProperty,is=Object.getOwnPropertyDescriptor,os=(t,e,n,r)=>{for(var s=r>1?void 0:r?is(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&ss(e,n,s),s};let ye=class extends Yr{constructor(){super(...arguments);g(this,"oneAtATime",!0)}get items(){return ns(this)}add(e,...n){const r=new _e({title:e});return r.section.append(...n),this.append(r),r}connectedCallback(){for(const e of this.items)e.addEventListener("expand",({detail:n})=>{for(const r of this.items){const s={behavior:"smooth",block:"start"};this.oneAtATime&&(r.uuid!==n.uuid&&r.closeSection(),r.uuid===n.uuid&&$n(()=>r.scrollIntoView(s),400))}})}enableOneAtATime(){this.oneAtATime=!0}disableOneAtATime(){this.oneAtATime=!1}openAll(){for(const e of this.items)e.openSection()}closeAll(){for(const e of this.items)e.closeSection()}};ye=os([Zr("cw-accordion")],ye);var as=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,hs=(t,e,n,r)=>{for(var s=r>1?void 0:r?cs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&as(e,n,s),s};let Z=class extends HTMLInputElement{constructor(t,e,n=!1,r=()=>{}){super(),this.name=t,this.type=e,this.required=n,this.onchange=r}disable(){this.disabled=!0}enable(){this.disabled=!1}setValue(t){this.value=String(t)}setRequired(t){this.required=t}};Z=hs([M("input","cw-input")],Z);function H(t,e={},...n){const r=document.createElement(t);return r.append(...n),Object.assign(r,e)}var Sn=Object.defineProperty,ls=Object.getOwnPropertyDescriptor,En=t=>{throw TypeError(t)},us=(t,e,n)=>e in t?Sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ds=(t,e,n,r)=>{for(var s=r>1?void 0:r?ls(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Sn(e,n,s),s},ln=(t,e,n)=>us(t,typeof e!="symbol"?e+"":e,n),fs=(t,e,n)=>e.has(t)||En("Cannot "+n),ps=(t,e,n)=>e.has(t)?En("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),un=(t,e,n)=>(fs(t,e,"access private method"),n),Nt,Tn,Dn;let F=class extends HTMLLabelElement{constructor(t,e,n,r=()=>{},s="outlined",i=!1){super(),this.name=n,this.mode=s,this.required=i,ps(this,Nt),ln(this,"text"),ln(this,"element"),this.text=un(this,Nt,Dn).call(this,t),this.element=un(this,Nt,Tn).call(this,n,e,r,i)}setLabel(t){return this.text.textContent=t,this}setType(t){return this.element.type=t,this}setMode(t){return this.mode=t,this}setRequired(t){return this.element.setRequired(t),this}disable(){this.element.disabled=!0}enable(){this.element.disabled=!1}setValue(t){return this.element.setValue(t),this}connectedCallback(){this.append(this.element,this.text),this.classList.add(`cw-input-${this.mode}`)}get value(){return this.element.value}};Nt=new WeakSet;Tn=function(t,e,n,r){return new Z(t,e,r,n)};Dn=function(t){return H("span",{},t)};F=ds([M("label","cw-input-label")],F);var ms=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ws=(t,e,n,r)=>{for(var s=r>1?void 0:r?vs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&ms(e,n,s),s};let be=class extends Z{constructor(t,e="true",n=!1){super(t,"checkbox"),this.name=t,this.value=e,this.checked=n}};be=ws([M("input","cw-checkbox")],be);var Ln=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,In=t=>{throw TypeError(t)},_s=(t,e,n)=>e in t?Ln(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ys=(t,e,n,r)=>{for(var s=r>1?void 0:r?gs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Ln(e,n,s),s},dn=(t,e,n)=>_s(t,typeof e!="symbol"?e+"":e,n),bs=(t,e,n)=>e.has(t)||In("Cannot "+n),xs=(t,e,n)=>e.has(t)?In("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),fn=(t,e,n)=>(bs(t,e,"access private method"),n),zt,An,Fn;let xe=class extends HTMLLabelElement{constructor(t,e,n="true",r=!1){super(),this.name=e,this.value=n,this.checked=r,xs(this,zt),dn(this,"text"),dn(this,"element"),this.text=fn(this,zt,Fn).call(this,t),this.element=fn(this,zt,An).call(this,e,n,r)}connectedCallback(){this.append(this.element,this.text),this.classList.add("cw-checkbox")}};zt=new WeakSet;An=function(t,e,n){return new be(t,e,n)};Fn=function(t){return H("span",{},t)};xe=ys([M("label","cw-checkbox-label")],xe);var Os=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,Cs=(t,e,n,r)=>{for(var s=r>1?void 0:r?Ps(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Os(e,n,s),s};let pn=class extends HTMLButtonElement{constructor(t,e=()=>{}){super(),this.textContent=t,this.onclick=e}};pn=Cs([M("button","cw-menu-button")],pn);var Ms=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,Ss=(t,e,n,r)=>{for(var s=r>1?void 0:r?$s(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Ms(e,n,s),s};let Oe=class extends HTMLMenuElement{constructor(t,...e){super(),this.context=t,this.add(...e)}add(...t){for(const e of t)this.append(H("li",{},e))}open({pageX:t,pageY:e}){this.context.style.left=t+"px",this.context.style.top=e+"px",console.log(this.context.style.display),this.context.style.display==="none"&&(this.context.style.display="block")}close(){this.context.style.display="none"}static create(t,...e){t.style.display="none";const n=new Oe(t,...e);return t.append(n),n}};Oe=Ss([M("menu","cw-menu")],Oe);var Es=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,Ds=(t,e,n,r)=>{for(var s=r>1?void 0:r?Ts(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Es(e,n,s),s};let Pe=class extends Z{constructor(t,e,n=!1){super(t,"radio"),this.name=t,this.value=e,this.checked=n}};Pe=Ds([M("input","cw-radio")],Pe);var Wn=Object.defineProperty,Ls=Object.getOwnPropertyDescriptor,Rn=t=>{throw TypeError(t)},Is=(t,e,n)=>e in t?Wn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,As=(t,e,n,r)=>{for(var s=r>1?void 0:r?Ls(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Wn(e,n,s),s},mn=(t,e,n)=>Is(t,typeof e!="symbol"?e+"":e,n),Fs=(t,e,n)=>e.has(t)||Rn("Cannot "+n),Ws=(t,e,n)=>e.has(t)?Rn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),vn=(t,e,n)=>(Fs(t,e,"access private method"),n),Gt,Hn,jn;let Zt=class extends HTMLLabelElement{constructor(t,e,n,r=!1){super(),this.name=e,this.value=n,this.checked=r,Ws(this,Gt),mn(this,"text"),mn(this,"element"),this.text=vn(this,Gt,jn).call(this,t),this.element=vn(this,Gt,Hn).call(this,e,n,r)}connectedCallback(){this.append(this.element,this.text),this.classList.add("cw-radio")}};Gt=new WeakSet;Hn=function(t,e,n){return new Pe(t,e,n)};jn=function(t){return H("span",{},t)};Zt=As([M("label","cw-radio-label")],Zt);var Rs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,js=(t,e,n,r)=>{for(var s=r>1?void 0:r?Hs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Rs(e,n,s),s};let ht=class extends HTMLButtonElement{constructor(t,e="button",n=()=>{},r="outlined"){super(),this.textContent=t,this.type=e,this.onclick=n,this.mode=r}connectedCallback(){this.classList.add(`cw-button-${this.mode}`)}};ht=js([M("button","cw-button")],ht);const Ns=t=>Object.fromEntries(new FormData(t).entries()),Wt={string(t){return typeof t=="string"},number(t){return typeof t=="number"&&!isNaN(t)},date(t){return t instanceof Date&&!isNaN(t.getTime())},boolean(t){const n=["true","false",!0,!1].some(r=>r===t);return typeof t=="boolean"||n}},zs=t=>{let e=t;return t?Wt.boolean(t)?(e=t==="true",e):Wt.date(t)?(e=new Date(t.toString()),e):Wt.number(+t)?(e=+t,e):(Wt.string(t)&&(e=t),e):null},Gs=t=>{const e=t instanceof HTMLFormElement?Ns(t):t;return rs(e).reduce((n,[r,s])=>({...n,[r]:zs(s)}),e)};var ks=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,Bs=(t,e,n,r)=>{for(var s=r>1?void 0:r?Us(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&ks(e,n,s),s};let Xt=class extends HTMLFormElement{constructor(t=()=>{}){super(),this.onchange=t}add(t){this.append(t)}get value(){return Gs(this)}};Xt=Bs([M("form","cw-form")],Xt);var qs=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,Ys=(t,e,n,r)=>{for(var s=r>1?void 0:r?Vs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&qs(e,n,s),s};let Jt=class extends Xt{constructor(){super(...arguments);g(this,"header",H("h2",{textContent:"Apresentação"}));g(this,"controls",{title:new F("Título da apresentação","text","title").setRequired(!0),github:new F("Github","text","github"),speaker:new F("Nome do apresentador","text","name").setRequired(!0),role:new F("Papel de atuação","text","role").setRequired(!0),photo:new F("Foto","file","photo").setRequired(!0),photoUrl:new F("Foto URL","url","photoUrl")});g(this,"actions",{submit:new ht("Adicionar","submit")})}connectedCallback(){this.append(...hn(this.controls),...hn(this.actions)),this.controls.photoUrl.element.readOnly=!0,this.controls.github.onchange=async()=>{if(this.github.value){const e=await this.getFromGithub(this.github.value);e&&(this.controls.speaker.setValue(e.name),this.controls.photoUrl.setValue(e.avatar_url),this.controls.photo.setRequired(!1),this.controls.photo.disable())}}}async getFromGithub(e){try{return await(await fetch(`https://api.github.com/users/${e}`)).json()}catch{}}};Jt=Ys([M("form","cw-presentation-form")],Jt);var Zs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Js=(t,e,n,r)=>{for(var s=r>1?void 0:r?Xs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Zs(e,n,s),s};let Ce=class extends HTMLButtonElement{constructor(e){super();g(this,"onToggle",e=>n=>{this.classList.toggle("open"),e(n)});this.classList.add("cw-sidenav-toggle"),this.addEventListener("click",this.onToggle(e))}connectedCallback(){this.innerHTML=` +***************************************************************************** */var cn;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof an=="object"?an:typeof self=="object"?self:typeof this=="object"?this:O(),r=s(t);typeof n.Reflect<"u"&&(r=s(n.Reflect,r)),e(r,n),typeof n.Reflect>"u"&&(n.Reflect=t);function s(A,N){return function(W,K){Object.defineProperty(A,W,{configurable:!0,writable:!0,value:K}),N&&N(W,K)}}function i(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function O(){return i()||a()}})(function(e,n){var r=Object.prototype.hasOwnProperty,s=typeof Symbol=="function",i=s&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=s&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",O=typeof Object.create=="function",A={__proto__:[]}instanceof Array,N=!O&&!A,W={create:O?function(){return ue(Object.create(null))}:A?function(){return ue({__proto__:null})}:function(){return ue({})},has:N?function(o,c){return r.call(o,c)}:function(o,c){return c in o},get:N?function(o,c){return r.call(o,c)?o[c]:void 0}:function(o,c){return o[c]}},K=Object.getPrototypeOf(Function),I=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Er(),pt=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Tr(),It=typeof WeakMap=="function"?WeakMap:Dr(),B=s?Symbol.for("@reflect-metadata:registry"):void 0,Ft=Mr(),ke=$r(Ft);function cr(o,c,h,l){if(v(h)){if(!Je(o))throw new TypeError;if(!Qe(c))throw new TypeError;return gr(o,c)}else{if(!Je(o))throw new TypeError;if(!S(c))throw new TypeError;if(!S(l)&&!v(l)&&!at(l))throw new TypeError;return at(l)&&(l=void 0),h=j(h),_r(o,c,h,l)}}e("decorate",cr);function hr(o,c){function h(l,m){if(!S(l))throw new TypeError;if(!v(m)&&!Pr(m))throw new TypeError;qe(o,c,l,m)}return h}e("metadata",hr);function lr(o,c,h,l){if(!S(h))throw new TypeError;return v(l)||(l=j(l)),qe(o,c,h,l)}e("defineMetadata",lr);function ur(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),Ge(o,c,h)}e("hasMetadata",ur);function dr(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),ce(o,c,h)}e("hasOwnMetadata",dr);function fr(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),Ue(o,c,h)}e("getMetadata",fr);function pr(o,c,h){if(!S(c))throw new TypeError;return v(h)||(h=j(h)),Be(o,c,h)}e("getOwnMetadata",pr);function mr(o,c){if(!S(o))throw new TypeError;return v(c)||(c=j(c)),Ve(o,c)}e("getMetadataKeys",mr);function vr(o,c){if(!S(o))throw new TypeError;return v(c)||(c=j(c)),Ye(o,c)}e("getOwnMetadataKeys",vr);function wr(o,c,h){if(!S(c))throw new TypeError;if(v(h)||(h=j(h)),!S(c))throw new TypeError;v(h)||(h=j(h));var l=mt(c,h,!1);return v(l)?!1:l.OrdinaryDeleteMetadata(o,c,h)}e("deleteMetadata",wr);function gr(o,c){for(var h=o.length-1;h>=0;--h){var l=o[h],m=l(c);if(!v(m)&&!at(m)){if(!Qe(m))throw new TypeError;c=m}}return c}function _r(o,c,h,l){for(var m=o.length-1;m>=0;--m){var T=o[m],E=T(c,h,l);if(!v(E)&&!at(E)){if(!S(E))throw new TypeError;l=E}}return l}function Ge(o,c,h){var l=ce(o,c,h);if(l)return!0;var m=le(c);return at(m)?!1:Ge(o,m,h)}function ce(o,c,h){var l=mt(c,h,!1);return v(l)?!1:Xe(l.OrdinaryHasOwnMetadata(o,c,h))}function Ue(o,c,h){var l=ce(o,c,h);if(l)return Be(o,c,h);var m=le(c);if(!at(m))return Ue(o,m,h)}function Be(o,c,h){var l=mt(c,h,!1);if(!v(l))return l.OrdinaryGetOwnMetadata(o,c,h)}function qe(o,c,h,l){var m=mt(h,l,!0);m.OrdinaryDefineOwnMetadata(o,c,h,l)}function Ve(o,c){var h=Ye(o,c),l=le(o);if(l===null)return h;var m=Ve(l,c);if(m.length<=0)return h;if(h.length<=0)return m;for(var T=new pt,E=[],w=0,u=h;w=0&&u=this._keys.length?(this._index=-1,this._keys=c,this._values=c):this._index++,{value:d,done:!1}}return{value:void 0,done:!0}},w.prototype.throw=function(u){throw this._index>=0&&(this._index=-1,this._keys=c,this._values=c),u},w.prototype.return=function(u){return this._index>=0&&(this._index=-1,this._keys=c,this._values=c),{value:u,done:!0}},w}(),l=function(){function w(){this._keys=[],this._values=[],this._cacheKey=o,this._cacheIndex=-2}return Object.defineProperty(w.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),w.prototype.has=function(u){return this._find(u,!1)>=0},w.prototype.get=function(u){var d=this._find(u,!1);return d>=0?this._values[d]:void 0},w.prototype.set=function(u,d){var f=this._find(u,!0);return this._values[f]=d,this},w.prototype.delete=function(u){var d=this._find(u,!1);if(d>=0){for(var f=this._keys.length,p=d+1;pt+"px";var Kr=Object.defineProperty,ts=Object.getOwnPropertyDescriptor,es=(t,e,n,r)=>{for(var s=r>1?void 0:r?ts(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Kr(e,n,s),s};let _e=class extends HTMLDetailsElement{constructor({title:e,open:n=!1}){super();g(this,"summary",document.createElement("summary"));g(this,"section",document.createElement("section"));g(this,"uuid",crypto.randomUUID());g(this,"isClosing",!1);g(this,"isExpanding",!1);g(this,"animation",{root:null,section:null,config:{duration:450,easing:"ease"}});g(this,"onClick",e=>{e.preventDefault(),this.style.overflow="hidden",this.isClosing||!this.open?this.openSection():(this.isExpanding||this.open)&&this.closeSection()});g(this,"expand",()=>{this.isExpanding=!0;const e=tt(this.offsetHeight),n=this.summary?tt(this.summary.offsetHeight+this.section.offsetHeight):tt(75);this.animation.root&&this.animation.section&&(this.animation.root.cancel(),this.animation.section.cancel());const r={duration:400,easing:"ease-out"};this.animation.root=this.animate({height:[e,n]},r),this.animation.section=this.section.animate({opacity:[0,1]},r),this.animation.root.onfinish=()=>this.onAnimationFinish(!0),this.animation.root.oncancel=()=>this.isExpanding=!1});g(this,"onAnimationFinish",e=>{this.open=e,this.animation.root=null,this.animation.section=null,this.isClosing=!1,this.isExpanding=!1,this.style.height=this.style.overflow="",this.section.style.opacity="1"});g(this,"onDragStart",e=>{var n;(n=e.dataTransfer)==null||n.setData("text/plain",this.uuid),this.classList.add("dragging"),this.style.transition="none"});g(this,"onDragOver",e=>{e.preventDefault();const n=this.getDragAfterElement(e.clientY),r=this.parentNode,s=r.querySelector(".dragging");n==null?r.appendChild(s):r.insertBefore(s,n),Array.from(r.children).forEach(i=>{const a=i;a.style.transition="transform 150ms ease",a.style.transform="translateY(0)"})});g(this,"onDrop",e=>{e.preventDefault(),this.classList.remove("dragging"),Array.from(this.parentElement.children).forEach(n=>{const r=n;r.style.transition="",r.style.transform=""})});g(this,"onDragEnd",()=>{this.classList.remove("dragging"),Array.from(this.parentElement.children).forEach(e=>{const n=e;n.style.transition="",n.style.transform=""})});this.open=n,this.summary.textContent=e,this.append(this.summary,this.section),this.ontoggle=r=>r.preventDefault(),this.summary.addEventListener("click",this.onClick)}connectedCallback(){this.open||(this.section.style.opacity="0")}closeSection(){this.isClosing=!0;const e=tt(this.offsetHeight);let n=this.summary?tt(this.summary.offsetHeight):tt(75);this.animation.root&&this.animation.section&&(this.animation.root.cancel(),this.animation.section.cancel()),this.animation.section=this.section.animate({opacity:[1,0]},this.animation.config),this.animation.root=this.animate({height:[e,n]},this.animation.config),this.animation.root.onfinish=()=>this.onAnimationFinish(!1),this.animation.root.oncancel=()=>this.isClosing=!1}openSection(){this.style.height=tt(this.offsetHeight),this.open=!0;const e={uuid:this.uuid},n=new CustomEvent("expand",{detail:e});this.dispatchEvent(n),requestAnimationFrame(this.expand)}getDragAfterElement(e){return Array.from(this.parentElement.querySelectorAll(".ws-accordion-item:not(.dragging)")).reduce((r,s)=>{const i=s.getBoundingClientRect(),a=e-i.top-i.height/2;return a<0&&a>r.offset?{offset:a,element:s}:r},{offset:Number.NEGATIVE_INFINITY,element:null}).element}};_e=es([M("details","cw-accordion-item")],_e);const ns=t=>Array.from(t.children),rs=t=>Object.entries(t),hn=t=>Object.values(t),Mn=(t,e=100)=>{const n=setTimeout(t,e);return()=>clearTimeout(n)};var ss=Object.defineProperty,is=Object.getOwnPropertyDescriptor,os=(t,e,n,r)=>{for(var s=r>1?void 0:r?is(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&ss(e,n,s),s};let ye=class extends Yr{constructor(){super(...arguments);g(this,"oneAtATime",!0)}get items(){return ns(this)}add(e,...n){const r=new _e({title:e});return r.section.append(...n),this.append(r),r}connectedCallback(){for(const e of this.items)e.addEventListener("expand",({detail:n})=>{for(const r of this.items){const s={behavior:"smooth",block:"start"};this.oneAtATime&&(r.uuid!==n.uuid&&r.closeSection(),r.uuid===n.uuid&&Mn(()=>r.scrollIntoView(s),400))}})}enableOneAtATime(){this.oneAtATime=!0}disableOneAtATime(){this.oneAtATime=!1}openAll(){for(const e of this.items)e.openSection()}closeAll(){for(const e of this.items)e.closeSection()}};ye=os([Zr("cw-accordion")],ye);var as=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,hs=(t,e,n,r)=>{for(var s=r>1?void 0:r?cs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&as(e,n,s),s};let Z=class extends HTMLInputElement{constructor(t,e,n=!1,r=()=>{}){super(),this.name=t,this.type=e,this.required=n,this.onchange=r}disable(){this.disabled=!0}enable(){this.disabled=!1}setValue(t){this.value=String(t)}setRequired(t){this.required=t}};Z=hs([M("input","cw-input")],Z);function H(t,e={},...n){const r=document.createElement(t);return r.append(...n),Object.assign(r,e)}var $n=Object.defineProperty,ls=Object.getOwnPropertyDescriptor,Sn=t=>{throw TypeError(t)},us=(t,e,n)=>e in t?$n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ds=(t,e,n,r)=>{for(var s=r>1?void 0:r?ls(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&$n(e,n,s),s},ln=(t,e,n)=>us(t,typeof e!="symbol"?e+"":e,n),fs=(t,e,n)=>e.has(t)||Sn("Cannot "+n),ps=(t,e,n)=>e.has(t)?Sn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),un=(t,e,n)=>(fs(t,e,"access private method"),n),Nt,En,Tn;let F=class extends HTMLLabelElement{constructor(t,e,n,r=()=>{},s="outlined",i=!1){super(),this.name=n,this.mode=s,this.required=i,ps(this,Nt),ln(this,"text"),ln(this,"element"),this.text=un(this,Nt,Tn).call(this,t),this.element=un(this,Nt,En).call(this,n,e,r,i)}setLabel(t){return this.text.textContent=t,this}setType(t){return this.element.type=t,this}setMode(t){return this.mode=t,this}setRequired(t){return this.element.setRequired(t),this}disable(){this.element.disabled=!0}enable(){this.element.disabled=!1}setValue(t){return this.element.setValue(t),this}connectedCallback(){this.append(this.element,this.text),this.classList.add(`cw-input-${this.mode}`)}get value(){return this.element.value}};Nt=new WeakSet;En=function(t,e,n,r){return new Z(t,e,r,n)};Tn=function(t){return H("span",{},t)};F=ds([M("label","cw-input-label")],F);var ms=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ws=(t,e,n,r)=>{for(var s=r>1?void 0:r?vs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&ms(e,n,s),s};let be=class extends Z{constructor(t,e="true",n=!1){super(t,"checkbox"),this.name=t,this.value=e,this.checked=n}};be=ws([M("input","cw-checkbox")],be);var Dn=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,Ln=t=>{throw TypeError(t)},_s=(t,e,n)=>e in t?Dn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ys=(t,e,n,r)=>{for(var s=r>1?void 0:r?gs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Dn(e,n,s),s},dn=(t,e,n)=>_s(t,typeof e!="symbol"?e+"":e,n),bs=(t,e,n)=>e.has(t)||Ln("Cannot "+n),xs=(t,e,n)=>e.has(t)?Ln("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),fn=(t,e,n)=>(bs(t,e,"access private method"),n),zt,An,In;let xe=class extends HTMLLabelElement{constructor(t,e,n="true",r=!1){super(),this.name=e,this.value=n,this.checked=r,xs(this,zt),dn(this,"text"),dn(this,"element"),this.text=fn(this,zt,In).call(this,t),this.element=fn(this,zt,An).call(this,e,n,r)}connectedCallback(){this.append(this.element,this.text),this.classList.add("cw-checkbox")}};zt=new WeakSet;An=function(t,e,n){return new be(t,e,n)};In=function(t){return H("span",{},t)};xe=ys([M("label","cw-checkbox-label")],xe);var Os=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,Cs=(t,e,n,r)=>{for(var s=r>1?void 0:r?Ps(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Os(e,n,s),s};let pn=class extends HTMLButtonElement{constructor(t,e=()=>{}){super(),this.textContent=t,this.onclick=e}};pn=Cs([M("button","cw-menu-button")],pn);var Ms=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,Ss=(t,e,n,r)=>{for(var s=r>1?void 0:r?$s(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Ms(e,n,s),s};let Oe=class extends HTMLMenuElement{constructor(t,...e){super(),this.context=t,this.add(...e)}add(...t){for(const e of t)this.append(H("li",{},e))}open({pageX:t,pageY:e}){this.context.style.left=t+"px",this.context.style.top=e+"px",console.log(this.context.style.display),this.context.style.display==="none"&&(this.context.style.display="block")}close(){this.context.style.display="none"}static create(t,...e){t.style.display="none";const n=new Oe(t,...e);return t.append(n),n}};Oe=Ss([M("menu","cw-menu")],Oe);var Es=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,Ds=(t,e,n,r)=>{for(var s=r>1?void 0:r?Ts(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Es(e,n,s),s};let Pe=class extends Z{constructor(t,e,n=!1){super(t,"radio"),this.name=t,this.value=e,this.checked=n}};Pe=Ds([M("input","cw-radio")],Pe);var Fn=Object.defineProperty,Ls=Object.getOwnPropertyDescriptor,Wn=t=>{throw TypeError(t)},As=(t,e,n)=>e in t?Fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Is=(t,e,n,r)=>{for(var s=r>1?void 0:r?Ls(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Fn(e,n,s),s},mn=(t,e,n)=>As(t,typeof e!="symbol"?e+"":e,n),Fs=(t,e,n)=>e.has(t)||Wn("Cannot "+n),Ws=(t,e,n)=>e.has(t)?Wn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),vn=(t,e,n)=>(Fs(t,e,"access private method"),n),kt,Rn,Hn;let Zt=class extends HTMLLabelElement{constructor(t,e,n,r=!1){super(),this.name=e,this.value=n,this.checked=r,Ws(this,kt),mn(this,"text"),mn(this,"element"),this.text=vn(this,kt,Hn).call(this,t),this.element=vn(this,kt,Rn).call(this,e,n,r)}connectedCallback(){this.append(this.element,this.text),this.classList.add("cw-radio")}};kt=new WeakSet;Rn=function(t,e,n){return new Pe(t,e,n)};Hn=function(t){return H("span",{},t)};Zt=Is([M("label","cw-radio-label")],Zt);var Rs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,js=(t,e,n,r)=>{for(var s=r>1?void 0:r?Hs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Rs(e,n,s),s};let ht=class extends HTMLButtonElement{constructor(t,e="button",n=()=>{},r="outlined"){super(),this.textContent=t,this.type=e,this.onclick=n,this.mode=r}connectedCallback(){this.classList.add(`cw-button-${this.mode}`)}};ht=js([M("button","cw-button")],ht);const Ns=t=>Object.fromEntries(new FormData(t).entries()),Rt={string(t){return typeof t=="string"},number(t){return typeof t=="number"&&!isNaN(t)},date(t){return t instanceof Date&&!isNaN(t.getTime())},boolean(t){const n=["true","false",!0,!1].some(r=>r===t);return typeof t=="boolean"||n}},zs=t=>{let e=t;return t?Rt.boolean(t)?(e=t==="true",e):Rt.date(t)?(e=new Date(t.toString()),e):Rt.number(+t)?(e=+t,e):(Rt.string(t)&&(e=t),e):null},ks=t=>{const e=t instanceof HTMLFormElement?Ns(t):t;return rs(e).reduce((n,[r,s])=>({...n,[r]:zs(s)}),e)};var Gs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,Bs=(t,e,n,r)=>{for(var s=r>1?void 0:r?Us(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Gs(e,n,s),s};let Xt=class extends HTMLFormElement{constructor(t=()=>{}){super(),this.onchange=t}add(t){this.append(t)}get value(){return ks(this)}};Xt=Bs([M("form","cw-form")],Xt);var qs=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,Ys=(t,e,n,r)=>{for(var s=r>1?void 0:r?Vs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&qs(e,n,s),s};let Jt=class extends Xt{constructor(){super(...arguments);g(this,"header",H("h2",{textContent:"Apresentação"}));g(this,"controls",{title:new F("Título da apresentação","text","title").setRequired(!0),github:new F("Github","text","github"),speaker:new F("Nome do apresentador","text","name").setRequired(!0),role:new F("Papel de atuação","text","role").setRequired(!0),photo:new F("Foto","file","photo").setRequired(!0),photoUrl:new F("Foto URL","url","photoUrl")});g(this,"actions",{submit:new ht("Adicionar","submit")})}connectedCallback(){this.append(...hn(this.controls),...hn(this.actions)),this.controls.photoUrl.element.readOnly=!0,this.controls.github.onchange=async()=>{if(this.github.value){const e=await this.getFromGithub(this.github.value);e&&(this.controls.speaker.setValue(e.name),this.controls.photoUrl.setValue(e.avatar_url),this.controls.photo.setRequired(!1),this.controls.photo.disable())}}}async getFromGithub(e){try{return await(await fetch(`https://api.github.com/users/${e}`)).json()}catch{}}};Jt=Ys([M("form","cw-presentation-form")],Jt);var Zs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Js=(t,e,n,r)=>{for(var s=r>1?void 0:r?Xs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Zs(e,n,s),s};let Ce=class extends HTMLButtonElement{constructor(e){super();g(this,"onToggle",e=>n=>{this.classList.toggle("open"),e(n)});this.classList.add("cw-sidenav-toggle"),this.addEventListener("click",this.onToggle(e))}connectedCallback(){this.innerHTML=` - `}};Ce=Js([M("button","cw-sidenav-button")],Ce);var Nn=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,zn=t=>{throw TypeError(t)},Ks=(t,e,n)=>e in t?Nn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n,r)=>{for(var s=r>1?void 0:r?Qs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Nn(e,n,s),s},fe=(t,e,n)=>Ks(t,typeof e!="symbol"?e+"":e,n),kn=(t,e,n)=>e.has(t)||zn("Cannot "+n),ct=(t,e,n)=>(kn(t,e,"read from private field"),n?n.call(t):e.get(t)),pe=(t,e,n)=>e.has(t)?zn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ti=(t,e,n,r)=>(kn(t,e,"write to private field"),e.set(t,n),n),kt,Ut,vt;let bt=class extends HTMLElement{constructor(){super(...arguments),pe(this,kt,new Set),pe(this,Ut,new Set),fe(this,"onClickInsideButton",()=>{if(this.classList.toggle("is-open"),this.button.classList.toggle("is-open"),document.body.classList.toggle("cw-sidenav-is-open"),ti(this,vt,!ct(this,vt)),ct(this,vt))for(const t of ct(this,kt))t();else for(const t of ct(this,Ut))t()}),fe(this,"button",new Ce(this.onClickInsideButton)),pe(this,vt,!1),fe(this,"presentationForm",[])}set onOpen(t){ct(this,kt).add(t)}set onClose(t){ct(this,Ut).add(t)}connectedCallback(){this.classList.add("cw-sidenav"),this.append(this.button),new MutationObserver(()=>{console.log(Qr(this,"presentationForm"))}).observe(this,{childList:!0,subtree:!0})}add(...t){this.append(...t)}};kt=new WeakMap;Ut=new WeakMap;vt=new WeakMap;Gn([Jr(Jt)],bt.prototype,"presentationForm",2);bt=Gn([M("aside","cw-sidenav")],bt);var Un=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,Bn=t=>{throw TypeError(t)},ni=(t,e,n)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ri=(t,e,n,r)=>{for(var s=r>1?void 0:r?ei(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Un(e,n,s),s},Rt=(t,e,n)=>ni(t,typeof e!="symbol"?e+"":e,n),qn=(t,e,n)=>e.has(t)||Bn("Cannot "+n),Ht=(t,e,n)=>(qn(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>e.has(t)?Bn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ve=(t,e,n)=>(qn(t,e,"access private method"),n),wt,Vn,Me,Bt,qt;let $e=class extends HTMLLabelElement{constructor(t,e,n=6,r=0,s=16){super(),this.name=e,this.value=n,this.min=r,this.max=s,me(this,wt),Rt(this,"text"),Rt(this,"thumb"),Rt(this,"hint"),Rt(this,"element"),me(this,Bt,-1),me(this,qt,()=>{this.thumb.classList.contains("show")||(this.thumb.classList.add("show"),Ht(this,Bt)&&clearTimeout(Ht(this,Bt)),setTimeout(()=>{this.thumb.classList.remove("show")},2e3));const i=this.element.valueAsNumber;this.hint.textContent=i.toString();const a=this.element.offsetWidth,O=this.element.offsetHeight,I=+this.element.max-+this.element.min,N=(i-+this.element.min)/I*(a-O);this.thumb.style.left=`calc(${N}px + (${O/2}px))`}),this.hint=new Text(n.toString()),this.text=ve(this,wt,Me).call(this,t),this.thumb=ve(this,wt,Me).call(this,this.hint),this.thumb.classList.add("thumb-label"),this.element=ve(this,wt,Vn).call(this,e,r,s,n)}connectedCallback(){this.append(this.element,this.text,this.thumb),this.classList.add("cw-slider"),Ht(this,qt).call(this),this.element.oninput=Ht(this,qt)}};wt=new WeakSet;Vn=function(t,e,n,r){return new Se(t,e,n,r)};Me=function(t){return H("span",{},t)};Bt=new WeakMap;qt=new WeakMap;$e=ri([M("label","cw-slider-label")],$e);var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,oi=(t,e,n,r)=>{for(var s=r>1?void 0:r?ii(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&si(e,n,s),s};let Se=class extends Z{constructor(t,e=0,n=16,r=6){super(t,"range"),this.name=t,this.min=e.toString(),this.max=n.toString(),this.value=r.toString()}};Se=oi([M("input","cw-slider")],Se);var ai=Object.defineProperty,ci=Object.getOwnPropertyDescriptor,hi=(t,e,n,r)=>{for(var s=r>1?void 0:r?ci(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&ai(e,n,s),s};let Ee=class extends Z{constructor(t,e="true",n=!1){super(t,"checkbox"),this.name=t,this.value=e,this.checked=n}};Ee=hi([M("input","cw-switch")],Ee);var Yn=Object.defineProperty,li=Object.getOwnPropertyDescriptor,Zn=t=>{throw TypeError(t)},ui=(t,e,n)=>e in t?Yn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,di=(t,e,n,r)=>{for(var s=r>1?void 0:r?li(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Yn(e,n,s),s},wn=(t,e,n)=>ui(t,typeof e!="symbol"?e+"":e,n),fi=(t,e,n)=>e.has(t)||Zn("Cannot "+n),pi=(t,e,n)=>e.has(t)?Zn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),gn=(t,e,n)=>(fi(t,e,"access private method"),n),Vt,Xn,Jn;let Te=class extends HTMLLabelElement{constructor(t,e,n="true",r=!1){super(),this.name=e,this.value=n,this.checked=r,pi(this,Vt),wn(this,"text"),wn(this,"element"),this.text=gn(this,Vt,Jn).call(this,t),this.element=gn(this,Vt,Xn).call(this,e,n,r)}connectedCallback(){this.append(this.element,this.text),this.classList.add("cw-switch")}};Vt=new WeakSet;Xn=function(t,e,n){return new Ee(t,e,n)};Jn=function(t){return H("span",{},t)};Te=di([M("label","cw-switch-label")],Te);var Qn=Object.defineProperty,mi=Object.getOwnPropertyDescriptor,Kn=t=>{throw TypeError(t)},vi=(t,e,n)=>e in t?Qn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wi=(t,e,n,r)=>{for(var s=r>1?void 0:r?mi(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Qn(e,n,s),s},we=(t,e,n)=>vi(t,typeof e!="symbol"?e+"":e,n),Ne=(t,e,n)=>e.has(t)||Kn("Cannot "+n),L=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),et=(t,e,n)=>e.has(t)?Kn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),De=(t,e,n,r)=>(Ne(t,e,"write to private field"),e.set(t,n),n),gi=(t,e,n)=>(Ne(t,e,"access private method"),n),V,z,gt,Le,Ie,Ae,Fe,tr;let X=class extends HTMLCanvasElement{constructor(t,e){super(),this.width=t,this.height=e,et(this,Fe),we(this,"context"),et(this,V,[]),et(this,z,null),we(this,"render",()=>{const{width:n,height:r}=this.context.canvas;this.context.clearRect(0,0,n,r),L(this,V).filter(s=>s.active).sort((s,i)=>s.order-i.order).map(s=>{this.context.drawImage(s,s.position.x,s.position.y)})}),et(this,gt,new Set),we(this,"onMouseDown",({offsetX:n,offsetY:r})=>{const s=new k(n,r),i=L(this,V).filter(a=>a.draggable).find(a=>a.detectCollision(s));i&&(De(this,z,i),i.dragStart(s))}),et(this,Le,({offsetX:n,offsetY:r})=>{const s=new k(n,r),i=L(this,V).filter(a=>a.draggable).find(a=>a.detectCollision(s));i&&gi(this,Fe,tr).call(this,i,s)}),et(this,Ie,n=>{if(L(this,z)){const{offsetX:r,offsetY:s}=n,i=new k(r,s);L(this,z).dragTo(i),this.render()}}),et(this,Ae,()=>{L(this,z)&&(L(this,z).dragStop(),De(this,z,null),this.render())}),this.context=this.getContext("2d"),this.onmousedown=L(this,Le),this.onmousemove=L(this,Ie),this.onmouseup=L(this,Ae),this.classList.add("transparent"),this.oncontextmenu=n=>{n.preventDefault();const{offsetX:r,offsetY:s}=n,i=new k(r,s),a=L(this,V).filter(O=>O.draggable).find(O=>O.detectCollision(i));if(a)for(const O of L(this,gt))O(a)}}onContextMenu(t){return L(this,gt).add(t),()=>L(this,gt).delete(t)}add(...t){L(this,V).push(...t),this.order(),setTimeout(this.render,50)}order(){L(this,V).sort((t,e)=>t.order-e.order)}reorder(t,e){t.setOrder(e),this.order(),this.render()}};V=new WeakMap;z=new WeakMap;gt=new WeakMap;Le=new WeakMap;Ie=new WeakMap;Ae=new WeakMap;Fe=new WeakSet;tr=function(t,e){De(this,z,t),t.dragStart(e)};X=wi([M("canvas","cw-canvas")],X);const _i=(t,e)=>new DOMParser().parseFromString(t,e).firstElementChild;var yi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,xi=(t,e,n,r)=>{for(var s=r>1?void 0:r?bi(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&yi(e,n,s),s};let We=class extends HTMLButtonElement{constructor(e){super();g(this,"svg",_i(` + `}};Ce=Js([M("button","cw-sidenav-button")],Ce);var jn=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,Nn=t=>{throw TypeError(t)},Ks=(t,e,n)=>e in t?jn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zn=(t,e,n,r)=>{for(var s=r>1?void 0:r?Qs(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&jn(e,n,s),s},fe=(t,e,n)=>Ks(t,typeof e!="symbol"?e+"":e,n),kn=(t,e,n)=>e.has(t)||Nn("Cannot "+n),ct=(t,e,n)=>(kn(t,e,"read from private field"),n?n.call(t):e.get(t)),pe=(t,e,n)=>e.has(t)?Nn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ti=(t,e,n,r)=>(kn(t,e,"write to private field"),e.set(t,n),n),Gt,Ut,vt;let xt=class extends HTMLElement{constructor(){super(...arguments),pe(this,Gt,new Set),pe(this,Ut,new Set),fe(this,"onClickInsideButton",()=>{if(this.classList.toggle("is-open"),this.button.classList.toggle("is-open"),document.body.classList.toggle("cw-sidenav-is-open"),ti(this,vt,!ct(this,vt)),ct(this,vt))for(const t of ct(this,Gt))t();else for(const t of ct(this,Ut))t()}),fe(this,"button",new Ce(this.onClickInsideButton)),pe(this,vt,!1),fe(this,"presentationForm",[])}set onOpen(t){ct(this,Gt).add(t)}set onClose(t){ct(this,Ut).add(t)}connectedCallback(){this.classList.add("cw-sidenav"),this.append(this.button),new MutationObserver(()=>{console.log(Qr(this,"presentationForm"))}).observe(this,{childList:!0,subtree:!0})}add(...t){this.append(...t)}};Gt=new WeakMap;Ut=new WeakMap;vt=new WeakMap;zn([Jr(Jt)],xt.prototype,"presentationForm",2);xt=zn([M("aside","cw-sidenav")],xt);var Gn=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,Un=t=>{throw TypeError(t)},ni=(t,e,n)=>e in t?Gn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ri=(t,e,n,r)=>{for(var s=r>1?void 0:r?ei(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Gn(e,n,s),s},Ht=(t,e,n)=>ni(t,typeof e!="symbol"?e+"":e,n),Bn=(t,e,n)=>e.has(t)||Un("Cannot "+n),jt=(t,e,n)=>(Bn(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>e.has(t)?Un("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ve=(t,e,n)=>(Bn(t,e,"access private method"),n),wt,qn,Me,Bt,qt;let $e=class extends HTMLLabelElement{constructor(t,e,n=6,r=0,s=16){super(),this.name=e,this.value=n,this.min=r,this.max=s,me(this,wt),Ht(this,"text"),Ht(this,"thumb"),Ht(this,"hint"),Ht(this,"element"),me(this,Bt,-1),me(this,qt,()=>{this.thumb.classList.contains("show")||(this.thumb.classList.add("show"),jt(this,Bt)&&clearTimeout(jt(this,Bt)),setTimeout(()=>{this.thumb.classList.remove("show")},2e3));const i=this.element.valueAsNumber;this.hint.textContent=i.toString();const a=this.element.offsetWidth,O=this.element.offsetHeight,A=+this.element.max-+this.element.min,N=(i-+this.element.min)/A*(a-O);this.thumb.style.left=`calc(${N}px + (${O/2}px))`}),this.hint=new Text(n.toString()),this.text=ve(this,wt,Me).call(this,t),this.thumb=ve(this,wt,Me).call(this,this.hint),this.thumb.classList.add("thumb-label"),this.element=ve(this,wt,qn).call(this,e,r,s,n)}connectedCallback(){this.append(this.element,this.text,this.thumb),this.classList.add("cw-slider"),jt(this,qt).call(this),this.element.oninput=jt(this,qt)}};wt=new WeakSet;qn=function(t,e,n,r){return new Se(t,e,n,r)};Me=function(t){return H("span",{},t)};Bt=new WeakMap;qt=new WeakMap;$e=ri([M("label","cw-slider-label")],$e);var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,oi=(t,e,n,r)=>{for(var s=r>1?void 0:r?ii(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&si(e,n,s),s};let Se=class extends Z{constructor(t,e=0,n=16,r=6){super(t,"range"),this.name=t,this.min=e.toString(),this.max=n.toString(),this.value=r.toString()}};Se=oi([M("input","cw-slider")],Se);var ai=Object.defineProperty,ci=Object.getOwnPropertyDescriptor,hi=(t,e,n,r)=>{for(var s=r>1?void 0:r?ci(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&ai(e,n,s),s};let Ee=class extends Z{constructor(t,e="true",n=!1){super(t,"checkbox"),this.name=t,this.value=e,this.checked=n}};Ee=hi([M("input","cw-switch")],Ee);var Vn=Object.defineProperty,li=Object.getOwnPropertyDescriptor,Yn=t=>{throw TypeError(t)},ui=(t,e,n)=>e in t?Vn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,di=(t,e,n,r)=>{for(var s=r>1?void 0:r?li(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Vn(e,n,s),s},wn=(t,e,n)=>ui(t,typeof e!="symbol"?e+"":e,n),fi=(t,e,n)=>e.has(t)||Yn("Cannot "+n),pi=(t,e,n)=>e.has(t)?Yn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),gn=(t,e,n)=>(fi(t,e,"access private method"),n),Vt,Zn,Xn;let Te=class extends HTMLLabelElement{constructor(t,e,n="true",r=!1){super(),this.name=e,this.value=n,this.checked=r,pi(this,Vt),wn(this,"text"),wn(this,"element"),this.text=gn(this,Vt,Xn).call(this,t),this.element=gn(this,Vt,Zn).call(this,e,n,r)}connectedCallback(){this.append(this.element,this.text),this.classList.add("cw-switch")}};Vt=new WeakSet;Zn=function(t,e,n){return new Ee(t,e,n)};Xn=function(t){return H("span",{},t)};Te=di([M("label","cw-switch-label")],Te);var Jn=Object.defineProperty,mi=Object.getOwnPropertyDescriptor,Qn=t=>{throw TypeError(t)},vi=(t,e,n)=>e in t?Jn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wi=(t,e,n,r)=>{for(var s=r>1?void 0:r?mi(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Jn(e,n,s),s},we=(t,e,n)=>vi(t,typeof e!="symbol"?e+"":e,n),Ne=(t,e,n)=>e.has(t)||Qn("Cannot "+n),L=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),et=(t,e,n)=>e.has(t)?Qn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),De=(t,e,n,r)=>(Ne(t,e,"write to private field"),e.set(t,n),n),gi=(t,e,n)=>(Ne(t,e,"access private method"),n),V,z,gt,Le,Ae,Ie,Fe,Kn;let X=class extends HTMLCanvasElement{constructor(t,e){super(),this.width=t,this.height=e,et(this,Fe),we(this,"context"),et(this,V,[]),et(this,z,null),we(this,"render",()=>{const{width:n,height:r}=this.context.canvas;this.context.clearRect(0,0,n,r),L(this,V).filter(s=>s.active).sort((s,i)=>s.order-i.order).map(s=>{this.context.drawImage(s,s.position.x,s.position.y)})}),et(this,gt,new Set),we(this,"onMouseDown",({offsetX:n,offsetY:r})=>{const s=new G(n,r),i=L(this,V).filter(a=>a.draggable).find(a=>a.detectCollision(s));i&&(De(this,z,i),i.dragStart(s))}),et(this,Le,({offsetX:n,offsetY:r})=>{const s=new G(n,r),i=L(this,V).filter(a=>a.draggable).find(a=>a.detectCollision(s));i&&gi(this,Fe,Kn).call(this,i,s)}),et(this,Ae,n=>{if(L(this,z)){const{offsetX:r,offsetY:s}=n,i=new G(r,s);L(this,z).dragTo(i),this.render()}}),et(this,Ie,()=>{L(this,z)&&(L(this,z).dragStop(),De(this,z,null),this.render())}),this.context=this.getContext("2d"),this.onmousedown=L(this,Le),this.onmousemove=L(this,Ae),this.onmouseup=L(this,Ie),this.classList.add("transparent"),this.oncontextmenu=n=>{n.preventDefault();const{offsetX:r,offsetY:s}=n,i=new G(r,s),a=L(this,V).filter(O=>O.draggable).find(O=>O.detectCollision(i));if(a)for(const O of L(this,gt))O(a)}}onContextMenu(t){return L(this,gt).add(t),()=>L(this,gt).delete(t)}add(...t){L(this,V).push(...t),this.order(),setTimeout(this.render,50)}order(){L(this,V).sort((t,e)=>t.order-e.order)}reorder(t,e){t.setOrder(e),this.order(),this.render()}};V=new WeakMap;z=new WeakMap;gt=new WeakMap;Le=new WeakMap;Ae=new WeakMap;Ie=new WeakMap;Fe=new WeakSet;Kn=function(t,e){De(this,z,t),t.dragStart(e)};X=wi([M("canvas","cw-canvas")],X);const ze=t=>new Promise(t),_i=t=>Promise.all(t);var At,ft,Yt;class tr{constructor(){C(this,ft);C(this,At,new Map)}on(e,n){const r=q(this,ft,Yt).call(this,e);return y(this,At).set(e,r.add(n)),()=>r.delete(n)}off(e,n){return q(this,ft,Yt).call(this,e).delete(n)}emit(e,n){const r=q(this,ft,Yt).call(this,e);for(const s of r)s(n)}}At=new WeakMap,ft=new WeakSet,Yt=function(e){return y(this,At).get(e)??new Set};const yi=async(t,e)=>{const n=e.map(String).map(r=>{const s=`url(./fonts/${t}-${r}.woff2)`;return new FontFace(t,s,{weight:r,style:"normal"}).load()});return(await _i(n)).map(r=>document.fonts.add(r))},bi=async t=>ze(async(e,n)=>{try{const s=await(await fetch(t)).blob();e(s)}catch(r){r instanceof Error&&n(new DOMException(r.message))}}),xi=(t,e,n)=>ze(async r=>{const s=new Image(e,n);s.src=t,await s.decode(),r(s)}),Oi=(t,e)=>new DOMParser().parseFromString(t,e).firstElementChild,We=t=>ze((e,n)=>{const r=new FileReader;r.onerror=()=>{n(r.error)},r.onload=()=>{typeof r.result=="string"&&e({name:"name"in t?t.name:"",type:t.type,size:t.size,data:r.result})},r.readAsDataURL(t)});var Pi=Object.defineProperty,Ci=Object.getOwnPropertyDescriptor,Mi=(t,e,n,r)=>{for(var s=r>1?void 0:r?Ci(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Pi(e,n,s),s};let Re=class extends HTMLButtonElement{constructor(e){super();g(this,"svg",Oi(` - `,"image/svg+xml"));this.canvas=e}connectedCallback(){this.classList.add("cw-download-button"),this.append(this.svg),this.onclick=()=>{this.canvas.toBlob(e=>{if(e){const n=URL.createObjectURL(e),r=`meetup-poster-${new Date}.png`,s=H("a",{href:n,download:r});s.onclick=()=>{$n(()=>URL.revokeObjectURL(n),100)},s.click()}},"image/png",1)}}};We=xi([M("button","cw-download-button")],We);var er=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,nr=t=>{throw TypeError(t)},Pi=(t,e,n)=>e in t?er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ci=(t,e,n,r)=>{for(var s=r>1?void 0:r?Oi(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&er(e,n,s),s},Mi=(t,e,n)=>Pi(t,e+"",n),$i=(t,e,n)=>e.has(t)||nr("Cannot "+n),Si=(t,e,n)=>e.has(t)?nr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ei=(t,e,n)=>($i(t,e,"access private method"),n),Re,rr;let yt=class extends HTMLFieldSetElement{constructor(t){super(),Si(this,Re),Mi(this,"legend"),this.legend=Ei(this,Re,rr).call(this,t)}connectedCallback(){this.append(this.legend)}add(...t){this.append(...t)}};Re=new WeakSet;rr=function(t){return H("legend",{},t)};yt=Ci([M("fieldset","cw-fieldset")],yt);var Ti=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,Li=(t,e,n,r)=>{for(var s=r>1?void 0:r?Di(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Ti(e,n,s),s};let _n=class extends HTMLSelectElement{constructor(t,e=()=>{},n=!1,r=!1){super(),this.name=t,this.onchange=e,this.required=n,this.multiple=r}setOptions(...t){for(const[e,n,r,s]of t)this.add(new Option(e,n,r,s))}get selected(){return this.options[this.selectedIndex]}setValue(t){this.value=String(t)}};_n=Li([M("select","cw-select")],_n);const Ii={light:{primary:[19,181,43],onPrimary:[255,255,255],surface:[250,250,250],onSurface:[16,16,16]},dark:{primary:[68,248,94],onPrimary:[0,0,0],surface:[16,16,16],onSurface:[255,255,255]}},Q=1080,it=1080,Ai=6,Fi={x:0,y:0,w:Q,h:it,tile:Ai,active:!1},Wi={x:0,y:0,w:Q,h:it},Ri={x:0,y:0,w:220,h:220},Hi={x:220,y:20,w:Q-180,h:180},ji={x:0,y:180,w:Q,h:180*3},_t={x:0,y:it-360,w:270,h:180},nt={x:_t.x+_t.w,y:_t.y,w:180,h:_t.h},Ni={x:nt.x+nt.w,y:nt.y,w:Q-nt.x-nt.w,h:nt.h},zi={x:0,y:it-360,w:Q,h:180},Gi={x:0,y:it-180,w:360,h:180},ki={x:Q-360,y:it-180,w:360,h:180},Ui=[["Agile","logos/agile.svg"],["Curitiba","logos/curitiba.svg"],["Delphi","logos/delphi.svg"],["Geral","logos/geral.svg"],["NodeJS","logos/nodejs.svg"],["PHP","logos/php.svg"],["Rust","logos/rust.svg"],["TypeScript","logos/typescript.svg"]],Bi=[["Github","images/github-wall.svg"],["Bermuda","images/bermuda-circle.svg"]],b={width:Q,height:it,grid:Fi,logo:Ri,background:Wi,title:Hi,details:zi,date:_t,time:nt,location:Ni,presentation:ji,sponsor:Gi,devParana:ki,backgrounds:Bi,logos:Ui},qi={grid:new zr(b.grid.x,b.grid.y,b.grid.w,b.grid.h),background:new st(b.background.x,b.background.y,b.background.w,b.background.h),logo:new st(b.logo.x,b.logo.y,b.logo.w,b.logo.h),title:new Pn(b.title.x,b.title.y,b.title.w,b.title.h),details:new Nr(b.details.x,b.details.y,b.details.w,b.details.h),presentations:[],sponsors:[],devParana:new st(b.logo.x,b.logo.y,b.logo.w,b.logo.h)},oe={grid:new yt("Grade"),title:new F("Título","text","title"),date:new F("Dia","date","date"),time:new F("Horário","time","time"),location:new F("Local","text","location"),background:new yt("Imagem de fundo"),logo:new yt("Grupo"),sponsor:{input:new Z("file","file",!1),button:new ht("Adicionar patrocinador")},presentation:{add:new ht("Adicionar apresentação","button")},reset:new ht("Reset","reset")};oe.grid.add(new xe("Mostrar","gridActive","true",b.grid.active),new $e("Quantidade","grid",b.grid.tile));oe.logo.add(...b.logos.map(([t,e])=>new Zt(t,"logo",e)));oe.background.add(...b.backgrounds.map(([t,e])=>new Zt(t,"background",e)));var Vi=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor,sr=t=>{throw TypeError(t)},Zi=(t,e,n,r)=>{for(var s=r>1?void 0:r?Yi(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Vi(e,n,s),s},Xi=(t,e,n)=>e.has(t)||sr("Cannot "+n),Ji=(t,e,n)=>e.has(t)?sr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Qi=(t,e,n)=>(Xi(t,e,"access private method"),n),He,ir;const Ki=t=>t.slice(0,1).toUpperCase()+t.slice(1);let Qt=class extends Te{constructor(t){super("Theme","theme"," true"),this.themes=t,Ji(this,He)}connectedCallback(){super.connectedCallback(),this.classList.add("cw-theme-toggle"),this.element.oninput=()=>{this.element.checked?this.setCurrent("dark"):this.setCurrent("light")},this.setCurrent(this.current)}get current(){return localStorage.getItem("theme")??"light"}setCurrent(t){t==="dark"&&(this.element.checked=!0),this.text.textContent=Ki(t),localStorage.setItem("theme",t),Qi(this,He,ir).call(this,t)}};He=new WeakSet;ir=function(t){const e=this.themes[t];document.documentElement.style.colorScheme=t,document.documentElement.style.setProperty("--cw-primary-rgb",e.primary.join(",")),document.documentElement.style.setProperty("--cw-onprimary-rgb",e.onPrimary.join(",")),document.documentElement.style.setProperty("--cw-surface-rgb",e.surface.join(",")),document.documentElement.style.setProperty("--cw-onsurface-rgb",e.onSurface.join(","))};Qt=Zi([M("label","cw-theme-toggle")],Qt);const ze=t=>new Promise(t),to=t=>Promise.all(t);var Lt,ft,Yt;class or{constructor(){C(this,ft);C(this,Lt,new Map)}on(e,n){const r=q(this,ft,Yt).call(this,e);return y(this,Lt).set(e,r.add(n)),()=>r.delete(n)}off(e,n){return q(this,ft,Yt).call(this,e).delete(n)}emit(e,n){const r=q(this,ft,Yt).call(this,e);for(const s of r)s(n)}}Lt=new WeakMap,ft=new WeakSet,Yt=function(e){return y(this,Lt).get(e)??new Set};const eo=async(t,e)=>{const n=e.map(String).map(r=>{const s=`url(./fonts/${t}-${r}.woff2)`;return new FontFace(t,s,{weight:r,style:"normal"}).load()});return(await to(n)).map(r=>document.fonts.add(r))},no=async t=>ze(async(e,n)=>{try{const s=await(await fetch(t)).blob();e(s)}catch(r){r instanceof Error&&n(new DOMException(r.message))}}),ro=(t,e,n)=>ze(async r=>{const s=new Image(e,n);s.src=t,await s.decode(),r(s)}),je=t=>ze((e,n)=>{const r=new FileReader;r.onerror=()=>{n(r.error)},r.onload=()=>{typeof r.result=="string"&&e({name:"name"in t?t.name:"",type:t.type,size:t.size,data:r.result})},r.readAsDataURL(t)}),so=async t=>{try{for await(const e of t);}catch(e){throw e}},ge={fn(t){return typeof t=="function"},asyncFn(t){return this.fn(t)&&t.constructor.name==="AsyncFunction"},type(t){return this.fn(t)&&typeof t.prototype=="object"}},ar=new Map,cr=new Map;function x(t){const e=ar.get(t);if(!e)throw`${t.name} not found`;return e}const io=async({ref:t,use:e})=>{const n=e??t;if(ge.fn(n)){const r=cr.get(t)??[];return ge.type(n)?new n(...r):ge.asyncFn(n)?await n(...r):n(...r)}return n},oo=async t=>(t.dep&&t.dep.length>0&&cr.set(t.ref,t.dep.map(x)),ar.set(t.ref,await io(t)),x(t.ref));async function*ao(...t){for(const e of t)yield await oo(e)}class Kt{}class ot extends or{}class ae{}class U{}class yn{}const co=t=>{const e=x(X),n=x(U);t.logo&&n.logo.setSrc(t.logo).render().then(e.render),t.background&&n.background.setSrc(t.background).render().then(e.render),t.title&&n.title.setText(t.title).render().then(e.render),t.date&&n.details.setDate(t.date).render(),t.time&&n.details.setTime(t.time).render(),t.location&&n.details.setLocation(t.location).render(),n.grid.setSize(t.grid).setActive(t.gridActive===!0).setOrder(20).render().then(e.render),n.details.render().then(e.render)},ho=()=>{var n;const t=x(ae);if(x(U).presentations.length<2)t.presentation.add.focus();else{t.presentation.add.disabled=!0;const r=((n=t.background.firstElementChild)==null?void 0:n.firstElementChild)??[];r instanceof HTMLInputElement&&r.focus()}},lo=t=>{const e=x(X),n=x(U),r=x(ot);e.add(t),n.presentations.push(t),t.render().then(()=>{e.render(),r.emit("presentation.added",t)})},uo=t=>{console.log(t);const e=x(Kt),n=x(ot),r=x(U),s=e.width,i=e.height/e.grid.tile,a=i*(r.presentations.length+1)+90,O=new Vr(0,a,s,i);O.setPhoto(t.photo),O.setTitle(t.title),O.setSpeaker(t.name,t.role),n.emit("presentation.created",O)},fo=t=>{const e=x(ot),n=t.photo;t.photoUrl?no(t.photoUrl).then(je).then(({data:r})=>{e.emit("presentation.handled",{...t,photo:r})}):n instanceof File&&je(n).then(({data:r})=>{e.emit("presentation.handled",{...t,photo:r})})},po=()=>{var n;const t=x(ae);if(x(U).sponsors.length<2)t.sponsor.button.focus();else{t.sponsor.button.disabled=!0;const r=((n=t.grid.firstElementChild)==null?void 0:n.firstElementChild)??[];r instanceof HTMLInputElement&&r.focus()}},mo=t=>{const e=x(X),n=x(U),r=x(ot);e.add(t),n.sponsors.push(t),t.render().then(()=>{e.render(),r.emit("sponsor.added",t)})},vo=t=>{const e=x(Kt),n=x(ot),r=x(U);je(t).then(({data:s})=>s).then(ro).then(s=>{const i=Hr(s,{width:300,height:120}),a=Rr({width:360,height:180},i),O=e.sponsor.w*r.sponsors.length,I=new st(e.sponsor.x+a.width+O,e.sponsor.y+a.height,i.width,i.height).setSrc(s.src);n.emit("sponsor.created",I)})},wo=t=>{const e=x(X),n=x(bt),r=x(U),s=x(ae),i=x(ot),a=new ye,O=x(Qt);s.presentation.add.onclick=()=>{const A=new Jt,pt=`Presentation ${a.items.length+1}`;a.add(pt,A).openSection(),A.controls.title.element.focus(),A.onsubmit=B=>{B.preventDefault(),i.emit("presentation.submitted",A.value),a.closeAll()}},i.on("presentation.submitted",fo),i.on("presentation.handled",uo),i.on("presentation.created",lo),i.on("presentation.added",ho),s.sponsor.input.onchange=()=>{const[A]=s.sponsor.input.files??[];i.emit("sponsor.selected",A)},i.on("sponsor.selected",vo),i.on("sponsor.created",mo),i.on("sponsor.added",po),s.sponsor.button.onclick=()=>{s.sponsor.input.click()};const I=new Xt(()=>{i.emit("form.updated",I.value)});i.on("form.updated",co),r.background.setDraggable(!1).setSrc(I.value.logo).render(),r.logo.setOrder(4).setSrc("logos/dev-parana.svg").render(),r.title.setText(s.title.value).setSize(78).setColor("white").render(),n.onOpen=()=>{queueMicrotask(()=>{s.title.element.focus()})},e.add(r.grid,r.logo,r.background,r.title,r.details);const N=H("div",{className:"form-group"},s.date,s.time);I.append(s.title,N,s.location,s.logo,s.presentation.add,a,s.background,s.sponsor.button,s.grid),n.add(I);const W=H("main"),K=new We(e);W.append(e),t.append(O,W,n,K)};so(ao({ref:Kt,use:b},{ref:X,use(t){return new X(t.width,t.height)},dep:[Kt]},{ref:bt},{ref:ot,use:or},{ref:U,use:qi},{ref:ae,use:oe},{ref:yn,use:Ii},{ref:Qt,dep:[yn]}));eo("Mukta",[200,300,400,500,600,700,800]).then(()=>wo(app)); + `,"image/svg+xml"));this.canvas=e}connectedCallback(){this.classList.add("cw-download-button"),this.append(this.svg),this.onclick=()=>{this.canvas.toBlob(e=>{if(e){const n=URL.createObjectURL(e),r=`meetup-poster-${new Date}.png`,s=H("a",{href:n,download:r});s.onclick=()=>{Mn(()=>URL.revokeObjectURL(n),100)},s.click()}},"image/png",1)}}};Re=Mi([M("button","cw-download-button")],Re);var er=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,nr=t=>{throw TypeError(t)},Si=(t,e,n)=>e in t?er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ei=(t,e,n,r)=>{for(var s=r>1?void 0:r?$i(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&er(e,n,s),s},Ti=(t,e,n)=>Si(t,e+"",n),Di=(t,e,n)=>e.has(t)||nr("Cannot "+n),Li=(t,e,n)=>e.has(t)?nr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ai=(t,e,n)=>(Di(t,e,"access private method"),n),He,rr;let bt=class extends HTMLFieldSetElement{constructor(t){super(),Li(this,He),Ti(this,"legend"),this.legend=Ai(this,He,rr).call(this,t)}connectedCallback(){this.append(this.legend)}add(...t){this.append(...t)}};He=new WeakSet;rr=function(t){return H("legend",{},t)};bt=Ei([M("fieldset","cw-fieldset")],bt);var Ii=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Wi=(t,e,n,r)=>{for(var s=r>1?void 0:r?Fi(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Ii(e,n,s),s};let _n=class extends HTMLSelectElement{constructor(t,e=()=>{},n=!1,r=!1){super(),this.name=t,this.onchange=e,this.required=n,this.multiple=r}setOptions(...t){for(const[e,n,r,s]of t)this.add(new Option(e,n,r,s))}get selected(){return this.options[this.selectedIndex]}setValue(t){this.value=String(t)}};_n=Wi([M("select","cw-select")],_n);const Ri={light:{primary:[19,181,43],onPrimary:[255,255,255],surface:[250,250,250],onSurface:[16,16,16]},dark:{primary:[68,248,94],onPrimary:[0,0,0],surface:[16,16,16],onSurface:[255,255,255]}},Q=1080,it=1080,Hi=6,ji={x:0,y:0,w:Q,h:it,tile:Hi,active:!1},Ni={x:0,y:0,w:Q,h:it},zi={x:0,y:0,w:220,h:220},ki={x:220,y:20,w:Q-180,h:180},Gi={x:0,y:180,w:Q,h:180*3},_t={x:0,y:it-360,w:270,h:180},nt={x:_t.x+_t.w,y:_t.y,w:180,h:_t.h},Ui={x:nt.x+nt.w,y:nt.y,w:Q-nt.x-nt.w,h:nt.h},Bi={x:0,y:it-360,w:Q,h:180},qi={x:0,y:it-180,w:360,h:180},Vi={x:Q-360,y:it-180,w:360,h:180},Yi=[["Agile","logos/agile.svg"],["Curitiba","logos/curitiba.svg"],["Delphi","logos/delphi.svg"],["Geral","logos/geral.svg"],["NodeJS","logos/nodejs.svg"],["PHP","logos/php.svg"],["Rust","logos/rust.svg"],["TypeScript","logos/typescript.svg"]],Zi=[["Github","images/github-wall.svg"],["Bermuda","images/bermuda-circle.svg"]],b={width:Q,height:it,grid:ji,logo:zi,background:Ni,title:ki,details:Bi,date:_t,time:nt,location:Ui,presentation:Gi,sponsor:qi,devParana:Vi,backgrounds:Zi,logos:Yi},Xi={grid:new Nr(b.grid.x,b.grid.y,b.grid.w,b.grid.h),background:new st(b.background.x,b.background.y,b.background.w,b.background.h),logo:new st(b.logo.x,b.logo.y,b.logo.w,b.logo.h),title:new Vr(b.title.x,b.title.y,b.title.w,b.title.h),details:new jr(b.details.x,b.details.y,b.details.w,b.details.h),presentations:[],sponsors:[],devParana:new st(b.logo.x,b.logo.y,b.logo.w,b.logo.h)},oe={grid:new bt("Grade"),title:new F("Título","text","title"),date:new F("Dia","date","date"),time:new F("Horário","time","time"),location:new F("Local","text","location"),background:new bt("Imagem de fundo"),logo:new bt("Grupo"),sponsor:{input:new Z("file","file",!1),button:new ht("Adicionar patrocinador")},presentation:{add:new ht("Adicionar apresentação","button")},reset:new ht("Reset","reset")};oe.grid.add(new xe("Mostrar","gridActive","true",b.grid.active),new $e("Quantidade","grid",b.grid.tile));oe.logo.add(...b.logos.map(([t,e])=>new Zt(t,"logo",e)));oe.background.add(...b.backgrounds.map(([t,e])=>new Zt(t,"background",e)));var Ji=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,sr=t=>{throw TypeError(t)},Ki=(t,e,n,r)=>{for(var s=r>1?void 0:r?Qi(e,n):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=(r?a(e,n,s):a(s))||s);return r&&s&&Ji(e,n,s),s},to=(t,e,n)=>e.has(t)||sr("Cannot "+n),eo=(t,e,n)=>e.has(t)?sr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),no=(t,e,n)=>(to(t,e,"access private method"),n),je,ir;const ro=t=>t.slice(0,1).toUpperCase()+t.slice(1);let Qt=class extends Te{constructor(t){super("Theme","theme"," true"),this.themes=t,eo(this,je)}connectedCallback(){super.connectedCallback(),this.classList.add("cw-theme-toggle"),this.element.oninput=()=>{this.element.checked?this.setCurrent("dark"):this.setCurrent("light")},this.setCurrent(this.current)}get current(){return localStorage.getItem("theme")??"light"}setCurrent(t){t==="dark"&&(this.element.checked=!0),this.text.textContent=ro(t),localStorage.setItem("theme",t),no(this,je,ir).call(this,t)}};je=new WeakSet;ir=function(t){const e=this.themes[t];document.documentElement.style.colorScheme=t,document.documentElement.style.setProperty("--cw-primary-rgb",e.primary.join(",")),document.documentElement.style.setProperty("--cw-onprimary-rgb",e.onPrimary.join(",")),document.documentElement.style.setProperty("--cw-surface-rgb",e.surface.join(",")),document.documentElement.style.setProperty("--cw-onsurface-rgb",e.onSurface.join(","))};Qt=Ki([M("label","cw-theme-toggle")],Qt);const so=async t=>{try{for await(const e of t);}catch(e){throw e}},ge={fn(t){return typeof t=="function"},asyncFn(t){return this.fn(t)&&t.constructor.name==="AsyncFunction"},type(t){return this.fn(t)&&typeof t.prototype=="object"}},or=new Map,ar=new Map;function x(t){const e=or.get(t);if(!e)throw`${t.name} not found`;return e}const io=async({ref:t,use:e})=>{const n=e??t;if(ge.fn(n)){const r=ar.get(t)??[];return ge.type(n)?new n(...r):ge.asyncFn(n)?await n(...r):n(...r)}return n},oo=async t=>(t.dep&&t.dep.length>0&&ar.set(t.ref,t.dep.map(x)),or.set(t.ref,await io(t)),x(t.ref));async function*ao(...t){for(const e of t)yield await oo(e)}class Kt{}class ot extends tr{}class ae{}class U{}class yn{}const co=t=>{const e=x(X),n=x(U);t.logo&&n.logo.setSrc(t.logo).render().then(e.render),t.background&&n.background.setSrc(t.background).render().then(e.render),t.title&&n.title.setText(t.title).render().then(e.render),t.date&&n.details.setDate(t.date).render(),t.time&&n.details.setTime(t.time).render(),t.location&&n.details.setLocation(t.location).render(),n.grid.setSize(t.grid).setActive(t.gridActive===!0).setOrder(20).render().then(e.render),n.details.render().then(e.render)},ho=()=>{var n;const t=x(ae);if(x(U).presentations.length<2)t.presentation.add.focus();else{t.presentation.add.disabled=!0;const r=((n=t.background.firstElementChild)==null?void 0:n.firstElementChild)??[];r instanceof HTMLInputElement&&r.focus()}},lo=t=>{const e=x(X),n=x(U),r=x(ot);e.add(t),n.presentations.push(t),t.render().then(()=>{e.render(),r.emit("presentation.added",t)})},uo=t=>{console.log(t);const e=x(Kt),n=x(ot),r=x(U),s=e.width,i=e.height/e.grid.tile,a=i*(r.presentations.length+1)+90,O=new Gr(0,a,s,i);O.setPhoto(t.photo),O.setTitle(t.title),O.setSpeaker(t.name,t.role),n.emit("presentation.created",O)},fo=t=>{const e=x(ot),n=t.photo;t.photoUrl?bi(t.photoUrl).then(We).then(({data:r})=>{e.emit("presentation.handled",{...t,photo:r})}):n instanceof File&&We(n).then(({data:r})=>{e.emit("presentation.handled",{...t,photo:r})})},po=()=>{var n;const t=x(ae);if(x(U).sponsors.length<2)t.sponsor.button.focus();else{t.sponsor.button.disabled=!0;const r=((n=t.grid.firstElementChild)==null?void 0:n.firstElementChild)??[];r instanceof HTMLInputElement&&r.focus()}},mo=t=>{const e=x(X),n=x(U),r=x(ot);e.add(t),n.sponsors.push(t),t.render().then(()=>{e.render(),r.emit("sponsor.added",t)})},vo=t=>{const e=x(Kt),n=x(ot),r=x(U);We(t).then(({data:s})=>s).then(xi).then(s=>{const i=Rr(s,{width:300,height:120}),a=Wr({width:360,height:180},i),O=e.sponsor.w*r.sponsors.length,A=new st(e.sponsor.x+a.width+O,e.sponsor.y+a.height,i.width,i.height).setSrc(s.src);n.emit("sponsor.created",A)})},wo=t=>{const e=x(X),n=x(xt),r=x(U),s=x(ae),i=x(ot),a=new ye,O=x(Qt);s.presentation.add.onclick=()=>{const I=new Jt,pt=`Presentation ${a.items.length+1}`;I.controls.title.setValue("Palestra"),I.controls.github.setValue("guisee"),I.controls.role.setValue("Arquiteto"),a.add(pt,I).openSection(),I.controls.title.element.focus(),I.onsubmit=B=>{B.preventDefault(),i.emit("presentation.submitted",I.value),a.closeAll()}},i.on("presentation.submitted",fo),i.on("presentation.handled",uo),i.on("presentation.created",lo),i.on("presentation.added",ho),s.sponsor.input.onchange=()=>{const[I]=s.sponsor.input.files??[];i.emit("sponsor.selected",I)},i.on("sponsor.selected",vo),i.on("sponsor.created",mo),i.on("sponsor.added",po),s.sponsor.button.onclick=()=>{s.sponsor.input.click()};const A=new Xt(()=>{i.emit("form.updated",A.value)});i.on("form.updated",co),r.background.setDraggable(!1).setSrc(A.value.logo).render(),r.logo.setOrder(4).setSrc("logos/dev-parana.svg").render(),r.title.setText(s.title.value).setSize(78).setColor("white").render(),n.onOpen=()=>{queueMicrotask(()=>{s.title.element.focus()})},e.add(r.grid,r.logo,r.background,r.title,r.details);const N=H("div",{className:"form-group"},s.date,s.time);A.append(s.title,N,s.location,s.logo,s.presentation.add,a,s.background,s.sponsor.button,s.grid),n.add(A);const W=H("main"),K=new Re(e);W.append(e),t.append(W,n,K),document.body.append(O)};so(ao({ref:Kt,use:b},{ref:X,use(t){return new X(t.width,t.height)},dep:[Kt]},{ref:xt},{ref:ot,use:tr},{ref:U,use:Xi},{ref:ae,use:oe},{ref:yn,use:Ri},{ref:Qt,dep:[yn]}));yi("Mukta",[200,300,400,500,600,700,800]).then(()=>wo(app)); diff --git a/index.html b/index.html index 9d79b7a..e70b667 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Escritor criativo - +