Skip to content

Commit

Permalink
Deploying to gh-pages from @ 67e47ac 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhuyn committed Dec 27, 2023
1 parent 066fd20 commit 818d959
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/index-b13eb442.js → assets/index-c18fd957.js
Original file line number Diff line number Diff line change
Expand Up @@ -6940,7 +6940,7 @@ lit-html/directives/range.js:
class=${P({badge:!0,"badge--primary":this.variant==="primary","badge--success":this.variant==="success","badge--neutral":this.variant==="neutral","badge--warning":this.variant==="warning","badge--danger":this.variant==="danger","badge--pill":this.pill,"badge--pulse":this.pulse})}
role="status"
></slot>
`}};fi.styles=eu;a([c({reflect:!0})],fi.prototype,"variant",2);a([c({type:Boolean,reflect:!0})],fi.prototype,"pill",2);a([c({type:Boolean,reflect:!0})],fi.prototype,"pulse",2);fi=a([z("sl-badge")],fi);_o("dist/");const Vr=window.location.host==="plakait.com"?new URL("https://plakait-backend-production.up.railway.app/"):new URL("http://localhost:8000/"),iu=async(t,e,i)=>{const r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,content:i})},o=new URL(`/chat/${t}`,Vr);return fetch(o,r).then(s=>{if(s.ok)return s.json();throw Error("Failed Post message - Server returned a non 200 response")}).catch(()=>{throw Error("Post Chat Exception")})},ru=async t=>{const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scenario:t})},i=new URL("/game",Vr);return fetch(i,e).then(r=>{if(r.ok)return r.json();throw Error("Failed to initiate game - Server returned a non 200 response")}).catch(()=>{throw Error("Post Game Exception")})},ou=async t=>{const e={method:"GET",headers:{"Content-Type":"application/json"}},i=new URL(`/history/${t}`,Vr);return fetch(i,e).then(r=>{if(r.ok)return r.json();throw Error("Failed to Get game history - Server returned a non 200 response")}).catch(()=>{throw Error("Get History Exception")})},su=async()=>{const t={method:"GET",headers:{"Content-Type":"application/json"}},e=new URL("/",Vr);return fetch(e,t).then(i=>{if(i.ok)return i.text();throw Error("Failed to Get Root - Server returned a non 200 response")}).catch(()=>{throw Error("Get Root Exception")})},te={loading:"plakait-loading",history:"plakait-history",endMessage:"plakait-endMessage",gameId:"plakait-gameId",scenario:"plakait-scenario",name:"plakait-name"};var Xe,Ye,Je,Qe;const es=class extends EventTarget{constructor(){super(...arguments);Yt(this,Ye,null);Yt(this,Je,null);Yt(this,Qe,null)}static Instance(){return rt(this,Xe)||Jt(this,Xe,new es),rt(this,Xe)}get gameId(){return rt(this,Ye)}set gameId(i){rt(this,Ye)!==i&&(Jt(this,Ye,i),this.dispatch(te.gameId))}get scenario(){return rt(this,Je)}set scenario(i){rt(this,Je)!==i&&(Jt(this,Je,i),this.dispatch(te.scenario))}get name(){return rt(this,Qe)}set name(i){rt(this,Qe)!==i&&(Jt(this,Qe,i),this.dispatch(te.name))}get queryParams(){const i=new URLSearchParams({});return this.name&&i.set("name",this.name),this.gameId&&i.set("gameId",this.gameId),this.scenario&&i.set("scenario",this.scenario),i.toString()}dispatch(i,r){const o=new CustomEvent(i,{detail:r});this.dispatchEvent(o)}};let Ge=es;Xe=new WeakMap,Ye=new WeakMap,Je=new WeakMap,Qe=new WeakMap,Yt(Ge,Xe,void 0);var ze,Ze,ti,ei,ii;const is=class extends EventTarget{constructor(){super();Yt(this,ze,[]);Yt(this,Ze,!1);Yt(this,ti,null);Yt(this,ei,void 0);Jt(this,ei,Ge.Instance())}get history(){return rt(this,ze)}set history(i){rt(this,ze).toString()!==i.toString()&&(Jt(this,ze,i),this.checkEndMessage(),this.dispatch(te.history))}checkEndMessage(){const i=rt(this,ze).filter(r=>r.type==="Bot").at(-1);i&&i.endMessage&&(this.endMessage=i.endMessage,this.dispatch(te.endMessage))}get loaded(){return rt(this,Ze)}set loaded(i){rt(this,Ze)!==i&&(Jt(this,Ze,i),this.dispatch(te.loading))}get endMessage(){return rt(this,ti)}set endMessage(i){rt(this,ti)!==i&&(Jt(this,ti,i),this.dispatch(te.endMessage))}static Instance(){return rt(this,ii)||Jt(this,ii,new is),rt(this,ii)}async addMessage(i,r,o){const s={name:r,content:o,type:"User"};this.history=[...this.history,s];try{this.history=await iu(i,r,o)}catch{this.endMessage="Failed to add message - Server may be down"}}async getHistory(i){try{this.history=await ou(i),this.loaded=!0}catch{this.endMessage="Failed to get messages - Server may be down"}}async initGame(i){try{const r=await ru(i);this.history=r.messages,rt(this,ei).gameId=r.gameId,this.loaded=!0}catch{this.endMessage="Failed to initiate game - Server may be down"}}reset(){this.history=[],this.endMessage=null,this.loaded=!1,rt(this,ei).gameId=null}dispatch(i,r){const o=new CustomEvent(i,{detail:r});this.dispatchEvent(o)}};let dr=is;ze=new WeakMap,Ze=new WeakMap,ti=new WeakMap,ei=new WeakMap,ii=new WeakMap,Yt(dr,ii,void 0);/**
`}};fi.styles=eu;a([c({reflect:!0})],fi.prototype,"variant",2);a([c({type:Boolean,reflect:!0})],fi.prototype,"pill",2);a([c({type:Boolean,reflect:!0})],fi.prototype,"pulse",2);fi=a([z("sl-badge")],fi);_o("dist/");const Vr=window.location.host.includes("plakait")?new URL("https://plakait-backend-production.up.railway.app/"):new URL("http://localhost:8000/"),iu=async(t,e,i)=>{const r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,content:i})},o=new URL(`/chat/${t}`,Vr);return fetch(o,r).then(s=>{if(s.ok)return s.json();throw Error("Failed Post message - Server returned a non 200 response")}).catch(()=>{throw Error("Post Chat Exception")})},ru=async t=>{const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scenario:t})},i=new URL("/game",Vr);return fetch(i,e).then(r=>{if(r.ok)return r.json();throw Error("Failed to initiate game - Server returned a non 200 response")}).catch(()=>{throw Error("Post Game Exception")})},ou=async t=>{const e={method:"GET",headers:{"Content-Type":"application/json"}},i=new URL(`/history/${t}`,Vr);return fetch(i,e).then(r=>{if(r.ok)return r.json();throw Error("Failed to Get game history - Server returned a non 200 response")}).catch(()=>{throw Error("Get History Exception")})},su=async()=>{const t={method:"GET",headers:{"Content-Type":"application/json"}},e=new URL("/",Vr);return fetch(e,t).then(i=>{if(i.ok)return i.text();throw Error("Failed to Get Root - Server returned a non 200 response")}).catch(()=>{throw Error("Get Root Exception")})},te={loading:"plakait-loading",history:"plakait-history",endMessage:"plakait-endMessage",gameId:"plakait-gameId",scenario:"plakait-scenario",name:"plakait-name"};var Xe,Ye,Je,Qe;const es=class extends EventTarget{constructor(){super(...arguments);Yt(this,Ye,null);Yt(this,Je,null);Yt(this,Qe,null)}static Instance(){return rt(this,Xe)||Jt(this,Xe,new es),rt(this,Xe)}get gameId(){return rt(this,Ye)}set gameId(i){rt(this,Ye)!==i&&(Jt(this,Ye,i),this.dispatch(te.gameId))}get scenario(){return rt(this,Je)}set scenario(i){rt(this,Je)!==i&&(Jt(this,Je,i),this.dispatch(te.scenario))}get name(){return rt(this,Qe)}set name(i){rt(this,Qe)!==i&&(Jt(this,Qe,i),this.dispatch(te.name))}get queryParams(){const i=new URLSearchParams({});return this.name&&i.set("name",this.name),this.gameId&&i.set("gameId",this.gameId),this.scenario&&i.set("scenario",this.scenario),i.toString()}dispatch(i,r){const o=new CustomEvent(i,{detail:r});this.dispatchEvent(o)}};let Ge=es;Xe=new WeakMap,Ye=new WeakMap,Je=new WeakMap,Qe=new WeakMap,Yt(Ge,Xe,void 0);var ze,Ze,ti,ei,ii;const is=class extends EventTarget{constructor(){super();Yt(this,ze,[]);Yt(this,Ze,!1);Yt(this,ti,null);Yt(this,ei,void 0);Jt(this,ei,Ge.Instance())}get history(){return rt(this,ze)}set history(i){rt(this,ze).toString()!==i.toString()&&(Jt(this,ze,i),this.checkEndMessage(),this.dispatch(te.history))}checkEndMessage(){const i=rt(this,ze).filter(r=>r.type==="Bot").at(-1);i&&i.endMessage&&(this.endMessage=i.endMessage,this.dispatch(te.endMessage))}get loaded(){return rt(this,Ze)}set loaded(i){rt(this,Ze)!==i&&(Jt(this,Ze,i),this.dispatch(te.loading))}get endMessage(){return rt(this,ti)}set endMessage(i){rt(this,ti)!==i&&(Jt(this,ti,i),this.dispatch(te.endMessage))}static Instance(){return rt(this,ii)||Jt(this,ii,new is),rt(this,ii)}async addMessage(i,r,o){const s={name:r,content:o,type:"User"};this.history=[...this.history,s];try{this.history=await iu(i,r,o)}catch{this.endMessage="Failed to add message - Server may be down"}}async getHistory(i){try{this.history=await ou(i),this.loaded=!0}catch{this.endMessage="Failed to get messages - Server may be down"}}async initGame(i){try{const r=await ru(i);this.history=r.messages,rt(this,ei).gameId=r.gameId,this.loaded=!0}catch{this.endMessage="Failed to initiate game - Server may be down"}}reset(){this.history=[],this.endMessage=null,this.loaded=!1,rt(this,ei).gameId=null}dispatch(i,r){const o=new CustomEvent(i,{detail:r});this.dispatchEvent(o)}};let dr=is;ze=new WeakMap,Ze=new WeakMap,ti=new WeakMap,ei=new WeakMap,ii=new WeakMap,Yt(dr,ii,void 0);/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
})(window.location);
</script>

<script type="module" crossorigin src="/assets/index-b13eb442.js"></script>
<script type="module" crossorigin src="/assets/index-c18fd957.js"></script>
<link rel="stylesheet" href="/assets/index-c5981d46.css">
</head>

Expand Down

0 comments on commit 818d959

Please sign in to comment.