diff --git a/index.html b/index.html index 9b9106915..b93afb42a 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/main.db01b5319d34538c.js b/main.482ce573e36f81fa.js similarity index 95% rename from main.db01b5319d34538c.js rename to main.482ce573e36f81fa.js index ff426bdac..7046aa347 100644 --- a/main.db01b5319d34538c.js +++ b/main.482ce573e36f81fa.js @@ -1,4 +1,4 @@ -(self.webpackChunkgloomhavensecretariat=self.webpackChunkgloomhavensecretariat||[]).push([[179],{5604:(q,nt,E)=>{"use strict";E.d(nt,{v:()=>Y});var t=E(1180),x=E(5609),G=E(3788),tt=E(2113),at=E(7680),it=E(7866),K=E(377),dt=E(6565),X=E(7177),et=E(9120),st=E(8927),gt=E(2098),I=E(2501),Q=E(731);class lt{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}byFigure(p){return p instanceof x.z?p.attackModifierDeck:p instanceof X.Q?(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules())&&(p.isAlly||p.isAllied)?this.game.allyAttackModifierDeck:this.game.monsterAttackModifierDeck:new gt.ut}countUpcomingBlesses(){let p=0;return(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules()&&Y.game.figures.some(P=>P instanceof X.Q&&(P.isAlly||P.isAllied)))&&(p+=Y.game.allyAttackModifierDeck.cards.filter((P,M)=>P.type==gt.kl.bless&&M>Y.game.allyAttackModifierDeck.current).length),p+=Y.game.monsterAttackModifierDeck.cards.filter((P,M)=>P.type==gt.kl.bless&&M>Y.game.monsterAttackModifierDeck.current).length,Y.game.figures.filter(P=>P instanceof x.z).map(P=>P).forEach(P=>{p+=P.attackModifierDeck.cards.filter((M,y)=>M.type==gt.kl.bless&&y>P.attackModifierDeck.current).length}),p}countUpcomingCurses(p){if(p)return Y.game.monsterAttackModifierDeck.cards.filter((M,y)=>M.type==gt.kl.curse&&y>Y.game.monsterAttackModifierDeck.current).length;let P=0;return(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules()&&Y.game.figures.some(M=>M instanceof X.Q&&(M.isAlly||M.isAllied)))&&(P+=Y.game.allyAttackModifierDeck.cards.filter((M,y)=>M.type==gt.kl.curse&&y>Y.game.allyAttackModifierDeck.current).length),Y.game.figures.filter(M=>M instanceof x.z).map(M=>M).forEach(M=>{P+=M.attackModifierDeck.cards.filter((y,S)=>y.type==gt.kl.curse&&S>M.attackModifierDeck.current).length}),P}getAdditional(p,P,M=!1){let y=[];return p.additionalModifier.find(S=>S.attackModifier&&S.attackModifier.type==P)&&p.additionalModifier.forEach((S,U)=>{if(S.attackModifier&&S.attackModifier.type==P){let V=Object.assign(new gt.YY(S.attackModifier.type,S.attackModifier.value,S.attackModifier.valueType),S.attackModifier);V.id="additional-"+p.name+U,V.character=!0;const $=M?0:this.countUpcomingAdditional(p,P);for(let ut=0;ut{P.additionalModifier.find(M=>M.attackModifier)&&P.additionalModifier.forEach((M,y)=>{if(M.attackModifier){let S=Object.assign(new gt.YY(M.attackModifier.type,M.attackModifier.value,M.attackModifier.valueType),M.attackModifier);S.id="additional-"+P.name+y,S.character=!0;for(let U=0;Uy instanceof X.Q&&(y.isAlly||y.isAllied)))&&(M+=Y.game.allyAttackModifierDeck.cards.filter((y,S)=>S>Y.game.allyAttackModifierDeck.current&&y.type==P&&y.id&&y.id.startsWith("additional-"+p.name)).length),M+=Y.game.monsterAttackModifierDeck.cards.filter((y,S)=>S>Y.game.monsterAttackModifierDeck.current&&y.type==P&&y.id&&y.id.startsWith("additional-"+p.name)).length,Y.game.figures.filter(y=>y instanceof x.z).map(y=>y).forEach(y=>{M+=y.attackModifierDeck.cards.filter((S,U)=>U>y.attackModifierDeck.current&&S.type==P&&S.id&&S.id.startsWith("additional-"+p.name)).length}),M}countExtraMinus1(){let p=0;return(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules()&&Y.game.figures.some(P=>P instanceof X.Q&&(P.isAlly||P.isAllied)))&&(p+=Y.game.allyAttackModifierDeck.cards.filter(P=>P.type==gt.kl.minus1extra).length),p+=Y.game.monsterAttackModifierDeck.cards.filter(P=>P.type==gt.kl.minus1extra).length,Y.game.figures.filter(P=>P instanceof x.z).map(P=>P).forEach(P=>{p+=P.attackModifierDeck.cards.filter(M=>M.type==gt.kl.minus1extra).length}),p}addModifier(p,P,M=-1){(M<0||M>p.cards.length)&&(M=Math.floor(Math.random()*(p.cards.length-p.current))+p.current+1),p.cards.splice(M,0,P)}drawModifier(p){p.current=p.current+1,p.current==p.cards.length&&this.shuffleModifiers(p)}shuffleModifiers(p){p.cards=p.cards.filter((P,M)=>M>p.current||P.type!=gt.kl.bless&&P.type!=gt.kl.curse),p.current=-1,(0,st.wE)(p.cards)}removeDrawnDiscards(p){const P=p.cards.length;p.cards=p.cards.filter((M,y)=>y>p.current||M.type!=gt.kl.bless&&M.type!=gt.kl.curse),p.current=p.current-(P-p.cards.length)}next(){this.checkShuffle(this.game.monsterAttackModifierDeck),this.checkShuffle(this.game.allyAttackModifierDeck),this.game.figures.forEach(p=>{p instanceof x.z&&this.checkShuffle(p.attackModifierDeck)})}draw(){this.shuffleModifiers(this.game.monsterAttackModifierDeck),this.shuffleModifiers(this.game.allyAttackModifierDeck),this.game.figures.forEach(p=>{p instanceof x.z&&this.shuffleModifiers(p.attackModifierDeck)})}checkShuffle(p){p.cards.some((P,M)=>M<=p.current&&P.shuffle)&&this.shuffleModifiers(p)}buildCharacterAttackModifierDeck(p){const P=new gt.ut;let M=0;if(p.perks.forEach(y=>{y.cards&&y.cards.forEach((S,U)=>{if(y.type==I.Ib.add||y.type==I.Ib.replace){let V=Object.assign(new gt.YY(S.attackModifier.type,S.attackModifier.value,S.attackModifier.valueType),S.attackModifier);V.id="perk"+M,V.shuffle=S.attackModifier.shuffle||!1,(!this.findByAttackModifier(gt.UO,V)||y.type==I.Ib.add||U>0)&&(V.character=!0),this.findByAttackModifier(P.attackModifiers,V)||(M++,P.attackModifiers.push(V))}})}),p.progress&&p.progress.perks&&p.progress.perks.forEach((y,S)=>{const U=p.perks[S];if(U)if(U.combined)y==U.count&&this.addPerkCard(U,P,gt.UO);else for(let V=0;V"gh"==y.edition&&"101"==y.name)){let y=P.cards.find(S=>S.id==gt.kl.minus1);y&&(P.cards.splice(P.cards.indexOf(y),1),y=P.cards.find(S=>S.id==gt.kl.minus1),y&&P.cards.splice(P.cards.indexOf(y),1))}if(p.progress.equippedItems.find(y=>"toa"==y.edition&&"107"==y.name)){const y=P.cards.find(S=>S.id==gt.kl.minus2);y&&P.cards.splice(P.cards.indexOf(y),1)}if(p.progress.equippedItems.find(y=>"fh"==y.edition&&"11"==y.name)){const y=P.cards.find(S=>S.id==gt.kl.minus1);y&&P.cards.splice(P.cards.indexOf(y),1)}if(p.progress.equippedItems.find(y=>"fh"==y.edition&&"41"==y.name)){const y=P.cards.find(U=>U.id==gt.kl.plus0);y&&P.cards.splice(P.cards.indexOf(y),1);const S=P.cards.find(U=>U.id==gt.kl.minus1);S&&P.cards.splice(P.cards.indexOf(S),1)}return P}buildTownGuardAttackModifierDeck(p,P){const M=gt.fQ.map(U=>U.clone()),y=new gt.ut(M);y.attackModifiers.push(...gt.Bt);let S=0;return P.townGuardPerks.forEach(U=>{const V=U.perk;V.cards&&V.cards.forEach(($,ut)=>{if(V.type==I.Ib.add||V.type==I.Ib.replace){let pt=Object.assign(new gt.YY($.attackModifier.type,$.attackModifier.value,$.attackModifier.valueType),$.attackModifier);pt.id="perk"+S,(!this.findByAttackModifier(M,pt)||V.type==I.Ib.add||ut>0)&&(pt.character=!0),this.findByAttackModifier(y.attackModifiers,pt)||(S++,y.attackModifiers.push(pt))}})}),p.townGuardPerkSections&&P.townGuardPerks.forEach(U=>{const V=U.perk;if(!V)return;const $=U.sections.filter(ut=>-1!=p.townGuardPerkSections.indexOf(ut)).length;if(V.combined)$==V.count&&this.addPerkCard(V,y,M);else for(let ut=0;ut<$;ut++)this.addPerkCard(V,y,M)}),p.scenarios.forEach(U=>{const V=Y.scenarioManager.scenarioDataForModel(U);V&&V.rewards&&V.rewards.townGuardAm&&V.rewards.townGuardAm.forEach(($,ut)=>{let pt=y.attackModifiers.find(Vt=>Vt.id==$);pt?y.cards.push(pt.clone()):console.warn("Unknown Town Guard AM:",$)})}),p.conclusions.forEach(U=>{const V=Y.scenarioManager.sectionDataForModel(U);V&&V.rewards&&V.rewards.townGuardAm&&V.rewards.townGuardAm.forEach(($,ut)=>{let pt=y.attackModifiers.find(Vt=>Vt.id==$);pt?y.cards.push(pt.clone()):console.warn("Unknown Town Guard AM:",$)})}),y}addPerkCard(p,P,M){if(p.cards=p.cards||[],p.cards.forEach((y,S)=>{(!this.findByAttackModifier(M,y.attackModifier)||p.type==I.Ib.add||p.type==I.Ib.replace&&S>=this.replaceCount(p))&&(y.attackModifier.character=!0)}),p.type==I.Ib.add)this.addCards(P,p.cards);else if(p.type==I.Ib.remove)this.removeCards(P,p.cards);else if(p.type==I.Ib.replace){const y=this.replaceCount(p);y&&(this.removeCards(P,p.cards.slice(0,y)),this.addCards(P,p.cards.slice(y,p.cards.length)))}}replaceCount(p){let P=0;return p.type==I.Ib.replace&&(P=1,p.cards.forEach((M,y,S)=>{let U=S.slice(0,y+1).map(V=>V.count).reduce((V,$)=>V+$);yV.count).reduce((V,$)=>V+$)&&(U=y+1)})),P}findByAttackModifier(p,P,M=!1){return p.find(y=>{let S=Object.assign(new gt.YY(P.type,P.value,P.valueType),P);S.id="",S.revealed=!1,S.shuffle=P.shuffle||!1;let U=Object.assign(new gt.YY(y.type,y.value,y.valueType),y);return U.id="",U.revealed=!1,U.shuffle=y.shuffle||!1,M&&U.character&&(U.character=!1),JSON.stringify(S)==JSON.stringify(U)})}addCards(p,P){P.forEach(M=>{for(let y=0;y{for(let y=0;yy.id==P);if(M||(M=gt.UO.find(y=>y.id==P),M||(M=gt.jB.find(y=>y.id==P)),M||(M=this.getAllAdditional().find(y=>y.id==P)),M||(M=gt.fQ.find(y=>y.id==P)),M))return JSON.parse(JSON.stringify(M))}fromModel(p,P){P.current!=p.current&&(p.current=P.current),P.cards=P.cards.map(M=>("scenario-reward-55-0"==M?M="fh-tg-add-plus50-algox":"scenario-reward-56-0"==M||"scenario-reward-57-0"==M?M="fh-tg-add-plus50":"scenario-reward-58-0"==M||"scenario-reward-59-0"==M?M="fh-tg-add-plus50-unfettered":"scenario-reward-60-0"==M?M="fh-tg-add-plus50-lurkers":"conclusion-reward-50.2-0"==M&&(M="fh-tg-add-plus20"),M)),p.cards=P.cards.map(M=>this.cardById(p,M)||new gt.YY(gt.kl.invalid,0,gt.tI.default,M)),p.disgarded=P.disgarded||[],p.active=P.active}}var _t=E(2736),H=E(9310),Jt=E(3157),bt=E(8272),Tt=E(4004);class Rt{constructor(p){(0,t.Z)(this,"game",void 0),(0,t.Z)(this,"xpMap",[0,45,95,150,210,275,345,420,500]),this.game=p}characterIcon(p){const P=Y.getCharacterData(p);return P.iconUrl?P.iconUrl:P.icon?"./assets/images/character/icons/"+P.icon+".svg":"./assets/images/character/icons/"+P.edition+"-"+P.name+".svg"}characterIdentityIcon(p,P){const M=Y.getCharacterData(p);return M.identities&&0!=M.identities.length?"./assets/images/character/icons/"+M.edition+"-"+M.name+"-"+M.identities[P]+".svg":this.characterIcon(p)}characterName(p,P=!1){let M=Q.r.getLabel("data.character."+p.name),y=!1;return p.identities.length>0&&Q.r.settings.characterIdentities?p.title&&p.title.split("|")[p.identity]&&p.title.split("|")[p.identity]?(M=p.title.split("|")[p.identity],y=!0):Q.r.settings.characterIdentityHint&&!P&&(M+=" ("+Q.r.getLabel("data.character."+p.name+"."+p.identities[p.identity])+")"):p.title&&(M=p.title,y=!0),P&&y&&(M+=" ("+Q.r.getLabel("data.character."+p.name)+")"),M}characterColor(p){let P;return P=p instanceof G.x3?p:Y.getCharacterData(p),P.color}characterThumbnail(p){return p.thumbnailUrl?p.thumbnailUrl:p.thumbnail?"./assets/images/character/thumbnail/"+p.thumbnail+".png":"./assets/images/character/thumbnail/"+p.edition+"-"+p.name+".png"}characterCount(){return this.game.playerCount>0?this.game.playerCount:this.game.figures.filter(p=>p instanceof x.z&&!p.absent).length}addCharacter(p,P){if(!this.game.figures.some(M=>M instanceof x.z&&M.name==p.name&&M.edition==p.edition)){let M=new x.z(p,P);for(M.availableSummons.filter(y=>y.special).forEach(y=>this.createSpecialSummon(M,y)),M.number=1;Y.game.figures.some(y=>y instanceof x.z&&y.number==M.number);)M.number++;this.game.party.retirements&&this.game.party.retirements.forEach(y=>{y.number==M.number&&M.progress.retirements++}),0==M.progress.gold&&(Y.fhRules()?M.progress.gold=10*Y.prosperityLevel()+20:Y.editionRules("jotl")||(M.progress.gold=15*(M.level+1))),M.tags.push("new-character"),this.game.figures.push(M),Y.addEntityCount(M),this.game.state==dt.D2.next&&Y.attackModifierManager.shuffleModifiers(M.attackModifierDeck),Y.sortFigures(M)}this.game.levelCalculation&&Y.levelManager.calculateScenarioLevel()}removeCharacter(p,P=!1){if(this.game.figures.splice(this.game.figures.indexOf(p),1),P&&Q.r.settings.applyRetirement&&(Y.game.party.prosperity+=Y.fhRules()?2:1),p.marker){const M=p.edition+"-"+p.name;this.game.figures.forEach(y=>{y instanceof x.z?(y.markers.splice(y.markers.indexOf(M),1),y.summons&&y.summons.forEach(S=>{S.markers.splice(S.markers.indexOf(M),1)})):y instanceof et.CH?y.markers.splice(y.markers.indexOf(M),1):y instanceof X.Q&&y.entities.forEach(S=>{S.markers.splice(S.markers.indexOf(M),1)})})}this.game.levelCalculation&&Y.levelManager.calculateScenarioLevel()}addSummon(p,P){p.summons=p.summons.filter(M=>M.name!=P.name||M.number!=P.number||M.color!=P.color),p.summons.push(P)}removeSummon(p,P){p.summons.splice(p.summons.indexOf(P),1)}addObjective(p=void 0,P=void 0,M=void 0){const y=Y.game.figures.filter(V=>V instanceof et.CH).length;let S=y%12;if(y<12)for(;this.game.figures.some(V=>V instanceof et.CH&&V.id==S);)S++;let U=new et.CH((0,Tt.Z)(),S,M);return p&&(p.id&&-1!=p.id&&(U.id=p.id),U.marker=p.marker,U.tags=p.tags,U.name=p.name,P&&(U.name=P),U.maxHealth=p.health,U.health=(0,Jt.j9)(""+p.health),U.escort=p.escort,p.initiative&&(U.initiative=p.initiative)),this.game.figures.push(U),Y.addEntityCount(U),Y.sortFigures(U),U}removeObjective(p){this.game.figures.splice(this.game.figures.indexOf(p),1)}addXP(p,P,M=!0){p.progress.experience+=P,M&&this.xpMap.forEach((y,S)=>{p.progress.experience>=y&&(SS.level==P);M?p.stat=M:(p.errors=p.errors||[],!p.errors.find(S=>S.type==K.r.unknown)&&!p.errors.find(S=>S.type==K.r.stat)&&(console.error("No character stat found for level: "+P),p.errors.push(new K.o(K.r.stat,"character",p.name,p.edition,"",""+P))),p.stat=new _t.a(P,0)),p.level=P;const y=p.health==p.maxHealth;p.maxHealth=p.stat.health,"shackles"==p.name&&"fh"==p.edition&&2==p.progress.perks[11]&&(p.maxHealth+=5),p.progress.equippedItems.find(S=>"fh"==S.edition&&"3"==S.name)&&(p.maxHealth+=1,p.health+=1),(p.health>p.maxHealth||y)&&(p.health=p.maxHealth),p.availableSummons.filter(S=>S.special).forEach(S=>this.createSpecialSummon(p,S)),(p.progress.experience=Y.characterManager.xpMap[P])&&(p.progress.experience=Y.characterManager.xpMap[P-1]),this.game.levelCalculation&&Y.levelManager.calculateScenarioLevel()}createSpecialSummon(p,P){if(p.summons=p.summons.filter(M=>M.name!=P.name||0!=M.number||M.color!=bt.mp.custom),!P.level||P.level<=p.level){let M=new bt.eU((0,Tt.Z)(),P.name,P.cardId,p.level,0,bt.mp.custom,P);M.state=bt.HY.true,M.init=!1,this.addSummon(p,M)}}ignoreNegativeItemEffects(p){let P=p.perks.find(M=>M.custom&&(-1!=M.custom.indexOf("%game.custom.perks.ignoreNegativeItem%")||-1!=M.custom.indexOf("%game.custom.perks.ignoreNegativeItemFh%")));if(P){const M=p.perks.indexOf(P);return p.progress.perks[M]&&P.combined?p.progress.perks[M]==P.count:p.progress.perks[M]>0}return!1}ignoreNegativeScenarioffects(p){let P=p.perks.find(M=>M.custom&&(-1!=M.custom.indexOf("%game.custom.perks.ignoreNegativeScenario%")||-1!=M.custom.indexOf("%game.custom.perks.ignoreScenario%")));if(P){const M=p.perks.indexOf(P);return p.progress.perks[M]&&P.combined?p.progress.perks[M]==P.count:p.progress.perks[M]>0}return!1}itemEffect(p){return"gh"==p.edition?-1!=[16,38,52,101,103,108].indexOf(p.id):"cs"==p.edition?-1!=[157,71].indexOf(p.id):"toa"==p.edition?-1!=[101,107].indexOf(p.id):"fh"==p.edition&&-1!=[3,11,41,60,132,138,178].indexOf(p.id)}applyDonations(p){for(let P=0;P!S.rolling&&!this.game.figures.find(U=>U instanceof x.z&&U.attackModifierDeck.cards.find(V=>V.id==S.id))),y=gt.jB.filter(S=>S.rolling&&!this.game.figures.find(U=>U instanceof x.z&&U.attackModifierDeck.cards.find(V=>V.id==S.id)));M.length>0&&Y.attackModifierManager.addModifier(p.attackModifierDeck,M[Math.floor(Math.random()*M.length)]),y.length>0&&Y.attackModifierManager.addModifier(p.attackModifierDeck,y[Math.floor(Math.random()*y.length)])}else Y.attackModifierManager.addModifier(p.attackModifierDeck,new gt.YY(gt.kl.bless)),Y.attackModifierManager.addModifier(p.attackModifierDeck,new gt.YY(gt.kl.bless));p.donations=0}next(){this.game.figures.forEach(p=>{p instanceof x.z?(p.initiative=0,p.initiativeVisible=!1,p.off=!1,Q.r.settings.characterAttackModifierDeckPermanent||(p.attackModifierDeckVisible=!1),p.lootCardsVisible=!1,p.longRest=!1,p.summons=p.summons.filter(P=>Y.entityManager.isAlive(P)),p.summons.forEach(P=>{P.state==bt.HY.new&&(P.state=bt.HY.true)}),p.progress.equippedItems.find(P=>"cs"==P.edition&&"57"==P.name)&&Y.entityManager.hasCondition(p,new H.gP(H.fT.wound))&&!Y.entityManager.hasCondition(p,new H.gP(H.fT.regenerate))&&Y.entityManager.addCondition(p,new H.gP(H.fT.regenerate),p.active,p.off)):p instanceof et.CH&&(p.off=!1)})}draw(){1==this.game.round&&this.game.figures.forEach(p=>{p instanceof x.z&&(this.applyDonations(p),p.initiativeVisible=!0)}),this.game.figures.forEach(p=>{(p instanceof x.z||p instanceof et.CH)&&Y.entityManager.isAlive(p)&&(!(p instanceof x.z)||!p.absent)&&(p.off=!1)})}personalQuestByCard(p,P){return Y.editionData.filter(M=>M.edition==p||-1!=Y.editionExtensions(p).indexOf(M.edition)).flatMap(M=>M.personalQuests).find(M=>M.cardId==P||M.altId==P||M.altId=="0"+P)}}var Dt=E(1240),Ht=E(5861),jt=E(7484),wt=E(3329),Zt=E(3306);class qt{constructor(p){(0,t.Z)(this,"game",void 0),(0,t.Z)(this,"permissions",void 0),(0,t.Z)(this,"ws",void 0),(0,t.Z)(this,"undos",[]),(0,t.Z)(this,"redos",[]),(0,t.Z)(this,"undoInfos",[]),(0,t.Z)(this,"lastSaveTimestamp",void 0),(0,t.Z)(this,"hasUpdate",!1),(0,t.Z)(this,"installPrompt",null),(0,t.Z)(this,"lastAction","update"),(0,t.Z)(this,"updateBlocked",!1),(0,t.Z)(this,"serverError",!1),(0,t.Z)(this,"errorLog",[]),(0,t.Z)(this,"backupError",void 0),(0,t.Z)(this,"permissionBackup",void 0),(0,t.Z)(this,"connectionTries",0),(0,t.Z)(this,"gameOffsetWarning",!0),(0,t.Z)(this,"standeeDialogCanceled",!1),(0,t.Z)(this,"keyboardSelecting",!1),(0,t.Z)(this,"keyboardSelect",-1),(0,t.Z)(this,"undoPermission",!1),(0,t.Z)(this,"redoPermission",!1),(0,t.Z)(this,"characterPermissions",{}),(0,t.Z)(this,"monsterPermissions",{}),(0,t.Z)(this,"wakeLock",null),(0,t.Z)(this,"scenarioSummary",!1),(0,t.Z)(this,"storageBlocked",!1),(0,t.Z)(this,"autoBackupTimeout",null),this.game=p,this.lastSaveTimestamp=(new Date).getTime()}init(p=!1){var P=this;return(0,Ht.Z)(function*(){try{const y=yield Zt.j.readGameModel();y.server=!1,P.game.fromModel(y)}catch{p||Zt.j.writeGameModel(P.game.toModel())}P.updateBlocked=!1,Q.r.settings.serverUrl&&Q.r.settings.serverPort&&Q.r.settings.serverPassword&&(Q.r.settings.serverAutoconnect?P.connect():(Y.stateManager.updateBlocked=!0,Y.stateManager.permissions=new jt.P,P.updatePermissions())),P.loadStorage();const M=P.undos.length+P.redos.length-P.undoInfos.length;for(let y=0;y{(!Q.r.settings.serverUrl||!Q.r.settings.serverPort||!Q.r.settings.serverPassword)&&(P.permissions=void 0,P.updateBlocked=!1),P.updatePermissions()}}),Y.uiChange.emit()})()}install(){var p=this;return(0,Ht.Z)(function*(){p.installPrompt&&(p.installPrompt.prompt(),yield Y.stateManager.installPrompt.userChoice,p.installPrompt=null)})()}loadStorage(){var p=this;return(0,Ht.Z)(function*(){try{p.undos=yield Zt.j.readAll("undo"),p.redos=yield Zt.j.readAll("redo"),p.undoInfos=yield Zt.j.readAll("undo-infos"),p.updatePermissions()}catch{p.updatePermissions()}})()}saveStorage(){var p=this;return(0,Ht.Z)(function*(){p.storageBlocked||(p.storageBlocked=!0,yield Zt.j.writeArray("undo",p.undos),yield Zt.j.writeArray("redo",p.redos),yield Zt.j.writeArray("undo-infos",p.undoInfos),p.storageBlocked=!1)})()}buildWsUrl(p,P,M){let y=P.split("/");const S=y[0];let U="";return y.length>1&&(U="/"+y.splice(1,y.length+1).join("/")),U=p+S+":"+M+U,U}connect(){Q.r.settings.serverUrl&&Q.r.settings.serverPort&&Q.r.settings.serverPassword&&(this.disconnect(),this.connectionTries++,this.ws=new WebSocket(this.buildWsUrl(Q.r.settings.serverWss?"wss://":"ws://",Q.r.settings.serverUrl,Q.r.settings.serverPort)),this.ws.onmessage=this.onMessage,this.ws.onopen=this.onOpen,this.ws.onclose=this.onClose,this.ws.onerror=this.onError)}disconnect(){this.permissions=void 0,this.updatePermissions(),this.ws&&this.ws.readyState!=WebSocket.CLOSED&&this.ws.close()}onMessage(p){try{const P=JSON.parse(p.data);switch(Y.stateManager.updateBlocked=!1,P.type){case"game":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let M=P.payload;Y.game.revision>M.revision&&(Y.stateManager.before(),Zt.j.addBackup(Y.game.toModel()),console.warn("An older revision was loaded from server, created a backup of previous state."),Y.stateManager.saveLocal(),Y.stateManager.before("serverSyncEmpty"));const y=P.undoinfo;y&&(y.length>0&&"serverSync"==y[0]?Y.stateManager.before("serverSync",...y.slice(1)):Y.game.revision-(Y.game.revisionOffset||0){window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1;break;case"game-undo":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let S=P.payload;if(null!=P.revision){const $=P.revision||0;let ut=0,pt=Y.stateManager.undos.splice(Y.stateManager.undos.length-1,1)[0];for(pt&&pt.revision-(pt.revisionOffset||0)>$&&(Y.stateManager.redos.push(pt),ut++);pt&&pt.revision-(pt.revisionOffset||0)>$;)pt=Y.stateManager.undos.splice(Y.stateManager.undos.length-1,1)[0],pt&&pt.revision-(pt.revisionOffset||0)>$&&(Y.stateManager.redos.push(pt),ut++);(!pt||pt.revision-(pt.revisionOffset||0)!=$)&&Y.stateManager.undoInfos.splice(Y.stateManager.undos.length-Y.stateManager.redos.length,0,P.undoinfo?"serverSync"==P.undoinfo[0]?P.undoinfo:["serverSync",...P.undoinfo]:["serverSync"]),Y.stateManager.redos.splice(Y.stateManager.redos.length-ut,0,Y.game.toModel())}else{Y.stateManager.redos.push(Y.game.toModel());const $=Y.stateManager.undos[Y.stateManager.undos.length-1];$&&$.revision-$.revisionOffset==Y.game.revision-Y.game.revisionOffset-1?Y.stateManager.undos.splice(Y.stateManager.undos.length-1,1):Y.stateManager.undoInfos.splice(Y.stateManager.undoInfos.length-Y.stateManager.redos.length,0,P.undoinfo?["serverSync",...P.undoinfo]:["serverSync"])}Y.game.fromModel(S),Y.stateManager.saveLocal(),Y.stateManager.saveStorage(),Y.uiChange.emit(!0),setTimeout(()=>{window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1;break;case"game-redo":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let U=P.payload;if(null!=P.revision){const $=P.revision||0;let ut=0,pt=Y.stateManager.redos.splice(Y.stateManager.redos.length-1,1)[0];for(pt&&pt.revision-(pt.revisionOffset||0)<$?(Y.stateManager.undos.push(pt),ut++):pt&&pt.revision-(pt.revisionOffset||0)>$&&Y.stateManager.redos.push(pt);pt&&pt.revision-(pt.revisionOffset||0)<$;)pt=Y.stateManager.redos.splice(Y.stateManager.redos.length-1,1)[0],pt&&pt.revision-(pt.revisionOffset||0)<$&&(Y.stateManager.undos.push(pt),ut++);(!pt||pt.revision-(pt.revisionOffset||0)!=$)&&Y.stateManager.undoInfos.splice(Y.stateManager.undos.length+ut,0,P.undoinfo?"serverSync"==P.undoinfo[0]?P.undoinfo:["serverSync",...P.undoinfo]:["serverSync"]),Y.stateManager.undos.splice(Y.stateManager.undos.length-ut,0,Y.game.toModel())}else{Y.stateManager.undos.push(Y.game.toModel());const $=Y.stateManager.redos.length>0?Y.stateManager.redos[Y.stateManager.redos.length-1]:void 0;$&&$.revision-$.revisionOffset==Y.game.revision-Y.game.revisionOffset+1?Y.stateManager.redos.splice(Y.stateManager.redos.length-1,1):Y.stateManager.undoInfos.splice(Y.stateManager.undoInfos.length-Y.stateManager.redos.length,0,P.undoinfo&&["serverSync",...P.undoinfo]||["serverSync"])}Y.game.fromModel(U),Y.stateManager.saveLocal(),Y.stateManager.saveStorage(),Y.uiChange.emit(!0),setTimeout(()=>{window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1;break;case"game-update":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let V=P.payload;Y.game.revision==V.revision&&(Y.game.playSeconds=V.playSeconds,Y.game.server=V.server,Y.stateManager.saveLocal(),Y.uiChange.emit(!0),setTimeout(()=>{window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1);break;case"requestUpdate":Y.stateManager.after(1,!1,0,"game-update"),Y.stateManager.serverError=!1;break;case"settings":if(window.document.body.classList.add("server-sync"),Q.r.settings.serverSettings){let $=P.payload;$.automaticAttackModifierFullscreen=Q.r.settings.automaticAttackModifierFullscreen,$.autoBackup=Q.r.settings.autoBackup,$.autoBackupFinish=Q.r.settings.autoBackupFinish,$.autoBackupUrl=Q.r.settings.autoBackupUrl,$.autoscroll=Q.r.settings.autoscroll,$.automaticTheme=Q.r.settings.automaticTheme,$.barsize=Q.r.settings.barsize,$.backupHint=Q.r.settings.backupHint,$.browserNavigation=Q.r.settings.browserNavigation,$.characterAttackModifierAnimate=Q.r.settings.characterAttackModifierAnimate,$.characterAttackModifierDeckPermanent=Q.r.settings.characterAttackModifierDeckPermanent,$.characterAttackModifierDeckPermanentActive=Q.r.settings.characterAttackModifierDeckPermanentActive,$.characterItemsPermanent=Q.r.settings.characterItemsPermanent,$.characterItemsPermanentActive=Q.r.settings.characterItemsPermanentActive,$.characterItemsPermanentEquipped=Q.r.settings.characterItemsPermanentEquipped,$.characterItemsPermanentSorted=Q.r.settings.characterItemsPermanentSorted,$.characterItemsPermanentZoom=Q.r.settings.characterItemsPermanentZoom,$.characterCompact=Q.r.settings.characterCompact,$.characterSheetCompact=Q.r.settings.characterSheetCompact,$.debugRightClick=Q.r.settings.debugRightClick,$.disableAnimations=Q.r.settings.disableAnimations,$.disableArtwork=Q.r.settings.disableArtwork,$.disableColumns=Q.r.settings.disableColumns,$.disableDragFigures=Q.r.settings.disableDragFigures,$.disablePinchZoom=Q.r.settings.disablePinchZoom,$.disableWakeLock=Q.r.settings.disableWakeLock,$.dragValues=Q.r.settings.dragValues,$.fhStyle=Q.r.settings.fhStyle,$.fontsize=Q.r.settings.fontsize,$.globalFontsize=Q.r.settings.globalFontsize,$.fullscreen=Q.r.settings.fullscreen,$.hints=Q.r.settings.hints,$.portraitMode=Q.r.settings.portraitMode,$.pressDoubleClick=Q.r.settings.pressDoubleClick,$.serverAutoconnect=Q.r.settings.serverAutoconnect,$.serverPassword=Q.r.settings.serverPassword,$.serverPort=Q.r.settings.serverPort,$.serverSettings=Q.r.settings.serverSettings,$.serverUrl=Q.r.settings.serverUrl,$.serverWss=Q.r.settings.serverWss,$.showAllSections=Q.r.settings.showAllSections,$.showBossMonster=Q.r.settings.showBossMonster,$.showHiddenMonster=Q.r.settings.showHiddenMonster,$.showOnlyUnfinishedScenarios=Q.r.settings.showOnlyUnfinishedScenarios,$.statAnimations=Q.r.settings.statAnimations,$.theme=Q.r.settings.theme,$.tooltips=Q.r.settings.tooltips,$.zoom=Q.r.settings.zoom,Q.r.setSettings(Object.assign(new wt.Z,$)),Zt.j.write("settings","default",Q.r.settings),setTimeout(()=>{window.document.body.classList.remove("server-sync")},1)}Y.stateManager.serverError=!1;break;case"permissions":Y.stateManager.permissions=P.payload||void 0,Y.stateManager.permissionBackup=Y.stateManager.permissions&&JSON.parse(JSON.stringify(Y.stateManager.permissions))||void 0,Y.stateManager.updatePermissions(),Y.stateManager.serverError=!1;break;case"error":console.warn("[GHS] Error: ",P),(P.message.startsWith("Permission(s) missing")||P.message.startsWith("invalid revision"))&&("redo"==Y.stateManager.lastAction||"update"==Y.stateManager.lastAction?Y.stateManager.undo(!1):"undo"==Y.stateManager.lastAction&&Y.stateManager.redo(!1)),P.message&&P.message.startsWith("Invalid password")&&(console.warn("Disconnect..."),p.target?.close()),Y.stateManager.serverError=!1,window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")}}catch(P){Y.stateManager.errorLog.push(p.data),Y.stateManager.serverError=!0,console.error("[GHS] "+p.data,P),window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")}}onOpen(p){const P=p.target;if(P&&P.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword){Y.stateManager.connectionTries=0,Y.stateManager.updateBlocked=!1,Y.stateManager.permissions=Y.stateManager.permissionBackup;let M={password:Q.r.settings.serverPassword,type:"request-game",payload:Y.game.toModel()};P.send(JSON.stringify(M)),Q.r.settings.serverSettings&&P.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"request-settings"})),Y.stateManager.updatePermissions()}}onClose(p){Y.game.server=!1,Y.stateManager.updateBlocked=!0,Y.stateManager.permissions=new jt.P,Y.stateManager.updatePermissions(),Y.uiChange.emit()}onError(p){Y.game.server=!1,Y.stateManager.updateBlocked=!0,Y.stateManager.permissions=new jt.P,Y.stateManager.updatePermissions(),Y.uiChange.emit()}forceUpdateState(){Y.stateManager.updateBlocked=!1,Y.stateManager.permissions=Y.stateManager.permissionBackup,Y.stateManager.updatePermissions(),Y.uiChange.emit()}requestSettings(){this.ws&&this.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword&&Q.r.settings.serverSettings&&this.ws.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"request-settings"}))}wsState(){return Q.r.settings.serverUrl&&Q.r.settings.serverPort&&Q.r.settings.serverPassword?this.ws&&this.ws.readyState||-1:-99}reset(){Zt.j.addBackup(Y.game.toModel());const p=this.game.revision;this.game=new dt.lA,this.game.revision=p,Zt.j.clear("game"),Zt.j.clear("undo"),Zt.j.clear("redo"),Zt.j.clear("undo-infos")}saveLocal(){Zt.j.writeGameModel(this.game.toModel()),this.lastSaveTimestamp=(new Date).getTime()}saveSettings(){this.ws&&this.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword&&Q.r.settings.serverSettings&&this.ws.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"settings",payload:Q.r.settings}))}updatePermissions(){this.undoPermission=this.hasUndo()&&(!this.permissions||!this.updateBlocked),this.redoPermission=this.hasRedo()&&(!this.permissions||!this.updateBlocked),this.characterPermissions={},Y.game.figures.forEach(p=>{p instanceof x.z&&(this.characterPermissions[p.name+"|"+p.edition]=!this.permissions||this.permissions&&(this.permissions.characters||this.permissions.character.some(P=>P.name==p.name&&P.edition==p.edition)))}),this.monsterPermissions={},Y.game.figures.forEach(p=>{p instanceof X.Q&&(this.monsterPermissions[p.name+"|"+p.edition]=!this.permissions||this.permissions&&(this.permissions.monsters||this.permissions.monster.some(P=>P.name==p.name&&P.edition==p.edition)))})}before(...p){window.document.body.classList.add("working"),this.addToUndo(p||[])}after(p=1,P=!1,M=1,y="game",S=0,U=1){var V=this;return(0,Ht.Z)(function*(){if(V.game.revision+=M,V.saveLocal(),V.ws&&V.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword){window.document.body.classList.add("server-sync");let $=V.undoInfos[V.undos.length-1];"game-undo"==y&&($=V.undoInfos[V.undos.length+U-1]);let ut={password:Q.r.settings.serverPassword,type:y,payload:V.game.toModel(),undoinfo:$,revision:S,undolength:U};V.ws.send(JSON.stringify(ut))}(P||Q.r.settings.autoBackup>0&&(V.game.revision+V.game.revisionOffset)%Q.r.settings.autoBackup==0)&&(yield V.autoBackup()),p&&!Q.r.settings.disableAnimations?setTimeout(()=>{V.lastAction="update",Y.uiChange.emit(),window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},p):(V.lastAction="update",Y.uiChange.emit(),window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync"))})()}autoBackup(p="",P=!1){var M=this;return(0,Ht.Z)(function*(){if(!M.autoBackupTimeout)if(M.storageBlocked)M.autoBackupTimeout=setTimeout(()=>{M.autoBackupTimeout=null,M.autoBackup()},100);else{window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");try{let y=yield Zt.j.datadump();if(p||(p="ghs-autobackup-"+(new Date).toISOString()+".json"),!P&&Q.r.settings.autoBackupUrl&&Q.r.settings.autoBackupUrl.url)try{M.backupError=void 0;let S=new XMLHttpRequest;S.open(Q.r.settings.autoBackupUrl.method,Q.r.settings.autoBackupUrl.url.replaceAll("{FILENAME}",p),!0,Q.r.settings.autoBackupUrl.username,Q.r.settings.autoBackupUrl.password);let U=JSON.stringify(y);Q.r.settings.autoBackupUrl.fileUpload?(U=new FormData,U.append(p,new File([JSON.stringify(y)],p,{type:"application/json"}))):S.setRequestHeader("Content-Type","application/json"),Q.r.settings.autoBackupUrl.authorization&&S.setRequestHeader("Authorization",Q.r.settings.autoBackupUrl.authorization),S.send(U),S.addEventListener("error",V=>{M.backupError=-1,console.warn("Could not post autobackup",Q.r.settings.autoBackupUrl,V)}),S.addEventListener("readystatechange",V=>{S.readyState===XMLHttpRequest.DONE&&S.status>=400&&(M.backupError=S.status,console.warn("Could not post autobackup",Q.r.settings.autoBackupUrl,S.status,S.responseText))})}catch(S){M.backupError=-1,console.warn("Could not post autobackup",Q.r.settings.autoBackupUrl,S)}else{let S=document.createElement("a");S.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(y))),S.setAttribute("download",p),document.body.appendChild(S),S.click(),document.body.removeChild(S)}}catch{console.warn("Could not create autobackup")}window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")}})()}addToUndo(p){if(this.game.toModel()!=this.undos[this.undos.length-1]){this.undos.push(this.game.toModel());const P=Zt.j.db?Q.r.settings.maxUndo:Math.min(Q.r.settings.maxUndo,50);this.undos.length>P&&this.undos.splice(0,this.undos.length-P),this.undoInfos.splice(this.undoInfos.length-this.redos.length,this.redos.length),this.undoInfos.push(p),this.undoInfos.length>this.undos.length&&this.undoInfos.splice(0,this.undoInfos.length-this.undos.length),this.redos.length>5&&Zt.j.addBackup(this.redos[0]),this.redos=[],this.saveStorage()}}hasUndo(){return this.undos.length>0}undo(p=!0){this.fixedUndo(1,p)}fixedUndo(p,P=!0){if(p>0&&p<=this.undos.length){window.document.body.classList.add("working"),this.redos.push(this.game.toModel());const M=Y.game.revision,y=Y.game.revisionOffset+p-1,S=this.undos.splice(this.undos.length-p,p);for(let V=S.length-1;V>0;V--)this.redos.push(S[V]);this.game.fromModel(S[0]),this.game.revision=M,this.game.revisionOffset=y+2,this.saveStorage(),P?this.after(1,!1,1,"game-undo",S[0].revision-(S[0].revisionOffset||0),p):Y.uiChange.emit(),this.lastAction="undo"}}hasRedo(){return this.redos.length>0}redo(p=!0){this.fixedRedo(1,p)}fixedRedo(p,P=!0){if(p>0&&p<=this.redos.length){window.document.body.classList.add("working"),this.undos.push(this.game.toModel());const M=Y.game.revision,y=Y.game.revisionOffset-p+1,S=this.redos.splice(this.redos.length-p,p);for(let V=S.length-1;V>0;V--)this.undos.push(S[V]);this.game.fromModel(S[0]),this.game.revision=M,this.game.revisionOffset=y,this.saveStorage(),P?this.after(1,!1,1,"game-redo",S[0].revision-(S[0].revisionOffset||0),p):Y.uiChange.emit(),this.lastAction="undo"}}clearUndos(){this.undoInfos.splice(0,this.undoInfos.length-this.redos.length),this.undos=[],this.saveStorage()}clearRedos(){this.undoInfos.splice(this.undos.length,this.undoInfos.length),this.redos=[],this.saveStorage()}savePermissions(p,P){this.ws&&this.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword&&this.ws.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"permissions",payload:{permissions:P,password:p}}))}}var Wt=E(7227),Ie=E(4968),ue=E(5601),We=E(1975);class ve{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}entities(p,P=!1){let M=[];return p instanceof x.z||p instanceof et.CH?this.isAlive(p,P)&&M.push(p):(p instanceof X.Q||p instanceof ue.k)&&(M=p.entities.filter(y=>this.isAlive(y,P)||!P&&y.dormant)),M}entitiesAll(p,P=!0,M=!1){let y=[];return p instanceof x.z&&(!P||this.isAlive(p,M))?(y.push(p),y.push(...p.summons.filter(S=>!P||this.isAlive(S,M)))):p instanceof et.CH&&(!P||this.isAlive(p,M))?y.push(p):(p instanceof X.Q||p instanceof ue.k)&&y.push(...p.entities.filter(S=>!P||this.isAlive(S,M))),y}getIndexedEntities(){let p=[];return this.game.figures.forEach(P=>{P instanceof x.z?(p.push({entity:P,figure:P}),P.summons.forEach(M=>{p.push({entity:M,figure:P})})):(P instanceof X.Q||P instanceof ue.k)&&P.entities.forEach(M=>{p.push({entity:M,figure:P})})}),p}getIndexForEntity(p){let P=-1;return this.getIndexedEntities().forEach((M,y)=>{M.entity!=p||(P=y)}),P}isAlive(p,P=!1){return!(p.health<=0&&(0,Jt.j9)(p.maxHealth)>0&&!p.entityConditions.find(M=>M.highlight&&-1!=M.types.indexOf(H.CP.apply))||P&&p.entityConditions.find(M=>M.name==H.fT.stun&&M.state!=H.tT.new&&M.lastState!=H.tT.new&&M.state!=H.tT.removed)||(p instanceof x.z?p.exhausted||p.absent:p instanceof et.CH?p.exhausted:p instanceof Ie.g?p.dead||p.dormant||P&&p.summon==bt.HY.new:p instanceof bt.eU?p.dead||p.dormant||P&&p.state==bt.HY.new:!(p instanceof We.W)||p.dead||p.dormant))}checkHealth(p,P){const M=(0,Jt.j9)(p.maxHealth);p.health>M&&(p.health=M),p.health<0&&(p.health=0),0==p.health&&!p.entityConditions.find(y=>Q.r.settings.applyConditions&&Q.r.settings.activeApplyConditions&&y.highlight&&-1!=y.types.indexOf(H.CP.apply)&&-1==Q.r.settings.activeApplyConditionsExcludes.indexOf(y.name))&&(!(p instanceof x.z||p instanceof et.CH)||p.off&&p.exhausted?(p instanceof Ie.g||p instanceof bt.eU||p instanceof We.W)&&!p.dead&&(p.dead=!0,setTimeout(()=>{Y.uiChange.emit()},Q.r.settings.disableAnimations?0:1500)):(p.off=!0,p.exhausted=!0)),p.health>0&&((p instanceof x.z||p instanceof et.CH)&&p.exhausted?(p.off=!1,p.exhausted=!1):(p instanceof Ie.g||p instanceof bt.eU||p instanceof We.W)&&p.dead&&(p.dead=!1))}changeHealth(p,P,M){this.changeHealthHighlightConditions(p,P,M),p.health+=M,this.checkHealth(p,P)}changeHealthHighlightConditions(p,P,M){if(Q.r.settings.applyConditions){p.entityConditions.filter(S=>S.name==H.fT.poison||S.name==H.fT.poison_x).forEach(S=>{S.highlight=M<0&&!S.expired&&S.state!=H.tT.new&&p.health+M>0&&!this.isImmune(p,P,S.name)});const y=p.entityConditions.find(S=>!S.expired&&S.state!=H.tT.new&&!S.permanent&&S.name==H.fT.regenerate&&!this.isImmune(p,P,S.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(S.name));if(y&&M<0&&(y.expired=!0),this.sufferDamageHighlightConditions(p,P,M),y&&p.entityConditions.find(S=>!S.expired&&S.state!=H.tT.new&&S.name==H.fT.ward&&S.highlight&&!this.isImmune(p,P,S.name))&&(y.expired=!1),p.health+M>p.health){const S=p.entityConditions.find(V=>-1!=V.types.indexOf(H.CP.clearHeal)&&V.state!=H.tT.expire&&V.state!=H.tT.new&&!V.expired&&!this.isImmune(p,P,V.name));let U=p.entityConditions.find(V=>V.name==H.fT.heal);S&&(!U||U.expired||!U.highlight)&&(U||(U=new H.hT(H.fT.heal,M),p.entityConditions.push(U)),U.expired=!1,U.highlight=!0,U.value=M)}}}sufferDamageHighlightConditions(p,P,M){if(Q.r.settings.applyConditions){const y=p.entityConditions.find(U=>!U.expired&&U.state!=H.tT.new&&U.name==H.fT.ward&&!this.isImmune(p,P,U.name)),S=p.entityConditions.find(U=>!U.expired&&U.state!=H.tT.new&&U.name==H.fT.brittle&&!this.isImmune(p,P,U.name));if(M<0&&y&&!S&&p.health+M-Math.floor(M/2)>0?(y.value=-1*M,y.highlight=!0):y&&(y.highlight=!1),S&&!y&&M<0&&p.health+M>0?(S.value=-1*M,S.highlight=!0):S&&(S.highlight=!1),S&&y&&(S.highlight=!1,y.highlight=!1,M<0&&(S.expired=!0,y.expired=!0)),M<0&&p instanceof Ie.g&&P instanceof X.Q){let U=p.entityConditions.find(V=>V.name==H.fT.shield);(!U||U.expired||!U.highlight)&&(U||(U=new H.hT(H.fT.shield,0),p.entityConditions.push(U)),U.value=0,Y.monsterManager.calcActionHints(P,p).forEach($=>{U&&$.type==Wt.Us.shield&&(U.value+=$.value)}),U.value&&p.health+M+U.value>0&&(U.expired=!1,U.highlight=!0))}}}hasCondition(p,P,M=!1){return p.entityConditions.some(y=>y.name==P.name&&y.state!=H.tT.removed&&!y.expired&&(!M||y.permanent))}activeConditions(p,P=!1,M=!1){return p.entityConditions.filter(y=>(!y.expired||P&&-1!=y.types.indexOf(H.CP.expiredIndicator))&&(M||-1==y.types.indexOf(H.CP.hidden)))}isImmune(p,P,M){let y=!1;if(p.immunities&&-1!=p.immunities.indexOf(M))return!0;if(P instanceof X.Q&&p instanceof Ie.g){const S=P.stats.find(U=>U.level==p.level&&U.type==p.type);y=null!=S&&null!=S.immunities&&-1!=S.immunities.indexOf(M)}else if(P instanceof x.z){let S=[];P.progress.equippedItems.find(U=>"gh"==U.edition&&"38"==U.name)&&S.push(H.fT.stun,H.fT.muddle),P.progress.equippedItems.find(U=>"gh"==U.edition&&"52"==U.name)&&S.push(H.fT.poison,H.fT.wound),P.progress.equippedItems.find(U=>"gh"==U.edition&&"103"==U.name)&&S.push(H.fT.poison,H.fT.wound),P.progress.equippedItems.find(U=>"cs"==U.edition&&"57"==U.name)&&S.push(H.fT.muddle),P.progress.equippedItems.find(U=>"fh"==U.edition&&"138"==U.name)&&S.push(H.fT.disarm,H.fT.stun,H.fT.muddle),"blinkblade"==P.name&&"fh"==P.edition&&P.progress.perks[10]?S.push(H.fT.immobilize):"coral"==P.name&&"fh"==P.edition&&P.progress.perks[7]?S.push(H.fT.impair):"prism"==P.name&&"fh"==P.edition&&P.progress.perks[9]&&S.push(H.fT.wound),y=-1!=S.indexOf(M)}if(!y){if(M==H.fT.wound_x)return this.isImmune(p,P,H.fT.wound);if(M==H.fT.poison_x)return this.isImmune(p,P,H.fT.poison);if(M==H.fT.rupture)return this.isImmune(p,P,H.fT.wound);if(M==H.fT.infect)return this.isImmune(p,P,H.fT.poison);if(M==H.fT.chill)return this.isImmune(p,P,H.fT.immobilize)||this.isImmune(p,P,H.fT.muddle)}return y}addCondition(p,P,M,y,S=!1,U=!1){let V=p.entityConditions.find($=>$.name==P.name);V?(V.expired=!1,V.lastState=V.state,V.state=H.tT.normal):(V=new H.hT(P.name,P.value),p.entityConditions.push(V)),M||-1==V.types.indexOf(H.CP.expire)?M&&-1!=V.types.indexOf(H.CP.turn)?(V.lastState=V.state,V.state=H.tT.turn):M&&-1!=V.types.indexOf(H.CP.afterTurn)?V.state=H.tT.new:!M&&-1!=V.types.indexOf(H.CP.afterTurn)&&(V.lastState=H.tT.normal):(V.lastState=V.state,V.state=H.tT.expire),y&&-1!=V.types.indexOf(H.CP.turn)&&(V.lastState=V.state,V.state=H.tT.expire),V.permanent=S}removeCondition(p,P,M=!1){p.entityConditions=p.entityConditions.filter(y=>y.name!=P.name||y.permanent!=M)}applyCondition(p,P,M,y=!1){const S=p.entityConditions.find(U=>U.name==M&&!U.expired&&-1!=U.types.indexOf(H.CP.apply));if(S&&!this.isImmune(p,P,S.name)){if((S.name==H.fT.poison||S.name==H.fT.poison_x)&&(p.health-=S.value,S.highlight=!1,this.checkHealth(p,P)),S.name==H.fT.ward){p.health+=S.value,this.checkHealth(p,P);const U=Math.floor(S.value/2);p.health-=U;const V=p.entityConditions.find($=>!$.expired&&$.state!=H.tT.new&&!$.permanent&&$.name==H.fT.regenerate&&!this.isImmune(p,P,$.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf($.name));V&&U>0&&(V.expired=!0),S.value=1,S.expired=!0,S.highlight=!1,this.checkHealth(p,P)}if(S.name==H.fT.brittle&&(p.health+=S.value,this.checkHealth(p,P),p.health-=2*S.value,S.value=1,S.expired=!0,S.highlight=!1,this.checkHealth(p,P)),S.name==H.fT.shield&&(p.health+=S.value,S.expired=!0,S.highlight=!1,this.checkHealth(p,P)),S.name==H.fT.heal){const U=p.entityConditions.find($=>-1!=$.types.indexOf(H.CP.preventHeal)&&$.state!=H.tT.expire&&!$.expired&&!this.isImmune(p,P,$.name));U&&(p.health-=S.value);let V=p.entityConditions.find($=>-1!=$.types.indexOf(H.CP.clearHeal)&&$.state!=H.tT.expire&&$.state!=H.tT.new&&!$.permanent&&!$.expired);for(;V;)V.lastState=V.state,V.state=H.tT.expire,V.expired=!0,V=p.entityConditions.find($=>-1!=$.types.indexOf(H.CP.clearHeal)&&$.state!=H.tT.expire&&$.state!=H.tT.new&&!$.permanent&&!$.expired);y&&(S.highlight=!0),!U&&p.health-S.value>=(0,Jt.j9)(p.maxHealth)&&(S.highlight=!1),this.checkHealth(p,P),setTimeout(()=>{S.expired=!S.permanent,S.highlight=!1},y?1e3:0)}S.permanent&&(S.expired=!1)}}declineApplyCondition(p,P,M){const y=p.entityConditions.find(S=>S.name==M&&!S.expired&&-1!=S.types.indexOf(H.CP.apply));if(y&&(y.highlight=!1,!y.permanent)){if(y.name==H.fT.heal&&(y.expired=!0),y.name==H.fT.shield&&(y.expired=!0),y.name==H.fT.ward){const S=p.entityConditions.find(U=>!U.expired&&U.state!=H.tT.new&&!U.permanent&&U.name==H.fT.regenerate&&!this.isImmune(p,P,U.name));S&&y.value>0&&(S.expired=!0)}(y.name==H.fT.ward||y.name==H.fT.brittle)&&(y.value=1,y.expired=!0)}}restoreConditions(p){p.entityConditions.forEach(P=>{P.name==H.fT.chill&&(P.expired?P.expired=!1:P.value++),-1!=P.types.indexOf(H.CP.expire)&&P.expired&&(P.expired=!1)})}expireConditions(p){p.entityConditions.forEach(P=>{P.name==H.fT.chill&&(1!=P.value||P.permanent?P.value--:P.expired=!0)}),p.entityConditions.forEach(P=>{-1!=P.types.indexOf(H.CP.expire)&&P.state==H.tT.expire&&!P.permanent&&(P.expired=!0)})}applyConditionsTurn(p,P){const M=p.entityConditions.find(y=>!y.expired&&y.state==H.tT.normal&&y.name==H.fT.regenerate&&!this.isImmune(p,P,y.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name));if(M){const y=(0,Jt.j9)(p.maxHealth),S=p.entityConditions.every(U=>U.expired||-1==U.types.indexOf(H.CP.preventHeal)||this.isImmune(p,P,U.name))&&p.health!U.expired&&-1!=U.types.indexOf(H.CP.clearHeal)&&!U.permanent).forEach(U=>{U.expired=!0,U.lastState=U.state,U.state=H.tT.removed}),S){let U=p.entityConditions.find(V=>-1!=V.types.indexOf(H.CP.clearHeal)&&V.state!=H.tT.expire&&V.state!=H.tT.new&&!V.permanent&&!V.expired);for(;U;)U.lastState=U.state,U.state=H.tT.expire,U.expired=!0,U=p.entityConditions.find(V=>-1!=V.types.indexOf(H.CP.clearHeal)&&V.state!=H.tT.expire&&V.state!=H.tT.new&&!V.permanent&&!V.expired);M.lastState=M.state,M.state=H.tT.expire,p.health+=M.value,this.checkHealth(p,P)}M.highlight=!0,setTimeout(()=>{M.highlight=!1},1e3)}p instanceof x.z&&p.progress.equippedItems.find(y=>"fh"==y.edition&&"178"==y.name)&&p.initiative>=60&&!p.longRest&&(p.health=p.health+1,p.entityConditions.push(new H.hT(H.fT.heal,1)),this.applyCondition(p,P,H.fT.heal,!0)),p.entityConditions.filter(y=>!y.expired&&y.state==H.tT.normal&&-1!=y.types.indexOf(H.CP.turn)).forEach(y=>{!this.isImmune(p,P,y.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name)&&(y.lastState=y.state,y.state=H.tT.turn,(y.name==H.fT.wound||y.name==H.fT.wound_x)&&(p.health=p.health-y.value,p instanceof x.z&&p.progress.equippedItems.find(S=>"cs"==S.edition&&"71"==S.name)&&(p.health=p.health+y.value+1,p.entityConditions.push(new H.hT(H.fT.heal,1)),this.applyCondition(p,P,H.fT.heal,!0)),this.checkHealth(p,P),y.highlight=!0,setTimeout(()=>{y.highlight=!1,(!(p instanceof x.z)||!p.progress.equippedItems.find(S=>"cs"==S.edition&&"71"==S.name))&&(this.sufferDamageHighlightConditions(p,P,-y.value),this.checkHealth(p,P))},1e3)))}),p.entityConditions.filter(y=>!y.expired&&-1!=y.types.indexOf(H.CP.afterTurn)&&!y.permanent).forEach(y=>{y.state==H.tT.normal?(y.lastState=y.state,y.state=H.tT.turn):y.state==H.tT.new&&y.lastState!=H.tT.new&&(y.lastState=y.state,y.state=H.tT.normal)})}unapplyConditionsTurn(p,P){p.entityConditions.filter(y=>y.state==H.tT.turn&&-1!=y.types.indexOf(H.CP.turn)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name)).forEach(y=>{y.expired?y.expired=!1:(y.lastState=y.state,y.state=H.tT.normal,(y.name==H.fT.wound||y.name==H.fT.wound_x)&&(p.health=p.health+y.value,this.checkHealth(p,P)))});const M=p.entityConditions.find(y=>y.name==H.fT.regenerate&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name));if(M){const y=p.entityConditions.every(S=>-1==S.types.indexOf(H.CP.preventHeal))&&M.state==H.tT.expire;p.entityConditions.filter(S=>S.expired&&-1!=S.types.indexOf(H.CP.clearHeal)).forEach(S=>S.expired=!1),y&&(M.lastState=M.state,M.state=H.tT.normal,p.health-=M.value,this.checkHealth(p,P))}p instanceof x.z&&p.progress.equippedItems.find(y=>"fh"==y.edition&&"178"==y.name)&&p.initiative>=60&&!p.longRest&&p.entityConditions.find(y=>y.name==H.fT.heal&&1==y.value&&y.expired)&&(p.entityConditions=p.entityConditions.filter(y=>y.name!=H.fT.heal||1!=y.value||!y.expired),p.health=p.health-1)}applyConditionsAfter(p,P){p.entityConditions.filter(M=>!M.expired&&-1!=M.types.indexOf(H.CP.afterTurn)).forEach(M=>{!this.isImmune(p,P,M.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(M.name)&&(M.state==H.tT.turn?M.name==H.fT.bane&&(this.changeHealth(p,P,-10),M.expired=!0,M.highlight=!0,setTimeout(()=>{M.highlight=!1},1e3)):M.state==H.tT.normal?(M.lastState=M.state,M.state=H.tT.turn):M.state==H.tT.new&&M.lastState!=H.tT.new?(M.lastState=M.state,M.state=H.tT.normal):M.state==H.tT.new&&M.lastState==H.tT.new&&(M.lastState=H.tT.new,M.state=H.tT.normal))})}unapplyConditionsAfter(p,P){p.entityConditions.filter(M=>M.state!=H.tT.removed&&-1!=M.types.indexOf(H.CP.afterTurn)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(M.name)).forEach(M=>{M.expired?(M.name==H.fT.bane&&(p.health=p.health+10,this.checkHealth(p,P)),M.highlight=!1,M.expired=!1):M.state==H.tT.normal&&M.lastState==H.tT.new?M.state=H.tT.new:M.state==H.tT.new&&M.lastState!=H.tT.new&&(M.lastState=M.state)})}highlightedConditions(p){return p.entityConditions.filter(P=>P.highlight).sort((P,M)=>M.types.indexOf(H.CP.double)-P.types.indexOf(H.CP.double))}hasMarker(p,P){return p.markers&&-1!=p.markers.indexOf(P)}toggleMarker(p,P){this.hasMarker(p,P)?p.markers.splice(p.markers.indexOf(P),1):p.markers.push(P)}toggleActive(p,P){this.game.state==dt.D2.next&&(p.active?(P.active=!P.active,this.entities(p).every(M=>!this.isAlive(M)||!M.active)&&Y.roundManager.toggleFigure(p)):P.active?(P.active=!1,this.entities(p).every(M=>!this.isAlive(M,!0)||!M.active)&&(p.off=!0)):(p.off=!1,P.active=!0),P.active?(P.off=!1,!p.active&&this.game.figures.every(M=>!M.active)&&(p.active=!0)):P.off=!0)}undoInfos(p,P,M){let y=[];return p instanceof x.z&&P instanceof x.z?y.push(M+".char","data.character."+p.name):p instanceof bt.eU&&P instanceof x.z?y.push(M+".summon","data.character."+P.name,"data.summon."+p.name):p instanceof et.CH?y.push(M+".objective",p.title||p.name):P instanceof ue.k&&p instanceof We.W?y.push(M+".objectiveContainer",P.title||P.name||P.escort?"escort":"objective",""+p.number):P instanceof X.Q&&p instanceof Ie.g?y.push(M+".monster","data.monster."+P.name,""+p.number):P instanceof X.Q&&y.push(M+".monsterEntities","data.monster."+P.name),y}next(){this.game.figures.forEach(p=>{this.entitiesAll(p).forEach(P=>{Q.r.settings.expireConditions&&(P.entityConditions=P.entityConditions.filter(M=>!M.expired),P.entityConditions.forEach(M=>{-1!=M.types.indexOf(H.CP.expire)&&!M.permanent&&M.state==H.tT.normal&&(M.lastState=M.state,M.state=H.tT.expire)})),Q.r.settings.applyConditions&&P.entityConditions.filter(M=>-1!=M.types.indexOf(H.CP.turn)||-1!=M.types.indexOf(H.CP.afterTurn)&&!this.isImmune(P,p,M.name)).forEach(M=>{M.lastState=M.state,M.state=H.tT.normal})})})}}var _n=E(9468);class be{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}ge5PlayerOffset(){if(!this.game.ge5Player)return 0;const p=Y.characterManager.characterCount();return p<=4?0:p-3}adjustedLevel(){const p=this.game.level-this.ge5PlayerOffset()-(!this.game.solo||Y.fhRules()||Q.r.settings.alwaysFhSolo?0:1)+this.game.bonusAdjustment;return p<0?0:p>7?7:p}trap(p=-1){return(p<0||p>7)&&(p=this.game.level),2+p}experience(p=-1){return(p<0||p>7)&&(p=this.adjustedLevel()),4+2*p}loot(p=-1){(p<0||p>7)&&(p=this.adjustedLevel());let P=2+Math.floor(p/2);return p>=7&&(P=6),P}terrain(p=-1){return Q.r.settings.alwaysHazardousTerrain||Y.fhRules()?((p<0||p>7)&&(p=this.game.level),1+Math.ceil(p/3)):Math.floor(this.trap(p)/2)}scenarioLevel(){const p=Y.characterManager.characterCount();if(0==p)return 1;const P=this.game.figures.some(M=>M instanceof x.z)?this.game.figures.filter(M=>M instanceof x.z&&!M.absent).map(M=>M.level).reduce((M,y)=>M+y):1;return Math.ceil((P/p+(this.game.solo&&(Y.fhRules()||Q.r.settings.alwaysFhSolo)?1:0))/2)+(!this.game.solo||Y.fhRules()||Q.r.settings.alwaysFhSolo?0:1)+this.ge5PlayerOffset()}calculateScenarioLevel(){this.game.levelAdjustment>6?this.game.levelAdjustment=6:this.game.levelAdjustment<-6&&(this.game.levelAdjustment=-6);let p=this.scenarioLevel()+this.game.levelAdjustment;p>7?p=7:p<0&&(p=0),this.setLevel(p)}setLevel(p){if(this.game.level!=p){const P=p-this.game.level;this.game.level=p,this.game.figures.forEach(M=>{M instanceof X.Q?(M.level+=P,M.level>7?M.level=7:M.level<0&&(M.level=0),Y.monsterManager.setLevel(M,M.level)):M instanceof et.CH?M.health>(0,Jt.j9)(M.maxHealth)&&(M.health=(0,Jt.j9)(M.maxHealth)):M instanceof ue.k&&M.entities.forEach(y=>{y.health>(0,Jt.j9)(M.health)&&(M.health=(0,Jt.j9)(M.health))})})}}}var en=E(301),St=E(6223),kt=E(6441),It=E(4756);class Ut{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}createScenario(){return new It.$4(new en.tR,[],!0)}getScenario(p,P,M){return Y.scenarioData().find(y=>y.index==p&&y.edition==P&&y.group==M)}setScenario(p){if(this.game.scenario=p?new It.$4(p,p.revealedRooms,p.custom):void 0,p&&!p.custom){const P=Y.scenarioData().find(M=>M.index==p.index&&M.edition==p.edition&&M.group==p.group);if(!P)return void console.error("Could not find scenario data!");Y.roundManager.resetScenario(),this.applyScenarioData(P),Q.r.settings.scenarioRules&&Y.scenarioRulesManager.addScenarioRules(!0)}else p||Y.roundManager.resetScenario();Y.stateManager.standeeDialogCanceled=!1}finishScenario(p,P=!0,M,y=!1,S=void 0,U=!0,V=!0,$=!1){if(Y.game.finish=void 0,p){let ut=p.rewards||void 0;if(M&&M.rewards&&(ut?Object.assign(ut,M.rewards):ut=M.rewards),!$&&U&&Q.r.settings.characterSheet&&this.game.figures.forEach(pt=>{if(pt instanceof x.z&&!pt.absent){const Vt=!P||ut&&ut.ignoredBonus&&-1!=ut.ignoredBonus.indexOf("experience")?0:Y.levelManager.experience();Y.characterManager.addXP(pt,Vt+pt.experience,!y&&!S),(!ut||!ut.ignoredBonus||-1==ut.ignoredBonus.indexOf("gold"))&&(pt.progress.gold+=pt.loot*Y.levelManager.loot(),!y&&pt.lootCards&&pt.lootCards.forEach($t=>{Y.lootManager.addCharacterLoot(pt,this.game.lootDeck.cards[$t])}))}}),P&&(ut&&V&&(!$&&Q.r.settings.characterSheet&&this.game.figures.forEach(pt=>{ut&&pt instanceof x.z&&!pt.absent&&(ut.experience&&Y.characterManager.addXP(pt,ut.experience,!y&&!S),ut.gold&&(pt.progress.gold+=ut.gold),ut.perks&&(pt.progress.extraPerks+=ut.perks,pt.progress.extraPerks<0&&(pt.progress.extraPerks=0)),ut.battleGoals&&(pt.progress.battleGoals+=ut.battleGoals,pt.progress.battleGoals>18?pt.progress.battleGoals=18:pt.progress.battleGoals<0&&(pt.progress.battleGoals=0)),ut.resources&&ut.resources.forEach(Vt=>{pt.progress.loot[Vt.type]=(pt.progress.loot[Vt.type]||0)+(0,Jt.j9)(Vt.value),(pt.progress.loot[Vt.type]||0)<0&&(pt.progress.loot[Vt.type]=0)}))}),Q.r.settings.partySheet&&(ut.reputation&&(this.game.party.reputation+=ut.reputation,this.game.party.reputation>20?this.game.party.reputation=20:this.game.party.reputation<-20&&(this.game.party.reputation=-20)),ut.prosperity&&(this.game.party.prosperity+=ut.prosperity,this.game.party.prosperity>(Y.fhRules()?132:64)?this.game.party.prosperity=Y.fhRules()?132:64:this.game.party.prosperity<0&&(this.game.party.prosperity=0)),ut.morale&&(this.game.party.morale+=(0,Jt.j9)(ut.morale),this.game.party.morale>20?this.game.party.morale=20:this.game.party.morale<0&&(this.game.party.morale=0)),ut.inspiration&&(this.game.party.inspiration+=(0,Jt.j9)(ut.inspiration),this.game.party.inspiration<0&&(this.game.party.inspiration=0)),ut.reputation&&(this.game.party.reputation+=ut.reputation,this.game.party.reputation>20?this.game.party.reputation=20:this.game.party.reputation<-20&&(this.game.party.reputation=-20)),ut.globalAchievements&&this.game.party.globalAchievementsList.push(...ut.globalAchievements),ut.partyAchievements&&this.game.party.achievementsList.push(...ut.partyAchievements),ut.lostPartyAchievements&&(this.game.party.achievementsList=this.game.party.achievementsList.filter(pt=>ut&&-1==ut.lostPartyAchievements.indexOf(pt))),ut.campaignSticker&&this.game.party.campaignStickers.push(...ut.campaignSticker.map(pt=>pt.toLowerCase().replaceAll(" ","-"))),ut.itemDesigns&&ut.itemDesigns.forEach(pt=>{if(-1!=pt.indexOf("-")){const Vt=+pt.split("-")[0],$t=+pt.split("-")[1];for(let pe=Vt;pe<=$t;pe++){const Mn=Y.itemManager.getItem(pe,p.edition,!0);Mn&&(!Mn.unlockScenario||Mn.unlockScenario.edition!=p.edition||Mn.unlockScenario.name!=p.index)&&this.game.party.unlockedItems.push(new St.Jc(Mn.id+"",p.edition))}}else{let Vt=p.edition;-1!=pt.indexOf(":")&&(Vt=pt.split(":")[1]);const $t=Y.itemManager.getItem(+pt.split(":")[0],Vt,!0);$t&&(!$t.unlockScenario||$t.unlockScenario.edition!=p.edition||$t.unlockScenario.name!=p.index)&&this.game.party.unlockedItems.push(new St.Jc($t.id+"",$t.edition))}}),ut.itemBlueprints&&ut.itemBlueprints.forEach(pt=>{if(-1!=pt.indexOf("-")){const Vt=+pt.split("-")[0],$t=+pt.split("-")[1];for(let pe=Vt;pe<=$t;pe++)this.game.party.unlockedItems.push(new St.Jc(pe+"",p.edition))}else{let Vt=p.edition;-1!=pt.indexOf(":")&&(Vt=pt.split(":")[1]),this.game.party.unlockedItems.push(new St.Jc(pt,Vt))}}),ut.collectiveResources&&ut.collectiveResources.forEach(pt=>{this.game.party.loot[pt.type]=(this.game.party.loot[pt.type]||0)+(0,Jt.j9)(pt.value),(this.game.party.loot[pt.type]||0)<0&&(this.game.party.loot[pt.type]=0)}),ut.calendarSection&&ut.calendarSection.forEach(pt=>{if(pt.split("-").length>1){const Vt=pt.split("-")[0];let $t=-1;if(isNaN(+pt.split("-")[1])){if(pt.split("-")[1].length>1){const pe=pt.split("-")[1].split(":")[0],Mn=+pt.split("-")[1].split(":")[1];$t=Math.max(Y.game.party.weeks-1,0)-Math.max(Y.game.party.weeks-1,0)%20+("summer"==pe?20:10)+Mn}}else $t=Y.game.party.weeks+ +pt.split("-")[1];-1!=$t&&(Y.game.party.weekSections[$t]||(Y.game.party.weekSections[$t]=[]),Y.game.party.weekSections[$t]?.push(Vt))}})),Q.r.settings.automaticUnlocking&&ut.unlockCharacter&&-1==this.game.unlockedCharacters.indexOf(ut.unlockCharacter)&&this.game.unlockedCharacters.push(ut.unlockCharacter),ut.lootDeckCards&&ut.lootDeckCards.forEach(pt=>{const Vt=kt.F8.find($t=>$t.cardId==pt);Vt&&(Vt.type!=kt.CG.special1&&Vt.type!=kt.CG.special2||-1==Y.game.lootDeckFixed.indexOf(Vt.type))&&Y.game.lootDeckFixed.push(Vt.type)})),Y.characterManager.characterCount()<4&&!$&&!p.solo&&V&&(this.game.party.inspiration+=4-Y.characterManager.characterCount()),M&&!this.game.party.conclusions.find(pt=>pt.index==M.index&&pt.edition==M.edition&&pt.group==M.group)&&this.game.party.conclusions.push(new It._b(M.index,M.edition,M.group,!1,"",[])),Y.game.party.campaignMode&&V&&(p.conclusion?this.game.party.conclusions.find(pt=>pt.index==p.index&&pt.edition==p.edition&&pt.group==p.group)||this.game.party.conclusions.push(new It._b(p.index,p.edition,p.group,!1,"",[])):this.game.party.scenarios.push(new It._b(p.index,p.edition,p.group,p.custom,p.custom?p.name:"",p.revealedRooms)),ut&&Q.r.settings.partySheet&&ut.townGuardAm&&ut.townGuardAm.length>0))){const pt=Y.attackModifierManager.buildTownGuardAttackModifierDeck(this.game.party,Y.campaignData());Y.attackModifierManager.shuffleModifiers(pt),pt.active=!1,this.game.party.townGuardDeck=pt.toModel()}if(y)Y.scenarioManager.setScenario(p);else{if(p&&!p.conclusion&&Y.fhRules()&&!S&&Q.r.settings.partySheet&&!$&&V){p.solo||this.game.party.weeks++;const pt=Y.editionData.find($t=>$t.edition==p.edition);let Vt=[];pt&&pt.campaign&&Vt.push(...pt.campaign.weeks&&pt.campaign.weeks[this.game.party.weeks]||[]),Vt.push(...this.game.party.weekSections[this.game.party.weeks]||[]),Vt.forEach($t=>{const pe=Y.sectionData(p.edition).find(Mn=>Mn.index==$t&&Mn.group==p.group&&Mn.conclusion);if(pe){const Mn=new It.$4(pe);this.finishScenario(Mn,!0,Mn,!1,void 0,!1,V,!0)}})}P&&(!Y.game.party.campaignMode||!V&&!M)&&this.game.party.casualScenarios.push(new It._b(p.index,p.edition,p.group,p.custom,p.custom?p.name:"",p.revealedRooms)),$||(this.game.scenario=void 0,this.game.sections=[],Y.roundManager.resetScenario(),S?this.setScenario(S):this.game.figures.forEach(pt=>{pt instanceof x.z&&(pt.absent=!1)}))}}}addSection(p){this.game.sections.some(P=>P.edition==p.edition&&P.index==p.index&&P.group==p.group)||(this.applyScenarioData(p,!0),Q.r.settings.scenarioRules&&p.rules&&(p.rules.forEach((P,M)=>{P.always&&Y.scenarioRulesManager.addScenarioRule(p,P,M,!0)}),Y.scenarioRulesManager.filterDisabledScenarioRules()),this.game.sections.push(new It.$4(p,[])),Y.stateManager.standeeDialogCanceled=!1)}applyScenarioData(p,P=!1){if(Y.stateManager.standeeDialogCanceled=!0,Q.r.settings.scenarioRooms&&p.rooms&&0!=p.rooms.length){if(p.rooms.filter(M=>M.initial).forEach(M=>{this.openRoom(M,p,P)}),p.monsters){let M=Y.game.figures.filter(y=>y instanceof X.Q).map(y=>y);p.monsters.forEach(y=>{const S=y.split(":")[0],U=Y.monstersData(p.edition).find(V=>V.name==S);U&&!M.find(V=>V.name==U.name)&&M.push(new X.Q(U))}),p.monsters.forEach(y=>{const S=y.split(":")[0],U=Q.r.settings.automaticStandees&&p.rooms&&p.rooms.some(pt=>pt.monster&&pt.monster.some(Vt=>Vt.name.split(":")[0]==S)),V=Y.monsterManager.getSpawnMonsters(M),$=Q.r.settings.interactiveAbilities&&V.find(pt=>pt.name==S),ut=Q.r.settings.scenarioRules&&this.getRuleMonster(p).find(pt=>pt.name==S);if(!U&&!$&&!ut){let pt=Y.monsterManager.addMonsterByName(y,p.edition);pt&&(pt.isAlly=p.allies&&-1!=p.allies.indexOf(S)||P&&Y.game.scenario&&Y.game.scenario.allies&&-1!=Y.game.scenario.allies.indexOf(S)||!1,pt.isAllied=p.allied&&-1!=p.allied.indexOf(S)||P&&Y.game.scenario&&Y.game.scenario.allied&&-1!=Y.game.scenario.allied.indexOf(S)||!1,pt.drawExtra=p.drawExtra&&-1!=p.drawExtra.indexOf(S)||P&&Y.game.scenario&&Y.game.scenario.drawExtra&&-1!=Y.game.scenario.drawExtra.indexOf(S)||!1)}})}}else p.monsters&&p.monsters.forEach(M=>{const y=M.split(":")[0];let S=Y.monsterManager.addMonsterByName(M,p.edition);S&&(S.isAlly=p.allies&&-1!=p.allies.indexOf(y)||P&&Y.game.scenario&&Y.game.scenario.allies&&-1!=Y.game.scenario.allies.indexOf(y)||!1,S.isAllied=p.allied&&-1!=p.allied.indexOf(y)||P&&Y.game.scenario&&Y.game.scenario.allied&&-1!=Y.game.scenario.allied.indexOf(y)||!1,S.drawExtra=p.drawExtra&&-1!=p.drawExtra.indexOf(y)||P&&Y.game.scenario&&Y.game.scenario.drawExtra&&-1!=Y.game.scenario.drawExtra.indexOf(y)||!1)}),p.objectives&&p.objectives.forEach((M,y)=>{Y.objectiveManager.addObjective(M,void 0,{edition:p.edition,scenario:p.index,group:p.group,section:P,index:y})});if(Q.r.settings.addAllMonsters&&this.getMonsters(p).forEach(M=>{this.game.figures.find(y=>y instanceof it.A&&y.name==M.name&&y.edition==M.edition)||Y.monsterManager.addMonster(M,this.game.level)}),p.solo&&(Y.game.figures.forEach(M=>{M instanceof x.z&&(M.absent=M.name!=p.solo||M.edition!=p.edition)}),!Y.game.figures.some(M=>M instanceof x.z&&M.name==p.solo&&M.edition==p.edition))){const M=Y.charactersData().find(y=>y.name==p.solo&&y.edition==p.edition);M?Y.characterManager.addCharacter(M,5):console.error("Solo Scenario Character not found: '"+p.solo+"' ("+p.name+")")}if(p.lootDeckConfig){let M=JSON.parse(JSON.stringify(p.lootDeckConfig));this.game.lootDeckFixed.forEach(y=>{M[y]=1}),Y.lootManager.apply(this.game.lootDeck,M)}if(p.resetRound){const M=p.resetRound.endsWith("Keep")&&(this.game.state==dt.D2.next&&this.game.round%2==0||this.game.state==dt.D2.draw&&this.game.round%2==1)?1:0;"visible"==p.resetRound||"visibleKeep"==p.resetRound?this.game.roundResets.push(this.game.round+(this.game.state==dt.D2.draw?0:-1)-M):this.game.roundResetsHidden.push(this.game.round+(this.game.state==dt.D2.draw?0:-1)-M),this.game.round=(this.game.state==dt.D2.draw?0:1)+M}}openRoom(p,P,M){if(this.game.scenario&&(this.game.scenario.revealedRooms=this.game.scenario.revealedRooms||[],this.game.scenario.revealedRooms.push(p.roomNumber)),p.monster){let y=[];p.monster.forEach(S=>{let U=S.type;if(!U){const V=Y.characterManager.characterCount();U=V<3?S.player2:3==V?S.player3:S.player4}if(U){const V=S.name.split(":")[0],$=P.allies&&-1!=P.allies.indexOf(V)||M&&Y.game.scenario&&Y.game.scenario.allies&&-1!=Y.game.scenario.allies.indexOf(V)||!1,ut=P.allied&&-1!=P.allied.indexOf(V)||M&&Y.game.scenario&&Y.game.scenario.allied&&-1!=Y.game.scenario.allied.indexOf(V)||!1,pt=P.drawExtra&&-1!=P.drawExtra.indexOf(V)||M&&Y.game.scenario&&Y.game.scenario.drawExtra&&-1!=Y.game.scenario.drawExtra.indexOf(V)||!1,Vt=Y.monsterManager.addMonsterByName(S.name,P.edition);if(Vt&&(!Q.r.settings.disableStandees||!Vt.entities.find($t=>$t.type==U))){const $t=Y.monsterManager.spawnMonsterEntity(Vt,U,$,ut,pt);$t&&(S.marker&&($t.marker=S.marker),S.tags&&($t.tags=S.tags),S.health&&($t.health=(0,Jt.j9)(S.health)),y.push($t),($t.marker||$t.tags.length>0)&&Y.addEntityCount(Vt,$t))}}}),this.game.state==dt.D2.next&&this.game.figures.forEach(S=>{S instanceof X.Q&&(S.edition==P.edition||-1!=Y.editionExtensions(P.edition).indexOf(S.edition))&&S.entities.some(U=>-1!=y.indexOf(U))&&(S.active=S.active||!this.game.figures.some(U=>U.active),S.entities.forEach(U=>{-1!=y.indexOf(U)&&(U.active=S.active||Y.game.figures.some((V,$,ut)=>V.active&&$>ut.indexOf(S)),U.revealed=!0)}))})}p.objectives&&p.objectives.forEach(y=>{if("number"==typeof y&&y>0){const S={edition:P.edition,scenario:P.index,group:P.group,section:M,index:y-1},U=Y.objectiveDataByScenarioObjectiveIdentifier(S);U&&Y.objectiveManager.addObjective(U,void 0,S)}else if("string"==typeof y&&-1!=y.indexOf(":")){let S=y.split(":");const U=+S.splice(0,1),V=(0,Jt.j9)(S.join(":"));if(U>0&&V>0){const $={edition:P.edition,scenario:P.index,group:P.group,section:M,index:U-1},ut=Y.objectiveDataByScenarioObjectiveIdentifier($);if(ut){const pt=Y.objectiveManager.addObjective(ut,void 0,$);for(let Vt=0;Vt-1!=Q.r.settings.editions.indexOf(y.edition)).map(y=>y.scenarios).flat();return p?!P&&this.game.party.campaignMode&&M.some(y=>y.initial)?M.filter(y=>{if(y.edition!=p)return!1;if(this.game.party.scenarios.find(V=>y.index==V.index&&y.edition==V.edition&&y.group==V.group)||this.game.party.manualScenarios.find(V=>y.index==V.index&&y.edition==V.edition&&y.group==V.group))return!0;let S=!1,U=!y.requires||0==y.requires.length;return this.game.party.scenarios.forEach(V=>{const $=M.find(ut=>ut.index==V.index&&ut.edition==V.edition&&ut.group==V.group);$&&$.edition==y.edition&&$.group==y.group&&$.unlocks&&-1!=$.unlocks.indexOf(y.index)&&(S=!0)}),this.game.party.conclusions.forEach(V=>{const $=Y.sectionData(V.edition).find(ut=>ut.index==V.index&&ut.edition==V.edition&&ut.group==V.group);$&&$.edition==y.edition&&$.group==y.group&&$.unlocks&&-1!=$.unlocks.indexOf(y.index)&&(S=!0)}),U||(U=y.requires.some(V=>V.every($=>{let ut=this.game.party.scenarios.filter(pt=>pt.index==$&&(pt.edition==y.edition||-1!=Y.editionExtensions(y.edition).indexOf(pt.edition)));return ut.length>1&&ut.filter(pt=>pt.group==y.group),ut.length>1&&ut.filter(pt=>pt.edition==y.edition),ut.length>0}))),(S||y.initial)&&U}):M.filter(y=>y.edition==p):M}isBlocked(p){let P=!1,M=Y.scenarioData().filter(y=>(p.edition==y.edition||Y.editionExtensions(p.edition).indexOf(y.edition))&&y.group==p.group&&y.blocks&&-1!=y.blocks.indexOf(p.index)&&this.game.party.scenarios.find(S=>S.edition==y.edition&&S.group==y.group&&S.index==y.index));return M.length>1&&M.filter(y=>y.group==p.group),M.length>1&&M.filter(y=>y.edition==p.edition),P=M.length>0,P&&this.game.party.campaignMode}isLocked(p){return this.game.party.campaignMode&&p.requirements&&p.requirements.length>0&&p.requirements.every(P=>P.global&&P.global.some(M=>{if(M.startsWith("!"))return this.game.party.globalAchievementsList.find(y=>y.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim());if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.globalAchievementsList.find(y=>y.toLowerCase().trim()==M.toLowerCase().trim());{let y=+M.split(":")[1];return this.game.party.globalAchievementsList.forEach(S=>{S.toLowerCase().trim()==M.split(":")[0].toLowerCase().trim()&&y--}),y>0}})||P.party&&P.party.some(M=>{if(M.startsWith("!"))return this.game.party.achievementsList.find(y=>y.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim());if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.achievementsList.find(y=>y.toLowerCase().trim()==M.toLowerCase().trim());{let y=+M.split(":")[1];return this.game.party.achievementsList.forEach(S=>{S.toLowerCase().trim()==M.split(":")[0].toLowerCase().trim()&&y--}),y>0}})||P.campaignSticker&&P.campaignSticker.some(M=>{if(M.startsWith("!"))return this.game.party.campaignStickers.find(y=>y.toLowerCase().replaceAll(" ","-").trim()==M.substring(1,M.length).toLowerCase().trim());if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.campaignStickers.find(y=>y.toLowerCase().replaceAll(" ","-").trim()==M.toLowerCase().trim());{let y=+M.split(":")[1];return this.game.party.campaignStickers.forEach(S=>{S.toLowerCase().replaceAll(" ","-").trim()==M.split(":")[0].toLowerCase().trim()&&y--}),y>0}})||P.buildings&&P.buildings.some(M=>{if(M.startsWith("!"))return this.game.party.buildings.find(y=>y.name.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim()&&y.level>0);if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.buildings.find(y=>y.name.toLowerCase().trim()==M.toLowerCase().trim()&&y.level>0);{let y=+M.split(":")[1];return!this.game.party.buildings.find(S=>S.name.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim()&&S.level>=y)}}))||p.solo&&!this.game.figures.find(P=>P instanceof x.z&&P.name==p.solo&&P.level>=5)||!1}getSections(p){return Y.sectionData().filter(P=>P.edition==p.edition&&P.parent==p.index&&P.group==p.group)}availableSections(p=!1,P=!1){return this.game.scenario?this.getSections(this.game.scenario).filter(M=>(!M.conclusion||p)&&(P||!this.game.sections.find(y=>y.edition==M.edition&&y.index==M.index&&y.parent==M.parent))&&(!M.parentSections||M.parentSections.some(y=>y.every(S=>this.game.sections.find(U=>U.index==S))))&&!this.game.sections.find(y=>y.edition==M.edition&&M.blockedSections&&-1!=M.blockedSections.indexOf(y.index))).sort(this.sortScenarios):[]}getTreasures(p,P,M=!1){let y=[];return p.rooms&&p.revealedRooms&&p.revealedRooms.forEach(S=>{const U=p.rooms.find(V=>V.roomNumber==S);U&&U.treasures&&y.push(...U.treasures)}),P.forEach(S=>{S.rooms&&S.revealedRooms&&S.revealedRooms.forEach(U=>{const V=S.rooms.find($=>$.roomNumber==U);V&&V.treasures&&y.push(...V.treasures)})}),y=y.filter((S,U)=>!M||!Y.game.figures.some(V=>V instanceof x.z&&Y.lootManager.hasTreasure(V,S,U))),M&&(y=y.filter(S=>!Y.game.party.treasures.find(U=>U.name==""+S&&U.edition==p.edition))),y}getAllTreasures(p){let P=[];return p.rooms&&p.rooms.forEach(M=>{M.treasures&&P.push(...M.treasures)}),this.getSections(p).forEach(M=>{M.rooms&&M.rooms.forEach(y=>{y.treasures&&P.push(...y.treasures)})}),P}getMonsters(p){let P=[];return P.push(...this.getScenarioMonster(p,!0)),P.push(...this.getRuleMonster(p,!0)),P.push(...Y.monsterManager.getSpawnMonsters(P)),P}getScenarioMonster(p,P=!1){let M=[];M.push(p),P&&M.push(...Y.sectionData(p.edition).filter(S=>S.group==p.group&&S.parent==p.index));let y=[];return M.forEach(S=>{S.monsters&&S.monsters.forEach(U=>{const V=Y.monstersData().find($=>$.name==U.split(":")[0]&&($.edition==S.edition||-1!=Y.editionExtensions(S.edition).indexOf($.edition)));V&&-1==y.indexOf(V)&&y.push(V)})}),y}getRuleMonster(p,P=!1){let M=[];M.push(p),P&&M.push(...Y.sectionData(p.edition).filter(S=>S.group==p.group&&S.parent==p.index));let y=[];return M.forEach(S=>{S.rules&&S.rules.forEach(U=>{U.spawns&&U.spawns.forEach(V=>{const $=Y.monstersData().find(ut=>ut.name==V.monster.name.split(":")[0]&&(ut.edition==S.edition||-1!=Y.editionExtensions(S.edition).indexOf(ut.edition)));$&&-1==y.indexOf($)&&y.push($)})})}),y}sortScenarios(p,P){if(p.conclusion!=P.conclusion)return p.conclusion?1:-1;if(!isNaN(+p.index)&&!isNaN(+P.index))return+p.index-+P.index;const M=p.index.match(/(\d+)/),y=P.index.match(/(\d+)/);return M&&y?+M[0]-+y[0]:p.index.toLowerCase()this.game.scenario&&-1!=this.game.scenario.revealedRooms.indexOf(P.roomNumber)&&(p||!P.initial)):[]}closedRooms(){return this.game.scenario&&this.game.scenario.rooms?this.game.scenario.rooms.filter(p=>this.game.scenario&&-1==this.game.scenario.revealedRooms.indexOf(p.roomNumber)&&this.openRooms(!0).some(P=>P.rooms&&-1!=P.rooms.indexOf(p.roomNumber))):[]}scenarioUndoArgs(p=void 0){return(p=p||Y.game.scenario)?[p.index,"data.scenario."+p.name,p.custom?"scenario.custom":"data.edition."+p.edition]:["","",""]}scenarioDataForModel(p){if(p.isCustom){const M=new en.tR;return M.name=p.custom,M}const P=Y.scenarioData().find(M=>M.index==p.index&&M.edition==p.edition&&M.group==p.group);if(P)return JSON.parse(JSON.stringify(P));console.warn("Invalid scenario data:",p)}sectionDataForModel(p){const P=Y.sectionData().find(M=>M.index==p.index&&M.edition==p.edition&&M.group==p.group);if(P)return JSON.parse(JSON.stringify(P));console.warn("Invalid section data:",p)}toModel(p,P,M=!1,y=""){return new It._b(p.index,p.edition,p.group,M,y,JSON.parse(JSON.stringify(P)))}}var Et=E(6140),Yt=E(1235);class Ce{constructor(p){(0,t.Z)(this,"game",void 0),(0,t.Z)(this,"working",!1),(0,t.Z)(this,"firstRound",!1),this.game=p}drawAvailable(){return this.game.figures.length>0&&(this.game.state==dt.D2.next||this.game.figures.every(p=>p instanceof X.Q||p instanceof et.CH&&(p.getInitiative()>0||p.exhausted||!Q.r.settings.initiativeRequired)||p instanceof ue.k&&(p.getInitiative()>0||!Q.r.settings.initiativeRequired)||p instanceof x.z&&(p.getInitiative()>0||p.exhausted||p.absent||!Q.r.settings.initiativeRequired)))}nextGameState(p=!1){if(this.working=!0,this.game.totalSeconds+=this.game.playSeconds,this.game.playSeconds=0,Q.r.settings.scenarioRules&&Y.scenarioRulesManager.addScenarioRules(),this.game.state==dt.D2.next)this.game.state=dt.D2.draw,Y.entityManager.next(),Y.characterManager.next(),Y.monsterManager.next(),Y.attackModifierManager.next(),Q.r.settings.moveElements&&this.game.elementBoard.forEach(P=>{P.state!=Et.fq.always&&(P.state==Et.fq.strong||P.state==Et.fq.new?P.state=Et.fq.waning:P.state==Et.fq.waning&&(P.state=Et.fq.inert))}),Y.sortFigures(),this.game.figures.forEach(P=>{P.active=!1});else if((this.drawAvailable()||p)&&(this.firstRound&&(Y.attackModifierManager.draw(),Y.lootManager.draw(),this.game.scenario||(this.game.scenario=new It.$4(new en.tR,[],!0))),this.game.state=dt.D2.next,this.game.round++,Y.characterManager.draw(),Y.monsterManager.draw(),Q.r.settings.moveElements&&this.game.elementBoard.forEach(P=>{P.state==Et.fq.new&&(P.state=Et.fq.strong)}),Y.sortFigures(),this.game.figures.length>0)){let P=0,M=this.game.figures.find((y,S)=>S==P&&Y.gameplayFigure(y));for(;!M&&PS==P&&Y.gameplayFigure(y));M&&this.toggleFigure(M,!0)}Y.uiChange.emit(),setTimeout(()=>this.working=!1,1)}toggleFigure(p,P=!1){const M=this.game.figures;let y=M.indexOf(p),S=M.find(pt=>pt.active),U=S?M.indexOf(S):-1;if(!S&&M.every(pt=>pt.off))for(U=M.length-1,S=M[U];S&&!Y.gameplayFigure(S);)U--,S=-1==U?void 0:M[U];const V=p.active||!Y.objectiveManager.skipObjective(p)||P;if(-1==y)return void console.error("Invalid figure");let $=p;const ut=p.active&&(!(p instanceof x.z)||!Q.r.settings.activeSummons||!p.summons.find(pt=>pt.active));if(ut&&(this.afterTurn(p),$=M.find((pt,Vt)=>Y.gameplayFigure(pt)&&!pt.off&&Vt!=y)),V)for(;$&&Y.objectiveManager.skipObjective($);)y=M.indexOf($),this.turn($),this.afterTurn($),$=M.find((pt,Vt)=>Y.gameplayFigure(pt)&&!pt.off&&Vt!=y);if($){y=M.indexOf($);for(let pt=0;pt=U&&!Vt.off?(pt>U&&(this.beforeTurn(Vt),this.turn(Vt,!0)),this.afterTurn(Vt)):pt==y?(Vt.active||this.beforeTurn(Vt),this.turn(Vt)):!ut&&pt>y&&pt<=U&&this.beforeTurn(Vt))}}}beforeTurn(p){if(p.off||p.active?(p.off=!1,p instanceof X.Q&&p.entities.forEach(P=>{P.active=p.active&&!P.off}),Y.entityManager.entitiesAll(p,!1).forEach(P=>{if(Q.r.settings.applyConditions){const M=(P instanceof Ie.g||P instanceof bt.eU)&&P.dead;if(Y.entityManager.unapplyConditionsTurn(P,p),Y.entityManager.unapplyConditionsAfter(P,p),M&&!P.dead){const y=Y.additionalIdentifier(p,P);let S=Y.entityCounter(y);S&&S.killed--}}}),Y.entityManager.entitiesAll(p).forEach(P=>{Q.r.settings.expireConditions&&Y.entityManager.restoreConditions(P)})):p instanceof X.Q&&!p.entities.find(P=>P.active)&&p.entities.forEach(P=>{P.active=p.active,P.off=!1}),p instanceof x.z&&Q.r.settings.activeSummons&&p.summons.forEach(P=>{P.active&&(P.active=!1)}),p instanceof x.z&&p.longRest&&Q.r.settings.applyLongRest){const P=p.entityConditions.find(M=>M.name==H.fT.heal&&M.value&&M.expired);P&&(p.entityConditions=p.entityConditions.filter(M=>M!=P)),Q.r.settings.characterItems&&p.progress.equippedItems.forEach(M=>{if(M.tags){const y=Y.itemManager.getItem(+M.name,M.edition,!0);M.tags=M.tags.filter(S=>S!=Yt.CT.spent),y&&y.spent&&(M.tags=M.tags.filter(S=>S!=Yt.CT.slot&&S!=Yt.CT.slotBack))}})}p.off&&Y.entityManager.entities(p).length>0&&(p.off=!1),p.active=!1}turn(p,P=!1){if(p.active=!0,p instanceof X.Q&&!p.entities.find(M=>M.active)&&p.entities.forEach(M=>{!p.off&&M.summon!=bt.HY.new&&Y.entityManager.isAlive(M)&&(M.active=!0)}),!P&&p instanceof x.z&&Q.r.settings.activeSummons&&Y.entityManager.isAlive(p)){const M=p.summons.find(S=>Y.entityManager.isAlive(S,!0)&&S.active),y=p.summons.find((S,U,V)=>(!M||U>V.indexOf(M))&&Y.entityManager.isAlive(S,!0));p.summons.slice(M?p.summons.indexOf(M):0,y?p.summons.indexOf(y):p.summons.length).forEach((S,U,V)=>{S.active=!1,Q.r.settings.expireConditions&&Y.entityManager.expireConditions(S),Q.r.settings.applyConditions&&(!M||U>0)&&(Y.entityManager.applyConditionsTurn(S,p),Y.entityManager.applyConditionsAfter(S,p))}),y?(y.active=!0,Q.r.settings.applyConditions&&Y.entityManager.applyConditionsTurn(y,p),y.dead&&this.turn(p)):(this.game.elementBoard.forEach(S=>{S.state==Et.fq.new&&(S.state=Et.fq.strong)}),p.summons.forEach(S=>{S.active&&(S.active=!1)}))}if(this.game.elementBoard.forEach(M=>{M.state==Et.fq.new&&(M.state=Et.fq.strong)}),Q.r.settings.applyConditions&&(p instanceof x.z&&!P?!P&&!p.summons.some(M=>M.active)&&Y.entityManager.applyConditionsTurn(p,p):Y.entityManager.entitiesAll(p).forEach(M=>{Y.entityManager.applyConditionsTurn(M,p)})),p instanceof x.z&&Q.r.settings.applyLongRest&&p.longRest&&(P||!p.summons.some(M=>M.active))&&(p.health!M.expired&&-1!=M.types.indexOf(H.CP.clearHeal)&&!M.permanent))){let M=2;"lightning"==p.name&&"fh-crossover"==p.edition&&p.progress.perks[9]&&(M+=1),p.health+=M,Y.entityManager.addCondition(p,new H.gP(H.fT.heal,M),p.active||!1,p.off||!1),Y.entityManager.applyCondition(p,p,H.fT.heal,!0)}((p instanceof x.z||p instanceof et.CH)&&!Y.entityManager.isAlive(p)||p instanceof X.Q&&p.entities.every(M=>!Y.entityManager.isAlive(M))||p instanceof ue.k&&p.entities.every(M=>!Y.entityManager.isAlive(M)))&&Y.roundManager.toggleFigure(p)}afterTurn(p){if(!p.off){if(p instanceof X.Q&&p.entities.forEach(P=>{P.active=!1,P.off=!0}),Q.r.settings.activeSummons&&p instanceof x.z){let P=p.summons.find(M=>Y.entityManager.isAlive(M,!0)&&M.active);for(;P;)this.turn(p),P=p.summons.find(M=>Y.entityManager.isAlive(M,!0)&&M.active)}Y.entityManager.entitiesAll(p).forEach(P=>{Q.r.settings.expireConditions&&Y.entityManager.expireConditions(P),Q.r.settings.applyConditions&&Y.entityManager.applyConditionsAfter(P,p)})}this.game.elementBoard.forEach(P=>{P.state==Et.fq.new&&(P.state=Et.fq.strong),P.state==Et.fq.consumed&&(P.state=Et.fq.inert)}),p.off=!0,p.active=!1}resetScenario(){if(this.game.playSeconds=0,this.game.sections=[],this.game.scenario&&(this.game.scenario.revealedRooms=[]),this.game.scenarioRules=[],this.game.disgardedScenarioRules=[],this.game.round=0,this.game.roundResets=[],this.game.roundResetsHidden=[],this.game.state=dt.D2.draw,this.game.elementBoard.forEach(p=>p.state=Et.fq.inert),Y.attackModifierManager.fromModel(this.game.monsterAttackModifierDeck,(new gt.ut).toModel()),Y.attackModifierManager.fromModel(this.game.allyAttackModifierDeck,(new gt.ut).toModel()),this.game.figures=this.game.figures.filter(p=>p instanceof x.z||this.game.scenario&&this.game.scenario.custom),this.game.entitiesCounter=[],this.game.lootDeck.fromModel(new kt._8),this.game.figures.forEach(p=>{p.active=!1,p.off=!1,p instanceof x.z?(p.health=p.maxHealth,p.loot=0,p.lootCards=[],p.treasures=[],p.experience=0,p.entityConditions=[],p.summons=[],p.initiative=0,p.exhausted=!1,p.longRest=!1,p.token=0,p.battleGoal=!1,p.battleGoals=[],Y.fhRules()&&-1!=p.tags.indexOf("new-character")&&(p.progress.gold=0),p.tags=p.tags.filter(P=>"new-character"!=P),p.availableSummons.filter(P=>P.special).forEach(P=>Y.characterManager.createSpecialSummon(p,P)),p.attackModifierDeck=Y.attackModifierManager.buildCharacterAttackModifierDeck(p),p.lootCardsVisible=!1,p.progress.equippedItems=p.progress.equippedItems.filter(P=>"loot-random-item"!=P.marker),p.progress.equippedItems.forEach(P=>P.tags=[]),Y.characterManager.applyDonations(p)):p instanceof X.Q?(p.entities=[],p.ability=-1,p.abilities=[],Y.monsterManager.resetMonsterAbilities(p)):p instanceof et.CH?(p.health=(0,Jt.j9)(p.maxHealth),p.entityConditions=[]):p instanceof ue.k&&(p.entities=[])}),this.game.party.townGuardDeck){const p=Y.attackModifierManager.buildTownGuardAttackModifierDeck(this.game.party,Y.campaignData());Y.attackModifierManager.shuffleModifiers(p),p.active=!1,this.game.party.townGuardDeck=p.toModel()}Y.stateManager.standeeDialogCanceled=!1,Y.uiChange.emit()}}var me=E(9148);class wn{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}drawCard(p,P){let M;p.current++,p.current>=p.cards.length&&(p.current=p.cards.length-1);const y=p.cards[p.current];return y&&(Q.r.settings.applyLoot&&P&&(M=this.applyLoot(y,P,p.current)),y.type==kt.CG.random_item&&this.game.scenario&&this.game.party.campaignMode&&this.game.party.randomItemLooted.push(new It._b(this.game.scenario.index,this.game.scenario.edition,this.game.scenario.group))),M}applyLoot(p,P,M){let y;if(P.lootCards=P.lootCards||[],p.type==kt.CG.money||p.type==kt.CG.special1||p.type==kt.CG.special2)P.loot+=this.getValue(p);else if(p.type==kt.CG.random_item&&this.game.scenario&&this.game.party.campaignMode&&Q.r.settings.applyLootRandomItem){let S=Y.itemManager.getItems(this.game.scenario.edition,!0).filter(U=>U.random&&!Y.game.party.unlockedItems.find(V=>V.name==""+U.id&&V.edition==U.edition));if(S.length>0){let U=S[Math.floor(Math.random()*S.length)],V=new St.xb(""+U.id,U.edition);for(;S.length>0&&Y.game.party.unlockedItems.find($=>V&&$.name==V.name&&$.edition==V.edition);)S=S.filter($=>V&&($.id+""!=V.name||$.edition!=V.edition)),S.length>0?(U=S[Math.floor(Math.random()*S.length)],V=new St.xb(""+U.id,U.edition)):V=void 0;V&&(y=U)}0==S.length&&(P.loot+=3)}return P.lootCards.push(M),y}shuffleDeck(p){p.current=-1,(0,st.wE)(p.cards)}getTotal(p,P){const M=p.cards.filter(y=>y.type==P);return 0==M.length?0:M.map(y=>this.getValue(y)).reduce((y,S)=>y+S)}addCharacterLoot(p,P){const M=this.getValue(P);if(P.type==kt.CG.money||P.type==kt.CG.special1||P.type==kt.CG.special2)p.loot+=M;else if(-1!=kt.k.indexOf(P.type)){const y=p.progress.loot[P.type]||0;y+M>=0&&(p.progress.loot[P.type]=y+M)}}lootTreasure(p,P,M){let y=[];const S=Y.editionData.find(U=>U.edition==M);if(S&&S.treasures)if((P-=S.treasureOffset||0)>=0&&P{y.push(this.applyTreasureReward(p,$,M))})}else console.warn("Invalid treasure index: '"+P+"' for Edition "+M);return y}hasTreasure(p,P,M){return p.treasures.some(y=>y==P||"string"==typeof y&&(y.startsWith(P+":")||"G"==P&&y=="G-"+M))}applyTreasureReward(p,P,M){let y=[];switch(P.type){case me.Hj.gold:case me.Hj.goldFh:"number"==typeof P.value&&(p.progress.gold+=P.value);break;case me.Hj.experience:case me.Hj.experienceFh:"number"==typeof P.value&&(p.progress.experience+=P.value);break;case me.Hj.battleGoal:"number"==typeof P.value&&(p.progress.battleGoals+=P.value);break;case me.Hj.damage:"number"==typeof P.value?p.health-=P.value:"terrain"==P.value&&(p.health-=Y.levelManager.terrain()),p.health<=0&&(p.exhausted=!0,p.off=!0,p.active=!1);break;case me.Hj.heal:"number"==typeof P.value&&(p.health+=P.value,p.health>p.maxHealth&&(p.health=p.maxHealth));break;case me.Hj.loot:"number"==typeof P.value&&(p.loot+=P.value);break;case me.Hj.resource:"string"==typeof P.value&&P.value.split("+").forEach($=>{const ut=$.split("-")[0],pt=+$.split("-")[1];p.progress.loot[ut]=(p.progress.loot[ut]||0)+pt});break;case me.Hj.condition:"string"==typeof P.value&&P.value.split("+").forEach($=>{Y.entityManager.hasCondition(p,new H.gP($))||Y.entityManager.addCondition(p,new H.gP($),p.active,p.off)});break;case me.Hj.item:case me.Hj.itemDesign:case me.Hj.itemBlueprint:case me.Hj.itemFh:P.value&&(""+P.value).split("+").forEach($=>{let ut=M,pt=-1;isNaN(+$)?(pt=+$.split("-")[0],ut=$.split("-")[1]):pt=+$;const Vt=Y.itemManager.getItem(pt,ut,!0);if(Vt){const $t=new St.Jc(""+Vt.id,Vt.edition);P.type==me.Hj.item||P.type==me.Hj.itemFh?(p.progress.items.find(pe=>pe.name==$t.name&&pe.edition==$t.edition)?p.progress.gold+=Y.itemManager.itemSellValue(Vt):p.progress.items.push($t),Y.itemManager.addItemCount(Vt)):Y.game.party.unlockedItems.push($t)}});break;case me.Hj.calendarSection:if(P.value&&"string"==typeof P.value&&P.value.split("-").length>1){const $=P.value.split("-")[0],ut=Y.game.party.weeks+ +P.value.split("-")[1];Y.game.party.weekSections[ut]||(Y.game.party.weekSections[ut]=[]),Y.game.party.weekSections[ut]?.push($)}break;case me.Hj.campaignSticker:P.value&&"string"==typeof P.value&&Y.game.party.campaignStickers.push(P.value);break;case me.Hj.partyAchievement:P.value&&"string"==typeof P.value&&Y.game.party.achievementsList.push(P.value);break;case me.Hj.lootCards:if("number"==typeof P.value){Y.game.lootDeck.active=!0;for(let $=0;$ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&!Y.game.party.scenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&Y.game.party.manualScenarios.push($)}break;case me.Hj.randomScenario:let S=Y.scenarioData(M).filter($=>$.random&&!Y.game.party.manualScenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&!Y.game.party.scenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom));if(S.length>0){let $=S[Math.floor(Math.random()*S.length)],ut=({}=new It._b(""+$.index,$.edition,$.group,!1,"",[]));for(;S.length>0&&Y.game.party.manualScenarios.find(pt=>ut&&pt.index==ut.index&&pt.edition==ut.edition&&pt.group==ut.group);)S=S.filter(pt=>ut&&(pt.edition!=ut.edition||pt.index!=ut.edition||pt.group!=ut.group)),S.length>0?($=S[Math.floor(Math.random()*S.length)],ut=new It._b(""+$.index,$.edition,$.group,!1,"",[])):ut=void 0;ut&&(Y.game.party.manualScenarios.push(ut),y.push($.index,"data.scenario."+$.name))}break;case me.Hj.randomScenarioFh:let U=Y.sectionData(M).filter($=>$.conclusion&&$.random&&!Y.game.party.conclusions.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&!Y.game.party.scenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom));if(U.length>0){let $=U[Math.floor(Math.random()*U.length)],ut=({}=new It._b(""+$.index,$.edition,$.group,!1,"",[]));for(;U.length>0&&Y.game.party.conclusions.find(pt=>ut&&pt.index==ut.index&&pt.edition==ut.edition&&pt.group==ut.group);)U=U.filter(pt=>ut&&(pt.edition!=ut.edition||pt.index!=ut.edition||pt.group!=ut.group)),U.length>0?($=U[Math.floor(Math.random()*U.length)],ut=new It._b(""+$.index,$.edition,$.group,!1,"",[])):ut=void 0;ut&&(Y.game.party.conclusions.push(ut),y.push($.index,"data.section."+$.name,$.unlocks?$.unlocks.map(pt=>"%game.scenarioNumber:"+pt+"%").join(", "):""))}0==U.length&&(Y.game.party.inspiration+=1);break;case me.Hj.randomItem:case me.Hj.randomItemDesign:case me.Hj.randomItemBlueprint:let V=Y.itemManager.getItems(M,!0).filter($=>(P.type==me.Hj.randomItem||P.type==me.Hj.randomItemDesign&&$.random||P.type==me.Hj.randomItemBlueprint&&$.blueprint&&(!$.requiredBuilding||Y.game.party.buildings.find(ut=>ut.name==$.requiredBuilding&&ut.level>=$.requiredBuildingLevel)))&&!Y.game.party.unlockedItems.find(ut=>ut.name==""+$.id&&ut.edition==$.edition));if("string"==typeof P.value&&-1!=P.value.indexOf("-")){const $=+P.value.split("-")[0],ut=+P.value.split("-")[1];V=V.filter(pt=>pt.id>=$&&pt.id<=ut)}if(V.length>0){let $=V[Math.floor(Math.random()*V.length)],ut=new St.Jc(""+$.id,$.edition);for(;V.length>0&&Y.game.party.unlockedItems.find(pt=>ut&&pt.name==ut.name&&pt.edition==ut.edition);)V=V.filter(pt=>ut&&(pt.id+""!=ut.name||pt.edition!=ut.edition)),V.length>0?($=V[Math.floor(Math.random()*V.length)],ut=new St.Jc(""+$.id,$.edition)):ut=void 0;ut&&(P.type==me.Hj.randomItem?p.progress.items.push(ut):Y.game.party.unlockedItems.push(ut),y.push(""+$.id,"data.items."+$.name,$.edition))}0==V.length&&P.type==me.Hj.randomItemBlueprint&&(Y.game.party.inspiration+=1)}return y}getValue(p,P=!0){const M=Y.characterManager.characterCount();let y=p.value4P;return M<=2?y=p.value2P:3==M&&(y=p.value3P),P&&(y+=p.enhancements),y}draw(){this.shuffleDeck(this.game.lootDeck)}fullLootDeck(){let p=JSON.parse(JSON.stringify(kt.F8));return this.game.lootDeckEnhancements.forEach(P=>{if(P.enhancements>0){const M=p.find(y=>y.type==P.type&&y.value2P==P.value2P&&y.value3P==P.value3P&&y.value4P==P.value4P&&0==y.enhancements);if(!M)return void console.warn("Enhancement of non-available loot card: "+P.type+":"+P.value4P+":"+P.value3P+":"+P.value2P);p.splice(p.indexOf(M),1,JSON.parse(JSON.stringify(P)))}}),p}apply(p,P={}){p.cards=[],Object.values(kt.CG).forEach(M=>{const y=(0,st.wE)(this.fullLootDeck().filter(U=>U.type==M)),S=Math.min(Math.max(P[M]||0),y.length);if(M!=kt.CG.special1&&M!=kt.CG.special2)for(let U=0;U0){const U=y[0];p.cards.push(U),-1==this.game.lootDeckFixed.indexOf(U.type)&&this.game.lootDeckFixed.push(U.type)}else this.game.lootDeckFixed=this.game.lootDeckFixed.filter(U=>U!=M),p.cards=p.cards.filter(U=>U.type!=M)}),this.shuffleDeck(p)}randomItemLooted(){return null!=Y.game.party.randomItemLooted.find(p=>this.game.scenario&&p.index==this.game.scenario.index&&p.edition==this.game.scenario.edition&&p.group==this.game.scenario.group)}valueLabel(p){return p.value4P==p.value3P&&p.value3P==p.value2P?""+(p.value4P>0?p.value4P:""):p.value4P==p.value3P&&p.value3P!=p.value2P?"%game.loot.player.3-4% +"+p.value4P+"/%game.loot.player.2% +"+p.value2P:p.value4P!=p.value3P&&p.value3P==p.value2P?"%game.loot.player.4% +"+p.value4P+"/%game.loot.player.2-3% +"+p.value2P:"%game.loot.player.4% +"+p.value4P+"/%game.loot.player.3% +"+p.value3P+"/%game.loot.player.2% +"+p.value2P}}var xe=E(6417);class ke{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}getBattleGoalEditions(){return Y.editionData.filter(p=>-1!=Q.r.settings.editions.indexOf(p.edition)&&p.battleGoals&&p.battleGoals.length>0).map(p=>p.edition)}getBattleGoals(p=!0,P=!1){return Y.editionData.filter(M=>-1!=Q.r.settings.editions.indexOf(M.edition)&&(Y.game.edition&&Y.editionRules(M.edition)||-1!=Y.game.battleGoalEditions.indexOf(M.edition))).flatMap(M=>M.battleGoals.filter(y=>!p||!this.game.filteredBattleGoals||0==this.game.filteredBattleGoals.length||!this.game.filteredBattleGoals.find(S=>y.edition==S.edition&&y.name==S.name))).filter((M,y,S)=>P||!M.alias||!S.find(U=>M.alias&&U.edition==M.alias.edition&&U.name==M.alias.name))}getBattleGoalsForEdition(p){return Y.editionData.filter(P=>P.edition==p||-1!=Y.editionExtensions(p).indexOf(p)).flatMap(P=>P.battleGoals)}getBattleGoal(p){return this.getBattleGoals(void 0,!0).find(P=>P.edition==p.edition&&P.name==p.name)}drawBattleGoal(p){const P=this.getBattleGoals().filter(y=>!this.game.figures.find(S=>S instanceof x.z&&S.battleGoals&&S.battleGoals.find(U=>y.edition==U.edition&&y.name==U.name)));let M=P[Math.floor(Math.random()*P.length)];p.battleGoals=p.battleGoals||[],p.battleGoals.push(new St.xb(M.name,M.edition))}}class Ft{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}addObjective(p=void 0,P=void 0,M=void 0){let y=Y.game.figures.find(S=>S instanceof ue.k&&(!M&&p&&!S.objectiveId&&S.name==p.name&&S.health==(0,Jt.j9)(""+p.health)&&S.escort==p.escort&&S.initiative==(p.initiative||99)||M&&S.objectiveId&&Y.objectiveDataByScenarioObjectiveIdentifier(M)==Y.objectiveDataByScenarioObjectiveIdentifier(S.objectiveId)));return y||(y=new ue.k((0,Tt.Z)(),M),p&&(y.marker=p.marker,y.name=p.name,P&&(y.name=P),y.health=(0,Jt.j9)(""+p.health),y.escort=p.escort,p.initiative&&(y.initiative=p.initiative)),this.game.figures.push(y)),Y.addEntityCount(y),Y.sortFigures(y),this.addObjectiveEntity(y,void 0,p),y}removeObjective(p){const P=this.game.figures.indexOf(p);-1!=P&&this.game.figures.splice(P,1)}addObjectiveEntity(p,P=void 0,M=void 0){if(!P||p.entities.find(S=>S.number==P)){const S=p.entities.filter(U=>Y.entityManager.isAlive(U)).length;if(P=S%12,S<12)for(;p.entities.find(U=>U.number-1==P);)P++}let y=new We.W((0,Tt.Z)(),P+1,p,M&&M.marker||p.marker);return M&&(y.tags=M.tags),p.entities.push(y),p.off&&(p.off=!1),y}removeObjectiveEntity(p,P){p.entities.splice(p.entities.indexOf(P),1),(0==p.entities.length||p.entities.every(M=>!Y.entityManager.isAlive(M)))&&(p.off||Y.game.state!=dt.D2.next?this.removeObjective(p):p.active?Y.roundManager.toggleFigure(p):this.removeObjective(p))}objectiveEntityCountIdentifier(p,P){return"all"!=P.type&&(P.name!=p.name||P.edition!=p.edition)||"objective"!=P.type?0:p.entities.filter(M=>Y.entityManager.isAlive(M)&&(!P.marker||P.marker==M.marker)&&(!P.tags||0==P.tags.length||P.tags.every(y=>-1!=M.tags.indexOf(y)))).length}skipObjective(p){if(p instanceof ue.k&&!p.escort){if(!p.objectiveId)return!0;{const P=Y.objectiveDataByScenarioObjectiveIdentifier(p.objectiveId);if(!P||!P.actions||0==P.actions.length)return!0}}return!1}}class Oe{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}itemEditions(p=void 0){return Y.editionData.filter(P=>-1!=Q.r.settings.editions.indexOf(P.edition)&&(!p||p==P.edition||-1!=Y.editionExtensions(p).indexOf(P.edition)||"fh"==p&&"gh"==P.edition)&&P.items&&P.items.length>0).flatMap(P=>P.edition)}getItems(p,P=!1){return Y.itemData().filter(M=>P&&M.edition==p||this.isItemAvailable(M,p))}isItemAvailable(p,P,M=!0){if(!this.game.party.campaignMode||!P||(p.edition==P||-1!=Y.editionExtensions(P).indexOf(p.edition))&&(M&&this.game.party.unlockedItems.find(y=>y.name==""+p.id&&y.edition==p.edition)||p.unlockProsperity>0&&p.unlockProsperity<=Y.prosperityLevel()||p.unlockScenario&&this.game.party.scenarios.find(y=>p.unlockScenario&&y.index==p.unlockScenario.name&&y.edition==p.unlockScenario.edition)||!p.blueprint&&!p.random&&p.requiredBuilding&&"alchemist"!=p.requiredBuilding&&this.game.party.buildings&&this.game.party.buildings.find(y=>y.name==p.requiredBuilding&&y.level>=p.requiredBuildingLevel)))return!0;if(Q.r.settings.fhGhItems&&Y.fhRules()){if("gh"==p.edition){const y=this.game.party.buildings&&this.game.party.buildings.find(S=>"trading-post"==S.name&&"wrecked"!=S.state);if(y){if(y.level>=2&&-1!=[21,37,53,93,94,106,115].indexOf(p.id))return!0;if(y.level>=3&&-1!=[46,83,84,85,86,87,88,102,110,111,120,121,122,123,126,128].indexOf(p.id))return!0;if(y.level>=4&&-1!=[17,35,47,51,62,74,77,78,79,80,81,82,117,118,119,127,129,131].indexOf(p.id))return!0}return-1!=[10,25,72,105,109,116].indexOf(p.id)}if("fc"==p.edition){let y=[];this.game.party.scenarios.find(S=>"fh"==S.edition&&"82"==S.index&&!S.group)&&y.push(153,159,161),this.game.party.buildings&&this.game.party.buildings.find(S=>"enhancer"==S.name&&4==S.level&&"wrecked"!=S.state)&&y.push(154,155,157,163)}}return!1}getItem(p,P,M){return Y.itemData(void 0,!0).find(y=>y&&y.id==p&&y.edition==P&&(M||this.isItemAvailable(y,P)))}maxItemIndex(p){return Math.max(...this.getItems(p,!0).map(P=>P.id))}pricerModifier(){return this.game.party.reputation>=0?-1*Math.ceil((Y.game.party.reputation-2)/4):-1*Math.floor((Y.game.party.reputation+2)/4)}assigned(p){return this.game.figures.filter(P=>P instanceof x.z&&P.progress&&P.progress.items).map(P=>P).map(P=>P.progress&&P.progress.items).reduce((P,M)=>P&&M&&P.concat(M)).filter(P=>p&&P.name==""+p.id&&P.edition==p.edition).length}owned(p,P){return null!=P.progress.items.find(M=>p&&M.name==""+p.id&&M.edition==p.edition)}canAdd(p,P){return p.count&&this.countAvailable(p)>0&&!P.progress.items.find(M=>p&&M.name==""+p.id&&M.edition==p.edition)||!1}canBuy(p,P,M=0){return(!Y.game.party.campaignMode||!Y.fhRules()||-1!=P.tags.indexOf("new-character")||this.game.party.buildings&&this.game.party.buildings.find(y=>"trading-post"==y.name&&y.level>=1&&"wrecked"!=y.state))&&p.cost&&p.cost+this.pricerModifier()+M<=P.progress.gold&&this.canAdd(p,P)||!1}canCraft(p,P,M={}){let y=!1,S=!0;return p.resources&&Object.keys(p.resources).forEach(U=>{const V=U,$=(p.resources[V]||0)+(M[V]||0);$>0&&(y=!0),S=(0,kt.tH)(V)==kt.XA.herb_resources?S&&((P.progress.loot[V]||0)>=$||(Y.game.party.loot[V]||0)>=$):S&&(P.progress.loot[V]||0)>=$}),p.requiredItems&&p.requiredItems.forEach(U=>{if(U!=p.id){const V=this.getItem(U,p.edition,!0);V?(y=!0,this.owned(V,P)||(S=S&&(this.canCraft(V,P,p.resources||{})||this.canBuy(V,P,p.cost)))):console.error("Missing required item '"+U+"' for item '"+p.id+"' ("+p.name+")")}}),S&&y}itemSellValue(p){if(p.cost)return Math.floor(p.cost/2);{let P=0;return p.resources&&(Object.keys(p.resources).forEach(M=>{P+=2*(p.resources[M]||0)}),p.requiredItems&&p.requiredItems.forEach(()=>{P+=2})),P}}addItem(p,P){P.progress.items.push(new St.xb(p.id+"",p.edition))}buyItem(p,P){P.progress.gold-=p.cost+this.pricerModifier(),P.progress.items.push(new St.xb(p.id+"",p.edition))}craftItemResources(p,P){p.resources&&Object.keys(p.resources).forEach(M=>{const y=M,S=p.resources[y]||0;(0,kt.tH)(y)==kt.XA.herb_resources?(P.progress.loot[y]||0)>=S?P.progress.loot[y]=(P.progress.loot[y]||0)-S:this.game.party.loot[y]=(this.game.party.loot[y]||0)-S:P.progress.loot[y]=(P.progress.loot[y]||0)-S}),p.requiredItems&&p.requiredItems.forEach(M=>{if(M!=p.id){const y=this.getItem(M,p.edition,!0);if(y){if(y){const S=P.progress.items.find(U=>U.name==""+y.id&&U.edition==y.edition);if(S){const U=P.progress.items.indexOf(S);P.progress.items.splice(U,1),P.progress.equippedItems=P.progress.equippedItems.filter(V=>V.name!=""+y.id||V.edition!=y.edition)}else this.canBuy(y,P)?P.progress.gold-=p.cost+this.pricerModifier():this.craftItemResources(y,P)}}else console.error("Missing required item '"+M+"' for item '"+p.id+"' ("+p.name+")")}})}craftItem(p,P){this.craftItemResources(p,P),P.progress.items.push(new St.xb(p.id+"",p.edition))}removeItem(p,P){const M=P.progress.items.find(y=>y.name==""+p.id&&y.edition==p.edition);if(M){const y=P.progress.items.indexOf(M);P.progress.items.splice(y,1),P.progress.equippedItems=P.progress.equippedItems.filter(S=>S.name!=""+p.id||S.edition!=p.edition)}}sellItem(p,P){const M=P.progress.items.find(y=>y.name==""+p.id&&y.edition==p.edition);if(M&&this.itemSellValue(p)){const y=P.progress.items.indexOf(M);P.progress.gold+=this.itemSellValue(p),P.progress.items.splice(y,1),P.progress.equippedItems=P.progress.equippedItems.filter(S=>S.name!=""+p.id||S.edition!=p.edition)}}addItemCount(p){if(this.game.party.campaignMode){const P=Y.itemManager.assigned(p);if(Y.itemManager.countAvailable(p)+P+S.name==p.id&&S.edition==p.edition);y?(y.count+=1,y.count==p.count&&(y.count=-1)):Y.game.party.unlockedItems.push(new St.Jc(""+p.id,p.edition,1))}}}countAvailable(p){if(!Y.itemManager.getItems(p.edition).find(y=>y.id==p.id&&y.edition==p.edition))return-1;const M=this.assigned(p);if(!this.isItemAvailable(p,p.edition,!1)){const y=Y.game.party.unlockedItems.find(S=>+S.name==p.id&&S.edition==p.edition);if(y&&y.count>0)return y.count-M<0&&console.warn("More items assigend than available:",p),y.count-M}return p.count-M<0&&console.warn("More items assigend than available:",p),p.count-M}isEquipped(p,P){return null!=P.progress.equippedItems.find(M=>M.name==""+p.id&&M.edition==p.edition)}toggleEquippedItem(p,P,M){let y=P.progress.equippedItems.map(U=>this.getItem(+U.name,U.edition,!0)).filter(U=>U).map(U=>U);const S=y.indexOf(p);if(M&&-1==S)y.push(p);else if(M)y.splice(S,1);else if(-1!=S){y.splice(S,1);const U=Math.ceil(P.level/2),V=y.filter($=>$.slot==Yt.SE.small).length;if(16==p.id&&"gh"==p.edition&&V>=U)for(let $=0;$pt.slot==Yt.SE.small);ut&&y.splice(y.indexOf(ut),1)}}else{const U="drifter"==P.name&&"fh"==P.edition&&P.progress.perks[11];if(p.slot==Yt.SE.small){let V=Math.ceil(P.level/2);if(y.find($=>16==$.id&&"gh"==$.edition||60==$.id&&"fh"==$.edition)&&(V+=2),y.find($=>132==$.id&&"fh"==$.edition)&&(V+=1),y.filter($=>$.slot==p.slot).length>=V){const $=y.find(ut=>ut.slot==p.slot);$&&y.splice(y.indexOf($),1)}}else if(p.slot==Yt.SE.onehand){const V=y.find($=>$.slot==Yt.SE.twohand);if(V&&!U&&(y=y.filter($=>$.slot!=Yt.SE.twohand)),y.filter($=>$.slot==p.slot).length>(U?V?0:2:1)){const $=y.find(ut=>ut.slot==p.slot);$&&y.splice(y.indexOf($),1)}}else if(p.slot==Yt.SE.twohand)if(y=y.filter(V=>V.slot!=p.slot),U)for(;y.filter(V=>V.slot==Yt.SE.onehand).length>1;){const V=y.find($=>$.slot==Yt.SE.onehand);V&&y.splice(y.indexOf(V),1)}else y=y.filter(V=>V.slot!=Yt.SE.onehand);else y=y.filter(V=>V.slot!=p.slot);y.push(p)}P.progress.equippedItems=y.map(U=>new St.VY(U.id+"",U.edition)),P.attackModifierDeck=Y.attackModifierManager.buildCharacterAttackModifierDeck(P),3==p.id&&"fh"==p.edition&&(-1==S?P.maxHealth+=1:P.maxHealth-=1,P.health=P.maxHealth)}}class rn{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}getEventCardsForEdition(p,P){return Y.editionData.filter(M=>M.edition==P||-1!=Y.editionExtensions(P).indexOf(P)).flatMap(M=>M.events).filter(M=>M.type==p)}}class kn{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}applyRewards(p){if(p.defense&&(this.game.party.defense+=p.defense),p.loseMorale&&(this.game.party.morale-=p.loseMorale,this.game.party.morale<0&&(this.game.party.morale=0)),p.prosperity&&(this.game.party.prosperity+=p.prosperity),p.soldiers){this.game.party.soldiers+=p.soldiers;const P=this.game.party.buildings.find(M=>"barracks"==M.name);if(P){let M=0;1==P.level?M=4:2==P.level?M=6:3==P.level?M=8:4==P.level&&(M=10),this.game.party.soldiers>M&&(this.game.party.soldiers=M)}}}rewardSection(p){if(Y.game.party.conclusions.find(M=>M.edition==p.edition&&M.index==p.index&&M.group==p.group))return p;const P=Y.sectionData(p.edition).filter(M=>M.conclusion&&!M.parent&&M.parentSections&&M.parentSections.find(y=>1==y.length&&-1!=y.indexOf(p.index)));if(0!=P.length){let M;return P.forEach(y=>{M||(M=this.rewardSection(y))}),M}}}const Y=new class Me{constructor(){(0,t.Z)(this,"game",new dt.lA),(0,t.Z)(this,"editionData",[]),(0,t.Z)(this,"stateManager",void 0),(0,t.Z)(this,"entityManager",void 0),(0,t.Z)(this,"characterManager",void 0),(0,t.Z)(this,"monsterManager",void 0),(0,t.Z)(this,"objectiveManager",void 0),(0,t.Z)(this,"attackModifierManager",void 0),(0,t.Z)(this,"levelManager",void 0),(0,t.Z)(this,"scenarioManager",void 0),(0,t.Z)(this,"scenarioRulesManager",void 0),(0,t.Z)(this,"roundManager",void 0),(0,t.Z)(this,"lootManager",void 0),(0,t.Z)(this,"itemManager",void 0),(0,t.Z)(this,"battleGoalManager",void 0),(0,t.Z)(this,"eventCardManager",void 0),(0,t.Z)(this,"buildingsManager",void 0),(0,t.Z)(this,"uiChange",new _n.vpe),this.stateManager=new qt(this.game),this.entityManager=new ve(this.game),this.characterManager=new Rt(this.game),this.monsterManager=new Dt.B(this.game),this.objectiveManager=new Ft(this.game),this.attackModifierManager=new lt(this.game),this.levelManager=new be(this.game),this.scenarioManager=new Ut(this.game),this.scenarioRulesManager=new xe.L(this.game),this.roundManager=new Ce(this.game),this.itemManager=new Oe(this.game),this.lootManager=new wn(this.game),this.battleGoalManager=new ke(this.game),this.eventCardManager=new rn(this.game),this.buildingsManager=new kn(this.game),this.uiChange.subscribe({next:()=>{this.checkEntitiesKilled(),this.game.levelCalculation&&this.levelManager.calculateScenarioLevel(),Q.r.settings.scenarioRules&&this.game.round>0&&this.scenarioRulesManager.addScenarioRulesAlways(),this.roundManager.firstRound=0==this.game.round&&0==this.game.roundResets.length&&0==this.game.roundResetsHidden.length}})}editions(p=!1,P=!1){return this.editionData.filter(M=>(p||-1!=Q.r.settings.editions.indexOf(M.edition))&&(P||!M.additional)).map(M=>M.edition)}editionsData(p=!1,P=!1){const M=this.editions(p,P);return this.editionData.filter(y=>-1!=M.indexOf(y.edition))}currentEditions(p=!1){return this.game.edition?[this.game.edition,...this.editionExtensions(this.game.edition)]:this.editions(!1,p)}currentEdition(p=void 0){if(this.game.edition)return this.game.edition;if(this.game.scenario&&this.game.scenario.edition)return this.game.scenario.edition;const P=Y.game.figures.filter(M=>M instanceof x.z).map(M=>M.edition);return P.length>0&&P.every((M,y,S)=>0==y||S[y-1]==M)?P[0]:p??this.editions()[0]}editionExtensions(p,P=!1){const M=this.editionData.find(S=>S.edition==p);let y=[];return M&&M.extensions&&M.extensions.forEach(S=>{-1==y.indexOf(S)&&-1!=this.editions(P,!0).indexOf(S)&&y.push(S),this.editionExtensions(S,P).forEach(U=>{-1==y.indexOf(U)&&-1!=this.editions(P,!0).indexOf(S)&&y.push(U)})}),y}newAmStyle(p){const P=this.editionData.find(M=>M.edition==p);return!(!P||!(P.newAmStyle||P.extensions&&P.extensions.some(M=>this.newAmStyle(M))))}charactersData(p=void 0){const P=this.editionData.filter(y=>!(p&&-1==Q.r.settings.editions.indexOf(y.edition)||p&&y.edition!=p&&-1==this.editionExtensions(y.edition).indexOf(p))).flatMap(y=>y.characters),M=P.filter(y=>y.merge);return P.filter(y=>(!p||y.edition==p)&&!y.merge&&(y.replace||!y.replace&&!P.find(S=>S.replace&&S.name===y.name&&S.edition===y.edition))).map(y=>{const S=M.find(U=>U.name===y.name&&U.edition===y.edition);return S?Object.assign(new G.x3(y),S):new G.x3(y)})}monstersData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.monsters).filter((P,M,y)=>(!p||P.edition==p)&&(P.replace||!P.replace&&!y.find(S=>S.replace&&S.name==P.name&&S.edition==P.edition)))}decksData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.decks).filter(P=>!p||P.edition==p)}scenarioData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.scenarios).filter(P=>!p||P.edition==p)}sectionData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.sections).filter(P=>!p||P.edition==p)}itemData(p=void 0,P=!1){return this.editionData.filter(M=>(P||-1!=Q.r.settings.editions.indexOf(M.edition))&&(!p||M.edition==p||-1!=this.editionExtensions(M.edition,!0).indexOf(p))).flatMap(M=>M.items)}conditions(p=void 0,P=!1){if(!p)return H.G3;let M=this.editionData.filter(y=>(y.edition==p||-1!=this.editionExtensions(p).indexOf(y.edition))&&y.conditions&&y.conditions.length>0).flatMap(y=>y.conditions);return!P&&this.game.conditions&&M.push(...this.game.conditions),M.filter((y,S,U)=>U.indexOf(y)==S).map(y=>y.split(":").length>1?new H.gP(y.split(":")[0],+y.split(":")[1]):new H.gP(y))}figureConditions(p,P=void 0){let M=[];if(p instanceof x.z)p.conditions.forEach(y=>{(!y.level||y.level<=p.level)&&M.push(y.name)}),p.summons&&p.summons.forEach(y=>{y.action&&this.actionConditions(y.action).forEach(S=>{M.find(U=>U==S)||M.push(S)}),y.additionalAction&&this.actionConditions(y.additionalAction).forEach(S=>{M.find(U=>U==S)||M.push(S)})});else if(p instanceof X.Q&&P instanceof Ie.g){const y=Y.monsterManager.getStat(p,P.type),S=Y.monsterManager.getAbility(p);S&&S.actions.forEach(U=>{this.actionConditions(U,y).forEach(V=>{M.find($=>$==V)||M.push(V)})})}return M}actionConditions(p,P=void 0){let M=[];return p.type==Wt.Us.condition?M.push(p.value):P&&p.type==Wt.Us.attack&&P.actions&&P.actions.forEach(y=>{y.type==Wt.Us.condition&&M.push(y.value)}),p.subActions&&p.subActions.forEach(y=>{M.push(...this.actionConditions(y,P))}),M}objectiveDataByScenarioObjectiveIdentifier(p){const P=p.section?this.sectionData(p.edition).find(M=>M.index==p.scenario&&M.group==p.group):this.scenarioData(p.edition).find(M=>M.index==p.scenario&&M.group==p.group);if(P)if(p.section&&!P.objectives){const M=this.scenarioData(p.edition).find(y=>y.index==P.parent&&y.group==P.group);if(M&&M.objectives&&M.objectives.length>p.index)return M.objectives[p.index]}else if(P.objectives.length>p.index)return P.objectives[p.index]}conditionsForTypes(...p){return this.conditions(this.game.edition).filter(P=>p.every(M=>-1!=P.types.indexOf(M)))}allConditionsForTypes(...p){return this.conditions().filter(P=>p.every(M=>-1!=P.types.indexOf(M)))}markers(){return this.game.figures.filter(p=>p instanceof x.z&&!p.absent&&(p.marker||this.game.state==dt.D2.next&&p.active)).map(p=>p).sort((p,P)=>p.marker&&!P.marker?-1:!p.marker&&P.marker?1:0).map(p=>p.edition+"-"+p.name)}sortFigures(p=void 0){this.game.figures.sort((P,M)=>Q.r.settings.disableSortFigures?0:this.game.state==dt.D2.draw?this.sortFiguresByTypeAndName(P,M):p&&p!=P&&p!=M?0:Q.r.settings.initiativeRequired||P.getInitiative()>0&&M.getInitiative()>0?P.getInitiative()==M.getInitiative()?this.sortFiguresByTypeAndName(P,M):P.getInitiative()-M.getInitiative():P.getInitiative()>0?1:M.getInitiative()>0?-1:this.sortFiguresByTypeAndName(P,M))}sortFiguresByTypeAndName(p,P){if(p.off&&!P.off)return 1;if(!p.off&&P.off)return-1;let M=p.name.toLowerCase();p instanceof x.z?M=p.title.toLowerCase()||Q.r.getLabel("data.character."+p.name).toLowerCase():p instanceof X.Q?M=Q.r.getLabel("data.monster."+p.name).toLowerCase():(p instanceof et.CH||p instanceof ue.k)&&(M=p.title?p.title:Q.r.getLabel(p.name?"data.objective."+p.name:p.escort?"escort":"objective").toLowerCase());let y=P.name.toLowerCase();if(P instanceof x.z?y=P.title.toLowerCase()||Q.r.getLabel("data.character."+P.name).toLowerCase():P instanceof X.Q?y=Q.r.getLabel("data.monster."+P.name).toLowerCase():(P instanceof et.CH||P instanceof ue.k)&&(y=P.title?P.title:Q.r.getLabel(P.name?"data.objective."+P.name:P.escort?"escort":"objective").toLowerCase()),p instanceof x.z&&P instanceof X.Q)return-1;if(p instanceof X.Q&&P instanceof x.z)return 1;if(p instanceof x.z&&(P instanceof et.CH||P instanceof ue.k))return-1;if((p instanceof et.CH||p instanceof ue.k)&&P instanceof x.z)return 1;if(p instanceof X.Q&&(P instanceof et.CH||P instanceof ue.k))return-1;if((p instanceof et.CH||p instanceof ue.k)&&P instanceof X.Q)return 1;if(p instanceof X.Q&&P instanceof X.Q)return 0;if(p instanceof et.CH&&P instanceof et.CH&&M==y)return p.id-P.id;if(p instanceof ue.k&&P instanceof ue.k&&M==y){if(p.marker&&P.marker)return p.markerM.name==p.deck||M.name==p.name);return P||(P=this.decksData().find(M=>(M.name==p.deck||M.name==p.name)&&-1!=this.editionExtensions(p.edition).indexOf(M.edition))),P||(P=this.decksData().find(M=>(M.name==p.deck||M.name==p.name)&&M.edition==p.edition)),P||(p.errors=p.errors||[],!p.errors.find(M=>M.type==K.r.unknown)&&!p.errors.find(M=>M.type==K.r.deck)&&(console.error("Unknwon deck: "+p.name+(p.deck?"["+p.deck+"]":"")+" for "+p.edition),p.errors.push(new K.o(K.r.deck,p instanceof x.z?"character":"monster",p.name,p.edition,p.deck))),new tt.x("",[],""))}abilities(p){return this.deckData(p).abilities||[]}hasBottomAbility(p){return p&&p.bottomActions&&p.bottomActions.length>0||!1}getCharacterData(p,P=""){let M=this.charactersData().find(y=>y.name==p&&(!P||y.edition==P));return M||(M=this.charactersData().find(y=>y.name==p),M||(M=new G.x3,M.name=p,M.edition=P,M.errors=M.errors||[],M.errors.find(y=>y.type==K.r.unknown)||(console.error("unknown character '"+p+"' for edition '"+P+"'"),M.errors.push(new K.o(K.r.unknown,"character",p,P)))),M)}isCharacter(p){return p instanceof x.z}isObjective(p){return p instanceof et.CH}isMonster(p){return p instanceof X.Q}isMonsterEntity(p){return p instanceof Ie.g}isSummon(p){return p instanceof bt.eU}isObjectiveContainer(p){return p instanceof ue.k}isObjectiveEntity(p){return p instanceof We.W}toCharacter(p){return p}toObjective(p){return p}toMonster(p){return p}toMonsterEntity(p){return p}toSummon(p){return p}toObjectiveContainer(p){return p}toObjectiveEntity(p){return p}getEdition(p,P=""){const M=this.currentEdition(P);return p.edition!=M&&-1==this.editionExtensions(M).indexOf(p.edition)?p.edition:""}gameplayFigure(p){return(p instanceof X.Q||p instanceof ue.k)&&this.entityManager.entitiesAll(p,!0).length>0||p instanceof x.z&&Y.entityManager.isAlive(p)||p instanceof et.CH&&Y.entityManager.isAlive(p)}figuresByIdentifier(p,P=!1){if(p&&p.type){const M=p.type;if("all"==M)return P?this.game.figures.filter(y=>!(y instanceof x.z&&this.characterManager.ignoreNegativeScenarioffects(y))):this.game.figures;if(p.name){const y=p.edition,S=new RegExp("^"+p.name+"$");switch(M){case"monster":return this.game.figures.filter(U=>U instanceof X.Q&&(!y||U.edition==y)&&U.name.match(S)&&(!p.marker||U.entities.some(V=>V.marker==p.marker))&&(!p.tags||0==p.tags.length||U.entities.some(V=>p.tags&&p.tags.every($=>V.tags&&-1!=V.tags.indexOf($)))));case"character":return this.game.figures.filter(U=>!(!(U instanceof x.z)||U.absent||y&&U.edition!=y||!U.name.match(S)||!(!p.tags||0==p.tags.length||p.tags&&p.tags.every(V=>U.tags&&-1!=U.tags.indexOf(V)))||P&&this.characterManager.ignoreNegativeScenarioffects(U)));case"objective":return this.game.figures.filter(U=>U instanceof et.CH&&U.name.match(S)&&("escort"!=y||U.escort)&&(!p.marker||U.marker==p.marker)&&(!p.tags||0==p.tags.length||p.tags.every(V=>U.tags&&-1!=U.tags.indexOf(V)))||U instanceof ue.k&&U.name.match(S)&&("escort"!=y||U.escort)&&(!p.marker||U.entities.some(V=>V.marker==p.marker))&&(!p.tags||0==p.tags.length||U.entities.some(V=>p.tags&&p.tags.every($=>V.tags&&-1!=V.tags.indexOf($)))))}}}return[]}entitiesByIdentifier(p,P){return this.figuresByIdentifier(p,P).map(y=>y instanceof X.Q||y instanceof ue.k?y.entities:y instanceof x.z||y instanceof et.CH?y:void 0).flat().filter(y=>null!=y).map(y=>y).filter(y=>!p||(!p.marker||!(y instanceof Ie.g)||y.marker==p.marker)&&(!p.tags||0==p.tags.length||p.tags.every(S=>-1!=y.tags.indexOf(S))))}getMonsterData(p,P){let M=this.monstersData().find(y=>y.name==p&&y.edition==P);return M||(M=this.monstersData().find(y=>y.name==p),M||(M=new it.A,M.errors=M.errors||[],M.name=p,M.edition=P,M.errors.find(y=>y.type==K.r.unknown)||(console.error("unknown monster '"+p+"' for edition '"+P+"'"),M.errors.push(new K.o(K.r.unknown,"monster",p,P)))),M)}prosperityLevel(){let p=1;return(this.fhRules()?at.K8:at.Zd).forEach(M=>{this.game.party.prosperity>M&&p++}),p}fhRules(){return this.editionRules("fh")}editionRules(p,P=!0){const M=P?this.currentEdition():this.game.edition;return M&&(M==p||-1!=this.editionExtensions(M).indexOf(p))||!1}additionalIdentifier(p,P=void 0){return p instanceof x.z?new St.VY(p.name,p.edition,"character",void 0,p.tags):p instanceof et.CH?new St.VY(p.name,p.escort?"escort":"objective","objective",p.marker,p.tags):p instanceof X.Q&&P instanceof Ie.g?new St.VY(p.name,p.edition,"monster",P.marker,P.tags):p instanceof ue.k&&P instanceof We.W?new St.VY(p.name,p.escort?"escort":"objective","objective",P.marker,P.tags):new St.VY(p.name,p.edition,void 0,void 0,P&&P.tags||[])}entityCounter(p){return this.entityCounters(p)[0]||void 0}entityCounters(p){const P=new RegExp("^"+p.name+"$");return this.game.entitiesCounter.filter(M=>(!p.type||p.type==M.identifier.type)&&M.identifier.name.match(P)&&(!p.edition||p.edition==M.identifier.edition)&&(!p.marker||p.marker==M.identifier.marker)&&(!p.tags||0==p.tags.length||p.tags.every(y=>M.identifier.tags&&-1!=M.identifier.tags.indexOf(y))))}addEntityCount(p,P=void 0){const M=this.additionalIdentifier(p,P);let y=this.entityCounter(M);y||(y={identifier:M,total:0,killed:0},this.game.entitiesCounter.push(y)),y.total++}checkEntitiesKilled(){this.game.figures.forEach(p=>{p instanceof x.z||p instanceof et.CH?this.entityCounter(this.additionalIdentifier(p))||this.addEntityCount(p):(p instanceof X.Q||p instanceof ue.k)&&p.entities.forEach(P=>{this.entityManager.isAlive(P)&&!this.entityCounter(this.additionalIdentifier(p,P))&&this.addEntityCount(p,P)})}),this.game.entitiesCounter.forEach(p=>{let P=this.figuresByIdentifier(p.identifier);if(0==P.length&&p.total>p.killed)p.killed=p.total;else if(P.every(M=>M instanceof x.z||M instanceof et.CH))P=P.filter(M=>(M instanceof x.z||M instanceof et.CH)&&this.entityManager.isAlive(M)),P.length+p.killedp.total&&(console.warn("More killed then figures counted",p.identifier,"total: "+p.total,"killed: "+p.killed,"current: "+P.length),p.total=P.length+p.killed);else if(P.every(M=>M instanceof X.Q)){const M=P.map(y=>this.monsterManager.monsterEntityCountIdentifier(y,p.identifier)).reduce((y,S)=>y+S);M+p.killedp.total&&(console.warn("More killed then figures counted",p.identifier,"total: "+p.total,"killed: "+p.killed,"current: "+M),p.total=M+p.killed)}else if(P.every(M=>M instanceof ue.k)){const M=P.map(y=>this.objectiveManager.objectiveEntityCountIdentifier(y,p.identifier)).reduce((y,S)=>y+S);M+p.killedp.total&&(console.warn("More killed then figures counted",p.identifier,"total: "+p.total,"killed: "+p.killed,"current: "+M),p.total=M+p.killed)}})}nextElementState(p,P=!1,M=!1){if(Y.game.state==dt.D2.draw||M){if(p.state==Et.fq.new&&!P)return Et.fq.strong;if(p.state!=Et.fq.new&&p.state!=Et.fq.strong)return p.state==Et.fq.waning?Et.fq.inert:P?Et.fq.waning:Et.fq.new;if(!P)return Et.fq.waning}else{if(p.state==Et.fq.new&&!P)return Et.fq.strong;if(p.state==Et.fq.strong){if(P)return Et.fq.waning}else{if(p.state!=Et.fq.waning)return P?Et.fq.waning:Et.fq.new;if(P)return Et.fq.new}}return Et.fq.inert}campaignData(){const p=this.editionData.find(P=>P.edition==this.currentEdition());return p&&p.campaign?p.campaign:new at.Bj}changeParty(p){Q.r.settings.automaticTheme&&("fh"!=this.game.edition&&"fh"==p.edition?Q.r.setFhStyle(!0):"fh"==this.game.edition&&"fh"!=p.edition&&Q.r.setFhStyle(!1)),this.game.party.characters=this.game.figures.filter(P=>P instanceof x.z).map(P=>P.toModel()),this.game.party.edition=this.game.edition,this.game.party.conditions=this.game.conditions,this.game.party.battleGoalEditions=this.game.battleGoalEditions,this.game.party.filteredBattleGoals=this.game.filteredBattleGoals,this.game.party.unlockedCharacters=this.game.unlockedCharacters,this.game.party.level=this.game.level,this.game.party.levelCalculation=this.game.levelCalculation,this.game.party.levelAdjustment=this.game.levelAdjustment,this.game.party.bonusAdjustment=this.game.bonusAdjustment,this.game.party.ge5Player=this.game.ge5Player,this.game.party.playerCount=this.game.playerCount,this.game.party.solo=this.game.solo,this.game.party.lootDeckEnhancements=this.game.lootDeckEnhancements,this.game.party.lootDeckFixed=this.game.lootDeckFixed,this.game.party.lootDeckSections=this.game.lootDeckSections,this.game.party=p,this.game.edition=this.game.party.edition,this.game.conditions=this.game.party.conditions||[],this.game.battleGoalEditions=this.game.party.battleGoalEditions||[],this.game.filteredBattleGoals=this.game.party.filteredBattleGoals||[],this.game.unlockedCharacters=this.game.party.unlockedCharacters||[],this.game.level=this.game.party.level||this.game.level,this.game.levelCalculation=0!=this.game.party.levelCalculation&&(this.game.party.levelCalculation||this.game.levelCalculation),this.game.levelAdjustment=this.game.party.levelAdjustment||this.game.levelAdjustment,this.game.bonusAdjustment=this.game.party.bonusAdjustment||this.game.bonusAdjustment,this.game.ge5Player=0!=this.game.party.ge5Player&&(this.game.party.ge5Player||this.game.ge5Player),this.game.playerCount=this.game.party.playerCount||this.game.playerCount,this.game.solo=0!=this.game.party.solo&&(this.game.party.solo||this.game.solo),this.game.lootDeckEnhancements=this.game.party.lootDeckEnhancements||[],this.game.lootDeckFixed=this.game.party.lootDeckFixed||[],this.game.lootDeckSections=this.game.party.lootDeckSections||[],this.game.figures=this.game.figures.filter(P=>!(P instanceof x.z)),this.scenarioManager.setScenario(void 0),p.characters.forEach(P=>{let M=new x.z(this.getCharacterData(P.name,P.edition),P.level);M.fromModel(P),this.game.figures.push(M)})}}},1240:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>MonsterManager});var _home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(1180),_model_Game__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6565),_model_Monster__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(7177),_GameManager__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5604),_model_data_MonsterType__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4377),_model_data_MonsterStat__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(9144),_model_MonsterEntity__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4968),_model_data_MonsterData__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(7866),_model_Summon__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(8272),_SettingsManager__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(731),src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(377),_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(9310),_model_Entity__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(3157),src_app_ui_helper_Static__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(8927),src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(7227);class MonsterManager{constructor(q){(0,_home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_13__.Z)(this,"game",void 0),this.game=q}monsterThumbnail(q){if(q.thumbnailUrl)return q.thumbnailUrl;if(!q.thumbnail&&q.standeeShare){const nt=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(q.standeeShareEdition||q.edition).find(E=>E.name==q.standeeShare);nt&&(this.monsterThumbnail(nt),nt.thumbnail&&(q.thumbnail=nt.thumbnail))}return q.thumbnail||(q.thumbnail=q.edition+"-"+q.name),"./assets/images/monster/thumbnail/"+q.thumbnail+".png"}monsterArtwork(q){return q.noArtwork?this.monsterThumbnail(q):(this.monsterThumbnail(q),"./assets/artwork/monster/"+q.thumbnail+".png")}getStat(q,nt){return q.stats.find(t=>t.level==q.level&&t.type==nt)||(q.errors=q.errors||[],!q.errors.find(t=>t.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.unknown)&&!q.errors.find(t=>t.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.stat)&&(console.error("Could not find '"+nt+"' stats for monster: "+q.name+" level: "+q.level),q.errors.push(new src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.o(src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.stat,"monster",q.name,q.edition,nt,""+q.level))),new _model_data_MonsterStat__WEBPACK_IMPORTED_MODULE_14__.c(nt,q.level,0,0,0,0))}getSpawnMonsters(q){let nt=[];return q.forEach(E=>{this.getMonsterSpawns(E).forEach(t=>{-1==nt.indexOf(t)&&nt.push(t)})}),nt}getMonsterSpawns(q){let nt=[];const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(new _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q(q));return E&&E.abilities&&E.abilities.forEach(t=>{t.actions.forEach(x=>{this.getActionSpawns(x,q.edition).forEach(tt=>{-1==nt.indexOf(tt)&&nt.push(tt)})})}),q.baseStat.special&&q.baseStat.special.forEach(t=>{t.forEach(x=>{this.getActionSpawns(x,q.edition).forEach(tt=>{-1==nt.indexOf(tt)&&nt.push(tt)})})}),q.stats.forEach(t=>{t.special&&t.special.forEach(x=>{x.forEach(G=>{this.getActionSpawns(G,q.edition).forEach(at=>{-1==nt.indexOf(at)&&nt.push(at)})})})}),nt}getActionSpawns(q,nt){if(q.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.summon||q.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.spawn)if("summonData"!=q.value&&"monsterStandee"!=q.value){const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(nt).find(t=>t.name==(""+q.value).split(":")[0]);if(E)return[E]}else if("monsterStandee"==q.value&&q.valueObject){let E=[];return q.valueObject.forEach(t=>{const x=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(nt).find(G=>G.name==t.monster.name);x&&E.push(x)}),E}return q.subActions?q.subActions.map(E=>this.getActionSpawns(E,nt)).flat():[]}addMonsterByName(name,edition){let level=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.level;-1!=name.indexOf(":")&&(level=eval(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.level+name.split(":")[1]),level<0?level=0:level>7&&(level=7),name=name.split(":")[0]);let monsterData=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData().find(q=>q.name==name&&(q.edition==edition||-1!=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.editionExtensions(edition).indexOf(q.edition)));if(monsterData||(console.warn("Monster not found: '"+name+"' for edition :"+edition),monsterData=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData().find(q=>q.name==name),monsterData&&(monsterData.errors=monsterData.errors||[],monsterData.errors.find(q=>q.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterEdition)||monsterData.errors.push(new src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.o(src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterEdition,"monster",monsterData.name,edition,monsterData.edition)))),monsterData)return this.addMonster(monsterData,level);console.error("Monster not found: '"+name+"'")}addMonster(q,nt){this.game.scenario||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.scenarioManager.setScenario(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.scenarioManager.createScenario());let E=this.game.figures.find(t=>t instanceof _model_data_MonsterData__WEBPACK_IMPORTED_MODULE_5__.A&&t.name==q.name&&t.edition==q.edition);return E?nt!=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.level&&E.level!=nt&&this.setLevel(E,nt):(E=new _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q(q),this.setLevel(E,nt),E.off=!0,this.resetMonsterAbilities(E),this.game.figures.push(E)),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.sortFigures(E),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.uiChange.emit(),E}resetMonsterAbilities(q){if(!this.applySameDeck(q)){if(!q.abilities||0==q.abilities.length){const nt=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q);q.abilities=nt.filter(E=>isNaN(+E.level)||+E.level<=(q&&q.level||0)).map(E=>nt.indexOf(E))}this.shuffleAbilities(q)}}removeMonster(q){q.entities=[],this.game.figures.splice(this.game.figures.indexOf(q),1),q.drawExtra||this.game.figures.forEach(nt=>{nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&nt.drawExtra&&(nt.name!=q.name||nt.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&(this.getSameDeckMonster(nt)||(nt.drawExtra=!1))})}monsterEntityCount(q,nt=!1,E=void 0){return q.entities.filter(t=>(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(t,nt)||t.dormant)&&(!nt||t.number>0)&&(!E||t.type==E)).length}monsterEntityCountIdentifier(q,nt){return"all"!=nt.type&&(nt.name!=q.name||nt.edition!=q.edition)||"monster"!=nt.type?0:q.entities.filter(E=>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)&&(!nt.marker||nt.marker==E.marker)&&(!nt.tags||0==nt.tags.length||nt.tags.every(t=>-1!=E.tags.indexOf(t)))).length}monsterEntityCountAll(q){return _GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.entities(q).length}monsterStandeeShared(q,nt){return-1==nt.indexOf(q)&&nt.push(q),q.standeeShare&&this.game.figures.filter(x=>x instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&q.standeeShare&&x.name==q.standeeShare&&x.edition==(q.standeeShareEdition||q.edition)).map(x=>x).forEach(x=>{-1==nt.indexOf(x)&&(nt.push(x),this.monsterStandeeShared(x,nt))}),this.game.figures.filter(t=>t instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&t.standeeShare&&q.name==t.standeeShare&&q.edition==(t.standeeShareEdition||t.edition)).map(t=>t).forEach(t=>{-1==nt.indexOf(t)&&(nt.push(t),this.monsterStandeeShared(t,nt))}),nt}monsterStandeeUsed(q,nt){return this.monsterStandeeShared(q,[]).map(E=>E.entities).flat().find(E=>(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)||E.dormant)&&E.number==nt)}monsterStandeeCount(q,nt=!0){return this.monsterStandeeShared(q,[]).map(E=>E.entities).flat().filter(E=>(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)||E.dormant)&&(nt||E.number>0)).length}monsterStandeeMax(q){let nt=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(q.standeeCount||q.count,q.level);if(q.standeeShare){const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(q.standeeShareEdition||q.edition).find(t=>t.name==q.standeeShare);E&&(nt=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(E.standeeCount||E.count,q.level))}return nt}addMonsterEntity(q,nt,E,t=!1){if(!q.stats.some(G=>G.type==E))return q.errors=q.errors||[],void(!q.errors.find(G=>G.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.unknown)&&!q.errors.find(G=>G.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterType)&&(console.error("Missing type '"+E+"' for "+q.name),q.errors.push(new src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.o(src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterType,"monster",q.name,q.edition,E))));let x=new _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_4__.g(nt,E,q);if(q.entities=q.entities.filter(G=>G.number!=nt),q.entities.push(x),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.addEntityCount(q,x),t&&(x.summon=_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new),!t||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.fhRules()){if(this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&(-1==q.ability?this.applySameDeck(q)?-1==q.ability&&(q.ability=0,q.lastDraw=this.game.round):(q.ability=0,q.lastDraw=this.game.round):1==q.entities.length&&!this.applySameDeck(q)&&q.lastDrawG instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(G.name!=q.name||G.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(G).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(G).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&G.drawExtra&&G.ability>-1).length,q.lastDraw=this.game.round,q.ability>=q.abilities.length&&this.shuffleAbilities(q))),this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&1==this.monsterEntityCount(q)){let G=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.indexOf(q);const tt=this.getSameDeckMonster(q);for(tt&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.gameplayFigure(tt)&&this.applySameDeck(q);_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.some((at,it)=>!at.off&&itq.getInitiative()||at.getInitiative()==q.getInitiative()&&at instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&at.name.toLowerCase()>q.name.toLowerCase()));)_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.splice(G,1),G--,_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.splice(G,0,q)}!t&&q.off?q.off=!1:t&&q.entities.every(G=>!_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(G)||G.summon==_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new)&&(q.off=!0),this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&x.summon!=_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new&&(x.active=q.active||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.some((G,tt,at)=>G.active&&tt>at.indexOf(q)))}return x}spawnMonsterEntity(q,nt,E=!1,t=!1,x=!1,G=!1){q.isAlly=E,q.isAllied=t,q.drawExtra=x;const tt=this.monsterStandeeMax(q);if(_SettingsManager__WEBPACK_IMPORTED_MODULE_7__.r.settings.automaticStandees&&this.monsterStandeeCount(q)!_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)&&!E.dormant))&&(!q.off&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&q.active?_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.roundManager.toggleFigure(q):q.off=!0)}setLevel(q,nt){const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q);q.abilities.length!=E.filter(t=>!t.level||isNaN(+t.level)||(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(t.level)<=nt).length&&(q.abilities=E.filter(t=>!t.level||isNaN(+t.level)||(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(t.level)<=nt).map((t,x)=>x),this.shuffleAbilities(q)),q.level=nt,q.entities.forEach(t=>{let G,x=this.getStat(q,t.type);t.level=q.level,G="number"==typeof x.health?x.health:(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(x.health),t.health==t.maxHealth&&(t.health=G),t.maxHealth=G,t.health>t.maxHealth&&(t.health=t.maxHealth)})}toggleActive(q,nt){this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&(q.active?(nt.active=!nt.active,q.entities.every(E=>E.dead||E.health<=0||!E.active)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.roundManager.toggleFigure(q)):nt.active?(nt.active=!1,q.entities.every(E=>E.dead||E.health<=0||!E.active||E.summon==_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new)&&(q.off=!0)):(q.off=!1,nt.active=!0),nt.active?(nt.off=!1,!q.active&&this.game.figures.every(E=>!E.active)&&(q.active=!0)):nt.off=!0)}getSameDeckMonster(q){return this.game.figures.find(nt=>nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(nt.name!=q.name||nt.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&!nt.drawExtra)}applySameDeck(q){const nt=this.getSameDeckMonster(q);return!!nt&&(q.abilities=JSON.parse(JSON.stringify(nt.abilities)),q.ability=nt.ability,q.lastDraw=this.game.round,q.drawExtra&&this.drawExtra(q),!0)}drawExtra(q){if(q.drawExtra){q.ability=-1;const nt=this.getSameDeckMonster(q);if(!nt)return console.error("Draw extra for '"+q.name+"' ("+q.deck+" not possible, not same deck monster found!"),void(q.drawExtra=!1);q.ability=nt.ability+1+this.game.figures.filter(E=>E instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(E.name!=q.name||E.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(E).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(E).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&E.drawExtra&&E.ability>nt.ability).length,q.ability>=q.abilities.length&&this.shuffleAbilities(q),q.lastDraw=this.game.round}else this.applySameDeck(q)}next(){this.game.figures.forEach(q=>{if(q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q){const nt=this.getAbility(q);nt&&(nt.shuffle||q.ability>=q.abilities.length)&&this.shuffleAbilities(q),q.entities=q.entities.filter(E=>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)||E.dormant),q.entities.forEach(E=>{if(E.tags){let t=E.tags.find(x=>x.startsWith("roundAction-"));for(;t;)E.tags.splice(E.tags.indexOf(t),1),t=E.tags.find(x=>x.startsWith("roundAction-"))}E.summon==_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new&&(E.summon=_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.true),E.entityConditions.forEach(t=>{-1!=t.types.indexOf(_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__.CP.expire)&&t.state==_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__.tT.normal&&(t.lastState=t.state,t.state=_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__.tT.expire)})}),q.off=0==q.entities.length}})}draw(){this.game.figures.filter(q=>q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&!q.drawExtra).forEach(q=>{q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.gameplayFigure(q)&&(q.ability=q.ability+1+this.game.figures.filter(nt=>nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(nt.name!=q.name||nt.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&nt.drawExtra&&nt.ability>-1).length,q.lastDraw=this.game.round,this.hasBottomActions(q)&&(q.ability+=1),q.ability>=q.abilities.length&&this.shuffleAbilities(q))}),this.game.figures.filter(q=>q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&q.drawExtra).forEach(q=>{q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(this.drawExtra(q),q.ability>=q.abilities.length&&this.shuffleAbilities(q))})}shuffleAbilities(q){if(q.ability=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.draw||0==q.entities.length?-1:0,q.drawExtra){const nt=this.getSameDeckMonster(q);return nt?void this.shuffleAbilities(nt):(console.error("Shuffle for '"+q.name+"' ("+q.deck+" not possible, not same deck monster found!"),q.drawExtra=!1,void this.shuffleAbilities(q))}(0,src_app_ui_helper_Static__WEBPACK_IMPORTED_MODULE_11__.wE)(q.abilities),this.game.figures.filter(nt=>nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&this.getSameDeckMonster(nt)&&this.getSameDeckMonster(nt)==q).map(nt=>nt).forEach(nt=>{nt.abilities=JSON.parse(JSON.stringify(q.abilities)),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.draw?nt.ability=-1:(nt.ability=q.ability,nt.drawExtra&&this.drawExtra(nt))})}drawAbility(q){if(q.drawExtra){const nt=this.getSameDeckMonster(q);return nt?void this.drawAbility(nt):(console.error("Draw for '"+q.name+"' ("+q.deck+" not possible, not same deck monster found!"),q.drawExtra=!1,void this.drawAbility(q))}q.ability+=1,this.hasBottomActions(q)&&(q.ability+=1),this.game.figures.forEach(nt=>{nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&this.getSameDeckMonster(nt)&&(nt.ability=q.ability,nt.drawExtra&&this.drawExtra(nt))})}drawnAbilities(q){let nt=0;q.ability>=0&&(nt=q.ability+1);let E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.find(t=>t instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(t.name!=q.name||t.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&t.ability>=nt);for(;E instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q;)nt=E.ability+1,E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.find(t=>t instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(t.name!=q.name||t.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&t.ability>=nt);return nt}getAbility(q){if(q.ability<0||q.ability>=q.abilities.length||!_SettingsManager__WEBPACK_IMPORTED_MODULE_7__.r.settings.abilities)return;const nt=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q);return nt?nt[q.abilities[q.ability]]:void 0}hasBottomActions(q){return _GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q).every(nt=>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.hasBottomAbility(nt))}calcActionHints(q,nt){let E=[];const t=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monsterManager.getStat(q,nt.type);if(this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield,t.actions,E),this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.retaliate,t.actions,E),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(nt,!0)&&(!nt.active||q.active)){const x=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.find(G=>G.active);if(q.active||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&(!x||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.indexOf(x)>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.indexOf(q))){let G=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monsterManager.getAbility(q);G&&(this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield,G.actions,E),this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.retaliate,G.actions,E))}}return E.sort((x,G)=>x.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield&&G.type!=src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield?-1:G.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield&&x.type!=src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield?1:x.range-G.range)}calcActionHint(q,nt,E,t,x,G=0){t.forEach((tt,at)=>{if(tt.type==E){let it={type:E,value:(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(tt.value),range:0};if(tt.subActions&&tt.subActions.length>0){let dt=tt.subActions.find(X=>X.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.range&&(!X.valueType||X.valueType==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.EF.fixed));dt&&(it.range=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(dt.value))}let K=x.find(dt=>dt.type==it.type&&dt.range==it.range);K?K.value+=it.value:x.push(it)}else(tt.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.monsterType&&tt.value==nt.type||tt.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.element&&tt.valueType==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.EF.minus&&q.entities.find(it=>it.tags.find(K=>K=="roundAction-element-consume-"+at+"-"+G+"-"+tt.value)))&&this.calcActionHint(q,nt,E,tt.subActions,x,at)})}}},6417:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>ScenarioRulesManager});var _home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1180),_model_Character__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5609),_model_data_Condition__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9310),_model_Entity__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3157),_model_Game__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(6565),_model_Monster__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(7177),_model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(4968),_model_Objective__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(9120),_model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(5601),_GameManager__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(5604),_SettingsManager__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(731);class ScenarioRulesManager{constructor(q){(0,_home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__.Z)(this,"game",void 0),this.game=q}addScenarioRules(q=!1){this.game.scenarioRules=[];const nt=this.game.scenario;nt&&nt.rules&&nt.rules.forEach((E,t)=>{this.addScenarioRule(nt,E,t,!1,q)}),this.game.sections&&this.game.sections.forEach(E=>{E.rules&&E.rules.forEach((t,x)=>{this.addScenarioRule(E,t,x,!0,q)})}),this.filterDisabledScenarioRules()}addScenarioRulesAlways(){const q=this.game.scenario;q&&q.rules&&q.rules.filter(nt=>nt.always).forEach(nt=>{this.addScenarioRule(q,nt,q.rules.indexOf(nt),!1)}),this.game.sections&&this.game.sections.forEach(nt=>{nt.rules&&nt.rules.filter(E=>E.always).forEach(E=>{this.addScenarioRule(nt,E,nt.rules.indexOf(E),!0)})}),this.filterDisabledScenarioRules()}filterDisabledScenarioRules(){this.game.scenarioRules=this.game.scenarioRules.filter((q,nt,E)=>!E.find(t=>t.rule.disableRules&&t.rule.disableRules.some(x=>x.edition==q.identifier.edition&&x.group==q.identifier.group&&(x.index==q.identifier.index||-1==x.index)&&x.scenario==q.identifier.scenario&&x.section==q.identifier.section)))}addScenarioRule(scenarioData,rule,index,section,initial=!1){const identifier={edition:scenarioData.edition,scenario:scenarioData.index,group:scenarioData.group,index,section};let round=rule.round||"false",add=!1;for(;-1!=round.indexOf("R");)round=round.replace("R",""+(rule.start?this.game.round+1:this.game.round));for(;-1!=round.indexOf("C");)round=round.replace("C",""+_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.characterManager.characterCount());try{add=eval(round)&&(rule.always||this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_3__.D2.next||rule.start&&initial)}catch(q){console.warn("Cannot apply scenario rule: '"+rule.round+"'","index: "+index,q),add=!1}if(add&&(rule.figures&&rule.figures.filter(q=>"present"==q.type||"dead"==q.type).length>0&&rule.figures.filter(q=>"present"==q.type||"dead"==q.type).forEach(q=>{const nt=this.entitiesByFigureRule(q,rule).filter(t=>(_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(t)||t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g&&t.dormant)&&(!(t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g)||!q.identifier?.marker||t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g&&q.identifier&&t.marker==q.identifier.marker&&(!q.identifier.tags||0==q.identifier.tags.length||t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g&&q.identifier.tags.forEach(x=>-1!=t.tags.indexOf(x))))),E=q.value?(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(q.value.split(":")[0]):"present"==q.type?1:0;add=add&&E>=0&&("present"==q.type?nt.length>=E:nt.length<=E),q.identifier&&(q.identifier.marker||q.identifier.tags&&q.identifier.tags.length>0)&&!_SettingsManager__WEBPACK_IMPORTED_MODULE_9__.r.settings.automaticStandees&&(add=!1)}),add&&rule.figures&&rule.figures.filter(q=>"killed"==q.type).length>0&&rule.figures.filter(q=>"killed"==q.type).forEach(q=>{if(q.identifier){const nt=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityCounters(q.identifier);if(add=add&&nt.length>0,add)if("all"==q.value)nt.forEach(E=>{add=add&&E&&E.total>0&&E.killed>=E.total||!1});else{const E=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(q.value||0);let t=0;nt.forEach(x=>{t+=x.killed}),add=add&&t>0&&t>=E||!1}}else add=!1}),rule.requiredRooms&&rule.requiredRooms.length>0&&rule.requiredRooms.forEach(q=>{add=add&&null!=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario&&-1!=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario.revealedRooms.indexOf(q)}),rule.requiredRules&&rule.requiredRules.length>0&&rule.requiredRules.forEach(q=>{add=add&&this.game.disgardedScenarioRules.some(nt=>q.edition==nt.edition&&q.scenario==nt.scenario&&q.group==nt.group&&q.index==nt.index&&q.section==nt.section)}),rule.rooms&&rule.rooms.every(q=>_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario&&-1!=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario.revealedRooms.indexOf(q))&&(add=!1),rule.treasures)){let q=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.figures.filter(nt=>nt instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z).map(nt=>nt.treasures.map(E=>"number"==typeof E?E:"G")).flat();if(("number"==typeof rule.treasures||"string"==typeof rule.treasures)&&q.length<(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(rule.treasures))add=!1;else if("number"!=typeof rule.treasures&&"string"!=typeof rule.treasures){let nt=0;rule.treasures.forEach(E=>{const t=q.indexOf(E);-1!=t&&(q.splice(t,1),nt++)}),ntq.edition==identifier.edition&&q.scenario==identifier.scenario&&q.group==identifier.group&&q.index==identifier.index&&q.section==identifier.section),visible=this.game.scenarioRules.find(q=>q.identifier.edition==identifier.edition&&q.identifier.scenario==identifier.scenario&&q.identifier.group==identifier.group&&q.identifier.index==identifier.index&&q.identifier.section==identifier.section);!add||disgarded||visible?!add&&rule.always&&(this.game.scenarioRules=this.game.scenarioRules.filter(q=>q.identifier.edition!=identifier.edition||q.identifier.group!=identifier.group||q.identifier.index!=identifier.index||q.identifier.scenario!=identifier.scenario||q.identifier.section!=identifier.section)):(rule.spawns&&rule.spawns.forEach(q=>{q.manual&&!q.count&&0!=q.count&&(q.count=1)}),rule.objectiveSpawns&&rule.objectiveSpawns.forEach(q=>{q.manual&&!q.count&&0!=q.count&&(q.count=1)}),this.game.scenarioRules.push({identifier,rule}))}getScenarioForRule(q){if(q.section){const nt=this.game.sections.find(E=>E.edition==q.edition&&E.group==q.group&&E.index==q.scenario&&E.rules&&E.rules.length>q.index);if(nt)return{scenario:nt,section:!0}}else if(this.game.scenario&&this.game.scenario.edition==q.edition&&this.game.scenario.group==q.group&&this.game.scenario.index==q.scenario&&this.game.scenario.rules&&this.game.scenario.rules.length>q.index)return{scenario:this.game.scenario,section:!1};return{scenario:void 0,section:!1}}figuresByFigureRule(figureRule,rule){const ref=figureRule.identifierRef;return"number"==typeof ref?ref>=0&&ref{if(figureRule.identifier&&figureRule.identifier.health){if(figure instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z||figure instanceof _model_Objective__WEBPACK_IMPORTED_MODULE_6__.CH){const q=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figureRule.identifier.health.replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figure.maxHealth)));return figure.health<=q}if(figure instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_4__.Q||figure instanceof _model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__.k)return figure.entities.some(q=>{if(figureRule.identifier&&figureRule.identifier.health&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(q)){const nt=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figureRule.identifier.health.replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(q.maxHealth)));return q.health<=nt}return!1})}if(figureRule.identifier&&figureRule.identifier.hp){if(figure instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z||figure instanceof _model_Objective__WEBPACK_IMPORTED_MODULE_6__.CH)return eval(figureRule.identifier.hp.replaceAll("HP",""+figure.health).replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figure.maxHealth)));if(figure instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_4__.Q||figure instanceof _model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__.k)return figure.entities.some(entity=>!!(figureRule.identifier&&figureRule.identifier.hp&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(entity))&&eval(figureRule.identifier.hp.replaceAll("HP",""+entity.health).replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(entity.maxHealth))))}if(figureRule.identifier&&figureRule.identifier.conditions){if(figure instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z||figure instanceof _model_Objective__WEBPACK_IMPORTED_MODULE_6__.CH)return figureRule.identifier.conditions.every(q=>q.startsWith("!")&&!_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(figure,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q.substring(1)))||!q.startsWith("!")&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(figure,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q)));if(figure instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_4__.Q||figure instanceof _model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__.k)return figure.entities.some(q=>!!(figureRule.identifier&&figureRule.identifier.health&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(q))&&figureRule.identifier.conditions&&figureRule.identifier.conditions.every(nt=>nt.startsWith("!")&&!_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(q,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(nt.substring(1)))||!nt.startsWith("!")&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(q,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(nt))))}return!1}):_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.figuresByIdentifier(figureRule.identifier,figureRule.scenarioEffect)}entitiesByFigureRule(figureRule,rule){const ref=figureRule.identifierRef;return"number"==typeof ref?ref>=0&&ref{if(figureRule.identifier&&figureRule.identifier.health&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(entity)){const q=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figureRule.identifier.health.replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(entity.maxHealth)));return entity.health<=q}return figureRule.identifier&&figureRule.identifier.hp&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(entity)?eval(figureRule.identifier.hp.replaceAll("HP",""+entity.health).replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(entity.maxHealth))):!(!figureRule.identifier||!figureRule.identifier.conditions)&&figureRule.identifier.conditions&&figureRule.identifier.conditions.every(q=>q.startsWith("!")&&!_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(entity,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q.substring(1)))||!q.startsWith("!")&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(entity,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q)))}):_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entitiesByIdentifier(figureRule.identifier,figureRule.scenarioEffect)}}},731:(q,nt,E)=>{"use strict";E.d(nt,{r:()=>st});var t=E(5861),x=E(1180),G=E(3329),tt=E(5604),at=E(3306),it=E(3281),K=E(3157);const X=new class dt{checkDuplicates(){tt.v.charactersData().forEach((I,Q,lt)=>{lt.find(_t=>!I.replace&&!_t.replace&<.indexOf(_t)!=lt.indexOf(I)&&I.name==_t.name&&I.edition==_t.edition)&&console.warn("Duplicate Character: "+I.name+" (Edition: "+I.edition+")")}),tt.v.decksData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.name==_t.name&&I.edition==_t.edition)&&console.warn("Duplicate Deck: "+I.name+" (Edition: "+I.edition+")")}),tt.v.scenarioData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.index==_t.index&&I.edition==_t.edition&&I.group==_t.group)&&console.warn("Duplicate Scenario: "+I.index+" (Edition: "+I.edition+")")}),tt.v.sectionData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.index==_t.index&&I.edition==_t.edition&&I.group==_t.group)&&console.warn("Duplicate Section: "+I.index+" (Edition: "+I.edition+")")}),tt.v.itemData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.id==_t.id&&I.edition==_t.edition)&&console.warn("Duplicate Item: "+I.id+" (Edition: "+I.edition+")")}),tt.v.monstersData().forEach((I,Q,lt)=>{lt.find(_t=>!I.replace&&!_t.replace&<.indexOf(_t)!=lt.indexOf(I)&&I.name==_t.name&&I.edition==_t.edition)&&console.warn("Duplicate Monster: "+I.name+" (Edition: "+I.edition+")")}),tt.v.battleGoalManager.getBattleGoals(void 0,!0).forEach((I,Q,lt)=>{if(!I.alias){const _t=lt.filter((H,Jt)=>Jt!=Q&&(H.name==I.name||st.getLabel("data.battleGoals."+H.cardId)==st.getLabel("data.battleGoals."+I.cardId)));_t.length>0&&_t.find(H=>!H.alias)&&console.warn("BattleGoal doubles:",I.edition+" - "+I.name,_t.map(H=>H.edition+" - "+H.name))}})}checkScenarioMonster(){tt.v.scenarioData().forEach(I=>{I.monsters&&I.monsters.forEach(Q=>{tt.v.monstersData().find(lt=>(lt.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(lt.edition))&<.name==Q.split(":")[0])||console.warn("Invalid monster: "+Q+" | scenario",I.edition,I.group||"",I.index)}),I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{tt.v.monstersData().find(_t=>(_t.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(_t.edition))&&_t.name==lt.name.split(":")[0])||console.warn("Invalid monster: "+lt.name+" | scenario",I.edition,I.group||"",I.index)})})})}checkSectionMonster(){tt.v.sectionData().forEach(I=>{I.monsters&&I.monsters.forEach(Q=>{tt.v.monstersData().find(lt=>(lt.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(lt.edition))&<.name==Q.split(":")[0])||console.warn("Invalid monster: "+Q+" | section",I.edition,I.group||"",I.index)}),I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{tt.v.monstersData().find(_t=>(_t.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(_t.edition))&&_t.name==lt.name.split(":")[0])||console.warn("Invalid monster: "+lt.name+" | section",I.edition,I.group||"",I.index)})})})}checkMissingScenarioMonster(){tt.v.scenarioData().forEach(I=>{I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{(!I.monsters||!I.monsters.find(_t=>_t==lt.name||_t.split(":")[0]==lt.name))&&console.debug("Missing monster '"+lt.name+"' from room '"+Q.roomNumber+"' in monsters",I.edition,I.group||"",I.index)})})})}checkMissingSectionMonster(){tt.v.sectionData().forEach(I=>{I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{(!I.monsters||!I.monsters.find(_t=>_t==lt.name||_t.split(":")[0]==lt.name))&&console.debug("Missing monster '"+lt.name+"' from room '"+Q.roomNumber+"' in monsters | section",I.edition,I.group||"",I.index)})})})}checkMonsterUsage(){tt.v.monstersData().forEach(I=>{let Q=!1;tt.v.scenarioData().forEach(lt=>{lt.monsters&<.monsters.some(_t=>_t.split(":")[0]==I.name)&&(Q=!0),!Q&<.rooms&<.rooms.forEach(_t=>{_t.monster&&_t.monster.some(H=>H.name.split(":")[0]==I.name)&&(Q=!0)})}),Q||tt.v.sectionData().forEach(lt=>{lt.monsters&<.monsters.find(_t=>_t.split(":")[0]==I.name)&&(Q=!0),!Q&<.rooms&<.rooms.forEach(_t=>{_t.monster&&_t.monster.some(H=>H.name.split(":")[0]==I.name)&&(Q=!0)})}),Q||console.warn("Could not find usage of '"+I.name+"'",I.edition)})}checkMonsterBossCount(){tt.v.monstersData().forEach(I=>{I.boss&&(0,K.j9)(I.count)>1&&console.warn("Boss count check: "+I.name+" (Edition: "+I.edition+")")})}},st=new class et{constructor(){(0,x.Z)(this,"defaultLocale","en"),(0,x.Z)(this,"defaultEditions",["gh","fh","jotl","fc","cs","toa","solo"]),(0,x.Z)(this,"defaultEditionDataUrls",["./assets/data/gh.json","./assets/data/fh.json","./assets/data/jotl.json","./assets/data/fc.json","./assets/data/cs.json","./assets/data/toa.json","./assets/data/solo.json","./assets/data/fh-crossover.json","./assets/data/gh-envx.json","./assets/data/toa-envv.json","./assets/data/sc.json","./assets/data/sox.json","./assets/data/bas.json","./assets/data/cc.json"]),(0,x.Z)(this,"settings",new G.Z),(0,x.Z)(this,"label",{}),(0,x.Z)(this,"locales",["en","de","fr","ko"]),(0,x.Z)(this,"developent",!1)}init(I){var Q=this;return(0,t.Z)(function*(){yield Q.loadSettings(),Q.developent=I;for(let lt of Q.defaultEditionDataUrls)-1==st.settings.editionDataUrls.indexOf(lt)&&-1==st.settings.excludeEditionDataUrls.indexOf(lt)&&st.settings.editionDataUrls.push(lt);for(let lt of st.settings.editionDataUrls)yield st.loadEditionData(lt)})()}loadSettings(){var I=this;return(0,t.Z)(function*(){let Q=!1;try{let lt=yield at.j.read("settings","default");lt?I.setSettings(Object.assign(new G.Z,lt)):Q=!0}catch{Q=!0}if(Q)try{yield fetch("./ghs-settings-default.json").then(lt=>{if(!lt.ok)throw Error();return lt.json()}).then(lt=>{I.setSettings(Object.assign(new G.Z,lt))})}catch{I.setSettings(new G.Z)}I.updateLocale(I.settings.locale)})()}setSettings(I){if(I.locale!=this.settings.locale&&this.updateLocale(I.locale),this.settings=I,(!this.settings.editions||0==this.settings.editions.length)&&this.settings.editions.push(...this.defaultEditions),!this.settings.editionDataUrls||0==this.settings.editionDataUrls.length)for(let Q of this.defaultEditionDataUrls)-1==this.settings.editionDataUrls.indexOf(Q)&&-1==this.settings.excludeEditionDataUrls.indexOf(Q)&&this.settings.editionDataUrls.push(Q);I.theme||(I.theme=I.fhStyle?"fh":"default"),this.sortSpoilers()}storeSettings(){at.j.write("settings","default",this.settings),this.settings.serverSettings&&tt.v.stateManager.saveSettings(),tt.v.uiChange.emit()}reset(){at.j.remove("settings"),this.loadSettings()}setAbilities(I){this.settings.abilities=I,this.storeSettings()}setAbilityNumbers(I){this.settings.abilityNumbers=I,this.storeSettings()}setAbilityReveal(I){this.settings.abilityReveal=I,this.storeSettings()}setActiveApplyConditions(I){this.settings.activeApplyConditions=I,this.storeSettings()}setActiveApplyConditionsExcludes(I){this.settings.activeApplyConditionsExcludes=I,this.storeSettings()}setActiveStandees(I){this.settings.activeStandees=I,this.storeSettings()}setActiveSummons(I){this.settings.activeSummons=I,this.storeSettings()}setAddAllMonsters(I){this.settings.addAllMonsters=I,this.storeSettings()}setAllyAttackModifierDeck(I){this.settings.allyAttackModifierDeck=I,this.storeSettings()}setAlwaysAllyAttackModifierDeck(I){this.settings.alwaysAllyAttackModifierDeck=I,this.storeSettings()}setAlwaysFhSolo(I){this.settings.alwaysFhSolo=I,this.storeSettings()}setAlwaysHazardousTerrain(I){this.settings.alwaysHazardousTerrain=I,this.storeSettings()}setAlwaysLootApplyDialog(I){this.settings.alwaysLootApplyDialog=I,this.storeSettings()}setAlwaysLootDeck(I){this.settings.alwaysLootDeck=I,this.storeSettings()}setApplyBuildingRewards(I){this.settings.applyBuildingRewards=I,this.storeSettings()}setApplyConditions(I){this.settings.applyConditions=I,this.storeSettings()}setApplyConditionsExcludes(I){this.settings.applyConditionsExcludes=I,this.storeSettings()}setApplyLongRest(I){this.settings.applyLongRest=I,this.storeSettings()}setApplyLoot(I){this.settings.applyLoot=I,this.storeSettings()}setApplyLootRandomItem(I){this.settings.applyLootRandomItem=I,this.storeSettings()}setApplyRetirement(I){this.settings.applyRetirement=I,this.storeSettings()}setAutoBackup(I){this.settings.autoBackup=I,this.storeSettings()}setAutoBackupFinish(I){this.settings.autoBackupFinish=I,this.settings.autoBackupFinish&&this.settings.autoBackup<0?this.settings.autoBackup=0:!this.settings.autoBackupFinish&&0==this.settings.autoBackup&&(this.settings.autoBackup=-1),this.storeSettings()}setAutoBackupUrl(I){this.settings.autoBackupUrl=I,this.settings.autoBackupUrl&&!this.settings.autoBackupUrl.method&&(this.settings.autoBackupUrl.method="POST"),this.storeSettings()}setAutomaticAttackModifierFullscreen(I){this.settings.automaticAttackModifierFullscreen=I,this.storeSettings()}setAutomaticStandees(I){this.settings.automaticStandees=I,this.storeSettings()}setAutomaticStandeesDialog(I){this.settings.automaticStandeesDialog=I,this.storeSettings()}setAutomaticTheme(I){this.settings.automaticTheme=I,this.storeSettings()}setAutomaticUnlocking(I){this.settings.automaticUnlocking=I,this.storeSettings()}setAutoscroll(I){this.settings.autoscroll=I,this.storeSettings()}setBarsize(I){this.settings.barsize=I,this.storeSettings()}setBackupHint(I){this.settings.backupHint=I,this.storeSettings()}setBattleGoals(I){this.settings.battleGoals=I,this.storeSettings()}setBattleGoalsCharacter(I){this.settings.battleGoalsCharacter=I,this.storeSettings()}setBattleGoalsFh(I){this.settings.battleGoalsFh=I,this.storeSettings()}setBrowserNavigation(I){this.settings.browserNavigation=I,this.storeSettings()}setCalculate(I){this.settings.calculate=I,this.storeSettings()}setCalculateStats(I){this.settings.calculateStats=I,this.storeSettings()}setCalculateShieldStats(I){this.settings.calculateShieldStats=I,this.storeSettings()}setCharacterAttackModifierDeck(I){this.settings.characterAttackModifierDeck=I,this.storeSettings()}setCharacterAttackModifierAnimate(I){this.settings.characterAttackModifierAnimate=I,this.storeSettings()}setCharacterAttackModifierDeckPermanent(I){this.settings.characterAttackModifierDeckPermanent=I,this.storeSettings()}setCharacterAttackModifierDeckPermanentActive(I){this.settings.characterAttackModifierDeckPermanentActive=I,this.storeSettings()}setCharacterCompact(I){this.settings.characterCompact=I,this.storeSettings()}setCharacterHandSize(I){this.settings.characterHandSize=I,this.storeSettings()}setCharacterIdentities(I){this.settings.characterIdentities=I,this.storeSettings()}setCharacterIdentityHint(I){this.settings.characterIdentityHint=I,this.storeSettings()}setCharacterItems(I){this.settings.characterItems=I,this.storeSettings()}setCharacterItemsPermanent(I){this.settings.characterItemsPermanent=I,this.storeSettings()}setCharacterItemsPermanentActive(I){this.settings.characterItemsPermanentActive=I,this.storeSettings()}setCharacterSheet(I){this.settings.characterSheet=I,this.storeSettings()}setCharacterSheetCompact(I){this.settings.characterSheetCompact=I,this.storeSettings()}setCharacterTraits(I){this.settings.characterTraits=I,this.storeSettings()}setCombineSummonAction(I){this.settings.combineSummonAction=I,this.storeSettings()}setDebugRightClick(I){this.settings.debugRightClick=I,this.storeSettings()}setDisableAnimations(I){this.settings.disableAnimations=I,this.storeSettings()}setDisableArtwork(I){this.settings.disableArtwork=I,this.storeSettings()}setDisableColumns(I){this.settings.disableColumns=I,this.storeSettings()}setDisableDragFigures(I){this.settings.disableDragFigures=I,this.storeSettings()}setDisablePinchZoom(I){this.settings.disablePinchZoom=I,this.storeSettings()}setDisabledTurnConfirmation(I){this.settings.disabledTurnConfirmation=I,this.storeSettings()}setDisableSortFigures(I){this.settings.disableSortFigures=I,I||tt.v.sortFigures(),this.storeSettings()}setDisableStandees(I){this.settings.disableStandees=I,this.storeSettings()}setStandeeStats(I){this.settings.standeeStats=I,this.storeSettings()}setStatAnimations(I){this.settings.statAnimations=I,this.storeSettings()}setDisableWakeLock(I){var Q=this;return(0,t.Z)(function*(){Q.settings.disableWakeLock=I,I&&tt.v.stateManager.wakeLock?tt.v.stateManager.wakeLock.release().then(()=>{tt.v.stateManager.wakeLock=null}):!I&&!tt.v.stateManager.wakeLock&&"wakeLock"in navigator&&(tt.v.stateManager.wakeLock=yield navigator.wakeLock.request("screen")),Q.storeSettings()})()}setDragValues(I){this.settings.dragValues=I,this.storeSettings()}setEliteFirst(I){this.settings.eliteFirst=I,this.storeSettings()}setExpireConditions(I){this.settings.expireConditions=I,this.storeSettings()}setFhGhItems(I){this.settings.fhGhItems=I,this.storeSettings()}setFhStyle(I){this.settings.fhStyle=I,this.settings.automaticTheme&&(this.settings.fhStyle&&"default"==this.settings.theme?this.settings.theme="fh":!this.settings.fhStyle&&"fh"==this.settings.theme&&(this.settings.theme="default")),this.storeSettings()}setFontsize(I){this.settings.fontsize=I,this.storeSettings()}setFullscreen(I){this.settings.fullscreen=I,this.storeSettings()}setGlobalFontsize(I){this.settings.globalFontsize=I,this.storeSettings()}setHideAbsent(I){this.settings.hideAbsent=I,this.storeSettings()}setHideStats(I){this.settings.hideStats=I,this.storeSettings()}setHints(I){this.settings.hints=I,this.storeSettings()}setInitiativeRequired(I){this.settings.initiativeRequired=I,this.storeSettings()}setInteractiveAbilities(I){this.settings.interactiveAbilities=I,this.storeSettings()}setLocale(I){var Q=this;return(0,t.Z)(function*(){Q.settings.locale=I,yield Q.updateLocale(I),Q.storeSettings()})()}setLootDeck(I){this.settings.lootDeck=I,this.storeSettings()}setMaxUndo(I){this.settings.maxUndo=I,this.storeSettings()}setMonsters(I){this.settings.monsters=I,this.storeSettings()}setMoveElements(I){this.settings.moveElements=I,this.storeSettings()}setPartySheet(I){this.settings.partySheet=I,this.storeSettings()}setPortraitMode(I){this.settings.portraitMode=I,this.storeSettings()}setPressDoubleClick(I){this.settings.pressDoubleClick=I,this.storeSettings()}setRandomStandees(I){this.settings.randomStandees=I,this.storeSettings()}setScenarioNumberInput(I){this.settings.scenarioNumberInput=I,this.storeSettings()}setScenarioRooms(I){this.settings.scenarioRooms=I,this.storeSettings()}setScenarioRules(I){this.settings.scenarioRules=I,this.storeSettings()}setServerAutoconnect(I){this.settings.serverAutoconnect=I,this.storeSettings()}setServer(I,Q,lt){this.settings.serverUrl=I,this.settings.serverPort=Q,this.settings.serverPassword=lt,this.storeSettings()}setServerSettings(I){this.settings.serverSettings=I,I?tt.v.stateManager.requestSettings():this.storeSettings()}setServerWss(I){this.settings.serverWss=I,this.storeSettings()}setShowAllSections(I){this.settings.showAllSections=I,this.storeSettings()}setShowBossMonster(I){this.settings.showBossMonster=I,this.storeSettings()}setShowExpandedAbilityCard(I){this.settings.showExpandedAbilityCard=I,this.storeSettings()}setShowFullAbilityCard(I){this.settings.showFullAbilityCard=I,this.storeSettings()}setShowHiddenMonster(I){this.settings.showHiddenMonster=I,this.storeSettings()}setShowOnlyUnfinishedScenarios(I){this.settings.showOnlyUnfinishedScenarios=I,this.storeSettings()}setTheme(I){this.settings.theme=I,this.storeSettings()}setTooltips(I){this.settings.tooltips=I,this.storeSettings()}setTreasuresLoot(I){this.settings.treasuresLoot=I,this.storeSettings()}setTreasures(I){this.settings.treasures=I,this.storeSettings()}setZoom(I){this.settings.zoom=I,this.storeSettings()}addSpoiler(I){-1==this.settings.spoilers.indexOf(I)&&(this.settings.spoilers.push(I),this.sortSpoilers(),this.storeSettings())}addSpoilers(I){for(let Q of I)-1==this.settings.spoilers.indexOf(Q.name)&&this.settings.spoilers.push(Q.name);this.storeSettings()}removeSpoiler(I){-1!=this.settings.spoilers.indexOf(I)&&(this.settings.spoilers.splice(this.settings.spoilers.indexOf(I),1),this.storeSettings())}removeAllSpoilers(){this.settings.spoilers=[],this.storeSettings()}addEdition(I){-1==this.settings.editions.indexOf(I)&&(this.settings.editions.push(I),this.storeSettings())}removeEdition(I){this.settings.editions.splice(this.settings.editions.indexOf(I),1),this.storeSettings()}sortSpoilers(){this.settings.spoilers.sort((I,Q)=>I.toLowerCase()>Q.toLowerCase()?1:I.toLowerCase(){if(H.ok)return H.json();console.warn("Invalid data url: "+I+" ["+H.statusText+"]")}).then(H=>-1==tt.v.editions(!0).indexOf(H.edition)||Q?(Q&&(tt.v.editionData=tt.v.editionData.filter(Jt=>Jt.url!=I)),H.characters=H.characters||[],H.monsters=H.monsters||[],H.decks=H.decks||[],H.scenarios=H.scenarios||[],H.sections=H.sections||[],H.items=H.items||[],H.conditions=H.conditions||[],H.battleGoals=H.battleGoals||[],H.events=H.events||[],H.personalQuests=H.personalQuests||[],H.label=H.label||{},H.labelSpoiler=H.labelSpoiler||{},H.url=I,H.logoUrl=H.logoUrl||"",H.additional=H.additional||!1,H.extensions=H.extensions||[],H.newAmStyle=H.newAmStyle||!1,H.treasures=H.treasures||[],H.treasureOffset=H.treasureOffset||0,H.campaign&&H.campaign.buildings&&(H.campaign.buildings=H.campaign.buildings.map(Jt=>Object.assign(new it.U9,Jt))),H.battleGoals.map((Jt,bt)=>(Jt.edition||(Jt.edition=H.edition),Jt.cardId||(Jt.cardId=Jt.edition+"-"+(bt+1)),Jt)),H.events.map((Jt,bt)=>(Jt.edition||(Jt.edition=H.edition),Jt.cardId||(Jt.cardId=bt+1),Jt)),H.personalQuests.map((Jt,bt)=>(Jt.edition||(Jt.edition=H.edition),Jt.cardId||(Jt.cardId=H.edition+"-"+(bt+1)),Jt)),tt.v.editionData.push(H),tt.v.editionData.sort((Jt,bt)=>lt.settings.editionDataUrls.indexOf(Jt.url)-lt.settings.editionDataUrls.indexOf(bt.url)),-1!=st.settings.editions.indexOf(H.edition)?lt.loadDataLabel(H):lt.loadEditionLabel(H),!0):(console.warn("Edition already exists: "+H.edition),!1))}catch(_t){return console.warn("Invalid data url: "+I+" ["+_t+"]"),!1}})()}validateEditionData(){X.checkDuplicates(),X.checkScenarioMonster(),X.checkSectionMonster(),X.checkMissingScenarioMonster(),X.checkMissingSectionMonster(),X.checkMonsterUsage(),X.checkMonsterBossCount()}loadDataLabel(I){this.label.data||(this.label.data={}),this.settings.locale!=this.defaultLocale&&I.label&&I.label[this.defaultLocale]&&(this.label.data=this.merge(this.label.data,!1,I.label[this.defaultLocale]),I.labelSpoiler&&I.labelSpoiler[this.defaultLocale]&&(this.label.data=this.merge(this.label.data,!1,I.labelSpoiler[this.defaultLocale]))),I.label&&I.label[this.settings.locale]&&(this.label.data=this.merge(this.label.data,!0,I.label[this.settings.locale])),I.labelSpoiler&&I.labelSpoiler[this.settings.locale]&&(this.label.data=this.merge(this.label.data,!0,I.labelSpoiler[this.settings.locale])),this.label.data.edition||(this.label.data.edition={}),this.label.data.character||(this.label.data.character={}),this.label.data.monster||(this.label.data.monster={}),this.label.data.deck||(this.label.data.deck={}),this.label.data.ability||(this.label.data.ability={}),this.label.data.scenario||(this.label.data.scenario={}),this.label.data.partyAchievements||(this.label.data.partyAchievements={}),this.label.data.globalAchievements||(this.label.data.globalAchievements={}),this.label.data.campaignSticker||(this.label.data.campaignSticker={}),this.label.data.scenario.group||(this.label.data.scenario.group={}),this.label.data.section||(this.label.data.section={}),this.label.data.objective||(this.label.data.objective={}),this.label.data.summon||(this.label.data.summon={}),this.label.data.battleGoals||(this.label.data.battleGoals={}),this.label.data.personalQuest||(this.label.data.personalQuest={}),this.label.data.items||(this.label.data.items={})}loadEditionLabel(I){this.label.data||(this.label.data={}),this.label.data.edition||(this.label.data.edition={}),this.settings.locale!=this.defaultLocale&&I.label&&I.label[this.defaultLocale]&&I.label[this.defaultLocale].edition&&(this.label.data.edition=this.merge(this.label.data.edition,!1,I.label[this.defaultLocale].edition)),I.label&&I.label[this.settings.locale]&&I.label[this.settings.locale].edition&&(this.label.data.edition=this.merge(this.label.data.edition,!0,I.label[this.settings.locale].edition))}isObject(I){return I&&"object"==typeof I&&!Array.isArray(I)}merge(I,Q,...lt){if(!lt.length)return I;const _t=I;if(this.isObject(_t)){const H=lt.length;for(let Jt=0;JtQ.url==I))return tt.v.editionData.find(Q=>Q.url==I)?.edition;console.error("No edition data found for url '"+I+"'")}addEditionDataUrl(I){var Q=this;return(0,t.Z)(function*(){return!(-1!=Q.settings.editionDataUrls.indexOf(I)||!(yield Q.loadEditionData(I))||(Q.settings.editionDataUrls.push(I),tt.v.editionData.sort((_t,H)=>Q.settings.editionDataUrls.indexOf(_t.url)-Q.settings.editionDataUrls.indexOf(H.url)),-1!=Q.settings.excludeEditionDataUrls.indexOf(I)&&Q.settings.excludeEditionDataUrls.splice(Q.settings.excludeEditionDataUrls.indexOf(I),1),Q.storeSettings(),0))})()}removeEditionDataUrl(I){var Q=this;return(0,t.Z)(function*(){-1!=Q.settings.editionDataUrls.indexOf(I)&&(tt.v.editionData=tt.v.editionData.filter(lt=>lt.url!=I),Q.settings.editionDataUrls.splice(Q.settings.editionDataUrls.indexOf(I),1),-1!=Q.defaultEditionDataUrls.indexOf(I)&&Q.settings.excludeEditionDataUrls.push(I),Q.storeSettings())})()}restoreDefaultEditionDataUrls(){var I=this;return(0,t.Z)(function*(){for(let Q of I.defaultEditionDataUrls)-1==I.settings.editionDataUrls.indexOf(Q)&&(I.settings.editionDataUrls.push(Q),yield I.loadEditionData(Q));I.settings.editionDataUrls.sort((Q,lt)=>-1!=I.defaultEditionDataUrls.indexOf(Q)&&-1!=I.defaultEditionDataUrls.indexOf(lt)?I.defaultEditionDataUrls.indexOf(Q)-I.defaultEditionDataUrls.indexOf(lt):-1!=I.defaultEditionDataUrls.indexOf(Q)&&-1==I.defaultEditionDataUrls.indexOf(lt)?-1:-1==I.defaultEditionDataUrls.indexOf(Q)&&-1!=I.defaultEditionDataUrls.indexOf(lt)?1:I.settings.editionDataUrls.indexOf(Q)-I.settings.editionDataUrls.indexOf(lt)),tt.v.editionData.sort((Q,lt)=>I.settings.editionDataUrls.indexOf(Q.url)-I.settings.editionDataUrls.indexOf(lt.url)),I.storeSettings()})()}updateLocale(I){var Q=this;return(0,t.Z)(function*(){I!=Q.defaultLocale&&(yield fetch("./assets/locales/"+Q.defaultLocale+".json").then(lt=>lt.json()).then(lt=>{Q.label=Q.merge(Q.label,!1,lt)}).catch(lt=>{console.error("Invalid locale: "+I,lt)})),yield fetch("./assets/locales/"+I+".json").then(lt=>lt.json()).then(lt=>{Q.label=Q.merge(Q.label,!0,lt)}).catch(lt=>{console.error("Invalid locale: "+I,lt)}),Q.label.data={};for(let lt of tt.v.editionData)Q.loadDataLabel(lt);tt.v.uiChange.emit()})()}getLabel(I,Q=[],lt=!0,_t=!1,H="",Jt=this.label){if(I+="",!Jt)return _t?this.emptyLabel(I,Q,H):H&&I?this.getLabel(I):I||"";if(Jt[I])return"object"==typeof Jt[I]?Jt[I]["."]?this.insertLabelArguments(Jt[I]["."],Q,lt):_t?this.emptyLabel(I,Q,H):H&&I?this.getLabel(I):I||"":this.insertLabelArguments(Jt[I],Q,lt);{if("data.monster."==H){const Tt=I.match(/(.+)\-(scenario|section)\-(.+)/);if(Tt)return this.insertLabelArguments(Jt[I=Tt[1]],Q,lt)+" #"+Tt[3]}let bt=I.split(".");if(Jt[bt[0]])return I=bt.slice(1,bt.length).join("."),this.getLabel(I,Q,lt,_t,H+bt[0]+".",Jt[bt[0]])}return _t?this.emptyLabel(I,Q,H):H&&I?this.getLabel(I):I||""}emptyLabel(I,Q,lt){return I+(Q&&Q.length>0?" ["+Q+"]":"")}insertLabelArguments(I,Q,lt){if(Q)for(let _t in Q)for(;-1!=I.indexOf(`{${_t}}`);)if(I=I.replace(`{${_t}}`,lt?this.getLabel(Q[_t]):Q[_t]),-1!=Q[_t].indexOf(`{${_t}}`)){console.warn("Loop for '"+I+"'",Q[_t]);break}return I}}},3306:(q,nt,E)=>{"use strict";E.d(nt,{j:()=>at});var t=E(5861),x=E(1180),G=E(3329);const at=new class tt{constructor(){(0,x.Z)(this,"db",void 0)}init(){return new Promise((K,dt)=>{if(window.indexedDB){const X=window.indexedDB.open("ghs-db",1);X.onupgradeneeded=et=>{console.debug("Upgrade DB",et);const st=et.target.result;et.oldVersion<1&&(st.createObjectStore("game"),st.createObjectStore("settings"),st.createObjectStore("undo",{autoIncrement:!0}),st.createObjectStore("redo",{autoIncrement:!0}),st.createObjectStore("undo-infos",{autoIncrement:!0}),st.createObjectStore("game-backup",{autoIncrement:!0}))},X.onsuccess=et=>{this.db=et.target.result,localStorage.getItem("ghs-game")&&this.migrate(),K(!0)},X.onerror=et=>{this.db=void 0,console.error("db error",X.error,et),console.warn("No IndexedDB, fallback to Local Storage"),dt(!1)}}else this.db=void 0,console.warn("No IndexedDB, fallback to Local Storage"),dt(!1)})}writeGameModel(K){return this.write("game","default",K)}readGameModel(){return this.read("game","default")}addBackup(K){if(this.db)this.write("game-backup",void 0,K);else{let dt=1,X=localStorage.getItem("ghs-game-backup-"+dt);for(;X;)dt++,X=localStorage.getItem("ghs-game-backup-"+dt);localStorage.setItem("ghs-game-backup-"+dt,JSON.stringify(K))}}read(K,dt){return new Promise((X,et)=>{if(this.db){const I=this.db.transaction(K,"readonly").objectStore(K).get(dt);I.onsuccess=Q=>{X(Q.target.result)},I.onerror=Q=>{console.error("read "+K+" failed",Q),et(Q)}}else{const st=localStorage.getItem("ghs-"+K);st?X(JSON.parse(st)):et(null)}})}write(K,dt,X){return new Promise((et,st)=>{if(this.db){const Q=this.db.transaction(K,"readwrite").objectStore(K).put(X,dt);Q.onsuccess=lt=>{et()},Q.onerror=lt=>{console.error("update "+K+" failed",lt),st()}}else localStorage.setItem("ghs-"+K,JSON.stringify(X)),et()})}remove(K,dt="default"){this.db?this.db.transaction(K,"readwrite").objectStore(K).delete(dt).onerror=gt=>{console.error("delete "+dt+" from "+K+" failed",gt)}:localStorage.removeItem("ghs-"+K)}readAll(K){return new Promise((dt,X)=>{if(this.db){const gt=this.db.transaction(K,"readonly").objectStore(K).getAll();gt.onsuccess=I=>{dt(I.target.result)},gt.onerror=I=>{console.error("read "+K+" failed",I,I.error),X(I)}}else{const et=localStorage.getItem("ghs-"+K);et?dt(JSON.parse(et)):X(null)}})}readList(K,dt,X,et=!0){return new Promise((st,gt)=>{if(this.db){const lt=this.db.transaction(K,"readonly").objectStore(K);let _t=[];const H=lt.openCursor(null,"prev");var I=!1;H.onsuccess=Jt=>{var bt=Jt.target.result;if(!I&&X>0)return I=!0,void bt.advance(X);bt?(_t.push(bt.value),_t.length{console.error("read "+K+" failed",Jt),gt(Jt)}}else{const Q=localStorage.getItem("ghs-"+K);Q?st(JSON.parse(Q).slice(X,X+dt)):gt(null)}})}writeArray(K,dt){var X=this;return(0,t.Z)(function*(){return new Promise(function(){var et=(0,t.Z)(function*(st,gt){if(X.db){yield X.clear(K).catch(I=>console.error(I));for(let I=0;Igt())}}else localStorage.setItem("ghs-"+K,JSON.stringify(dt));st()});return function(st,gt){return et.apply(this,arguments)}}())})()}clear(K=void 0){return new Promise((dt,X)=>{if(this.db)if(K){const gt=this.db.transaction(K,"readwrite").objectStore(K).clear();gt.onsuccess=I=>{dt()},gt.onerror=I=>{console.error("delete "+K+" failed",I),X(gt.error)}}else{const et=window.indexedDB.deleteDatabase("ghs-db");et.onsuccess=st=>{dt()},et.onblocked=st=>{this.db&&this.db.close()},et.onerror=st=>{console.error("delete database 'ghs-db' failed",st),X(et.error)}}else if(K)localStorage.removeItem("ghs-"+K),dt();else if(localStorage.clear(),window.indexedDB){const et=window.indexedDB.deleteDatabase("ghs-db");et.onsuccess=st=>{dt()},et.onblocked=st=>{this.db&&this.db.close()},et.onerror=st=>{console.error("delete database 'ghs-db' failed",st),X(et.error)}}else dt()})}datadump(K=!1){var dt=this;return(0,t.Z)(function*(){let X={};if(dt.db&&!K)X.game=yield dt.readGameModel(),X.settings=yield dt.read("settings","default"),X.undo=yield dt.readAll("undo"),X.redo=yield dt.readAll("redo"),X["undo-infos"]=yield dt.readAll("undo-infos"),X["game-backup"]=yield dt.readAll("game-backup");else{K||console.warn("No IndexedDB, fallback to Local Storage");for(let et=0;et{localStorage.removeItem("ghs-game")}).catch()}const X=localStorage.getItem("ghs-settings");if(X){let lt=JSON.parse(X);K.write("settings","default",Object.assign(new G.Z,lt)).then(()=>{localStorage.removeItem("ghs-settings")}).catch()}const et=localStorage.getItem("ghs-undo");if(null!=et){let lt=JSON.parse(et),_t=1,H=localStorage.getItem("ghs-undo-"+_t);for(;H;){const Jt=JSON.parse(H);lt.push(...Jt),_t++,H=localStorage.getItem("ghs-undo-"+_t)}K.writeArray("undo",lt).then(()=>{localStorage.removeItem("ghs-undo");let Jt=localStorage.getItem("ghs-undo-"+_t);for(;Jt;)localStorage.removeItem("ghs-undo-"+_t),_t++,Jt=localStorage.getItem("ghs-undo-"+_t)}).catch()}const st=localStorage.getItem("ghs-redo");if(null!=st){let lt=JSON.parse(st),_t=1,H=localStorage.getItem("ghs-redo-"+_t);for(;H;){const Jt=JSON.parse(H);lt.push(...Jt),_t++,H=localStorage.getItem("ghs-redo-"+_t)}K.writeArray("redo",lt).then(()=>{localStorage.removeItem("ghs-redo");let Jt=localStorage.getItem("ghs-redo-"+_t);for(;Jt;)localStorage.removeItem("ghs-redo-"+_t),_t++,Jt=localStorage.getItem("ghs-redo-"+_t)}).catch()}const gt=localStorage.getItem("ghs-undo-infos");if(null!=gt){let lt=JSON.parse(gt),_t=1,H=localStorage.getItem("ghs-undo-infos-"+_t);for(;H;){const Jt=JSON.parse(H);lt.push(...Jt),_t++,H=localStorage.getItem("ghs-undo-infos-"+_t)}K.writeArray("undo-infos",lt).then(()=>{localStorage.removeItem("ghs-undo-infos");let Jt=localStorage.getItem("ghs-undo-infos-"+_t);for(;Jt;)localStorage.removeItem("ghs-undo-infos-"+_t),_t++,Jt=localStorage.getItem("ghs-undo-infos-"+_t)}).catch()}let I=1,Q=localStorage.getItem("ghs-game-backup-"+I);for(;Q;)K.write("game-backup",void 0,Q).then(()=>{localStorage.removeItem("ghs-game-backup-"+I)}).catch(),I++,Q=localStorage.getItem("ghs-game-backup-"+I)})()}}},5609:(q,nt,E)=>{"use strict";E.d(nt,{z:()=>et});var t=E(1180),x=E(2736),G=E(3788),tt=E(8272),at=E(5604),it=E(377),K=E(9310),dt=E(3165),X=E(2098);class et extends G.x3{getInitiative(){return this.absent?200:this.exhausted||this.longRest||this.health<=0?100:this.initiative}constructor(I,Q){super(I),(0,t.Z)(this,"title",""),(0,t.Z)(this,"initiative",0),(0,t.Z)(this,"experience",0),(0,t.Z)(this,"loot",0),(0,t.Z)(this,"lootCards",[]),(0,t.Z)(this,"treasures",[]),(0,t.Z)(this,"exhausted",!1),(0,t.Z)(this,"stat",void 0),(0,t.Z)(this,"summons",[]),(0,t.Z)(this,"identity",0),(0,t.Z)(this,"progress",void 0),(0,t.Z)(this,"donations",0),(0,t.Z)(this,"initiativeVisible",!1),(0,t.Z)(this,"attackModifierDeckVisible",!1),(0,t.Z)(this,"lootCardsVisible",!1),(0,t.Z)(this,"itemsVisible",!1),(0,t.Z)(this,"fullview",!1),(0,t.Z)(this,"attackModifierDeck",void 0),(0,t.Z)(this,"token",0),(0,t.Z)(this,"tokenValues",[]),(0,t.Z)(this,"absent",!1),(0,t.Z)(this,"longRest",!1),(0,t.Z)(this,"battleGoals",[]),(0,t.Z)(this,"battleGoal",!1),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"type","character"),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"number",0),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.errors=I.errors||[],Q<1?Q=1:Q>9&&(Q=9);const lt=this.stats.find(_t=>_t.level==Q);lt?(this.stat=lt,this.level=Q,this.maxHealth=this.stat.health):(!this.errors.find(_t=>_t.type==it.r.unknown)&&!this.errors.find(_t=>_t.type==it.r.stat)&&(console.error("No character stat found for level: "+Q),this.errors.push(new it.o(it.r.stat,"character",I.name,I.edition,"",""+Q))),this.stat=new x.a(Q,0),this.level=0,this.maxHealth=0),this.health=this.maxHealth,this.progress=new dt.f,this.attackModifierDeck=at.v.attackModifierManager.buildCharacterAttackModifierDeck(this),this.tokens.forEach((_t,H)=>{this.tokenValues[H]=this.tokenValues[H]||0}),this.availableSummons.forEach(_t=>_t.edition=this.edition)}toModel(){return new st(this.name,this.edition,this.marker,this.title,this.initiative,this.experience,this.loot,this.lootCards||[],this.treasures&&this.treasures.map(I=>""+I)||[],this.exhausted,this.level,this.off,this.active,this.health,this.maxHealth,this.entityConditions.map(I=>I.toModel()),this.immunities,this.markers,this.tags||[],this.identity,this.summons.map(I=>I.toModel()),this.progress,this.initiativeVisible,this.attackModifierDeckVisible,this.lootCardsVisible,this.itemsVisible,this.number,this.attackModifierDeck.toModel(),this.donations,this.token,this.tokenValues,this.absent,this.longRest,this.battleGoals,this.battleGoal)}fromModel(I){if(this.edition=I.edition,!this.edition){const lt=at.v.charactersData().find(_t=>_t.name==I.name);this.edition=lt?lt.edition:""}if(this.marker=I.marker||this.marker,this.title=I.title,(!this.initiativeVisible||I.initiative<=0||this.initiative!=I.initiative)&&(this.initiativeVisible=I.initiativeVisible),I.number)this.number=I.number;else for(this.number=1;at.v.game.figures.some(lt=>lt instanceof et&&(lt.name!=this.name||lt.edition!=this.edition)&<.number==this.number);)this.number++;this.initiative=I.initiative,this.experience=I.experience,this.loot=I.loot,this.lootCards=I.lootCards||[],this.treasures=I.treasures&&I.treasures.map(lt=>isNaN(+lt)?lt:+lt)||[],this.exhausted=I.exhausted,this.level=I.level,this.off=I.off,this.active=I.active,this.health=I.health,this.maxHealth=I.maxHealth,this.entityConditions=[],I.entityConditions&&(this.entityConditions=I.entityConditions.map(lt=>{let _t=new K.hT(lt.name,lt.value);return _t.fromModel(lt),_t})),this.immunities=I.immunities||[],this.markers=I.markers||this.markers,this.tags=I.tags||this.tags,this.identity=I.identity||0,this.summons=this.summons.filter(lt=>I.summons.some(_t=>_t.uuid&&_t.uuid==lt.uuid)),I.summons.forEach((lt,_t)=>{let H=this.summons.find(Jt=>lt.uuid==Jt.uuid);H||(H=new tt.eU(lt.uuid,lt.name,lt.cardId,lt.level,lt.number,lt.color),this.summons.splice(_t,0,H)),H.fromModel(lt)}),this.summons.sort((lt,_t)=>I.summons.map(H=>H.uuid).indexOf(lt.uuid)-I.summons.map(H=>H.uuid).indexOf(_t.uuid)),this.progress=new dt.f,I.progress&&(this.progress=Object.assign(new dt.f,I.progress));let Q=at.v.attackModifierManager.buildCharacterAttackModifierDeck(this);I.attackModifierDeck&&at.v.attackModifierManager.fromModel(Q,I.attackModifierDeck),this.mergeAttackModifierDeck(Q),I.attackModifierDeckVisible&&(this.attackModifierDeckVisible=!0),I.lootCardsVisible&&(this.lootCardsVisible=!0),I.itemsVisible&&(this.itemsVisible=!0),this.donations=I.donations||0,this.token=I.token||0,this.tokenValues=I.tokenValues||[],this.tokens.forEach((lt,_t)=>{this.tokenValues[_t]=this.tokenValues[_t]||0}),this.absent=I.absent,this.longRest=I.longRest,this.battleGoals=I.battleGoals||0,this.battleGoal=I.battleGoal}mergeAttackModifierDeck(I){let Q=!1;return this.attackModifierDeck||(this.attackModifierDeck=new X.ut,Q=!0),(I.disgarded.length!=this.attackModifierDeck.disgarded.length||!I.disgarded.every((lt,_t)=>this.attackModifierDeck.disgarded.indexOf(lt)==_t))&&(this.attackModifierDeck.disgarded=I.disgarded,Q=!0),this.attackModifierDeck.current!=I.current&&(this.attackModifierDeck.current=I.current,Q=!0),(this.attackModifierDeck.attackModifiers.length!=I.attackModifiers.length||!this.attackModifierDeck.attackModifiers.map(lt=>lt.id).every((lt,_t)=>I.attackModifiers[_t].id==lt))&&(this.attackModifierDeck.attackModifiers=I.attackModifiers,Q=!0),(this.attackModifierDeck.cards.length!=I.cards.length||!this.attackModifierDeck.cards.map(lt=>lt.id).every((lt,_t)=>I.cards[_t].id==lt))&&(this.attackModifierDeck.cards=I.cards,Q=!0),Q}}class st{constructor(I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt,wt,Zt,qt,Wt,Ie,ue,We,ve,_n,be,en,St,kt,It,Ut,Et,Yt,Ce,me,wn,xe,ke,Ft){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"initiative",void 0),(0,t.Z)(this,"experience",void 0),(0,t.Z)(this,"loot",void 0),(0,t.Z)(this,"lootCards",void 0),(0,t.Z)(this,"treasures",void 0),(0,t.Z)(this,"exhausted",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),(0,t.Z)(this,"identity",void 0),(0,t.Z)(this,"summons",void 0),(0,t.Z)(this,"progress",void 0),(0,t.Z)(this,"initiativeVisible",void 0),(0,t.Z)(this,"attackModifierDeckVisible",void 0),(0,t.Z)(this,"lootCardsVisible",void 0),(0,t.Z)(this,"itemsVisible",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"attackModifierDeck",void 0),(0,t.Z)(this,"donations",void 0),(0,t.Z)(this,"token",void 0),(0,t.Z)(this,"tokenValues",void 0),(0,t.Z)(this,"absent",void 0),(0,t.Z)(this,"longRest",void 0),(0,t.Z)(this,"battleGoals",void 0),(0,t.Z)(this,"battleGoal",void 0),this.name=I,this.edition=Q,this.marker=lt,this.title=_t,this.initiative=H,this.experience=Jt,this.loot=bt,this.lootCards=JSON.parse(JSON.stringify(Tt)),this.treasures=JSON.parse(JSON.stringify(Rt)),this.exhausted=Dt,this.level=Ht,this.off=jt,this.active=wt,this.health=Zt,this.maxHealth=qt,this.entityConditions=JSON.parse(JSON.stringify(Wt)),this.immunities=JSON.parse(JSON.stringify(Ie)),this.markers=JSON.parse(JSON.stringify(ue)),this.tags=JSON.parse(JSON.stringify(We)),this.identity=ve,this.summons=_n,this.progress=JSON.parse(JSON.stringify(be)),this.initiativeVisible=en,this.attackModifierDeckVisible=St,this.lootCardsVisible=kt,this.itemsVisible=It,this.number=Ut,this.attackModifierDeck=Et,this.donations=Yt,this.token=Ce,this.tokenValues=JSON.parse(JSON.stringify(me)),this.absent=wn,this.longRest=xe,this.battleGoals=JSON.parse(JSON.stringify(ke)),this.battleGoal=Ft}}},3165:(q,nt,E)=>{"use strict";E.d(nt,{f:()=>x});var t=E(1180);class x{constructor(){(0,t.Z)(this,"experience",0),(0,t.Z)(this,"gold",0),(0,t.Z)(this,"loot",{}),(0,t.Z)(this,"itemNotes",""),(0,t.Z)(this,"items",[]),(0,t.Z)(this,"equippedItems",[]),(0,t.Z)(this,"personalQuest",""),(0,t.Z)(this,"personalQuestProgress",[]),(0,t.Z)(this,"battleGoals",0),(0,t.Z)(this,"notes",""),(0,t.Z)(this,"retired",!1),(0,t.Z)(this,"retirements",0),(0,t.Z)(this,"extraPerks",0),(0,t.Z)(this,"perks",[]),(0,t.Z)(this,"masteries",[]),(0,t.Z)(this,"donations",0)}}},3157:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{GB:()=>EntityExpressionRegex,HY:()=>EntityValueRegex,et:()=>EntityValueRegexExtended,j9:()=>EntityValueFunction});var _businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5604),_Game__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6565);const EntityExpressionRegex=/^([xCL0-9\.\+\/\-\*\(\)\=\?\:\|\s\>\<]+)$/,EntityValueRegex=/\[([xCL0-9\.\+\/\-\*\(\)\=\?\:\|\s\>\<]+)(\{(.*)\})?\]/,EntityValueRegexExtended=/\[([a-zA-Z0-9\.\+\/\-\*\(\)\=\?\:\|\s\>\<]+)(\{(.*)\})?\]/;function EntityValueFunction(value,L=void 0){if(!value)return 0;if("number"==typeof value)return value;let expression=value,func;const match=value.match(EntityValueRegex);match&&match[0].length==value.length&&(expression=match[1],func=match[3]),null==L&&(L=_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.game.level),expression=expression.replace(/[x]/g,"*"),expression=expression.replace(/[C]/g,""+Math.max(2,_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.characterManager.characterCount())),expression=expression.replace(/[L]/g,""+L),expression=expression.replace(/[P]/g,""+_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.prosperityLevel()),expression=expression.replace(/[R]/g,""+(_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.game.round+(_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.game.state==_Game__WEBPACK_IMPORTED_MODULE_1__.D2.draw?1:0)));let result=0;try{result=eval(expression)}catch(q){return console.warn("Could not evaluate expression: "+expression,q),0}if(func&&func.startsWith("$")&&(func=func.replace("$","")),func)switch(func){case"math.ceil":result=Math.ceil(result);break;case"math.floor":result=Math.floor(result);break;default:console.error("Unknown expression: "+func+"("+match+")")}return Math.round(result)}},6565:(q,nt,E)=>{"use strict";E.d(nt,{D2:()=>Q,i4:()=>lt,lA:()=>I});var t=E(1180),x=E(5604),G=E(2098),tt=E(5609),at=E(6140),it=E(6441),K=E(7177),dt=E(9120),X=E(9048),et=E(4756),st=E(731),gt=E(5601);class I{constructor(){(0,t.Z)(this,"revision",0),(0,t.Z)(this,"revisionOffset",0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"battleGoalEditions",[]),(0,t.Z)(this,"filteredBattleGoals",[]),(0,t.Z)(this,"figures",[]),(0,t.Z)(this,"entitiesCounter",[]),(0,t.Z)(this,"state",Q.draw),(0,t.Z)(this,"scenario",void 0),(0,t.Z)(this,"sections",[]),(0,t.Z)(this,"scenarioRules",[]),(0,t.Z)(this,"disgardedScenarioRules",[]),(0,t.Z)(this,"level",1),(0,t.Z)(this,"levelCalculation",!0),(0,t.Z)(this,"levelAdjustment",0),(0,t.Z)(this,"bonusAdjustment",0),(0,t.Z)(this,"ge5Player",!0),(0,t.Z)(this,"playerCount",-1),(0,t.Z)(this,"round",0),(0,t.Z)(this,"roundResets",[]),(0,t.Z)(this,"roundResetsHidden",[]),(0,t.Z)(this,"playSeconds",0),(0,t.Z)(this,"totalSeconds",0),(0,t.Z)(this,"monsterAttackModifierDeck",new G.ut),(0,t.Z)(this,"allyAttackModifierDeck",new G.ut),(0,t.Z)(this,"elementBoard",void 0),(0,t.Z)(this,"solo",!1),(0,t.Z)(this,"party",void 0),(0,t.Z)(this,"parties",void 0),(0,t.Z)(this,"lootDeck",new it._8),(0,t.Z)(this,"lootDeckEnhancements",[]),(0,t.Z)(this,"lootDeckFixed",[]),(0,t.Z)(this,"lootDeckSections",[]),(0,t.Z)(this,"unlockedCharacters",[]),(0,t.Z)(this,"server",!1),(0,t.Z)(this,"finish",void 0),this.elementBoard=JSON.parse(JSON.stringify(at.Jq)),this.party=new X.f,this.parties=[this.party]}toModel(){return new lt(this.revision,this.revisionOffset,this.edition,this.conditions,this.battleGoalEditions,this.filteredBattleGoals,this.figures.map(H=>H instanceof dt.CH&&H.uuid?H.uuid:H.edition+"-"+H.name),this.entitiesCounter,this.figures.filter(H=>H instanceof tt.z).map(H=>H.toModel()),this.figures.filter(H=>H instanceof K.Q).map(H=>H.toModel()),this.figures.filter(H=>H instanceof dt.CH).map(H=>H.toModel()),this.figures.filter(H=>H instanceof gt.k).map(H=>H.toModel()),this.state,this.scenario&&x.v.scenarioManager.toModel(this.scenario,this.scenario.revealedRooms,this.scenario.custom,this.scenario.custom?this.scenario.name:"")||void 0,this.sections.map(H=>x.v.scenarioManager.toModel(H,H.revealedRooms)),this.scenarioRules.map(H=>H.identifier),this.disgardedScenarioRules,this.level,this.levelCalculation,this.levelAdjustment,this.bonusAdjustment,this.ge5Player,this.playerCount,this.round,this.roundResets,this.roundResetsHidden,this.playSeconds,this.totalSeconds,this.monsterAttackModifierDeck.toModel(),this.allyAttackModifierDeck.toModel(),this.elementBoard,this.solo,this.party,this.parties,this.lootDeck,this.lootDeckEnhancements,this.lootDeckFixed,this.lootDeckSections,this.unlockedCharacters,this.server,this.finish)}fromModel(H,Jt=!1){if(this.revision=H.revision||0,this.revisionOffset=H.revisionOffset||0,this.edition=H.edition,this.conditions=H.conditions||[],this.battleGoalEditions=H.battleGoalEditions||[],this.filteredBattleGoals=H.filteredBattleGoals||[],this.figures=this.figures.filter(bt=>-1!=H.characters.map(Tt=>Tt.name).indexOf(bt.name)||-1!=H.monsters.map(Tt=>Tt.name).indexOf(bt.name)||-1!=H.objectives.map(Tt=>Tt.name).indexOf(bt.name)||H.objectiveContainers&&-1!=H.objectiveContainers.map(Tt=>Tt.name).indexOf(bt.name)),this.entitiesCounter=H.entitiesCounter||[],H.characters.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof tt.z&&Rt.name==bt.name&&Rt.edition==bt.edition);Tt||(Tt=new tt.z(x.v.getCharacterData(bt.name,bt.edition),bt.level),this.figures.push(Tt)),Tt.fromModel(bt)}),H.monsters.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof K.Q&&Rt.name==bt.name&&Rt.edition==bt.edition);Tt||(Tt=new K.Q(x.v.getMonsterData(bt.name,bt.edition)),this.figures.push(Tt)),Tt.fromModel(bt)}),this.figures=this.figures.filter(bt=>!(bt instanceof dt.CH)||H.objectives.some(Tt=>Tt.uuid&&Tt.uuid==bt.uuid)),H.objectives.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof dt.CH&&bt.uuid&&Rt.uuid==bt.uuid);if(!Tt){if(!bt.id)for(bt.id=0;this.figures.some(Rt=>Rt instanceof dt.CH&&Rt.id==bt.id);)bt.id++;Tt=new dt.CH(bt.uuid,bt.id,bt.objectiveId),this.figures.push(Tt)}Tt.fromModel(bt)}),H.objectiveContainers&&(this.figures=this.figures.filter(bt=>!(bt instanceof gt.k)||H.objectiveContainers&&H.objectiveContainers.some(Tt=>Tt.uuid&&Tt.uuid==bt.uuid)),H.objectiveContainers.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof gt.k&&Rt.uuid==bt.uuid);Tt||(Tt=new gt.k(bt.uuid,bt.objectiveId),this.figures.push(Tt)),Tt.fromModel(bt)})),this.figures.sort((bt,Tt)=>{const Dt=Tt instanceof dt.CH&&Tt.uuid?Tt.uuid:Tt.edition+"-"+Tt.name;return H.figures.indexOf(bt instanceof dt.CH&&bt.uuid?bt.uuid:bt.edition+"-"+bt.name)-H.figures.indexOf(Dt)}),this.state=H.state,H.scenario){const bt=x.v.scenarioManager.scenarioDataForModel(H.scenario);this.scenario=bt?new et.$4(bt,H.scenario.revealedRooms||[],H.scenario.isCustom):void 0}else this.scenario=void 0;if(this.sections=[],H.sections.forEach(bt=>{const Tt=x.v.scenarioManager.sectionDataForModel(bt);Tt&&this.sections.push(new et.$4(Tt,bt.revealedRooms||[]))}),this.level=H.level,this.scenarioRules=[],H.scenarioRules&&H.scenarioRules.forEach(bt=>{const Tt=x.v.scenarioRulesManager.getScenarioForRule(bt).scenario;Tt&&Tt.rules&&Tt.rules.length>bt.index&&(Tt.rules[bt.index].spawns&&Tt.rules[bt.index].spawns.forEach(Rt=>{Rt.manual&&!Rt.count&&(Rt.count="1")}),this.scenarioRules.push({identifier:bt,rule:Tt.rules[bt.index]}))}),this.disgardedScenarioRules=H.disgardedScenarioRules,this.levelCalculation=H.levelCalculation,this.levelAdjustment=H.levelAdjustment,this.bonusAdjustment=H.bonusAdjustment,this.ge5Player=H.ge5Player,this.playerCount=H.playerCount||-1,this.round=H.round,this.roundResets=H.roundResets||[],this.roundResetsHidden=H.roundResetsHidden||[],(Jt&&!H.server||H.playSeconds>this.playSeconds)&&(this.playSeconds=H.playSeconds),(Jt&&!H.server||H.totalSeconds>this.totalSeconds)&&(this.totalSeconds=H.totalSeconds),this.monsterAttackModifierDeck=this.monsterAttackModifierDeck||new G.ut,H.monsterAttackModifierDeck&&H.monsterAttackModifierDeck.cards&&H.monsterAttackModifierDeck.cards.length>0&&x.v.attackModifierManager.fromModel(this.monsterAttackModifierDeck,H.monsterAttackModifierDeck),this.allyAttackModifierDeck=this.allyAttackModifierDeck||new G.ut,H.allyAttackModifierDeck&&H.allyAttackModifierDeck.cards&&H.allyAttackModifierDeck.cards.length>0&&x.v.attackModifierManager.fromModel(this.allyAttackModifierDeck,H.allyAttackModifierDeck),this.elementBoard=this.elementBoard||at.Jq,H.elementBoard&&H.elementBoard.forEach((bt,Tt)=>this.elementBoard[Tt].state=bt.state),this.solo=H.solo,this.party=H.party?JSON.parse(JSON.stringify(H.party)):new X.f,this.party.achievementsList){const bt=st.r.label.data.partyAchievements;this.party.achievementsList=this.party.achievementsList.filter(Tt=>Tt),this.party.achievementsList=this.party.achievementsList.map(Tt=>{let Rt=Tt;return Object.keys(bt).forEach(Dt=>{bt[Dt].toLowerCase()==Rt.toLowerCase()&&(Rt=Dt)}),Rt})}if(this.party.globalAchievementsList){const bt=st.r.label.data.globalAchievements;this.party.globalAchievementsList=this.party.globalAchievementsList.filter(Tt=>Tt),this.party.globalAchievementsList=this.party.globalAchievementsList.map(Tt=>{let Rt=Tt;return Object.keys(bt).forEach(Dt=>{bt[Dt].toLowerCase()==Rt.toLowerCase()&&(Rt=Dt)}),Rt})}if(this.party.campaignStickers&&(this.party.campaignStickers=this.party.campaignStickers.filter(bt=>bt)),this.party.manualScenarios){let bt=[];this.party.manualScenarios.forEach(Tt=>{if("fh"==Tt.edition&&!Tt.group&&!Tt.custom){const Rt=x.v.sectionData("fh").find(Dt=>Dt.random&&Dt.unlocks&&-1!=Dt.unlocks.indexOf(Tt.index));Rt&&(this.party.conclusions.find(Dt=>Dt.edition==Rt.edition&&Dt.group==Rt.group&&Dt.index==Rt.index)||(this.party.conclusions.push(new et._b(""+Rt.index,Rt.edition,Rt.group,!1,"",[])),bt.push(Tt)))}}),this.party.manualScenarios=this.party.manualScenarios.filter(Tt=>-1==bt.indexOf(Tt))}this.parties=[this.party],H.parties&&H.parties.forEach(bt=>{bt.id!=this.party.id&&(bt.achievements&&(bt.achievementsList.push(...bt.achievements.split("\n")),bt.achievements=""),bt.globalAchievements&&(bt.globalAchievementsList.push(...bt.globalAchievements.split("\n")),bt.globalAchievements=""),this.parties.push(Object.assign(new X.f,bt)))}),H.lootDeck?this.lootDeck?this.lootDeck.fromModel(H.lootDeck):this.lootDeck=H.lootDeck:this.lootDeck=new it._8,this.lootDeckEnhancements=H.lootDeckEnhancements||[],this.lootDeckFixed=H.lootDeckFixed||[],this.lootDeckSections=H.lootDeckSections||[],this.lootDeckEnhancements.forEach(bt=>{bt.value&&(isNaN(+bt.value)?"%game.loot.player.3-4% +1/%game.loot.player.2% +2"==bt.value?(bt.value4P=1,bt.value3P=1,bt.value2P=2):"%game.loot.player.4% +1/%game.loot.player.2-3% +2"==bt.value?(bt.value4P=1,bt.value3P=2,bt.value2P=2):console.warn("Cannot migrate loot: "+bt.value):(bt.value4P=+bt.value,bt.value3P=+bt.value,bt.value2P=+bt.value),bt.value=void 0)}),(0,it.nk)(this.lootDeck.cards),(0,it.nk)(this.lootDeckEnhancements),this.unlockedCharacters=H.unlockedCharacters||[],st.r.settings.spoilers&&x.v.charactersData().filter(bt=>bt.spoiler).forEach(bt=>{const Tt=st.r.settings.spoilers.indexOf(bt.name);-1!=Tt&&(-1==this.unlockedCharacters.indexOf(bt.name)&&this.unlockedCharacters.push(bt.name),st.r.settings.spoilers.splice(Tt,1))}),this.server=H.server,this.finish=H.finish}}var Q=function(_t){return _t.draw="draw",_t.next="next",_t}(Q||{});class lt{constructor(H=0,Jt=0,bt=void 0,Tt=[],Rt=[],Dt=[],Ht=[],jt=[],wt=[],Zt=[],qt=[],Wt=void 0,Ie=Q.next,ue=void 0,We=[],ve=[],_n=[],be=0,en=!0,St=0,kt=0,It=!0,Ut=-1,Et=0,Yt=[],Ce=[],me=0,wn=0,xe=new G.fy(-1,G.u$,[],!0),ke=new G.fy(-1,G.u$,[],!0),Ft=[],Oe=!1,rn=new X.f,kn=[],Me=new it._8,Y=[],on=[],p=[],P=[],M=!1,y=void 0){(0,t.Z)(this,"revision",void 0),(0,t.Z)(this,"revisionOffset",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"conditions",void 0),(0,t.Z)(this,"battleGoalEditions",void 0),(0,t.Z)(this,"filteredBattleGoals",void 0),(0,t.Z)(this,"figures",void 0),(0,t.Z)(this,"entitiesCounter",void 0),(0,t.Z)(this,"characters",void 0),(0,t.Z)(this,"monsters",void 0),(0,t.Z)(this,"objectives",void 0),(0,t.Z)(this,"objectiveContainers",void 0),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"scenario",void 0),(0,t.Z)(this,"sections",void 0),(0,t.Z)(this,"scenarioRules",void 0),(0,t.Z)(this,"disgardedScenarioRules",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"levelCalculation",void 0),(0,t.Z)(this,"levelAdjustment",void 0),(0,t.Z)(this,"bonusAdjustment",void 0),(0,t.Z)(this,"ge5Player",void 0),(0,t.Z)(this,"playerCount",void 0),(0,t.Z)(this,"round",void 0),(0,t.Z)(this,"roundResets",void 0),(0,t.Z)(this,"roundResetsHidden",void 0),(0,t.Z)(this,"playSeconds",void 0),(0,t.Z)(this,"totalSeconds",void 0),(0,t.Z)(this,"monsterAttackModifierDeck",void 0),(0,t.Z)(this,"allyAttackModifierDeck",void 0),(0,t.Z)(this,"elementBoard",void 0),(0,t.Z)(this,"solo",void 0),(0,t.Z)(this,"party",void 0),(0,t.Z)(this,"parties",void 0),(0,t.Z)(this,"lootDeck",void 0),(0,t.Z)(this,"lootDeckEnhancements",void 0),(0,t.Z)(this,"lootDeckFixed",void 0),(0,t.Z)(this,"lootDeckSections",void 0),(0,t.Z)(this,"unlockedCharacters",void 0),(0,t.Z)(this,"server",void 0),(0,t.Z)(this,"finish",void 0),this.revision=H,this.revisionOffset=Jt,this.edition=bt,this.conditions=Tt,this.battleGoalEditions=Rt,this.filteredBattleGoals=Dt,this.figures=Ht,this.entitiesCounter=JSON.parse(JSON.stringify(jt)),this.characters=wt,this.monsters=Zt,this.objectives=qt,this.objectiveContainers=Wt,this.state=Ie,this.scenario=ue,this.sections=We,this.scenarioRules=JSON.parse(JSON.stringify(ve)),this.disgardedScenarioRules=JSON.parse(JSON.stringify(_n)),this.level=be,this.levelCalculation=en,this.levelAdjustment=St,this.bonusAdjustment=kt,this.ge5Player=It,this.playerCount=Ut,this.round=Et,this.roundResets=JSON.parse(JSON.stringify(Yt)),this.roundResetsHidden=JSON.parse(JSON.stringify(Ce)),this.playSeconds=me,this.totalSeconds=wn,this.monsterAttackModifierDeck=xe,this.allyAttackModifierDeck=ke,this.elementBoard=JSON.parse(JSON.stringify(Ft)),this.solo=Oe,this.party=JSON.parse(JSON.stringify(rn)),this.parties=JSON.parse(JSON.stringify(kn)),this.lootDeck=JSON.parse(JSON.stringify(Me)),this.lootDeckEnhancements=JSON.parse(JSON.stringify(Y)),this.lootDeckFixed=JSON.parse(JSON.stringify(on)),this.lootDeckSections=JSON.parse(JSON.stringify(p)),this.unlockedCharacters=JSON.parse(JSON.stringify(P)),this.server=M,this.finish=y?JSON.parse(JSON.stringify(y)):void 0}}},7177:(q,nt,E)=>{"use strict";E.d(nt,{Q:()=>it});var t=E(1180),x=E(4968),G=E(7866),tt=E(5604),at=E(8272);class it extends G.A{getInitiative(){const X=tt.v.monsterManager.getAbility(this);return tt.v.gameplayFigure(this)&&X&&X.initiative||100}constructor(X,et=1){if(super(X),(0,t.Z)(this,"summonColor",at.mp.blue),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"drawExtra",!1),(0,t.Z)(this,"lastDraw",0),(0,t.Z)(this,"type","monster"),(0,t.Z)(this,"ability",-1),(0,t.Z)(this,"abilities",[]),(0,t.Z)(this,"entities",[]),(0,t.Z)(this,"isAlly",!1),(0,t.Z)(this,"isAllied",!1),this.errors=X.errors,this.level=et,X.baseStat)for(let st of X.stats){if(!st.health&&0!=st.health&&(st.health=X.baseStat.health||0),!st.movement&&0!=st.movement&&(st.movement=X.baseStat.movement||0),!st.attack&&0!=st.attack&&(st.attack=X.baseStat.attack||0),!st.range&&0!=st.range&&(st.range=X.baseStat.range||0),st.actions||(st.actions=Object.assign([],X.baseStat.actions)),st.immunities||(st.immunities=Object.assign([],X.baseStat.immunities)),!st.special&&(st.special=[],X.baseStat.special))for(let gt of X.baseStat.special)st.special.push(Object.assign([],gt));st.note||(st.note=X.baseStat.note),st.type||(st.type=X.baseStat.type)}}toModel(){return new K(this.name,this.edition,this.level,this.off,this.active,this.drawExtra,this.lastDraw,this.ability,this.abilities,this.entities.map(X=>X.toModel()),this.isAlly,this.isAllied)}fromModel(X){if(this.edition=X.edition,!this.edition){const et=tt.v.monstersData().find(st=>st.name==X.name);this.edition=et?et.edition:""}this.level=X.level,this.off=X.off,this.active=X.active,this.drawExtra=X.drawExtra,this.lastDraw=X.lastDraw,this.abilities=X.abilities&&X.abilities.length>0&&X.abilities||tt.v.abilities(this)&&tt.v.abilities(this).map((et,st)=>st)||[],this.ability=X.ability,this.entities=this.entities.filter(et=>X.entities.find(st=>st.number==et.number&&st.type==et.type)),X.entities.forEach((et,st)=>{let gt=this.entities.find(I=>I.number==et.number&&I.type==et.type);gt?st!=this.entities.indexOf(gt)&&(this.entities.splice(this.entities.indexOf(gt),1),this.entities.splice(st,0,gt)):(gt=new x.g(et.number,et.type,this),this.entities.splice(st,0,gt)),gt.fromModel(et)}),this.isAlly=X.isAlly,this.isAllied=X.isAllied}}class K{constructor(X,et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"drawExtra",void 0),(0,t.Z)(this,"lastDraw",void 0),(0,t.Z)(this,"ability",void 0),(0,t.Z)(this,"abilities",void 0),(0,t.Z)(this,"entities",void 0),(0,t.Z)(this,"isAlly",void 0),(0,t.Z)(this,"isAllied",void 0),this.name=X,this.edition=et,this.level=st,this.off=gt,this.active=I,this.drawExtra=Q,this.lastDraw=lt,this.ability=_t,this.abilities=JSON.parse(JSON.stringify(H)),this.entities=JSON.parse(JSON.stringify(Jt)),this.isAlly=bt,this.isAllied=Tt}}},4968:(q,nt,E)=>{"use strict";E.d(nt,{g:()=>K});var t=E(1180),x=E(9310),G=E(3157),tt=E(377),at=E(9144),it=E(8272);class K{constructor(et,st,gt){(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"stat",void 0),(0,t.Z)(this,"dead",!1),(0,t.Z)(this,"summon",it.HY.false),(0,t.Z)(this,"effect",void 0),(0,t.Z)(this,"dormant",!1),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.number=et,this.type=st;const I=gt.stats.find(Q=>Q.level==gt.level&&Q.type==st);I?this.stat=I:(this.stat=new at.c(st,gt.level,0,0,0,0),gt.errors=gt.errors||[],!gt.errors.find(Q=>Q.type==tt.r.unknown)&&!gt.errors.find(Q=>Q.type==tt.r.stat)&&(console.error("Could not find '"+st+"' stats for monster: "+gt.name+" level: "+gt.level),gt.errors.push(new tt.o(tt.r.stat,"monster",gt.name,gt.edition,st,""+gt.level)))),this.maxHealth=(0,G.j9)(this.stat.health,gt.level),this.health=this.maxHealth,0==this.health&&(this.health=1),this.level=gt.level}toModel(){return new dt(this.number,this.marker,this.type,this.dead,this.summon,this.active,this.off,this.revealed,this.dormant,this.health,this.maxHealth,this.entityConditions.map(et=>et.toModel()),this.immunities,this.markers,this.tags||[])}fromModel(et){this.marker=et.marker,this.dead=et.dead,this.summon=et.summon,this.active=et.active,this.off=et.off,this.revealed=et.revealed,this.dormant=et.dormant,this.health=et.health,this.maxHealth=et.maxHealth,this.entityConditions=[],et.entityConditions&&(this.entityConditions=et.entityConditions.map(st=>{let gt=new x.hT(st.name,st.value);return gt.fromModel(st),gt})),this.immunities=et.immunities||[],this.markers=et.markers||[],this.tags=et.tags||[]}}class dt{constructor(et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt){(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"dead",void 0),(0,t.Z)(this,"summon",void 0),(0,t.Z)(this,"revealed",void 0),(0,t.Z)(this,"dormant",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),this.number=et,this.marker=st,this.type=gt,this.dead=I,this.summon=Q,this.active=lt,this.off=_t,this.revealed=H,this.dormant=Jt,this.health=bt,this.maxHealth=Tt,this.entityConditions=JSON.parse(JSON.stringify(Rt)),this.immunities=JSON.parse(JSON.stringify(Dt)),this.markers=JSON.parse(JSON.stringify(Ht)),this.tags=JSON.parse(JSON.stringify(jt))}}},9120:(q,nt,E)=>{"use strict";E.d(nt,{CH:()=>tt,H4:()=>it});var t=E(1180),x=E(9310),G=E(4004);class tt{constructor(dt,X,et=void 0){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"id",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"title",""),(0,t.Z)(this,"exhausted",!1),(0,t.Z)(this,"escort",!1),(0,t.Z)(this,"name",""),(0,t.Z)(this,"level",0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"type","objective"),(0,t.Z)(this,"health",7),(0,t.Z)(this,"maxHealth",7),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"initiative",99),(0,t.Z)(this,"objectiveId",void 0),this.uuid=dt||(0,G.Z)(),this.id=X,this.number=X,this.objectiveId=et}getInitiative(){return this.exhausted||this.health<=0?100:this.initiative}toModel(){return new at(this.uuid||(0,G.Z)(),this.id,this.marker,this.title,this.name,this.escort,this.level,this.exhausted,this.off,this.active,this.health,this.maxHealth,this.entityConditions.map(dt=>dt.toModel()),this.immunities,this.markers,this.tags||[],this.initiative,this.objectiveId)}fromModel(dt){this.uuid=dt.uuid||(0,G.Z)(),this.id=dt.id,this.number=dt.id,this.marker=dt.marker,this.title=dt.title,this.name=dt.name,this.escort=dt.escort,this.level=dt.level,this.exhausted=dt.exhausted,this.off=dt.off,this.active=dt.active,this.health=dt.health,this.maxHealth=dt.maxHealth,this.entityConditions=[],dt.entityConditions&&(this.entityConditions=dt.entityConditions.map(X=>{let et=new x.hT(X.name,X.value);return et.fromModel(X),et})),this.immunities=dt.immunities||[],this.markers=dt.markers||this.markers,this.tags=dt.tags||this.tags,this.initiative=dt.initiative,this.objectiveId=dt.objectiveId}}class at{constructor(dt,X,et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt,wt){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"id",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"escort",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"exhausted",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),(0,t.Z)(this,"initiative",void 0),(0,t.Z)(this,"objectiveId",void 0),this.uuid=dt,this.id=X,this.marker=et,this.title=st,this.name=gt,this.escort=I,this.level=Q,this.exhausted=lt,this.off=_t,this.active=H,this.health=Jt,this.maxHealth=bt,this.entityConditions=JSON.parse(JSON.stringify(Tt)),this.immunities=JSON.parse(JSON.stringify(Rt)),this.markers=JSON.parse(JSON.stringify(Dt)),this.tags=JSON.parse(JSON.stringify(Ht)),this.initiative=jt,this.objectiveId=wt&&JSON.parse(JSON.stringify(wt))||void 0}}const it=["","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","A","B","C","D","E","F","G","H","I","J","K","L","M"]},5601:(q,nt,E)=>{"use strict";E.d(nt,{k:()=>G});var t=E(1180),x=E(1975);class G{constructor(it,K=void 0){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"title",""),(0,t.Z)(this,"escort",!1),(0,t.Z)(this,"entities",[]),(0,t.Z)(this,"noThumbnail",!0),(0,t.Z)(this,"summonColor",""),(0,t.Z)(this,"name",""),(0,t.Z)(this,"level",0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"health",7),(0,t.Z)(this,"initiative",99),(0,t.Z)(this,"type","objectiveContainer"),(0,t.Z)(this,"objectiveId",void 0),this.uuid=it,this.objectiveId=K}getInitiative(){return this.initiative}toModel(){return new tt(this.uuid,this.marker,this.title,this.name,this.escort,this.entities.map(it=>it.toModel()),this.level,this.off,this.active,this.health,this.initiative,this.objectiveId)}fromModel(it){this.marker=it.marker,this.title=it.title,this.name=it.name,this.escort=it.escort,this.entities=this.entities.filter(K=>it.entities.some(dt=>dt.uuid==K.uuid)),it.entities.forEach((K,dt)=>{let X=this.entities.find(et=>K.uuid==et.uuid);X?dt!=this.entities.indexOf(X)&&(this.entities.splice(this.entities.indexOf(X),1),this.entities.splice(dt,0,X)):(X=new x.W(K.uuid,K.number,this,this.marker),this.entities.splice(dt,0,X)),X.fromModel(K)}),this.entities.sort((K,dt)=>it.entities.map(X=>X.uuid).indexOf(K.uuid)-it.entities.map(X=>X.uuid).indexOf(dt.uuid)),this.level=it.level,this.off=it.off,this.active=it.active,this.health=it.health,this.initiative=it.initiative,this.objectiveId=it.objectiveId}}class tt{constructor(it,K,dt,X,et,st,gt,I,Q,lt,_t,H){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"escort",void 0),(0,t.Z)(this,"entities",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"initiative",void 0),(0,t.Z)(this,"objectiveId",void 0),this.uuid=it,this.marker=K,this.title=dt,this.name=X,this.escort=et,this.entities=st,this.level=gt,this.off=I,this.active=Q,this.health=lt,this.initiative=_t,this.objectiveId=H&&JSON.parse(JSON.stringify(H))||void 0}}},1975:(q,nt,E)=>{"use strict";E.d(nt,{W:()=>tt});var t=E(1180),x=E(9310),G=E(3157);class tt{constructor(K,dt,X,et){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"dead",!1),(0,t.Z)(this,"dormant",!1),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"type",""),(0,t.Z)(this,"summon",""),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"level",-1),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.uuid=K,this.number=dt,this.marker=et||"",this.maxHealth=(0,G.j9)(X.health),this.health=this.maxHealth,0==this.health&&(this.health=1)}toModel(){return new at(this.uuid,this.number,this.marker,this.dead,this.active,this.dormant,this.health,this.maxHealth,this.entityConditions.map(K=>K.toModel()),this.immunities,this.markers,this.tags||[])}fromModel(K){this.marker=K.marker,this.dead=K.dead,this.active=K.active,this.dormant=K.dormant,this.health=K.health,this.maxHealth=K.maxHealth,this.entityConditions=[],K.entityConditions&&(this.entityConditions=K.entityConditions.map(dt=>{let X=new x.hT(dt.name,dt.value);return X.fromModel(dt),X})),this.immunities=K.immunities||[],this.markers=K.markers||[],this.tags=K.tags||[]}}class at{constructor(K,dt,X,et,st,gt,I,Q,lt,_t,H,Jt){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"dead",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"dormant",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),this.uuid=K,this.number=dt,this.marker=X,this.dead=et,this.active=st,this.dormant=gt,this.health=I,this.maxHealth=Q,this.entityConditions=JSON.parse(JSON.stringify(lt)),this.immunities=JSON.parse(JSON.stringify(_t)),this.markers=JSON.parse(JSON.stringify(H)),this.tags=JSON.parse(JSON.stringify(Jt))}}},9048:(q,nt,E)=>{"use strict";E.d(nt,{f:()=>x});var t=E(1180);class x{constructor(){(0,t.Z)(this,"id",0),(0,t.Z)(this,"name",""),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"battleGoalEditions",[]),(0,t.Z)(this,"filteredBattleGoals",[]),(0,t.Z)(this,"location",""),(0,t.Z)(this,"notes",""),(0,t.Z)(this,"achievements",""),(0,t.Z)(this,"achievementsList",[]),(0,t.Z)(this,"reputation",0),(0,t.Z)(this,"prosperity",0),(0,t.Z)(this,"scenarios",[]),(0,t.Z)(this,"conclusions",[]),(0,t.Z)(this,"casualScenarios",[]),(0,t.Z)(this,"manualScenarios",[]),(0,t.Z)(this,"campaignMode",!1),(0,t.Z)(this,"globalAchievements",""),(0,t.Z)(this,"globalAchievementsList",[]),(0,t.Z)(this,"treasures",[]),(0,t.Z)(this,"donations",0),(0,t.Z)(this,"players",[]),(0,t.Z)(this,"characters",[]),(0,t.Z)(this,"retirements",[]),(0,t.Z)(this,"unlockedItems",[]),(0,t.Z)(this,"unlockedCharacters",[]),(0,t.Z)(this,"level",1),(0,t.Z)(this,"levelCalculation",!0),(0,t.Z)(this,"levelAdjustment",0),(0,t.Z)(this,"bonusAdjustment",0),(0,t.Z)(this,"ge5Player",!0),(0,t.Z)(this,"playerCount",-1),(0,t.Z)(this,"solo",!1),(0,t.Z)(this,"weeks",0),(0,t.Z)(this,"weekSections",{}),(0,t.Z)(this,"loot",{}),(0,t.Z)(this,"randomItemLooted",[]),(0,t.Z)(this,"inspiration",0),(0,t.Z)(this,"defense",0),(0,t.Z)(this,"soldiers",0),(0,t.Z)(this,"morale",0),(0,t.Z)(this,"townGuardPerks",0),(0,t.Z)(this,"townGuardPerkSections",[]),(0,t.Z)(this,"campaignStickers",[]),(0,t.Z)(this,"townGuardDeck",void 0),(0,t.Z)(this,"buildings",[]),(0,t.Z)(this,"lootDeckEnhancements",[]),(0,t.Z)(this,"lootDeckFixed",[]),(0,t.Z)(this,"lootDeckSections",[])}}},7484:(q,nt,E)=>{"use strict";E.d(nt,{P:()=>x});var t=E(1180);class x{constructor(){(0,t.Z)(this,"characters",!1),(0,t.Z)(this,"character",[]),(0,t.Z)(this,"monsters",!1),(0,t.Z)(this,"monster",[]),(0,t.Z)(this,"scenario",!1),(0,t.Z)(this,"elements",!1),(0,t.Z)(this,"round",!1),(0,t.Z)(this,"level",!1),(0,t.Z)(this,"attackModifiers",!1),(0,t.Z)(this,"lootDeck",!1),(0,t.Z)(this,"party",!1)}}},4756:(q,nt,E)=>{"use strict";E.d(nt,{$4:()=>G,U4:()=>tt,_b:()=>at});var t=E(1180),x=E(301);class G extends x.tR{constructor(K,dt=[],X=!1){super(K),(0,t.Z)(this,"custom",void 0),(0,t.Z)(this,"revealedRooms",void 0),this.solo=K.solo,this.revealedRooms=JSON.parse(JSON.stringify(dt)),K.rooms&&K.rooms.forEach(et=>{et.initial&&-1==this.revealedRooms.indexOf(et.roomNumber)&&this.revealedRooms.push(et.roomNumber)}),this.custom=X}}class tt extends x.tR{constructor(K,dt,X,et){super(K),(0,t.Z)(this,"isSuccess",void 0),(0,t.Z)(this,"isBlocked",void 0),(0,t.Z)(this,"isLocked",void 0),this.isSuccess=dt,this.isBlocked=X,this.isLocked=et}}class at{constructor(K,dt,X,et=!1,st="",gt=void 0){(0,t.Z)(this,"index",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"group",void 0),(0,t.Z)(this,"isCustom",void 0),(0,t.Z)(this,"custom",void 0),(0,t.Z)(this,"revealedRooms",void 0),this.index=K,this.edition=dt,this.group=X,this.isCustom=et,this.custom=st,this.revealedRooms=gt}}},3329:(q,nt,E)=>{"use strict";E.d(nt,{Z:()=>G});var t=E(1180),x=E(9310);class G{constructor(){(0,t.Z)(this,"abilities",!0),(0,t.Z)(this,"abilityNumbers",!0),(0,t.Z)(this,"abilityReveal",!0),(0,t.Z)(this,"activeApplyConditions",!0),(0,t.Z)(this,"activeApplyConditionsExcludes",[x.fT.shield]),(0,t.Z)(this,"activeStandees",!0),(0,t.Z)(this,"activeSummons",!0),(0,t.Z)(this,"addAllMonsters",!1),(0,t.Z)(this,"allyAttackModifierDeck",!0),(0,t.Z)(this,"alwaysAllyAttackModifierDeck",!1),(0,t.Z)(this,"alwaysFhSolo",!1),(0,t.Z)(this,"alwaysHazardousTerrain",!1),(0,t.Z)(this,"alwaysLootApplyDialog",!1),(0,t.Z)(this,"alwaysLootDeck",!1),(0,t.Z)(this,"applyBuildingRewards",!0),(0,t.Z)(this,"applyConditions",!0),(0,t.Z)(this,"applyConditionsExcludes",[x.fT.shield]),(0,t.Z)(this,"applyLongRest",!0),(0,t.Z)(this,"applyLoot",!0),(0,t.Z)(this,"applyLootRandomItem",!0),(0,t.Z)(this,"applyRetirement",!0),(0,t.Z)(this,"autoBackup",-1),(0,t.Z)(this,"autoBackupFinish",!1),(0,t.Z)(this,"autoBackupUrl",void 0),(0,t.Z)(this,"automaticAttackModifierFullscreen",!0),(0,t.Z)(this,"automaticStandees",!0),(0,t.Z)(this,"automaticStandeesDialog",!1),(0,t.Z)(this,"automaticTheme",!0),(0,t.Z)(this,"automaticUnlocking",!0),(0,t.Z)(this,"autoscroll",!0),(0,t.Z)(this,"barsize",1),(0,t.Z)(this,"backupHint",!0),(0,t.Z)(this,"battleGoals",!1),(0,t.Z)(this,"battleGoalsCharacter",!1),(0,t.Z)(this,"battleGoalsFh",!1),(0,t.Z)(this,"battleGoalsReminder",!0),(0,t.Z)(this,"browserNavigation",!1),(0,t.Z)(this,"calculate",!0),(0,t.Z)(this,"calculateStats",!0),(0,t.Z)(this,"calculateShieldStats",!0),(0,t.Z)(this,"characterAttackModifierAnimate",!0),(0,t.Z)(this,"characterAttackModifierDeck",!0),(0,t.Z)(this,"characterAttackModifierDeckPermanent",!1),(0,t.Z)(this,"characterAttackModifierDeckPermanentActive",!1),(0,t.Z)(this,"characterCompact",!1),(0,t.Z)(this,"characterHandSize",!1),(0,t.Z)(this,"characterIdentities",!0),(0,t.Z)(this,"characterIdentityHint",!0),(0,t.Z)(this,"characterItems",!1),(0,t.Z)(this,"characterItemsPermanent",!1),(0,t.Z)(this,"characterItemsPermanentActive",!1),(0,t.Z)(this,"characterItemsPermanentEquipped",!0),(0,t.Z)(this,"characterItemsPermanentSorted",!0),(0,t.Z)(this,"characterItemsPermanentZoom",1),(0,t.Z)(this,"characterSheet",!0),(0,t.Z)(this,"characterSheetCompact",!1),(0,t.Z)(this,"characterTraits",!1),(0,t.Z)(this,"combineSummonAction",!0),(0,t.Z)(this,"debugRightClick",!1),(0,t.Z)(this,"disableAnimations",!1),(0,t.Z)(this,"disableArtwork",!1),(0,t.Z)(this,"disableColumns",!1),(0,t.Z)(this,"disableDragFigures",!1),(0,t.Z)(this,"disablePinchZoom",!1),(0,t.Z)(this,"disabledTurnConfirmation",!1),(0,t.Z)(this,"disableSortFigures",!1),(0,t.Z)(this,"disableStandees",!1),(0,t.Z)(this,"disableWakeLock",!1),(0,t.Z)(this,"dragValues",!0),(0,t.Z)(this,"editionDataUrls",[]),(0,t.Z)(this,"editions",[]),(0,t.Z)(this,"eliteFirst",!0),(0,t.Z)(this,"excludeEditionDataUrls",[]),(0,t.Z)(this,"expireConditions",!0),(0,t.Z)(this,"fhGhItems",!1),(0,t.Z)(this,"fhStyle",!1),(0,t.Z)(this,"fontsize",1),(0,t.Z)(this,"globalFontsize",1),(0,t.Z)(this,"fullscreen",!1),(0,t.Z)(this,"hideAbsent",!1),(0,t.Z)(this,"hideStats",!1),(0,t.Z)(this,"hints",!0),(0,t.Z)(this,"initiativeRequired",!0),(0,t.Z)(this,"interactiveAbilities",!0),(0,t.Z)(this,"locale","en"),(0,t.Z)(this,"lootDeck",!0),(0,t.Z)(this,"maxUndo",100),(0,t.Z)(this,"portraitMode",!0),(0,t.Z)(this,"monsters",!0),(0,t.Z)(this,"moveElements",!0),(0,t.Z)(this,"partySheet",!0),(0,t.Z)(this,"pressDoubleClick",!0),(0,t.Z)(this,"randomStandees",!1),(0,t.Z)(this,"scenarioNumberInput",!1),(0,t.Z)(this,"scenarioRooms",!0),(0,t.Z)(this,"scenarioRules",!0),(0,t.Z)(this,"serverAutoconnect",!0),(0,t.Z)(this,"serverPassword",void 0),(0,t.Z)(this,"serverPort",void 0),(0,t.Z)(this,"serverSettings",!1),(0,t.Z)(this,"serverUrl",void 0),(0,t.Z)(this,"serverWss",!1),(0,t.Z)(this,"showBossMonster",!0),(0,t.Z)(this,"showAllSections",!1),(0,t.Z)(this,"showExpandedAbilityCard",!1),(0,t.Z)(this,"showFullAbilityCard",!1),(0,t.Z)(this,"showHiddenMonster",!1),(0,t.Z)(this,"showOnlyUnfinishedScenarios",!1),(0,t.Z)(this,"spoilers",[]),(0,t.Z)(this,"standeeStats",!1),(0,t.Z)(this,"statAnimations",!1),(0,t.Z)(this,"theme",""),(0,t.Z)(this,"tooltips",!0),(0,t.Z)(this,"treasuresLoot",!0),(0,t.Z)(this,"treasures",!0),(0,t.Z)(this,"zoom",100)}}},8272:(q,nt,E)=>{"use strict";E.d(nt,{HY:()=>at,eU:()=>K,mp:()=>it});var t=E(1180),x=E(9310),G=E(3157),tt=E(4004),at=function(X){return X.new="new",X.true="true",X.false="false",X}(at||{}),it=function(X){return X.blue="blue",X.green="green",X.yellow="yellow",X.orange="orange",X.white="white",X.purple="purple",X.pink="pink",X.red="red",X.custom="custom",X.fh="fh",X}(it||{});class K{constructor(et,st,gt,I,Q,lt,_t=void 0){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"cardId",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"color",void 0),(0,t.Z)(this,"attack",0),(0,t.Z)(this,"movement",0),(0,t.Z)(this,"range",0),(0,t.Z)(this,"flying",!1),(0,t.Z)(this,"dead",!1),(0,t.Z)(this,"state",at.new),(0,t.Z)(this,"init",!0),(0,t.Z)(this,"action",void 0),(0,t.Z)(this,"additionalAction",void 0),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"noThumbnail",!1),(0,t.Z)(this,"dormant",!1),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",2),(0,t.Z)(this,"maxHealth",2),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.uuid=et||(0,tt.Z)(),this.name=st,this.title="",this.cardId=gt,this.level=I,this.number=Q,this.color=lt,_t&&(this.maxHealth=(0,G.j9)(_t.health,I),this.health=this.maxHealth,this.attack=_t.attack||0,this.movement=(0,G.j9)(_t.movement,I),this.range=(0,G.j9)(_t.range,I),this.flying=_t.flying,this.action=_t.action?JSON.parse(JSON.stringify(_t.action)):void 0,this.additionalAction=_t.additionalAction?JSON.parse(JSON.stringify(_t.additionalAction)):void 0,_t.thumbnail&&(this.thumbnail=_t.edition+"-"+_t.name),this.thumbnailUrl=_t.thumbnailUrl,this.noThumbnail=_t.noThumbnail),this.health=this.maxHealth}toModel(){return new dt(this.uuid||(0,tt.Z)(),this.name,this.title,this.cardId,this.number,this.color,this.attack&&this.attack+""||"0",this.movement,this.range,this.flying,this.dead,this.state,this.level,this.health,this.maxHealth,this.entityConditions.map(et=>et.toModel()),this.immunities,this.markers,this.tags||[],this.action?JSON.stringify(this.action):void 0,this.additionalAction?JSON.stringify(this.additionalAction):void 0,this.active,this.dormant,this.thumbnail,this.thumbnailUrl,this.noThumbnail)}fromModel(et){this.uuid=et.uuid||(0,tt.Z)(),this.name=et.name||"",this.title=et.title||"",this.cardId=et.cardId||"",this.number=et.number,this.color=et.color,this.attack=et.attack&&!isNaN(+et.attack)?+et.attack:et.attack||0,this.movement=et.movement,this.range=et.range,this.flying=et.flying,this.dead=et.dead,this.state=et.state,this.level=et.level,this.health=et.health,this.maxHealth=et.maxHealth,this.entityConditions=[],et.entityConditions&&(this.entityConditions=et.entityConditions.map(st=>{let gt=new x.hT(st.name,st.value);return gt.fromModel(st),gt})),this.immunities=et.immunities||[],et.action&&(this.action=JSON.parse(et.action)),et.additionalAction&&(this.additionalAction=JSON.parse(et.additionalAction)),this.active=et.active,this.dormant=et.dormant,this.thumbnail=et.thumbnail,this.thumbnailUrl=et.thumbnailUrl,this.noThumbnail=et.noThumbnail,this.markers=et.markers||this.markers,this.tags=et.tags||this.tags,this.init=!1}}class dt{constructor(et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt,wt,Zt,qt,Wt,Ie,ue,We,ve,_n,be,en){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"cardId",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"color",void 0),(0,t.Z)(this,"attack",void 0),(0,t.Z)(this,"movement",void 0),(0,t.Z)(this,"range",void 0),(0,t.Z)(this,"flying",void 0),(0,t.Z)(this,"dead",void 0),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),(0,t.Z)(this,"action",void 0),(0,t.Z)(this,"additionalAction",void 0),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"dormant",void 0),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"noThumbnail",void 0),this.uuid=et,this.name=st,this.title=gt,this.cardId=I,this.number=Q,this.color=lt,this.attack=_t,this.movement=H,this.range=Jt,this.flying=bt,this.dead=Tt,this.state=Rt,this.level=Dt,this.health=Ht,this.maxHealth=jt,this.entityConditions=JSON.parse(JSON.stringify(wt)),this.immunities=JSON.parse(JSON.stringify(Zt)),this.markers=JSON.parse(JSON.stringify(qt)),this.tags=JSON.parse(JSON.stringify(Wt)),this.action=Ie,this.additionalAction=ue,this.active=We,this.dormant=ve,this.thumbnail=_n,this.thumbnailUrl=be,this.noThumbnail=en}}},7227:(q,nt,E)=>{"use strict";E.d(nt,{EF:()=>tt,TE:()=>it,Us:()=>G,aU:()=>x,q2:()=>at});var t=E(1180);class x{constructor(dt,X="",et=tt.fixed,st=[],gt=!1,I=!1){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",void 0),(0,t.Z)(this,"valueObject",void 0),(0,t.Z)(this,"valueType",void 0),(0,t.Z)(this,"subActions",void 0),(0,t.Z)(this,"small",void 0),(0,t.Z)(this,"hidden",void 0),this.type=dt,this.value=X,this.valueType=et,this.subActions=st||[],this.small=gt,this.hidden=I}}var G=function(K){return K.area="area",K.attack="attack",K.card="card",K.condition="condition",K.custom="custom",K.damage="damage",K.element="element",K.elementHalf="elementHalf",K.fly="fly",K.heal="heal",K.grant="grant",K.jump="jump",K.loot="loot",K.monsterType="monsterType",K.move="move",K.pierce="pierce",K.pull="pull",K.push="push",K.range="range",K.retaliate="retaliate",K.shield="shield",K.spawn="spawn",K.special="special",K.specialTarget="specialTarget",K.sufferDamage="sufferDamage",K.summon="summon",K.swing="swing",K.switchType="switchType",K.target="target",K.teleport="teleport",K.trigger="trigger",K.concatenation="concatenation",K.grid="grid",K.box="box",K.boxFhSubActions="boxFhSubActions",K.forceBox="forceBox",K}(G||{}),tt=function(K){return K.plus="plus",K.minus="minus",K.add="add",K.subtract="subtract",K.fixed="fixed",K}(tt||{}),at=function(K){return K.all="all",K.ally="ally",K.allyShort="allyShort",K.allyAffect="allyAffect",K.allyAffectRange="allyAffectRange",K.allyAdjacent="allyAdjacent",K.allies="allies",K.alliesAdjacent="alliesAdjacent",K.alliesAdjacentAffect="alliesAdjacentAffect",K.alliesRange="alliesRange",K.alliesRangeAffect="alliesRangeAffect",K.enemy="enemy",K.enemyAdjacent="enemyAdjacent",K.enemyRange="enemyRange",K.enemyOneAll="enemyOneAll",K.enemies="enemies",K.enemiesAdjacent="enemiesAdjacent",K.enemiesRange="enemiesRange",K.enemiesRangeExact="enemiesRangeExtact",K.enemiesRangeAffect="enemiesRangeAffect",K.enemiesRangeAffectExact="enemiesRangeAffectExact",K.enemiesMovedThrough="enemiesMovedThrough",K.enemiesMovedThroughAdjacent="enemiesMovedThroughAdjacent",K.figures="figures",K.figuresAdjacent="figuresAdjacent",K.figuresRange="figuresRange",K.focusEnemyFarthest="focusEnemyFarthest",K.self="self",K.selfAllies="selfAllies",K.selfAlliesAffect="selfAlliesAffect",K.selfAlliesRange="selfAlliesRange",K.selfAlliesAdjacentAffect="selfAlliesAdjacentAffect",K.targets="targets",K}(at||{}),it=function(K){return K.experience="experience",K.lost="lost",K.persistent="persistent",K.recover="recover",K.refresh="refresh",K.round="round",K.slot="slot",K.slotXp="slotXp",K}(it||{})},2098:(q,nt,E)=>{"use strict";E.d(nt,{Bt:()=>et,UO:()=>K,US:()=>at,YY:()=>tt,fQ:()=>X,fy:()=>I,jB:()=>st,kl:()=>x,tI:()=>G,u$:()=>dt,ut:()=>gt});var t=E(1180),x=function(Q){return Q.plus="plus",Q.plus0="plus0",Q.plus1="plus1",Q.plus2="plus2",Q.plus3="plus3",Q.plus4="plus4",Q.plusX="plusX",Q.minus="minus",Q.minus1="minus1",Q.minus2="minus2",Q.null="null",Q.double="double",Q.bless="bless",Q.curse="curse",Q.minus1extra="minus1extra",Q.empower="empower",Q.enfeeble="enfeeble",Q.invalid="invalid",Q.townguard="townguard",Q.wreck="wreck",Q.success="success",Q}(x||{}),G=function(Q){return Q.default="default",Q.plus="plus",Q.minus="minus",Q.multiply="multiply",Q}(G||{});class tt{constructor(lt,_t=0,H=G.plus,Jt=void 0,bt=[],Tt=!1,Rt=!1){switch((0,t.Z)(this,"id",void 0),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",0),(0,t.Z)(this,"valueType",void 0),(0,t.Z)(this,"shuffle",!1),(0,t.Z)(this,"effects",void 0),(0,t.Z)(this,"rolling",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"character",!1),this.type=lt,this.value=_t,this.valueType=H,this.id=Jt||(lt==x.townguard?"tg-"+H+_t:lt!=x.plus&<!=x.minus?lt:lt+_t),this.effects=bt,this.rolling=Tt,this.active=Rt,lt){case x.plus0:this.value=0;break;case x.plus1:this.value=1;break;case x.plus2:this.value=2;break;case x.plus3:this.value=3;break;case x.plus4:this.value=4;break;case x.minus:this.valueType=G.minus;break;case x.minus1:this.valueType=G.minus,this.value=1;break;case x.minus2:this.valueType=G.minus,this.value=2;break;case x.null:this.valueType=G.multiply,this.value=0,this.shuffle=!0;break;case x.double:this.valueType=G.multiply,this.value=2,this.shuffle=!0;break;case x.bless:this.valueType=G.multiply,this.value=2;break;case x.curse:this.valueType=G.multiply,this.value=0;break;case x.minus1extra:this.valueType=G.minus,this.value=1;break;case x.wreck:this.valueType=G.minus,this.value=0;break;case x.success:this.value=0}}clone(){return new tt(this.type,this.value,this.valueType,this.id,this.effects?JSON.parse(JSON.stringify(this.effects)):[],this.rolling,this.active)}}var at=function(Q){return Q.area="area",Q.changeType="changeType",Q.condition="condition",Q.custom="custom",Q.element="element",Q.elementConsume="elementConsume",Q.elementHalf="elementHalf",Q.heal="heal",Q.pierce="pierce",Q.pull="pull",Q.push="push",Q.range="range",Q.refreshItem="refreshItem",Q.refreshSpentItem="refreshSpentItem",Q.recoverRandomDiscard="recoverRandomDiscard",Q.retaliate="retaliate",Q.shield="shield",Q.specialTarget="specialTarget",Q.summon="summon",Q.swing="swing",Q.target="target",Q.attack="attack",Q.or="or",Q}(at||{});class it{constructor(lt,_t="",H="",Jt=[],bt=!1){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",void 0),(0,t.Z)(this,"hint",void 0),(0,t.Z)(this,"effects",void 0),(0,t.Z)(this,"icon",!1),this.type=lt,this.value=_t,this.hint=H,this.effects=Jt,this.icon=bt}}const K=[new tt(x.plus0),new tt(x.plus1),new tt(x.minus1),new tt(x.plus2),new tt(x.minus2),new tt(x.double),new tt(x.null),new tt(x.bless),new tt(x.curse),new tt(x.minus1extra)],dt=[x.plus0,x.plus0,x.plus0,x.plus0,x.plus0,x.plus0,x.plus1,x.plus1,x.plus1,x.plus1,x.plus1,x.minus1,x.minus1,x.minus1,x.minus1,x.minus1,x.plus2,x.minus2,x.double,x.null],X=[new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,20),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,20,G.minus),new tt(x.wreck),new tt(x.success)],et=[new tt(x.townguard,0,G.default,"fh-tg-add-plus0"),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10"),new tt(x.townguard,10,G.minus,"fh-tg-add-minus10"),new tt(x.townguard,20,G.plus,"fh-tg-add-plus20"),new tt(x.townguard,20,G.minus,"fh-tg-add-minus20"),new tt(x.townguard,30,G.plus,"fh-tg-add-plus30"),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50"),new tt(x.wreck,0,G.default,"fh-tg-add-wreck"),new tt(x.success,0,G.default,"fh-tg-add-success"),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10-soldier",[new it(at.custom,"fh-soldier","",[],!0)],!0),new tt(x.townguard,20,G.plus,"fh-tg-add-plus20-soldier",[new it(at.custom,"fh-soldier","",[],!0)]),new tt(x.townguard,30,G.plus,"fh-tg-add-plus30-soldier",[new it(at.custom,"fh-soldier","",[],!0)]),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10-rolling",[],!0),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10-advantage",[new it(at.custom,"game.custom.advantage")],!0),new tt(x.townguard,20,G.minus,"fh-tg-add-minus20-resource",[new it(at.custom,"+2 material resource")]),new tt(x.townguard,0,G.default,"fh-tg-add-resource-hide",[new it(at.custom,"+1%game.resource.hide%","Gain one Hide")]),new tt(x.townguard,0,G.default,"fh-tg-add-resource-lumber",[new it(at.custom,"+1%game.resource.lumber%","Gain one Lumber")]),new tt(x.townguard,0,G.default,"fh-tg-add-resource-metal",[new it(at.custom,"+1%game.resource.metal%","Gain one Metal")]),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50-algox",[new it(at.custom,"fh-algox","",[],!0)]),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50-unfettered",[new it(at.custom,"fh-unfettered","",[],!0)]),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50-lurkers",[new it(at.custom,"fh-lurkers","",[],!0)])],st=[new tt(x.double,2,G.multiply,"cs-oak-527",[new it(at.condition,"bless","",[new it(at.specialTarget,"allyShort")])]),new tt(x.double,2,G.multiply,"cs-oak-528",[new it(at.condition,"bless","",[new it(at.specialTarget,"allyShort")])]),new tt(x.double,2,G.multiply,"cs-oak-529",[new it(at.heal,"2","",[new it(at.range,"2")])]),new tt(x.double,2,G.multiply,"cs-oak-530",[new it(at.heal,"2","",[new it(at.range,"2")])]),new tt(x.double,2,G.multiply,"cs-oak-531",[new it(at.element,"wild")]),new tt(x.double,2,G.multiply,"cs-oak-532",[new it(at.element,"wild")]),new tt(x.double,2,G.multiply,"cs-oak-533",[new it(at.custom,"All enemies adjacent to the target suffer %game.damage:1%")]),new tt(x.double,2,G.multiply,"cs-oak-534",[new it(at.custom,"All enemies adjacent to the target suffer %game.damage:1%")]),new tt(x.plus1,1,G.plus,"cs-oak-535",[new it(at.push,"2")],!0),new tt(x.plus1,1,G.plus,"cs-oak-536",[new it(at.push,"2")],!0),new tt(x.plus1,1,G.plus,"cs-oak-537",[new it(at.heal,"1","",[new it(at.range,"2")])],!0),new tt(x.plus1,1,G.plus,"cs-oak-538",[new it(at.heal,"1","",[new it(at.range,"2")])],!0),new tt(x.plus0,0,G.plus,"cs-oak-539",[new it(at.condition,"wound"),new it(at.condition,"muddle")],!0),new tt(x.plus0,0,G.plus,"cs-oak-540",[new it(at.condition,"wound"),new it(at.condition,"muddle")],!0),new tt(x.plus1,1,G.plus,"cs-oak-541",[new it(at.pierce,"3")],!0),new tt(x.plus1,1,G.plus,"cs-oak-542",[new it(at.pierce,"3")],!0)];class gt{constructor(lt=void 0){(0,t.Z)(this,"attackModifiers",void 0),(0,t.Z)(this,"current",void 0),(0,t.Z)(this,"cards",void 0),(0,t.Z)(this,"disgarded",[]),(0,t.Z)(this,"active",!0),this.attackModifiers=JSON.parse(JSON.stringify(lt?lt.filter((_t,H,Jt)=>Jt.indexOf(_t)==H):K)),this.current=-1,this.cards=lt?JSON.parse(JSON.stringify(lt)):dt.map(_t=>K.find(H=>H.id==_t)||new tt(x.invalid,0,G.default,_t))}toModel(){return new I(this.current,this.cards.map(lt=>lt&<.id),this.disgarded,this.active)}merge(lt){this.attackModifiers=lt.attackModifiers,this.current=lt.current,this.cards=lt.cards,this.disgarded=lt.disgarded}}class I{constructor(lt,_t,H,Jt){(0,t.Z)(this,"current",void 0),(0,t.Z)(this,"cards",void 0),(0,t.Z)(this,"disgarded",void 0),(0,t.Z)(this,"active",void 0),this.current=lt,this.cards=_t,this.disgarded=JSON.parse(JSON.stringify(H)),this.active=Jt}}},3281:(q,nt,E)=>{"use strict";E.d(nt,{U9:()=>x,Y:()=>tt});var t=E(1180);class x{constructor(){(0,t.Z)(this,"id",""),(0,t.Z)(this,"name",""),(0,t.Z)(this,"costs",{prosperity:0,lumber:0,metal:0,hide:0,gold:0}),(0,t.Z)(this,"upgrades",[]),(0,t.Z)(this,"manualUpgrades",0),(0,t.Z)(this,"repair",void 0),(0,t.Z)(this,"rebuild",[]),(0,t.Z)(this,"effectNormal",[]),(0,t.Z)(this,"effectWrecked",[]),(0,t.Z)(this,"interactionsAvailable",[]),(0,t.Z)(this,"interactionsUnavailable",[]),(0,t.Z)(this,"requires",""),(0,t.Z)(this,"rewards",[]),(0,t.Z)(this,"prosperityUnlock",!1)}}class tt{constructor(it="",K=1,dt="normal"){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"state",void 0),this.name=it,this.level=K,this.state=dt}}},3788:(q,nt,E)=>{"use strict";E.d(nt,{NU:()=>x,x3:()=>tt});var t=E(1180),x=function(at){return at.algox="algox",at.aesther="aesther",at.harrower="harrower",at.human="human",at.inox="inox",at.lurker="lurker",at.orchid="orchid",at.quatryl="quatryl",at.savvas="savvas",at.unfettered="unfettered",at.valrath="valrath",at.vermling="vermling",at}(x||{}),G=function(at){return at.male="m",at.female="f",at.unknown="",at}(G||{});class tt{constructor(it=void 0){(0,t.Z)(this,"name",""),(0,t.Z)(this,"stats",[]),(0,t.Z)(this,"characterClass",void 0),(0,t.Z)(this,"gender",G.unknown),(0,t.Z)(this,"identities",[]),(0,t.Z)(this,"tokens",[]),(0,t.Z)(this,"primaryToken",-1),(0,t.Z)(this,"handSize",0),(0,t.Z)(this,"unlockEvent",""),(0,t.Z)(this,"retireEvent",""),(0,t.Z)(this,"traits",[]),(0,t.Z)(this,"availableSummons",[]),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"icon",""),(0,t.Z)(this,"iconUrl",""),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"color","#aaaaaa"),(0,t.Z)(this,"noThumbnail",!1),(0,t.Z)(this,"marker",!1),(0,t.Z)(this,"deck",""),(0,t.Z)(this,"perks",[]),(0,t.Z)(this,"additionalModifier",[]),(0,t.Z)(this,"masteries",[]),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"spoiler",!1),(0,t.Z)(this,"locked",!1),(0,t.Z)(this,"errors",void 0),(0,t.Z)(this,"replace",!1),(0,t.Z)(this,"merge",!1),it&&(this.errors=it.errors||[],this.name=it.name,this.stats=it.stats||[],this.characterClass=it.characterClass||void 0,this.gender=it.gender||G.unknown,this.identities=it.identities||[],this.tokens=it.tokens||[],this.primaryToken=it.primaryToken>=0?it.primaryToken:-1,this.handSize=it.handSize||0,this.unlockEvent=it.unlockEvent||"",this.retireEvent=it.retireEvent||"",this.traits=it.traits||[],this.availableSummons=it.availableSummons||[],this.conditions=it.conditions||[],this.edition=it.edition||"",this.icon=it.icon||it.edition+"-"+it.name,this.iconUrl=it.iconUrl||"./assets/images/character/icons/"+this.icon+".svg",this.thumbnail=it.thumbnail||void 0,this.thumbnailUrl=it.thumbnailUrl||void 0,this.noThumbnail=it.noThumbnail,this.color=it.color||"#00000",this.marker=it.marker||!1,this.spoiler=it.spoiler||!1,this.locked=it.locked||!1,this.deck=it.deck||"",this.perks=it.perks||[],this.additionalModifier=it.additionalModifier||[],this.masteries=it.masteries||[],this.replace=it.replace||!1,this.merge=it.merge||!1)}}},2736:(q,nt,E)=>{"use strict";E.d(nt,{a:()=>x});var t=E(1180);class x{constructor(tt,at){(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),this.level=tt,this.health=at}}},9310:(q,nt,E)=>{"use strict";E.d(nt,{CP:()=>G,G3:()=>dt,fT:()=>x,gP:()=>at,hT:()=>it,tT:()=>tt});var t=E(1180),x=function(X){return X.stun="stun",X.immobilize="immobilize",X.disarm="disarm",X.wound="wound",X.muddle="muddle",X.poison="poison",X.strengthen="strengthen",X.invisible="invisible",X.curse="curse",X.bless="bless",X.regenerate="regenerate",X.ward="ward",X.bane="bane",X.brittle="brittle",X.impair="impair",X.chill="chill",X.infect="infect",X.rupture="rupture",X.dodge="dodge",X.empower="empower",X.enfeeble="enfeeble",X.poison_x="poison_x",X.wound_x="wound_x",X.heal="heal",X.shield="shield",X.invalid="invalid",X}(x||{}),G=function(X){return X.action="action",X.standard="standard",X.entity="entity",X.character="character",X.monster="monster",X.upgrade="upgrade",X.stack="stack",X.turn="turn",X.afterTurn="afterTurn",X.expire="expire",X.value="value",X.clearHeal="clearHeal",X.preventHeal="preventHeal",X.apply="apply",X.positive="positive",X.negative="negative",X.double="double",X.expiredIndicator="expiredIndicator",X.hidden="hidden",X.amDeck="amDeck",X}(G||{}),tt=function(X){return X.new="new",X.normal="normal",X.expire="expire",X.removed="removed",X.turn="turn",X}(tt||{});class at{constructor(et,st=1){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"types",[]),(0,t.Z)(this,"value",1),"string"==typeof et&&-1==Object.keys(x).indexOf(et)?(console.warn("Invalid condition name: "+et),this.name=x.invalid):this.name=et,this.value=st,this.types.push(G.action),-1!=[x.stun,x.immobilize,x.disarm,x.wound,x.muddle,x.poison,x.invisible,x.strengthen,x.regenerate,x.infect,x.bane,x.brittle,x.chill,x.ward,x.rupture,x.poison_x,x.wound_x].indexOf(this.name)&&this.types.push(G.entity),-1!=[x.stun,x.immobilize,x.disarm,x.wound,x.muddle,x.poison,x.invisible,x.strengthen,x.regenerate,x.infect,x.bane,x.brittle,x.impair,x.rupture,x.ward,x.dodge].indexOf(this.name)&&this.types.push(G.standard),(-1!=this.types.indexOf(G.entity)||-1!=[x.impair,x.dodge].indexOf(this.name))&&this.types.push(G.character),-1!=this.types.indexOf(G.entity)&&this.types.push(G.monster),-1!=[x.poison_x,x.wound_x].indexOf(this.name)&&(this.types.push(G.upgrade),this.types.push(G.value)),-1!=[x.bless,x.chill,x.curse].indexOf(this.name)&&this.types.push(G.stack),-1!=[x.wound,x.wound_x,x.regenerate].indexOf(this.name)&&this.types.push(G.turn),-1!=[x.bane].indexOf(this.name)&&this.types.push(G.afterTurn),-1!=[x.wound,x.wound_x,x.poison,x.poison_x,x.bane,x.brittle,x.infect,x.rupture].indexOf(this.name)&&this.types.push(G.clearHeal),-1!=[x.poison,x.poison_x,x.ward,x.brittle,x.heal,x.shield].indexOf(this.name)&&this.types.push(G.apply),-1!=[x.poison,x.poison_x].indexOf(this.name)&&this.types.push(G.double),-1!=[x.poison,x.poison_x,x.infect].indexOf(this.name)&&this.types.push(G.preventHeal),-1!=[x.stun,x.immobilize,x.disarm,x.muddle,x.invisible,x.strengthen,x.impair].indexOf(this.name)&&this.types.push(G.expire),-1!=[x.regenerate,x.ward,x.invisible,x.strengthen,x.bless,x.dodge].indexOf(this.name)&&this.types.push(G.positive),-1!=[x.stun].indexOf(this.name)&&this.types.push(G.expiredIndicator),-1!=[x.heal,x.shield].indexOf(this.name)&&(this.types.push(G.positive),this.types.push(G.hidden),this.types.push(G.value)),-1!=[x.bless,x.curse,x.empower,x.enfeeble].indexOf(this.name)&&(this.types.push(G.hidden),this.types.push(G.amDeck)),-1!=[x.invalid].indexOf(this.name)&&this.types.push(G.hidden),-1==this.types.indexOf(G.positive)&&this.types.push(G.negative)}}class it extends at{constructor(et,st=1){super(et,st),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"lastState",void 0),(0,t.Z)(this,"permanent",!1),(0,t.Z)(this,"expired",!1),(0,t.Z)(this,"highlight",!1),this.state=tt.normal,this.lastState=tt.new}toModel(){return new K(this.name,this.value,this.state,this.lastState,this.permanent,this.expired,this.highlight)}fromModel(et){this.name=et.name,this.value=et.value,this.state=et.state,this.lastState=et.lastState,this.permanent=et.permanent,this.expired=et.expired,this.highlight=et.highlight}}class K{constructor(et,st,gt,I,Q,lt,_t){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"value",void 0),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"lastState",void 0),(0,t.Z)(this,"permanent",void 0),(0,t.Z)(this,"expired",void 0),(0,t.Z)(this,"highlight",!1),this.name=et,this.value=st,this.state=gt,this.lastState=I,this.permanent=Q,this.expired=lt,this.highlight=_t}}const dt=Object.values(x).map(X=>new at(X))},2113:(q,nt,E)=>{"use strict";E.d(nt,{x:()=>x});var t=E(1180);class x{constructor(tt,at,it){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"character",!1),(0,t.Z)(this,"abilities",void 0),(0,t.Z)(this,"edition",void 0),this.name=tt,this.abilities=at,this.edition=it}}},7680:(q,nt,E)=>{"use strict";E.d(nt,{Bj:()=>at,K8:()=>G,Zd:()=>x,_S:()=>tt});var t=E(1180);const x=[3,8,14,21,29,38,49,63],G=[5,14,26,41,59,80,104,131];class tt{constructor(K,dt,X,et,st,gt,I,Q=void 0,lt=[],_t=[],H=[],Jt=!1,bt=[]){(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"characters",void 0),(0,t.Z)(this,"monsters",void 0),(0,t.Z)(this,"decks",void 0),(0,t.Z)(this,"scenarios",void 0),(0,t.Z)(this,"sections",void 0),(0,t.Z)(this,"items",void 0),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"battleGoals",[]),(0,t.Z)(this,"events",[]),(0,t.Z)(this,"personalQuests",[]),(0,t.Z)(this,"worldMap",void 0),(0,t.Z)(this,"label",{}),(0,t.Z)(this,"labelSpoiler",{}),(0,t.Z)(this,"url",""),(0,t.Z)(this,"logoUrl",""),(0,t.Z)(this,"additional",!1),(0,t.Z)(this,"extensions",[]),(0,t.Z)(this,"newAmStyle",!1),(0,t.Z)(this,"campaign",void 0),(0,t.Z)(this,"treasures",[]),(0,t.Z)(this,"treasureOffset",0),this.edition=K,this.characters=dt,this.monsters=X,this.decks=et,this.scenarios=st,this.sections=gt,this.items=I,Q&&(this.conditions=Q),this.battleGoals=lt,this.events=_t,this.personalQuests=H,this.additional=Jt,this.extensions=bt}}class at{constructor(){(0,t.Z)(this,"campaignStickers",[]),(0,t.Z)(this,"buildings",[]),(0,t.Z)(this,"highMorale",""),(0,t.Z)(this,"lowMorale",""),(0,t.Z)(this,"lootSpecial1Sections",[]),(0,t.Z)(this,"lootSpecial2Sections",[]),(0,t.Z)(this,"townGuardPerks",[]),(0,t.Z)(this,"weeks",{})}}},6140:(q,nt,E)=>{"use strict";E.d(nt,{G3:()=>tt,Jq:()=>at,W_:()=>x,fq:()=>G});var t=E(1180),x=function(it){return it.wild="wild",it.fire="fire",it.ice="ice",it.air="air",it.earth="earth",it.light="light",it.dark="dark",it}(x||{}),G=function(it){return it.strong="strong",it.waning="waning",it.inert="inert",it.new="new",it.consumed="consumed",it.always="always",it}(G||{});class tt{constructor(K){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"state",G.inert),this.type=K}}const at=[new tt(x.fire),new tt(x.ice),new tt(x.air),new tt(x.earth),new tt(x.light),new tt(x.dark)]},377:(q,nt,E)=>{"use strict";E.d(nt,{o:()=>G,r:()=>x});var t=E(1180),x=function(tt){return tt.deck="deck",tt.monsterEdition="monsterEdition",tt.monsterType="monsterType",tt.stat="stat",tt.unknown="unknown",tt}(x||{});class G{constructor(at,...it){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"args",void 0),this.type=at,this.args=it}}},6223:(q,nt,E)=>{"use strict";E.d(nt,{Jc:()=>G,VY:()=>tt,xb:()=>x});var t=E(1180);class x{constructor(it,K){(0,t.Z)(this,"name",""),(0,t.Z)(this,"edition",""),this.name=it,this.edition=K}}class G extends x{constructor(it,K,dt=-1){super(it,K),(0,t.Z)(this,"count",void 0),this.count=dt}}class tt extends x{constructor(it,K,dt=void 0,X=void 0,et=void 0){super(it,K),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"tags",void 0),this.type=dt,this.marker=X,this.tags=et}}},1235:(q,nt,E)=>{"use strict";E.d(nt,{CT:()=>tt,SE:()=>x});var x=function(at){return at.head="head",at.body="body",at.legs="legs",at.onehand="onehand",at.twohand="twohand",at.small="small",at}(x||{}),tt=function(at){return at.spent="spent",at.consumed="consumed",at.flipped="flipped",at.persistent="persistend",at.slot="slot",at.slotBack="slotBack",at}(tt||{})},6441:(q,nt,E)=>{"use strict";E.d(nt,{CG:()=>G,F8:()=>dt,Qq:()=>tt,XA:()=>x,_8:()=>X,k:()=>at,nk:()=>et,tH:()=>it});var t=E(1180),x=function(st){return st.money="money",st.material_resources="material_resources",st.herb_resources="herb_resources",st.random_item="random_item",st.special="special",st}(x||{}),G=function(st){return st.money="money",st.lumber="lumber",st.metal="metal",st.hide="hide",st.arrowvine="arrowvine",st.axenut="axenut",st.corpsecap="corpsecap",st.flamefruit="flamefruit",st.rockroot="rockroot",st.snowthistle="snowthistle",st.random_item="random_item",st.special1="special1",st.special2="special2",st}(G||{});const tt=[G.lumber,G.metal,G.hide,G.arrowvine,G.axenut,G.corpsecap,G.flamefruit,G.rockroot,G.snowthistle,G.money],at=[G.money,G.lumber,G.metal,G.hide,G.arrowvine,G.axenut,G.corpsecap,G.flamefruit,G.rockroot,G.snowthistle,G.special1,G.special2,G.random_item];function it(st){return st==G.money?x.money:st==G.random_item?x.random_item:st==G.special1||st==G.special2?x.special:-1!=[G.lumber,G.metal,G.hide].indexOf(st)?x.material_resources:x.herb_resources}class K{constructor(gt,I,Q,lt=-1,_t=-1){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value4P",void 0),(0,t.Z)(this,"value3P",void 0),(0,t.Z)(this,"value2P",void 0),(0,t.Z)(this,"enhancements",0),(0,t.Z)(this,"cardId",void 0),(0,t.Z)(this,"value",void 0),this.type=gt,this.cardId=I,this.value4P=Q,this.value3P=Q,this.value2P=Q,-1!=lt&&(this.value3P=lt),-1!=_t&&(this.value2P=_t)}}const dt=[new K(G.money,1361,1),new K(G.money,1362,1),new K(G.money,1363,1),new K(G.money,1364,1),new K(G.money,1365,1),new K(G.money,1366,1),new K(G.money,1367,1),new K(G.money,1368,1),new K(G.money,1369,1),new K(G.money,1370,1),new K(G.money,1371,1),new K(G.money,1372,1),new K(G.money,1373,2),new K(G.money,1374,2),new K(G.money,1375,2),new K(G.money,1376,2),new K(G.money,1377,2),new K(G.money,1378,2),new K(G.money,1379,3),new K(G.money,1380,3),new K(G.arrowvine,1381,1),new K(G.arrowvine,1382,1),new K(G.axenut,1383,1),new K(G.axenut,1384,1),new K(G.corpsecap,1385,1),new K(G.corpsecap,1386,1),new K(G.flamefruit,1387,1),new K(G.flamefruit,1388,1),new K(G.rockroot,1389,1),new K(G.rockroot,1390,1),new K(G.snowthistle,1391,1),new K(G.snowthistle,1392,1),new K(G.hide,1393,1,2,2),new K(G.hide,1394,1,2,2),new K(G.hide,1395,1,2,2),new K(G.hide,1396,1,1,2),new K(G.hide,1397,1,1,2),new K(G.hide,1398,1,1,2),new K(G.hide,1399,1),new K(G.hide,1400,1),new K(G.lumber,1401,1,2,2),new K(G.lumber,1402,1,2,2),new K(G.lumber,1403,1,2,2),new K(G.lumber,1404,1,1,2),new K(G.lumber,1405,1,1,2),new K(G.lumber,1406,1,1,2),new K(G.lumber,1407,1),new K(G.lumber,1408,1),new K(G.metal,1408,1,2,2),new K(G.metal,1410,1,2,2),new K(G.metal,1411,1,2,2),new K(G.metal,1412,1,1,2),new K(G.metal,1413,1,1,2),new K(G.metal,1414,1,1,2),new K(G.metal,1415,1),new K(G.metal,1416,1),new K(G.random_item,1417,1),new K(G.special1,1418,1),new K(G.special2,1419,1)];class X{constructor(){(0,t.Z)(this,"current",-1),(0,t.Z)(this,"cards",[]),(0,t.Z)(this,"active",!1)}fromModel(gt){this.current=gt.current,this.cards=gt.cards,this.cards.forEach((I,Q,lt)=>{I.value&&(isNaN(+I.value)?"%game.loot.player.3-4% +1/%game.loot.player.2% +2"==I.value?(I.value4P=1,I.value3P=1,I.value2P=2):"%game.loot.player.4% +1/%game.loot.player.2-3% +2"==I.value?(I.value4P=1,I.value3P=2,I.value2P=2):console.warn("Cannot migrate loot: "+I.value):(I.value4P=+I.value,I.value3P=+I.value,I.value2P=+I.value),I.value=void 0)}),et(this.cards),this.active=gt.active}}function et(st){st.forEach((gt,I,Q)=>{if(!gt.cardId){const lt=dt.find(_t=>_t.type==gt.type&&_t.value2P==gt.value2P&&_t.value3P==gt.value3P&&_t.value4P==gt.value4P&&!Q.find(H=>H.cardId==_t.cardId));lt?gt.cardId=lt.cardId:console.warn("Cannot map cardId for loot:",gt)}})}},7866:(q,nt,E)=>{"use strict";E.d(nt,{A:()=>tt});var t=E(1180),x=E(9144),G=E(4377);class tt{constructor(it=void 0){(0,t.Z)(this,"name",""),(0,t.Z)(this,"count",0),(0,t.Z)(this,"standeeCount",void 0),(0,t.Z)(this,"standeeShare",void 0),(0,t.Z)(this,"standeeShareEdition",void 0),(0,t.Z)(this,"baseStat",new x.c(G.M.normal,0,0,0,0,0)),(0,t.Z)(this,"stats",[]),(0,t.Z)(this,"deck",""),(0,t.Z)(this,"boss",!1),(0,t.Z)(this,"flying",!1),(0,t.Z)(this,"immortal",!1),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"noThumbnail",!1),(0,t.Z)(this,"noArtwork",!1),(0,t.Z)(this,"catching",!1),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"spoiler",!1),(0,t.Z)(this,"errors",[]),(0,t.Z)(this,"hidden",!1),(0,t.Z)(this,"replace",!1),(0,t.Z)(this,"tags",[]),it&&(this.name=it.name,this.count=it.count,this.standeeCount=it.standeeCount,this.standeeShare=it.standeeShare,this.standeeShareEdition=it.standeeShareEdition,this.baseStat=it.baseStat,this.stats=it.stats,this.deck=it.deck,this.boss=it.boss,this.flying=it.flying,this.immortal=it.immortal,this.thumbnail=it.thumbnail,this.thumbnailUrl=it.thumbnailUrl,this.noThumbnail=it.noThumbnail,this.noArtwork=it.noArtwork,this.catching=it.catching,this.edition=it.edition,this.spoiler=it.spoiler,this.errors=it.errors||[],this.hidden=it.hidden,this.replace=it.replace,this.tags=it.tags||[])}}},9144:(q,nt,E)=>{"use strict";E.d(nt,{c:()=>x});var t=E(1180);class x{constructor(at,it,K,dt,X,et,st=[],gt=[],I=[],Q=""){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"movement",void 0),(0,t.Z)(this,"attack",void 0),(0,t.Z)(this,"range",void 0),(0,t.Z)(this,"actions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"special",void 0),(0,t.Z)(this,"note",void 0),this.type=at,this.level=it,this.health=K,this.movement=dt,this.attack=X,this.range=et,this.actions=st||[],this.immunities=gt||[],this.special=I||[],this.note=Q}}},4377:(q,nt,E)=>{"use strict";E.d(nt,{M:()=>t});var t=function(x){return x.normal="normal",x.elite="elite",x.boss="boss",x}(t||{})},2501:(q,nt,E)=>{"use strict";E.d(nt,{Ib:()=>tt}),E(2098);var tt=function(at){return at.add="add",at.remove="remove",at.replace="replace",at.custom="custom",at}(tt||{})},9148:(q,nt,E)=>{"use strict";E.d(nt,{Hj:()=>at,KI:()=>tt,Qw:()=>G});var t=E(1180);class G{constructor(dt){(0,t.Z)(this,"name",""),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"tags",[]),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"player2",void 0),(0,t.Z)(this,"player3",void 0),(0,t.Z)(this,"player4",void 0),(0,t.Z)(this,"health",void 0),this.name=dt}}class tt{constructor(dt,X=-1){if((0,t.Z)(this,"index",0),(0,t.Z)(this,"goal",!1),(0,t.Z)(this,"rewards",[]),this.index=X,"G"==dt)this.goal=!0;else{let et=dt.split("|");for(let st of et)this.rewards.push(new it(st))}}}var at=function(K){return K.custom="custom",K.gold="gold",K.goldFh="goldFh",K.experience="experience",K.experienceFh="experienceFh",K.battleGoal="battleGoal",K.damage="damage",K.condition="condition",K.heal="heal",K.item="item",K.itemFh="itemFh",K.itemDesign="itemDesign",K.randomItem="randomItem",K.randomItemDesign="randomItemDesign",K.itemBlueprint="itemBlueprint",K.randomItemBlueprint="randomItemBlueprint",K.scenario="scenario",K.randomScenario="randomScenario",K.randomScenarioFh="randomScenarioFh",K.partyAchievement="partyAchievement",K.event="event",K.loot="loot",K.lootCards="lootCards",K.resource="resource",K.campaignSticker="campaignSticker",K.calendarSection="calendarSection",K}(at||{});class it{constructor(dt){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",void 0);let X=dt.split(":");try{this.type=X[0],X.length>1&&(this.value=isNaN(+X[1])?X[1]:+X[1])}catch{this.type=at.custom,console.error("Invalid treasure reward string: '"+dt+"'")}}}},301:(q,nt,E)=>{"use strict";E.d(nt,{ZW:()=>it,tR:()=>x});var t=E(1180);class x{constructor(dt=void 0){(0,t.Z)(this,"name",""),(0,t.Z)(this,"index",""),(0,t.Z)(this,"gridLocation",""),(0,t.Z)(this,"coordinates",void 0),(0,t.Z)(this,"unlocks",[]),(0,t.Z)(this,"blocks",[]),(0,t.Z)(this,"requires",[]),(0,t.Z)(this,"requirements",[]),(0,t.Z)(this,"links",[]),(0,t.Z)(this,"forcedLinks",[]),(0,t.Z)(this,"group",void 0),(0,t.Z)(this,"monsters",[]),(0,t.Z)(this,"allies",[]),(0,t.Z)(this,"allied",[]),(0,t.Z)(this,"drawExtra",[]),(0,t.Z)(this,"objectives",[]),(0,t.Z)(this,"rooms",[]=[]),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"rules",[]),(0,t.Z)(this,"initial",!1),(0,t.Z)(this,"random",!1),(0,t.Z)(this,"solo",void 0),(0,t.Z)(this,"allyDeck",!1),(0,t.Z)(this,"lootDeckConfig",{}),(0,t.Z)(this,"parent",void 0),(0,t.Z)(this,"parentSections",[]),(0,t.Z)(this,"blockedSections",[]),(0,t.Z)(this,"resetRound",void 0),(0,t.Z)(this,"rewards",void 0),(0,t.Z)(this,"retirement",""),(0,t.Z)(this,"conclusion",!1),(0,t.Z)(this,"named",!1),(0,t.Z)(this,"hideIndex",!1),(0,t.Z)(this,"complexity",0),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"spoiler",!1),dt&&(this.name=dt.name,this.index=dt.index,this.gridLocation=dt.gridLocation,this.unlocks=dt.unlocks,this.blocks=dt.blocks,this.requires=dt.requires,this.requirements=dt.requirements||[],this.links=dt.links,this.forcedLinks=dt.forcedLinks,this.group=dt.group,this.monsters=dt.monsters,this.allies=dt.allies,this.allied=dt.allied,this.drawExtra=dt.drawExtra,this.objectives=dt.objectives,this.rooms=dt.rooms,this.marker=dt.marker,this.rules=dt.rules,this.initial=dt.initial,this.random=dt.random,this.solo=dt.solo,this.allyDeck=dt.allyDeck,this.lootDeckConfig=dt.lootDeckConfig,this.parent=dt.parent,this.parentSections=dt.parentSections,this.blockedSections=dt.blockedSections,this.resetRound=dt.resetRound,this.rewards=dt.rewards,this.retirement=dt.retirement,this.conclusion=dt.conclusion,this.edition=dt.edition,this.spoiler=dt.spoiler,this.named=dt.named,this.hideIndex=dt.hideIndex,this.complexity=dt.complexity)}}class it{constructor(){(0,t.Z)(this,"conclusion",void 0),(0,t.Z)(this,"success",!1),(0,t.Z)(this,"battleGoals",[]),(0,t.Z)(this,"collectiveGold",[]),(0,t.Z)(this,"items",[]),(0,t.Z)(this,"chooseLocation",void 0),(0,t.Z)(this,"chooseUnlockCharacter",void 0),(0,t.Z)(this,"challenges",0),(0,t.Z)(this,"calendarSectionConditional",[]),(0,t.Z)(this,"calenderSectionManual",[]),(0,t.Z)(this,"calendarSectionManual",[]),(0,t.Z)(this,"randomItem",void 0),(0,t.Z)(this,"randomItemIndex",-1),(0,t.Z)(this,"randomItems",[]),(0,t.Z)(this,"randomItemBlueprints",[])}}},8927:(q,nt,E)=>{"use strict";E.d(nt,{Hy:()=>gt,NB:()=>it,Ul:()=>at,eL:()=>dt,lz:()=>et,q_:()=>K,sm:()=>I,uZ:()=>X,wE:()=>tt});var t=E(9594),x=E(731);function G(){return+window.getComputedStyle(document.body).getPropertyValue("--ghs-width").replace(/[^\d\+]/g,"")/+window.getComputedStyle(document.body).getPropertyValue("--ghs-factor")}function tt(Q){let _t,lt=Q.length;for(;0!=lt;)_t=Math.floor(Math.random()*lt),lt--,[Q[lt],Q[_t]]=[Q[_t],Q[lt]];return Q}function at(Q,lt=!1){return lt?Q.filter(_t=>_t.spoiler&&-1==x.r.settings.spoilers.indexOf(_t.name)).length>1:Q.some(_t=>_t.spoiler&&-1==x.r.settings.spoilers.indexOf(_t.name))}function it(Q){return!Q.spoiler||-1!=x.r.settings.spoilers.indexOf("[ALL]")||-1!=x.r.settings.spoilers.indexOf(Q.name)}function K(Q){return Q.filter(lt=>!it(lt))}function dt(Q,lt,_t=!1){return _t?Q.toLowerCase()==lt.toLowerCase():lt.split(" ").every(H=>-1!=Q.toLowerCase().indexOf(H.toLowerCase()))}function X(Q,lt=!1){return Q>0?"+"+Q:lt&&0==Q?"-":""+Q}function et(){x.r.settings.fullscreen&&document.fullscreenElement&&(document.exitFullscreen(),document.body.classList.add("fullscreen")),window.addEventListener("focus",st,!0)}function st(Q){setTimeout(()=>{if(x.r.settings.fullscreen&&!document.fullscreenElement){try{document.body.requestFullscreen()}catch{}document.body.classList.remove("fullscreen")}window.removeEventListener("focus",st,!0)})}function gt(Q,lt){return(Q%lt+lt)%lt}function I(Q="right"){const H=[new t.tR({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"},1.5*G(),-3*G()),new t.tR({originX:"end",originY:"center"},{overlayX:"start",overlayY:"center"}),new t.tR({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"},1.5*G(),3*G())],Jt=[new t.tR({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"},-1.5*G(),-3*G()),new t.tR({originX:"start",originY:"center"},{overlayX:"end",overlayY:"center"}),new t.tR({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"},-1.5*G(),3*G())],bt=[new t.tR({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"},0,3*G()),new t.tR({originX:"center",originY:"center"},{overlayX:"center",overlayY:"center"}),new t.tR({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"},0,-3*G())];switch(Q){case"right":return[...H,...Jt,...bt];case"left":return[...Jt,...H,...bt];case"center":return[...bt,...Jt,...H]}}},2794:(q,nt,E)=>{"use strict";var t=E(9468),x=E(6814); +(self.webpackChunkgloomhavensecretariat=self.webpackChunkgloomhavensecretariat||[]).push([[179],{5604:(q,nt,E)=>{"use strict";E.d(nt,{v:()=>Y});var t=E(1180),x=E(5609),G=E(3788),tt=E(2113),at=E(7680),it=E(7866),K=E(377),dt=E(6565),X=E(7177),et=E(9120),st=E(8927),gt=E(2098),I=E(2501),Q=E(731);class lt{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}byFigure(p){return p instanceof x.z?p.attackModifierDeck:p instanceof X.Q?(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules())&&(p.isAlly||p.isAllied)?this.game.allyAttackModifierDeck:this.game.monsterAttackModifierDeck:new gt.ut}countUpcomingBlesses(){let p=0;return(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules()&&Y.game.figures.some(P=>P instanceof X.Q&&(P.isAlly||P.isAllied)))&&(p+=Y.game.allyAttackModifierDeck.cards.filter((P,M)=>P.type==gt.kl.bless&&M>Y.game.allyAttackModifierDeck.current).length),p+=Y.game.monsterAttackModifierDeck.cards.filter((P,M)=>P.type==gt.kl.bless&&M>Y.game.monsterAttackModifierDeck.current).length,Y.game.figures.filter(P=>P instanceof x.z).map(P=>P).forEach(P=>{p+=P.attackModifierDeck.cards.filter((M,y)=>M.type==gt.kl.bless&&y>P.attackModifierDeck.current).length}),p}countUpcomingCurses(p){if(p)return Y.game.monsterAttackModifierDeck.cards.filter((M,y)=>M.type==gt.kl.curse&&y>Y.game.monsterAttackModifierDeck.current).length;let P=0;return(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules()&&Y.game.figures.some(M=>M instanceof X.Q&&(M.isAlly||M.isAllied)))&&(P+=Y.game.allyAttackModifierDeck.cards.filter((M,y)=>M.type==gt.kl.curse&&y>Y.game.allyAttackModifierDeck.current).length),Y.game.figures.filter(M=>M instanceof x.z).map(M=>M).forEach(M=>{P+=M.attackModifierDeck.cards.filter((y,S)=>y.type==gt.kl.curse&&S>M.attackModifierDeck.current).length}),P}getAdditional(p,P,M=!1){let y=[];return p.additionalModifier.find(S=>S.attackModifier&&S.attackModifier.type==P)&&p.additionalModifier.forEach((S,U)=>{if(S.attackModifier&&S.attackModifier.type==P){let V=Object.assign(new gt.YY(S.attackModifier.type,S.attackModifier.value,S.attackModifier.valueType),S.attackModifier);V.id="additional-"+p.name+U,V.character=!0;const $=M?0:this.countUpcomingAdditional(p,P);for(let ut=0;ut{P.additionalModifier.find(M=>M.attackModifier)&&P.additionalModifier.forEach((M,y)=>{if(M.attackModifier){let S=Object.assign(new gt.YY(M.attackModifier.type,M.attackModifier.value,M.attackModifier.valueType),M.attackModifier);S.id="additional-"+P.name+y,S.character=!0;for(let U=0;Uy instanceof X.Q&&(y.isAlly||y.isAllied)))&&(M+=Y.game.allyAttackModifierDeck.cards.filter((y,S)=>S>Y.game.allyAttackModifierDeck.current&&y.type==P&&y.id&&y.id.startsWith("additional-"+p.name)).length),M+=Y.game.monsterAttackModifierDeck.cards.filter((y,S)=>S>Y.game.monsterAttackModifierDeck.current&&y.type==P&&y.id&&y.id.startsWith("additional-"+p.name)).length,Y.game.figures.filter(y=>y instanceof x.z).map(y=>y).forEach(y=>{M+=y.attackModifierDeck.cards.filter((S,U)=>U>y.attackModifierDeck.current&&S.type==P&&S.id&&S.id.startsWith("additional-"+p.name)).length}),M}countExtraMinus1(){let p=0;return(Q.r.settings.alwaysAllyAttackModifierDeck||Y.fhRules()&&Y.game.figures.some(P=>P instanceof X.Q&&(P.isAlly||P.isAllied)))&&(p+=Y.game.allyAttackModifierDeck.cards.filter(P=>P.type==gt.kl.minus1extra).length),p+=Y.game.monsterAttackModifierDeck.cards.filter(P=>P.type==gt.kl.minus1extra).length,Y.game.figures.filter(P=>P instanceof x.z).map(P=>P).forEach(P=>{p+=P.attackModifierDeck.cards.filter(M=>M.type==gt.kl.minus1extra).length}),p}addModifier(p,P,M=-1){(M<0||M>p.cards.length)&&(M=Math.floor(Math.random()*(p.cards.length-p.current))+p.current+1),p.cards.splice(M,0,P)}drawModifier(p){p.current=p.current+1,p.current==p.cards.length&&this.shuffleModifiers(p)}shuffleModifiers(p){p.cards=p.cards.filter((P,M)=>M>p.current||P.type!=gt.kl.bless&&P.type!=gt.kl.curse),p.current=-1,(0,st.wE)(p.cards)}removeDrawnDiscards(p){const P=p.cards.length;p.cards=p.cards.filter((M,y)=>y>p.current||M.type!=gt.kl.bless&&M.type!=gt.kl.curse),p.current=p.current-(P-p.cards.length)}next(){this.checkShuffle(this.game.monsterAttackModifierDeck),this.checkShuffle(this.game.allyAttackModifierDeck),this.game.figures.forEach(p=>{p instanceof x.z&&this.checkShuffle(p.attackModifierDeck)})}draw(){this.shuffleModifiers(this.game.monsterAttackModifierDeck),this.shuffleModifiers(this.game.allyAttackModifierDeck),this.game.figures.forEach(p=>{p instanceof x.z&&this.shuffleModifiers(p.attackModifierDeck)})}checkShuffle(p){p.cards.some((P,M)=>M<=p.current&&P.shuffle)&&this.shuffleModifiers(p)}buildCharacterAttackModifierDeck(p){const P=new gt.ut;let M=0;if(p.perks.forEach(y=>{y.cards&&y.cards.forEach((S,U)=>{if(y.type==I.Ib.add||y.type==I.Ib.replace){let V=Object.assign(new gt.YY(S.attackModifier.type,S.attackModifier.value,S.attackModifier.valueType),S.attackModifier);V.id="perk"+M,V.shuffle=S.attackModifier.shuffle||!1,(!this.findByAttackModifier(gt.UO,V)||y.type==I.Ib.add||U>0)&&(V.character=!0),this.findByAttackModifier(P.attackModifiers,V)||(M++,P.attackModifiers.push(V))}})}),p.progress&&p.progress.perks&&p.progress.perks.forEach((y,S)=>{const U=p.perks[S];if(U)if(U.combined)y==U.count&&this.addPerkCard(U,P,gt.UO);else for(let V=0;V"gh"==y.edition&&"101"==y.name)){let y=P.cards.find(S=>S.id==gt.kl.minus1);y&&(P.cards.splice(P.cards.indexOf(y),1),y=P.cards.find(S=>S.id==gt.kl.minus1),y&&P.cards.splice(P.cards.indexOf(y),1))}if(p.progress.equippedItems.find(y=>"toa"==y.edition&&"107"==y.name)){const y=P.cards.find(S=>S.id==gt.kl.minus2);y&&P.cards.splice(P.cards.indexOf(y),1)}if(p.progress.equippedItems.find(y=>"fh"==y.edition&&"11"==y.name)){const y=P.cards.find(S=>S.id==gt.kl.minus1);y&&P.cards.splice(P.cards.indexOf(y),1)}if(p.progress.equippedItems.find(y=>"fh"==y.edition&&"41"==y.name)){const y=P.cards.find(U=>U.id==gt.kl.plus0);y&&P.cards.splice(P.cards.indexOf(y),1);const S=P.cards.find(U=>U.id==gt.kl.minus1);S&&P.cards.splice(P.cards.indexOf(S),1)}return P}buildTownGuardAttackModifierDeck(p,P){const M=gt.fQ.map(U=>U.clone()),y=new gt.ut(M);y.attackModifiers.push(...gt.Bt);let S=0;return P.townGuardPerks.forEach(U=>{const V=U.perk;V.cards&&V.cards.forEach(($,ut)=>{if(V.type==I.Ib.add||V.type==I.Ib.replace){let pt=Object.assign(new gt.YY($.attackModifier.type,$.attackModifier.value,$.attackModifier.valueType),$.attackModifier);pt.id="perk"+S,(!this.findByAttackModifier(M,pt)||V.type==I.Ib.add||ut>0)&&(pt.character=!0),this.findByAttackModifier(y.attackModifiers,pt)||(S++,y.attackModifiers.push(pt))}})}),p.townGuardPerkSections&&P.townGuardPerks.forEach(U=>{const V=U.perk;if(!V)return;const $=U.sections.filter(ut=>-1!=p.townGuardPerkSections.indexOf(ut)).length;if(V.combined)$==V.count&&this.addPerkCard(V,y,M);else for(let ut=0;ut<$;ut++)this.addPerkCard(V,y,M)}),p.scenarios.forEach(U=>{const V=Y.scenarioManager.scenarioDataForModel(U);V&&V.rewards&&V.rewards.townGuardAm&&V.rewards.townGuardAm.forEach(($,ut)=>{let pt=y.attackModifiers.find(Vt=>Vt.id==$);pt?y.cards.push(pt.clone()):console.warn("Unknown Town Guard AM:",$)})}),p.conclusions.forEach(U=>{const V=Y.scenarioManager.sectionDataForModel(U);V&&V.rewards&&V.rewards.townGuardAm&&V.rewards.townGuardAm.forEach(($,ut)=>{let pt=y.attackModifiers.find(Vt=>Vt.id==$);pt?y.cards.push(pt.clone()):console.warn("Unknown Town Guard AM:",$)})}),y}addPerkCard(p,P,M){if(p.cards=p.cards||[],p.cards.forEach((y,S)=>{(!this.findByAttackModifier(M,y.attackModifier)||p.type==I.Ib.add||p.type==I.Ib.replace&&S>=this.replaceCount(p))&&(y.attackModifier.character=!0)}),p.type==I.Ib.add)this.addCards(P,p.cards);else if(p.type==I.Ib.remove)this.removeCards(P,p.cards);else if(p.type==I.Ib.replace){const y=this.replaceCount(p);y&&(this.removeCards(P,p.cards.slice(0,y)),this.addCards(P,p.cards.slice(y,p.cards.length)))}}replaceCount(p){let P=0;return p.type==I.Ib.replace&&(P=1,p.cards.forEach((M,y,S)=>{let U=S.slice(0,y+1).map(V=>V.count).reduce((V,$)=>V+$);yV.count).reduce((V,$)=>V+$)&&(U=y+1)})),P}findByAttackModifier(p,P,M=!1){return p.find(y=>{let S=Object.assign(new gt.YY(P.type,P.value,P.valueType),P);S.id="",S.revealed=!1,S.shuffle=P.shuffle||!1;let U=Object.assign(new gt.YY(y.type,y.value,y.valueType),y);return U.id="",U.revealed=!1,U.shuffle=y.shuffle||!1,M&&U.character&&(U.character=!1),JSON.stringify(S)==JSON.stringify(U)})}addCards(p,P){P.forEach(M=>{for(let y=0;y{for(let y=0;yy.id==P);if(M||(M=gt.UO.find(y=>y.id==P),M||(M=gt.jB.find(y=>y.id==P)),M||(M=this.getAllAdditional().find(y=>y.id==P)),M||(M=gt.fQ.find(y=>y.id==P)),M))return JSON.parse(JSON.stringify(M))}fromModel(p,P){P.current!=p.current&&(p.current=P.current),P.cards=P.cards.map(M=>("scenario-reward-55-0"==M?M="fh-tg-add-plus50-algox":"scenario-reward-56-0"==M||"scenario-reward-57-0"==M?M="fh-tg-add-plus50":"scenario-reward-58-0"==M||"scenario-reward-59-0"==M?M="fh-tg-add-plus50-unfettered":"scenario-reward-60-0"==M?M="fh-tg-add-plus50-lurkers":"conclusion-reward-50.2-0"==M&&(M="fh-tg-add-plus20"),M)),p.cards=P.cards.map(M=>this.cardById(p,M)||new gt.YY(gt.kl.invalid,0,gt.tI.default,M)),p.disgarded=P.disgarded||[],p.active=P.active}}var _t=E(2736),H=E(9310),Jt=E(3157),bt=E(8272),Tt=E(4004);class Rt{constructor(p){(0,t.Z)(this,"game",void 0),(0,t.Z)(this,"xpMap",[0,45,95,150,210,275,345,420,500]),this.game=p}characterIcon(p){const P=Y.getCharacterData(p);return P.iconUrl?P.iconUrl:P.icon?"./assets/images/character/icons/"+P.icon+".svg":"./assets/images/character/icons/"+P.edition+"-"+P.name+".svg"}characterIdentityIcon(p,P){const M=Y.getCharacterData(p);return M.identities&&0!=M.identities.length?"./assets/images/character/icons/"+M.edition+"-"+M.name+"-"+M.identities[P]+".svg":this.characterIcon(p)}characterName(p,P=!1){let M=Q.r.getLabel("data.character."+p.name),y=!1;return p.identities.length>0&&Q.r.settings.characterIdentities?p.title&&p.title.split("|")[p.identity]&&p.title.split("|")[p.identity]?(M=p.title.split("|")[p.identity],y=!0):Q.r.settings.characterIdentityHint&&!P&&(M+=" ("+Q.r.getLabel("data.character."+p.name+"."+p.identities[p.identity])+")"):p.title&&(M=p.title,y=!0),P&&y&&(M+=" ("+Q.r.getLabel("data.character."+p.name)+")"),M}characterColor(p){let P;return P=p instanceof G.x3?p:Y.getCharacterData(p),P.color}characterThumbnail(p){return p.thumbnailUrl?p.thumbnailUrl:p.thumbnail?"./assets/images/character/thumbnail/"+p.thumbnail+".png":"./assets/images/character/thumbnail/"+p.edition+"-"+p.name+".png"}characterCount(){return this.game.playerCount>0?this.game.playerCount:this.game.figures.filter(p=>p instanceof x.z&&!p.absent).length}addCharacter(p,P){if(!this.game.figures.some(M=>M instanceof x.z&&M.name==p.name&&M.edition==p.edition)){let M=new x.z(p,P);for(M.availableSummons.filter(y=>y.special).forEach(y=>this.createSpecialSummon(M,y)),M.number=1;Y.game.figures.some(y=>y instanceof x.z&&y.number==M.number);)M.number++;this.game.party.retirements&&this.game.party.retirements.forEach(y=>{y.number==M.number&&M.progress.retirements++}),0==M.progress.gold&&(Y.fhRules()?M.progress.gold=10*Y.prosperityLevel()+20:Y.editionRules("jotl")||(M.progress.gold=15*(M.level+1))),M.tags.push("new-character"),this.game.figures.push(M),Y.addEntityCount(M),this.game.state==dt.D2.next&&Y.attackModifierManager.shuffleModifiers(M.attackModifierDeck),Y.sortFigures(M)}this.game.levelCalculation&&Y.levelManager.calculateScenarioLevel()}removeCharacter(p,P=!1){if(this.game.figures.splice(this.game.figures.indexOf(p),1),P&&Q.r.settings.applyRetirement&&(Y.game.party.prosperity+=Y.fhRules()?2:1),p.marker){const M=p.edition+"-"+p.name;this.game.figures.forEach(y=>{y instanceof x.z?(y.markers.splice(y.markers.indexOf(M),1),y.summons&&y.summons.forEach(S=>{S.markers.splice(S.markers.indexOf(M),1)})):y instanceof et.CH?y.markers.splice(y.markers.indexOf(M),1):y instanceof X.Q&&y.entities.forEach(S=>{S.markers.splice(S.markers.indexOf(M),1)})})}this.game.levelCalculation&&Y.levelManager.calculateScenarioLevel()}addSummon(p,P){p.summons=p.summons.filter(M=>M.name!=P.name||M.number!=P.number||M.color!=P.color),p.summons.push(P)}removeSummon(p,P){p.summons.splice(p.summons.indexOf(P),1)}addObjective(p=void 0,P=void 0,M=void 0){const y=Y.game.figures.filter(V=>V instanceof et.CH).length;let S=y%12;if(y<12)for(;this.game.figures.some(V=>V instanceof et.CH&&V.id==S);)S++;let U=new et.CH((0,Tt.Z)(),S,M);return p&&(p.id&&-1!=p.id&&(U.id=p.id),U.marker=p.marker,U.tags=p.tags,U.name=p.name,P&&(U.name=P),U.maxHealth=p.health,U.health=(0,Jt.j9)(""+p.health),U.escort=p.escort,p.initiative&&(U.initiative=p.initiative)),this.game.figures.push(U),Y.addEntityCount(U),Y.sortFigures(U),U}removeObjective(p){this.game.figures.splice(this.game.figures.indexOf(p),1)}addXP(p,P,M=!0){p.progress.experience+=P,M&&this.xpMap.forEach((y,S)=>{p.progress.experience>=y&&(SS.level==P);M?p.stat=M:(p.errors=p.errors||[],!p.errors.find(S=>S.type==K.r.unknown)&&!p.errors.find(S=>S.type==K.r.stat)&&(console.error("No character stat found for level: "+P),p.errors.push(new K.o(K.r.stat,"character",p.name,p.edition,"",""+P))),p.stat=new _t.a(P,0)),p.level=P;const y=p.health==p.maxHealth;p.maxHealth=p.stat.health,"shackles"==p.name&&"fh"==p.edition&&2==p.progress.perks[11]&&(p.maxHealth+=5),p.progress.equippedItems.find(S=>"fh"==S.edition&&"3"==S.name)&&(p.maxHealth+=1,p.health+=1),(p.health>p.maxHealth||y)&&(p.health=p.maxHealth),p.availableSummons.filter(S=>S.special).forEach(S=>this.createSpecialSummon(p,S)),(p.progress.experience=Y.characterManager.xpMap[P])&&(p.progress.experience=Y.characterManager.xpMap[P-1]),this.game.levelCalculation&&Y.levelManager.calculateScenarioLevel()}createSpecialSummon(p,P){if(p.summons=p.summons.filter(M=>M.name!=P.name||0!=M.number||M.color!=bt.mp.custom),!P.level||P.level<=p.level){let M=new bt.eU((0,Tt.Z)(),P.name,P.cardId,p.level,0,bt.mp.custom,P);M.state=bt.HY.true,M.init=!1,this.addSummon(p,M)}}ignoreNegativeItemEffects(p){let P=p.perks.find(M=>M.custom&&(-1!=M.custom.indexOf("%game.custom.perks.ignoreNegativeItem%")||-1!=M.custom.indexOf("%game.custom.perks.ignoreNegativeItemFh%")));if(P){const M=p.perks.indexOf(P);return p.progress.perks[M]&&P.combined?p.progress.perks[M]==P.count:p.progress.perks[M]>0}return!1}ignoreNegativeScenarioffects(p){let P=p.perks.find(M=>M.custom&&(-1!=M.custom.indexOf("%game.custom.perks.ignoreNegativeScenario%")||-1!=M.custom.indexOf("%game.custom.perks.ignoreScenario%")));if(P){const M=p.perks.indexOf(P);return p.progress.perks[M]&&P.combined?p.progress.perks[M]==P.count:p.progress.perks[M]>0}return!1}itemEffect(p){return"gh"==p.edition?-1!=[16,38,52,101,103,108].indexOf(p.id):"cs"==p.edition?-1!=[157,71].indexOf(p.id):"toa"==p.edition?-1!=[101,107].indexOf(p.id):"fh"==p.edition&&-1!=[3,11,41,60,132,138,178].indexOf(p.id)}applyDonations(p){for(let P=0;P!S.rolling&&!this.game.figures.find(U=>U instanceof x.z&&U.attackModifierDeck.cards.find(V=>V.id==S.id))),y=gt.jB.filter(S=>S.rolling&&!this.game.figures.find(U=>U instanceof x.z&&U.attackModifierDeck.cards.find(V=>V.id==S.id)));M.length>0&&Y.attackModifierManager.addModifier(p.attackModifierDeck,M[Math.floor(Math.random()*M.length)]),y.length>0&&Y.attackModifierManager.addModifier(p.attackModifierDeck,y[Math.floor(Math.random()*y.length)])}else Y.attackModifierManager.addModifier(p.attackModifierDeck,new gt.YY(gt.kl.bless)),Y.attackModifierManager.addModifier(p.attackModifierDeck,new gt.YY(gt.kl.bless));p.donations=0}next(){this.game.figures.forEach(p=>{p instanceof x.z?(p.initiative=0,p.initiativeVisible=!1,p.off=!1,Q.r.settings.characterAttackModifierDeckPermanent||(p.attackModifierDeckVisible=!1),p.lootCardsVisible=!1,p.longRest=!1,p.summons=p.summons.filter(P=>Y.entityManager.isAlive(P)),p.summons.forEach(P=>{P.state==bt.HY.new&&(P.state=bt.HY.true)}),p.progress.equippedItems.find(P=>"cs"==P.edition&&"57"==P.name)&&Y.entityManager.hasCondition(p,new H.gP(H.fT.wound))&&!Y.entityManager.hasCondition(p,new H.gP(H.fT.regenerate))&&Y.entityManager.addCondition(p,new H.gP(H.fT.regenerate),p.active,p.off)):p instanceof et.CH&&(p.off=!1)})}draw(){1==this.game.round&&this.game.figures.forEach(p=>{p instanceof x.z&&(this.applyDonations(p),p.initiativeVisible=!0)}),this.game.figures.forEach(p=>{(p instanceof x.z||p instanceof et.CH)&&Y.entityManager.isAlive(p)&&(!(p instanceof x.z)||!p.absent)&&(p.off=!1)})}personalQuestByCard(p,P){return Y.editionData.filter(M=>M.edition==p||-1!=Y.editionExtensions(p).indexOf(M.edition)).flatMap(M=>M.personalQuests).find(M=>M.cardId==P||M.altId==P||M.altId=="0"+P)}}var Dt=E(1240),Ht=E(5861),jt=E(7484),wt=E(3329),Zt=E(3306);class qt{constructor(p){(0,t.Z)(this,"game",void 0),(0,t.Z)(this,"permissions",void 0),(0,t.Z)(this,"ws",void 0),(0,t.Z)(this,"undos",[]),(0,t.Z)(this,"redos",[]),(0,t.Z)(this,"undoInfos",[]),(0,t.Z)(this,"lastSaveTimestamp",void 0),(0,t.Z)(this,"hasUpdate",!1),(0,t.Z)(this,"installPrompt",null),(0,t.Z)(this,"lastAction","update"),(0,t.Z)(this,"updateBlocked",!1),(0,t.Z)(this,"serverError",!1),(0,t.Z)(this,"errorLog",[]),(0,t.Z)(this,"backupError",void 0),(0,t.Z)(this,"permissionBackup",void 0),(0,t.Z)(this,"connectionTries",0),(0,t.Z)(this,"gameOffsetWarning",!0),(0,t.Z)(this,"standeeDialogCanceled",!1),(0,t.Z)(this,"keyboardSelecting",!1),(0,t.Z)(this,"keyboardSelect",-1),(0,t.Z)(this,"undoPermission",!1),(0,t.Z)(this,"redoPermission",!1),(0,t.Z)(this,"characterPermissions",{}),(0,t.Z)(this,"monsterPermissions",{}),(0,t.Z)(this,"wakeLock",null),(0,t.Z)(this,"scenarioSummary",!1),(0,t.Z)(this,"storageBlocked",!1),(0,t.Z)(this,"autoBackupTimeout",null),this.game=p,this.lastSaveTimestamp=(new Date).getTime()}init(p=!1){var P=this;return(0,Ht.Z)(function*(){try{const y=yield Zt.j.readGameModel();y.server=!1,P.game.fromModel(y)}catch{p||Zt.j.writeGameModel(P.game.toModel())}P.updateBlocked=!1,Q.r.settings.serverUrl&&Q.r.settings.serverPort&&Q.r.settings.serverPassword&&(Q.r.settings.serverAutoconnect?P.connect():(Y.stateManager.updateBlocked=!0,Y.stateManager.permissions=new jt.P,P.updatePermissions())),P.loadStorage();const M=P.undos.length+P.redos.length-P.undoInfos.length;for(let y=0;y{(!Q.r.settings.serverUrl||!Q.r.settings.serverPort||!Q.r.settings.serverPassword)&&(P.permissions=void 0,P.updateBlocked=!1),P.updatePermissions()}}),Y.uiChange.emit()})()}install(){var p=this;return(0,Ht.Z)(function*(){p.installPrompt&&(p.installPrompt.prompt(),yield Y.stateManager.installPrompt.userChoice,p.installPrompt=null)})()}loadStorage(){var p=this;return(0,Ht.Z)(function*(){try{p.undos=yield Zt.j.readAll("undo"),p.redos=yield Zt.j.readAll("redo"),p.undoInfos=yield Zt.j.readAll("undo-infos"),p.updatePermissions()}catch{p.updatePermissions()}})()}saveStorage(){var p=this;return(0,Ht.Z)(function*(){p.storageBlocked||(p.storageBlocked=!0,yield Zt.j.writeArray("undo",p.undos),yield Zt.j.writeArray("redo",p.redos),yield Zt.j.writeArray("undo-infos",p.undoInfos),p.storageBlocked=!1)})()}buildWsUrl(p,P,M){let y=P.split("/");const S=y[0];let U="";return y.length>1&&(U="/"+y.splice(1,y.length+1).join("/")),U=p+S+":"+M+U,U}connect(){Q.r.settings.serverUrl&&Q.r.settings.serverPort&&Q.r.settings.serverPassword&&(this.disconnect(),this.connectionTries++,this.ws=new WebSocket(this.buildWsUrl(Q.r.settings.serverWss?"wss://":"ws://",Q.r.settings.serverUrl,Q.r.settings.serverPort)),this.ws.onmessage=this.onMessage,this.ws.onopen=this.onOpen,this.ws.onclose=this.onClose,this.ws.onerror=this.onError)}disconnect(){this.permissions=void 0,this.updatePermissions(),this.ws&&this.ws.readyState!=WebSocket.CLOSED&&this.ws.close()}onMessage(p){try{const P=JSON.parse(p.data);switch(Y.stateManager.updateBlocked=!1,P.type){case"game":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let M=P.payload;Y.game.revision>M.revision&&(Y.stateManager.before(),Zt.j.addBackup(Y.game.toModel()),console.warn("An older revision was loaded from server, created a backup of previous state."),Y.stateManager.saveLocal(),Y.stateManager.before("serverSyncEmpty"));const y=P.undoinfo;y&&(y.length>0&&"serverSync"==y[0]?Y.stateManager.before("serverSync",...y.slice(1)):Y.game.revision-(Y.game.revisionOffset||0){window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1;break;case"game-undo":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let S=P.payload;if(null!=P.revision){const $=P.revision||0;let ut=0,pt=Y.stateManager.undos.splice(Y.stateManager.undos.length-1,1)[0];for(pt&&pt.revision-(pt.revisionOffset||0)>$&&(Y.stateManager.redos.push(pt),ut++);pt&&pt.revision-(pt.revisionOffset||0)>$;)pt=Y.stateManager.undos.splice(Y.stateManager.undos.length-1,1)[0],pt&&pt.revision-(pt.revisionOffset||0)>$&&(Y.stateManager.redos.push(pt),ut++);(!pt||pt.revision-(pt.revisionOffset||0)!=$)&&Y.stateManager.undoInfos.splice(Y.stateManager.undos.length-Y.stateManager.redos.length,0,P.undoinfo?"serverSync"==P.undoinfo[0]?P.undoinfo:["serverSync",...P.undoinfo]:["serverSync"]),Y.stateManager.redos.splice(Y.stateManager.redos.length-ut,0,Y.game.toModel())}else{Y.stateManager.redos.push(Y.game.toModel());const $=Y.stateManager.undos[Y.stateManager.undos.length-1];$&&$.revision-$.revisionOffset==Y.game.revision-Y.game.revisionOffset-1?Y.stateManager.undos.splice(Y.stateManager.undos.length-1,1):Y.stateManager.undoInfos.splice(Y.stateManager.undoInfos.length-Y.stateManager.redos.length,0,P.undoinfo?["serverSync",...P.undoinfo]:["serverSync"])}Y.game.fromModel(S),Y.stateManager.saveLocal(),Y.stateManager.saveStorage(),Y.uiChange.emit(!0),setTimeout(()=>{window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1;break;case"game-redo":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let U=P.payload;if(null!=P.revision){const $=P.revision||0;let ut=0,pt=Y.stateManager.redos.splice(Y.stateManager.redos.length-1,1)[0];for(pt&&pt.revision-(pt.revisionOffset||0)<$?(Y.stateManager.undos.push(pt),ut++):pt&&pt.revision-(pt.revisionOffset||0)>$&&Y.stateManager.redos.push(pt);pt&&pt.revision-(pt.revisionOffset||0)<$;)pt=Y.stateManager.redos.splice(Y.stateManager.redos.length-1,1)[0],pt&&pt.revision-(pt.revisionOffset||0)<$&&(Y.stateManager.undos.push(pt),ut++);(!pt||pt.revision-(pt.revisionOffset||0)!=$)&&Y.stateManager.undoInfos.splice(Y.stateManager.undos.length+ut,0,P.undoinfo?"serverSync"==P.undoinfo[0]?P.undoinfo:["serverSync",...P.undoinfo]:["serverSync"]),Y.stateManager.undos.splice(Y.stateManager.undos.length-ut,0,Y.game.toModel())}else{Y.stateManager.undos.push(Y.game.toModel());const $=Y.stateManager.redos.length>0?Y.stateManager.redos[Y.stateManager.redos.length-1]:void 0;$&&$.revision-$.revisionOffset==Y.game.revision-Y.game.revisionOffset+1?Y.stateManager.redos.splice(Y.stateManager.redos.length-1,1):Y.stateManager.undoInfos.splice(Y.stateManager.undoInfos.length-Y.stateManager.redos.length,0,P.undoinfo&&["serverSync",...P.undoinfo]||["serverSync"])}Y.game.fromModel(U),Y.stateManager.saveLocal(),Y.stateManager.saveStorage(),Y.uiChange.emit(!0),setTimeout(()=>{window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1;break;case"game-update":window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");let V=P.payload;Y.game.revision==V.revision&&(Y.game.playSeconds=V.playSeconds,Y.game.server=V.server,Y.stateManager.saveLocal(),Y.uiChange.emit(!0),setTimeout(()=>{window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},1),Y.stateManager.serverError=!1);break;case"requestUpdate":Y.stateManager.after(1,!1,0,"game-update"),Y.stateManager.serverError=!1;break;case"settings":if(window.document.body.classList.add("server-sync"),Q.r.settings.serverSettings){let $=P.payload;$.automaticAttackModifierFullscreen=Q.r.settings.automaticAttackModifierFullscreen,$.autoBackup=Q.r.settings.autoBackup,$.autoBackupFinish=Q.r.settings.autoBackupFinish,$.autoBackupUrl=Q.r.settings.autoBackupUrl,$.autoscroll=Q.r.settings.autoscroll,$.automaticTheme=Q.r.settings.automaticTheme,$.barsize=Q.r.settings.barsize,$.backupHint=Q.r.settings.backupHint,$.browserNavigation=Q.r.settings.browserNavigation,$.characterAttackModifierAnimate=Q.r.settings.characterAttackModifierAnimate,$.characterAttackModifierDeckPermanent=Q.r.settings.characterAttackModifierDeckPermanent,$.characterAttackModifierDeckPermanentActive=Q.r.settings.characterAttackModifierDeckPermanentActive,$.characterItemsPermanent=Q.r.settings.characterItemsPermanent,$.characterItemsPermanentActive=Q.r.settings.characterItemsPermanentActive,$.characterItemsPermanentEquipped=Q.r.settings.characterItemsPermanentEquipped,$.characterItemsPermanentSorted=Q.r.settings.characterItemsPermanentSorted,$.characterItemsPermanentZoom=Q.r.settings.characterItemsPermanentZoom,$.characterCompact=Q.r.settings.characterCompact,$.characterSheetCompact=Q.r.settings.characterSheetCompact,$.debugRightClick=Q.r.settings.debugRightClick,$.disableAnimations=Q.r.settings.disableAnimations,$.disableArtwork=Q.r.settings.disableArtwork,$.disableColumns=Q.r.settings.disableColumns,$.disableDragFigures=Q.r.settings.disableDragFigures,$.disablePinchZoom=Q.r.settings.disablePinchZoom,$.disableWakeLock=Q.r.settings.disableWakeLock,$.dragValues=Q.r.settings.dragValues,$.fhStyle=Q.r.settings.fhStyle,$.fontsize=Q.r.settings.fontsize,$.globalFontsize=Q.r.settings.globalFontsize,$.fullscreen=Q.r.settings.fullscreen,$.hints=Q.r.settings.hints,$.portraitMode=Q.r.settings.portraitMode,$.pressDoubleClick=Q.r.settings.pressDoubleClick,$.serverAutoconnect=Q.r.settings.serverAutoconnect,$.serverPassword=Q.r.settings.serverPassword,$.serverPort=Q.r.settings.serverPort,$.serverSettings=Q.r.settings.serverSettings,$.serverUrl=Q.r.settings.serverUrl,$.serverWss=Q.r.settings.serverWss,$.showAllSections=Q.r.settings.showAllSections,$.showBossMonster=Q.r.settings.showBossMonster,$.showHiddenMonster=Q.r.settings.showHiddenMonster,$.showOnlyUnfinishedScenarios=Q.r.settings.showOnlyUnfinishedScenarios,$.statAnimations=Q.r.settings.statAnimations,$.theme=Q.r.settings.theme,$.tooltips=Q.r.settings.tooltips,$.zoom=Q.r.settings.zoom,Q.r.setSettings(Object.assign(new wt.Z,$)),Zt.j.write("settings","default",Q.r.settings),setTimeout(()=>{window.document.body.classList.remove("server-sync")},1)}Y.stateManager.serverError=!1;break;case"permissions":Y.stateManager.permissions=P.payload||void 0,Y.stateManager.permissionBackup=Y.stateManager.permissions&&JSON.parse(JSON.stringify(Y.stateManager.permissions))||void 0,Y.stateManager.updatePermissions(),Y.stateManager.serverError=!1;break;case"error":console.warn("[GHS] Error: ",P),(P.message.startsWith("Permission(s) missing")||P.message.startsWith("invalid revision"))&&("redo"==Y.stateManager.lastAction||"update"==Y.stateManager.lastAction?Y.stateManager.undo(!1):"undo"==Y.stateManager.lastAction&&Y.stateManager.redo(!1)),P.message&&P.message.startsWith("Invalid password")&&(console.warn("Disconnect..."),p.target?.close()),Y.stateManager.serverError=!1,window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")}}catch(P){Y.stateManager.errorLog.push(p.data),Y.stateManager.serverError=!0,console.error("[GHS] "+p.data,P),window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")}}onOpen(p){const P=p.target;if(P&&P.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword){Y.stateManager.connectionTries=0,Y.stateManager.updateBlocked=!1,Y.stateManager.permissions=Y.stateManager.permissionBackup;let M={password:Q.r.settings.serverPassword,type:"request-game",payload:Y.game.toModel()};P.send(JSON.stringify(M)),Q.r.settings.serverSettings&&P.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"request-settings"})),Y.stateManager.updatePermissions()}}onClose(p){Y.game.server=!1,Y.stateManager.updateBlocked=!0,Y.stateManager.permissions=new jt.P,Y.stateManager.updatePermissions(),Y.uiChange.emit()}onError(p){Y.game.server=!1,Y.stateManager.updateBlocked=!0,Y.stateManager.permissions=new jt.P,Y.stateManager.updatePermissions(),Y.uiChange.emit()}forceUpdateState(){Y.stateManager.updateBlocked=!1,Y.stateManager.permissions=Y.stateManager.permissionBackup,Y.stateManager.updatePermissions(),Y.uiChange.emit()}requestSettings(){this.ws&&this.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword&&Q.r.settings.serverSettings&&this.ws.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"request-settings"}))}wsState(){return Q.r.settings.serverUrl&&Q.r.settings.serverPort&&Q.r.settings.serverPassword?this.ws&&this.ws.readyState||-1:-99}reset(){Zt.j.addBackup(Y.game.toModel());const p=this.game.revision;this.game=new dt.lA,this.game.revision=p,Zt.j.clear("game"),Zt.j.clear("undo"),Zt.j.clear("redo"),Zt.j.clear("undo-infos")}saveLocal(){Zt.j.writeGameModel(this.game.toModel()),this.lastSaveTimestamp=(new Date).getTime()}saveSettings(){this.ws&&this.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword&&Q.r.settings.serverSettings&&this.ws.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"settings",payload:Q.r.settings}))}updatePermissions(){this.undoPermission=this.hasUndo()&&(!this.permissions||!this.updateBlocked),this.redoPermission=this.hasRedo()&&(!this.permissions||!this.updateBlocked),this.characterPermissions={},Y.game.figures.forEach(p=>{p instanceof x.z&&(this.characterPermissions[p.name+"|"+p.edition]=!this.permissions||this.permissions&&(this.permissions.characters||this.permissions.character.some(P=>P.name==p.name&&P.edition==p.edition)))}),this.monsterPermissions={},Y.game.figures.forEach(p=>{p instanceof X.Q&&(this.monsterPermissions[p.name+"|"+p.edition]=!this.permissions||this.permissions&&(this.permissions.monsters||this.permissions.monster.some(P=>P.name==p.name&&P.edition==p.edition)))})}before(...p){window.document.body.classList.add("working"),this.addToUndo(p||[])}after(p=1,P=!1,M=1,y="game",S=0,U=1){var V=this;return(0,Ht.Z)(function*(){if(V.game.revision+=M,V.saveLocal(),V.ws&&V.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword){window.document.body.classList.add("server-sync");let $=V.undoInfos[V.undos.length-1];"game-undo"==y&&($=V.undoInfos[V.undos.length+U-1]);let ut={password:Q.r.settings.serverPassword,type:y,payload:V.game.toModel(),undoinfo:$,revision:S,undolength:U};V.ws.send(JSON.stringify(ut))}(P||Q.r.settings.autoBackup>0&&(V.game.revision+V.game.revisionOffset)%Q.r.settings.autoBackup==0)&&(yield V.autoBackup()),p&&!Q.r.settings.disableAnimations?setTimeout(()=>{V.lastAction="update",Y.uiChange.emit(),window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")},p):(V.lastAction="update",Y.uiChange.emit(),window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync"))})()}autoBackup(p="",P=!1){var M=this;return(0,Ht.Z)(function*(){if(!M.autoBackupTimeout)if(M.storageBlocked)M.autoBackupTimeout=setTimeout(()=>{M.autoBackupTimeout=null,M.autoBackup()},100);else{window.document.body.classList.add("working"),window.document.body.classList.add("server-sync");try{let y=yield Zt.j.datadump();if(p||(p="ghs-autobackup-"+(new Date).toISOString()+".json"),!P&&Q.r.settings.autoBackupUrl&&Q.r.settings.autoBackupUrl.url)try{M.backupError=void 0;let S=new XMLHttpRequest;S.open(Q.r.settings.autoBackupUrl.method,Q.r.settings.autoBackupUrl.url.replaceAll("{FILENAME}",p),!0,Q.r.settings.autoBackupUrl.username,Q.r.settings.autoBackupUrl.password);let U=JSON.stringify(y);Q.r.settings.autoBackupUrl.fileUpload?(U=new FormData,U.append(p,new File([JSON.stringify(y)],p,{type:"application/json"}))):S.setRequestHeader("Content-Type","application/json"),Q.r.settings.autoBackupUrl.authorization&&S.setRequestHeader("Authorization",Q.r.settings.autoBackupUrl.authorization),S.send(U),S.addEventListener("error",V=>{M.backupError=-1,console.warn("Could not post autobackup",Q.r.settings.autoBackupUrl,V)}),S.addEventListener("readystatechange",V=>{S.readyState===XMLHttpRequest.DONE&&S.status>=400&&(M.backupError=S.status,console.warn("Could not post autobackup",Q.r.settings.autoBackupUrl,S.status,S.responseText))})}catch(S){M.backupError=-1,console.warn("Could not post autobackup",Q.r.settings.autoBackupUrl,S)}else{let S=document.createElement("a");S.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(y))),S.setAttribute("download",p),document.body.appendChild(S),S.click(),document.body.removeChild(S)}}catch{console.warn("Could not create autobackup")}window.document.body.classList.remove("working"),window.document.body.classList.remove("server-sync")}})()}addToUndo(p){if(this.game.toModel()!=this.undos[this.undos.length-1]){this.undos.push(this.game.toModel());const P=Zt.j.db?Q.r.settings.maxUndo:Math.min(Q.r.settings.maxUndo,50);this.undos.length>P&&this.undos.splice(0,this.undos.length-P),this.undoInfos.splice(this.undoInfos.length-this.redos.length,this.redos.length),this.undoInfos.push(p),this.undoInfos.length>this.undos.length&&this.undoInfos.splice(0,this.undoInfos.length-this.undos.length),this.redos.length>5&&Zt.j.addBackup(this.redos[0]),this.redos=[],this.saveStorage()}}hasUndo(){return this.undos.length>0}undo(p=!0){this.fixedUndo(1,p)}fixedUndo(p,P=!0){if(p>0&&p<=this.undos.length){window.document.body.classList.add("working"),this.redos.push(this.game.toModel());const M=Y.game.revision,y=Y.game.revisionOffset+p-1,S=this.undos.splice(this.undos.length-p,p);for(let V=S.length-1;V>0;V--)this.redos.push(S[V]);this.game.fromModel(S[0]),this.game.revision=M,this.game.revisionOffset=y+2,this.saveStorage(),P?this.after(1,!1,1,"game-undo",S[0].revision-(S[0].revisionOffset||0),p):Y.uiChange.emit(),this.lastAction="undo"}}hasRedo(){return this.redos.length>0}redo(p=!0){this.fixedRedo(1,p)}fixedRedo(p,P=!0){if(p>0&&p<=this.redos.length){window.document.body.classList.add("working"),this.undos.push(this.game.toModel());const M=Y.game.revision,y=Y.game.revisionOffset-p+1,S=this.redos.splice(this.redos.length-p,p);for(let V=S.length-1;V>0;V--)this.undos.push(S[V]);this.game.fromModel(S[0]),this.game.revision=M,this.game.revisionOffset=y,this.saveStorage(),P?this.after(1,!1,1,"game-redo",S[0].revision-(S[0].revisionOffset||0),p):Y.uiChange.emit(),this.lastAction="undo"}}clearUndos(){this.undoInfos.splice(0,this.undoInfos.length-this.redos.length),this.undos=[],this.saveStorage()}clearRedos(){this.undoInfos.splice(this.undos.length,this.undoInfos.length),this.redos=[],this.saveStorage()}savePermissions(p,P){this.ws&&this.ws.readyState==WebSocket.OPEN&&Q.r.settings.serverPassword&&this.ws.send(JSON.stringify({password:Q.r.settings.serverPassword,type:"permissions",payload:{permissions:P,password:p}}))}}var Wt=E(7227),Ie=E(4968),ue=E(5601),We=E(1975);class ve{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}entities(p,P=!1){let M=[];return p instanceof x.z||p instanceof et.CH?this.isAlive(p,P)&&M.push(p):(p instanceof X.Q||p instanceof ue.k)&&(M=p.entities.filter(y=>this.isAlive(y,P)||!P&&y.dormant)),M}entitiesAll(p,P=!0,M=!1){let y=[];return p instanceof x.z&&(!P||this.isAlive(p,M))?(y.push(p),y.push(...p.summons.filter(S=>!P||this.isAlive(S,M)))):p instanceof et.CH&&(!P||this.isAlive(p,M))?y.push(p):(p instanceof X.Q||p instanceof ue.k)&&y.push(...p.entities.filter(S=>!P||this.isAlive(S,M))),y}getIndexedEntities(){let p=[];return this.game.figures.forEach(P=>{P instanceof x.z?(p.push({entity:P,figure:P}),P.summons.forEach(M=>{p.push({entity:M,figure:P})})):(P instanceof X.Q||P instanceof ue.k)&&P.entities.forEach(M=>{p.push({entity:M,figure:P})})}),p}getIndexForEntity(p){let P=-1;return this.getIndexedEntities().forEach((M,y)=>{M.entity!=p||(P=y)}),P}isAlive(p,P=!1){return!(p.health<=0&&(0,Jt.j9)(p.maxHealth)>0&&!p.entityConditions.find(M=>M.highlight&&-1!=M.types.indexOf(H.CP.apply))||P&&p.entityConditions.find(M=>M.name==H.fT.stun&&M.state!=H.tT.new&&M.lastState!=H.tT.new&&M.state!=H.tT.removed)||(p instanceof x.z?p.exhausted||p.absent:p instanceof et.CH?p.exhausted:p instanceof Ie.g?p.dead||p.dormant||P&&p.summon==bt.HY.new:p instanceof bt.eU?p.dead||p.dormant||P&&p.state==bt.HY.new:!(p instanceof We.W)||p.dead||p.dormant))}checkHealth(p,P){const M=(0,Jt.j9)(p.maxHealth);p.health>M&&(p.health=M),p.health<0&&(p.health=0),0==p.health&&!p.entityConditions.find(y=>Q.r.settings.applyConditions&&Q.r.settings.activeApplyConditions&&y.highlight&&-1!=y.types.indexOf(H.CP.apply)&&-1==Q.r.settings.activeApplyConditionsExcludes.indexOf(y.name))&&(!(p instanceof x.z||p instanceof et.CH)||p.off&&p.exhausted?(p instanceof Ie.g||p instanceof bt.eU||p instanceof We.W)&&!p.dead&&(p.dead=!0,setTimeout(()=>{Y.uiChange.emit()},Q.r.settings.disableAnimations?0:1500)):(p.off=!0,p.exhausted=!0)),p.health>0&&((p instanceof x.z||p instanceof et.CH)&&p.exhausted?(p.off=!1,p.exhausted=!1):(p instanceof Ie.g||p instanceof bt.eU||p instanceof We.W)&&p.dead&&(p.dead=!1))}changeHealth(p,P,M){this.changeHealthHighlightConditions(p,P,M),p.health+=M,this.checkHealth(p,P)}changeHealthHighlightConditions(p,P,M){if(Q.r.settings.applyConditions){p.entityConditions.filter(S=>S.name==H.fT.poison||S.name==H.fT.poison_x).forEach(S=>{S.highlight=M<0&&!S.expired&&S.state!=H.tT.new&&p.health+M>0&&!this.isImmune(p,P,S.name)});const y=p.entityConditions.find(S=>!S.expired&&S.state!=H.tT.new&&!S.permanent&&S.name==H.fT.regenerate&&!this.isImmune(p,P,S.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(S.name));if(y&&M<0&&(y.expired=!0),this.sufferDamageHighlightConditions(p,P,M),y&&p.entityConditions.find(S=>!S.expired&&S.state!=H.tT.new&&S.name==H.fT.ward&&S.highlight&&!this.isImmune(p,P,S.name))&&(y.expired=!1),p.health+M>p.health){const S=p.entityConditions.find(V=>-1!=V.types.indexOf(H.CP.clearHeal)&&V.state!=H.tT.expire&&V.state!=H.tT.new&&!V.expired&&!this.isImmune(p,P,V.name));let U=p.entityConditions.find(V=>V.name==H.fT.heal);S&&(!U||U.expired||!U.highlight)&&(U||(U=new H.hT(H.fT.heal,M),p.entityConditions.push(U)),U.expired=!1,U.highlight=!0,U.value=M)}}}sufferDamageHighlightConditions(p,P,M){if(Q.r.settings.applyConditions){const y=p.entityConditions.find(U=>!U.expired&&U.state!=H.tT.new&&U.name==H.fT.ward&&!this.isImmune(p,P,U.name)),S=p.entityConditions.find(U=>!U.expired&&U.state!=H.tT.new&&U.name==H.fT.brittle&&!this.isImmune(p,P,U.name));if(M<0&&y&&!S&&p.health+M-Math.floor(M/2)>0?(y.value=-1*M,y.highlight=!0):y&&(y.highlight=!1),S&&!y&&M<0&&p.health+M>0?(S.value=-1*M,S.highlight=!0):S&&(S.highlight=!1),S&&y&&(S.highlight=!1,y.highlight=!1,M<0&&(S.expired=!0,y.expired=!0)),M<0&&p instanceof Ie.g&&P instanceof X.Q){let U=p.entityConditions.find(V=>V.name==H.fT.shield);(!U||U.expired||!U.highlight)&&(U||(U=new H.hT(H.fT.shield,0),p.entityConditions.push(U)),U.value=0,Y.monsterManager.calcActionHints(P,p).forEach($=>{U&&$.type==Wt.Us.shield&&(U.value+=$.value)}),U.value&&p.health+M+U.value>0&&(U.expired=!1,U.highlight=!0))}}}hasCondition(p,P,M=!1){return p.entityConditions.some(y=>y.name==P.name&&y.state!=H.tT.removed&&!y.expired&&(!M||y.permanent))}activeConditions(p,P=!1,M=!1){return p.entityConditions.filter(y=>(!y.expired||P&&-1!=y.types.indexOf(H.CP.expiredIndicator))&&(M||-1==y.types.indexOf(H.CP.hidden)))}isImmune(p,P,M){let y=!1;if(p.immunities&&-1!=p.immunities.indexOf(M))return!0;if(P instanceof X.Q&&p instanceof Ie.g){const S=P.stats.find(U=>U.level==p.level&&U.type==p.type);y=null!=S&&null!=S.immunities&&-1!=S.immunities.indexOf(M)}else if(P instanceof x.z){let S=[];P.progress.equippedItems.find(U=>"gh"==U.edition&&"38"==U.name)&&S.push(H.fT.stun,H.fT.muddle),P.progress.equippedItems.find(U=>"gh"==U.edition&&"52"==U.name)&&S.push(H.fT.poison,H.fT.wound),P.progress.equippedItems.find(U=>"gh"==U.edition&&"103"==U.name)&&S.push(H.fT.poison,H.fT.wound),P.progress.equippedItems.find(U=>"cs"==U.edition&&"57"==U.name)&&S.push(H.fT.muddle),P.progress.equippedItems.find(U=>"fh"==U.edition&&"138"==U.name)&&S.push(H.fT.disarm,H.fT.stun,H.fT.muddle),"blinkblade"==P.name&&"fh"==P.edition&&P.progress.perks[10]?S.push(H.fT.immobilize):"coral"==P.name&&"fh"==P.edition&&P.progress.perks[7]?S.push(H.fT.impair):"prism"==P.name&&"fh"==P.edition&&P.progress.perks[9]&&S.push(H.fT.wound),y=-1!=S.indexOf(M)}if(!y){if(M==H.fT.wound_x)return this.isImmune(p,P,H.fT.wound);if(M==H.fT.poison_x)return this.isImmune(p,P,H.fT.poison);if(M==H.fT.rupture)return this.isImmune(p,P,H.fT.wound);if(M==H.fT.infect)return this.isImmune(p,P,H.fT.poison);if(M==H.fT.chill)return this.isImmune(p,P,H.fT.immobilize)||this.isImmune(p,P,H.fT.muddle)}return y}addCondition(p,P,M,y,S=!1,U=!1){let V=p.entityConditions.find($=>$.name==P.name);V?(V.expired=!1,V.lastState=V.state,V.state=H.tT.normal):(V=new H.hT(P.name,P.value),p.entityConditions.push(V)),M||-1==V.types.indexOf(H.CP.expire)?M&&-1!=V.types.indexOf(H.CP.turn)?(V.lastState=V.state,V.state=H.tT.turn):M&&-1!=V.types.indexOf(H.CP.afterTurn)?V.state=H.tT.new:!M&&-1!=V.types.indexOf(H.CP.afterTurn)&&(V.lastState=H.tT.normal):(V.lastState=V.state,V.state=H.tT.expire),y&&-1!=V.types.indexOf(H.CP.turn)&&(V.lastState=V.state,V.state=H.tT.expire),V.permanent=S}removeCondition(p,P,M=!1){p.entityConditions=p.entityConditions.filter(y=>y.name!=P.name||y.permanent!=M)}applyCondition(p,P,M,y=!1){const S=p.entityConditions.find(U=>U.name==M&&!U.expired&&-1!=U.types.indexOf(H.CP.apply));if(S&&!this.isImmune(p,P,S.name)){if((S.name==H.fT.poison||S.name==H.fT.poison_x)&&(p.health-=S.value,S.highlight=!1,this.checkHealth(p,P)),S.name==H.fT.ward){p.health+=S.value,this.checkHealth(p,P);const U=Math.floor(S.value/2);p.health-=U;const V=p.entityConditions.find($=>!$.expired&&$.state!=H.tT.new&&!$.permanent&&$.name==H.fT.regenerate&&!this.isImmune(p,P,$.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf($.name));V&&U>0&&(V.expired=!0),S.value=1,S.expired=!0,S.highlight=!1,this.checkHealth(p,P)}if(S.name==H.fT.brittle&&(p.health+=S.value,this.checkHealth(p,P),p.health-=2*S.value,S.value=1,S.expired=!0,S.highlight=!1,this.checkHealth(p,P)),S.name==H.fT.shield&&(p.health+=S.value,S.expired=!0,S.highlight=!1,this.checkHealth(p,P)),S.name==H.fT.heal){const U=p.entityConditions.find($=>-1!=$.types.indexOf(H.CP.preventHeal)&&$.state!=H.tT.expire&&!$.expired&&!this.isImmune(p,P,$.name));U&&(p.health-=S.value);let V=p.entityConditions.find($=>-1!=$.types.indexOf(H.CP.clearHeal)&&$.state!=H.tT.expire&&$.state!=H.tT.new&&!$.permanent&&!$.expired);for(;V;)V.lastState=V.state,V.state=H.tT.expire,V.expired=!0,V=p.entityConditions.find($=>-1!=$.types.indexOf(H.CP.clearHeal)&&$.state!=H.tT.expire&&$.state!=H.tT.new&&!$.permanent&&!$.expired);y&&(S.highlight=!0),!U&&p.health-S.value>=(0,Jt.j9)(p.maxHealth)&&(S.highlight=!1),this.checkHealth(p,P),setTimeout(()=>{S.expired=!S.permanent,S.highlight=!1},y?1e3:0)}S.permanent&&(S.expired=!1)}}declineApplyCondition(p,P,M){const y=p.entityConditions.find(S=>S.name==M&&!S.expired&&-1!=S.types.indexOf(H.CP.apply));if(y&&(y.highlight=!1,!y.permanent)){if(y.name==H.fT.heal&&(y.expired=!0),y.name==H.fT.shield&&(y.expired=!0),y.name==H.fT.ward){const S=p.entityConditions.find(U=>!U.expired&&U.state!=H.tT.new&&!U.permanent&&U.name==H.fT.regenerate&&!this.isImmune(p,P,U.name));S&&y.value>0&&(S.expired=!0)}(y.name==H.fT.ward||y.name==H.fT.brittle)&&(y.value=1,y.expired=!0)}}restoreConditions(p){p.entityConditions.forEach(P=>{P.name==H.fT.chill&&(P.expired?P.expired=!1:P.value++),-1!=P.types.indexOf(H.CP.expire)&&P.expired&&(P.expired=!1)})}expireConditions(p){p.entityConditions.forEach(P=>{P.name==H.fT.chill&&(1!=P.value||P.permanent?P.value--:P.expired=!0)}),p.entityConditions.forEach(P=>{-1!=P.types.indexOf(H.CP.expire)&&P.state==H.tT.expire&&!P.permanent&&(P.expired=!0)})}applyConditionsTurn(p,P){const M=p.entityConditions.find(y=>!y.expired&&y.state==H.tT.normal&&y.name==H.fT.regenerate&&!this.isImmune(p,P,y.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name));if(M){const y=(0,Jt.j9)(p.maxHealth),S=p.entityConditions.every(U=>U.expired||-1==U.types.indexOf(H.CP.preventHeal)||this.isImmune(p,P,U.name))&&p.health!U.expired&&-1!=U.types.indexOf(H.CP.clearHeal)&&!U.permanent).forEach(U=>{U.expired=!0,U.lastState=U.state,U.state=H.tT.removed}),S){let U=p.entityConditions.find(V=>-1!=V.types.indexOf(H.CP.clearHeal)&&V.state!=H.tT.expire&&V.state!=H.tT.new&&!V.permanent&&!V.expired);for(;U;)U.lastState=U.state,U.state=H.tT.expire,U.expired=!0,U=p.entityConditions.find(V=>-1!=V.types.indexOf(H.CP.clearHeal)&&V.state!=H.tT.expire&&V.state!=H.tT.new&&!V.permanent&&!V.expired);M.lastState=M.state,M.state=H.tT.expire,p.health+=M.value,this.checkHealth(p,P)}M.highlight=!0,setTimeout(()=>{M.highlight=!1},1e3)}p instanceof x.z&&p.progress.equippedItems.find(y=>"fh"==y.edition&&"178"==y.name)&&p.initiative>=60&&!p.longRest&&(p.health=p.health+1,p.entityConditions.push(new H.hT(H.fT.heal,1)),this.applyCondition(p,P,H.fT.heal,!0)),p.entityConditions.filter(y=>!y.expired&&y.state==H.tT.normal&&-1!=y.types.indexOf(H.CP.turn)).forEach(y=>{!this.isImmune(p,P,y.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name)&&(y.lastState=y.state,y.state=H.tT.turn,(y.name==H.fT.wound||y.name==H.fT.wound_x)&&(p.health=p.health-y.value,p instanceof x.z&&p.progress.equippedItems.find(S=>"cs"==S.edition&&"71"==S.name)&&(p.health=p.health+y.value+1,p.entityConditions.push(new H.hT(H.fT.heal,1)),this.applyCondition(p,P,H.fT.heal,!0)),this.checkHealth(p,P),y.highlight=!0,setTimeout(()=>{y.highlight=!1,(!(p instanceof x.z)||!p.progress.equippedItems.find(S=>"cs"==S.edition&&"71"==S.name))&&(this.sufferDamageHighlightConditions(p,P,-y.value),this.checkHealth(p,P))},1e3)))}),p.entityConditions.filter(y=>!y.expired&&-1!=y.types.indexOf(H.CP.afterTurn)&&!y.permanent).forEach(y=>{y.state==H.tT.normal?(y.lastState=y.state,y.state=H.tT.turn):y.state==H.tT.new&&y.lastState!=H.tT.new&&(y.lastState=y.state,y.state=H.tT.normal)})}unapplyConditionsTurn(p,P){p.entityConditions.filter(y=>y.state==H.tT.turn&&-1!=y.types.indexOf(H.CP.turn)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name)).forEach(y=>{y.expired?y.expired=!1:(y.lastState=y.state,y.state=H.tT.normal,(y.name==H.fT.wound||y.name==H.fT.wound_x)&&(p.health=p.health+y.value,this.checkHealth(p,P)))});const M=p.entityConditions.find(y=>y.name==H.fT.regenerate&&-1==Q.r.settings.applyConditionsExcludes.indexOf(y.name));if(M){const y=p.entityConditions.every(S=>-1==S.types.indexOf(H.CP.preventHeal))&&M.state==H.tT.expire;p.entityConditions.filter(S=>S.expired&&-1!=S.types.indexOf(H.CP.clearHeal)).forEach(S=>S.expired=!1),y&&(M.lastState=M.state,M.state=H.tT.normal,p.health-=M.value,this.checkHealth(p,P))}p instanceof x.z&&p.progress.equippedItems.find(y=>"fh"==y.edition&&"178"==y.name)&&p.initiative>=60&&!p.longRest&&p.entityConditions.find(y=>y.name==H.fT.heal&&1==y.value&&y.expired)&&(p.entityConditions=p.entityConditions.filter(y=>y.name!=H.fT.heal||1!=y.value||!y.expired),p.health=p.health-1)}applyConditionsAfter(p,P){p.entityConditions.filter(M=>!M.expired&&-1!=M.types.indexOf(H.CP.afterTurn)).forEach(M=>{!this.isImmune(p,P,M.name)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(M.name)&&(M.state==H.tT.turn?M.name==H.fT.bane&&(this.changeHealth(p,P,-10),M.expired=!0,M.highlight=!0,setTimeout(()=>{M.highlight=!1},1e3)):M.state==H.tT.normal?(M.lastState=M.state,M.state=H.tT.turn):M.state==H.tT.new&&M.lastState!=H.tT.new?(M.lastState=M.state,M.state=H.tT.normal):M.state==H.tT.new&&M.lastState==H.tT.new&&(M.lastState=H.tT.new,M.state=H.tT.normal))})}unapplyConditionsAfter(p,P){p.entityConditions.filter(M=>M.state!=H.tT.removed&&-1!=M.types.indexOf(H.CP.afterTurn)&&-1==Q.r.settings.applyConditionsExcludes.indexOf(M.name)).forEach(M=>{M.expired?(M.name==H.fT.bane&&(p.health=p.health+10,this.checkHealth(p,P)),M.highlight=!1,M.expired=!1):M.state==H.tT.normal&&M.lastState==H.tT.new?M.state=H.tT.new:M.state==H.tT.new&&M.lastState!=H.tT.new&&(M.lastState=M.state)})}highlightedConditions(p){return p.entityConditions.filter(P=>P.highlight).sort((P,M)=>M.types.indexOf(H.CP.double)-P.types.indexOf(H.CP.double))}hasMarker(p,P){return p.markers&&-1!=p.markers.indexOf(P)}toggleMarker(p,P){this.hasMarker(p,P)?p.markers.splice(p.markers.indexOf(P),1):p.markers.push(P)}toggleActive(p,P){this.game.state==dt.D2.next&&(p.active?(P.active=!P.active,this.entities(p).every(M=>!this.isAlive(M)||!M.active)&&Y.roundManager.toggleFigure(p)):P.active?(P.active=!1,this.entities(p).every(M=>!this.isAlive(M,!0)||!M.active)&&(p.off=!0)):(p.off=!1,P.active=!0),P.active?(P.off=!1,!p.active&&this.game.figures.every(M=>!M.active)&&(p.active=!0)):P.off=!0)}undoInfos(p,P,M){let y=[];return p instanceof x.z&&P instanceof x.z?y.push(M+".char","data.character."+p.name):p instanceof bt.eU&&P instanceof x.z?y.push(M+".summon","data.character."+P.name,"data.summon."+p.name):p instanceof et.CH?y.push(M+".objective",p.title||p.name):P instanceof ue.k&&p instanceof We.W?y.push(M+".objectiveContainer",P.title||P.name||P.escort?"escort":"objective",""+p.number):P instanceof X.Q&&p instanceof Ie.g?y.push(M+".monster","data.monster."+P.name,""+p.number):P instanceof X.Q&&y.push(M+".monsterEntities","data.monster."+P.name),y}next(){this.game.figures.forEach(p=>{this.entitiesAll(p).forEach(P=>{Q.r.settings.expireConditions&&(P.entityConditions=P.entityConditions.filter(M=>!M.expired),P.entityConditions.forEach(M=>{-1!=M.types.indexOf(H.CP.expire)&&!M.permanent&&M.state==H.tT.normal&&(M.lastState=M.state,M.state=H.tT.expire)})),Q.r.settings.applyConditions&&P.entityConditions.filter(M=>-1!=M.types.indexOf(H.CP.turn)||-1!=M.types.indexOf(H.CP.afterTurn)&&!this.isImmune(P,p,M.name)).forEach(M=>{M.lastState=M.state,M.state=H.tT.normal})})})}}var _n=E(9468);class be{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}ge5PlayerOffset(){if(!this.game.ge5Player)return 0;const p=Y.characterManager.characterCount();return p<=4?0:p-3}adjustedLevel(){const p=this.game.level-this.ge5PlayerOffset()-(!this.game.solo||Y.fhRules()||Q.r.settings.alwaysFhSolo?0:1)+this.game.bonusAdjustment;return p<0?0:p>7?7:p}trap(p=-1){return(p<0||p>7)&&(p=this.game.level),2+p}experience(p=-1){return(p<0||p>7)&&(p=this.adjustedLevel()),4+2*p}loot(p=-1){(p<0||p>7)&&(p=this.adjustedLevel());let P=2+Math.floor(p/2);return p>=7&&(P=6),P}terrain(p=-1){return Q.r.settings.alwaysHazardousTerrain||Y.fhRules()?((p<0||p>7)&&(p=this.game.level),1+Math.ceil(p/3)):Math.floor(this.trap(p)/2)}scenarioLevel(){const p=Y.characterManager.characterCount();if(0==p)return 1;const P=this.game.figures.some(M=>M instanceof x.z)?this.game.figures.filter(M=>M instanceof x.z&&!M.absent).map(M=>M.level).reduce((M,y)=>M+y):1;return Math.ceil((P/p+(this.game.solo&&(Y.fhRules()||Q.r.settings.alwaysFhSolo)?1:0))/2)+(!this.game.solo||Y.fhRules()||Q.r.settings.alwaysFhSolo?0:1)+this.ge5PlayerOffset()}calculateScenarioLevel(){this.game.levelAdjustment>6?this.game.levelAdjustment=6:this.game.levelAdjustment<-6&&(this.game.levelAdjustment=-6);let p=this.scenarioLevel()+this.game.levelAdjustment;p>7?p=7:p<0&&(p=0),this.setLevel(p)}setLevel(p){if(this.game.level!=p){const P=p-this.game.level;this.game.level=p,this.game.figures.forEach(M=>{M instanceof X.Q?(M.level+=P,M.level>7?M.level=7:M.level<0&&(M.level=0),Y.monsterManager.setLevel(M,M.level)):M instanceof et.CH?M.health>(0,Jt.j9)(M.maxHealth)&&(M.health=(0,Jt.j9)(M.maxHealth)):M instanceof ue.k&&M.entities.forEach(y=>{y.health>(0,Jt.j9)(M.health)&&(M.health=(0,Jt.j9)(M.health))})})}}}var en=E(301),St=E(6223),kt=E(6441),It=E(4756);class Ut{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}createScenario(){return new It.$4(new en.tR,[],!0)}getScenario(p,P,M){return Y.scenarioData().find(y=>y.index==p&&y.edition==P&&y.group==M)}setScenario(p){if(this.game.scenario=p?new It.$4(p,p.revealedRooms,p.custom):void 0,p&&!p.custom){const P=Y.scenarioData().find(M=>M.index==p.index&&M.edition==p.edition&&M.group==p.group);if(!P)return void console.error("Could not find scenario data!");Y.roundManager.resetScenario(),this.applyScenarioData(P),Q.r.settings.scenarioRules&&Y.scenarioRulesManager.addScenarioRules(!0)}else p||Y.roundManager.resetScenario();Y.stateManager.standeeDialogCanceled=!1}finishScenario(p,P=!0,M,y=!1,S=void 0,U=!0,V=!0,$=!1){if(Y.game.finish=void 0,p){let ut=p.rewards||void 0;if(M&&M.rewards&&(ut?Object.assign(ut,M.rewards):ut=M.rewards),!$&&U&&Q.r.settings.characterSheet&&this.game.figures.forEach(pt=>{if(pt instanceof x.z&&!pt.absent){const Vt=!P||ut&&ut.ignoredBonus&&-1!=ut.ignoredBonus.indexOf("experience")?0:Y.levelManager.experience();Y.characterManager.addXP(pt,Vt+pt.experience,!y&&!S),(!ut||!ut.ignoredBonus||-1==ut.ignoredBonus.indexOf("gold"))&&(pt.progress.gold+=pt.loot*Y.levelManager.loot(),!y&&pt.lootCards&&pt.lootCards.forEach($t=>{Y.lootManager.addCharacterLoot(pt,this.game.lootDeck.cards[$t])}))}}),P&&(ut&&V&&(!$&&Q.r.settings.characterSheet&&this.game.figures.forEach(pt=>{ut&&pt instanceof x.z&&!pt.absent&&(ut.experience&&Y.characterManager.addXP(pt,ut.experience,!y&&!S),ut.gold&&(pt.progress.gold+=ut.gold),ut.perks&&(pt.progress.extraPerks+=ut.perks,pt.progress.extraPerks<0&&(pt.progress.extraPerks=0)),ut.battleGoals&&(pt.progress.battleGoals+=ut.battleGoals,pt.progress.battleGoals>18?pt.progress.battleGoals=18:pt.progress.battleGoals<0&&(pt.progress.battleGoals=0)),ut.resources&&ut.resources.forEach(Vt=>{pt.progress.loot[Vt.type]=(pt.progress.loot[Vt.type]||0)+(0,Jt.j9)(Vt.value),(pt.progress.loot[Vt.type]||0)<0&&(pt.progress.loot[Vt.type]=0)}))}),Q.r.settings.partySheet&&(ut.reputation&&(this.game.party.reputation+=ut.reputation,this.game.party.reputation>20?this.game.party.reputation=20:this.game.party.reputation<-20&&(this.game.party.reputation=-20)),ut.prosperity&&(this.game.party.prosperity+=ut.prosperity,this.game.party.prosperity>(Y.fhRules()?132:64)?this.game.party.prosperity=Y.fhRules()?132:64:this.game.party.prosperity<0&&(this.game.party.prosperity=0)),ut.morale&&(this.game.party.morale+=(0,Jt.j9)(ut.morale),this.game.party.morale>20?this.game.party.morale=20:this.game.party.morale<0&&(this.game.party.morale=0)),ut.inspiration&&(this.game.party.inspiration+=(0,Jt.j9)(ut.inspiration),this.game.party.inspiration<0&&(this.game.party.inspiration=0)),ut.reputation&&(this.game.party.reputation+=ut.reputation,this.game.party.reputation>20?this.game.party.reputation=20:this.game.party.reputation<-20&&(this.game.party.reputation=-20)),ut.globalAchievements&&this.game.party.globalAchievementsList.push(...ut.globalAchievements),ut.partyAchievements&&this.game.party.achievementsList.push(...ut.partyAchievements),ut.lostPartyAchievements&&(this.game.party.achievementsList=this.game.party.achievementsList.filter(pt=>ut&&-1==ut.lostPartyAchievements.indexOf(pt))),ut.campaignSticker&&this.game.party.campaignStickers.push(...ut.campaignSticker.map(pt=>pt.toLowerCase().replaceAll(" ","-"))),ut.itemDesigns&&ut.itemDesigns.forEach(pt=>{if(-1!=pt.indexOf("-")){const Vt=+pt.split("-")[0],$t=+pt.split("-")[1];for(let pe=Vt;pe<=$t;pe++){const Mn=Y.itemManager.getItem(pe,p.edition,!0);Mn&&(!Mn.unlockScenario||Mn.unlockScenario.edition!=p.edition||Mn.unlockScenario.name!=p.index)&&this.game.party.unlockedItems.push(new St.Jc(Mn.id+"",p.edition))}}else{let Vt=p.edition;-1!=pt.indexOf(":")&&(Vt=pt.split(":")[1]);const $t=Y.itemManager.getItem(+pt.split(":")[0],Vt,!0);$t&&(!$t.unlockScenario||$t.unlockScenario.edition!=p.edition||$t.unlockScenario.name!=p.index)&&this.game.party.unlockedItems.push(new St.Jc($t.id+"",$t.edition))}}),ut.itemBlueprints&&ut.itemBlueprints.forEach(pt=>{if(-1!=pt.indexOf("-")){const Vt=+pt.split("-")[0],$t=+pt.split("-")[1];for(let pe=Vt;pe<=$t;pe++)this.game.party.unlockedItems.push(new St.Jc(pe+"",p.edition))}else{let Vt=p.edition;-1!=pt.indexOf(":")&&(Vt=pt.split(":")[1]),this.game.party.unlockedItems.push(new St.Jc(pt,Vt))}}),ut.collectiveResources&&ut.collectiveResources.forEach(pt=>{this.game.party.loot[pt.type]=(this.game.party.loot[pt.type]||0)+(0,Jt.j9)(pt.value),(this.game.party.loot[pt.type]||0)<0&&(this.game.party.loot[pt.type]=0)}),ut.calendarSection&&ut.calendarSection.forEach(pt=>{if(pt.split("-").length>1){const Vt=pt.split("-")[0];let $t=-1;if(isNaN(+pt.split("-")[1])){if(pt.split("-")[1].length>1){const pe=pt.split("-")[1].split(":")[0],Mn=+pt.split("-")[1].split(":")[1];$t=Math.max(Y.game.party.weeks-1,0)-Math.max(Y.game.party.weeks-1,0)%20+("summer"==pe?20:10)+Mn}}else $t=Y.game.party.weeks+ +pt.split("-")[1];-1!=$t&&(Y.game.party.weekSections[$t]||(Y.game.party.weekSections[$t]=[]),Y.game.party.weekSections[$t]?.push(Vt))}})),Q.r.settings.automaticUnlocking&&ut.unlockCharacter&&-1==this.game.unlockedCharacters.indexOf(ut.unlockCharacter)&&this.game.unlockedCharacters.push(ut.unlockCharacter),ut.lootDeckCards&&ut.lootDeckCards.forEach(pt=>{const Vt=kt.F8.find($t=>$t.cardId==pt);Vt&&(Vt.type!=kt.CG.special1&&Vt.type!=kt.CG.special2||-1==Y.game.lootDeckFixed.indexOf(Vt.type))&&Y.game.lootDeckFixed.push(Vt.type)})),Y.characterManager.characterCount()<4&&!$&&!p.solo&&V&&(this.game.party.inspiration+=4-Y.characterManager.characterCount()),M&&!this.game.party.conclusions.find(pt=>pt.index==M.index&&pt.edition==M.edition&&pt.group==M.group)&&this.game.party.conclusions.push(new It._b(M.index,M.edition,M.group,!1,"",[])),Y.game.party.campaignMode&&V&&(p.conclusion?this.game.party.conclusions.find(pt=>pt.index==p.index&&pt.edition==p.edition&&pt.group==p.group)||this.game.party.conclusions.push(new It._b(p.index,p.edition,p.group,!1,"",[])):this.game.party.scenarios.push(new It._b(p.index,p.edition,p.group,p.custom,p.custom?p.name:"",p.revealedRooms)),ut&&Q.r.settings.partySheet&&ut.townGuardAm&&ut.townGuardAm.length>0))){const pt=Y.attackModifierManager.buildTownGuardAttackModifierDeck(this.game.party,Y.campaignData());Y.attackModifierManager.shuffleModifiers(pt),pt.active=!1,this.game.party.townGuardDeck=pt.toModel()}if(y)Y.scenarioManager.setScenario(p);else{if(p&&!p.conclusion&&Y.fhRules()&&!S&&Q.r.settings.partySheet&&!$&&V){p.solo||this.game.party.weeks++;const pt=Y.editionData.find($t=>$t.edition==p.edition);let Vt=[];pt&&pt.campaign&&Vt.push(...pt.campaign.weeks&&pt.campaign.weeks[this.game.party.weeks]||[]),Vt.push(...this.game.party.weekSections[this.game.party.weeks]||[]),Vt.forEach($t=>{const pe=Y.sectionData(p.edition).find(Mn=>Mn.index==$t&&Mn.group==p.group&&Mn.conclusion);if(pe){const Mn=new It.$4(pe);this.finishScenario(Mn,!0,Mn,!1,void 0,!1,V,!0)}})}P&&(!Y.game.party.campaignMode||!V&&!M)&&this.game.party.casualScenarios.push(new It._b(p.index,p.edition,p.group,p.custom,p.custom?p.name:"",p.revealedRooms)),$||(this.game.scenario=void 0,this.game.sections=[],Y.roundManager.resetScenario(),S?this.setScenario(S):this.game.figures.forEach(pt=>{pt instanceof x.z&&(pt.absent=!1)}))}}}addSection(p){this.game.sections.some(P=>P.edition==p.edition&&P.index==p.index&&P.group==p.group)||(this.applyScenarioData(p,!0),Q.r.settings.scenarioRules&&p.rules&&(p.rules.forEach((P,M)=>{P.always&&Y.scenarioRulesManager.addScenarioRule(p,P,M,!0)}),Y.scenarioRulesManager.filterDisabledScenarioRules()),this.game.sections.push(new It.$4(p,[])),Y.stateManager.standeeDialogCanceled=!1)}applyScenarioData(p,P=!1){if(Y.stateManager.standeeDialogCanceled=!0,Q.r.settings.scenarioRooms&&p.rooms&&0!=p.rooms.length){if(p.rooms.filter(M=>M.initial).forEach(M=>{this.openRoom(M,p,P)}),p.monsters){let M=Y.game.figures.filter(y=>y instanceof X.Q).map(y=>y);p.monsters.forEach(y=>{const S=y.split(":")[0],U=Y.monstersData(p.edition).find(V=>V.name==S);U&&!M.find(V=>V.name==U.name)&&M.push(new X.Q(U))}),p.monsters.forEach(y=>{const S=y.split(":")[0],U=Q.r.settings.automaticStandees&&p.rooms&&p.rooms.some(pt=>pt.monster&&pt.monster.some(Vt=>Vt.name.split(":")[0]==S)),V=Y.monsterManager.getSpawnMonsters(M),$=Q.r.settings.interactiveAbilities&&V.find(pt=>pt.name==S),ut=Q.r.settings.scenarioRules&&this.getRuleMonster(p).find(pt=>pt.name==S);if(!U&&!$&&!ut){let pt=Y.monsterManager.addMonsterByName(y,p.edition);pt&&(pt.isAlly=p.allies&&-1!=p.allies.indexOf(S)||P&&Y.game.scenario&&Y.game.scenario.allies&&-1!=Y.game.scenario.allies.indexOf(S)||!1,pt.isAllied=p.allied&&-1!=p.allied.indexOf(S)||P&&Y.game.scenario&&Y.game.scenario.allied&&-1!=Y.game.scenario.allied.indexOf(S)||!1,pt.drawExtra=p.drawExtra&&-1!=p.drawExtra.indexOf(S)||P&&Y.game.scenario&&Y.game.scenario.drawExtra&&-1!=Y.game.scenario.drawExtra.indexOf(S)||!1)}})}}else p.monsters&&p.monsters.forEach(M=>{const y=M.split(":")[0];let S=Y.monsterManager.addMonsterByName(M,p.edition);S&&(S.isAlly=p.allies&&-1!=p.allies.indexOf(y)||P&&Y.game.scenario&&Y.game.scenario.allies&&-1!=Y.game.scenario.allies.indexOf(y)||!1,S.isAllied=p.allied&&-1!=p.allied.indexOf(y)||P&&Y.game.scenario&&Y.game.scenario.allied&&-1!=Y.game.scenario.allied.indexOf(y)||!1,S.drawExtra=p.drawExtra&&-1!=p.drawExtra.indexOf(y)||P&&Y.game.scenario&&Y.game.scenario.drawExtra&&-1!=Y.game.scenario.drawExtra.indexOf(y)||!1)}),p.objectives&&p.objectives.forEach((M,y)=>{Y.objectiveManager.addObjective(M,void 0,{edition:p.edition,scenario:p.index,group:p.group,section:P,index:y})});if(Q.r.settings.addAllMonsters&&this.getMonsters(p).forEach(M=>{this.game.figures.find(y=>y instanceof it.A&&y.name==M.name&&y.edition==M.edition)||Y.monsterManager.addMonster(M,this.game.level)}),p.solo&&(Y.game.figures.forEach(M=>{M instanceof x.z&&(M.absent=M.name!=p.solo||M.edition!=p.edition)}),!Y.game.figures.some(M=>M instanceof x.z&&M.name==p.solo&&M.edition==p.edition))){const M=Y.charactersData().find(y=>y.name==p.solo&&y.edition==p.edition);M?Y.characterManager.addCharacter(M,5):console.error("Solo Scenario Character not found: '"+p.solo+"' ("+p.name+")")}if(p.lootDeckConfig){let M=JSON.parse(JSON.stringify(p.lootDeckConfig));this.game.lootDeckFixed.forEach(y=>{M[y]=1}),Y.lootManager.apply(this.game.lootDeck,M)}if(p.resetRound){const M=p.resetRound.endsWith("Keep")&&(this.game.state==dt.D2.next&&this.game.round%2==0||this.game.state==dt.D2.draw&&this.game.round%2==1)?1:0;"visible"==p.resetRound||"visibleKeep"==p.resetRound?this.game.roundResets.push(this.game.round+(this.game.state==dt.D2.draw?0:-1)-M):this.game.roundResetsHidden.push(this.game.round+(this.game.state==dt.D2.draw?0:-1)-M),this.game.round=(this.game.state==dt.D2.draw?0:1)+M}}openRoom(p,P,M){if(this.game.scenario&&(this.game.scenario.revealedRooms=this.game.scenario.revealedRooms||[],this.game.scenario.revealedRooms.push(p.roomNumber)),p.monster){let y=[];p.monster.forEach(S=>{let U=S.type;if(!U){const V=Y.characterManager.characterCount();U=V<3?S.player2:3==V?S.player3:S.player4}if(U){const V=S.name.split(":")[0],$=P.allies&&-1!=P.allies.indexOf(V)||M&&Y.game.scenario&&Y.game.scenario.allies&&-1!=Y.game.scenario.allies.indexOf(V)||!1,ut=P.allied&&-1!=P.allied.indexOf(V)||M&&Y.game.scenario&&Y.game.scenario.allied&&-1!=Y.game.scenario.allied.indexOf(V)||!1,pt=P.drawExtra&&-1!=P.drawExtra.indexOf(V)||M&&Y.game.scenario&&Y.game.scenario.drawExtra&&-1!=Y.game.scenario.drawExtra.indexOf(V)||!1,Vt=Y.monsterManager.addMonsterByName(S.name,P.edition);if(Vt&&(!Q.r.settings.disableStandees||!Vt.entities.find($t=>$t.type==U))){const $t=Y.monsterManager.spawnMonsterEntity(Vt,U,$,ut,pt);$t&&(S.marker&&($t.marker=S.marker),S.tags&&($t.tags=S.tags),S.health&&($t.health=(0,Jt.j9)(S.health)),y.push($t),($t.marker||$t.tags.length>0)&&Y.addEntityCount(Vt,$t))}}}),this.game.state==dt.D2.next&&this.game.figures.forEach(S=>{S instanceof X.Q&&(S.edition==P.edition||-1!=Y.editionExtensions(P.edition).indexOf(S.edition))&&S.entities.some(U=>-1!=y.indexOf(U))&&(S.active=S.active||!this.game.figures.some(U=>U.active),S.entities.forEach(U=>{-1!=y.indexOf(U)&&(U.active=S.active||Y.game.figures.some((V,$,ut)=>V.active&&$>ut.indexOf(S)),U.revealed=!0)}))})}p.objectives&&p.objectives.forEach(y=>{if("number"==typeof y&&y>0){const S={edition:P.edition,scenario:P.index,group:P.group,section:M,index:y-1},U=Y.objectiveDataByScenarioObjectiveIdentifier(S);U&&Y.objectiveManager.addObjective(U,void 0,S)}else if("string"==typeof y&&-1!=y.indexOf(":")){let S=y.split(":");const U=+S.splice(0,1),V=(0,Jt.j9)(S.join(":"));if(U>0&&V>0){const $={edition:P.edition,scenario:P.index,group:P.group,section:M,index:U-1},ut=Y.objectiveDataByScenarioObjectiveIdentifier($);if(ut){const pt=Y.objectiveManager.addObjective(ut,void 0,$);for(let Vt=0;Vt-1!=Q.r.settings.editions.indexOf(y.edition)).map(y=>y.scenarios).flat();return p?!P&&this.game.party.campaignMode&&M.some(y=>y.initial)?M.filter(y=>{if(y.edition!=p)return!1;if(this.game.party.scenarios.find(V=>y.index==V.index&&y.edition==V.edition&&y.group==V.group)||this.game.party.manualScenarios.find(V=>y.index==V.index&&y.edition==V.edition&&y.group==V.group))return!0;let S=!1,U=!y.requires||0==y.requires.length;return this.game.party.scenarios.forEach(V=>{const $=M.find(ut=>ut.index==V.index&&ut.edition==V.edition&&ut.group==V.group);$&&$.edition==y.edition&&$.group==y.group&&$.unlocks&&-1!=$.unlocks.indexOf(y.index)&&(S=!0)}),this.game.party.conclusions.forEach(V=>{const $=Y.sectionData(V.edition).find(ut=>ut.index==V.index&&ut.edition==V.edition&&ut.group==V.group);$&&$.edition==y.edition&&$.group==y.group&&$.unlocks&&-1!=$.unlocks.indexOf(y.index)&&(S=!0)}),U||(U=y.requires.some(V=>V.every($=>{let ut=this.game.party.scenarios.filter(pt=>pt.index==$&&(pt.edition==y.edition||-1!=Y.editionExtensions(y.edition).indexOf(pt.edition)));return ut.length>1&&ut.filter(pt=>pt.group==y.group),ut.length>1&&ut.filter(pt=>pt.edition==y.edition),ut.length>0}))),(S||y.initial)&&U}):M.filter(y=>y.edition==p):M}isBlocked(p){let P=!1,M=Y.scenarioData().filter(y=>(p.edition==y.edition||Y.editionExtensions(p.edition).indexOf(y.edition))&&y.group==p.group&&y.blocks&&-1!=y.blocks.indexOf(p.index)&&this.game.party.scenarios.find(S=>S.edition==y.edition&&S.group==y.group&&S.index==y.index));return M.length>1&&M.filter(y=>y.group==p.group),M.length>1&&M.filter(y=>y.edition==p.edition),P=M.length>0,P&&this.game.party.campaignMode}isLocked(p){return this.game.party.campaignMode&&p.requirements&&p.requirements.length>0&&p.requirements.every(P=>P.global&&P.global.some(M=>{if(M.startsWith("!"))return this.game.party.globalAchievementsList.find(y=>y.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim());if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.globalAchievementsList.find(y=>y.toLowerCase().trim()==M.toLowerCase().trim());{let y=+M.split(":")[1];return this.game.party.globalAchievementsList.forEach(S=>{S.toLowerCase().trim()==M.split(":")[0].toLowerCase().trim()&&y--}),y>0}})||P.party&&P.party.some(M=>{if(M.startsWith("!"))return this.game.party.achievementsList.find(y=>y.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim());if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.achievementsList.find(y=>y.toLowerCase().trim()==M.toLowerCase().trim());{let y=+M.split(":")[1];return this.game.party.achievementsList.forEach(S=>{S.toLowerCase().trim()==M.split(":")[0].toLowerCase().trim()&&y--}),y>0}})||P.campaignSticker&&P.campaignSticker.some(M=>{if(M.startsWith("!"))return this.game.party.campaignStickers.find(y=>y.toLowerCase().replaceAll(" ","-").trim()==M.substring(1,M.length).toLowerCase().trim());if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.campaignStickers.find(y=>y.toLowerCase().replaceAll(" ","-").trim()==M.toLowerCase().trim());{let y=+M.split(":")[1];return this.game.party.campaignStickers.forEach(S=>{S.toLowerCase().replaceAll(" ","-").trim()==M.split(":")[0].toLowerCase().trim()&&y--}),y>0}})||P.buildings&&P.buildings.some(M=>{if(M.startsWith("!"))return this.game.party.buildings.find(y=>y.name.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim()&&y.level>0);if(-1==M.indexOf(":")||isNaN(+M.split(":")[1]))return!this.game.party.buildings.find(y=>y.name.toLowerCase().trim()==M.toLowerCase().trim()&&y.level>0);{let y=+M.split(":")[1];return!this.game.party.buildings.find(S=>S.name.toLowerCase().trim()==M.substring(1,M.length).toLowerCase().trim()&&S.level>=y)}}))||p.solo&&!this.game.figures.find(P=>P instanceof x.z&&P.name==p.solo&&P.level>=5)||!1}getSections(p){return Y.sectionData().filter(P=>P.edition==p.edition&&P.parent==p.index&&P.group==p.group)}availableSections(p=!1,P=!1){return this.game.scenario?this.getSections(this.game.scenario).filter(M=>(!M.conclusion||p)&&(P||!this.game.sections.find(y=>y.edition==M.edition&&y.index==M.index&&y.parent==M.parent))&&(!M.parentSections||M.parentSections.some(y=>y.every(S=>this.game.sections.find(U=>U.index==S))))&&!this.game.sections.find(y=>y.edition==M.edition&&M.blockedSections&&-1!=M.blockedSections.indexOf(y.index))).sort(this.sortScenarios):[]}getTreasures(p,P,M=!1){let y=[];return p.rooms&&p.revealedRooms&&p.revealedRooms.forEach(S=>{const U=p.rooms.find(V=>V.roomNumber==S);U&&U.treasures&&y.push(...U.treasures)}),P.forEach(S=>{S.rooms&&S.revealedRooms&&S.revealedRooms.forEach(U=>{const V=S.rooms.find($=>$.roomNumber==U);V&&V.treasures&&y.push(...V.treasures)})}),y=y.filter((S,U)=>!M||!Y.game.figures.some(V=>V instanceof x.z&&Y.lootManager.hasTreasure(V,S,U))),M&&(y=y.filter(S=>!Y.game.party.treasures.find(U=>U.name==""+S&&U.edition==p.edition))),y}getAllTreasures(p){let P=[];return p.rooms&&p.rooms.forEach(M=>{M.treasures&&P.push(...M.treasures)}),this.getSections(p).forEach(M=>{M.rooms&&M.rooms.forEach(y=>{y.treasures&&P.push(...y.treasures)})}),P}getMonsters(p){let P=[];return P.push(...this.getScenarioMonster(p,!0)),P.push(...this.getRuleMonster(p,!0)),P.push(...Y.monsterManager.getSpawnMonsters(P)),P}getScenarioMonster(p,P=!1){let M=[];M.push(p),P&&M.push(...Y.sectionData(p.edition).filter(S=>S.group==p.group&&S.parent==p.index));let y=[];return M.forEach(S=>{S.monsters&&S.monsters.forEach(U=>{const V=Y.monstersData().find($=>$.name==U.split(":")[0]&&($.edition==S.edition||-1!=Y.editionExtensions(S.edition).indexOf($.edition)));V&&-1==y.indexOf(V)&&y.push(V)})}),y}getRuleMonster(p,P=!1){let M=[];M.push(p),P&&M.push(...Y.sectionData(p.edition).filter(S=>S.group==p.group&&S.parent==p.index));let y=[];return M.forEach(S=>{S.rules&&S.rules.forEach(U=>{U.spawns&&U.spawns.forEach(V=>{const $=Y.monstersData().find(ut=>ut.name==V.monster.name.split(":")[0]&&(ut.edition==S.edition||-1!=Y.editionExtensions(S.edition).indexOf(ut.edition)));$&&-1==y.indexOf($)&&y.push($)})})}),y}sortScenarios(p,P){if(p.conclusion!=P.conclusion)return p.conclusion?1:-1;if(!isNaN(+p.index)&&!isNaN(+P.index))return+p.index-+P.index;const M=p.index.match(/(\d+)/),y=P.index.match(/(\d+)/);return M&&y?+M[0]-+y[0]:p.index.toLowerCase()this.game.scenario&&-1!=this.game.scenario.revealedRooms.indexOf(P.roomNumber)&&(p||!P.initial)):[]}closedRooms(){return this.game.scenario&&this.game.scenario.rooms?this.game.scenario.rooms.filter(p=>this.game.scenario&&-1==this.game.scenario.revealedRooms.indexOf(p.roomNumber)&&this.openRooms(!0).some(P=>P.rooms&&-1!=P.rooms.indexOf(p.roomNumber))):[]}scenarioUndoArgs(p=void 0){return(p=p||Y.game.scenario)?[p.index,"data.scenario."+p.name,p.custom?"scenario.custom":"data.edition."+p.edition]:["","",""]}scenarioDataForModel(p){if(p.isCustom){const M=new en.tR;return M.name=p.custom,M}const P=Y.scenarioData().find(M=>M.index==p.index&&M.edition==p.edition&&M.group==p.group);if(P)return JSON.parse(JSON.stringify(P));console.warn("Invalid scenario data:",p)}sectionDataForModel(p){const P=Y.sectionData().find(M=>M.index==p.index&&M.edition==p.edition&&M.group==p.group);if(P)return JSON.parse(JSON.stringify(P));console.warn("Invalid section data:",p)}toModel(p,P,M=!1,y=""){return new It._b(p.index,p.edition,p.group,M,y,JSON.parse(JSON.stringify(P)))}}var Et=E(6140),Yt=E(1235);class Ce{constructor(p){(0,t.Z)(this,"game",void 0),(0,t.Z)(this,"working",!1),(0,t.Z)(this,"firstRound",!1),this.game=p}drawAvailable(){return this.game.figures.length>0&&(this.game.state==dt.D2.next||this.game.figures.every(p=>p instanceof X.Q||p instanceof et.CH&&(p.getInitiative()>0||p.exhausted||!Q.r.settings.initiativeRequired)||p instanceof ue.k&&(p.getInitiative()>0||!Q.r.settings.initiativeRequired)||p instanceof x.z&&(p.getInitiative()>0||p.exhausted||p.absent||!Q.r.settings.initiativeRequired)))}nextGameState(p=!1){if(this.working=!0,this.game.totalSeconds+=this.game.playSeconds,this.game.playSeconds=0,Q.r.settings.scenarioRules&&Y.scenarioRulesManager.addScenarioRules(),this.game.state==dt.D2.next)this.game.state=dt.D2.draw,Y.entityManager.next(),Y.characterManager.next(),Y.monsterManager.next(),Y.attackModifierManager.next(),Q.r.settings.moveElements&&this.game.elementBoard.forEach(P=>{P.state!=Et.fq.always&&(P.state==Et.fq.strong||P.state==Et.fq.new?P.state=Et.fq.waning:P.state==Et.fq.waning&&(P.state=Et.fq.inert))}),Y.sortFigures(),this.game.figures.forEach(P=>{P.active=!1});else if((this.drawAvailable()||p)&&(this.firstRound&&(Y.attackModifierManager.draw(),Y.lootManager.draw(),this.game.scenario||(this.game.scenario=new It.$4(new en.tR,[],!0))),this.game.state=dt.D2.next,this.game.round++,Y.characterManager.draw(),Y.monsterManager.draw(),Q.r.settings.moveElements&&this.game.elementBoard.forEach(P=>{P.state==Et.fq.new&&(P.state=Et.fq.strong)}),Y.sortFigures(),this.game.figures.length>0)){let P=0,M=this.game.figures.find((y,S)=>S==P&&Y.gameplayFigure(y));for(;!M&&PS==P&&Y.gameplayFigure(y));M&&this.toggleFigure(M,!0)}Y.uiChange.emit(),setTimeout(()=>this.working=!1,1)}toggleFigure(p,P=!1){const M=this.game.figures;let y=M.indexOf(p),S=M.find(pt=>pt.active),U=S?M.indexOf(S):-1;if(!S&&M.every(pt=>pt.off))for(U=M.length-1,S=M[U];S&&!Y.gameplayFigure(S);)U--,S=-1==U?void 0:M[U];const V=p.active||!Y.objectiveManager.skipObjective(p)||P;if(-1==y)return void console.error("Invalid figure");let $=p;const ut=p.active&&(!(p instanceof x.z)||!Q.r.settings.activeSummons||!p.summons.find(pt=>pt.active));if(ut&&(this.afterTurn(p),$=M.find((pt,Vt)=>Y.gameplayFigure(pt)&&!pt.off&&Vt!=y)),V)for(;$&&Y.objectiveManager.skipObjective($);)y=M.indexOf($),this.turn($),this.afterTurn($),$=M.find((pt,Vt)=>Y.gameplayFigure(pt)&&!pt.off&&Vt!=y);if($){y=M.indexOf($);for(let pt=0;pt=U&&!Vt.off?(pt>U&&(this.beforeTurn(Vt),this.turn(Vt,!0)),this.afterTurn(Vt)):pt==y?(Vt.active||this.beforeTurn(Vt),this.turn(Vt)):!ut&&pt>y&&pt<=U&&this.beforeTurn(Vt))}}}beforeTurn(p){if(p.off||p.active?(p.off=!1,p instanceof X.Q&&p.entities.forEach(P=>{P.active=p.active&&!P.off}),Y.entityManager.entitiesAll(p,!1).forEach(P=>{if(Q.r.settings.applyConditions){const M=(P instanceof Ie.g||P instanceof bt.eU)&&P.dead;if(Y.entityManager.unapplyConditionsTurn(P,p),Y.entityManager.unapplyConditionsAfter(P,p),M&&!P.dead){const y=Y.additionalIdentifier(p,P);let S=Y.entityCounter(y);S&&S.killed--}}}),Y.entityManager.entitiesAll(p).forEach(P=>{Q.r.settings.expireConditions&&Y.entityManager.restoreConditions(P)})):p instanceof X.Q&&!p.entities.find(P=>P.active)&&p.entities.forEach(P=>{P.active=p.active,P.off=!1}),p instanceof x.z&&Q.r.settings.activeSummons&&p.summons.forEach(P=>{P.active&&(P.active=!1)}),p instanceof x.z&&p.longRest&&Q.r.settings.applyLongRest){const P=p.entityConditions.find(M=>M.name==H.fT.heal&&M.value&&M.expired);P&&(p.entityConditions=p.entityConditions.filter(M=>M!=P)),Q.r.settings.characterItems&&p.progress.equippedItems.forEach(M=>{if(M.tags){const y=Y.itemManager.getItem(+M.name,M.edition,!0);M.tags=M.tags.filter(S=>S!=Yt.CT.spent),y&&y.spent&&(M.tags=M.tags.filter(S=>S!=Yt.CT.slot&&S!=Yt.CT.slotBack))}})}p.off&&Y.entityManager.entities(p).length>0&&(p.off=!1),p.active=!1}turn(p,P=!1){if(p.active=!0,p instanceof X.Q&&!p.entities.find(M=>M.active)&&p.entities.forEach(M=>{!p.off&&M.summon!=bt.HY.new&&Y.entityManager.isAlive(M)&&(M.active=!0)}),!P&&p instanceof x.z&&Q.r.settings.activeSummons&&Y.entityManager.isAlive(p)){const M=p.summons.find(S=>Y.entityManager.isAlive(S,!0)&&S.active),y=p.summons.find((S,U,V)=>(!M||U>V.indexOf(M))&&Y.entityManager.isAlive(S,!0));p.summons.slice(M?p.summons.indexOf(M):0,y?p.summons.indexOf(y):p.summons.length).forEach((S,U,V)=>{S.active=!1,Q.r.settings.expireConditions&&Y.entityManager.expireConditions(S),Q.r.settings.applyConditions&&(!M||U>0)&&(Y.entityManager.applyConditionsTurn(S,p),Y.entityManager.applyConditionsAfter(S,p))}),y?(y.active=!0,Q.r.settings.applyConditions&&Y.entityManager.applyConditionsTurn(y,p),y.dead&&this.turn(p)):(this.game.elementBoard.forEach(S=>{S.state==Et.fq.new&&(S.state=Et.fq.strong)}),p.summons.forEach(S=>{S.active&&(S.active=!1)}))}if(this.game.elementBoard.forEach(M=>{M.state==Et.fq.new&&(M.state=Et.fq.strong)}),Q.r.settings.applyConditions&&(p instanceof x.z&&!P?!P&&!p.summons.some(M=>M.active)&&Y.entityManager.applyConditionsTurn(p,p):Y.entityManager.entitiesAll(p).forEach(M=>{Y.entityManager.applyConditionsTurn(M,p)})),p instanceof x.z&&Q.r.settings.applyLongRest&&p.longRest&&(P||!p.summons.some(M=>M.active))&&(p.health!M.expired&&-1!=M.types.indexOf(H.CP.clearHeal)&&!M.permanent))){let M=2;"lightning"==p.name&&"fh-crossover"==p.edition&&p.progress.perks[9]&&(M+=1),p.health+=M,Y.entityManager.addCondition(p,new H.gP(H.fT.heal,M),p.active||!1,p.off||!1),Y.entityManager.applyCondition(p,p,H.fT.heal,!0)}((p instanceof x.z||p instanceof et.CH)&&!Y.entityManager.isAlive(p)||p instanceof X.Q&&p.entities.every(M=>!Y.entityManager.isAlive(M))||p instanceof ue.k&&p.entities.every(M=>!Y.entityManager.isAlive(M)))&&Y.roundManager.toggleFigure(p)}afterTurn(p){if(!p.off){if(p instanceof X.Q&&p.entities.forEach(P=>{P.active=!1,P.off=!0}),Q.r.settings.activeSummons&&p instanceof x.z){let P=p.summons.find(M=>Y.entityManager.isAlive(M,!0)&&M.active);for(;P;)this.turn(p),P=p.summons.find(M=>Y.entityManager.isAlive(M,!0)&&M.active)}Y.entityManager.entitiesAll(p).forEach(P=>{Q.r.settings.expireConditions&&Y.entityManager.expireConditions(P),Q.r.settings.applyConditions&&Y.entityManager.applyConditionsAfter(P,p)})}this.game.elementBoard.forEach(P=>{P.state==Et.fq.new&&(P.state=Et.fq.strong),P.state==Et.fq.consumed&&(P.state=Et.fq.inert)}),p.off=!0,p.active=!1}resetScenario(){if(this.game.playSeconds=0,this.game.sections=[],this.game.scenario&&(this.game.scenario.revealedRooms=[]),this.game.scenarioRules=[],this.game.disgardedScenarioRules=[],this.game.round=0,this.game.roundResets=[],this.game.roundResetsHidden=[],this.game.state=dt.D2.draw,this.game.elementBoard.forEach(p=>p.state=Et.fq.inert),Y.attackModifierManager.fromModel(this.game.monsterAttackModifierDeck,(new gt.ut).toModel()),Y.attackModifierManager.fromModel(this.game.allyAttackModifierDeck,(new gt.ut).toModel()),this.game.figures=this.game.figures.filter(p=>p instanceof x.z||this.game.scenario&&this.game.scenario.custom),this.game.entitiesCounter=[],this.game.lootDeck.fromModel(new kt._8),this.game.figures.forEach(p=>{p.active=!1,p.off=!1,p instanceof x.z?(p.health=p.maxHealth,p.loot=0,p.lootCards=[],p.treasures=[],p.experience=0,p.entityConditions=[],p.summons=[],p.initiative=0,p.exhausted=!1,p.longRest=!1,p.token=0,p.battleGoal=!1,p.battleGoals=[],Y.fhRules()&&-1!=p.tags.indexOf("new-character")&&(p.progress.gold=0),p.tags=p.tags.filter(P=>"new-character"!=P),p.availableSummons.filter(P=>P.special).forEach(P=>Y.characterManager.createSpecialSummon(p,P)),p.attackModifierDeck=Y.attackModifierManager.buildCharacterAttackModifierDeck(p),p.lootCardsVisible=!1,p.progress.equippedItems=p.progress.equippedItems.filter(P=>"loot-random-item"!=P.marker),p.progress.equippedItems.forEach(P=>P.tags=[]),Y.characterManager.applyDonations(p)):p instanceof X.Q?(p.entities=[],p.ability=-1,p.abilities=[],Y.monsterManager.resetMonsterAbilities(p)):p instanceof et.CH?(p.health=(0,Jt.j9)(p.maxHealth),p.entityConditions=[]):p instanceof ue.k&&(p.entities=[])}),this.game.party.townGuardDeck){const p=Y.attackModifierManager.buildTownGuardAttackModifierDeck(this.game.party,Y.campaignData());Y.attackModifierManager.shuffleModifiers(p),p.active=!1,this.game.party.townGuardDeck=p.toModel()}Y.stateManager.standeeDialogCanceled=!1,Y.uiChange.emit()}}var me=E(9148);class wn{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}drawCard(p,P){let M;p.current++,p.current>=p.cards.length&&(p.current=p.cards.length-1);const y=p.cards[p.current];return y&&(Q.r.settings.applyLoot&&P&&(M=this.applyLoot(y,P,p.current)),y.type==kt.CG.random_item&&this.game.scenario&&this.game.party.campaignMode&&this.game.party.randomItemLooted.push(new It._b(this.game.scenario.index,this.game.scenario.edition,this.game.scenario.group))),M}applyLoot(p,P,M){let y;if(P.lootCards=P.lootCards||[],p.type==kt.CG.money||p.type==kt.CG.special1||p.type==kt.CG.special2)P.loot+=this.getValue(p);else if(p.type==kt.CG.random_item&&this.game.scenario&&this.game.party.campaignMode&&Q.r.settings.applyLootRandomItem){let S=Y.itemManager.getItems(this.game.scenario.edition,!0).filter(U=>U.random&&!Y.game.party.unlockedItems.find(V=>V.name==""+U.id&&V.edition==U.edition));if(S.length>0){let U=S[Math.floor(Math.random()*S.length)],V=new St.xb(""+U.id,U.edition);for(;S.length>0&&Y.game.party.unlockedItems.find($=>V&&$.name==V.name&&$.edition==V.edition);)S=S.filter($=>V&&($.id+""!=V.name||$.edition!=V.edition)),S.length>0?(U=S[Math.floor(Math.random()*S.length)],V=new St.xb(""+U.id,U.edition)):V=void 0;V&&(y=U)}0==S.length&&(P.loot+=3)}return P.lootCards.push(M),y}shuffleDeck(p){p.current=-1,(0,st.wE)(p.cards)}getTotal(p,P){const M=p.cards.filter(y=>y.type==P);return 0==M.length?0:M.map(y=>this.getValue(y)).reduce((y,S)=>y+S)}addCharacterLoot(p,P){const M=this.getValue(P);if(P.type==kt.CG.money||P.type==kt.CG.special1||P.type==kt.CG.special2)p.loot+=M;else if(-1!=kt.k.indexOf(P.type)){const y=p.progress.loot[P.type]||0;y+M>=0&&(p.progress.loot[P.type]=y+M)}}lootTreasure(p,P,M){let y=[];const S=Y.editionData.find(U=>U.edition==M);if(S&&S.treasures)if((P-=S.treasureOffset||0)>=0&&P{y.push(this.applyTreasureReward(p,$,M))})}else console.warn("Invalid treasure index: '"+P+"' for Edition "+M);return y}hasTreasure(p,P,M){return p.treasures.some(y=>y==P||"string"==typeof y&&(y.startsWith(P+":")||"G"==P&&y=="G-"+M))}applyTreasureReward(p,P,M){let y=[];switch(P.type){case me.Hj.gold:case me.Hj.goldFh:"number"==typeof P.value&&(p.progress.gold+=P.value);break;case me.Hj.experience:case me.Hj.experienceFh:"number"==typeof P.value&&(p.progress.experience+=P.value);break;case me.Hj.battleGoal:"number"==typeof P.value&&(p.progress.battleGoals+=P.value);break;case me.Hj.damage:"number"==typeof P.value?p.health-=P.value:"terrain"==P.value&&(p.health-=Y.levelManager.terrain()),p.health<=0&&(p.exhausted=!0,p.off=!0,p.active=!1);break;case me.Hj.heal:"number"==typeof P.value&&(p.health+=P.value,p.health>p.maxHealth&&(p.health=p.maxHealth));break;case me.Hj.loot:"number"==typeof P.value&&(p.loot+=P.value);break;case me.Hj.resource:"string"==typeof P.value&&P.value.split("+").forEach($=>{const ut=$.split("-")[0],pt=+$.split("-")[1];p.progress.loot[ut]=(p.progress.loot[ut]||0)+pt});break;case me.Hj.condition:"string"==typeof P.value&&P.value.split("+").forEach($=>{Y.entityManager.hasCondition(p,new H.gP($))||Y.entityManager.addCondition(p,new H.gP($),p.active,p.off)});break;case me.Hj.item:case me.Hj.itemDesign:case me.Hj.itemBlueprint:case me.Hj.itemFh:P.value&&(""+P.value).split("+").forEach($=>{let ut=M,pt=-1;isNaN(+$)?(pt=+$.split("-")[0],ut=$.split("-")[1]):pt=+$;const Vt=Y.itemManager.getItem(pt,ut,!0);if(Vt){const $t=new St.Jc(""+Vt.id,Vt.edition);P.type==me.Hj.item||P.type==me.Hj.itemFh?(p.progress.items.find(pe=>pe.name==$t.name&&pe.edition==$t.edition)?p.progress.gold+=Y.itemManager.itemSellValue(Vt):p.progress.items.push($t),Y.itemManager.addItemCount(Vt)):Y.game.party.unlockedItems.push($t)}});break;case me.Hj.calendarSection:if(P.value&&"string"==typeof P.value&&P.value.split("-").length>1){const $=P.value.split("-")[0],ut=Y.game.party.weeks+ +P.value.split("-")[1];Y.game.party.weekSections[ut]||(Y.game.party.weekSections[ut]=[]),Y.game.party.weekSections[ut]?.push($)}break;case me.Hj.campaignSticker:P.value&&"string"==typeof P.value&&Y.game.party.campaignStickers.push(P.value);break;case me.Hj.partyAchievement:P.value&&"string"==typeof P.value&&Y.game.party.achievementsList.push(P.value);break;case me.Hj.lootCards:if("number"==typeof P.value){Y.game.lootDeck.active=!0;for(let $=0;$ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&!Y.game.party.scenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&Y.game.party.manualScenarios.push($)}break;case me.Hj.randomScenario:let S=Y.scenarioData(M).filter($=>$.random&&!Y.game.party.manualScenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&!Y.game.party.scenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom));if(S.length>0){let $=S[Math.floor(Math.random()*S.length)],ut=({}=new It._b(""+$.index,$.edition,$.group,!1,"",[]));for(;S.length>0&&Y.game.party.manualScenarios.find(pt=>ut&&pt.index==ut.index&&pt.edition==ut.edition&&pt.group==ut.group);)S=S.filter(pt=>ut&&(pt.edition!=ut.edition||pt.index!=ut.edition||pt.group!=ut.group)),S.length>0?($=S[Math.floor(Math.random()*S.length)],ut=new It._b(""+$.index,$.edition,$.group,!1,"",[])):ut=void 0;ut&&(Y.game.party.manualScenarios.push(ut),y.push($.index,"data.scenario."+$.name))}break;case me.Hj.randomScenarioFh:let U=Y.sectionData(M).filter($=>$.conclusion&&$.random&&!Y.game.party.conclusions.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom)&&!Y.game.party.scenarios.find(ut=>ut.index==$.index&&ut.edition==$.edition&&ut.group==$.group&&!ut.custom));if(U.length>0){let $=U[Math.floor(Math.random()*U.length)],ut=({}=new It._b(""+$.index,$.edition,$.group,!1,"",[]));for(;U.length>0&&Y.game.party.conclusions.find(pt=>ut&&pt.index==ut.index&&pt.edition==ut.edition&&pt.group==ut.group);)U=U.filter(pt=>ut&&(pt.edition!=ut.edition||pt.index!=ut.edition||pt.group!=ut.group)),U.length>0?($=U[Math.floor(Math.random()*U.length)],ut=new It._b(""+$.index,$.edition,$.group,!1,"",[])):ut=void 0;ut&&(Y.game.party.conclusions.push(ut),y.push($.index,"data.section."+$.name,$.unlocks?$.unlocks.map(pt=>"%game.scenarioNumber:"+pt+"%").join(", "):""))}0==U.length&&(Y.game.party.inspiration+=1);break;case me.Hj.randomItem:case me.Hj.randomItemDesign:case me.Hj.randomItemBlueprint:let V=Y.itemManager.getItems(M,!0).filter($=>(P.type==me.Hj.randomItem||P.type==me.Hj.randomItemDesign&&$.random||P.type==me.Hj.randomItemBlueprint&&$.blueprint&&(!$.requiredBuilding||Y.game.party.buildings.find(ut=>ut.name==$.requiredBuilding&&ut.level>=$.requiredBuildingLevel)))&&!Y.game.party.unlockedItems.find(ut=>ut.name==""+$.id&&ut.edition==$.edition));if("string"==typeof P.value&&-1!=P.value.indexOf("-")){const $=+P.value.split("-")[0],ut=+P.value.split("-")[1];V=V.filter(pt=>pt.id>=$&&pt.id<=ut)}if(V.length>0){let $=V[Math.floor(Math.random()*V.length)],ut=new St.Jc(""+$.id,$.edition);for(;V.length>0&&Y.game.party.unlockedItems.find(pt=>ut&&pt.name==ut.name&&pt.edition==ut.edition);)V=V.filter(pt=>ut&&(pt.id+""!=ut.name||pt.edition!=ut.edition)),V.length>0?($=V[Math.floor(Math.random()*V.length)],ut=new St.Jc(""+$.id,$.edition)):ut=void 0;ut&&(P.type==me.Hj.randomItem?p.progress.items.push(ut):Y.game.party.unlockedItems.push(ut),y.push(""+$.id,"data.items."+$.name,$.edition))}0==V.length&&P.type==me.Hj.randomItemBlueprint&&(Y.game.party.inspiration+=1)}return y}getValue(p,P=!0){const M=Y.characterManager.characterCount();let y=p.value4P;return M<=2?y=p.value2P:3==M&&(y=p.value3P),P&&(y+=p.enhancements),y}draw(){this.shuffleDeck(this.game.lootDeck)}fullLootDeck(){let p=JSON.parse(JSON.stringify(kt.F8));return this.game.lootDeckEnhancements.forEach(P=>{if(P.enhancements>0){const M=p.find(y=>y.type==P.type&&y.value2P==P.value2P&&y.value3P==P.value3P&&y.value4P==P.value4P&&0==y.enhancements);if(!M)return void console.warn("Enhancement of non-available loot card: "+P.type+":"+P.value4P+":"+P.value3P+":"+P.value2P);p.splice(p.indexOf(M),1,JSON.parse(JSON.stringify(P)))}}),p}apply(p,P={}){p.cards=[],Object.values(kt.CG).forEach(M=>{const y=(0,st.wE)(this.fullLootDeck().filter(U=>U.type==M)),S=Math.min(Math.max(P[M]||0),y.length);if(M!=kt.CG.special1&&M!=kt.CG.special2)for(let U=0;U0){const U=y[0];p.cards.push(U),-1==this.game.lootDeckFixed.indexOf(U.type)&&this.game.lootDeckFixed.push(U.type)}else this.game.lootDeckFixed=this.game.lootDeckFixed.filter(U=>U!=M),p.cards=p.cards.filter(U=>U.type!=M)}),this.shuffleDeck(p)}randomItemLooted(){return null!=Y.game.party.randomItemLooted.find(p=>this.game.scenario&&p.index==this.game.scenario.index&&p.edition==this.game.scenario.edition&&p.group==this.game.scenario.group)}valueLabel(p){return p.value4P==p.value3P&&p.value3P==p.value2P?""+(p.value4P>0?p.value4P:""):p.value4P==p.value3P&&p.value3P!=p.value2P?"%game.loot.player.3-4% +"+p.value4P+"/%game.loot.player.2% +"+p.value2P:p.value4P!=p.value3P&&p.value3P==p.value2P?"%game.loot.player.4% +"+p.value4P+"/%game.loot.player.2-3% +"+p.value2P:"%game.loot.player.4% +"+p.value4P+"/%game.loot.player.3% +"+p.value3P+"/%game.loot.player.2% +"+p.value2P}}var xe=E(6417);class ke{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}getBattleGoalEditions(){return Y.editionData.filter(p=>-1!=Q.r.settings.editions.indexOf(p.edition)&&p.battleGoals&&p.battleGoals.length>0).map(p=>p.edition)}getBattleGoals(p=!0,P=!1){return Y.editionData.filter(M=>-1!=Q.r.settings.editions.indexOf(M.edition)&&(Y.game.edition&&Y.editionRules(M.edition)||-1!=Y.game.battleGoalEditions.indexOf(M.edition))).flatMap(M=>M.battleGoals.filter(y=>!p||!this.game.filteredBattleGoals||0==this.game.filteredBattleGoals.length||!this.game.filteredBattleGoals.find(S=>y.edition==S.edition&&y.name==S.name))).filter((M,y,S)=>P||!M.alias||!S.find(U=>M.alias&&U.edition==M.alias.edition&&U.name==M.alias.name))}getBattleGoalsForEdition(p){return Y.editionData.filter(P=>P.edition==p||-1!=Y.editionExtensions(p).indexOf(p)).flatMap(P=>P.battleGoals)}getBattleGoal(p){return this.getBattleGoals(void 0,!0).find(P=>P.edition==p.edition&&P.name==p.name)}drawBattleGoal(p){const P=this.getBattleGoals().filter(y=>!this.game.figures.find(S=>S instanceof x.z&&S.battleGoals&&S.battleGoals.find(U=>y.edition==U.edition&&y.name==U.name)));let M=P[Math.floor(Math.random()*P.length)];p.battleGoals=p.battleGoals||[],p.battleGoals.push(new St.xb(M.name,M.edition))}}class Ft{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}addObjective(p=void 0,P=void 0,M=void 0){let y=Y.game.figures.find(S=>S instanceof ue.k&&(!M&&p&&!S.objectiveId&&S.name==p.name&&S.health==(0,Jt.j9)(""+p.health)&&S.escort==p.escort&&S.initiative==(p.initiative||99)||M&&S.objectiveId&&Y.objectiveDataByScenarioObjectiveIdentifier(M)==Y.objectiveDataByScenarioObjectiveIdentifier(S.objectiveId)));return y||(y=new ue.k((0,Tt.Z)(),M),p&&(y.marker=p.marker,y.name=p.name,P&&(y.name=P),y.health=(0,Jt.j9)(""+p.health),y.escort=p.escort,p.initiative&&(y.initiative=p.initiative)),this.game.figures.push(y)),Y.addEntityCount(y),Y.sortFigures(y),this.addObjectiveEntity(y,void 0,p),y}removeObjective(p){const P=this.game.figures.indexOf(p);-1!=P&&this.game.figures.splice(P,1)}addObjectiveEntity(p,P=void 0,M=void 0){if(!P||p.entities.find(S=>S.number==P)){const S=p.entities.filter(U=>Y.entityManager.isAlive(U)).length;if(P=S%12,S<12)for(;p.entities.find(U=>U.number-1==P);)P++}let y=new We.W((0,Tt.Z)(),P+1,p,M&&M.marker||p.marker);return M&&(y.tags=M.tags),p.entities.push(y),p.off&&(p.off=!1),y}removeObjectiveEntity(p,P){p.entities.splice(p.entities.indexOf(P),1),(0==p.entities.length||p.entities.every(M=>!Y.entityManager.isAlive(M)))&&(p.off||Y.game.state!=dt.D2.next?this.removeObjective(p):p.active?Y.roundManager.toggleFigure(p):this.removeObjective(p))}objectiveEntityCountIdentifier(p,P){return"all"!=P.type&&(P.name!=p.name||P.edition!=p.edition)||"objective"!=P.type?0:p.entities.filter(M=>Y.entityManager.isAlive(M)&&(!P.marker||P.marker==M.marker)&&(!P.tags||0==P.tags.length||P.tags.every(y=>-1!=M.tags.indexOf(y)))).length}skipObjective(p){if(p instanceof ue.k&&!p.escort){if(!p.objectiveId)return!0;{const P=Y.objectiveDataByScenarioObjectiveIdentifier(p.objectiveId);if(!P||!P.actions||0==P.actions.length)return!0}}return!1}}class Oe{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}itemEditions(p=void 0){return Y.editionData.filter(P=>-1!=Q.r.settings.editions.indexOf(P.edition)&&(!p||p==P.edition||-1!=Y.editionExtensions(p).indexOf(P.edition)||"fh"==p&&"gh"==P.edition)&&P.items&&P.items.length>0).flatMap(P=>P.edition)}getItems(p,P=!1){return Y.itemData().filter(M=>P&&M.edition==p||this.isItemAvailable(M,p))}isItemAvailable(p,P,M=!0){if(!this.game.party.campaignMode||!P||(p.edition==P||-1!=Y.editionExtensions(P).indexOf(p.edition))&&(M&&this.game.party.unlockedItems.find(y=>y.name==""+p.id&&y.edition==p.edition)||p.unlockProsperity>0&&p.unlockProsperity<=Y.prosperityLevel()||p.unlockScenario&&this.game.party.scenarios.find(y=>p.unlockScenario&&y.index==p.unlockScenario.name&&y.edition==p.unlockScenario.edition)||!p.blueprint&&!p.random&&p.requiredBuilding&&"alchemist"!=p.requiredBuilding&&this.game.party.buildings&&this.game.party.buildings.find(y=>y.name==p.requiredBuilding&&y.level>=p.requiredBuildingLevel)))return!0;if(Q.r.settings.fhGhItems&&Y.fhRules()){if("gh"==p.edition){const y=this.game.party.buildings&&this.game.party.buildings.find(S=>"trading-post"==S.name&&"wrecked"!=S.state);if(y){if(y.level>=2&&-1!=[21,37,53,93,94,106,115].indexOf(p.id))return!0;if(y.level>=3&&-1!=[46,83,84,85,86,87,88,102,110,111,120,121,122,123,126,128].indexOf(p.id))return!0;if(y.level>=4&&-1!=[17,35,47,51,62,74,77,78,79,80,81,82,117,118,119,127,129,131].indexOf(p.id))return!0}return-1!=[10,25,72,105,109,116].indexOf(p.id)}if("fc"==p.edition){let y=[];this.game.party.scenarios.find(S=>"fh"==S.edition&&"82"==S.index&&!S.group)&&y.push(153,159,161),this.game.party.buildings&&this.game.party.buildings.find(S=>"enhancer"==S.name&&4==S.level&&"wrecked"!=S.state)&&y.push(154,155,157,163)}}return!1}getItem(p,P,M){return Y.itemData(void 0,!0).find(y=>y&&y.id==p&&y.edition==P&&(M||this.isItemAvailable(y,P)))}maxItemIndex(p){return Math.max(...this.getItems(p,!0).map(P=>P.id))}pricerModifier(){return this.game.party.reputation>=0?-1*Math.ceil((Y.game.party.reputation-2)/4):-1*Math.floor((Y.game.party.reputation+2)/4)}assigned(p){return this.game.figures.filter(P=>P instanceof x.z&&P.progress&&P.progress.items).map(P=>P).map(P=>P.progress&&P.progress.items).reduce((P,M)=>P&&M&&P.concat(M)).filter(P=>p&&P.name==""+p.id&&P.edition==p.edition).length}owned(p,P){return null!=P.progress.items.find(M=>p&&M.name==""+p.id&&M.edition==p.edition)}canAdd(p,P){return p.count&&this.countAvailable(p)>0&&!P.progress.items.find(M=>p&&M.name==""+p.id&&M.edition==p.edition)||!1}canBuy(p,P,M=0){return(!Y.game.party.campaignMode||!Y.fhRules()||-1!=P.tags.indexOf("new-character")||this.game.party.buildings&&this.game.party.buildings.find(y=>"trading-post"==y.name&&y.level>=1&&"wrecked"!=y.state))&&p.cost&&p.cost+this.pricerModifier()+M<=P.progress.gold&&this.canAdd(p,P)||!1}canCraft(p,P,M={}){let y=!1,S=!0;return p.resources&&Object.keys(p.resources).forEach(U=>{const V=U,$=(p.resources[V]||0)+(M[V]||0);$>0&&(y=!0),S=(0,kt.tH)(V)==kt.XA.herb_resources?S&&((P.progress.loot[V]||0)>=$||(Y.game.party.loot[V]||0)>=$):S&&(P.progress.loot[V]||0)>=$}),p.requiredItems&&p.requiredItems.forEach(U=>{if(U!=p.id){const V=this.getItem(U,p.edition,!0);V?(y=!0,this.owned(V,P)||(S=S&&(this.canCraft(V,P,p.resources||{})||this.canBuy(V,P,p.cost)))):console.error("Missing required item '"+U+"' for item '"+p.id+"' ("+p.name+")")}}),S&&y}itemSellValue(p){if(p.cost)return Math.floor(p.cost/2);{let P=0;return p.resources&&Object.keys(p.resources).forEach(M=>{P+=2*(p.resources[M]||0)}),p.requiredItems&&p.requiredItems.forEach(()=>{P+=2}),P}}addItem(p,P){P.progress.items.push(new St.xb(p.id+"",p.edition))}buyItem(p,P){P.progress.gold-=p.cost+this.pricerModifier(),P.progress.items.push(new St.xb(p.id+"",p.edition))}craftItemResources(p,P){p.resources&&Object.keys(p.resources).forEach(M=>{const y=M,S=p.resources[y]||0;(0,kt.tH)(y)==kt.XA.herb_resources?(P.progress.loot[y]||0)>=S?P.progress.loot[y]=(P.progress.loot[y]||0)-S:this.game.party.loot[y]=(this.game.party.loot[y]||0)-S:P.progress.loot[y]=(P.progress.loot[y]||0)-S}),p.requiredItems&&p.requiredItems.forEach(M=>{if(M!=p.id){const y=this.getItem(M,p.edition,!0);if(y){if(y){const S=P.progress.items.find(U=>U.name==""+y.id&&U.edition==y.edition);if(S){const U=P.progress.items.indexOf(S);P.progress.items.splice(U,1),P.progress.equippedItems=P.progress.equippedItems.filter(V=>V.name!=""+y.id||V.edition!=y.edition)}else this.canBuy(y,P)?P.progress.gold-=p.cost+this.pricerModifier():this.craftItemResources(y,P)}}else console.error("Missing required item '"+M+"' for item '"+p.id+"' ("+p.name+")")}})}craftItem(p,P){this.craftItemResources(p,P),P.progress.items.push(new St.xb(p.id+"",p.edition))}removeItem(p,P){const M=P.progress.items.find(y=>y.name==""+p.id&&y.edition==p.edition);if(M){const y=P.progress.items.indexOf(M);P.progress.items.splice(y,1),P.progress.equippedItems=P.progress.equippedItems.filter(S=>S.name!=""+p.id||S.edition!=p.edition)}}sellItem(p,P){const M=P.progress.items.find(y=>y.name==""+p.id&&y.edition==p.edition);if(M&&this.itemSellValue(p)){const y=P.progress.items.indexOf(M);P.progress.gold+=this.itemSellValue(p),P.progress.items.splice(y,1),P.progress.equippedItems=P.progress.equippedItems.filter(S=>S.name!=""+p.id||S.edition!=p.edition)}}addItemCount(p){if(this.game.party.campaignMode){const P=Y.itemManager.assigned(p);if(Y.itemManager.countAvailable(p)+P+S.name==p.id&&S.edition==p.edition);y?(y.count+=1,y.count==p.count&&(y.count=-1)):Y.game.party.unlockedItems.push(new St.Jc(""+p.id,p.edition,1))}}}countAvailable(p){if(!Y.itemManager.getItems(p.edition).find(y=>y.id==p.id&&y.edition==p.edition))return-1;const M=this.assigned(p);if(!this.isItemAvailable(p,p.edition,!1)){const y=Y.game.party.unlockedItems.find(S=>+S.name==p.id&&S.edition==p.edition);if(y&&y.count>0)return y.count-M<0&&console.warn("More items assigend than available:",p),y.count-M}return p.count-M<0&&console.warn("More items assigend than available:",p),p.count-M}isEquipped(p,P){return null!=P.progress.equippedItems.find(M=>M.name==""+p.id&&M.edition==p.edition)}toggleEquippedItem(p,P,M){let y=P.progress.equippedItems.map(U=>this.getItem(+U.name,U.edition,!0)).filter(U=>U).map(U=>U);const S=y.indexOf(p);if(M&&-1==S)y.push(p);else if(M)y.splice(S,1);else if(-1!=S){y.splice(S,1);const U=Math.ceil(P.level/2),V=y.filter($=>$.slot==Yt.SE.small).length;if(16==p.id&&"gh"==p.edition&&V>=U)for(let $=0;$pt.slot==Yt.SE.small);ut&&y.splice(y.indexOf(ut),1)}}else{const U="drifter"==P.name&&"fh"==P.edition&&P.progress.perks[11];if(p.slot==Yt.SE.small){let V=Math.ceil(P.level/2);if(y.find($=>16==$.id&&"gh"==$.edition||60==$.id&&"fh"==$.edition)&&(V+=2),y.find($=>132==$.id&&"fh"==$.edition)&&(V+=1),y.filter($=>$.slot==p.slot).length>=V){const $=y.find(ut=>ut.slot==p.slot);$&&y.splice(y.indexOf($),1)}}else if(p.slot==Yt.SE.onehand){const V=y.find($=>$.slot==Yt.SE.twohand);if(V&&!U&&(y=y.filter($=>$.slot!=Yt.SE.twohand)),y.filter($=>$.slot==p.slot).length>(U?V?0:2:1)){const $=y.find(ut=>ut.slot==p.slot);$&&y.splice(y.indexOf($),1)}}else if(p.slot==Yt.SE.twohand)if(y=y.filter(V=>V.slot!=p.slot),U)for(;y.filter(V=>V.slot==Yt.SE.onehand).length>1;){const V=y.find($=>$.slot==Yt.SE.onehand);V&&y.splice(y.indexOf(V),1)}else y=y.filter(V=>V.slot!=Yt.SE.onehand);else y=y.filter(V=>V.slot!=p.slot);y.push(p)}P.progress.equippedItems=y.map(U=>new St.VY(U.id+"",U.edition)),P.attackModifierDeck=Y.attackModifierManager.buildCharacterAttackModifierDeck(P),3==p.id&&"fh"==p.edition&&(-1==S?P.maxHealth+=1:P.maxHealth-=1,P.health=P.maxHealth)}}class rn{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}getEventCardsForEdition(p,P){return Y.editionData.filter(M=>M.edition==P||-1!=Y.editionExtensions(P).indexOf(P)).flatMap(M=>M.events).filter(M=>M.type==p)}}class kn{constructor(p){(0,t.Z)(this,"game",void 0),this.game=p}applyRewards(p){if(p.defense&&(this.game.party.defense+=p.defense),p.loseMorale&&(this.game.party.morale-=p.loseMorale,this.game.party.morale<0&&(this.game.party.morale=0)),p.prosperity&&(this.game.party.prosperity+=p.prosperity),p.soldiers){this.game.party.soldiers+=p.soldiers;const P=this.game.party.buildings.find(M=>"barracks"==M.name);if(P){let M=0;1==P.level?M=4:2==P.level?M=6:3==P.level?M=8:4==P.level&&(M=10),this.game.party.soldiers>M&&(this.game.party.soldiers=M)}}}rewardSection(p){if(Y.game.party.conclusions.find(M=>M.edition==p.edition&&M.index==p.index&&M.group==p.group))return p;const P=Y.sectionData(p.edition).filter(M=>M.conclusion&&!M.parent&&M.parentSections&&M.parentSections.find(y=>1==y.length&&-1!=y.indexOf(p.index)));if(0!=P.length){let M;return P.forEach(y=>{M||(M=this.rewardSection(y))}),M}}}const Y=new class Me{constructor(){(0,t.Z)(this,"game",new dt.lA),(0,t.Z)(this,"editionData",[]),(0,t.Z)(this,"stateManager",void 0),(0,t.Z)(this,"entityManager",void 0),(0,t.Z)(this,"characterManager",void 0),(0,t.Z)(this,"monsterManager",void 0),(0,t.Z)(this,"objectiveManager",void 0),(0,t.Z)(this,"attackModifierManager",void 0),(0,t.Z)(this,"levelManager",void 0),(0,t.Z)(this,"scenarioManager",void 0),(0,t.Z)(this,"scenarioRulesManager",void 0),(0,t.Z)(this,"roundManager",void 0),(0,t.Z)(this,"lootManager",void 0),(0,t.Z)(this,"itemManager",void 0),(0,t.Z)(this,"battleGoalManager",void 0),(0,t.Z)(this,"eventCardManager",void 0),(0,t.Z)(this,"buildingsManager",void 0),(0,t.Z)(this,"uiChange",new _n.vpe),this.stateManager=new qt(this.game),this.entityManager=new ve(this.game),this.characterManager=new Rt(this.game),this.monsterManager=new Dt.B(this.game),this.objectiveManager=new Ft(this.game),this.attackModifierManager=new lt(this.game),this.levelManager=new be(this.game),this.scenarioManager=new Ut(this.game),this.scenarioRulesManager=new xe.L(this.game),this.roundManager=new Ce(this.game),this.itemManager=new Oe(this.game),this.lootManager=new wn(this.game),this.battleGoalManager=new ke(this.game),this.eventCardManager=new rn(this.game),this.buildingsManager=new kn(this.game),this.uiChange.subscribe({next:()=>{this.checkEntitiesKilled(),this.game.levelCalculation&&this.levelManager.calculateScenarioLevel(),Q.r.settings.scenarioRules&&this.game.round>0&&this.scenarioRulesManager.addScenarioRulesAlways(),this.roundManager.firstRound=0==this.game.round&&0==this.game.roundResets.length&&0==this.game.roundResetsHidden.length}})}editions(p=!1,P=!1){return this.editionData.filter(M=>(p||-1!=Q.r.settings.editions.indexOf(M.edition))&&(P||!M.additional)).map(M=>M.edition)}editionsData(p=!1,P=!1){const M=this.editions(p,P);return this.editionData.filter(y=>-1!=M.indexOf(y.edition))}currentEditions(p=!1){return this.game.edition?[this.game.edition,...this.editionExtensions(this.game.edition)]:this.editions(!1,p)}currentEdition(p=void 0){if(this.game.edition)return this.game.edition;if(this.game.scenario&&this.game.scenario.edition)return this.game.scenario.edition;const P=Y.game.figures.filter(M=>M instanceof x.z).map(M=>M.edition);return P.length>0&&P.every((M,y,S)=>0==y||S[y-1]==M)?P[0]:p??this.editions()[0]}editionExtensions(p,P=!1){const M=this.editionData.find(S=>S.edition==p);let y=[];return M&&M.extensions&&M.extensions.forEach(S=>{-1==y.indexOf(S)&&-1!=this.editions(P,!0).indexOf(S)&&y.push(S),this.editionExtensions(S,P).forEach(U=>{-1==y.indexOf(U)&&-1!=this.editions(P,!0).indexOf(S)&&y.push(U)})}),y}newAmStyle(p){const P=this.editionData.find(M=>M.edition==p);return!(!P||!(P.newAmStyle||P.extensions&&P.extensions.some(M=>this.newAmStyle(M))))}charactersData(p=void 0){const P=this.editionData.filter(y=>!(p&&-1==Q.r.settings.editions.indexOf(y.edition)||p&&y.edition!=p&&-1==this.editionExtensions(y.edition).indexOf(p))).flatMap(y=>y.characters),M=P.filter(y=>y.merge);return P.filter(y=>(!p||y.edition==p)&&!y.merge&&(y.replace||!y.replace&&!P.find(S=>S.replace&&S.name===y.name&&S.edition===y.edition))).map(y=>{const S=M.find(U=>U.name===y.name&&U.edition===y.edition);return S?Object.assign(new G.x3(y),S):new G.x3(y)})}monstersData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.monsters).filter((P,M,y)=>(!p||P.edition==p)&&(P.replace||!P.replace&&!y.find(S=>S.replace&&S.name==P.name&&S.edition==P.edition)))}decksData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.decks).filter(P=>!p||P.edition==p)}scenarioData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.scenarios).filter(P=>!p||P.edition==p)}sectionData(p=void 0){return this.editionData.filter(P=>!(p&&-1==Q.r.settings.editions.indexOf(P.edition)||p&&P.edition!=p&&-1==this.editionExtensions(P.edition).indexOf(p))).flatMap(P=>P.sections).filter(P=>!p||P.edition==p)}itemData(p=void 0,P=!1){return this.editionData.filter(M=>(P||-1!=Q.r.settings.editions.indexOf(M.edition))&&(!p||M.edition==p||-1!=this.editionExtensions(M.edition,!0).indexOf(p))).flatMap(M=>M.items)}conditions(p=void 0,P=!1){if(!p)return H.G3;let M=this.editionData.filter(y=>(y.edition==p||-1!=this.editionExtensions(p).indexOf(y.edition))&&y.conditions&&y.conditions.length>0).flatMap(y=>y.conditions);return!P&&this.game.conditions&&M.push(...this.game.conditions),M.filter((y,S,U)=>U.indexOf(y)==S).map(y=>y.split(":").length>1?new H.gP(y.split(":")[0],+y.split(":")[1]):new H.gP(y))}figureConditions(p,P=void 0){let M=[];if(p instanceof x.z)p.conditions.forEach(y=>{(!y.level||y.level<=p.level)&&M.push(y.name)}),p.summons&&p.summons.forEach(y=>{y.action&&this.actionConditions(y.action).forEach(S=>{M.find(U=>U==S)||M.push(S)}),y.additionalAction&&this.actionConditions(y.additionalAction).forEach(S=>{M.find(U=>U==S)||M.push(S)})});else if(p instanceof X.Q&&P instanceof Ie.g){const y=Y.monsterManager.getStat(p,P.type),S=Y.monsterManager.getAbility(p);S&&S.actions.forEach(U=>{this.actionConditions(U,y).forEach(V=>{M.find($=>$==V)||M.push(V)})})}return M}actionConditions(p,P=void 0){let M=[];return p.type==Wt.Us.condition?M.push(p.value):P&&p.type==Wt.Us.attack&&P.actions&&P.actions.forEach(y=>{y.type==Wt.Us.condition&&M.push(y.value)}),p.subActions&&p.subActions.forEach(y=>{M.push(...this.actionConditions(y,P))}),M}objectiveDataByScenarioObjectiveIdentifier(p){const P=p.section?this.sectionData(p.edition).find(M=>M.index==p.scenario&&M.group==p.group):this.scenarioData(p.edition).find(M=>M.index==p.scenario&&M.group==p.group);if(P)if(p.section&&!P.objectives){const M=this.scenarioData(p.edition).find(y=>y.index==P.parent&&y.group==P.group);if(M&&M.objectives&&M.objectives.length>p.index)return M.objectives[p.index]}else if(P.objectives.length>p.index)return P.objectives[p.index]}conditionsForTypes(...p){return this.conditions(this.game.edition).filter(P=>p.every(M=>-1!=P.types.indexOf(M)))}allConditionsForTypes(...p){return this.conditions().filter(P=>p.every(M=>-1!=P.types.indexOf(M)))}markers(){return this.game.figures.filter(p=>p instanceof x.z&&!p.absent&&(p.marker||this.game.state==dt.D2.next&&p.active)).map(p=>p).sort((p,P)=>p.marker&&!P.marker?-1:!p.marker&&P.marker?1:0).map(p=>p.edition+"-"+p.name)}sortFigures(p=void 0){this.game.figures.sort((P,M)=>Q.r.settings.disableSortFigures?0:this.game.state==dt.D2.draw?this.sortFiguresByTypeAndName(P,M):p&&p!=P&&p!=M?0:Q.r.settings.initiativeRequired||P.getInitiative()>0&&M.getInitiative()>0?P.getInitiative()==M.getInitiative()?this.sortFiguresByTypeAndName(P,M):P.getInitiative()-M.getInitiative():P.getInitiative()>0?1:M.getInitiative()>0?-1:this.sortFiguresByTypeAndName(P,M))}sortFiguresByTypeAndName(p,P){if(p.off&&!P.off)return 1;if(!p.off&&P.off)return-1;let M=p.name.toLowerCase();p instanceof x.z?M=p.title.toLowerCase()||Q.r.getLabel("data.character."+p.name).toLowerCase():p instanceof X.Q?M=Q.r.getLabel("data.monster."+p.name).toLowerCase():(p instanceof et.CH||p instanceof ue.k)&&(M=p.title?p.title:Q.r.getLabel(p.name?"data.objective."+p.name:p.escort?"escort":"objective").toLowerCase());let y=P.name.toLowerCase();if(P instanceof x.z?y=P.title.toLowerCase()||Q.r.getLabel("data.character."+P.name).toLowerCase():P instanceof X.Q?y=Q.r.getLabel("data.monster."+P.name).toLowerCase():(P instanceof et.CH||P instanceof ue.k)&&(y=P.title?P.title:Q.r.getLabel(P.name?"data.objective."+P.name:P.escort?"escort":"objective").toLowerCase()),p instanceof x.z&&P instanceof X.Q)return-1;if(p instanceof X.Q&&P instanceof x.z)return 1;if(p instanceof x.z&&(P instanceof et.CH||P instanceof ue.k))return-1;if((p instanceof et.CH||p instanceof ue.k)&&P instanceof x.z)return 1;if(p instanceof X.Q&&(P instanceof et.CH||P instanceof ue.k))return-1;if((p instanceof et.CH||p instanceof ue.k)&&P instanceof X.Q)return 1;if(p instanceof X.Q&&P instanceof X.Q)return 0;if(p instanceof et.CH&&P instanceof et.CH&&M==y)return p.id-P.id;if(p instanceof ue.k&&P instanceof ue.k&&M==y){if(p.marker&&P.marker)return p.markerM.name==p.deck||M.name==p.name);return P||(P=this.decksData().find(M=>(M.name==p.deck||M.name==p.name)&&-1!=this.editionExtensions(p.edition).indexOf(M.edition))),P||(P=this.decksData().find(M=>(M.name==p.deck||M.name==p.name)&&M.edition==p.edition)),P||(p.errors=p.errors||[],!p.errors.find(M=>M.type==K.r.unknown)&&!p.errors.find(M=>M.type==K.r.deck)&&(console.error("Unknwon deck: "+p.name+(p.deck?"["+p.deck+"]":"")+" for "+p.edition),p.errors.push(new K.o(K.r.deck,p instanceof x.z?"character":"monster",p.name,p.edition,p.deck))),new tt.x("",[],""))}abilities(p){return this.deckData(p).abilities||[]}hasBottomAbility(p){return p&&p.bottomActions&&p.bottomActions.length>0||!1}getCharacterData(p,P=""){let M=this.charactersData().find(y=>y.name==p&&(!P||y.edition==P));return M||(M=this.charactersData().find(y=>y.name==p),M||(M=new G.x3,M.name=p,M.edition=P,M.errors=M.errors||[],M.errors.find(y=>y.type==K.r.unknown)||(console.error("unknown character '"+p+"' for edition '"+P+"'"),M.errors.push(new K.o(K.r.unknown,"character",p,P)))),M)}isCharacter(p){return p instanceof x.z}isObjective(p){return p instanceof et.CH}isMonster(p){return p instanceof X.Q}isMonsterEntity(p){return p instanceof Ie.g}isSummon(p){return p instanceof bt.eU}isObjectiveContainer(p){return p instanceof ue.k}isObjectiveEntity(p){return p instanceof We.W}toCharacter(p){return p}toObjective(p){return p}toMonster(p){return p}toMonsterEntity(p){return p}toSummon(p){return p}toObjectiveContainer(p){return p}toObjectiveEntity(p){return p}getEdition(p,P=""){const M=this.currentEdition(P);return p.edition!=M&&-1==this.editionExtensions(M).indexOf(p.edition)?p.edition:""}gameplayFigure(p){return(p instanceof X.Q||p instanceof ue.k)&&this.entityManager.entitiesAll(p,!0).length>0||p instanceof x.z&&Y.entityManager.isAlive(p)||p instanceof et.CH&&Y.entityManager.isAlive(p)}figuresByIdentifier(p,P=!1){if(p&&p.type){const M=p.type;if("all"==M)return P?this.game.figures.filter(y=>!(y instanceof x.z&&this.characterManager.ignoreNegativeScenarioffects(y))):this.game.figures;if(p.name){const y=p.edition,S=new RegExp("^"+p.name+"$");switch(M){case"monster":return this.game.figures.filter(U=>U instanceof X.Q&&(!y||U.edition==y)&&U.name.match(S)&&(!p.marker||U.entities.some(V=>V.marker==p.marker))&&(!p.tags||0==p.tags.length||U.entities.some(V=>p.tags&&p.tags.every($=>V.tags&&-1!=V.tags.indexOf($)))));case"character":return this.game.figures.filter(U=>!(!(U instanceof x.z)||U.absent||y&&U.edition!=y||!U.name.match(S)||!(!p.tags||0==p.tags.length||p.tags&&p.tags.every(V=>U.tags&&-1!=U.tags.indexOf(V)))||P&&this.characterManager.ignoreNegativeScenarioffects(U)));case"objective":return this.game.figures.filter(U=>U instanceof et.CH&&U.name.match(S)&&("escort"!=y||U.escort)&&(!p.marker||U.marker==p.marker)&&(!p.tags||0==p.tags.length||p.tags.every(V=>U.tags&&-1!=U.tags.indexOf(V)))||U instanceof ue.k&&U.name.match(S)&&("escort"!=y||U.escort)&&(!p.marker||U.entities.some(V=>V.marker==p.marker))&&(!p.tags||0==p.tags.length||U.entities.some(V=>p.tags&&p.tags.every($=>V.tags&&-1!=V.tags.indexOf($)))))}}}return[]}entitiesByIdentifier(p,P){return this.figuresByIdentifier(p,P).map(y=>y instanceof X.Q||y instanceof ue.k?y.entities:y instanceof x.z||y instanceof et.CH?y:void 0).flat().filter(y=>null!=y).map(y=>y).filter(y=>!p||(!p.marker||!(y instanceof Ie.g)||y.marker==p.marker)&&(!p.tags||0==p.tags.length||p.tags.every(S=>-1!=y.tags.indexOf(S))))}getMonsterData(p,P){let M=this.monstersData().find(y=>y.name==p&&y.edition==P);return M||(M=this.monstersData().find(y=>y.name==p),M||(M=new it.A,M.errors=M.errors||[],M.name=p,M.edition=P,M.errors.find(y=>y.type==K.r.unknown)||(console.error("unknown monster '"+p+"' for edition '"+P+"'"),M.errors.push(new K.o(K.r.unknown,"monster",p,P)))),M)}prosperityLevel(){let p=1;return(this.fhRules()?at.K8:at.Zd).forEach(M=>{this.game.party.prosperity>M&&p++}),p}fhRules(){return this.editionRules("fh")}editionRules(p,P=!0){const M=P?this.currentEdition():this.game.edition;return M&&(M==p||-1!=this.editionExtensions(M).indexOf(p))||!1}additionalIdentifier(p,P=void 0){return p instanceof x.z?new St.VY(p.name,p.edition,"character",void 0,p.tags):p instanceof et.CH?new St.VY(p.name,p.escort?"escort":"objective","objective",p.marker,p.tags):p instanceof X.Q&&P instanceof Ie.g?new St.VY(p.name,p.edition,"monster",P.marker,P.tags):p instanceof ue.k&&P instanceof We.W?new St.VY(p.name,p.escort?"escort":"objective","objective",P.marker,P.tags):new St.VY(p.name,p.edition,void 0,void 0,P&&P.tags||[])}entityCounter(p){return this.entityCounters(p)[0]||void 0}entityCounters(p){const P=new RegExp("^"+p.name+"$");return this.game.entitiesCounter.filter(M=>(!p.type||p.type==M.identifier.type)&&M.identifier.name.match(P)&&(!p.edition||p.edition==M.identifier.edition)&&(!p.marker||p.marker==M.identifier.marker)&&(!p.tags||0==p.tags.length||p.tags.every(y=>M.identifier.tags&&-1!=M.identifier.tags.indexOf(y))))}addEntityCount(p,P=void 0){const M=this.additionalIdentifier(p,P);let y=this.entityCounter(M);y||(y={identifier:M,total:0,killed:0},this.game.entitiesCounter.push(y)),y.total++}checkEntitiesKilled(){this.game.figures.forEach(p=>{p instanceof x.z||p instanceof et.CH?this.entityCounter(this.additionalIdentifier(p))||this.addEntityCount(p):(p instanceof X.Q||p instanceof ue.k)&&p.entities.forEach(P=>{this.entityManager.isAlive(P)&&!this.entityCounter(this.additionalIdentifier(p,P))&&this.addEntityCount(p,P)})}),this.game.entitiesCounter.forEach(p=>{let P=this.figuresByIdentifier(p.identifier);if(0==P.length&&p.total>p.killed)p.killed=p.total;else if(P.every(M=>M instanceof x.z||M instanceof et.CH))P=P.filter(M=>(M instanceof x.z||M instanceof et.CH)&&this.entityManager.isAlive(M)),P.length+p.killedp.total&&(console.warn("More killed then figures counted",p.identifier,"total: "+p.total,"killed: "+p.killed,"current: "+P.length),p.total=P.length+p.killed);else if(P.every(M=>M instanceof X.Q)){const M=P.map(y=>this.monsterManager.monsterEntityCountIdentifier(y,p.identifier)).reduce((y,S)=>y+S);M+p.killedp.total&&(console.warn("More killed then figures counted",p.identifier,"total: "+p.total,"killed: "+p.killed,"current: "+M),p.total=M+p.killed)}else if(P.every(M=>M instanceof ue.k)){const M=P.map(y=>this.objectiveManager.objectiveEntityCountIdentifier(y,p.identifier)).reduce((y,S)=>y+S);M+p.killedp.total&&(console.warn("More killed then figures counted",p.identifier,"total: "+p.total,"killed: "+p.killed,"current: "+M),p.total=M+p.killed)}})}nextElementState(p,P=!1,M=!1){if(Y.game.state==dt.D2.draw||M){if(p.state==Et.fq.new&&!P)return Et.fq.strong;if(p.state!=Et.fq.new&&p.state!=Et.fq.strong)return p.state==Et.fq.waning?Et.fq.inert:P?Et.fq.waning:Et.fq.new;if(!P)return Et.fq.waning}else{if(p.state==Et.fq.new&&!P)return Et.fq.strong;if(p.state==Et.fq.strong){if(P)return Et.fq.waning}else{if(p.state!=Et.fq.waning)return P?Et.fq.waning:Et.fq.new;if(P)return Et.fq.new}}return Et.fq.inert}campaignData(){const p=this.editionData.find(P=>P.edition==this.currentEdition());return p&&p.campaign?p.campaign:new at.Bj}changeParty(p){Q.r.settings.automaticTheme&&("fh"!=this.game.edition&&"fh"==p.edition?Q.r.setFhStyle(!0):"fh"==this.game.edition&&"fh"!=p.edition&&Q.r.setFhStyle(!1)),this.game.party.characters=this.game.figures.filter(P=>P instanceof x.z).map(P=>P.toModel()),this.game.party.edition=this.game.edition,this.game.party.conditions=this.game.conditions,this.game.party.battleGoalEditions=this.game.battleGoalEditions,this.game.party.filteredBattleGoals=this.game.filteredBattleGoals,this.game.party.unlockedCharacters=this.game.unlockedCharacters,this.game.party.level=this.game.level,this.game.party.levelCalculation=this.game.levelCalculation,this.game.party.levelAdjustment=this.game.levelAdjustment,this.game.party.bonusAdjustment=this.game.bonusAdjustment,this.game.party.ge5Player=this.game.ge5Player,this.game.party.playerCount=this.game.playerCount,this.game.party.solo=this.game.solo,this.game.party.lootDeckEnhancements=this.game.lootDeckEnhancements,this.game.party.lootDeckFixed=this.game.lootDeckFixed,this.game.party.lootDeckSections=this.game.lootDeckSections,this.game.party=p,this.game.edition=this.game.party.edition,this.game.conditions=this.game.party.conditions||[],this.game.battleGoalEditions=this.game.party.battleGoalEditions||[],this.game.filteredBattleGoals=this.game.party.filteredBattleGoals||[],this.game.unlockedCharacters=this.game.party.unlockedCharacters||[],this.game.level=this.game.party.level||this.game.level,this.game.levelCalculation=0!=this.game.party.levelCalculation&&(this.game.party.levelCalculation||this.game.levelCalculation),this.game.levelAdjustment=this.game.party.levelAdjustment||this.game.levelAdjustment,this.game.bonusAdjustment=this.game.party.bonusAdjustment||this.game.bonusAdjustment,this.game.ge5Player=0!=this.game.party.ge5Player&&(this.game.party.ge5Player||this.game.ge5Player),this.game.playerCount=this.game.party.playerCount||this.game.playerCount,this.game.solo=0!=this.game.party.solo&&(this.game.party.solo||this.game.solo),this.game.lootDeckEnhancements=this.game.party.lootDeckEnhancements||[],this.game.lootDeckFixed=this.game.party.lootDeckFixed||[],this.game.lootDeckSections=this.game.party.lootDeckSections||[],this.game.figures=this.game.figures.filter(P=>!(P instanceof x.z)),this.scenarioManager.setScenario(void 0),p.characters.forEach(P=>{let M=new x.z(this.getCharacterData(P.name,P.edition),P.level);M.fromModel(P),this.game.figures.push(M)})}}},1240:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>MonsterManager});var _home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(1180),_model_Game__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6565),_model_Monster__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(7177),_GameManager__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5604),_model_data_MonsterType__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4377),_model_data_MonsterStat__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(9144),_model_MonsterEntity__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4968),_model_data_MonsterData__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(7866),_model_Summon__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(8272),_SettingsManager__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(731),src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(377),_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(9310),_model_Entity__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(3157),src_app_ui_helper_Static__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(8927),src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(7227);class MonsterManager{constructor(q){(0,_home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_13__.Z)(this,"game",void 0),this.game=q}monsterThumbnail(q){if(q.thumbnailUrl)return q.thumbnailUrl;if(!q.thumbnail&&q.standeeShare){const nt=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(q.standeeShareEdition||q.edition).find(E=>E.name==q.standeeShare);nt&&(this.monsterThumbnail(nt),nt.thumbnail&&(q.thumbnail=nt.thumbnail))}return q.thumbnail||(q.thumbnail=q.edition+"-"+q.name),"./assets/images/monster/thumbnail/"+q.thumbnail+".png"}monsterArtwork(q){return q.noArtwork?this.monsterThumbnail(q):(this.monsterThumbnail(q),"./assets/artwork/monster/"+q.thumbnail+".png")}getStat(q,nt){return q.stats.find(t=>t.level==q.level&&t.type==nt)||(q.errors=q.errors||[],!q.errors.find(t=>t.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.unknown)&&!q.errors.find(t=>t.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.stat)&&(console.error("Could not find '"+nt+"' stats for monster: "+q.name+" level: "+q.level),q.errors.push(new src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.o(src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.stat,"monster",q.name,q.edition,nt,""+q.level))),new _model_data_MonsterStat__WEBPACK_IMPORTED_MODULE_14__.c(nt,q.level,0,0,0,0))}getSpawnMonsters(q){let nt=[];return q.forEach(E=>{this.getMonsterSpawns(E).forEach(t=>{-1==nt.indexOf(t)&&nt.push(t)})}),nt}getMonsterSpawns(q){let nt=[];const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(new _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q(q));return E&&E.abilities&&E.abilities.forEach(t=>{t.actions.forEach(x=>{this.getActionSpawns(x,q.edition).forEach(tt=>{-1==nt.indexOf(tt)&&nt.push(tt)})})}),q.baseStat.special&&q.baseStat.special.forEach(t=>{t.forEach(x=>{this.getActionSpawns(x,q.edition).forEach(tt=>{-1==nt.indexOf(tt)&&nt.push(tt)})})}),q.stats.forEach(t=>{t.special&&t.special.forEach(x=>{x.forEach(G=>{this.getActionSpawns(G,q.edition).forEach(at=>{-1==nt.indexOf(at)&&nt.push(at)})})})}),nt}getActionSpawns(q,nt){if(q.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.summon||q.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.spawn)if("summonData"!=q.value&&"monsterStandee"!=q.value){const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(nt).find(t=>t.name==(""+q.value).split(":")[0]);if(E)return[E]}else if("monsterStandee"==q.value&&q.valueObject){let E=[];return q.valueObject.forEach(t=>{const x=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(nt).find(G=>G.name==t.monster.name);x&&E.push(x)}),E}return q.subActions?q.subActions.map(E=>this.getActionSpawns(E,nt)).flat():[]}addMonsterByName(name,edition){let level=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.level;-1!=name.indexOf(":")&&(level=eval(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.level+name.split(":")[1]),level<0?level=0:level>7&&(level=7),name=name.split(":")[0]);let monsterData=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData().find(q=>q.name==name&&(q.edition==edition||-1!=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.editionExtensions(edition).indexOf(q.edition)));if(monsterData||(console.warn("Monster not found: '"+name+"' for edition :"+edition),monsterData=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData().find(q=>q.name==name),monsterData&&(monsterData.errors=monsterData.errors||[],monsterData.errors.find(q=>q.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterEdition)||monsterData.errors.push(new src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.o(src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterEdition,"monster",monsterData.name,edition,monsterData.edition)))),monsterData)return this.addMonster(monsterData,level);console.error("Monster not found: '"+name+"'")}addMonster(q,nt){this.game.scenario||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.scenarioManager.setScenario(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.scenarioManager.createScenario());let E=this.game.figures.find(t=>t instanceof _model_data_MonsterData__WEBPACK_IMPORTED_MODULE_5__.A&&t.name==q.name&&t.edition==q.edition);return E?nt!=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.level&&E.level!=nt&&this.setLevel(E,nt):(E=new _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q(q),this.setLevel(E,nt),E.off=!0,this.resetMonsterAbilities(E),this.game.figures.push(E)),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.sortFigures(E),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.uiChange.emit(),E}resetMonsterAbilities(q){if(!this.applySameDeck(q)){if(!q.abilities||0==q.abilities.length){const nt=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q);q.abilities=nt.filter(E=>isNaN(+E.level)||+E.level<=(q&&q.level||0)).map(E=>nt.indexOf(E))}this.shuffleAbilities(q)}}removeMonster(q){q.entities=[],this.game.figures.splice(this.game.figures.indexOf(q),1),q.drawExtra||this.game.figures.forEach(nt=>{nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&nt.drawExtra&&(nt.name!=q.name||nt.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&(this.getSameDeckMonster(nt)||(nt.drawExtra=!1))})}monsterEntityCount(q,nt=!1,E=void 0){return q.entities.filter(t=>(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(t,nt)||t.dormant)&&(!nt||t.number>0)&&(!E||t.type==E)).length}monsterEntityCountIdentifier(q,nt){return"all"!=nt.type&&(nt.name!=q.name||nt.edition!=q.edition)||"monster"!=nt.type?0:q.entities.filter(E=>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)&&(!nt.marker||nt.marker==E.marker)&&(!nt.tags||0==nt.tags.length||nt.tags.every(t=>-1!=E.tags.indexOf(t)))).length}monsterEntityCountAll(q){return _GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.entities(q).length}monsterStandeeShared(q,nt){return-1==nt.indexOf(q)&&nt.push(q),q.standeeShare&&this.game.figures.filter(x=>x instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&q.standeeShare&&x.name==q.standeeShare&&x.edition==(q.standeeShareEdition||q.edition)).map(x=>x).forEach(x=>{-1==nt.indexOf(x)&&(nt.push(x),this.monsterStandeeShared(x,nt))}),this.game.figures.filter(t=>t instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&t.standeeShare&&q.name==t.standeeShare&&q.edition==(t.standeeShareEdition||t.edition)).map(t=>t).forEach(t=>{-1==nt.indexOf(t)&&(nt.push(t),this.monsterStandeeShared(t,nt))}),nt}monsterStandeeUsed(q,nt){return this.monsterStandeeShared(q,[]).map(E=>E.entities).flat().find(E=>(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)||E.dormant)&&E.number==nt)}monsterStandeeCount(q,nt=!0){return this.monsterStandeeShared(q,[]).map(E=>E.entities).flat().filter(E=>(_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)||E.dormant)&&(nt||E.number>0)).length}monsterStandeeMax(q){let nt=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(q.standeeCount||q.count,q.level);if(q.standeeShare){const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monstersData(q.standeeShareEdition||q.edition).find(t=>t.name==q.standeeShare);E&&(nt=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(E.standeeCount||E.count,q.level))}return nt}addMonsterEntity(q,nt,E,t=!1){if(!q.stats.some(G=>G.type==E))return q.errors=q.errors||[],void(!q.errors.find(G=>G.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.unknown)&&!q.errors.find(G=>G.type==src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterType)&&(console.error("Missing type '"+E+"' for "+q.name),q.errors.push(new src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.o(src_app_game_model_data_FigureError__WEBPACK_IMPORTED_MODULE_8__.r.monsterType,"monster",q.name,q.edition,E))));let x=new _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_4__.g(nt,E,q);if(q.entities=q.entities.filter(G=>G.number!=nt),q.entities.push(x),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.addEntityCount(q,x),t&&(x.summon=_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new),!t||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.fhRules()){if(this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&(-1==q.ability?this.applySameDeck(q)?-1==q.ability&&(q.ability=0,q.lastDraw=this.game.round):(q.ability=0,q.lastDraw=this.game.round):1==q.entities.length&&!this.applySameDeck(q)&&q.lastDrawG instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(G.name!=q.name||G.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(G).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(G).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&G.drawExtra&&G.ability>-1).length,q.lastDraw=this.game.round,q.ability>=q.abilities.length&&this.shuffleAbilities(q))),this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&1==this.monsterEntityCount(q)){let G=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.indexOf(q);const tt=this.getSameDeckMonster(q);for(tt&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.gameplayFigure(tt)&&this.applySameDeck(q);_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.some((at,it)=>!at.off&&itq.getInitiative()||at.getInitiative()==q.getInitiative()&&at instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&at.name.toLowerCase()>q.name.toLowerCase()));)_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.splice(G,1),G--,_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.splice(G,0,q)}!t&&q.off?q.off=!1:t&&q.entities.every(G=>!_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(G)||G.summon==_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new)&&(q.off=!0),this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&x.summon!=_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new&&(x.active=q.active||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.some((G,tt,at)=>G.active&&tt>at.indexOf(q)))}return x}spawnMonsterEntity(q,nt,E=!1,t=!1,x=!1,G=!1){q.isAlly=E,q.isAllied=t,q.drawExtra=x;const tt=this.monsterStandeeMax(q);if(_SettingsManager__WEBPACK_IMPORTED_MODULE_7__.r.settings.automaticStandees&&this.monsterStandeeCount(q)!_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)&&!E.dormant))&&(!q.off&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&q.active?_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.roundManager.toggleFigure(q):q.off=!0)}setLevel(q,nt){const E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q);q.abilities.length!=E.filter(t=>!t.level||isNaN(+t.level)||(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(t.level)<=nt).length&&(q.abilities=E.filter(t=>!t.level||isNaN(+t.level)||(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(t.level)<=nt).map((t,x)=>x),this.shuffleAbilities(q)),q.level=nt,q.entities.forEach(t=>{let G,x=this.getStat(q,t.type);t.level=q.level,G="number"==typeof x.health?x.health:(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(x.health),t.health==t.maxHealth&&(t.health=G),t.maxHealth=G,t.health>t.maxHealth&&(t.health=t.maxHealth)})}toggleActive(q,nt){this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&(q.active?(nt.active=!nt.active,q.entities.every(E=>E.dead||E.health<=0||!E.active)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.roundManager.toggleFigure(q)):nt.active?(nt.active=!1,q.entities.every(E=>E.dead||E.health<=0||!E.active||E.summon==_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new)&&(q.off=!0)):(q.off=!1,nt.active=!0),nt.active?(nt.off=!1,!q.active&&this.game.figures.every(E=>!E.active)&&(q.active=!0)):nt.off=!0)}getSameDeckMonster(q){return this.game.figures.find(nt=>nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(nt.name!=q.name||nt.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&!nt.drawExtra)}applySameDeck(q){const nt=this.getSameDeckMonster(q);return!!nt&&(q.abilities=JSON.parse(JSON.stringify(nt.abilities)),q.ability=nt.ability,q.lastDraw=this.game.round,q.drawExtra&&this.drawExtra(q),!0)}drawExtra(q){if(q.drawExtra){q.ability=-1;const nt=this.getSameDeckMonster(q);if(!nt)return console.error("Draw extra for '"+q.name+"' ("+q.deck+" not possible, not same deck monster found!"),void(q.drawExtra=!1);q.ability=nt.ability+1+this.game.figures.filter(E=>E instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(E.name!=q.name||E.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(E).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(E).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&E.drawExtra&&E.ability>nt.ability).length,q.ability>=q.abilities.length&&this.shuffleAbilities(q),q.lastDraw=this.game.round}else this.applySameDeck(q)}next(){this.game.figures.forEach(q=>{if(q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q){const nt=this.getAbility(q);nt&&(nt.shuffle||q.ability>=q.abilities.length)&&this.shuffleAbilities(q),q.entities=q.entities.filter(E=>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(E)||E.dormant),q.entities.forEach(E=>{if(E.tags){let t=E.tags.find(x=>x.startsWith("roundAction-"));for(;t;)E.tags.splice(E.tags.indexOf(t),1),t=E.tags.find(x=>x.startsWith("roundAction-"))}E.summon==_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.new&&(E.summon=_model_Summon__WEBPACK_IMPORTED_MODULE_6__.HY.true),E.entityConditions.forEach(t=>{-1!=t.types.indexOf(_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__.CP.expire)&&t.state==_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__.tT.normal&&(t.lastState=t.state,t.state=_model_data_Condition__WEBPACK_IMPORTED_MODULE_9__.tT.expire)})}),q.off=0==q.entities.length}})}draw(){this.game.figures.filter(q=>q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&!q.drawExtra).forEach(q=>{q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.gameplayFigure(q)&&(q.ability=q.ability+1+this.game.figures.filter(nt=>nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(nt.name!=q.name||nt.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(nt).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&nt.drawExtra&&nt.ability>-1).length,q.lastDraw=this.game.round,this.hasBottomActions(q)&&(q.ability+=1),q.ability>=q.abilities.length&&this.shuffleAbilities(q))}),this.game.figures.filter(q=>q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&q.drawExtra).forEach(q=>{q instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(this.drawExtra(q),q.ability>=q.abilities.length&&this.shuffleAbilities(q))})}shuffleAbilities(q){if(q.ability=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.draw||0==q.entities.length?-1:0,q.drawExtra){const nt=this.getSameDeckMonster(q);return nt?void this.shuffleAbilities(nt):(console.error("Shuffle for '"+q.name+"' ("+q.deck+" not possible, not same deck monster found!"),q.drawExtra=!1,void this.shuffleAbilities(q))}(0,src_app_ui_helper_Static__WEBPACK_IMPORTED_MODULE_11__.wE)(q.abilities),this.game.figures.filter(nt=>nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&this.getSameDeckMonster(nt)&&this.getSameDeckMonster(nt)==q).map(nt=>nt).forEach(nt=>{nt.abilities=JSON.parse(JSON.stringify(q.abilities)),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.draw?nt.ability=-1:(nt.ability=q.ability,nt.drawExtra&&this.drawExtra(nt))})}drawAbility(q){if(q.drawExtra){const nt=this.getSameDeckMonster(q);return nt?void this.drawAbility(nt):(console.error("Draw for '"+q.name+"' ("+q.deck+" not possible, not same deck monster found!"),q.drawExtra=!1,void this.drawAbility(q))}q.ability+=1,this.hasBottomActions(q)&&(q.ability+=1),this.game.figures.forEach(nt=>{nt instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&this.getSameDeckMonster(nt)&&(nt.ability=q.ability,nt.drawExtra&&this.drawExtra(nt))})}drawnAbilities(q){let nt=0;q.ability>=0&&(nt=q.ability+1);let E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.find(t=>t instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(t.name!=q.name||t.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&t.ability>=nt);for(;E instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q;)nt=E.ability+1,E=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.find(t=>t instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_1__.Q&&(t.name!=q.name||t.edition!=q.edition)&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).name==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).name&&_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(t).edition==_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.deckData(q).edition&&t.ability>=nt);return nt}getAbility(q){if(q.ability<0||q.ability>=q.abilities.length||!_SettingsManager__WEBPACK_IMPORTED_MODULE_7__.r.settings.abilities)return;const nt=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q);return nt?nt[q.abilities[q.ability]]:void 0}hasBottomActions(q){return _GameManager__WEBPACK_IMPORTED_MODULE_2__.v.abilities(q).every(nt=>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.hasBottomAbility(nt))}calcActionHints(q,nt){let E=[];const t=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monsterManager.getStat(q,nt.type);if(this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield,t.actions,E),this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.retaliate,t.actions,E),_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.entityManager.isAlive(nt,!0)&&(!nt.active||q.active)){const x=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.find(G=>G.active);if(q.active||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_0__.D2.next&&(!x||_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.indexOf(x)>_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.game.figures.indexOf(q))){let G=_GameManager__WEBPACK_IMPORTED_MODULE_2__.v.monsterManager.getAbility(q);G&&(this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield,G.actions,E),this.calcActionHint(q,nt,src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.retaliate,G.actions,E))}}return E.sort((x,G)=>x.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield&&G.type!=src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield?-1:G.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield&&x.type!=src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.shield?1:x.range-G.range)}calcActionHint(q,nt,E,t,x,G=0){t.forEach((tt,at)=>{if(tt.type==E){let it={type:E,value:(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(tt.value),range:0};if(tt.subActions&&tt.subActions.length>0){let dt=tt.subActions.find(X=>X.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.range&&(!X.valueType||X.valueType==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.EF.fixed));dt&&(it.range=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_10__.j9)(dt.value))}let K=x.find(dt=>dt.type==it.type&&dt.range==it.range);K?K.value+=it.value:x.push(it)}else(tt.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.monsterType&&tt.value==nt.type||tt.type==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.Us.element&&tt.valueType==src_app_game_model_data_Action__WEBPACK_IMPORTED_MODULE_12__.EF.minus&&q.entities.find(it=>it.tags.find(K=>K=="roundAction-element-consume-"+at+"-"+G+"-"+tt.value)))&&this.calcActionHint(q,nt,E,tt.subActions,x,at)})}}},6417:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>ScenarioRulesManager});var _home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1180),_model_Character__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5609),_model_data_Condition__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9310),_model_Entity__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3157),_model_Game__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(6565),_model_Monster__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(7177),_model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(4968),_model_Objective__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(9120),_model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(5601),_GameManager__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(5604),_SettingsManager__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(731);class ScenarioRulesManager{constructor(q){(0,_home_runner_work_gloomhavensecretariat_gloomhavensecretariat_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__.Z)(this,"game",void 0),this.game=q}addScenarioRules(q=!1){this.game.scenarioRules=[];const nt=this.game.scenario;nt&&nt.rules&&nt.rules.forEach((E,t)=>{this.addScenarioRule(nt,E,t,!1,q)}),this.game.sections&&this.game.sections.forEach(E=>{E.rules&&E.rules.forEach((t,x)=>{this.addScenarioRule(E,t,x,!0,q)})}),this.filterDisabledScenarioRules()}addScenarioRulesAlways(){const q=this.game.scenario;q&&q.rules&&q.rules.filter(nt=>nt.always).forEach(nt=>{this.addScenarioRule(q,nt,q.rules.indexOf(nt),!1)}),this.game.sections&&this.game.sections.forEach(nt=>{nt.rules&&nt.rules.filter(E=>E.always).forEach(E=>{this.addScenarioRule(nt,E,nt.rules.indexOf(E),!0)})}),this.filterDisabledScenarioRules()}filterDisabledScenarioRules(){this.game.scenarioRules=this.game.scenarioRules.filter((q,nt,E)=>!E.find(t=>t.rule.disableRules&&t.rule.disableRules.some(x=>x.edition==q.identifier.edition&&x.group==q.identifier.group&&(x.index==q.identifier.index||-1==x.index)&&x.scenario==q.identifier.scenario&&x.section==q.identifier.section)))}addScenarioRule(scenarioData,rule,index,section,initial=!1){const identifier={edition:scenarioData.edition,scenario:scenarioData.index,group:scenarioData.group,index,section};let round=rule.round||"false",add=!1;for(;-1!=round.indexOf("R");)round=round.replace("R",""+(rule.start?this.game.round+1:this.game.round));for(;-1!=round.indexOf("C");)round=round.replace("C",""+_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.characterManager.characterCount());try{add=eval(round)&&(rule.always||this.game.state==_model_Game__WEBPACK_IMPORTED_MODULE_3__.D2.next||rule.start&&initial)}catch(q){console.warn("Cannot apply scenario rule: '"+rule.round+"'","index: "+index,q),add=!1}if(add&&(rule.figures&&rule.figures.filter(q=>"present"==q.type||"dead"==q.type).length>0&&rule.figures.filter(q=>"present"==q.type||"dead"==q.type).forEach(q=>{const nt=this.entitiesByFigureRule(q,rule).filter(t=>(_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(t)||t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g&&t.dormant)&&(!(t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g)||!q.identifier?.marker||t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g&&q.identifier&&t.marker==q.identifier.marker&&(!q.identifier.tags||0==q.identifier.tags.length||t instanceof _model_MonsterEntity__WEBPACK_IMPORTED_MODULE_5__.g&&q.identifier.tags.forEach(x=>-1!=t.tags.indexOf(x))))),E=q.value?(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(q.value.split(":")[0]):"present"==q.type?1:0;add=add&&E>=0&&("present"==q.type?nt.length>=E:nt.length<=E),q.identifier&&(q.identifier.marker||q.identifier.tags&&q.identifier.tags.length>0)&&!_SettingsManager__WEBPACK_IMPORTED_MODULE_9__.r.settings.automaticStandees&&(add=!1)}),add&&rule.figures&&rule.figures.filter(q=>"killed"==q.type).length>0&&rule.figures.filter(q=>"killed"==q.type).forEach(q=>{if(q.identifier){const nt=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityCounters(q.identifier);if(add=add&&nt.length>0,add)if("all"==q.value)nt.forEach(E=>{add=add&&E&&E.total>0&&E.killed>=E.total||!1});else{const E=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(q.value||0);let t=0;nt.forEach(x=>{t+=x.killed}),add=add&&t>0&&t>=E||!1}}else add=!1}),rule.requiredRooms&&rule.requiredRooms.length>0&&rule.requiredRooms.forEach(q=>{add=add&&null!=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario&&-1!=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario.revealedRooms.indexOf(q)}),rule.requiredRules&&rule.requiredRules.length>0&&rule.requiredRules.forEach(q=>{add=add&&this.game.disgardedScenarioRules.some(nt=>q.edition==nt.edition&&q.scenario==nt.scenario&&q.group==nt.group&&q.index==nt.index&&q.section==nt.section)}),rule.rooms&&rule.rooms.every(q=>_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario&&-1!=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.scenario.revealedRooms.indexOf(q))&&(add=!1),rule.treasures)){let q=_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.game.figures.filter(nt=>nt instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z).map(nt=>nt.treasures.map(E=>"number"==typeof E?E:"G")).flat();if(("number"==typeof rule.treasures||"string"==typeof rule.treasures)&&q.length<(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(rule.treasures))add=!1;else if("number"!=typeof rule.treasures&&"string"!=typeof rule.treasures){let nt=0;rule.treasures.forEach(E=>{const t=q.indexOf(E);-1!=t&&(q.splice(t,1),nt++)}),ntq.edition==identifier.edition&&q.scenario==identifier.scenario&&q.group==identifier.group&&q.index==identifier.index&&q.section==identifier.section),visible=this.game.scenarioRules.find(q=>q.identifier.edition==identifier.edition&&q.identifier.scenario==identifier.scenario&&q.identifier.group==identifier.group&&q.identifier.index==identifier.index&&q.identifier.section==identifier.section);!add||disgarded||visible?!add&&rule.always&&(this.game.scenarioRules=this.game.scenarioRules.filter(q=>q.identifier.edition!=identifier.edition||q.identifier.group!=identifier.group||q.identifier.index!=identifier.index||q.identifier.scenario!=identifier.scenario||q.identifier.section!=identifier.section)):(rule.spawns&&rule.spawns.forEach(q=>{q.manual&&!q.count&&0!=q.count&&(q.count=1)}),rule.objectiveSpawns&&rule.objectiveSpawns.forEach(q=>{q.manual&&!q.count&&0!=q.count&&(q.count=1)}),this.game.scenarioRules.push({identifier,rule}))}getScenarioForRule(q){if(q.section){const nt=this.game.sections.find(E=>E.edition==q.edition&&E.group==q.group&&E.index==q.scenario&&E.rules&&E.rules.length>q.index);if(nt)return{scenario:nt,section:!0}}else if(this.game.scenario&&this.game.scenario.edition==q.edition&&this.game.scenario.group==q.group&&this.game.scenario.index==q.scenario&&this.game.scenario.rules&&this.game.scenario.rules.length>q.index)return{scenario:this.game.scenario,section:!1};return{scenario:void 0,section:!1}}figuresByFigureRule(figureRule,rule){const ref=figureRule.identifierRef;return"number"==typeof ref?ref>=0&&ref{if(figureRule.identifier&&figureRule.identifier.health){if(figure instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z||figure instanceof _model_Objective__WEBPACK_IMPORTED_MODULE_6__.CH){const q=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figureRule.identifier.health.replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figure.maxHealth)));return figure.health<=q}if(figure instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_4__.Q||figure instanceof _model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__.k)return figure.entities.some(q=>{if(figureRule.identifier&&figureRule.identifier.health&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(q)){const nt=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figureRule.identifier.health.replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(q.maxHealth)));return q.health<=nt}return!1})}if(figureRule.identifier&&figureRule.identifier.hp){if(figure instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z||figure instanceof _model_Objective__WEBPACK_IMPORTED_MODULE_6__.CH)return eval(figureRule.identifier.hp.replaceAll("HP",""+figure.health).replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figure.maxHealth)));if(figure instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_4__.Q||figure instanceof _model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__.k)return figure.entities.some(entity=>!!(figureRule.identifier&&figureRule.identifier.hp&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(entity))&&eval(figureRule.identifier.hp.replaceAll("HP",""+entity.health).replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(entity.maxHealth))))}if(figureRule.identifier&&figureRule.identifier.conditions){if(figure instanceof _model_Character__WEBPACK_IMPORTED_MODULE_0__.z||figure instanceof _model_Objective__WEBPACK_IMPORTED_MODULE_6__.CH)return figureRule.identifier.conditions.every(q=>q.startsWith("!")&&!_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(figure,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q.substring(1)))||!q.startsWith("!")&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(figure,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q)));if(figure instanceof _model_Monster__WEBPACK_IMPORTED_MODULE_4__.Q||figure instanceof _model_ObjectiveContainer__WEBPACK_IMPORTED_MODULE_7__.k)return figure.entities.some(q=>!!(figureRule.identifier&&figureRule.identifier.health&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(q))&&figureRule.identifier.conditions&&figureRule.identifier.conditions.every(nt=>nt.startsWith("!")&&!_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(q,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(nt.substring(1)))||!nt.startsWith("!")&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(q,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(nt))))}return!1}):_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.figuresByIdentifier(figureRule.identifier,figureRule.scenarioEffect)}entitiesByFigureRule(figureRule,rule){const ref=figureRule.identifierRef;return"number"==typeof ref?ref>=0&&ref{if(figureRule.identifier&&figureRule.identifier.health&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(entity)){const q=(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(figureRule.identifier.health.replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(entity.maxHealth)));return entity.health<=q}return figureRule.identifier&&figureRule.identifier.hp&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.isAlive(entity)?eval(figureRule.identifier.hp.replaceAll("HP",""+entity.health).replaceAll("H",""+(0,_model_Entity__WEBPACK_IMPORTED_MODULE_2__.j9)(entity.maxHealth))):!(!figureRule.identifier||!figureRule.identifier.conditions)&&figureRule.identifier.conditions&&figureRule.identifier.conditions.every(q=>q.startsWith("!")&&!_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(entity,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q.substring(1)))||!q.startsWith("!")&&_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entityManager.hasCondition(entity,new _model_data_Condition__WEBPACK_IMPORTED_MODULE_1__.gP(q)))}):_GameManager__WEBPACK_IMPORTED_MODULE_8__.v.entitiesByIdentifier(figureRule.identifier,figureRule.scenarioEffect)}}},731:(q,nt,E)=>{"use strict";E.d(nt,{r:()=>st});var t=E(5861),x=E(1180),G=E(3329),tt=E(5604),at=E(3306),it=E(3281),K=E(3157);const X=new class dt{checkDuplicates(){tt.v.charactersData().forEach((I,Q,lt)=>{lt.find(_t=>!I.replace&&!_t.replace&<.indexOf(_t)!=lt.indexOf(I)&&I.name==_t.name&&I.edition==_t.edition)&&console.warn("Duplicate Character: "+I.name+" (Edition: "+I.edition+")")}),tt.v.decksData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.name==_t.name&&I.edition==_t.edition)&&console.warn("Duplicate Deck: "+I.name+" (Edition: "+I.edition+")")}),tt.v.scenarioData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.index==_t.index&&I.edition==_t.edition&&I.group==_t.group)&&console.warn("Duplicate Scenario: "+I.index+" (Edition: "+I.edition+")")}),tt.v.sectionData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.index==_t.index&&I.edition==_t.edition&&I.group==_t.group)&&console.warn("Duplicate Section: "+I.index+" (Edition: "+I.edition+")")}),tt.v.itemData().forEach((I,Q,lt)=>{lt.find(_t=>lt.indexOf(_t)!=lt.indexOf(I)&&I.id==_t.id&&I.edition==_t.edition)&&console.warn("Duplicate Item: "+I.id+" (Edition: "+I.edition+")")}),tt.v.monstersData().forEach((I,Q,lt)=>{lt.find(_t=>!I.replace&&!_t.replace&<.indexOf(_t)!=lt.indexOf(I)&&I.name==_t.name&&I.edition==_t.edition)&&console.warn("Duplicate Monster: "+I.name+" (Edition: "+I.edition+")")}),tt.v.battleGoalManager.getBattleGoals(void 0,!0).forEach((I,Q,lt)=>{if(!I.alias){const _t=lt.filter((H,Jt)=>Jt!=Q&&(H.name==I.name||st.getLabel("data.battleGoals."+H.cardId)==st.getLabel("data.battleGoals."+I.cardId)));_t.length>0&&_t.find(H=>!H.alias)&&console.warn("BattleGoal doubles:",I.edition+" - "+I.name,_t.map(H=>H.edition+" - "+H.name))}})}checkScenarioMonster(){tt.v.scenarioData().forEach(I=>{I.monsters&&I.monsters.forEach(Q=>{tt.v.monstersData().find(lt=>(lt.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(lt.edition))&<.name==Q.split(":")[0])||console.warn("Invalid monster: "+Q+" | scenario",I.edition,I.group||"",I.index)}),I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{tt.v.monstersData().find(_t=>(_t.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(_t.edition))&&_t.name==lt.name.split(":")[0])||console.warn("Invalid monster: "+lt.name+" | scenario",I.edition,I.group||"",I.index)})})})}checkSectionMonster(){tt.v.sectionData().forEach(I=>{I.monsters&&I.monsters.forEach(Q=>{tt.v.monstersData().find(lt=>(lt.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(lt.edition))&<.name==Q.split(":")[0])||console.warn("Invalid monster: "+Q+" | section",I.edition,I.group||"",I.index)}),I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{tt.v.monstersData().find(_t=>(_t.edition==I.edition||-1!=tt.v.editionExtensions(I.edition).indexOf(_t.edition))&&_t.name==lt.name.split(":")[0])||console.warn("Invalid monster: "+lt.name+" | section",I.edition,I.group||"",I.index)})})})}checkMissingScenarioMonster(){tt.v.scenarioData().forEach(I=>{I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{(!I.monsters||!I.monsters.find(_t=>_t==lt.name||_t.split(":")[0]==lt.name))&&console.debug("Missing monster '"+lt.name+"' from room '"+Q.roomNumber+"' in monsters",I.edition,I.group||"",I.index)})})})}checkMissingSectionMonster(){tt.v.sectionData().forEach(I=>{I.rooms&&I.rooms.forEach(Q=>{Q.monster&&Q.monster.forEach(lt=>{(!I.monsters||!I.monsters.find(_t=>_t==lt.name||_t.split(":")[0]==lt.name))&&console.debug("Missing monster '"+lt.name+"' from room '"+Q.roomNumber+"' in monsters | section",I.edition,I.group||"",I.index)})})})}checkMonsterUsage(){tt.v.monstersData().forEach(I=>{let Q=!1;tt.v.scenarioData().forEach(lt=>{lt.monsters&<.monsters.some(_t=>_t.split(":")[0]==I.name)&&(Q=!0),!Q&<.rooms&<.rooms.forEach(_t=>{_t.monster&&_t.monster.some(H=>H.name.split(":")[0]==I.name)&&(Q=!0)})}),Q||tt.v.sectionData().forEach(lt=>{lt.monsters&<.monsters.find(_t=>_t.split(":")[0]==I.name)&&(Q=!0),!Q&<.rooms&<.rooms.forEach(_t=>{_t.monster&&_t.monster.some(H=>H.name.split(":")[0]==I.name)&&(Q=!0)})}),Q||console.warn("Could not find usage of '"+I.name+"'",I.edition)})}checkMonsterBossCount(){tt.v.monstersData().forEach(I=>{I.boss&&(0,K.j9)(I.count)>1&&console.warn("Boss count check: "+I.name+" (Edition: "+I.edition+")")})}},st=new class et{constructor(){(0,x.Z)(this,"defaultLocale","en"),(0,x.Z)(this,"defaultEditions",["gh","fh","jotl","fc","cs","toa","solo"]),(0,x.Z)(this,"defaultEditionDataUrls",["./assets/data/gh.json","./assets/data/fh.json","./assets/data/jotl.json","./assets/data/fc.json","./assets/data/cs.json","./assets/data/toa.json","./assets/data/solo.json","./assets/data/fh-crossover.json","./assets/data/gh-envx.json","./assets/data/toa-envv.json","./assets/data/sc.json","./assets/data/sox.json","./assets/data/bas.json","./assets/data/cc.json"]),(0,x.Z)(this,"settings",new G.Z),(0,x.Z)(this,"label",{}),(0,x.Z)(this,"locales",["en","de","fr","ko"]),(0,x.Z)(this,"developent",!1)}init(I){var Q=this;return(0,t.Z)(function*(){yield Q.loadSettings(),Q.developent=I;for(let lt of Q.defaultEditionDataUrls)-1==st.settings.editionDataUrls.indexOf(lt)&&-1==st.settings.excludeEditionDataUrls.indexOf(lt)&&st.settings.editionDataUrls.push(lt);for(let lt of st.settings.editionDataUrls)yield st.loadEditionData(lt)})()}loadSettings(){var I=this;return(0,t.Z)(function*(){let Q=!1;try{let lt=yield at.j.read("settings","default");lt?I.setSettings(Object.assign(new G.Z,lt)):Q=!0}catch{Q=!0}if(Q)try{yield fetch("./ghs-settings-default.json").then(lt=>{if(!lt.ok)throw Error();return lt.json()}).then(lt=>{I.setSettings(Object.assign(new G.Z,lt))})}catch{I.setSettings(new G.Z)}I.updateLocale(I.settings.locale)})()}setSettings(I){if(I.locale!=this.settings.locale&&this.updateLocale(I.locale),this.settings=I,(!this.settings.editions||0==this.settings.editions.length)&&this.settings.editions.push(...this.defaultEditions),!this.settings.editionDataUrls||0==this.settings.editionDataUrls.length)for(let Q of this.defaultEditionDataUrls)-1==this.settings.editionDataUrls.indexOf(Q)&&-1==this.settings.excludeEditionDataUrls.indexOf(Q)&&this.settings.editionDataUrls.push(Q);I.theme||(I.theme=I.fhStyle?"fh":"default"),this.sortSpoilers()}storeSettings(){at.j.write("settings","default",this.settings),this.settings.serverSettings&&tt.v.stateManager.saveSettings(),tt.v.uiChange.emit()}reset(){at.j.remove("settings"),this.loadSettings()}setAbilities(I){this.settings.abilities=I,this.storeSettings()}setAbilityNumbers(I){this.settings.abilityNumbers=I,this.storeSettings()}setAbilityReveal(I){this.settings.abilityReveal=I,this.storeSettings()}setActiveApplyConditions(I){this.settings.activeApplyConditions=I,this.storeSettings()}setActiveApplyConditionsExcludes(I){this.settings.activeApplyConditionsExcludes=I,this.storeSettings()}setActiveStandees(I){this.settings.activeStandees=I,this.storeSettings()}setActiveSummons(I){this.settings.activeSummons=I,this.storeSettings()}setAddAllMonsters(I){this.settings.addAllMonsters=I,this.storeSettings()}setAllyAttackModifierDeck(I){this.settings.allyAttackModifierDeck=I,this.storeSettings()}setAlwaysAllyAttackModifierDeck(I){this.settings.alwaysAllyAttackModifierDeck=I,this.storeSettings()}setAlwaysFhSolo(I){this.settings.alwaysFhSolo=I,this.storeSettings()}setAlwaysHazardousTerrain(I){this.settings.alwaysHazardousTerrain=I,this.storeSettings()}setAlwaysLootApplyDialog(I){this.settings.alwaysLootApplyDialog=I,this.storeSettings()}setAlwaysLootDeck(I){this.settings.alwaysLootDeck=I,this.storeSettings()}setApplyBuildingRewards(I){this.settings.applyBuildingRewards=I,this.storeSettings()}setApplyConditions(I){this.settings.applyConditions=I,this.storeSettings()}setApplyConditionsExcludes(I){this.settings.applyConditionsExcludes=I,this.storeSettings()}setApplyLongRest(I){this.settings.applyLongRest=I,this.storeSettings()}setApplyLoot(I){this.settings.applyLoot=I,this.storeSettings()}setApplyLootRandomItem(I){this.settings.applyLootRandomItem=I,this.storeSettings()}setApplyRetirement(I){this.settings.applyRetirement=I,this.storeSettings()}setAutoBackup(I){this.settings.autoBackup=I,this.storeSettings()}setAutoBackupFinish(I){this.settings.autoBackupFinish=I,this.settings.autoBackupFinish&&this.settings.autoBackup<0?this.settings.autoBackup=0:!this.settings.autoBackupFinish&&0==this.settings.autoBackup&&(this.settings.autoBackup=-1),this.storeSettings()}setAutoBackupUrl(I){this.settings.autoBackupUrl=I,this.settings.autoBackupUrl&&!this.settings.autoBackupUrl.method&&(this.settings.autoBackupUrl.method="POST"),this.storeSettings()}setAutomaticAttackModifierFullscreen(I){this.settings.automaticAttackModifierFullscreen=I,this.storeSettings()}setAutomaticStandees(I){this.settings.automaticStandees=I,this.storeSettings()}setAutomaticStandeesDialog(I){this.settings.automaticStandeesDialog=I,this.storeSettings()}setAutomaticTheme(I){this.settings.automaticTheme=I,this.storeSettings()}setAutomaticUnlocking(I){this.settings.automaticUnlocking=I,this.storeSettings()}setAutoscroll(I){this.settings.autoscroll=I,this.storeSettings()}setBarsize(I){this.settings.barsize=I,this.storeSettings()}setBackupHint(I){this.settings.backupHint=I,this.storeSettings()}setBattleGoals(I){this.settings.battleGoals=I,this.storeSettings()}setBattleGoalsCharacter(I){this.settings.battleGoalsCharacter=I,this.storeSettings()}setBattleGoalsFh(I){this.settings.battleGoalsFh=I,this.storeSettings()}setBrowserNavigation(I){this.settings.browserNavigation=I,this.storeSettings()}setCalculate(I){this.settings.calculate=I,this.storeSettings()}setCalculateStats(I){this.settings.calculateStats=I,this.storeSettings()}setCalculateShieldStats(I){this.settings.calculateShieldStats=I,this.storeSettings()}setCharacterAttackModifierDeck(I){this.settings.characterAttackModifierDeck=I,this.storeSettings()}setCharacterAttackModifierAnimate(I){this.settings.characterAttackModifierAnimate=I,this.storeSettings()}setCharacterAttackModifierDeckPermanent(I){this.settings.characterAttackModifierDeckPermanent=I,this.storeSettings()}setCharacterAttackModifierDeckPermanentActive(I){this.settings.characterAttackModifierDeckPermanentActive=I,this.storeSettings()}setCharacterCompact(I){this.settings.characterCompact=I,this.storeSettings()}setCharacterHandSize(I){this.settings.characterHandSize=I,this.storeSettings()}setCharacterIdentities(I){this.settings.characterIdentities=I,this.storeSettings()}setCharacterIdentityHint(I){this.settings.characterIdentityHint=I,this.storeSettings()}setCharacterItems(I){this.settings.characterItems=I,this.storeSettings()}setCharacterItemsPermanent(I){this.settings.characterItemsPermanent=I,this.storeSettings()}setCharacterItemsPermanentActive(I){this.settings.characterItemsPermanentActive=I,this.storeSettings()}setCharacterSheet(I){this.settings.characterSheet=I,this.storeSettings()}setCharacterSheetCompact(I){this.settings.characterSheetCompact=I,this.storeSettings()}setCharacterTraits(I){this.settings.characterTraits=I,this.storeSettings()}setCombineSummonAction(I){this.settings.combineSummonAction=I,this.storeSettings()}setDebugRightClick(I){this.settings.debugRightClick=I,this.storeSettings()}setDisableAnimations(I){this.settings.disableAnimations=I,this.storeSettings()}setDisableArtwork(I){this.settings.disableArtwork=I,this.storeSettings()}setDisableColumns(I){this.settings.disableColumns=I,this.storeSettings()}setDisableDragFigures(I){this.settings.disableDragFigures=I,this.storeSettings()}setDisablePinchZoom(I){this.settings.disablePinchZoom=I,this.storeSettings()}setDisabledTurnConfirmation(I){this.settings.disabledTurnConfirmation=I,this.storeSettings()}setDisableSortFigures(I){this.settings.disableSortFigures=I,I||tt.v.sortFigures(),this.storeSettings()}setDisableStandees(I){this.settings.disableStandees=I,this.storeSettings()}setStandeeStats(I){this.settings.standeeStats=I,this.storeSettings()}setStatAnimations(I){this.settings.statAnimations=I,this.storeSettings()}setDisableWakeLock(I){var Q=this;return(0,t.Z)(function*(){Q.settings.disableWakeLock=I,I&&tt.v.stateManager.wakeLock?tt.v.stateManager.wakeLock.release().then(()=>{tt.v.stateManager.wakeLock=null}):!I&&!tt.v.stateManager.wakeLock&&"wakeLock"in navigator&&(tt.v.stateManager.wakeLock=yield navigator.wakeLock.request("screen")),Q.storeSettings()})()}setDragValues(I){this.settings.dragValues=I,this.storeSettings()}setEliteFirst(I){this.settings.eliteFirst=I,this.storeSettings()}setExpireConditions(I){this.settings.expireConditions=I,this.storeSettings()}setFhGhItems(I){this.settings.fhGhItems=I,this.storeSettings()}setFhStyle(I){this.settings.fhStyle=I,this.settings.automaticTheme&&(this.settings.fhStyle&&"default"==this.settings.theme?this.settings.theme="fh":!this.settings.fhStyle&&"fh"==this.settings.theme&&(this.settings.theme="default")),this.storeSettings()}setFontsize(I){this.settings.fontsize=I,this.storeSettings()}setFullscreen(I){this.settings.fullscreen=I,this.storeSettings()}setGlobalFontsize(I){this.settings.globalFontsize=I,this.storeSettings()}setHideAbsent(I){this.settings.hideAbsent=I,this.storeSettings()}setHideStats(I){this.settings.hideStats=I,this.storeSettings()}setHints(I){this.settings.hints=I,this.storeSettings()}setInitiativeRequired(I){this.settings.initiativeRequired=I,this.storeSettings()}setInteractiveAbilities(I){this.settings.interactiveAbilities=I,this.storeSettings()}setLocale(I){var Q=this;return(0,t.Z)(function*(){Q.settings.locale=I,yield Q.updateLocale(I),Q.storeSettings()})()}setLootDeck(I){this.settings.lootDeck=I,this.storeSettings()}setMaxUndo(I){this.settings.maxUndo=I,this.storeSettings()}setMonsters(I){this.settings.monsters=I,this.storeSettings()}setMoveElements(I){this.settings.moveElements=I,this.storeSettings()}setPartySheet(I){this.settings.partySheet=I,this.storeSettings()}setPortraitMode(I){this.settings.portraitMode=I,this.storeSettings()}setPressDoubleClick(I){this.settings.pressDoubleClick=I,this.storeSettings()}setRandomStandees(I){this.settings.randomStandees=I,this.storeSettings()}setScenarioNumberInput(I){this.settings.scenarioNumberInput=I,this.storeSettings()}setScenarioRooms(I){this.settings.scenarioRooms=I,this.storeSettings()}setScenarioRules(I){this.settings.scenarioRules=I,this.storeSettings()}setServerAutoconnect(I){this.settings.serverAutoconnect=I,this.storeSettings()}setServer(I,Q,lt){this.settings.serverUrl=I,this.settings.serverPort=Q,this.settings.serverPassword=lt,this.storeSettings()}setServerSettings(I){this.settings.serverSettings=I,I?tt.v.stateManager.requestSettings():this.storeSettings()}setServerWss(I){this.settings.serverWss=I,this.storeSettings()}setShowAllSections(I){this.settings.showAllSections=I,this.storeSettings()}setShowBossMonster(I){this.settings.showBossMonster=I,this.storeSettings()}setShowExpandedAbilityCard(I){this.settings.showExpandedAbilityCard=I,this.storeSettings()}setShowFullAbilityCard(I){this.settings.showFullAbilityCard=I,this.storeSettings()}setShowHiddenMonster(I){this.settings.showHiddenMonster=I,this.storeSettings()}setShowOnlyUnfinishedScenarios(I){this.settings.showOnlyUnfinishedScenarios=I,this.storeSettings()}setTheme(I){this.settings.theme=I,this.storeSettings()}setTooltips(I){this.settings.tooltips=I,this.storeSettings()}setTreasuresLoot(I){this.settings.treasuresLoot=I,this.storeSettings()}setTreasures(I){this.settings.treasures=I,this.storeSettings()}setZoom(I){this.settings.zoom=I,this.storeSettings()}addSpoiler(I){-1==this.settings.spoilers.indexOf(I)&&(this.settings.spoilers.push(I),this.sortSpoilers(),this.storeSettings())}addSpoilers(I){for(let Q of I)-1==this.settings.spoilers.indexOf(Q.name)&&this.settings.spoilers.push(Q.name);this.storeSettings()}removeSpoiler(I){-1!=this.settings.spoilers.indexOf(I)&&(this.settings.spoilers.splice(this.settings.spoilers.indexOf(I),1),this.storeSettings())}removeAllSpoilers(){this.settings.spoilers=[],this.storeSettings()}addEdition(I){-1==this.settings.editions.indexOf(I)&&(this.settings.editions.push(I),this.storeSettings())}removeEdition(I){this.settings.editions.splice(this.settings.editions.indexOf(I),1),this.storeSettings()}sortSpoilers(){this.settings.spoilers.sort((I,Q)=>I.toLowerCase()>Q.toLowerCase()?1:I.toLowerCase(){if(H.ok)return H.json();console.warn("Invalid data url: "+I+" ["+H.statusText+"]")}).then(H=>-1==tt.v.editions(!0).indexOf(H.edition)||Q?(Q&&(tt.v.editionData=tt.v.editionData.filter(Jt=>Jt.url!=I)),H.characters=H.characters||[],H.monsters=H.monsters||[],H.decks=H.decks||[],H.scenarios=H.scenarios||[],H.sections=H.sections||[],H.items=H.items||[],H.conditions=H.conditions||[],H.battleGoals=H.battleGoals||[],H.events=H.events||[],H.personalQuests=H.personalQuests||[],H.label=H.label||{},H.labelSpoiler=H.labelSpoiler||{},H.url=I,H.logoUrl=H.logoUrl||"",H.additional=H.additional||!1,H.extensions=H.extensions||[],H.newAmStyle=H.newAmStyle||!1,H.treasures=H.treasures||[],H.treasureOffset=H.treasureOffset||0,H.campaign&&H.campaign.buildings&&(H.campaign.buildings=H.campaign.buildings.map(Jt=>Object.assign(new it.U9,Jt))),H.battleGoals.map((Jt,bt)=>(Jt.edition||(Jt.edition=H.edition),Jt.cardId||(Jt.cardId=Jt.edition+"-"+(bt+1)),Jt)),H.events.map((Jt,bt)=>(Jt.edition||(Jt.edition=H.edition),Jt.cardId||(Jt.cardId=bt+1),Jt)),H.personalQuests.map((Jt,bt)=>(Jt.edition||(Jt.edition=H.edition),Jt.cardId||(Jt.cardId=H.edition+"-"+(bt+1)),Jt)),tt.v.editionData.push(H),tt.v.editionData.sort((Jt,bt)=>lt.settings.editionDataUrls.indexOf(Jt.url)-lt.settings.editionDataUrls.indexOf(bt.url)),-1!=st.settings.editions.indexOf(H.edition)?lt.loadDataLabel(H):lt.loadEditionLabel(H),!0):(console.warn("Edition already exists: "+H.edition),!1))}catch(_t){return console.warn("Invalid data url: "+I+" ["+_t+"]"),!1}})()}validateEditionData(){X.checkDuplicates(),X.checkScenarioMonster(),X.checkSectionMonster(),X.checkMissingScenarioMonster(),X.checkMissingSectionMonster(),X.checkMonsterUsage(),X.checkMonsterBossCount()}loadDataLabel(I){this.label.data||(this.label.data={}),this.settings.locale!=this.defaultLocale&&I.label&&I.label[this.defaultLocale]&&(this.label.data=this.merge(this.label.data,!1,I.label[this.defaultLocale]),I.labelSpoiler&&I.labelSpoiler[this.defaultLocale]&&(this.label.data=this.merge(this.label.data,!1,I.labelSpoiler[this.defaultLocale]))),I.label&&I.label[this.settings.locale]&&(this.label.data=this.merge(this.label.data,!0,I.label[this.settings.locale])),I.labelSpoiler&&I.labelSpoiler[this.settings.locale]&&(this.label.data=this.merge(this.label.data,!0,I.labelSpoiler[this.settings.locale])),this.label.data.edition||(this.label.data.edition={}),this.label.data.character||(this.label.data.character={}),this.label.data.monster||(this.label.data.monster={}),this.label.data.deck||(this.label.data.deck={}),this.label.data.ability||(this.label.data.ability={}),this.label.data.scenario||(this.label.data.scenario={}),this.label.data.partyAchievements||(this.label.data.partyAchievements={}),this.label.data.globalAchievements||(this.label.data.globalAchievements={}),this.label.data.campaignSticker||(this.label.data.campaignSticker={}),this.label.data.scenario.group||(this.label.data.scenario.group={}),this.label.data.section||(this.label.data.section={}),this.label.data.objective||(this.label.data.objective={}),this.label.data.summon||(this.label.data.summon={}),this.label.data.battleGoals||(this.label.data.battleGoals={}),this.label.data.personalQuest||(this.label.data.personalQuest={}),this.label.data.items||(this.label.data.items={})}loadEditionLabel(I){this.label.data||(this.label.data={}),this.label.data.edition||(this.label.data.edition={}),this.settings.locale!=this.defaultLocale&&I.label&&I.label[this.defaultLocale]&&I.label[this.defaultLocale].edition&&(this.label.data.edition=this.merge(this.label.data.edition,!1,I.label[this.defaultLocale].edition)),I.label&&I.label[this.settings.locale]&&I.label[this.settings.locale].edition&&(this.label.data.edition=this.merge(this.label.data.edition,!0,I.label[this.settings.locale].edition))}isObject(I){return I&&"object"==typeof I&&!Array.isArray(I)}merge(I,Q,...lt){if(!lt.length)return I;const _t=I;if(this.isObject(_t)){const H=lt.length;for(let Jt=0;JtQ.url==I))return tt.v.editionData.find(Q=>Q.url==I)?.edition;console.error("No edition data found for url '"+I+"'")}addEditionDataUrl(I){var Q=this;return(0,t.Z)(function*(){return!(-1!=Q.settings.editionDataUrls.indexOf(I)||!(yield Q.loadEditionData(I))||(Q.settings.editionDataUrls.push(I),tt.v.editionData.sort((_t,H)=>Q.settings.editionDataUrls.indexOf(_t.url)-Q.settings.editionDataUrls.indexOf(H.url)),-1!=Q.settings.excludeEditionDataUrls.indexOf(I)&&Q.settings.excludeEditionDataUrls.splice(Q.settings.excludeEditionDataUrls.indexOf(I),1),Q.storeSettings(),0))})()}removeEditionDataUrl(I){var Q=this;return(0,t.Z)(function*(){-1!=Q.settings.editionDataUrls.indexOf(I)&&(tt.v.editionData=tt.v.editionData.filter(lt=>lt.url!=I),Q.settings.editionDataUrls.splice(Q.settings.editionDataUrls.indexOf(I),1),-1!=Q.defaultEditionDataUrls.indexOf(I)&&Q.settings.excludeEditionDataUrls.push(I),Q.storeSettings())})()}restoreDefaultEditionDataUrls(){var I=this;return(0,t.Z)(function*(){for(let Q of I.defaultEditionDataUrls)-1==I.settings.editionDataUrls.indexOf(Q)&&(I.settings.editionDataUrls.push(Q),yield I.loadEditionData(Q));I.settings.editionDataUrls.sort((Q,lt)=>-1!=I.defaultEditionDataUrls.indexOf(Q)&&-1!=I.defaultEditionDataUrls.indexOf(lt)?I.defaultEditionDataUrls.indexOf(Q)-I.defaultEditionDataUrls.indexOf(lt):-1!=I.defaultEditionDataUrls.indexOf(Q)&&-1==I.defaultEditionDataUrls.indexOf(lt)?-1:-1==I.defaultEditionDataUrls.indexOf(Q)&&-1!=I.defaultEditionDataUrls.indexOf(lt)?1:I.settings.editionDataUrls.indexOf(Q)-I.settings.editionDataUrls.indexOf(lt)),tt.v.editionData.sort((Q,lt)=>I.settings.editionDataUrls.indexOf(Q.url)-I.settings.editionDataUrls.indexOf(lt.url)),I.storeSettings()})()}updateLocale(I){var Q=this;return(0,t.Z)(function*(){I!=Q.defaultLocale&&(yield fetch("./assets/locales/"+Q.defaultLocale+".json").then(lt=>lt.json()).then(lt=>{Q.label=Q.merge(Q.label,!1,lt)}).catch(lt=>{console.error("Invalid locale: "+I,lt)})),yield fetch("./assets/locales/"+I+".json").then(lt=>lt.json()).then(lt=>{Q.label=Q.merge(Q.label,!0,lt)}).catch(lt=>{console.error("Invalid locale: "+I,lt)}),Q.label.data={};for(let lt of tt.v.editionData)Q.loadDataLabel(lt);tt.v.uiChange.emit()})()}getLabel(I,Q=[],lt=!0,_t=!1,H="",Jt=this.label){if(I+="",!Jt)return _t?this.emptyLabel(I,Q,H):H&&I?this.getLabel(I):I||"";if(Jt[I])return"object"==typeof Jt[I]?Jt[I]["."]?this.insertLabelArguments(Jt[I]["."],Q,lt):_t?this.emptyLabel(I,Q,H):H&&I?this.getLabel(I):I||"":this.insertLabelArguments(Jt[I],Q,lt);{if("data.monster."==H){const Tt=I.match(/(.+)\-(scenario|section)\-(.+)/);if(Tt)return this.insertLabelArguments(Jt[I=Tt[1]],Q,lt)+" #"+Tt[3]}let bt=I.split(".");if(Jt[bt[0]])return I=bt.slice(1,bt.length).join("."),this.getLabel(I,Q,lt,_t,H+bt[0]+".",Jt[bt[0]])}return _t?this.emptyLabel(I,Q,H):H&&I?this.getLabel(I):I||""}emptyLabel(I,Q,lt){return I+(Q&&Q.length>0?" ["+Q+"]":"")}insertLabelArguments(I,Q,lt){if(Q)for(let _t in Q)for(;-1!=I.indexOf(`{${_t}}`);)if(I=I.replace(`{${_t}}`,lt?this.getLabel(Q[_t]):Q[_t]),-1!=Q[_t].indexOf(`{${_t}}`)){console.warn("Loop for '"+I+"'",Q[_t]);break}return I}}},3306:(q,nt,E)=>{"use strict";E.d(nt,{j:()=>at});var t=E(5861),x=E(1180),G=E(3329);const at=new class tt{constructor(){(0,x.Z)(this,"db",void 0)}init(){return new Promise((K,dt)=>{if(window.indexedDB){const X=window.indexedDB.open("ghs-db",1);X.onupgradeneeded=et=>{console.debug("Upgrade DB",et);const st=et.target.result;et.oldVersion<1&&(st.createObjectStore("game"),st.createObjectStore("settings"),st.createObjectStore("undo",{autoIncrement:!0}),st.createObjectStore("redo",{autoIncrement:!0}),st.createObjectStore("undo-infos",{autoIncrement:!0}),st.createObjectStore("game-backup",{autoIncrement:!0}))},X.onsuccess=et=>{this.db=et.target.result,localStorage.getItem("ghs-game")&&this.migrate(),K(!0)},X.onerror=et=>{this.db=void 0,console.error("db error",X.error,et),console.warn("No IndexedDB, fallback to Local Storage"),dt(!1)}}else this.db=void 0,console.warn("No IndexedDB, fallback to Local Storage"),dt(!1)})}writeGameModel(K){return this.write("game","default",K)}readGameModel(){return this.read("game","default")}addBackup(K){if(this.db)this.write("game-backup",void 0,K);else{let dt=1,X=localStorage.getItem("ghs-game-backup-"+dt);for(;X;)dt++,X=localStorage.getItem("ghs-game-backup-"+dt);localStorage.setItem("ghs-game-backup-"+dt,JSON.stringify(K))}}read(K,dt){return new Promise((X,et)=>{if(this.db){const I=this.db.transaction(K,"readonly").objectStore(K).get(dt);I.onsuccess=Q=>{X(Q.target.result)},I.onerror=Q=>{console.error("read "+K+" failed",Q),et(Q)}}else{const st=localStorage.getItem("ghs-"+K);st?X(JSON.parse(st)):et(null)}})}write(K,dt,X){return new Promise((et,st)=>{if(this.db){const Q=this.db.transaction(K,"readwrite").objectStore(K).put(X,dt);Q.onsuccess=lt=>{et()},Q.onerror=lt=>{console.error("update "+K+" failed",lt),st()}}else localStorage.setItem("ghs-"+K,JSON.stringify(X)),et()})}remove(K,dt="default"){this.db?this.db.transaction(K,"readwrite").objectStore(K).delete(dt).onerror=gt=>{console.error("delete "+dt+" from "+K+" failed",gt)}:localStorage.removeItem("ghs-"+K)}readAll(K){return new Promise((dt,X)=>{if(this.db){const gt=this.db.transaction(K,"readonly").objectStore(K).getAll();gt.onsuccess=I=>{dt(I.target.result)},gt.onerror=I=>{console.error("read "+K+" failed",I,I.error),X(I)}}else{const et=localStorage.getItem("ghs-"+K);et?dt(JSON.parse(et)):X(null)}})}readList(K,dt,X,et=!0){return new Promise((st,gt)=>{if(this.db){const lt=this.db.transaction(K,"readonly").objectStore(K);let _t=[];const H=lt.openCursor(null,"prev");var I=!1;H.onsuccess=Jt=>{var bt=Jt.target.result;if(!I&&X>0)return I=!0,void bt.advance(X);bt?(_t.push(bt.value),_t.length{console.error("read "+K+" failed",Jt),gt(Jt)}}else{const Q=localStorage.getItem("ghs-"+K);Q?st(JSON.parse(Q).slice(X,X+dt)):gt(null)}})}writeArray(K,dt){var X=this;return(0,t.Z)(function*(){return new Promise(function(){var et=(0,t.Z)(function*(st,gt){if(X.db){yield X.clear(K).catch(I=>console.error(I));for(let I=0;Igt())}}else localStorage.setItem("ghs-"+K,JSON.stringify(dt));st()});return function(st,gt){return et.apply(this,arguments)}}())})()}clear(K=void 0){return new Promise((dt,X)=>{if(this.db)if(K){const gt=this.db.transaction(K,"readwrite").objectStore(K).clear();gt.onsuccess=I=>{dt()},gt.onerror=I=>{console.error("delete "+K+" failed",I),X(gt.error)}}else{const et=window.indexedDB.deleteDatabase("ghs-db");et.onsuccess=st=>{dt()},et.onblocked=st=>{this.db&&this.db.close()},et.onerror=st=>{console.error("delete database 'ghs-db' failed",st),X(et.error)}}else if(K)localStorage.removeItem("ghs-"+K),dt();else if(localStorage.clear(),window.indexedDB){const et=window.indexedDB.deleteDatabase("ghs-db");et.onsuccess=st=>{dt()},et.onblocked=st=>{this.db&&this.db.close()},et.onerror=st=>{console.error("delete database 'ghs-db' failed",st),X(et.error)}}else dt()})}datadump(K=!1){var dt=this;return(0,t.Z)(function*(){let X={};if(dt.db&&!K)X.game=yield dt.readGameModel(),X.settings=yield dt.read("settings","default"),X.undo=yield dt.readAll("undo"),X.redo=yield dt.readAll("redo"),X["undo-infos"]=yield dt.readAll("undo-infos"),X["game-backup"]=yield dt.readAll("game-backup");else{K||console.warn("No IndexedDB, fallback to Local Storage");for(let et=0;et{localStorage.removeItem("ghs-game")}).catch()}const X=localStorage.getItem("ghs-settings");if(X){let lt=JSON.parse(X);K.write("settings","default",Object.assign(new G.Z,lt)).then(()=>{localStorage.removeItem("ghs-settings")}).catch()}const et=localStorage.getItem("ghs-undo");if(null!=et){let lt=JSON.parse(et),_t=1,H=localStorage.getItem("ghs-undo-"+_t);for(;H;){const Jt=JSON.parse(H);lt.push(...Jt),_t++,H=localStorage.getItem("ghs-undo-"+_t)}K.writeArray("undo",lt).then(()=>{localStorage.removeItem("ghs-undo");let Jt=localStorage.getItem("ghs-undo-"+_t);for(;Jt;)localStorage.removeItem("ghs-undo-"+_t),_t++,Jt=localStorage.getItem("ghs-undo-"+_t)}).catch()}const st=localStorage.getItem("ghs-redo");if(null!=st){let lt=JSON.parse(st),_t=1,H=localStorage.getItem("ghs-redo-"+_t);for(;H;){const Jt=JSON.parse(H);lt.push(...Jt),_t++,H=localStorage.getItem("ghs-redo-"+_t)}K.writeArray("redo",lt).then(()=>{localStorage.removeItem("ghs-redo");let Jt=localStorage.getItem("ghs-redo-"+_t);for(;Jt;)localStorage.removeItem("ghs-redo-"+_t),_t++,Jt=localStorage.getItem("ghs-redo-"+_t)}).catch()}const gt=localStorage.getItem("ghs-undo-infos");if(null!=gt){let lt=JSON.parse(gt),_t=1,H=localStorage.getItem("ghs-undo-infos-"+_t);for(;H;){const Jt=JSON.parse(H);lt.push(...Jt),_t++,H=localStorage.getItem("ghs-undo-infos-"+_t)}K.writeArray("undo-infos",lt).then(()=>{localStorage.removeItem("ghs-undo-infos");let Jt=localStorage.getItem("ghs-undo-infos-"+_t);for(;Jt;)localStorage.removeItem("ghs-undo-infos-"+_t),_t++,Jt=localStorage.getItem("ghs-undo-infos-"+_t)}).catch()}let I=1,Q=localStorage.getItem("ghs-game-backup-"+I);for(;Q;)K.write("game-backup",void 0,Q).then(()=>{localStorage.removeItem("ghs-game-backup-"+I)}).catch(),I++,Q=localStorage.getItem("ghs-game-backup-"+I)})()}}},5609:(q,nt,E)=>{"use strict";E.d(nt,{z:()=>et});var t=E(1180),x=E(2736),G=E(3788),tt=E(8272),at=E(5604),it=E(377),K=E(9310),dt=E(3165),X=E(2098);class et extends G.x3{getInitiative(){return this.absent?200:this.exhausted||this.longRest||this.health<=0?100:this.initiative}constructor(I,Q){super(I),(0,t.Z)(this,"title",""),(0,t.Z)(this,"initiative",0),(0,t.Z)(this,"experience",0),(0,t.Z)(this,"loot",0),(0,t.Z)(this,"lootCards",[]),(0,t.Z)(this,"treasures",[]),(0,t.Z)(this,"exhausted",!1),(0,t.Z)(this,"stat",void 0),(0,t.Z)(this,"summons",[]),(0,t.Z)(this,"identity",0),(0,t.Z)(this,"progress",void 0),(0,t.Z)(this,"donations",0),(0,t.Z)(this,"initiativeVisible",!1),(0,t.Z)(this,"attackModifierDeckVisible",!1),(0,t.Z)(this,"lootCardsVisible",!1),(0,t.Z)(this,"itemsVisible",!1),(0,t.Z)(this,"fullview",!1),(0,t.Z)(this,"attackModifierDeck",void 0),(0,t.Z)(this,"token",0),(0,t.Z)(this,"tokenValues",[]),(0,t.Z)(this,"absent",!1),(0,t.Z)(this,"longRest",!1),(0,t.Z)(this,"battleGoals",[]),(0,t.Z)(this,"battleGoal",!1),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"type","character"),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"number",0),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.errors=I.errors||[],Q<1?Q=1:Q>9&&(Q=9);const lt=this.stats.find(_t=>_t.level==Q);lt?(this.stat=lt,this.level=Q,this.maxHealth=this.stat.health):(!this.errors.find(_t=>_t.type==it.r.unknown)&&!this.errors.find(_t=>_t.type==it.r.stat)&&(console.error("No character stat found for level: "+Q),this.errors.push(new it.o(it.r.stat,"character",I.name,I.edition,"",""+Q))),this.stat=new x.a(Q,0),this.level=0,this.maxHealth=0),this.health=this.maxHealth,this.progress=new dt.f,this.attackModifierDeck=at.v.attackModifierManager.buildCharacterAttackModifierDeck(this),this.tokens.forEach((_t,H)=>{this.tokenValues[H]=this.tokenValues[H]||0}),this.availableSummons.forEach(_t=>_t.edition=this.edition)}toModel(){return new st(this.name,this.edition,this.marker,this.title,this.initiative,this.experience,this.loot,this.lootCards||[],this.treasures&&this.treasures.map(I=>""+I)||[],this.exhausted,this.level,this.off,this.active,this.health,this.maxHealth,this.entityConditions.map(I=>I.toModel()),this.immunities,this.markers,this.tags||[],this.identity,this.summons.map(I=>I.toModel()),this.progress,this.initiativeVisible,this.attackModifierDeckVisible,this.lootCardsVisible,this.itemsVisible,this.number,this.attackModifierDeck.toModel(),this.donations,this.token,this.tokenValues,this.absent,this.longRest,this.battleGoals,this.battleGoal)}fromModel(I){if(this.edition=I.edition,!this.edition){const lt=at.v.charactersData().find(_t=>_t.name==I.name);this.edition=lt?lt.edition:""}if(this.marker=I.marker||this.marker,this.title=I.title,(!this.initiativeVisible||I.initiative<=0||this.initiative!=I.initiative)&&(this.initiativeVisible=I.initiativeVisible),I.number)this.number=I.number;else for(this.number=1;at.v.game.figures.some(lt=>lt instanceof et&&(lt.name!=this.name||lt.edition!=this.edition)&<.number==this.number);)this.number++;this.initiative=I.initiative,this.experience=I.experience,this.loot=I.loot,this.lootCards=I.lootCards||[],this.treasures=I.treasures&&I.treasures.map(lt=>isNaN(+lt)?lt:+lt)||[],this.exhausted=I.exhausted,this.level=I.level,this.off=I.off,this.active=I.active,this.health=I.health,this.maxHealth=I.maxHealth,this.entityConditions=[],I.entityConditions&&(this.entityConditions=I.entityConditions.map(lt=>{let _t=new K.hT(lt.name,lt.value);return _t.fromModel(lt),_t})),this.immunities=I.immunities||[],this.markers=I.markers||this.markers,this.tags=I.tags||this.tags,this.identity=I.identity||0,this.summons=this.summons.filter(lt=>I.summons.some(_t=>_t.uuid&&_t.uuid==lt.uuid)),I.summons.forEach((lt,_t)=>{let H=this.summons.find(Jt=>lt.uuid==Jt.uuid);H||(H=new tt.eU(lt.uuid,lt.name,lt.cardId,lt.level,lt.number,lt.color),this.summons.splice(_t,0,H)),H.fromModel(lt)}),this.summons.sort((lt,_t)=>I.summons.map(H=>H.uuid).indexOf(lt.uuid)-I.summons.map(H=>H.uuid).indexOf(_t.uuid)),this.progress=new dt.f,I.progress&&(this.progress=Object.assign(new dt.f,I.progress));let Q=at.v.attackModifierManager.buildCharacterAttackModifierDeck(this);I.attackModifierDeck&&at.v.attackModifierManager.fromModel(Q,I.attackModifierDeck),this.mergeAttackModifierDeck(Q),I.attackModifierDeckVisible&&(this.attackModifierDeckVisible=!0),I.lootCardsVisible&&(this.lootCardsVisible=!0),I.itemsVisible&&(this.itemsVisible=!0),this.donations=I.donations||0,this.token=I.token||0,this.tokenValues=I.tokenValues||[],this.tokens.forEach((lt,_t)=>{this.tokenValues[_t]=this.tokenValues[_t]||0}),this.absent=I.absent,this.longRest=I.longRest,this.battleGoals=I.battleGoals||0,this.battleGoal=I.battleGoal}mergeAttackModifierDeck(I){let Q=!1;return this.attackModifierDeck||(this.attackModifierDeck=new X.ut,Q=!0),(I.disgarded.length!=this.attackModifierDeck.disgarded.length||!I.disgarded.every((lt,_t)=>this.attackModifierDeck.disgarded.indexOf(lt)==_t))&&(this.attackModifierDeck.disgarded=I.disgarded,Q=!0),this.attackModifierDeck.current!=I.current&&(this.attackModifierDeck.current=I.current,Q=!0),(this.attackModifierDeck.attackModifiers.length!=I.attackModifiers.length||!this.attackModifierDeck.attackModifiers.map(lt=>lt.id).every((lt,_t)=>I.attackModifiers[_t].id==lt))&&(this.attackModifierDeck.attackModifiers=I.attackModifiers,Q=!0),(this.attackModifierDeck.cards.length!=I.cards.length||!this.attackModifierDeck.cards.map(lt=>lt.id).every((lt,_t)=>I.cards[_t].id==lt))&&(this.attackModifierDeck.cards=I.cards,Q=!0),Q}}class st{constructor(I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt,wt,Zt,qt,Wt,Ie,ue,We,ve,_n,be,en,St,kt,It,Ut,Et,Yt,Ce,me,wn,xe,ke,Ft){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"initiative",void 0),(0,t.Z)(this,"experience",void 0),(0,t.Z)(this,"loot",void 0),(0,t.Z)(this,"lootCards",void 0),(0,t.Z)(this,"treasures",void 0),(0,t.Z)(this,"exhausted",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),(0,t.Z)(this,"identity",void 0),(0,t.Z)(this,"summons",void 0),(0,t.Z)(this,"progress",void 0),(0,t.Z)(this,"initiativeVisible",void 0),(0,t.Z)(this,"attackModifierDeckVisible",void 0),(0,t.Z)(this,"lootCardsVisible",void 0),(0,t.Z)(this,"itemsVisible",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"attackModifierDeck",void 0),(0,t.Z)(this,"donations",void 0),(0,t.Z)(this,"token",void 0),(0,t.Z)(this,"tokenValues",void 0),(0,t.Z)(this,"absent",void 0),(0,t.Z)(this,"longRest",void 0),(0,t.Z)(this,"battleGoals",void 0),(0,t.Z)(this,"battleGoal",void 0),this.name=I,this.edition=Q,this.marker=lt,this.title=_t,this.initiative=H,this.experience=Jt,this.loot=bt,this.lootCards=JSON.parse(JSON.stringify(Tt)),this.treasures=JSON.parse(JSON.stringify(Rt)),this.exhausted=Dt,this.level=Ht,this.off=jt,this.active=wt,this.health=Zt,this.maxHealth=qt,this.entityConditions=JSON.parse(JSON.stringify(Wt)),this.immunities=JSON.parse(JSON.stringify(Ie)),this.markers=JSON.parse(JSON.stringify(ue)),this.tags=JSON.parse(JSON.stringify(We)),this.identity=ve,this.summons=_n,this.progress=JSON.parse(JSON.stringify(be)),this.initiativeVisible=en,this.attackModifierDeckVisible=St,this.lootCardsVisible=kt,this.itemsVisible=It,this.number=Ut,this.attackModifierDeck=Et,this.donations=Yt,this.token=Ce,this.tokenValues=JSON.parse(JSON.stringify(me)),this.absent=wn,this.longRest=xe,this.battleGoals=JSON.parse(JSON.stringify(ke)),this.battleGoal=Ft}}},3165:(q,nt,E)=>{"use strict";E.d(nt,{f:()=>x});var t=E(1180);class x{constructor(){(0,t.Z)(this,"experience",0),(0,t.Z)(this,"gold",0),(0,t.Z)(this,"loot",{}),(0,t.Z)(this,"itemNotes",""),(0,t.Z)(this,"items",[]),(0,t.Z)(this,"equippedItems",[]),(0,t.Z)(this,"personalQuest",""),(0,t.Z)(this,"personalQuestProgress",[]),(0,t.Z)(this,"battleGoals",0),(0,t.Z)(this,"notes",""),(0,t.Z)(this,"retired",!1),(0,t.Z)(this,"retirements",0),(0,t.Z)(this,"extraPerks",0),(0,t.Z)(this,"perks",[]),(0,t.Z)(this,"masteries",[]),(0,t.Z)(this,"donations",0)}}},3157:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{GB:()=>EntityExpressionRegex,HY:()=>EntityValueRegex,et:()=>EntityValueRegexExtended,j9:()=>EntityValueFunction});var _businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5604),_Game__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6565);const EntityExpressionRegex=/^([xCL0-9\.\+\/\-\*\(\)\=\?\:\|\s\>\<]+)$/,EntityValueRegex=/\[([xCL0-9\.\+\/\-\*\(\)\=\?\:\|\s\>\<]+)(\{(.*)\})?\]/,EntityValueRegexExtended=/\[([a-zA-Z0-9\.\+\/\-\*\(\)\=\?\:\|\s\>\<]+)(\{(.*)\})?\]/;function EntityValueFunction(value,L=void 0){if(!value)return 0;if("number"==typeof value)return value;let expression=value,func;const match=value.match(EntityValueRegex);match&&match[0].length==value.length&&(expression=match[1],func=match[3]),null==L&&(L=_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.game.level),expression=expression.replace(/[x]/g,"*"),expression=expression.replace(/[C]/g,""+Math.max(2,_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.characterManager.characterCount())),expression=expression.replace(/[L]/g,""+L),expression=expression.replace(/[P]/g,""+_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.prosperityLevel()),expression=expression.replace(/[R]/g,""+(_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.game.round+(_businesslogic_GameManager__WEBPACK_IMPORTED_MODULE_0__.v.game.state==_Game__WEBPACK_IMPORTED_MODULE_1__.D2.draw?1:0)));let result=0;try{result=eval(expression)}catch(q){return console.warn("Could not evaluate expression: "+expression,q),0}if(func&&func.startsWith("$")&&(func=func.replace("$","")),func)switch(func){case"math.ceil":result=Math.ceil(result);break;case"math.floor":result=Math.floor(result);break;default:console.error("Unknown expression: "+func+"("+match+")")}return Math.round(result)}},6565:(q,nt,E)=>{"use strict";E.d(nt,{D2:()=>Q,i4:()=>lt,lA:()=>I});var t=E(1180),x=E(5604),G=E(2098),tt=E(5609),at=E(6140),it=E(6441),K=E(7177),dt=E(9120),X=E(9048),et=E(4756),st=E(731),gt=E(5601);class I{constructor(){(0,t.Z)(this,"revision",0),(0,t.Z)(this,"revisionOffset",0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"battleGoalEditions",[]),(0,t.Z)(this,"filteredBattleGoals",[]),(0,t.Z)(this,"figures",[]),(0,t.Z)(this,"entitiesCounter",[]),(0,t.Z)(this,"state",Q.draw),(0,t.Z)(this,"scenario",void 0),(0,t.Z)(this,"sections",[]),(0,t.Z)(this,"scenarioRules",[]),(0,t.Z)(this,"disgardedScenarioRules",[]),(0,t.Z)(this,"level",1),(0,t.Z)(this,"levelCalculation",!0),(0,t.Z)(this,"levelAdjustment",0),(0,t.Z)(this,"bonusAdjustment",0),(0,t.Z)(this,"ge5Player",!0),(0,t.Z)(this,"playerCount",-1),(0,t.Z)(this,"round",0),(0,t.Z)(this,"roundResets",[]),(0,t.Z)(this,"roundResetsHidden",[]),(0,t.Z)(this,"playSeconds",0),(0,t.Z)(this,"totalSeconds",0),(0,t.Z)(this,"monsterAttackModifierDeck",new G.ut),(0,t.Z)(this,"allyAttackModifierDeck",new G.ut),(0,t.Z)(this,"elementBoard",void 0),(0,t.Z)(this,"solo",!1),(0,t.Z)(this,"party",void 0),(0,t.Z)(this,"parties",void 0),(0,t.Z)(this,"lootDeck",new it._8),(0,t.Z)(this,"lootDeckEnhancements",[]),(0,t.Z)(this,"lootDeckFixed",[]),(0,t.Z)(this,"lootDeckSections",[]),(0,t.Z)(this,"unlockedCharacters",[]),(0,t.Z)(this,"server",!1),(0,t.Z)(this,"finish",void 0),this.elementBoard=JSON.parse(JSON.stringify(at.Jq)),this.party=new X.f,this.parties=[this.party]}toModel(){return new lt(this.revision,this.revisionOffset,this.edition,this.conditions,this.battleGoalEditions,this.filteredBattleGoals,this.figures.map(H=>H instanceof dt.CH&&H.uuid?H.uuid:H.edition+"-"+H.name),this.entitiesCounter,this.figures.filter(H=>H instanceof tt.z).map(H=>H.toModel()),this.figures.filter(H=>H instanceof K.Q).map(H=>H.toModel()),this.figures.filter(H=>H instanceof dt.CH).map(H=>H.toModel()),this.figures.filter(H=>H instanceof gt.k).map(H=>H.toModel()),this.state,this.scenario&&x.v.scenarioManager.toModel(this.scenario,this.scenario.revealedRooms,this.scenario.custom,this.scenario.custom?this.scenario.name:"")||void 0,this.sections.map(H=>x.v.scenarioManager.toModel(H,H.revealedRooms)),this.scenarioRules.map(H=>H.identifier),this.disgardedScenarioRules,this.level,this.levelCalculation,this.levelAdjustment,this.bonusAdjustment,this.ge5Player,this.playerCount,this.round,this.roundResets,this.roundResetsHidden,this.playSeconds,this.totalSeconds,this.monsterAttackModifierDeck.toModel(),this.allyAttackModifierDeck.toModel(),this.elementBoard,this.solo,this.party,this.parties,this.lootDeck,this.lootDeckEnhancements,this.lootDeckFixed,this.lootDeckSections,this.unlockedCharacters,this.server,this.finish)}fromModel(H,Jt=!1){if(this.revision=H.revision||0,this.revisionOffset=H.revisionOffset||0,this.edition=H.edition,this.conditions=H.conditions||[],this.battleGoalEditions=H.battleGoalEditions||[],this.filteredBattleGoals=H.filteredBattleGoals||[],this.figures=this.figures.filter(bt=>-1!=H.characters.map(Tt=>Tt.name).indexOf(bt.name)||-1!=H.monsters.map(Tt=>Tt.name).indexOf(bt.name)||-1!=H.objectives.map(Tt=>Tt.name).indexOf(bt.name)||H.objectiveContainers&&-1!=H.objectiveContainers.map(Tt=>Tt.name).indexOf(bt.name)),this.entitiesCounter=H.entitiesCounter||[],H.characters.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof tt.z&&Rt.name==bt.name&&Rt.edition==bt.edition);Tt||(Tt=new tt.z(x.v.getCharacterData(bt.name,bt.edition),bt.level),this.figures.push(Tt)),Tt.fromModel(bt)}),H.monsters.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof K.Q&&Rt.name==bt.name&&Rt.edition==bt.edition);Tt||(Tt=new K.Q(x.v.getMonsterData(bt.name,bt.edition)),this.figures.push(Tt)),Tt.fromModel(bt)}),this.figures=this.figures.filter(bt=>!(bt instanceof dt.CH)||H.objectives.some(Tt=>Tt.uuid&&Tt.uuid==bt.uuid)),H.objectives.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof dt.CH&&bt.uuid&&Rt.uuid==bt.uuid);if(!Tt){if(!bt.id)for(bt.id=0;this.figures.some(Rt=>Rt instanceof dt.CH&&Rt.id==bt.id);)bt.id++;Tt=new dt.CH(bt.uuid,bt.id,bt.objectiveId),this.figures.push(Tt)}Tt.fromModel(bt)}),H.objectiveContainers&&(this.figures=this.figures.filter(bt=>!(bt instanceof gt.k)||H.objectiveContainers&&H.objectiveContainers.some(Tt=>Tt.uuid&&Tt.uuid==bt.uuid)),H.objectiveContainers.forEach(bt=>{let Tt=this.figures.find(Rt=>Rt instanceof gt.k&&Rt.uuid==bt.uuid);Tt||(Tt=new gt.k(bt.uuid,bt.objectiveId),this.figures.push(Tt)),Tt.fromModel(bt)})),this.figures.sort((bt,Tt)=>{const Dt=Tt instanceof dt.CH&&Tt.uuid?Tt.uuid:Tt.edition+"-"+Tt.name;return H.figures.indexOf(bt instanceof dt.CH&&bt.uuid?bt.uuid:bt.edition+"-"+bt.name)-H.figures.indexOf(Dt)}),this.state=H.state,H.scenario){const bt=x.v.scenarioManager.scenarioDataForModel(H.scenario);this.scenario=bt?new et.$4(bt,H.scenario.revealedRooms||[],H.scenario.isCustom):void 0}else this.scenario=void 0;if(this.sections=[],H.sections.forEach(bt=>{const Tt=x.v.scenarioManager.sectionDataForModel(bt);Tt&&this.sections.push(new et.$4(Tt,bt.revealedRooms||[]))}),this.level=H.level,this.scenarioRules=[],H.scenarioRules&&H.scenarioRules.forEach(bt=>{const Tt=x.v.scenarioRulesManager.getScenarioForRule(bt).scenario;Tt&&Tt.rules&&Tt.rules.length>bt.index&&(Tt.rules[bt.index].spawns&&Tt.rules[bt.index].spawns.forEach(Rt=>{Rt.manual&&!Rt.count&&(Rt.count="1")}),this.scenarioRules.push({identifier:bt,rule:Tt.rules[bt.index]}))}),this.disgardedScenarioRules=H.disgardedScenarioRules,this.levelCalculation=H.levelCalculation,this.levelAdjustment=H.levelAdjustment,this.bonusAdjustment=H.bonusAdjustment,this.ge5Player=H.ge5Player,this.playerCount=H.playerCount||-1,this.round=H.round,this.roundResets=H.roundResets||[],this.roundResetsHidden=H.roundResetsHidden||[],(Jt&&!H.server||H.playSeconds>this.playSeconds)&&(this.playSeconds=H.playSeconds),(Jt&&!H.server||H.totalSeconds>this.totalSeconds)&&(this.totalSeconds=H.totalSeconds),this.monsterAttackModifierDeck=this.monsterAttackModifierDeck||new G.ut,H.monsterAttackModifierDeck&&H.monsterAttackModifierDeck.cards&&H.monsterAttackModifierDeck.cards.length>0&&x.v.attackModifierManager.fromModel(this.monsterAttackModifierDeck,H.monsterAttackModifierDeck),this.allyAttackModifierDeck=this.allyAttackModifierDeck||new G.ut,H.allyAttackModifierDeck&&H.allyAttackModifierDeck.cards&&H.allyAttackModifierDeck.cards.length>0&&x.v.attackModifierManager.fromModel(this.allyAttackModifierDeck,H.allyAttackModifierDeck),this.elementBoard=this.elementBoard||at.Jq,H.elementBoard&&H.elementBoard.forEach((bt,Tt)=>this.elementBoard[Tt].state=bt.state),this.solo=H.solo,this.party=H.party?JSON.parse(JSON.stringify(H.party)):new X.f,this.party.achievementsList){const bt=st.r.label.data.partyAchievements;this.party.achievementsList=this.party.achievementsList.filter(Tt=>Tt),this.party.achievementsList=this.party.achievementsList.map(Tt=>{let Rt=Tt;return Object.keys(bt).forEach(Dt=>{bt[Dt].toLowerCase()==Rt.toLowerCase()&&(Rt=Dt)}),Rt})}if(this.party.globalAchievementsList){const bt=st.r.label.data.globalAchievements;this.party.globalAchievementsList=this.party.globalAchievementsList.filter(Tt=>Tt),this.party.globalAchievementsList=this.party.globalAchievementsList.map(Tt=>{let Rt=Tt;return Object.keys(bt).forEach(Dt=>{bt[Dt].toLowerCase()==Rt.toLowerCase()&&(Rt=Dt)}),Rt})}if(this.party.campaignStickers&&(this.party.campaignStickers=this.party.campaignStickers.filter(bt=>bt)),this.party.manualScenarios){let bt=[];this.party.manualScenarios.forEach(Tt=>{if("fh"==Tt.edition&&!Tt.group&&!Tt.custom){const Rt=x.v.sectionData("fh").find(Dt=>Dt.random&&Dt.unlocks&&-1!=Dt.unlocks.indexOf(Tt.index));Rt&&(this.party.conclusions.find(Dt=>Dt.edition==Rt.edition&&Dt.group==Rt.group&&Dt.index==Rt.index)||(this.party.conclusions.push(new et._b(""+Rt.index,Rt.edition,Rt.group,!1,"",[])),bt.push(Tt)))}}),this.party.manualScenarios=this.party.manualScenarios.filter(Tt=>-1==bt.indexOf(Tt))}this.parties=[this.party],H.parties&&H.parties.forEach(bt=>{bt.id!=this.party.id&&(bt.achievements&&(bt.achievementsList.push(...bt.achievements.split("\n")),bt.achievements=""),bt.globalAchievements&&(bt.globalAchievementsList.push(...bt.globalAchievements.split("\n")),bt.globalAchievements=""),this.parties.push(Object.assign(new X.f,bt)))}),H.lootDeck?this.lootDeck?this.lootDeck.fromModel(H.lootDeck):this.lootDeck=H.lootDeck:this.lootDeck=new it._8,this.lootDeckEnhancements=H.lootDeckEnhancements||[],this.lootDeckFixed=H.lootDeckFixed||[],this.lootDeckSections=H.lootDeckSections||[],this.lootDeckEnhancements.forEach(bt=>{bt.value&&(isNaN(+bt.value)?"%game.loot.player.3-4% +1/%game.loot.player.2% +2"==bt.value?(bt.value4P=1,bt.value3P=1,bt.value2P=2):"%game.loot.player.4% +1/%game.loot.player.2-3% +2"==bt.value?(bt.value4P=1,bt.value3P=2,bt.value2P=2):console.warn("Cannot migrate loot: "+bt.value):(bt.value4P=+bt.value,bt.value3P=+bt.value,bt.value2P=+bt.value),bt.value=void 0)}),(0,it.nk)(this.lootDeck.cards),(0,it.nk)(this.lootDeckEnhancements),this.unlockedCharacters=H.unlockedCharacters||[],st.r.settings.spoilers&&x.v.charactersData().filter(bt=>bt.spoiler).forEach(bt=>{const Tt=st.r.settings.spoilers.indexOf(bt.name);-1!=Tt&&(-1==this.unlockedCharacters.indexOf(bt.name)&&this.unlockedCharacters.push(bt.name),st.r.settings.spoilers.splice(Tt,1))}),this.server=H.server,this.finish=H.finish}}var Q=function(_t){return _t.draw="draw",_t.next="next",_t}(Q||{});class lt{constructor(H=0,Jt=0,bt=void 0,Tt=[],Rt=[],Dt=[],Ht=[],jt=[],wt=[],Zt=[],qt=[],Wt=void 0,Ie=Q.next,ue=void 0,We=[],ve=[],_n=[],be=0,en=!0,St=0,kt=0,It=!0,Ut=-1,Et=0,Yt=[],Ce=[],me=0,wn=0,xe=new G.fy(-1,G.u$,[],!0),ke=new G.fy(-1,G.u$,[],!0),Ft=[],Oe=!1,rn=new X.f,kn=[],Me=new it._8,Y=[],on=[],p=[],P=[],M=!1,y=void 0){(0,t.Z)(this,"revision",void 0),(0,t.Z)(this,"revisionOffset",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"conditions",void 0),(0,t.Z)(this,"battleGoalEditions",void 0),(0,t.Z)(this,"filteredBattleGoals",void 0),(0,t.Z)(this,"figures",void 0),(0,t.Z)(this,"entitiesCounter",void 0),(0,t.Z)(this,"characters",void 0),(0,t.Z)(this,"monsters",void 0),(0,t.Z)(this,"objectives",void 0),(0,t.Z)(this,"objectiveContainers",void 0),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"scenario",void 0),(0,t.Z)(this,"sections",void 0),(0,t.Z)(this,"scenarioRules",void 0),(0,t.Z)(this,"disgardedScenarioRules",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"levelCalculation",void 0),(0,t.Z)(this,"levelAdjustment",void 0),(0,t.Z)(this,"bonusAdjustment",void 0),(0,t.Z)(this,"ge5Player",void 0),(0,t.Z)(this,"playerCount",void 0),(0,t.Z)(this,"round",void 0),(0,t.Z)(this,"roundResets",void 0),(0,t.Z)(this,"roundResetsHidden",void 0),(0,t.Z)(this,"playSeconds",void 0),(0,t.Z)(this,"totalSeconds",void 0),(0,t.Z)(this,"monsterAttackModifierDeck",void 0),(0,t.Z)(this,"allyAttackModifierDeck",void 0),(0,t.Z)(this,"elementBoard",void 0),(0,t.Z)(this,"solo",void 0),(0,t.Z)(this,"party",void 0),(0,t.Z)(this,"parties",void 0),(0,t.Z)(this,"lootDeck",void 0),(0,t.Z)(this,"lootDeckEnhancements",void 0),(0,t.Z)(this,"lootDeckFixed",void 0),(0,t.Z)(this,"lootDeckSections",void 0),(0,t.Z)(this,"unlockedCharacters",void 0),(0,t.Z)(this,"server",void 0),(0,t.Z)(this,"finish",void 0),this.revision=H,this.revisionOffset=Jt,this.edition=bt,this.conditions=Tt,this.battleGoalEditions=Rt,this.filteredBattleGoals=Dt,this.figures=Ht,this.entitiesCounter=JSON.parse(JSON.stringify(jt)),this.characters=wt,this.monsters=Zt,this.objectives=qt,this.objectiveContainers=Wt,this.state=Ie,this.scenario=ue,this.sections=We,this.scenarioRules=JSON.parse(JSON.stringify(ve)),this.disgardedScenarioRules=JSON.parse(JSON.stringify(_n)),this.level=be,this.levelCalculation=en,this.levelAdjustment=St,this.bonusAdjustment=kt,this.ge5Player=It,this.playerCount=Ut,this.round=Et,this.roundResets=JSON.parse(JSON.stringify(Yt)),this.roundResetsHidden=JSON.parse(JSON.stringify(Ce)),this.playSeconds=me,this.totalSeconds=wn,this.monsterAttackModifierDeck=xe,this.allyAttackModifierDeck=ke,this.elementBoard=JSON.parse(JSON.stringify(Ft)),this.solo=Oe,this.party=JSON.parse(JSON.stringify(rn)),this.parties=JSON.parse(JSON.stringify(kn)),this.lootDeck=JSON.parse(JSON.stringify(Me)),this.lootDeckEnhancements=JSON.parse(JSON.stringify(Y)),this.lootDeckFixed=JSON.parse(JSON.stringify(on)),this.lootDeckSections=JSON.parse(JSON.stringify(p)),this.unlockedCharacters=JSON.parse(JSON.stringify(P)),this.server=M,this.finish=y?JSON.parse(JSON.stringify(y)):void 0}}},7177:(q,nt,E)=>{"use strict";E.d(nt,{Q:()=>it});var t=E(1180),x=E(4968),G=E(7866),tt=E(5604),at=E(8272);class it extends G.A{getInitiative(){const X=tt.v.monsterManager.getAbility(this);return tt.v.gameplayFigure(this)&&X&&X.initiative||100}constructor(X,et=1){if(super(X),(0,t.Z)(this,"summonColor",at.mp.blue),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"drawExtra",!1),(0,t.Z)(this,"lastDraw",0),(0,t.Z)(this,"type","monster"),(0,t.Z)(this,"ability",-1),(0,t.Z)(this,"abilities",[]),(0,t.Z)(this,"entities",[]),(0,t.Z)(this,"isAlly",!1),(0,t.Z)(this,"isAllied",!1),this.errors=X.errors,this.level=et,X.baseStat)for(let st of X.stats){if(!st.health&&0!=st.health&&(st.health=X.baseStat.health||0),!st.movement&&0!=st.movement&&(st.movement=X.baseStat.movement||0),!st.attack&&0!=st.attack&&(st.attack=X.baseStat.attack||0),!st.range&&0!=st.range&&(st.range=X.baseStat.range||0),st.actions||(st.actions=Object.assign([],X.baseStat.actions)),st.immunities||(st.immunities=Object.assign([],X.baseStat.immunities)),!st.special&&(st.special=[],X.baseStat.special))for(let gt of X.baseStat.special)st.special.push(Object.assign([],gt));st.note||(st.note=X.baseStat.note),st.type||(st.type=X.baseStat.type)}}toModel(){return new K(this.name,this.edition,this.level,this.off,this.active,this.drawExtra,this.lastDraw,this.ability,this.abilities,this.entities.map(X=>X.toModel()),this.isAlly,this.isAllied)}fromModel(X){if(this.edition=X.edition,!this.edition){const et=tt.v.monstersData().find(st=>st.name==X.name);this.edition=et?et.edition:""}this.level=X.level,this.off=X.off,this.active=X.active,this.drawExtra=X.drawExtra,this.lastDraw=X.lastDraw,this.abilities=X.abilities&&X.abilities.length>0&&X.abilities||tt.v.abilities(this)&&tt.v.abilities(this).map((et,st)=>st)||[],this.ability=X.ability,this.entities=this.entities.filter(et=>X.entities.find(st=>st.number==et.number&&st.type==et.type)),X.entities.forEach((et,st)=>{let gt=this.entities.find(I=>I.number==et.number&&I.type==et.type);gt?st!=this.entities.indexOf(gt)&&(this.entities.splice(this.entities.indexOf(gt),1),this.entities.splice(st,0,gt)):(gt=new x.g(et.number,et.type,this),this.entities.splice(st,0,gt)),gt.fromModel(et)}),this.isAlly=X.isAlly,this.isAllied=X.isAllied}}class K{constructor(X,et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"drawExtra",void 0),(0,t.Z)(this,"lastDraw",void 0),(0,t.Z)(this,"ability",void 0),(0,t.Z)(this,"abilities",void 0),(0,t.Z)(this,"entities",void 0),(0,t.Z)(this,"isAlly",void 0),(0,t.Z)(this,"isAllied",void 0),this.name=X,this.edition=et,this.level=st,this.off=gt,this.active=I,this.drawExtra=Q,this.lastDraw=lt,this.ability=_t,this.abilities=JSON.parse(JSON.stringify(H)),this.entities=JSON.parse(JSON.stringify(Jt)),this.isAlly=bt,this.isAllied=Tt}}},4968:(q,nt,E)=>{"use strict";E.d(nt,{g:()=>K});var t=E(1180),x=E(9310),G=E(3157),tt=E(377),at=E(9144),it=E(8272);class K{constructor(et,st,gt){(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"stat",void 0),(0,t.Z)(this,"dead",!1),(0,t.Z)(this,"summon",it.HY.false),(0,t.Z)(this,"effect",void 0),(0,t.Z)(this,"dormant",!1),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.number=et,this.type=st;const I=gt.stats.find(Q=>Q.level==gt.level&&Q.type==st);I?this.stat=I:(this.stat=new at.c(st,gt.level,0,0,0,0),gt.errors=gt.errors||[],!gt.errors.find(Q=>Q.type==tt.r.unknown)&&!gt.errors.find(Q=>Q.type==tt.r.stat)&&(console.error("Could not find '"+st+"' stats for monster: "+gt.name+" level: "+gt.level),gt.errors.push(new tt.o(tt.r.stat,"monster",gt.name,gt.edition,st,""+gt.level)))),this.maxHealth=(0,G.j9)(this.stat.health,gt.level),this.health=this.maxHealth,0==this.health&&(this.health=1),this.level=gt.level}toModel(){return new dt(this.number,this.marker,this.type,this.dead,this.summon,this.active,this.off,this.revealed,this.dormant,this.health,this.maxHealth,this.entityConditions.map(et=>et.toModel()),this.immunities,this.markers,this.tags||[])}fromModel(et){this.marker=et.marker,this.dead=et.dead,this.summon=et.summon,this.active=et.active,this.off=et.off,this.revealed=et.revealed,this.dormant=et.dormant,this.health=et.health,this.maxHealth=et.maxHealth,this.entityConditions=[],et.entityConditions&&(this.entityConditions=et.entityConditions.map(st=>{let gt=new x.hT(st.name,st.value);return gt.fromModel(st),gt})),this.immunities=et.immunities||[],this.markers=et.markers||[],this.tags=et.tags||[]}}class dt{constructor(et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt){(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"dead",void 0),(0,t.Z)(this,"summon",void 0),(0,t.Z)(this,"revealed",void 0),(0,t.Z)(this,"dormant",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),this.number=et,this.marker=st,this.type=gt,this.dead=I,this.summon=Q,this.active=lt,this.off=_t,this.revealed=H,this.dormant=Jt,this.health=bt,this.maxHealth=Tt,this.entityConditions=JSON.parse(JSON.stringify(Rt)),this.immunities=JSON.parse(JSON.stringify(Dt)),this.markers=JSON.parse(JSON.stringify(Ht)),this.tags=JSON.parse(JSON.stringify(jt))}}},9120:(q,nt,E)=>{"use strict";E.d(nt,{CH:()=>tt,H4:()=>it});var t=E(1180),x=E(9310),G=E(4004);class tt{constructor(dt,X,et=void 0){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"id",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"title",""),(0,t.Z)(this,"exhausted",!1),(0,t.Z)(this,"escort",!1),(0,t.Z)(this,"name",""),(0,t.Z)(this,"level",0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"type","objective"),(0,t.Z)(this,"health",7),(0,t.Z)(this,"maxHealth",7),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"initiative",99),(0,t.Z)(this,"objectiveId",void 0),this.uuid=dt||(0,G.Z)(),this.id=X,this.number=X,this.objectiveId=et}getInitiative(){return this.exhausted||this.health<=0?100:this.initiative}toModel(){return new at(this.uuid||(0,G.Z)(),this.id,this.marker,this.title,this.name,this.escort,this.level,this.exhausted,this.off,this.active,this.health,this.maxHealth,this.entityConditions.map(dt=>dt.toModel()),this.immunities,this.markers,this.tags||[],this.initiative,this.objectiveId)}fromModel(dt){this.uuid=dt.uuid||(0,G.Z)(),this.id=dt.id,this.number=dt.id,this.marker=dt.marker,this.title=dt.title,this.name=dt.name,this.escort=dt.escort,this.level=dt.level,this.exhausted=dt.exhausted,this.off=dt.off,this.active=dt.active,this.health=dt.health,this.maxHealth=dt.maxHealth,this.entityConditions=[],dt.entityConditions&&(this.entityConditions=dt.entityConditions.map(X=>{let et=new x.hT(X.name,X.value);return et.fromModel(X),et})),this.immunities=dt.immunities||[],this.markers=dt.markers||this.markers,this.tags=dt.tags||this.tags,this.initiative=dt.initiative,this.objectiveId=dt.objectiveId}}class at{constructor(dt,X,et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt,wt){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"id",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"escort",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"exhausted",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),(0,t.Z)(this,"initiative",void 0),(0,t.Z)(this,"objectiveId",void 0),this.uuid=dt,this.id=X,this.marker=et,this.title=st,this.name=gt,this.escort=I,this.level=Q,this.exhausted=lt,this.off=_t,this.active=H,this.health=Jt,this.maxHealth=bt,this.entityConditions=JSON.parse(JSON.stringify(Tt)),this.immunities=JSON.parse(JSON.stringify(Rt)),this.markers=JSON.parse(JSON.stringify(Dt)),this.tags=JSON.parse(JSON.stringify(Ht)),this.initiative=jt,this.objectiveId=wt&&JSON.parse(JSON.stringify(wt))||void 0}}const it=["","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","A","B","C","D","E","F","G","H","I","J","K","L","M"]},5601:(q,nt,E)=>{"use strict";E.d(nt,{k:()=>G});var t=E(1180),x=E(1975);class G{constructor(it,K=void 0){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"title",""),(0,t.Z)(this,"escort",!1),(0,t.Z)(this,"entities",[]),(0,t.Z)(this,"noThumbnail",!0),(0,t.Z)(this,"summonColor",""),(0,t.Z)(this,"name",""),(0,t.Z)(this,"level",0),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"health",7),(0,t.Z)(this,"initiative",99),(0,t.Z)(this,"type","objectiveContainer"),(0,t.Z)(this,"objectiveId",void 0),this.uuid=it,this.objectiveId=K}getInitiative(){return this.initiative}toModel(){return new tt(this.uuid,this.marker,this.title,this.name,this.escort,this.entities.map(it=>it.toModel()),this.level,this.off,this.active,this.health,this.initiative,this.objectiveId)}fromModel(it){this.marker=it.marker,this.title=it.title,this.name=it.name,this.escort=it.escort,this.entities=this.entities.filter(K=>it.entities.some(dt=>dt.uuid==K.uuid)),it.entities.forEach((K,dt)=>{let X=this.entities.find(et=>K.uuid==et.uuid);X?dt!=this.entities.indexOf(X)&&(this.entities.splice(this.entities.indexOf(X),1),this.entities.splice(dt,0,X)):(X=new x.W(K.uuid,K.number,this,this.marker),this.entities.splice(dt,0,X)),X.fromModel(K)}),this.entities.sort((K,dt)=>it.entities.map(X=>X.uuid).indexOf(K.uuid)-it.entities.map(X=>X.uuid).indexOf(dt.uuid)),this.level=it.level,this.off=it.off,this.active=it.active,this.health=it.health,this.initiative=it.initiative,this.objectiveId=it.objectiveId}}class tt{constructor(it,K,dt,X,et,st,gt,I,Q,lt,_t,H){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"escort",void 0),(0,t.Z)(this,"entities",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"off",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"initiative",void 0),(0,t.Z)(this,"objectiveId",void 0),this.uuid=it,this.marker=K,this.title=dt,this.name=X,this.escort=et,this.entities=st,this.level=gt,this.off=I,this.active=Q,this.health=lt,this.initiative=_t,this.objectiveId=H&&JSON.parse(JSON.stringify(H))||void 0}}},1975:(q,nt,E)=>{"use strict";E.d(nt,{W:()=>tt});var t=E(1180),x=E(9310),G=E(3157);class tt{constructor(K,dt,X,et){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"dead",!1),(0,t.Z)(this,"dormant",!1),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"type",""),(0,t.Z)(this,"summon",""),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"level",-1),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.uuid=K,this.number=dt,this.marker=et||"",this.maxHealth=(0,G.j9)(X.health),this.health=this.maxHealth,0==this.health&&(this.health=1)}toModel(){return new at(this.uuid,this.number,this.marker,this.dead,this.active,this.dormant,this.health,this.maxHealth,this.entityConditions.map(K=>K.toModel()),this.immunities,this.markers,this.tags||[])}fromModel(K){this.marker=K.marker,this.dead=K.dead,this.active=K.active,this.dormant=K.dormant,this.health=K.health,this.maxHealth=K.maxHealth,this.entityConditions=[],K.entityConditions&&(this.entityConditions=K.entityConditions.map(dt=>{let X=new x.hT(dt.name,dt.value);return X.fromModel(dt),X})),this.immunities=K.immunities||[],this.markers=K.markers||[],this.tags=K.tags||[]}}class at{constructor(K,dt,X,et,st,gt,I,Q,lt,_t,H,Jt){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"dead",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"dormant",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),this.uuid=K,this.number=dt,this.marker=X,this.dead=et,this.active=st,this.dormant=gt,this.health=I,this.maxHealth=Q,this.entityConditions=JSON.parse(JSON.stringify(lt)),this.immunities=JSON.parse(JSON.stringify(_t)),this.markers=JSON.parse(JSON.stringify(H)),this.tags=JSON.parse(JSON.stringify(Jt))}}},9048:(q,nt,E)=>{"use strict";E.d(nt,{f:()=>x});var t=E(1180);class x{constructor(){(0,t.Z)(this,"id",0),(0,t.Z)(this,"name",""),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"battleGoalEditions",[]),(0,t.Z)(this,"filteredBattleGoals",[]),(0,t.Z)(this,"location",""),(0,t.Z)(this,"notes",""),(0,t.Z)(this,"achievements",""),(0,t.Z)(this,"achievementsList",[]),(0,t.Z)(this,"reputation",0),(0,t.Z)(this,"prosperity",0),(0,t.Z)(this,"scenarios",[]),(0,t.Z)(this,"conclusions",[]),(0,t.Z)(this,"casualScenarios",[]),(0,t.Z)(this,"manualScenarios",[]),(0,t.Z)(this,"campaignMode",!1),(0,t.Z)(this,"globalAchievements",""),(0,t.Z)(this,"globalAchievementsList",[]),(0,t.Z)(this,"treasures",[]),(0,t.Z)(this,"donations",0),(0,t.Z)(this,"players",[]),(0,t.Z)(this,"characters",[]),(0,t.Z)(this,"retirements",[]),(0,t.Z)(this,"unlockedItems",[]),(0,t.Z)(this,"unlockedCharacters",[]),(0,t.Z)(this,"level",1),(0,t.Z)(this,"levelCalculation",!0),(0,t.Z)(this,"levelAdjustment",0),(0,t.Z)(this,"bonusAdjustment",0),(0,t.Z)(this,"ge5Player",!0),(0,t.Z)(this,"playerCount",-1),(0,t.Z)(this,"solo",!1),(0,t.Z)(this,"weeks",0),(0,t.Z)(this,"weekSections",{}),(0,t.Z)(this,"loot",{}),(0,t.Z)(this,"randomItemLooted",[]),(0,t.Z)(this,"inspiration",0),(0,t.Z)(this,"defense",0),(0,t.Z)(this,"soldiers",0),(0,t.Z)(this,"morale",0),(0,t.Z)(this,"townGuardPerks",0),(0,t.Z)(this,"townGuardPerkSections",[]),(0,t.Z)(this,"campaignStickers",[]),(0,t.Z)(this,"townGuardDeck",void 0),(0,t.Z)(this,"buildings",[]),(0,t.Z)(this,"lootDeckEnhancements",[]),(0,t.Z)(this,"lootDeckFixed",[]),(0,t.Z)(this,"lootDeckSections",[])}}},7484:(q,nt,E)=>{"use strict";E.d(nt,{P:()=>x});var t=E(1180);class x{constructor(){(0,t.Z)(this,"characters",!1),(0,t.Z)(this,"character",[]),(0,t.Z)(this,"monsters",!1),(0,t.Z)(this,"monster",[]),(0,t.Z)(this,"scenario",!1),(0,t.Z)(this,"elements",!1),(0,t.Z)(this,"round",!1),(0,t.Z)(this,"level",!1),(0,t.Z)(this,"attackModifiers",!1),(0,t.Z)(this,"lootDeck",!1),(0,t.Z)(this,"party",!1)}}},4756:(q,nt,E)=>{"use strict";E.d(nt,{$4:()=>G,U4:()=>tt,_b:()=>at});var t=E(1180),x=E(301);class G extends x.tR{constructor(K,dt=[],X=!1){super(K),(0,t.Z)(this,"custom",void 0),(0,t.Z)(this,"revealedRooms",void 0),this.solo=K.solo,this.revealedRooms=JSON.parse(JSON.stringify(dt)),K.rooms&&K.rooms.forEach(et=>{et.initial&&-1==this.revealedRooms.indexOf(et.roomNumber)&&this.revealedRooms.push(et.roomNumber)}),this.custom=X}}class tt extends x.tR{constructor(K,dt,X,et){super(K),(0,t.Z)(this,"isSuccess",void 0),(0,t.Z)(this,"isBlocked",void 0),(0,t.Z)(this,"isLocked",void 0),this.isSuccess=dt,this.isBlocked=X,this.isLocked=et}}class at{constructor(K,dt,X,et=!1,st="",gt=void 0){(0,t.Z)(this,"index",void 0),(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"group",void 0),(0,t.Z)(this,"isCustom",void 0),(0,t.Z)(this,"custom",void 0),(0,t.Z)(this,"revealedRooms",void 0),this.index=K,this.edition=dt,this.group=X,this.isCustom=et,this.custom=st,this.revealedRooms=gt}}},3329:(q,nt,E)=>{"use strict";E.d(nt,{Z:()=>G});var t=E(1180),x=E(9310);class G{constructor(){(0,t.Z)(this,"abilities",!0),(0,t.Z)(this,"abilityNumbers",!0),(0,t.Z)(this,"abilityReveal",!0),(0,t.Z)(this,"activeApplyConditions",!0),(0,t.Z)(this,"activeApplyConditionsExcludes",[x.fT.shield]),(0,t.Z)(this,"activeStandees",!0),(0,t.Z)(this,"activeSummons",!0),(0,t.Z)(this,"addAllMonsters",!1),(0,t.Z)(this,"allyAttackModifierDeck",!0),(0,t.Z)(this,"alwaysAllyAttackModifierDeck",!1),(0,t.Z)(this,"alwaysFhSolo",!1),(0,t.Z)(this,"alwaysHazardousTerrain",!1),(0,t.Z)(this,"alwaysLootApplyDialog",!1),(0,t.Z)(this,"alwaysLootDeck",!1),(0,t.Z)(this,"applyBuildingRewards",!0),(0,t.Z)(this,"applyConditions",!0),(0,t.Z)(this,"applyConditionsExcludes",[x.fT.shield]),(0,t.Z)(this,"applyLongRest",!0),(0,t.Z)(this,"applyLoot",!0),(0,t.Z)(this,"applyLootRandomItem",!0),(0,t.Z)(this,"applyRetirement",!0),(0,t.Z)(this,"autoBackup",-1),(0,t.Z)(this,"autoBackupFinish",!1),(0,t.Z)(this,"autoBackupUrl",void 0),(0,t.Z)(this,"automaticAttackModifierFullscreen",!0),(0,t.Z)(this,"automaticStandees",!0),(0,t.Z)(this,"automaticStandeesDialog",!1),(0,t.Z)(this,"automaticTheme",!0),(0,t.Z)(this,"automaticUnlocking",!0),(0,t.Z)(this,"autoscroll",!0),(0,t.Z)(this,"barsize",1),(0,t.Z)(this,"backupHint",!0),(0,t.Z)(this,"battleGoals",!1),(0,t.Z)(this,"battleGoalsCharacter",!1),(0,t.Z)(this,"battleGoalsFh",!1),(0,t.Z)(this,"battleGoalsReminder",!0),(0,t.Z)(this,"browserNavigation",!1),(0,t.Z)(this,"calculate",!0),(0,t.Z)(this,"calculateStats",!0),(0,t.Z)(this,"calculateShieldStats",!0),(0,t.Z)(this,"characterAttackModifierAnimate",!0),(0,t.Z)(this,"characterAttackModifierDeck",!0),(0,t.Z)(this,"characterAttackModifierDeckPermanent",!1),(0,t.Z)(this,"characterAttackModifierDeckPermanentActive",!1),(0,t.Z)(this,"characterCompact",!1),(0,t.Z)(this,"characterHandSize",!1),(0,t.Z)(this,"characterIdentities",!0),(0,t.Z)(this,"characterIdentityHint",!0),(0,t.Z)(this,"characterItems",!1),(0,t.Z)(this,"characterItemsPermanent",!1),(0,t.Z)(this,"characterItemsPermanentActive",!1),(0,t.Z)(this,"characterItemsPermanentEquipped",!0),(0,t.Z)(this,"characterItemsPermanentSorted",!0),(0,t.Z)(this,"characterItemsPermanentZoom",1),(0,t.Z)(this,"characterSheet",!0),(0,t.Z)(this,"characterSheetCompact",!1),(0,t.Z)(this,"characterTraits",!1),(0,t.Z)(this,"combineSummonAction",!0),(0,t.Z)(this,"debugRightClick",!1),(0,t.Z)(this,"disableAnimations",!1),(0,t.Z)(this,"disableArtwork",!1),(0,t.Z)(this,"disableColumns",!1),(0,t.Z)(this,"disableDragFigures",!1),(0,t.Z)(this,"disablePinchZoom",!1),(0,t.Z)(this,"disabledTurnConfirmation",!1),(0,t.Z)(this,"disableSortFigures",!1),(0,t.Z)(this,"disableStandees",!1),(0,t.Z)(this,"disableWakeLock",!1),(0,t.Z)(this,"dragValues",!0),(0,t.Z)(this,"editionDataUrls",[]),(0,t.Z)(this,"editions",[]),(0,t.Z)(this,"eliteFirst",!0),(0,t.Z)(this,"excludeEditionDataUrls",[]),(0,t.Z)(this,"expireConditions",!0),(0,t.Z)(this,"fhGhItems",!1),(0,t.Z)(this,"fhStyle",!1),(0,t.Z)(this,"fontsize",1),(0,t.Z)(this,"globalFontsize",1),(0,t.Z)(this,"fullscreen",!1),(0,t.Z)(this,"hideAbsent",!1),(0,t.Z)(this,"hideStats",!1),(0,t.Z)(this,"hints",!0),(0,t.Z)(this,"initiativeRequired",!0),(0,t.Z)(this,"interactiveAbilities",!0),(0,t.Z)(this,"locale","en"),(0,t.Z)(this,"lootDeck",!0),(0,t.Z)(this,"maxUndo",100),(0,t.Z)(this,"portraitMode",!0),(0,t.Z)(this,"monsters",!0),(0,t.Z)(this,"moveElements",!0),(0,t.Z)(this,"partySheet",!0),(0,t.Z)(this,"pressDoubleClick",!0),(0,t.Z)(this,"randomStandees",!1),(0,t.Z)(this,"scenarioNumberInput",!1),(0,t.Z)(this,"scenarioRooms",!0),(0,t.Z)(this,"scenarioRules",!0),(0,t.Z)(this,"serverAutoconnect",!0),(0,t.Z)(this,"serverPassword",void 0),(0,t.Z)(this,"serverPort",void 0),(0,t.Z)(this,"serverSettings",!1),(0,t.Z)(this,"serverUrl",void 0),(0,t.Z)(this,"serverWss",!1),(0,t.Z)(this,"showBossMonster",!0),(0,t.Z)(this,"showAllSections",!1),(0,t.Z)(this,"showExpandedAbilityCard",!1),(0,t.Z)(this,"showFullAbilityCard",!1),(0,t.Z)(this,"showHiddenMonster",!1),(0,t.Z)(this,"showOnlyUnfinishedScenarios",!1),(0,t.Z)(this,"spoilers",[]),(0,t.Z)(this,"standeeStats",!1),(0,t.Z)(this,"statAnimations",!1),(0,t.Z)(this,"theme",""),(0,t.Z)(this,"tooltips",!0),(0,t.Z)(this,"treasuresLoot",!0),(0,t.Z)(this,"treasures",!0),(0,t.Z)(this,"zoom",100)}}},8272:(q,nt,E)=>{"use strict";E.d(nt,{HY:()=>at,eU:()=>K,mp:()=>it});var t=E(1180),x=E(9310),G=E(3157),tt=E(4004),at=function(X){return X.new="new",X.true="true",X.false="false",X}(at||{}),it=function(X){return X.blue="blue",X.green="green",X.yellow="yellow",X.orange="orange",X.white="white",X.purple="purple",X.pink="pink",X.red="red",X.custom="custom",X.fh="fh",X}(it||{});class K{constructor(et,st,gt,I,Q,lt,_t=void 0){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"cardId",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"color",void 0),(0,t.Z)(this,"attack",0),(0,t.Z)(this,"movement",0),(0,t.Z)(this,"range",0),(0,t.Z)(this,"flying",!1),(0,t.Z)(this,"dead",!1),(0,t.Z)(this,"state",at.new),(0,t.Z)(this,"init",!0),(0,t.Z)(this,"action",void 0),(0,t.Z)(this,"additionalAction",void 0),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"noThumbnail",!1),(0,t.Z)(this,"dormant",!1),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"off",!1),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",2),(0,t.Z)(this,"maxHealth",2),(0,t.Z)(this,"entityConditions",[]),(0,t.Z)(this,"immunities",[]),(0,t.Z)(this,"markers",[]),(0,t.Z)(this,"tags",[]),this.uuid=et||(0,tt.Z)(),this.name=st,this.title="",this.cardId=gt,this.level=I,this.number=Q,this.color=lt,_t&&(this.maxHealth=(0,G.j9)(_t.health,I),this.health=this.maxHealth,this.attack=_t.attack||0,this.movement=(0,G.j9)(_t.movement,I),this.range=(0,G.j9)(_t.range,I),this.flying=_t.flying,this.action=_t.action?JSON.parse(JSON.stringify(_t.action)):void 0,this.additionalAction=_t.additionalAction?JSON.parse(JSON.stringify(_t.additionalAction)):void 0,_t.thumbnail&&(this.thumbnail=_t.edition+"-"+_t.name),this.thumbnailUrl=_t.thumbnailUrl,this.noThumbnail=_t.noThumbnail),this.health=this.maxHealth}toModel(){return new dt(this.uuid||(0,tt.Z)(),this.name,this.title,this.cardId,this.number,this.color,this.attack&&this.attack+""||"0",this.movement,this.range,this.flying,this.dead,this.state,this.level,this.health,this.maxHealth,this.entityConditions.map(et=>et.toModel()),this.immunities,this.markers,this.tags||[],this.action?JSON.stringify(this.action):void 0,this.additionalAction?JSON.stringify(this.additionalAction):void 0,this.active,this.dormant,this.thumbnail,this.thumbnailUrl,this.noThumbnail)}fromModel(et){this.uuid=et.uuid||(0,tt.Z)(),this.name=et.name||"",this.title=et.title||"",this.cardId=et.cardId||"",this.number=et.number,this.color=et.color,this.attack=et.attack&&!isNaN(+et.attack)?+et.attack:et.attack||0,this.movement=et.movement,this.range=et.range,this.flying=et.flying,this.dead=et.dead,this.state=et.state,this.level=et.level,this.health=et.health,this.maxHealth=et.maxHealth,this.entityConditions=[],et.entityConditions&&(this.entityConditions=et.entityConditions.map(st=>{let gt=new x.hT(st.name,st.value);return gt.fromModel(st),gt})),this.immunities=et.immunities||[],et.action&&(this.action=JSON.parse(et.action)),et.additionalAction&&(this.additionalAction=JSON.parse(et.additionalAction)),this.active=et.active,this.dormant=et.dormant,this.thumbnail=et.thumbnail,this.thumbnailUrl=et.thumbnailUrl,this.noThumbnail=et.noThumbnail,this.markers=et.markers||this.markers,this.tags=et.tags||this.tags,this.init=!1}}class dt{constructor(et,st,gt,I,Q,lt,_t,H,Jt,bt,Tt,Rt,Dt,Ht,jt,wt,Zt,qt,Wt,Ie,ue,We,ve,_n,be,en){(0,t.Z)(this,"uuid",void 0),(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"title",void 0),(0,t.Z)(this,"cardId",void 0),(0,t.Z)(this,"number",void 0),(0,t.Z)(this,"color",void 0),(0,t.Z)(this,"attack",void 0),(0,t.Z)(this,"movement",void 0),(0,t.Z)(this,"range",void 0),(0,t.Z)(this,"flying",void 0),(0,t.Z)(this,"dead",void 0),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"maxHealth",void 0),(0,t.Z)(this,"entityConditions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"markers",void 0),(0,t.Z)(this,"tags",void 0),(0,t.Z)(this,"action",void 0),(0,t.Z)(this,"additionalAction",void 0),(0,t.Z)(this,"active",!1),(0,t.Z)(this,"dormant",void 0),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"noThumbnail",void 0),this.uuid=et,this.name=st,this.title=gt,this.cardId=I,this.number=Q,this.color=lt,this.attack=_t,this.movement=H,this.range=Jt,this.flying=bt,this.dead=Tt,this.state=Rt,this.level=Dt,this.health=Ht,this.maxHealth=jt,this.entityConditions=JSON.parse(JSON.stringify(wt)),this.immunities=JSON.parse(JSON.stringify(Zt)),this.markers=JSON.parse(JSON.stringify(qt)),this.tags=JSON.parse(JSON.stringify(Wt)),this.action=Ie,this.additionalAction=ue,this.active=We,this.dormant=ve,this.thumbnail=_n,this.thumbnailUrl=be,this.noThumbnail=en}}},7227:(q,nt,E)=>{"use strict";E.d(nt,{EF:()=>tt,TE:()=>it,Us:()=>G,aU:()=>x,q2:()=>at});var t=E(1180);class x{constructor(dt,X="",et=tt.fixed,st=[],gt=!1,I=!1){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",void 0),(0,t.Z)(this,"valueObject",void 0),(0,t.Z)(this,"valueType",void 0),(0,t.Z)(this,"subActions",void 0),(0,t.Z)(this,"small",void 0),(0,t.Z)(this,"hidden",void 0),this.type=dt,this.value=X,this.valueType=et,this.subActions=st||[],this.small=gt,this.hidden=I}}var G=function(K){return K.area="area",K.attack="attack",K.card="card",K.condition="condition",K.custom="custom",K.damage="damage",K.element="element",K.elementHalf="elementHalf",K.fly="fly",K.heal="heal",K.grant="grant",K.jump="jump",K.loot="loot",K.monsterType="monsterType",K.move="move",K.pierce="pierce",K.pull="pull",K.push="push",K.range="range",K.retaliate="retaliate",K.shield="shield",K.spawn="spawn",K.special="special",K.specialTarget="specialTarget",K.sufferDamage="sufferDamage",K.summon="summon",K.swing="swing",K.switchType="switchType",K.target="target",K.teleport="teleport",K.trigger="trigger",K.concatenation="concatenation",K.grid="grid",K.box="box",K.boxFhSubActions="boxFhSubActions",K.forceBox="forceBox",K}(G||{}),tt=function(K){return K.plus="plus",K.minus="minus",K.add="add",K.subtract="subtract",K.fixed="fixed",K}(tt||{}),at=function(K){return K.all="all",K.ally="ally",K.allyShort="allyShort",K.allyAffect="allyAffect",K.allyAffectRange="allyAffectRange",K.allyAdjacent="allyAdjacent",K.allies="allies",K.alliesAdjacent="alliesAdjacent",K.alliesAdjacentAffect="alliesAdjacentAffect",K.alliesRange="alliesRange",K.alliesRangeAffect="alliesRangeAffect",K.enemy="enemy",K.enemyAdjacent="enemyAdjacent",K.enemyRange="enemyRange",K.enemyOneAll="enemyOneAll",K.enemies="enemies",K.enemiesAdjacent="enemiesAdjacent",K.enemiesRange="enemiesRange",K.enemiesRangeExact="enemiesRangeExtact",K.enemiesRangeAffect="enemiesRangeAffect",K.enemiesRangeAffectExact="enemiesRangeAffectExact",K.enemiesMovedThrough="enemiesMovedThrough",K.enemiesMovedThroughAdjacent="enemiesMovedThroughAdjacent",K.figures="figures",K.figuresAdjacent="figuresAdjacent",K.figuresRange="figuresRange",K.focusEnemyFarthest="focusEnemyFarthest",K.self="self",K.selfAllies="selfAllies",K.selfAlliesAffect="selfAlliesAffect",K.selfAlliesRange="selfAlliesRange",K.selfAlliesAdjacentAffect="selfAlliesAdjacentAffect",K.targets="targets",K}(at||{}),it=function(K){return K.experience="experience",K.lost="lost",K.persistent="persistent",K.recover="recover",K.refresh="refresh",K.round="round",K.slot="slot",K.slotXp="slotXp",K}(it||{})},2098:(q,nt,E)=>{"use strict";E.d(nt,{Bt:()=>et,UO:()=>K,US:()=>at,YY:()=>tt,fQ:()=>X,fy:()=>I,jB:()=>st,kl:()=>x,tI:()=>G,u$:()=>dt,ut:()=>gt});var t=E(1180),x=function(Q){return Q.plus="plus",Q.plus0="plus0",Q.plus1="plus1",Q.plus2="plus2",Q.plus3="plus3",Q.plus4="plus4",Q.plusX="plusX",Q.minus="minus",Q.minus1="minus1",Q.minus2="minus2",Q.null="null",Q.double="double",Q.bless="bless",Q.curse="curse",Q.minus1extra="minus1extra",Q.empower="empower",Q.enfeeble="enfeeble",Q.invalid="invalid",Q.townguard="townguard",Q.wreck="wreck",Q.success="success",Q}(x||{}),G=function(Q){return Q.default="default",Q.plus="plus",Q.minus="minus",Q.multiply="multiply",Q}(G||{});class tt{constructor(lt,_t=0,H=G.plus,Jt=void 0,bt=[],Tt=!1,Rt=!1){switch((0,t.Z)(this,"id",void 0),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",0),(0,t.Z)(this,"valueType",void 0),(0,t.Z)(this,"shuffle",!1),(0,t.Z)(this,"effects",void 0),(0,t.Z)(this,"rolling",void 0),(0,t.Z)(this,"active",void 0),(0,t.Z)(this,"revealed",!1),(0,t.Z)(this,"character",!1),this.type=lt,this.value=_t,this.valueType=H,this.id=Jt||(lt==x.townguard?"tg-"+H+_t:lt!=x.plus&<!=x.minus?lt:lt+_t),this.effects=bt,this.rolling=Tt,this.active=Rt,lt){case x.plus0:this.value=0;break;case x.plus1:this.value=1;break;case x.plus2:this.value=2;break;case x.plus3:this.value=3;break;case x.plus4:this.value=4;break;case x.minus:this.valueType=G.minus;break;case x.minus1:this.valueType=G.minus,this.value=1;break;case x.minus2:this.valueType=G.minus,this.value=2;break;case x.null:this.valueType=G.multiply,this.value=0,this.shuffle=!0;break;case x.double:this.valueType=G.multiply,this.value=2,this.shuffle=!0;break;case x.bless:this.valueType=G.multiply,this.value=2;break;case x.curse:this.valueType=G.multiply,this.value=0;break;case x.minus1extra:this.valueType=G.minus,this.value=1;break;case x.wreck:this.valueType=G.minus,this.value=0;break;case x.success:this.value=0}}clone(){return new tt(this.type,this.value,this.valueType,this.id,this.effects?JSON.parse(JSON.stringify(this.effects)):[],this.rolling,this.active)}}var at=function(Q){return Q.area="area",Q.changeType="changeType",Q.condition="condition",Q.custom="custom",Q.element="element",Q.elementConsume="elementConsume",Q.elementHalf="elementHalf",Q.heal="heal",Q.pierce="pierce",Q.pull="pull",Q.push="push",Q.range="range",Q.refreshItem="refreshItem",Q.refreshSpentItem="refreshSpentItem",Q.recoverRandomDiscard="recoverRandomDiscard",Q.retaliate="retaliate",Q.shield="shield",Q.specialTarget="specialTarget",Q.summon="summon",Q.swing="swing",Q.target="target",Q.attack="attack",Q.or="or",Q}(at||{});class it{constructor(lt,_t="",H="",Jt=[],bt=!1){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",void 0),(0,t.Z)(this,"hint",void 0),(0,t.Z)(this,"effects",void 0),(0,t.Z)(this,"icon",!1),this.type=lt,this.value=_t,this.hint=H,this.effects=Jt,this.icon=bt}}const K=[new tt(x.plus0),new tt(x.plus1),new tt(x.minus1),new tt(x.plus2),new tt(x.minus2),new tt(x.double),new tt(x.null),new tt(x.bless),new tt(x.curse),new tt(x.minus1extra)],dt=[x.plus0,x.plus0,x.plus0,x.plus0,x.plus0,x.plus0,x.plus1,x.plus1,x.plus1,x.plus1,x.plus1,x.minus1,x.minus1,x.minus1,x.minus1,x.minus1,x.plus2,x.minus2,x.double,x.null],X=[new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,0,G.default),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,10),new tt(x.townguard,20),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,10,G.minus),new tt(x.townguard,20,G.minus),new tt(x.wreck),new tt(x.success)],et=[new tt(x.townguard,0,G.default,"fh-tg-add-plus0"),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10"),new tt(x.townguard,10,G.minus,"fh-tg-add-minus10"),new tt(x.townguard,20,G.plus,"fh-tg-add-plus20"),new tt(x.townguard,20,G.minus,"fh-tg-add-minus20"),new tt(x.townguard,30,G.plus,"fh-tg-add-plus30"),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50"),new tt(x.wreck,0,G.default,"fh-tg-add-wreck"),new tt(x.success,0,G.default,"fh-tg-add-success"),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10-soldier",[new it(at.custom,"fh-soldier","",[],!0)],!0),new tt(x.townguard,20,G.plus,"fh-tg-add-plus20-soldier",[new it(at.custom,"fh-soldier","",[],!0)]),new tt(x.townguard,30,G.plus,"fh-tg-add-plus30-soldier",[new it(at.custom,"fh-soldier","",[],!0)]),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10-rolling",[],!0),new tt(x.townguard,10,G.plus,"fh-tg-add-plus10-advantage",[new it(at.custom,"game.custom.advantage")],!0),new tt(x.townguard,20,G.minus,"fh-tg-add-minus20-resource",[new it(at.custom,"+2 material resource")]),new tt(x.townguard,0,G.default,"fh-tg-add-resource-hide",[new it(at.custom,"+1%game.resource.hide%","Gain one Hide")]),new tt(x.townguard,0,G.default,"fh-tg-add-resource-lumber",[new it(at.custom,"+1%game.resource.lumber%","Gain one Lumber")]),new tt(x.townguard,0,G.default,"fh-tg-add-resource-metal",[new it(at.custom,"+1%game.resource.metal%","Gain one Metal")]),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50-algox",[new it(at.custom,"fh-algox","",[],!0)]),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50-unfettered",[new it(at.custom,"fh-unfettered","",[],!0)]),new tt(x.townguard,50,G.plus,"fh-tg-add-plus50-lurkers",[new it(at.custom,"fh-lurkers","",[],!0)])],st=[new tt(x.double,2,G.multiply,"cs-oak-527",[new it(at.condition,"bless","",[new it(at.specialTarget,"allyShort")])]),new tt(x.double,2,G.multiply,"cs-oak-528",[new it(at.condition,"bless","",[new it(at.specialTarget,"allyShort")])]),new tt(x.double,2,G.multiply,"cs-oak-529",[new it(at.heal,"2","",[new it(at.range,"2")])]),new tt(x.double,2,G.multiply,"cs-oak-530",[new it(at.heal,"2","",[new it(at.range,"2")])]),new tt(x.double,2,G.multiply,"cs-oak-531",[new it(at.element,"wild")]),new tt(x.double,2,G.multiply,"cs-oak-532",[new it(at.element,"wild")]),new tt(x.double,2,G.multiply,"cs-oak-533",[new it(at.custom,"All enemies adjacent to the target suffer %game.damage:1%")]),new tt(x.double,2,G.multiply,"cs-oak-534",[new it(at.custom,"All enemies adjacent to the target suffer %game.damage:1%")]),new tt(x.plus1,1,G.plus,"cs-oak-535",[new it(at.push,"2")],!0),new tt(x.plus1,1,G.plus,"cs-oak-536",[new it(at.push,"2")],!0),new tt(x.plus1,1,G.plus,"cs-oak-537",[new it(at.heal,"1","",[new it(at.range,"2")])],!0),new tt(x.plus1,1,G.plus,"cs-oak-538",[new it(at.heal,"1","",[new it(at.range,"2")])],!0),new tt(x.plus0,0,G.plus,"cs-oak-539",[new it(at.condition,"wound"),new it(at.condition,"muddle")],!0),new tt(x.plus0,0,G.plus,"cs-oak-540",[new it(at.condition,"wound"),new it(at.condition,"muddle")],!0),new tt(x.plus1,1,G.plus,"cs-oak-541",[new it(at.pierce,"3")],!0),new tt(x.plus1,1,G.plus,"cs-oak-542",[new it(at.pierce,"3")],!0)];class gt{constructor(lt=void 0){(0,t.Z)(this,"attackModifiers",void 0),(0,t.Z)(this,"current",void 0),(0,t.Z)(this,"cards",void 0),(0,t.Z)(this,"disgarded",[]),(0,t.Z)(this,"active",!0),this.attackModifiers=JSON.parse(JSON.stringify(lt?lt.filter((_t,H,Jt)=>Jt.indexOf(_t)==H):K)),this.current=-1,this.cards=lt?JSON.parse(JSON.stringify(lt)):dt.map(_t=>K.find(H=>H.id==_t)||new tt(x.invalid,0,G.default,_t))}toModel(){return new I(this.current,this.cards.map(lt=>lt&<.id),this.disgarded,this.active)}merge(lt){this.attackModifiers=lt.attackModifiers,this.current=lt.current,this.cards=lt.cards,this.disgarded=lt.disgarded}}class I{constructor(lt,_t,H,Jt){(0,t.Z)(this,"current",void 0),(0,t.Z)(this,"cards",void 0),(0,t.Z)(this,"disgarded",void 0),(0,t.Z)(this,"active",void 0),this.current=lt,this.cards=_t,this.disgarded=JSON.parse(JSON.stringify(H)),this.active=Jt}}},3281:(q,nt,E)=>{"use strict";E.d(nt,{U9:()=>x,Y:()=>tt});var t=E(1180);class x{constructor(){(0,t.Z)(this,"id",""),(0,t.Z)(this,"name",""),(0,t.Z)(this,"costs",{prosperity:0,lumber:0,metal:0,hide:0,gold:0}),(0,t.Z)(this,"upgrades",[]),(0,t.Z)(this,"manualUpgrades",0),(0,t.Z)(this,"repair",void 0),(0,t.Z)(this,"rebuild",[]),(0,t.Z)(this,"effectNormal",[]),(0,t.Z)(this,"effectWrecked",[]),(0,t.Z)(this,"interactionsAvailable",[]),(0,t.Z)(this,"interactionsUnavailable",[]),(0,t.Z)(this,"requires",""),(0,t.Z)(this,"rewards",[]),(0,t.Z)(this,"prosperityUnlock",!1)}}class tt{constructor(it="",K=1,dt="normal"){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"state",void 0),this.name=it,this.level=K,this.state=dt}}},3788:(q,nt,E)=>{"use strict";E.d(nt,{NU:()=>x,x3:()=>tt});var t=E(1180),x=function(at){return at.algox="algox",at.aesther="aesther",at.harrower="harrower",at.human="human",at.inox="inox",at.lurker="lurker",at.orchid="orchid",at.quatryl="quatryl",at.savvas="savvas",at.unfettered="unfettered",at.valrath="valrath",at.vermling="vermling",at}(x||{}),G=function(at){return at.male="m",at.female="f",at.unknown="",at}(G||{});class tt{constructor(it=void 0){(0,t.Z)(this,"name",""),(0,t.Z)(this,"stats",[]),(0,t.Z)(this,"characterClass",void 0),(0,t.Z)(this,"gender",G.unknown),(0,t.Z)(this,"identities",[]),(0,t.Z)(this,"tokens",[]),(0,t.Z)(this,"primaryToken",-1),(0,t.Z)(this,"handSize",0),(0,t.Z)(this,"unlockEvent",""),(0,t.Z)(this,"retireEvent",""),(0,t.Z)(this,"traits",[]),(0,t.Z)(this,"availableSummons",[]),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"icon",""),(0,t.Z)(this,"iconUrl",""),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"color","#aaaaaa"),(0,t.Z)(this,"noThumbnail",!1),(0,t.Z)(this,"marker",!1),(0,t.Z)(this,"deck",""),(0,t.Z)(this,"perks",[]),(0,t.Z)(this,"additionalModifier",[]),(0,t.Z)(this,"masteries",[]),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"spoiler",!1),(0,t.Z)(this,"locked",!1),(0,t.Z)(this,"errors",void 0),(0,t.Z)(this,"replace",!1),(0,t.Z)(this,"merge",!1),it&&(this.errors=it.errors||[],this.name=it.name,this.stats=it.stats||[],this.characterClass=it.characterClass||void 0,this.gender=it.gender||G.unknown,this.identities=it.identities||[],this.tokens=it.tokens||[],this.primaryToken=it.primaryToken>=0?it.primaryToken:-1,this.handSize=it.handSize||0,this.unlockEvent=it.unlockEvent||"",this.retireEvent=it.retireEvent||"",this.traits=it.traits||[],this.availableSummons=it.availableSummons||[],this.conditions=it.conditions||[],this.edition=it.edition||"",this.icon=it.icon||it.edition+"-"+it.name,this.iconUrl=it.iconUrl||"./assets/images/character/icons/"+this.icon+".svg",this.thumbnail=it.thumbnail||void 0,this.thumbnailUrl=it.thumbnailUrl||void 0,this.noThumbnail=it.noThumbnail,this.color=it.color||"#00000",this.marker=it.marker||!1,this.spoiler=it.spoiler||!1,this.locked=it.locked||!1,this.deck=it.deck||"",this.perks=it.perks||[],this.additionalModifier=it.additionalModifier||[],this.masteries=it.masteries||[],this.replace=it.replace||!1,this.merge=it.merge||!1)}}},2736:(q,nt,E)=>{"use strict";E.d(nt,{a:()=>x});var t=E(1180);class x{constructor(tt,at){(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),this.level=tt,this.health=at}}},9310:(q,nt,E)=>{"use strict";E.d(nt,{CP:()=>G,G3:()=>dt,fT:()=>x,gP:()=>at,hT:()=>it,tT:()=>tt});var t=E(1180),x=function(X){return X.stun="stun",X.immobilize="immobilize",X.disarm="disarm",X.wound="wound",X.muddle="muddle",X.poison="poison",X.strengthen="strengthen",X.invisible="invisible",X.curse="curse",X.bless="bless",X.regenerate="regenerate",X.ward="ward",X.bane="bane",X.brittle="brittle",X.impair="impair",X.chill="chill",X.infect="infect",X.rupture="rupture",X.dodge="dodge",X.empower="empower",X.enfeeble="enfeeble",X.poison_x="poison_x",X.wound_x="wound_x",X.heal="heal",X.shield="shield",X.invalid="invalid",X}(x||{}),G=function(X){return X.action="action",X.standard="standard",X.entity="entity",X.character="character",X.monster="monster",X.upgrade="upgrade",X.stack="stack",X.turn="turn",X.afterTurn="afterTurn",X.expire="expire",X.value="value",X.clearHeal="clearHeal",X.preventHeal="preventHeal",X.apply="apply",X.positive="positive",X.negative="negative",X.double="double",X.expiredIndicator="expiredIndicator",X.hidden="hidden",X.amDeck="amDeck",X}(G||{}),tt=function(X){return X.new="new",X.normal="normal",X.expire="expire",X.removed="removed",X.turn="turn",X}(tt||{});class at{constructor(et,st=1){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"types",[]),(0,t.Z)(this,"value",1),"string"==typeof et&&-1==Object.keys(x).indexOf(et)?(console.warn("Invalid condition name: "+et),this.name=x.invalid):this.name=et,this.value=st,this.types.push(G.action),-1!=[x.stun,x.immobilize,x.disarm,x.wound,x.muddle,x.poison,x.invisible,x.strengthen,x.regenerate,x.infect,x.bane,x.brittle,x.chill,x.ward,x.rupture,x.poison_x,x.wound_x].indexOf(this.name)&&this.types.push(G.entity),-1!=[x.stun,x.immobilize,x.disarm,x.wound,x.muddle,x.poison,x.invisible,x.strengthen,x.regenerate,x.infect,x.bane,x.brittle,x.impair,x.rupture,x.ward,x.dodge].indexOf(this.name)&&this.types.push(G.standard),(-1!=this.types.indexOf(G.entity)||-1!=[x.impair,x.dodge].indexOf(this.name))&&this.types.push(G.character),-1!=this.types.indexOf(G.entity)&&this.types.push(G.monster),-1!=[x.poison_x,x.wound_x].indexOf(this.name)&&(this.types.push(G.upgrade),this.types.push(G.value)),-1!=[x.bless,x.chill,x.curse].indexOf(this.name)&&this.types.push(G.stack),-1!=[x.wound,x.wound_x,x.regenerate].indexOf(this.name)&&this.types.push(G.turn),-1!=[x.bane].indexOf(this.name)&&this.types.push(G.afterTurn),-1!=[x.wound,x.wound_x,x.poison,x.poison_x,x.bane,x.brittle,x.infect,x.rupture].indexOf(this.name)&&this.types.push(G.clearHeal),-1!=[x.poison,x.poison_x,x.ward,x.brittle,x.heal,x.shield].indexOf(this.name)&&this.types.push(G.apply),-1!=[x.poison,x.poison_x].indexOf(this.name)&&this.types.push(G.double),-1!=[x.poison,x.poison_x,x.infect].indexOf(this.name)&&this.types.push(G.preventHeal),-1!=[x.stun,x.immobilize,x.disarm,x.muddle,x.invisible,x.strengthen,x.impair].indexOf(this.name)&&this.types.push(G.expire),-1!=[x.regenerate,x.ward,x.invisible,x.strengthen,x.bless,x.dodge].indexOf(this.name)&&this.types.push(G.positive),-1!=[x.stun].indexOf(this.name)&&this.types.push(G.expiredIndicator),-1!=[x.heal,x.shield].indexOf(this.name)&&(this.types.push(G.positive),this.types.push(G.hidden),this.types.push(G.value)),-1!=[x.bless,x.curse,x.empower,x.enfeeble].indexOf(this.name)&&(this.types.push(G.hidden),this.types.push(G.amDeck)),-1!=[x.invalid].indexOf(this.name)&&this.types.push(G.hidden),-1==this.types.indexOf(G.positive)&&this.types.push(G.negative)}}class it extends at{constructor(et,st=1){super(et,st),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"lastState",void 0),(0,t.Z)(this,"permanent",!1),(0,t.Z)(this,"expired",!1),(0,t.Z)(this,"highlight",!1),this.state=tt.normal,this.lastState=tt.new}toModel(){return new K(this.name,this.value,this.state,this.lastState,this.permanent,this.expired,this.highlight)}fromModel(et){this.name=et.name,this.value=et.value,this.state=et.state,this.lastState=et.lastState,this.permanent=et.permanent,this.expired=et.expired,this.highlight=et.highlight}}class K{constructor(et,st,gt,I,Q,lt,_t){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"value",void 0),(0,t.Z)(this,"state",void 0),(0,t.Z)(this,"lastState",void 0),(0,t.Z)(this,"permanent",void 0),(0,t.Z)(this,"expired",void 0),(0,t.Z)(this,"highlight",!1),this.name=et,this.value=st,this.state=gt,this.lastState=I,this.permanent=Q,this.expired=lt,this.highlight=_t}}const dt=Object.values(x).map(X=>new at(X))},2113:(q,nt,E)=>{"use strict";E.d(nt,{x:()=>x});var t=E(1180);class x{constructor(tt,at,it){(0,t.Z)(this,"name",void 0),(0,t.Z)(this,"character",!1),(0,t.Z)(this,"abilities",void 0),(0,t.Z)(this,"edition",void 0),this.name=tt,this.abilities=at,this.edition=it}}},7680:(q,nt,E)=>{"use strict";E.d(nt,{Bj:()=>at,K8:()=>G,Zd:()=>x,_S:()=>tt});var t=E(1180);const x=[3,8,14,21,29,38,49,63],G=[5,14,26,41,59,80,104,131];class tt{constructor(K,dt,X,et,st,gt,I,Q=void 0,lt=[],_t=[],H=[],Jt=!1,bt=[]){(0,t.Z)(this,"edition",void 0),(0,t.Z)(this,"characters",void 0),(0,t.Z)(this,"monsters",void 0),(0,t.Z)(this,"decks",void 0),(0,t.Z)(this,"scenarios",void 0),(0,t.Z)(this,"sections",void 0),(0,t.Z)(this,"items",void 0),(0,t.Z)(this,"conditions",[]),(0,t.Z)(this,"battleGoals",[]),(0,t.Z)(this,"events",[]),(0,t.Z)(this,"personalQuests",[]),(0,t.Z)(this,"worldMap",void 0),(0,t.Z)(this,"label",{}),(0,t.Z)(this,"labelSpoiler",{}),(0,t.Z)(this,"url",""),(0,t.Z)(this,"logoUrl",""),(0,t.Z)(this,"additional",!1),(0,t.Z)(this,"extensions",[]),(0,t.Z)(this,"newAmStyle",!1),(0,t.Z)(this,"campaign",void 0),(0,t.Z)(this,"treasures",[]),(0,t.Z)(this,"treasureOffset",0),this.edition=K,this.characters=dt,this.monsters=X,this.decks=et,this.scenarios=st,this.sections=gt,this.items=I,Q&&(this.conditions=Q),this.battleGoals=lt,this.events=_t,this.personalQuests=H,this.additional=Jt,this.extensions=bt}}class at{constructor(){(0,t.Z)(this,"campaignStickers",[]),(0,t.Z)(this,"buildings",[]),(0,t.Z)(this,"highMorale",""),(0,t.Z)(this,"lowMorale",""),(0,t.Z)(this,"lootSpecial1Sections",[]),(0,t.Z)(this,"lootSpecial2Sections",[]),(0,t.Z)(this,"townGuardPerks",[]),(0,t.Z)(this,"weeks",{})}}},6140:(q,nt,E)=>{"use strict";E.d(nt,{G3:()=>tt,Jq:()=>at,W_:()=>x,fq:()=>G});var t=E(1180),x=function(it){return it.wild="wild",it.fire="fire",it.ice="ice",it.air="air",it.earth="earth",it.light="light",it.dark="dark",it}(x||{}),G=function(it){return it.strong="strong",it.waning="waning",it.inert="inert",it.new="new",it.consumed="consumed",it.always="always",it}(G||{});class tt{constructor(K){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"state",G.inert),this.type=K}}const at=[new tt(x.fire),new tt(x.ice),new tt(x.air),new tt(x.earth),new tt(x.light),new tt(x.dark)]},377:(q,nt,E)=>{"use strict";E.d(nt,{o:()=>G,r:()=>x});var t=E(1180),x=function(tt){return tt.deck="deck",tt.monsterEdition="monsterEdition",tt.monsterType="monsterType",tt.stat="stat",tt.unknown="unknown",tt}(x||{});class G{constructor(at,...it){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"args",void 0),this.type=at,this.args=it}}},6223:(q,nt,E)=>{"use strict";E.d(nt,{Jc:()=>G,VY:()=>tt,xb:()=>x});var t=E(1180);class x{constructor(it,K){(0,t.Z)(this,"name",""),(0,t.Z)(this,"edition",""),this.name=it,this.edition=K}}class G extends x{constructor(it,K,dt=-1){super(it,K),(0,t.Z)(this,"count",void 0),this.count=dt}}class tt extends x{constructor(it,K,dt=void 0,X=void 0,et=void 0){super(it,K),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"marker",void 0),(0,t.Z)(this,"tags",void 0),this.type=dt,this.marker=X,this.tags=et}}},1235:(q,nt,E)=>{"use strict";E.d(nt,{CT:()=>tt,SE:()=>x});var x=function(at){return at.head="head",at.body="body",at.legs="legs",at.onehand="onehand",at.twohand="twohand",at.small="small",at}(x||{}),tt=function(at){return at.spent="spent",at.consumed="consumed",at.flipped="flipped",at.persistent="persistend",at.slot="slot",at.slotBack="slotBack",at}(tt||{})},6441:(q,nt,E)=>{"use strict";E.d(nt,{CG:()=>G,F8:()=>dt,Qq:()=>tt,XA:()=>x,_8:()=>X,k:()=>at,nk:()=>et,tH:()=>it});var t=E(1180),x=function(st){return st.money="money",st.material_resources="material_resources",st.herb_resources="herb_resources",st.random_item="random_item",st.special="special",st}(x||{}),G=function(st){return st.money="money",st.lumber="lumber",st.metal="metal",st.hide="hide",st.arrowvine="arrowvine",st.axenut="axenut",st.corpsecap="corpsecap",st.flamefruit="flamefruit",st.rockroot="rockroot",st.snowthistle="snowthistle",st.random_item="random_item",st.special1="special1",st.special2="special2",st}(G||{});const tt=[G.lumber,G.metal,G.hide,G.arrowvine,G.axenut,G.corpsecap,G.flamefruit,G.rockroot,G.snowthistle,G.money],at=[G.money,G.lumber,G.metal,G.hide,G.arrowvine,G.axenut,G.corpsecap,G.flamefruit,G.rockroot,G.snowthistle,G.special1,G.special2,G.random_item];function it(st){return st==G.money?x.money:st==G.random_item?x.random_item:st==G.special1||st==G.special2?x.special:-1!=[G.lumber,G.metal,G.hide].indexOf(st)?x.material_resources:x.herb_resources}class K{constructor(gt,I,Q,lt=-1,_t=-1){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value4P",void 0),(0,t.Z)(this,"value3P",void 0),(0,t.Z)(this,"value2P",void 0),(0,t.Z)(this,"enhancements",0),(0,t.Z)(this,"cardId",void 0),(0,t.Z)(this,"value",void 0),this.type=gt,this.cardId=I,this.value4P=Q,this.value3P=Q,this.value2P=Q,-1!=lt&&(this.value3P=lt),-1!=_t&&(this.value2P=_t)}}const dt=[new K(G.money,1361,1),new K(G.money,1362,1),new K(G.money,1363,1),new K(G.money,1364,1),new K(G.money,1365,1),new K(G.money,1366,1),new K(G.money,1367,1),new K(G.money,1368,1),new K(G.money,1369,1),new K(G.money,1370,1),new K(G.money,1371,1),new K(G.money,1372,1),new K(G.money,1373,2),new K(G.money,1374,2),new K(G.money,1375,2),new K(G.money,1376,2),new K(G.money,1377,2),new K(G.money,1378,2),new K(G.money,1379,3),new K(G.money,1380,3),new K(G.arrowvine,1381,1),new K(G.arrowvine,1382,1),new K(G.axenut,1383,1),new K(G.axenut,1384,1),new K(G.corpsecap,1385,1),new K(G.corpsecap,1386,1),new K(G.flamefruit,1387,1),new K(G.flamefruit,1388,1),new K(G.rockroot,1389,1),new K(G.rockroot,1390,1),new K(G.snowthistle,1391,1),new K(G.snowthistle,1392,1),new K(G.hide,1393,1,2,2),new K(G.hide,1394,1,2,2),new K(G.hide,1395,1,2,2),new K(G.hide,1396,1,1,2),new K(G.hide,1397,1,1,2),new K(G.hide,1398,1,1,2),new K(G.hide,1399,1),new K(G.hide,1400,1),new K(G.lumber,1401,1,2,2),new K(G.lumber,1402,1,2,2),new K(G.lumber,1403,1,2,2),new K(G.lumber,1404,1,1,2),new K(G.lumber,1405,1,1,2),new K(G.lumber,1406,1,1,2),new K(G.lumber,1407,1),new K(G.lumber,1408,1),new K(G.metal,1408,1,2,2),new K(G.metal,1410,1,2,2),new K(G.metal,1411,1,2,2),new K(G.metal,1412,1,1,2),new K(G.metal,1413,1,1,2),new K(G.metal,1414,1,1,2),new K(G.metal,1415,1),new K(G.metal,1416,1),new K(G.random_item,1417,1),new K(G.special1,1418,1),new K(G.special2,1419,1)];class X{constructor(){(0,t.Z)(this,"current",-1),(0,t.Z)(this,"cards",[]),(0,t.Z)(this,"active",!1)}fromModel(gt){this.current=gt.current,this.cards=gt.cards,this.cards.forEach((I,Q,lt)=>{I.value&&(isNaN(+I.value)?"%game.loot.player.3-4% +1/%game.loot.player.2% +2"==I.value?(I.value4P=1,I.value3P=1,I.value2P=2):"%game.loot.player.4% +1/%game.loot.player.2-3% +2"==I.value?(I.value4P=1,I.value3P=2,I.value2P=2):console.warn("Cannot migrate loot: "+I.value):(I.value4P=+I.value,I.value3P=+I.value,I.value2P=+I.value),I.value=void 0)}),et(this.cards),this.active=gt.active}}function et(st){st.forEach((gt,I,Q)=>{if(!gt.cardId){const lt=dt.find(_t=>_t.type==gt.type&&_t.value2P==gt.value2P&&_t.value3P==gt.value3P&&_t.value4P==gt.value4P&&!Q.find(H=>H.cardId==_t.cardId));lt?gt.cardId=lt.cardId:console.warn("Cannot map cardId for loot:",gt)}})}},7866:(q,nt,E)=>{"use strict";E.d(nt,{A:()=>tt});var t=E(1180),x=E(9144),G=E(4377);class tt{constructor(it=void 0){(0,t.Z)(this,"name",""),(0,t.Z)(this,"count",0),(0,t.Z)(this,"standeeCount",void 0),(0,t.Z)(this,"standeeShare",void 0),(0,t.Z)(this,"standeeShareEdition",void 0),(0,t.Z)(this,"baseStat",new x.c(G.M.normal,0,0,0,0,0)),(0,t.Z)(this,"stats",[]),(0,t.Z)(this,"deck",""),(0,t.Z)(this,"boss",!1),(0,t.Z)(this,"flying",!1),(0,t.Z)(this,"immortal",!1),(0,t.Z)(this,"thumbnail",void 0),(0,t.Z)(this,"thumbnailUrl",void 0),(0,t.Z)(this,"noThumbnail",!1),(0,t.Z)(this,"noArtwork",!1),(0,t.Z)(this,"catching",!1),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"spoiler",!1),(0,t.Z)(this,"errors",[]),(0,t.Z)(this,"hidden",!1),(0,t.Z)(this,"replace",!1),(0,t.Z)(this,"tags",[]),it&&(this.name=it.name,this.count=it.count,this.standeeCount=it.standeeCount,this.standeeShare=it.standeeShare,this.standeeShareEdition=it.standeeShareEdition,this.baseStat=it.baseStat,this.stats=it.stats,this.deck=it.deck,this.boss=it.boss,this.flying=it.flying,this.immortal=it.immortal,this.thumbnail=it.thumbnail,this.thumbnailUrl=it.thumbnailUrl,this.noThumbnail=it.noThumbnail,this.noArtwork=it.noArtwork,this.catching=it.catching,this.edition=it.edition,this.spoiler=it.spoiler,this.errors=it.errors||[],this.hidden=it.hidden,this.replace=it.replace,this.tags=it.tags||[])}}},9144:(q,nt,E)=>{"use strict";E.d(nt,{c:()=>x});var t=E(1180);class x{constructor(at,it,K,dt,X,et,st=[],gt=[],I=[],Q=""){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"level",void 0),(0,t.Z)(this,"health",void 0),(0,t.Z)(this,"movement",void 0),(0,t.Z)(this,"attack",void 0),(0,t.Z)(this,"range",void 0),(0,t.Z)(this,"actions",void 0),(0,t.Z)(this,"immunities",void 0),(0,t.Z)(this,"special",void 0),(0,t.Z)(this,"note",void 0),this.type=at,this.level=it,this.health=K,this.movement=dt,this.attack=X,this.range=et,this.actions=st||[],this.immunities=gt||[],this.special=I||[],this.note=Q}}},4377:(q,nt,E)=>{"use strict";E.d(nt,{M:()=>t});var t=function(x){return x.normal="normal",x.elite="elite",x.boss="boss",x}(t||{})},2501:(q,nt,E)=>{"use strict";E.d(nt,{Ib:()=>tt}),E(2098);var tt=function(at){return at.add="add",at.remove="remove",at.replace="replace",at.custom="custom",at}(tt||{})},9148:(q,nt,E)=>{"use strict";E.d(nt,{Hj:()=>at,KI:()=>tt,Qw:()=>G});var t=E(1180);class G{constructor(dt){(0,t.Z)(this,"name",""),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"tags",[]),(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"player2",void 0),(0,t.Z)(this,"player3",void 0),(0,t.Z)(this,"player4",void 0),(0,t.Z)(this,"health",void 0),this.name=dt}}class tt{constructor(dt,X=-1){if((0,t.Z)(this,"index",0),(0,t.Z)(this,"goal",!1),(0,t.Z)(this,"rewards",[]),this.index=X,"G"==dt)this.goal=!0;else{let et=dt.split("|");for(let st of et)this.rewards.push(new it(st))}}}var at=function(K){return K.custom="custom",K.gold="gold",K.goldFh="goldFh",K.experience="experience",K.experienceFh="experienceFh",K.battleGoal="battleGoal",K.damage="damage",K.condition="condition",K.heal="heal",K.item="item",K.itemFh="itemFh",K.itemDesign="itemDesign",K.randomItem="randomItem",K.randomItemDesign="randomItemDesign",K.itemBlueprint="itemBlueprint",K.randomItemBlueprint="randomItemBlueprint",K.scenario="scenario",K.randomScenario="randomScenario",K.randomScenarioFh="randomScenarioFh",K.partyAchievement="partyAchievement",K.event="event",K.loot="loot",K.lootCards="lootCards",K.resource="resource",K.campaignSticker="campaignSticker",K.calendarSection="calendarSection",K}(at||{});class it{constructor(dt){(0,t.Z)(this,"type",void 0),(0,t.Z)(this,"value",void 0);let X=dt.split(":");try{this.type=X[0],X.length>1&&(this.value=isNaN(+X[1])?X[1]:+X[1])}catch{this.type=at.custom,console.error("Invalid treasure reward string: '"+dt+"'")}}}},301:(q,nt,E)=>{"use strict";E.d(nt,{ZW:()=>it,tR:()=>x});var t=E(1180);class x{constructor(dt=void 0){(0,t.Z)(this,"name",""),(0,t.Z)(this,"index",""),(0,t.Z)(this,"gridLocation",""),(0,t.Z)(this,"coordinates",void 0),(0,t.Z)(this,"unlocks",[]),(0,t.Z)(this,"blocks",[]),(0,t.Z)(this,"requires",[]),(0,t.Z)(this,"requirements",[]),(0,t.Z)(this,"links",[]),(0,t.Z)(this,"forcedLinks",[]),(0,t.Z)(this,"group",void 0),(0,t.Z)(this,"monsters",[]),(0,t.Z)(this,"allies",[]),(0,t.Z)(this,"allied",[]),(0,t.Z)(this,"drawExtra",[]),(0,t.Z)(this,"objectives",[]),(0,t.Z)(this,"rooms",[]=[]),(0,t.Z)(this,"marker",""),(0,t.Z)(this,"rules",[]),(0,t.Z)(this,"initial",!1),(0,t.Z)(this,"random",!1),(0,t.Z)(this,"solo",void 0),(0,t.Z)(this,"allyDeck",!1),(0,t.Z)(this,"lootDeckConfig",{}),(0,t.Z)(this,"parent",void 0),(0,t.Z)(this,"parentSections",[]),(0,t.Z)(this,"blockedSections",[]),(0,t.Z)(this,"resetRound",void 0),(0,t.Z)(this,"rewards",void 0),(0,t.Z)(this,"retirement",""),(0,t.Z)(this,"conclusion",!1),(0,t.Z)(this,"named",!1),(0,t.Z)(this,"hideIndex",!1),(0,t.Z)(this,"complexity",0),(0,t.Z)(this,"edition",""),(0,t.Z)(this,"spoiler",!1),dt&&(this.name=dt.name,this.index=dt.index,this.gridLocation=dt.gridLocation,this.unlocks=dt.unlocks,this.blocks=dt.blocks,this.requires=dt.requires,this.requirements=dt.requirements||[],this.links=dt.links,this.forcedLinks=dt.forcedLinks,this.group=dt.group,this.monsters=dt.monsters,this.allies=dt.allies,this.allied=dt.allied,this.drawExtra=dt.drawExtra,this.objectives=dt.objectives,this.rooms=dt.rooms,this.marker=dt.marker,this.rules=dt.rules,this.initial=dt.initial,this.random=dt.random,this.solo=dt.solo,this.allyDeck=dt.allyDeck,this.lootDeckConfig=dt.lootDeckConfig,this.parent=dt.parent,this.parentSections=dt.parentSections,this.blockedSections=dt.blockedSections,this.resetRound=dt.resetRound,this.rewards=dt.rewards,this.retirement=dt.retirement,this.conclusion=dt.conclusion,this.edition=dt.edition,this.spoiler=dt.spoiler,this.named=dt.named,this.hideIndex=dt.hideIndex,this.complexity=dt.complexity)}}class it{constructor(){(0,t.Z)(this,"conclusion",void 0),(0,t.Z)(this,"success",!1),(0,t.Z)(this,"battleGoals",[]),(0,t.Z)(this,"collectiveGold",[]),(0,t.Z)(this,"items",[]),(0,t.Z)(this,"chooseLocation",void 0),(0,t.Z)(this,"chooseUnlockCharacter",void 0),(0,t.Z)(this,"challenges",0),(0,t.Z)(this,"calendarSectionConditional",[]),(0,t.Z)(this,"calenderSectionManual",[]),(0,t.Z)(this,"calendarSectionManual",[]),(0,t.Z)(this,"randomItem",void 0),(0,t.Z)(this,"randomItemIndex",-1),(0,t.Z)(this,"randomItems",[]),(0,t.Z)(this,"randomItemBlueprints",[])}}},8927:(q,nt,E)=>{"use strict";E.d(nt,{Hy:()=>gt,NB:()=>it,Ul:()=>at,eL:()=>dt,lz:()=>et,q_:()=>K,sm:()=>I,uZ:()=>X,wE:()=>tt});var t=E(9594),x=E(731);function G(){return+window.getComputedStyle(document.body).getPropertyValue("--ghs-width").replace(/[^\d\+]/g,"")/+window.getComputedStyle(document.body).getPropertyValue("--ghs-factor")}function tt(Q){let _t,lt=Q.length;for(;0!=lt;)_t=Math.floor(Math.random()*lt),lt--,[Q[lt],Q[_t]]=[Q[_t],Q[lt]];return Q}function at(Q,lt=!1){return lt?Q.filter(_t=>_t.spoiler&&-1==x.r.settings.spoilers.indexOf(_t.name)).length>1:Q.some(_t=>_t.spoiler&&-1==x.r.settings.spoilers.indexOf(_t.name))}function it(Q){return!Q.spoiler||-1!=x.r.settings.spoilers.indexOf("[ALL]")||-1!=x.r.settings.spoilers.indexOf(Q.name)}function K(Q){return Q.filter(lt=>!it(lt))}function dt(Q,lt,_t=!1){return _t?Q.toLowerCase()==lt.toLowerCase():lt.split(" ").every(H=>-1!=Q.toLowerCase().indexOf(H.toLowerCase()))}function X(Q,lt=!1){return Q>0?"+"+Q:lt&&0==Q?"-":""+Q}function et(){x.r.settings.fullscreen&&document.fullscreenElement&&(document.exitFullscreen(),document.body.classList.add("fullscreen")),window.addEventListener("focus",st,!0)}function st(Q){setTimeout(()=>{if(x.r.settings.fullscreen&&!document.fullscreenElement){try{document.body.requestFullscreen()}catch{}document.body.classList.remove("fullscreen")}window.removeEventListener("focus",st,!0)})}function gt(Q,lt){return(Q%lt+lt)%lt}function I(Q="right"){const H=[new t.tR({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"},1.5*G(),-3*G()),new t.tR({originX:"end",originY:"center"},{overlayX:"start",overlayY:"center"}),new t.tR({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"},1.5*G(),3*G())],Jt=[new t.tR({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"},-1.5*G(),-3*G()),new t.tR({originX:"start",originY:"center"},{overlayX:"end",overlayY:"center"}),new t.tR({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"},-1.5*G(),3*G())],bt=[new t.tR({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"},0,3*G()),new t.tR({originX:"center",originY:"center"},{overlayX:"center",overlayY:"center"}),new t.tR({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"},0,-3*G())];switch(Q){case"right":return[...H,...Jt,...bt];case"left":return[...Jt,...H,...bt];case"center":return[...bt,...Jt,...H]}}},2794:(q,nt,E)=>{"use strict";var t=E(9468),x=E(6814); /** * @license Angular v16.2.11 * (c) 2010-2022 Google LLC. https://angular.io/ @@ -36,7 +36,7 @@ const bl="Service workers are disabled or not supported by this browser";class q * @license Angular v16.2.11 * (c) 2010-2022 Google LLC. https://angular.io/ * License: MIT - */const tn="primary",Qr=Symbol("RouteTitle");class PC{constructor(a){this.params=a||{}}has(a){return Object.prototype.hasOwnProperty.call(this.params,a)}get(a){if(this.has(a)){const n=this.params[a];return Array.isArray(n)?n[0]:n}return null}getAll(a){if(this.has(a)){const n=this.params[a];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}}function Zs(o){return new PC(o)}function yC(o,a,n){const e=n.path.split("/");if(e.length>o.length||"full"===n.pathMatch&&(a.hasChildren()||e.lengthe[s]===i)}return o===a}function xC(o){return o.length>0?o[o.length-1]:null}function Rr(o){return function CC(o){return!!o&&(o instanceof ma.y||(0,Cs.m)(o.lift)&&(0,Cs.m)(o.subscribe))}(o)?o:(0,t.QGY)(o)?(0,Qi.D)(Promise.resolve(o)):(0,Se.of)(o)}const Ob={exact:function Pb(o,a,n){if(!Fr(o.segments,a.segments)||!xu(o.segments,a.segments,n)||o.numberOfChildren!==a.numberOfChildren)return!1;for(const e in a.children)if(!o.children[e]||!Pb(o.children[e],a.children[e],n))return!1;return!0},subset:wC},Pu={exact:function yu(o,a){return zo(o,a)},subset:function yb(o,a){return Object.keys(a).length<=Object.keys(o).length&&Object.keys(a).every(n=>bC(o[n],a[n]))},ignored:()=>!0};function dd(o,a,n){return Ob[n.paths](o.root,a.root,n.matrixParams)&&Pu[n.queryParams](o.queryParams,a.queryParams)&&!("exact"===n.fragment&&o.fragment!==a.fragment)}function wC(o,a,n){return bu(o,a,a.segments,n)}function bu(o,a,n,e){if(o.segments.length>n.length){const i=o.segments.slice(0,n.length);return!(!Fr(i,n)||a.hasChildren()||!xu(i,n,e))}if(o.segments.length===n.length){if(!Fr(o.segments,n)||!xu(o.segments,n,e))return!1;for(const i in a.children)if(!o.children[i]||!wC(o.children[i],a.children[i],e))return!1;return!0}{const i=n.slice(0,o.segments.length),s=n.slice(o.segments.length);return!!(Fr(o.segments,i)&&xu(o.segments,i,e)&&o.children[tn])&&bu(o.children[tn],a,s,e)}}function xu(o,a,n){return a.every((e,i)=>Pu[n](o[i].parameters,e.parameters))}class Rc{constructor(a=new qn([],{}),n={},e=null){this.root=a,this.queryParams=n,this.fragment=e}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zs(this.queryParams)),this._queryParamMap}toString(){return bb.serialize(this)}}class qn{constructor(a,n){this.segments=a,this.children=n,this.parent=null,Object.values(n).forEach(e=>e.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return _d(this)}}class hd{constructor(a,n){this.path=a,this.parameters=n}get parameterMap(){return this._parameterMap||(this._parameterMap=Zs(this.parameters)),this._parameterMap}toString(){return ZC(this)}}function Fr(o,a){return o.length===a.length&&o.every((n,e)=>n.path===a[e].path)}let ud=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return new Fp},providedIn:"root"}),a})();class Fp{parse(a){const n=new DC(a);return new Rc(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(a){const n=`/${Fc(a.root,!0)}`,e=function wb(o){const a=Object.keys(o).map(n=>{const e=o[n];return Array.isArray(e)?e.map(i=>`${ku(n)}=${ku(i)}`).join("&"):`${ku(n)}=${ku(e)}`}).filter(n=>!!n);return a.length?`?${a.join("&")}`:""}(a.queryParams);return`${n}${e}${"string"==typeof a.fragment?`#${function Tu(o){return encodeURI(o)}(a.fragment)}`:""}`}}const bb=new Fp;function _d(o){return o.segments.map(a=>ZC(a)).join("/")}function Fc(o,a){if(!o.hasChildren())return _d(o);if(a){const n=o.children[tn]?Fc(o.children[tn],!1):"",e=[];return Object.entries(o.children).forEach(([i,s])=>{i!==tn&&e.push(`${i}:${Fc(s,!1)}`)}),e.length>0?`${n}(${e.join("//")})`:n}{const n=function TC(o,a){let n=[];return Object.entries(o.children).forEach(([e,i])=>{e===tn&&(n=n.concat(a(i,e)))}),Object.entries(o.children).forEach(([e,i])=>{e!==tn&&(n=n.concat(a(i,e)))}),n}(o,(e,i)=>i===tn?[Fc(o.children[tn],!1)]:[`${i}:${Fc(e,!1)}`]);return 1===Object.keys(o.children).length&&null!=o.children[tn]?`${_d(o)}/${n[0]}`:`${_d(o)}/(${n.join("//")})`}}function wu(o){return encodeURIComponent(o).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ku(o){return wu(o).replace(/%3B/gi,";")}function ql(o){return wu(o).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Hl(o){return decodeURIComponent(o)}function qp(o){return Hl(o.replace(/\+/g,"%20"))}function ZC(o){return`${ql(o.path)}${function xb(o){return Object.keys(o).map(a=>`;${ql(a)}=${ql(o[a])}`).join("")}(o.parameters)}`}const Zu=/^[^\/()?;#]+/;function jl(o){const a=o.match(Zu);return a?a[0]:""}const AC=/^[^\/()?;=#]+/,kb=/^[^=?&#]+/,EC=/^[^&#]+/;class DC{constructor(a){this.url=a,this.remaining=a}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new qn([],{}):new qn([],this.parseChildren())}parseQueryParams(){const a={};if(this.consumeOptional("?"))do{this.parseQueryParam(a)}while(this.consumeOptional("&"));return a}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const a=[];for(this.peekStartsWith("(")||a.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),a.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let e={};return this.peekStartsWith("(")&&(e=this.parseParens(!1)),(a.length>0||Object.keys(n).length>0)&&(e[tn]=new qn(a,n)),e}parseSegment(){const a=jl(this.remaining);if(""===a&&this.peekStartsWith(";"))throw new t.vHH(4009,!1);return this.capture(a),new hd(Hl(a),this.parseMatrixParams())}parseMatrixParams(){const a={};for(;this.consumeOptional(";");)this.parseParam(a);return a}parseParam(a){const n=function SC(o){const a=o.match(AC);return a?a[0]:""}(this.remaining);if(!n)return;this.capture(n);let e="";if(this.consumeOptional("=")){const i=jl(this.remaining);i&&(e=i,this.capture(e))}a[Hl(n)]=Hl(e)}parseQueryParam(a){const n=function Tb(o){const a=o.match(kb);return a?a[0]:""}(this.remaining);if(!n)return;this.capture(n);let e="";if(this.consumeOptional("=")){const l=function Hp(o){const a=o.match(EC);return a?a[0]:""}(this.remaining);l&&(e=l,this.capture(e))}const i=qp(n),s=qp(e);if(a.hasOwnProperty(i)){let l=a[i];Array.isArray(l)||(l=[l],a[i]=l),l.push(s)}else a[i]=s}parseParens(a){const n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const e=jl(this.remaining),i=this.remaining[e.length];if("/"!==i&&")"!==i&&";"!==i)throw new t.vHH(4010,!1);let s;e.indexOf(":")>-1?(s=e.slice(0,e.indexOf(":")),this.capture(s),this.capture(":")):a&&(s=tn);const l=this.parseChildren();n[s]=1===Object.keys(l).length?l[tn]:new qn([],l),this.consumeOptional("//")}return n}peekStartsWith(a){return this.remaining.startsWith(a)}consumeOptional(a){return!!this.peekStartsWith(a)&&(this.remaining=this.remaining.substring(a.length),!0)}capture(a){if(!this.consumeOptional(a))throw new t.vHH(4011,!1)}}function Au(o){return o.segments.length>0?new qn([],{[tn]:o}):o}function jp(o){const a={};for(const e of Object.keys(o.children)){const s=jp(o.children[e]);if(e===tn&&0===s.segments.length&&s.hasChildren())for(const[l,m]of Object.entries(s.children))a[l]=m;else(s.segments.length>0||s.hasChildren())&&(a[e]=s)}return function Zb(o){if(1===o.numberOfChildren&&o.children[tn]){const a=o.children[tn];return new qn(o.segments.concat(a.segments),a.children)}return o}(new qn(o.segments,a))}function qr(o){return o instanceof Rc}function Bp(o){let a;const i=Au(function n(s){const l={};for(const O of s.children){const k=n(O);l[O.outlet]=k}const m=new qn(s.url,l);return s===o&&(a=m),m}(o.root));return a??i}function zp(o,a,n,e){let i=o;for(;i.parent;)i=i.parent;if(0===a.length)return Gp(i,i,i,n,e);const s=function NC(o){if("string"==typeof o[0]&&1===o.length&&"/"===o[0])return new fd(!0,0,o);let a=0,n=!1;const e=o.reduce((i,s,l)=>{if("object"==typeof s&&null!=s){if(s.outlets){const m={};return Object.entries(s.outlets).forEach(([O,k])=>{m[O]="string"==typeof k?k.split("/"):k}),[...i,{outlets:m}]}if(s.segmentPath)return[...i,s.segmentPath]}return"string"!=typeof s?[...i,s]:0===l?(s.split("/").forEach((m,O)=>{0==O&&"."===m||(0==O&&""===m?n=!0:".."===m?a++:""!=m&&i.push(m))}),i):[...i,s]},[]);return new fd(n,a,e)}(a);if(s.toRoot())return Gp(i,i,new qn([],{}),n,e);const l=function JC(o,a,n){if(o.isAbsolute)return new md(a,!0,0);if(!n)return new md(a,!1,NaN);if(null===n.parent)return new md(n,!0,0);const e=Su(o.commands[0])?0:1;return function UC(o,a,n){let e=o,i=a,s=n;for(;s>i;){if(s-=i,e=e.parent,!e)throw new t.vHH(4005,!1);i=e.segments.length}return new md(e,!1,i-s)}(n,n.segments.length-1+e,o.numberOfDoubleDots)}(s,i,o),m=l.processChildren?Bl(l.segmentGroup,l.index,s.commands):Vp(l.segmentGroup,l.index,s.commands);return Gp(i,l.segmentGroup,m,n,e)}function Su(o){return"object"==typeof o&&null!=o&&!o.outlets&&!o.segmentPath}function pd(o){return"object"==typeof o&&null!=o&&o.outlets}function Gp(o,a,n,e,i){let l,s={};e&&Object.entries(e).forEach(([O,k])=>{s[O]=Array.isArray(k)?k.map(W=>`${W}`):`${k}`}),l=o===a?n:Eu(o,a,n);const m=Au(jp(l));return new Rc(m,s,i)}function Eu(o,a,n){const e={};return Object.entries(o.children).forEach(([i,s])=>{e[i]=s===a?n:Eu(s,a,n)}),new qn(o.segments,e)}class fd{constructor(a,n,e){if(this.isAbsolute=a,this.numberOfDoubleDots=n,this.commands=e,a&&e.length>0&&Su(e[0]))throw new t.vHH(4003,!1);const i=e.find(pd);if(i&&i!==xC(e))throw new t.vHH(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class md{constructor(a,n,e){this.segmentGroup=a,this.processChildren=n,this.index=e}}function Vp(o,a,n){if(o||(o=new qn([],{})),0===o.segments.length&&o.hasChildren())return Bl(o,a,n);const e=function QC(o,a,n){let e=0,i=a;const s={match:!1,pathIndex:0,commandIndex:0};for(;i=n.length)return s;const l=o.segments[i],m=n[e];if(pd(m))break;const O=`${m}`,k=e0&&void 0===O)break;if(O&&k&&"object"==typeof k&&void 0===k.outlets){if(!FC(O,k,l))return s;e+=2}else{if(!FC(O,{},l))return s;e++}i++}return{match:!0,pathIndex:i,commandIndex:e}}(o,a,n),i=n.slice(e.commandIndex);if(e.match&&e.pathIndexs!==tn)&&o.children[tn]&&1===o.numberOfChildren&&0===o.children[tn].segments.length){const s=Bl(o.children[tn],a,n);return new qn(o.segments,s.children)}return Object.entries(e).forEach(([s,l])=>{"string"==typeof l&&(l=[l]),null!==l&&(i[s]=Vp(o.children[s],a,l))}),Object.entries(o.children).forEach(([s,l])=>{void 0===e[s]&&(i[s]=l)}),new qn(o.segments,i)}}function zl(o,a,n){const e=o.segments.slice(0,a);let i=0;for(;i{"string"==typeof e&&(e=[e]),null!==e&&(a[n]=zl(new qn([],{}),0,e))}),a}function RC(o){const a={};return Object.entries(o).forEach(([n,e])=>a[n]=`${e}`),a}function FC(o,a,n){return o==n.path&&zo(a,n.parameters)}const qc="imperative";class lo{constructor(a,n){this.id=a,this.url=n}}class Gl extends lo{constructor(a,n,e="imperative",i=null){super(a,n),this.type=0,this.navigationTrigger=e,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class jr extends lo{constructor(a,n,e){super(a,n),this.urlAfterRedirects=e,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Hc extends lo{constructor(a,n,e,i){super(a,n),this.reason=e,this.code=i,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class vd extends lo{constructor(a,n,e,i){super(a,n),this.reason=e,this.code=i,this.type=16}}class Yp extends lo{constructor(a,n,e,i){super(a,n),this.error=e,this.target=i,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class qC extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ab extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class HC extends lo{constructor(a,n,e,i,s){super(a,n),this.urlAfterRedirects=e,this.state=i,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Sb extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ei extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jC{constructor(a){this.route=a,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Eb{constructor(a){this.route=a,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Db{constructor(a){this.snapshot=a,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BC{constructor(a){this.snapshot=a,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ib{constructor(a){this.snapshot=a,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class zC{constructor(a){this.snapshot=a,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Kp{constructor(a,n,e){this.routerEvent=a,this.position=n,this.anchor=e,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Br{}class $p{constructor(a){this.url=a}}class GC{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Cd,this.attachRef=null}}let Cd=(()=>{var o;class a{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const s=this.getOrCreateContext(e);s.outlet=i,this.contexts.set(e,s)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new GC,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();class Wp{constructor(a){this._root=a}get root(){return this._root.value}parent(a){const n=this.pathFromRoot(a);return n.length>1?n[n.length-2]:null}children(a){const n=VC(a,this._root);return n?n.children.map(e=>e.value):[]}firstChild(a){const n=VC(a,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(a){const n=Md(a,this._root);return n.length<2?[]:n[n.length-2].children.map(i=>i.value).filter(i=>i!==a)}pathFromRoot(a){return Md(a,this._root).map(n=>n.value)}}function VC(o,a){if(o===a.value)return a;for(const n of a.children){const e=VC(o,n);if(e)return e}return null}function Md(o,a){if(o===a.value)return[a];for(const n of a.children){const e=Md(o,n);if(e.length)return e.unshift(a),e}return[]}class qa{constructor(a,n){this.value=a,this.children=n}toString(){return`TreeNode(${this.value})`}}function go(o){const a={};return o&&o.children.forEach(n=>a[n.value.outlet]=n),a}class YC extends Wp{constructor(a,n){super(a),this.snapshot=n,tf(this,a)}toString(){return this.snapshot.toString()}}function Xp(o,a){const n=function As(o,a){const l=new Od([],{},{},"",{},tn,a,null,{});return new $C("",new qa(l,[]))}(0,a),e=new zn.X([new hd("",{})]),i=new zn.X({}),s=new zn.X({}),l=new zn.X({}),m=new zn.X(""),O=new ri(e,i,l,m,s,tn,a,n.root);return O.snapshot=n.root,new YC(new qa(O,[]),n)}class ri{constructor(a,n,e,i,s,l,m,O){this.urlSubject=a,this.paramsSubject=n,this.queryParamsSubject=e,this.fragmentSubject=i,this.dataSubject=s,this.outlet=l,this.component=m,this._futureSnapshot=O,this.title=this.dataSubject?.pipe((0,bn.U)(k=>k[Qr]))??(0,Se.of)(void 0),this.url=a,this.params=n,this.queryParams=e,this.fragment=i,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,bn.U)(a=>Zs(a)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,bn.U)(a=>Zs(a)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Pa(o,a="emptyOnly"){const n=o.pathFromRoot;let e=0;if("always"!==a)for(e=n.length-1;e>=1;){const i=n[e],s=n[e-1];if(i.routeConfig&&""===i.routeConfig.path)e--;else{if(s.component)break;e--}}return function KC(o){return o.reduce((a,n)=>({params:{...a.params,...n.params},data:{...a.data,...n.data},resolve:{...n.data,...a.resolve,...n.routeConfig?.data,...n._resolvedData}}),{params:{},data:{},resolve:{}})}(n.slice(e))}class Od{get title(){return this.data?.[Qr]}constructor(a,n,e,i,s,l,m,O,k){this.url=a,this.params=n,this.queryParams=e,this.fragment=i,this.data=s,this.outlet=l,this.component=m,this.routeConfig=O,this._resolve=k}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Zs(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zs(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(e=>e.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class $C extends Wp{constructor(a,n){super(n),this.url=a,tf(this,n)}toString(){return WC(this._root)}}function tf(o,a){a.value._routerState=o,a.children.forEach(n=>tf(o,n))}function WC(o){const a=o.children.length>0?` { ${o.children.map(WC).join(", ")} } `:"";return`${o.value}${a}`}function ef(o){if(o.snapshot){const a=o.snapshot,n=o._futureSnapshot;o.snapshot=n,zo(a.queryParams,n.queryParams)||o.queryParamsSubject.next(n.queryParams),a.fragment!==n.fragment&&o.fragmentSubject.next(n.fragment),zo(a.params,n.params)||o.paramsSubject.next(n.params),function Mb(o,a){if(o.length!==a.length)return!1;for(let n=0;nzo(n.parameters,a[e].parameters))}(o.url,a.url);return n&&!(!o.parent!=!a.parent)&&(!o.parent||Pd(o.parent,a.parent))}let jc=(()=>{var o;class a{constructor(){this.activated=null,this._activatedRoute=null,this.name=tn,this.activateEvents=new t.vpe,this.deactivateEvents=new t.vpe,this.attachEvents=new t.vpe,this.detachEvents=new t.vpe,this.parentContexts=(0,t.f3M)(Cd),this.location=(0,t.f3M)(t.s_b),this.changeDetector=(0,t.f3M)(t.sBO),this.environmentInjector=(0,t.f3M)(t.lqb),this.inputBinder=(0,t.f3M)(yd,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:s}=e.name;if(i)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new t.vHH(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new t.vHH(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new t.vHH(4012,!1);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new t.vHH(4013,!1);this._activatedRoute=e;const s=this.location,m=e.snapshot.component,O=this.parentContexts.getOrCreateContext(this.name).children,k=new Nb(e,O,s.injector);this.activated=s.createComponent(m,{index:s.length,injector:k,environmentInjector:i??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275dir=t.lG2({type:o,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[t.TTD]}),a})();class Nb{constructor(a,n,e){this.route=a,this.childContexts=n,this.parent=e}get(a,n){return a===ri?this.route:a===Cd?this.childContexts:this.parent.get(a,n)}}const yd=new t.OlP("");let XC=(()=>{var o;class a{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){const{activatedRoute:i}=e,s=Eg([i.queryParams,i.params,i.data]).pipe((0,ro.w)(([l,m,O],k)=>(O={...l,...m,...O},0===k?(0,Se.of)(O):Promise.resolve(O)))).subscribe(l=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||null===i.component)return void this.unsubscribeFromRouteData(e);const m=(0,t.qFp)(i.component);if(m)for(const{templateName:O}of m.inputs)e.activatedComponentRef.setInput(O,l[O]);else this.unsubscribeFromRouteData(e)});this.outletDataSubscriptions.set(e,s)}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac}),a})();function Vl(o,a,n){if(n&&o.shouldReuseRoute(a.value,n.value.snapshot)){const e=n.value;e._futureSnapshot=a.value;const i=function tM(o,a,n){return a.children.map(e=>{for(const i of n.children)if(o.shouldReuseRoute(e.value,i.value.snapshot))return Vl(o,e,i);return Vl(o,e)})}(o,a,n);return new qa(e,i)}{if(o.shouldAttach(a.value)){const s=o.retrieve(a.value);if(null!==s){const l=s.route;return l.value._futureSnapshot=a.value,l.children=a.children.map(m=>Vl(o,m)),l}}const e=function Du(o){return new ri(new zn.X(o.url),new zn.X(o.params),new zn.X(o.queryParams),new zn.X(o.fragment),new zn.X(o.data),o.outlet,o.component,o)}(a.value),i=a.children.map(s=>Vl(o,s));return new qa(e,i)}}const nf="ngNavigationCancelingError";function af(o,a){const{redirectTo:n,navigationBehaviorOptions:e}=qr(a)?{redirectTo:a,navigationBehaviorOptions:void 0}:a,i=sf(!1,0,a);return i.url=n,i.navigationBehaviorOptions=e,i}function sf(o,a,n){const e=new Error("NavigationCancelingError: "+(o||""));return e[nf]=!0,e.cancellationCode=a,n&&(e.url=n),e}function nM(o){return o&&o[nf]}let iM=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["ng-component"]],standalone:!0,features:[t.jDz],decls:1,vars:0,template:function(e,i){1&e&&t._UZ(0,"router-outlet")},dependencies:[jc],encapsulation:2}),a})();function Iu(o){const a=o.children&&o.children.map(Iu),n=a?{...o,children:a}:{...o};return!n.component&&!n.loadComponent&&(a||n.loadChildren)&&n.outlet&&n.outlet!==tn&&(n.component=iM),n}function ya(o){return o.outlet||tn}function bd(o){if(!o)return null;if(o.routeConfig?._injector)return o.routeConfig._injector;for(let a=o.parent;a;a=a.parent){const n=a.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}class Rb{constructor(a,n,e,i,s){this.routeReuseStrategy=a,this.futureState=n,this.currState=e,this.forwardEvent=i,this.inputBindingEnabled=s}activate(a){const n=this.futureState._root,e=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,e,a),ef(this.futureState.root),this.activateChildRoutes(n,e,a)}deactivateChildRoutes(a,n,e){const i=go(n);a.children.forEach(s=>{const l=s.value.outlet;this.deactivateRoutes(s,i[l],e),delete i[l]}),Object.values(i).forEach(s=>{this.deactivateRouteAndItsChildren(s,e)})}deactivateRoutes(a,n,e){const i=a.value,s=n?n.value:null;if(i===s)if(i.component){const l=e.getContext(i.outlet);l&&this.deactivateChildRoutes(a,n,l.children)}else this.deactivateChildRoutes(a,n,e);else s&&this.deactivateRouteAndItsChildren(n,e)}deactivateRouteAndItsChildren(a,n){a.value.component&&this.routeReuseStrategy.shouldDetach(a.value.snapshot)?this.detachAndStoreRouteSubtree(a,n):this.deactivateRouteAndOutlet(a,n)}detachAndStoreRouteSubtree(a,n){const e=n.getContext(a.value.outlet),i=e&&a.value.component?e.children:n,s=go(a);for(const l of Object.keys(s))this.deactivateRouteAndItsChildren(s[l],i);if(e&&e.outlet){const l=e.outlet.detach(),m=e.children.onOutletDeactivated();this.routeReuseStrategy.store(a.value.snapshot,{componentRef:l,route:a,contexts:m})}}deactivateRouteAndOutlet(a,n){const e=n.getContext(a.value.outlet),i=e&&a.value.component?e.children:n,s=go(a);for(const l of Object.keys(s))this.deactivateRouteAndItsChildren(s[l],i);e&&(e.outlet&&(e.outlet.deactivate(),e.children.onOutletDeactivated()),e.attachRef=null,e.route=null)}activateChildRoutes(a,n,e){const i=go(n);a.children.forEach(s=>{this.activateRoutes(s,i[s.value.outlet],e),this.forwardEvent(new zC(s.value.snapshot))}),a.children.length&&this.forwardEvent(new BC(a.value.snapshot))}activateRoutes(a,n,e){const i=a.value,s=n?n.value:null;if(ef(i),i===s)if(i.component){const l=e.getOrCreateContext(i.outlet);this.activateChildRoutes(a,n,l.children)}else this.activateChildRoutes(a,n,e);else if(i.component){const l=e.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const m=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),l.children.onOutletReAttached(m.contexts),l.attachRef=m.componentRef,l.route=m.route.value,l.outlet&&l.outlet.attach(m.componentRef,m.route.value),ef(m.route.value),this.activateChildRoutes(a,null,l.children)}else{const m=bd(i.snapshot);l.attachRef=null,l.route=i,l.injector=m,l.outlet&&l.outlet.activateWith(i,l.injector),this.activateChildRoutes(a,null,l.children)}}else this.activateChildRoutes(a,null,e)}}class gM{constructor(a){this.path=a,this.route=this.path[this.path.length-1]}}class Nu{constructor(a,n){this.component=a,this.route=n}}function Fb(o,a,n){const e=o._root;return xd(e,a?a._root:null,n,[e.value])}function Yl(o,a){const n=Symbol(),e=a.get(o,n);return e===n?"function"!=typeof o||(0,t.Z0I)(o)?a.get(o):o:e}function xd(o,a,n,e,i={canDeactivateChecks:[],canActivateChecks:[]}){const s=go(a);return o.children.forEach(l=>{(function Hb(o,a,n,e,i={canDeactivateChecks:[],canActivateChecks:[]}){const s=o.value,l=a?a.value:null,m=n?n.getContext(o.value.outlet):null;if(l&&s.routeConfig===l.routeConfig){const O=function jb(o,a,n){if("function"==typeof n)return n(o,a);switch(n){case"pathParamsChange":return!Fr(o.url,a.url);case"pathParamsOrQueryParamsChange":return!Fr(o.url,a.url)||!zo(o.queryParams,a.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Pd(o,a)||!zo(o.queryParams,a.queryParams);default:return!Pd(o,a)}}(l,s,s.routeConfig.runGuardsAndResolvers);O?i.canActivateChecks.push(new gM(e)):(s.data=l.data,s._resolvedData=l._resolvedData),xd(o,a,s.component?m?m.children:null:n,e,i),O&&m&&m.outlet&&m.outlet.isActivated&&i.canDeactivateChecks.push(new Nu(m.outlet.component,l))}else l&&wd(a,m,i),i.canActivateChecks.push(new gM(e)),xd(o,null,s.component?m?m.children:null:n,e,i)})(l,s[l.value.outlet],n,e.concat([l.value]),i),delete s[l.value.outlet]}),Object.entries(s).forEach(([l,m])=>wd(m,n.getContext(l),i)),i}function wd(o,a,n){const e=go(o),i=o.value;Object.entries(e).forEach(([s,l])=>{wd(l,i.component?a?a.children.getContext(s):null:a,n)}),n.canDeactivateChecks.push(new Nu(i.component&&a&&a.outlet&&a.outlet.isActivated?a.outlet.component:null,i))}function kd(o){return"function"==typeof o}function lf(o){return o instanceof Ll||"EmptyError"===o?.name}const Td=Symbol("INITIAL_VALUE");function Bc(){return(0,ro.w)(o=>Eg(o.map(a=>a.pipe((0,_i.q)(1),vc(Td)))).pipe((0,bn.U)(a=>{for(const n of a)if(!0!==n){if(n===Td)return Td;if(!1===n||n instanceof Rc)return n}return!0}),(0,so.h)(a=>a!==Td),(0,_i.q)(1)))}function df(o){return(0,fb.z)(Ai(a=>{if(qr(a))throw af(0,a)}),(0,bn.U)(a=>!0===a))}class hf{constructor(a){this.segmentGroup=a||null}}class Gc{constructor(a){this.urlTree=a}}function $l(o){return wc(new hf(o))}function CM(o){return wc(new Gc(o))}class $b{constructor(a,n){this.urlSerializer=a,this.urlTree=n}noMatchError(a){return new t.vHH(4002,!1)}lineralizeSegments(a,n){let e=[],i=n.root;for(;;){if(e=e.concat(i.segments),0===i.numberOfChildren)return(0,Se.of)(e);if(i.numberOfChildren>1||!i.children[tn])return wc(new t.vHH(4e3,!1));i=i.children[tn]}}applyRedirectCommands(a,n,e){return this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),a,e)}applyRedirectCreateUrlTree(a,n,e,i){const s=this.createSegmentGroup(a,n.root,e,i);return new Rc(s,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(a,n){const e={};return Object.entries(a).forEach(([i,s])=>{if("string"==typeof s&&s.startsWith(":")){const m=s.substring(1);e[i]=n[m]}else e[i]=s}),e}createSegmentGroup(a,n,e,i){const s=this.createSegments(a,n.segments,e,i);let l={};return Object.entries(n.children).forEach(([m,O])=>{l[m]=this.createSegmentGroup(a,O,e,i)}),new qn(s,l)}createSegments(a,n,e,i){return n.map(s=>s.path.startsWith(":")?this.findPosParam(a,s,i):this.findOrReturn(s,e))}findPosParam(a,n,e){const i=e[n.path.substring(1)];if(!i)throw new t.vHH(4001,!1);return i}findOrReturn(a,n){let e=0;for(const i of n){if(i.path===a.path)return n.splice(e),i;e++}return a}}const Xl={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Ju(o,a,n,e,i){const s=ho(o,a,n);return s.matched?(e=function rf(o,a){return o.providers&&!o._injector&&(o._injector=(0,t.MMx)(o.providers,a,`Route: ${o.path}`)),o._injector??a}(a,e),function vM(o,a,n,e){const i=a.canMatch;if(!i||0===i.length)return(0,Se.of)(!0);const s=i.map(l=>{const m=Yl(l,o);return Rr(function _M(o){return o&&kd(o.canMatch)}(m)?m.canMatch(a,n):o.runInContext(()=>m(a,n)))});return(0,Se.of)(s).pipe(Bc(),df())}(e,a,n).pipe((0,bn.U)(l=>!0===l?s:{...Xl}))):(0,Se.of)(s)}function ho(o,a,n){if(""===a.path)return"full"===a.pathMatch&&(o.hasChildren()||n.length>0)?{...Xl}:{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};const i=(a.matcher||yC)(n,o,a);if(!i)return{...Xl};const s={};Object.entries(i.posParams??{}).forEach(([m,O])=>{s[m]=O.path});const l=i.consumed.length>0?{...s,...i.consumed[i.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:i.consumed,remainingSegments:n.slice(i.consumed.length),parameters:l,positionalParamSegments:i.posParams??{}}}function Wb(o,a,n,e){return n.length>0&&function Xb(o,a,n){return n.some(e=>Zd(o,a,e)&&ya(e)!==tn)}(o,n,e)?{segmentGroup:new qn(a,OM(e,new qn(n,o.children))),slicedSegments:[]}:0===n.length&&function PM(o,a,n){return n.some(e=>Zd(o,a,e))}(o,n,e)?{segmentGroup:new qn(o.segments,MM(o,0,n,e,o.children)),slicedSegments:n}:{segmentGroup:new qn(o.segments,o.children),slicedSegments:n}}function MM(o,a,n,e,i){const s={};for(const l of e)if(Zd(o,n,l)&&!i[ya(l)]){const m=new qn([],{});s[ya(l)]=m}return{...i,...s}}function OM(o,a){const n={};n[tn]=a;for(const e of o)if(""===e.path&&ya(e)!==tn){const i=new qn([],{});n[ya(e)]=i}return n}function Zd(o,a,n){return(!(o.hasChildren()||a.length>0)||"full"!==n.pathMatch)&&""===n.path}class e0{constructor(a,n,e,i,s,l,m){this.injector=a,this.configLoader=n,this.rootComponentType=e,this.config=i,this.urlTree=s,this.paramsInheritanceStrategy=l,this.urlSerializer=m,this.allowRedirects=!0,this.applyRedirects=new $b(this.urlSerializer,this.urlTree)}noMatchError(a){return new t.vHH(4002,!1)}recognize(){const a=Wb(this.urlTree.root,[],[],this.config).segmentGroup;return this.processSegmentGroup(this.injector,this.config,a,tn).pipe(Fl(n=>{if(n instanceof Gc)return this.allowRedirects=!1,this.urlTree=n.urlTree,this.match(n.urlTree);throw n instanceof hf?this.noMatchError(n):n}),(0,bn.U)(n=>{const e=new Od([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},tn,this.rootComponentType,null,{}),i=new qa(e,n),s=new $C("",i),l=function IC(o,a,n=null,e=null){return zp(Bp(o),a,n,e)}(e,[],this.urlTree.queryParams,this.urlTree.fragment);return l.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(l),this.inheritParamsAndData(s._root),{state:s,tree:l}}))}match(a){return this.processSegmentGroup(this.injector,this.config,a.root,tn).pipe(Fl(e=>{throw e instanceof hf?this.noMatchError(e):e}))}inheritParamsAndData(a){const n=a.value,e=Pa(n,this.paramsInheritanceStrategy);n.params=Object.freeze(e.params),n.data=Object.freeze(e.data),a.children.forEach(i=>this.inheritParamsAndData(i))}processSegmentGroup(a,n,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(a,n,e):this.processSegment(a,n,e,e.segments,i,!0)}processChildren(a,n,e){const i=[];for(const s of Object.keys(e.children))"primary"===s?i.unshift(s):i.push(s);return(0,Qi.D)(i).pipe(gd(s=>{const l=e.children[s],m=function lM(o,a){const n=o.filter(e=>ya(e)===a);return n.push(...o.filter(e=>ya(e)!==a)),n}(n,s);return this.processSegmentGroup(a,m,l,s)}),function Cb(o,a){return(0,$i.e)(function vb(o,a,n,e,i){return(s,l)=>{let m=n,O=a,k=0;s.subscribe((0,Po.x)(l,W=>{const ct=k++;O=m?o(O,W,ct):(m=!0,W),e&&l.next(O)},i&&(()=>{m&&l.next(O),l.complete()})))}}(o,a,arguments.length>=2,!0))}((s,l)=>(s.push(...l),s)),Lp(null),function Rp(o,a){const n=arguments.length>=2;return e=>e.pipe(o?(0,so.h)((i,s)=>o(i,s,e)):br.y,Qp(1),n?Lp(a):OC(()=>new Ll))}(),(0,co.z)(s=>{if(null===s)return $l(e);const l=xM(s);return function n0(o){o.sort((a,n)=>a.value.outlet===tn?-1:n.value.outlet===tn?1:a.value.outlet.localeCompare(n.value.outlet))}(l),(0,Se.of)(l)}))}processSegment(a,n,e,i,s,l){return(0,Qi.D)(n).pipe(gd(m=>this.processSegmentAgainstRoute(m._injector??a,n,m,e,i,s,l).pipe(Fl(O=>{if(O instanceof hf)return(0,Se.of)(null);throw O}))),Rl(m=>!!m),Fl(m=>{if(lf(m))return function bM(o,a,n){return 0===a.length&&!o.children[n]}(e,i,s)?(0,Se.of)([]):$l(e);throw m}))}processSegmentAgainstRoute(a,n,e,i,s,l,m){return function yM(o,a,n,e){return!!(ya(o)===e||e!==tn&&Zd(a,n,o))&&("**"===o.path||ho(a,o,n).matched)}(e,i,s,l)?void 0===e.redirectTo?this.matchSegmentAgainstRoute(a,i,e,s,l,m):m&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(a,i,n,e,s,l):$l(i):$l(i)}expandSegmentAgainstRouteUsingRedirect(a,n,e,i,s,l){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(a,e,i,l):this.expandRegularSegmentAgainstRouteUsingRedirect(a,n,e,i,s,l)}expandWildCardWithParamsAgainstRouteUsingRedirect(a,n,e,i){const s=this.applyRedirects.applyRedirectCommands([],e.redirectTo,{});return e.redirectTo.startsWith("/")?CM(s):this.applyRedirects.lineralizeSegments(e,s).pipe((0,co.z)(l=>{const m=new qn(l,{});return this.processSegment(a,n,m,l,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(a,n,e,i,s,l){const{matched:m,consumedSegments:O,remainingSegments:k,positionalParamSegments:W}=ho(n,i,s);if(!m)return $l(n);const ct=this.applyRedirects.applyRedirectCommands(O,i.redirectTo,W);return i.redirectTo.startsWith("/")?CM(ct):this.applyRedirects.lineralizeSegments(i,ct).pipe((0,co.z)(Ct=>this.processSegment(a,e,n,Ct.concat(k),l,!1)))}matchSegmentAgainstRoute(a,n,e,i,s,l){let m;if("**"===e.path){const O=i.length>0?xC(i).parameters:{},k=new Od(i,O,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,wM(e),ya(e),e.component??e._loadedComponent??null,e,Sd(e));m=(0,Se.of)({snapshot:k,consumedSegments:[],remainingSegments:[]}),n.children={}}else m=Ju(n,e,i,a).pipe((0,bn.U)(({matched:O,consumedSegments:k,remainingSegments:W,parameters:ct})=>O?{snapshot:new Od(k,ct,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,wM(e),ya(e),e.component??e._loadedComponent??null,e,Sd(e)),consumedSegments:k,remainingSegments:W}:null));return m.pipe((0,ro.w)(O=>null===O?$l(n):this.getChildConfig(a=e._injector??a,e,i).pipe((0,ro.w)(({routes:k})=>{const W=e._loadedInjector??a,{snapshot:ct,consumedSegments:Ct,remainingSegments:Ot}=O,{segmentGroup:xt,slicedSegments:Gt}=Wb(n,Ct,Ot,k);if(0===Gt.length&&xt.hasChildren())return this.processChildren(W,k,xt).pipe((0,bn.U)(De=>null===De?null:[new qa(ct,De)]));if(0===k.length&&0===Gt.length)return(0,Se.of)([new qa(ct,[])]);const se=ya(e)===s;return this.processSegment(W,k,xt,Gt,se?tn:s,!0).pipe((0,bn.U)(De=>[new qa(ct,De)]))}))))}getChildConfig(a,n,e){return n.children?(0,Se.of)({routes:n.children,injector:a}):n.loadChildren?void 0!==n._loadedRoutes?(0,Se.of)({routes:n._loadedRoutes,injector:n._loadedInjector}):function yk(o,a,n,e){const i=a.canLoad;if(void 0===i||0===i.length)return(0,Se.of)(!0);const s=i.map(l=>{const m=Yl(l,o);return Rr(function zb(o){return o&&kd(o.canLoad)}(m)?m.canLoad(a,n):o.runInContext(()=>m(a,n)))});return(0,Se.of)(s).pipe(Bc(),df())}(a,n,e).pipe((0,co.z)(i=>i?this.configLoader.loadChildren(a,n).pipe(Ai(s=>{n._loadedRoutes=s.routes,n._loadedInjector=s.injector})):function Wl(o){return wc(sf(!1,3))}())):(0,Se.of)({routes:[],injector:a})}}function Ad(o){const a=o.value.routeConfig;return a&&""===a.path}function xM(o){const a=[],n=new Set;for(const e of o){if(!Ad(e)){a.push(e);continue}const i=a.find(s=>e.value.routeConfig===s.value.routeConfig);void 0!==i?(i.children.push(...e.children),n.add(i)):a.push(e)}for(const e of n){const i=xM(e.children);a.push(new qa(e.value,i))}return a.filter(e=>!n.has(e))}function wM(o){return o.data||{}}function Sd(o){return o.resolve||{}}function AM(o){return"string"==typeof o.title||null===o.title}function uf(o){return(0,ro.w)(a=>{const n=o(a);return n?(0,Qi.D)(n).pipe((0,bn.U)(()=>a)):(0,Se.of)(a)})}const tg=new t.OlP("ROUTES");let Uu=(()=>{var o;class a{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=(0,t.f3M)(t.Sil)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return(0,Se.of)(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Rr(e.loadComponent()).pipe((0,bn.U)(DM),Ai(l=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=l}),Qc(()=>{this.componentLoaders.delete(e)})),s=new zg(i,()=>new sn.x).pipe(ov());return this.componentLoaders.set(e,s),s}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return(0,Se.of)({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const l=function SM(o,a,n,e){return Rr(o.loadChildren()).pipe((0,bn.U)(DM),(0,co.z)(i=>i instanceof t.YKP||Array.isArray(i)?(0,Se.of)(i):(0,Qi.D)(a.compileModuleAsync(i))),(0,bn.U)(i=>{e&&e(o);let s,l,m=!1;return Array.isArray(i)?(l=i,!0):(s=i.create(n).injector,l=s.get(tg,[],{optional:!0,self:!0}).flat()),{routes:l.map(Iu),injector:s}}))}(i,this.compiler,e,this.onLoadEndListener).pipe(Qc(()=>{this.childrenLoaders.delete(i)})),m=new zg(l,()=>new sn.x).pipe(ov());return this.childrenLoaders.set(i,m),m}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();function DM(o){return function EM(o){return o&&"object"==typeof o&&"default"in o}(o)?o.default:o}let Id=(()=>{var o;class a{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new sn.x,this.transitionAbortSubject=new sn.x,this.configLoader=(0,t.f3M)(Uu),this.environmentInjector=(0,t.f3M)(t.lqb),this.urlSerializer=(0,t.f3M)(ud),this.rootContexts=(0,t.f3M)(Cd),this.inputBindingEnabled=null!==(0,t.f3M)(yd,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>(0,Se.of)(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=s=>this.events.next(new Eb(s)),this.configLoader.onLoadStartListener=s=>this.events.next(new jC(s))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e,i,s){return this.transitions=new zn.X({id:0,currentUrlTree:i,currentRawUrl:i,currentBrowserUrl:i,extractedUrl:e.urlHandlingStrategy.extract(i),urlAfterRedirects:e.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:qc,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,so.h)(l=>0!==l.id),(0,bn.U)(l=>({...l,extractedUrl:e.urlHandlingStrategy.extract(l.rawUrl)})),(0,ro.w)(l=>{this.currentTransition=l;let m=!1,O=!1;return(0,Se.of)(l).pipe(Ai(k=>{this.currentNavigation={id:k.id,initialUrl:k.rawUrl,extractedUrl:k.extractedUrl,trigger:k.source,extras:k.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,ro.w)(k=>{const W=k.currentBrowserUrl.toString(),ct=!e.navigated||k.extractedUrl.toString()!==W||W!==k.currentUrlTree.toString();if(!ct&&"reload"!==(k.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const Ot="";return this.events.next(new vd(k.id,this.urlSerializer.serialize(k.rawUrl),Ot,0)),k.resolve(null),Ql.E}if(e.urlHandlingStrategy.shouldProcessUrl(k.rawUrl))return(0,Se.of)(k).pipe((0,ro.w)(Ot=>{const xt=this.transitions?.getValue();return this.events.next(new Gl(Ot.id,this.urlSerializer.serialize(Ot.extractedUrl),Ot.source,Ot.restoredState)),xt!==this.transitions?.getValue()?Ql.E:Promise.resolve(Ot)}),function kM(o,a,n,e,i,s){return(0,co.z)(l=>function t0(o,a,n,e,i,s,l="emptyOnly"){return new e0(o,a,n,e,i,l,s).recognize()}(o,a,n,e,l.extractedUrl,i,s).pipe((0,bn.U)(({state:m,tree:O})=>({...l,targetSnapshot:m,urlAfterRedirects:O}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Ai(Ot=>{l.targetSnapshot=Ot.targetSnapshot,l.urlAfterRedirects=Ot.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:Ot.urlAfterRedirects};const xt=new qC(Ot.id,this.urlSerializer.serialize(Ot.extractedUrl),this.urlSerializer.serialize(Ot.urlAfterRedirects),Ot.targetSnapshot);this.events.next(xt)}));if(ct&&e.urlHandlingStrategy.shouldProcessUrl(k.currentRawUrl)){const{id:Ot,extractedUrl:xt,source:Gt,restoredState:se,extras:De}=k,un=new Gl(Ot,this.urlSerializer.serialize(xt),Gt,se);this.events.next(un);const vn=Xp(0,this.rootComponentType).snapshot;return this.currentTransition=l={...k,targetSnapshot:vn,urlAfterRedirects:xt,extras:{...De,skipLocationChange:!1,replaceUrl:!1}},(0,Se.of)(l)}{const Ot="";return this.events.next(new vd(k.id,this.urlSerializer.serialize(k.extractedUrl),Ot,1)),k.resolve(null),Ql.E}}),Ai(k=>{const W=new Ab(k.id,this.urlSerializer.serialize(k.extractedUrl),this.urlSerializer.serialize(k.urlAfterRedirects),k.targetSnapshot);this.events.next(W)}),(0,bn.U)(k=>(this.currentTransition=l={...k,guards:Fb(k.targetSnapshot,k.currentSnapshot,this.rootContexts)},l)),function fM(o,a){return(0,co.z)(n=>{const{targetSnapshot:e,currentSnapshot:i,guards:{canActivateChecks:s,canDeactivateChecks:l}}=n;return 0===l.length&&0===s.length?(0,Se.of)({...n,guardsResult:!0}):function mM(o,a,n,e){return(0,Qi.D)(o).pipe((0,co.z)(i=>function gf(o,a,n,e,i){const s=a&&a.routeConfig?a.routeConfig.canDeactivate:null;if(!s||0===s.length)return(0,Se.of)(!0);const l=s.map(m=>{const O=bd(a)??i,k=Yl(m,O);return Rr(function uM(o){return o&&kd(o.canDeactivate)}(k)?k.canDeactivate(o,a,n,e):O.runInContext(()=>k(o,a,n,e))).pipe(Rl())});return(0,Se.of)(l).pipe(Bc())}(i.component,i.route,n,a,e)),Rl(i=>!0!==i,!0))}(l,e,i,o).pipe((0,co.z)(m=>m&&function Bb(o){return"boolean"==typeof o}(m)?function zc(o,a,n,e){return(0,Qi.D)(a).pipe(gd(i=>vl(function Yb(o,a){return null!==o&&a&&a(new Db(o)),(0,Se.of)(!0)}(i.route.parent,e),function Vb(o,a){return null!==o&&a&&a(new Ib(o)),(0,Se.of)(!0)}(i.route,e),function Pk(o,a,n){const e=a[a.length-1],s=a.slice(0,a.length-1).reverse().map(l=>function qb(o){const a=o.routeConfig?o.routeConfig.canActivateChild:null;return a&&0!==a.length?{node:o,guards:a}:null}(l)).filter(l=>null!==l).map(l=>Os(()=>{const m=l.guards.map(O=>{const k=bd(l.node)??n,W=Yl(O,k);return Rr(function hM(o){return o&&kd(o.canActivateChild)}(W)?W.canActivateChild(e,o):k.runInContext(()=>W(e,o))).pipe(Rl())});return(0,Se.of)(m).pipe(Bc())}));return(0,Se.of)(s).pipe(Bc())}(o,i.path,n),function Kl(o,a,n){const e=a.routeConfig?a.routeConfig.canActivate:null;if(!e||0===e.length)return(0,Se.of)(!0);const i=e.map(s=>Os(()=>{const l=bd(a)??n,m=Yl(s,l);return Rr(function dM(o){return o&&kd(o.canActivate)}(m)?m.canActivate(a,o):l.runInContext(()=>m(a,o))).pipe(Rl())}));return(0,Se.of)(i).pipe(Bc())}(o,i.route,n))),Rl(i=>!0!==i,!0))}(e,s,o,a):(0,Se.of)(m)),(0,bn.U)(m=>({...n,guardsResult:m})))})}(this.environmentInjector,k=>this.events.next(k)),Ai(k=>{if(l.guardsResult=k.guardsResult,qr(k.guardsResult))throw af(0,k.guardsResult);const W=new HC(k.id,this.urlSerializer.serialize(k.extractedUrl),this.urlSerializer.serialize(k.urlAfterRedirects),k.targetSnapshot,!!k.guardsResult);this.events.next(W)}),(0,so.h)(k=>!!k.guardsResult||(this.cancelNavigationTransition(k,"",3),!1)),uf(k=>{if(k.guards.canActivateChecks.length)return(0,Se.of)(k).pipe(Ai(W=>{const ct=new Sb(W.id,this.urlSerializer.serialize(W.extractedUrl),this.urlSerializer.serialize(W.urlAfterRedirects),W.targetSnapshot);this.events.next(ct)}),(0,ro.w)(W=>{let ct=!1;return(0,Se.of)(W).pipe(function TM(o,a){return(0,co.z)(n=>{const{targetSnapshot:e,guards:{canActivateChecks:i}}=n;if(!i.length)return(0,Se.of)(n);let s=0;return(0,Qi.D)(i).pipe(gd(l=>function ZM(o,a,n,e){const i=o.routeConfig,s=o._resolve;return void 0!==i?.title&&!AM(i)&&(s[Qr]=i.title),function o0(o,a,n,e){const i=function Ed(o){return[...Object.keys(o),...Object.getOwnPropertySymbols(o)]}(o);if(0===i.length)return(0,Se.of)({});const s={};return(0,Qi.D)(i).pipe((0,co.z)(l=>function Dd(o,a,n,e){const i=bd(a)??e,s=Yl(o,i);return Rr(s.resolve?s.resolve(a,n):i.runInContext(()=>s(a,n)))}(o[l],a,n,e).pipe(Rl(),Ai(m=>{s[l]=m}))),Qp(1),sv(s),Fl(l=>lf(l)?Ql.E:wc(l)))}(s,o,a,e).pipe((0,bn.U)(l=>(o._resolvedData=l,o.data=Pa(o,n).resolve,i&&AM(i)&&(o.data[Qr]=i.title),null)))}(l.route,e,o,a)),Ai(()=>s++),Qp(1),(0,co.z)(l=>s===i.length?(0,Se.of)(n):Ql.E))})}(e.paramsInheritanceStrategy,this.environmentInjector),Ai({next:()=>ct=!0,complete:()=>{ct||this.cancelNavigationTransition(W,"",2)}}))}),Ai(W=>{const ct=new Ei(W.id,this.urlSerializer.serialize(W.extractedUrl),this.urlSerializer.serialize(W.urlAfterRedirects),W.targetSnapshot);this.events.next(ct)}))}),uf(k=>{const W=ct=>{const Ct=[];ct.routeConfig?.loadComponent&&!ct.routeConfig._loadedComponent&&Ct.push(this.configLoader.loadComponent(ct.routeConfig).pipe(Ai(Ot=>{ct.component=Ot}),(0,bn.U)(()=>{})));for(const Ot of ct.children)Ct.push(...W(Ot));return Ct};return Eg(W(k.targetSnapshot.root)).pipe(Lp(),(0,_i.q)(1))}),uf(()=>this.afterPreactivation()),(0,bn.U)(k=>{const W=function Jb(o,a,n){const e=Vl(o,a._root,n?n._root:void 0);return new YC(e,a)}(e.routeReuseStrategy,k.targetSnapshot,k.currentRouterState);return this.currentTransition=l={...k,targetRouterState:W},l}),Ai(()=>{this.events.next(new Br)}),((o,a,n,e)=>(0,bn.U)(i=>(new Rb(a,i.targetRouterState,i.currentRouterState,n,e).activate(o),i)))(this.rootContexts,e.routeReuseStrategy,k=>this.events.next(k),this.inputBindingEnabled),(0,_i.q)(1),Ai({next:k=>{m=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new jr(k.id,this.urlSerializer.serialize(k.extractedUrl),this.urlSerializer.serialize(k.urlAfterRedirects))),e.titleStrategy?.updateTitle(k.targetRouterState.snapshot),k.resolve(!0)},complete:()=>{m=!0}}),(0,mc.R)(this.transitionAbortSubject.pipe(Ai(k=>{throw k}))),Qc(()=>{m||O||this.cancelNavigationTransition(l,"",1),this.currentNavigation?.id===l.id&&(this.currentNavigation=null)}),Fl(k=>{if(O=!0,nM(k))this.events.next(new Hc(l.id,this.urlSerializer.serialize(l.extractedUrl),k.message,k.cancellationCode)),function eM(o){return nM(o)&&qr(o.url)}(k)?this.events.next(new $p(k.url)):l.resolve(!1);else{this.events.next(new Yp(l.id,this.urlSerializer.serialize(l.extractedUrl),k,l.targetSnapshot??void 0));try{l.resolve(e.errorHandler(k))}catch(W){l.reject(W)}}return Ql.E}))}))}cancelNavigationTransition(e,i,s){const l=new Hc(e.id,this.urlSerializer.serialize(e.extractedUrl),i,s);this.events.next(l),e.resolve(!1)}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();function IM(o){return o!==qc}let NM=(()=>{var o;class a{buildTitle(e){let i,s=e.root;for(;void 0!==s;)i=this.getResolvedTitleForRoute(s)??i,s=s.children.find(l=>l.outlet===tn);return i}getResolvedTitleForRoute(e){return e.data[Qr]}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return(0,t.f3M)(xk)},providedIn:"root"}),a})(),xk=(()=>{var o;class a extends NM{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return(o=a).\u0275fac=function(e){return new(e||o)(t.LFG(M))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})(),wk=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return(0,t.f3M)(Tk)},providedIn:"root"}),a})();class kk{shouldDetach(a){return!1}store(a,n){}shouldAttach(a){return!1}retrieve(a){return null}shouldReuseRoute(a,n){return a.routeConfig===n.routeConfig}}let Tk=(()=>{var o;class a extends kk{}return(o=a).\u0275fac=function(){let n;return function(i){return(n||(n=t.n5z(o)))(i||o)}}(),o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();const Nd=new t.OlP("",{providedIn:"root",factory:()=>({})});let Lu=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return(0,t.f3M)(a0)},providedIn:"root"}),a})(),a0=(()=>{var o;class a{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();var Jd=function(o){return o[o.COMPLETE=0]="COMPLETE",o[o.FAILED=1]="FAILED",o[o.REDIRECTING=2]="REDIRECTING",o}(Jd||{});function _f(o,a){o.events.pipe((0,so.h)(n=>n instanceof jr||n instanceof Hc||n instanceof Yp||n instanceof vd),(0,bn.U)(n=>n instanceof jr||n instanceof vd?Jd.COMPLETE:n instanceof Hc&&(0===n.code||1===n.code)?Jd.REDIRECTING:Jd.FAILED),(0,so.h)(n=>n!==Jd.REDIRECTING),(0,_i.q)(1)).subscribe(()=>{a()})}function Ud(o){throw o}function s0(o,a,n){return a.parse("/")}const r0={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},c0={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Di=(()=>{var o;class a{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.location.getState()?.\u0275routerPageId??this.currentPageId}get events(){return this._events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=(0,t.f3M)(t.c2e),this.isNgZoneEnabled=!1,this._events=new sn.x,this.options=(0,t.f3M)(Nd,{optional:!0})||{},this.pendingTasks=(0,t.f3M)(t.HDt),this.errorHandler=this.options.errorHandler||Ud,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||s0,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=(0,t.f3M)(Lu),this.routeReuseStrategy=(0,t.f3M)(wk),this.titleStrategy=(0,t.f3M)(NM),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=(0,t.f3M)(tg,{optional:!0})?.flat()??[],this.navigationTransitions=(0,t.f3M)(Id),this.urlSerializer=(0,t.f3M)(ud),this.location=(0,t.f3M)(x.Ye),this.componentInputBindingEnabled=!!(0,t.f3M)(yd,{optional:!0}),this.eventsSubscription=new kr.w0,this.isNgZoneEnabled=(0,t.f3M)(t.R0b)instanceof t.R0b&&t.R0b.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Rc,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=Xp(0,null),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const e=this.navigationTransitions.events.subscribe(i=>{try{const{currentTransition:s}=this.navigationTransitions;if(null===s)return void(JM(i)&&this._events.next(i));if(i instanceof Gl)IM(s.source)&&(this.browserUrlTree=s.extractedUrl);else if(i instanceof vd)this.rawUrlTree=s.rawUrl;else if(i instanceof qC){if("eager"===this.urlUpdateStrategy){if(!s.extras.skipLocationChange){const l=this.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl);this.setBrowserUrl(l,s)}this.browserUrlTree=s.urlAfterRedirects}}else if(i instanceof Br)this.currentUrlTree=s.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),this.routerState=s.targetRouterState,"deferred"===this.urlUpdateStrategy&&(s.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,s),this.browserUrlTree=s.urlAfterRedirects);else if(i instanceof Hc)0!==i.code&&1!==i.code&&(this.navigated=!0),(3===i.code||2===i.code)&&this.restoreHistory(s);else if(i instanceof $p){const l=this.urlHandlingStrategy.merge(i.url,s.currentRawUrl),m={skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||IM(s.source)};this.scheduleNavigation(l,qc,null,m,{resolve:s.resolve,reject:s.reject,promise:s.promise})}i instanceof Yp&&this.restoreHistory(s,!0),i instanceof jr&&(this.navigated=!0),JM(i)&&this._events.next(i)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),qc,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,s){const l={replaceUrl:!0},m=s?.navigationId?s:null;if(s){const k={...s};delete k.navigationId,delete k.\u0275routerPageId,0!==Object.keys(k).length&&(l.state=k)}const O=this.parseUrl(e);this.scheduleNavigation(O,i,m,l)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Iu),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){const{relativeTo:s,queryParams:l,fragment:m,queryParamsHandling:O,preserveFragment:k}=i,W=k?this.currentUrlTree.fragment:m;let Ct,ct=null;switch(O){case"merge":ct={...this.currentUrlTree.queryParams,...l};break;case"preserve":ct=this.currentUrlTree.queryParams;break;default:ct=l||null}null!==ct&&(ct=this.removeEmptyProps(ct));try{Ct=Bp(s?s.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof e[0]||!e[0].startsWith("/"))&&(e=[]),Ct=this.currentUrlTree.root}return zp(Ct,e,ct,W??null)}navigateByUrl(e,i={skipLocationChange:!1}){const s=qr(e)?e:this.parseUrl(e),l=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(l,qc,null,i)}navigate(e,i={skipLocationChange:!1}){return function Zk(o){for(let a=0;a{const l=e[s];return null!=l&&(i[s]=l),i},{})}scheduleNavigation(e,i,s,l,m){if(this.disposed)return Promise.resolve(!1);let O,k,W;m?(O=m.resolve,k=m.reject,W=m.promise):W=new Promise((Ct,Ot)=>{O=Ct,k=Ot});const ct=this.pendingTasks.add();return _f(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(ct))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,currentBrowserUrl:this.browserUrlTree,rawUrl:e,extras:l,resolve:O,reject:k,promise:W,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),W.catch(Ct=>Promise.reject(Ct))}setBrowserUrl(e,i){const s=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(s)||i.extras.replaceUrl){const m={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(s,"",m)}else{const l={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId+1)};this.location.go(s,"",l)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const l=this.currentPageId-this.browserPageId;0!==l?this.location.historyGo(l):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===l&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();function JM(o){return!(o instanceof Br||o instanceof $p)}let Vc=(()=>{var o;class a{constructor(e,i,s,l,m,O){this.router=e,this.route=i,this.tabIndexAttribute=s,this.renderer=l,this.el=m,this.locationStrategy=O,this.href=null,this.commands=null,this.onChanges=new sn.x,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const k=m.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===k||"area"===k,this.isAnchorElement?this.subscription=e.events.subscribe(W=>{W instanceof jr&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,s,l,m){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||s||l||m||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:(0,t.P3R)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const s=this.renderer,l=this.el.nativeElement;null!==i?s.setAttribute(l,e,i):s.removeAttribute(l,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return(o=a).\u0275fac=function(e){return new(e||o)(t.Y36(Di),t.Y36(ri),t.$8M("tabindex"),t.Y36(t.Qsj),t.Y36(t.SBq),t.Y36(x.S$))},o.\u0275dir=t.lG2({type:o,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&t.NdJ("click",function(l){return i.onClick(l.button,l.ctrlKey,l.shiftKey,l.altKey,l.metaKey)}),2&e&&t.uIk("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:["preserveFragment","preserveFragment",t.VuI],skipLocationChange:["skipLocationChange","skipLocationChange",t.VuI],replaceUrl:["replaceUrl","replaceUrl",t.VuI],routerLink:"routerLink"},standalone:!0,features:[t.Xq5,t.TTD]}),a})();class eg{}let h0=(()=>{var o;class a{constructor(e,i,s,l,m){this.router=e,this.injector=s,this.preloadingStrategy=l,this.loader=m}setUpPreloading(){this.subscription=this.router.events.pipe((0,so.h)(e=>e instanceof jr),gd(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const s=[];for(const l of i){l.providers&&!l._injector&&(l._injector=(0,t.MMx)(l.providers,e,`Route: ${l.path}`));const m=l._injector??e,O=l._loadedInjector??m;(l.loadChildren&&!l._loadedRoutes&&void 0===l.canLoad||l.loadComponent&&!l._loadedComponent)&&s.push(this.preloadConfig(m,l)),(l.children||l._loadedRoutes)&&s.push(this.processRoutes(O,l.children??l._loadedRoutes))}return(0,Qi.D)(s).pipe((0,ml.J)())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let s;s=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):(0,Se.of)(null);const l=s.pipe((0,co.z)(m=>null===m?(0,Se.of)(void 0):(i._loadedRoutes=m.routes,i._loadedInjector=m.injector,this.processRoutes(m.injector??e,m.routes))));if(i.loadComponent&&!i._loadedComponent){const m=this.loader.loadComponent(i);return(0,Qi.D)([l,m]).pipe((0,ml.J)())}return l})}}return(o=a).\u0275fac=function(e){return new(e||o)(t.LFG(Di),t.LFG(t.Sil),t.LFG(t.lqb),t.LFG(eg),t.LFG(Uu))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();const Qu=new t.OlP("");let UM=(()=>{var o;class a{constructor(e,i,s,l,m={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=s,this.zone=l,this.options=m,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},m.scrollPositionRestoration=m.scrollPositionRestoration||"disabled",m.anchorScrolling=m.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Gl?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof jr?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof vd&&0===e.code&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Kp&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Kp(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return(o=a).\u0275fac=function(e){t.$Z()},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac}),a})();function Ha(o,a){return{\u0275kind:o,\u0275providers:a}}function QM(){const o=(0,t.f3M)(t.zs3);return a=>{const n=o.get(t.z2F);if(a!==n.components[0])return;const e=o.get(Di),i=o.get(RM);1===o.get(Ld)&&e.initialNavigation(),o.get(qM,null,t.XFs.Optional)?.setUpPreloading(),o.get(Qu,null,t.XFs.Optional)?.init(),e.resetRootComponentType(n.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}const RM=new t.OlP("",{factory:()=>new sn.x}),Ld=new t.OlP("",{providedIn:"root",factory:()=>1}),qM=new t.OlP("");function v0(o){return Ha(0,[{provide:qM,useExisting:h0},{provide:eg,useExisting:o}])}const pf=new t.OlP("ROUTER_FORROOT_GUARD"),HM=[x.Ye,{provide:ud,useClass:Fp},Di,Cd,{provide:ri,useFactory:function LM(o){return o.routerState.root},deps:[Di]},Uu,[]];function M0(){return new t.PXZ("Router",Di)}let jM=(()=>{var o;class a{constructor(e){}static forRoot(e,i){return{ngModule:a,providers:[HM,[],{provide:tg,multi:!0,useValue:e},{provide:pf,useFactory:y0,deps:[[Di,new t.FiY,new t.tp0]]},{provide:Nd,useValue:i||{}},i?.useHash?{provide:x.S$,useClass:x.Do}:{provide:x.S$,useClass:x.b0},{provide:Qu,useFactory:()=>{const o=(0,t.f3M)(x.EM),a=(0,t.f3M)(t.R0b),n=(0,t.f3M)(Nd),e=(0,t.f3M)(Id),i=(0,t.f3M)(ud);return n.scrollOffset&&o.setOffset(n.scrollOffset),new UM(i,e,o,a,n)}},i?.preloadingStrategy?v0(i.preloadingStrategy).\u0275providers:[],{provide:t.PXZ,multi:!0,useFactory:M0},i?.initialNavigation?b0(i):[],i?.bindToComponentInputs?Ha(8,[XC,{provide:yd,useExisting:XC}]).\u0275providers:[],[{provide:Ru,useFactory:QM},{provide:t.tb,multi:!0,useExisting:Ru}]]}}static forChild(e){return{ngModule:a,providers:[{provide:tg,multi:!0,useValue:e}]}}}return(o=a).\u0275fac=function(e){return new(e||o)(t.LFG(pf,8))},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({}),a})();function y0(o){return"guarded"}function b0(o){return["disabled"===o.initialNavigation?Ha(3,[{provide:t.ip1,multi:!0,useFactory:()=>{const a=(0,t.f3M)(Di);return()=>{a.setUpLocationChangeListener()}}},{provide:Ld,useValue:2}]).\u0275providers:[],"enabledBlocking"===o.initialNavigation?Ha(2,[{provide:Ld,useValue:0},{provide:t.ip1,multi:!0,deps:[t.zs3],useFactory:a=>{const n=a.get(x.V_,Promise.resolve());return()=>n.then(()=>new Promise(e=>{const i=a.get(Di),s=a.get(RM);_f(i,()=>{e(!0)}),a.get(Id).afterPreactivation=()=>(e(!0),s.closed?(0,Se.of)(void 0):s),i.initialNavigation()}))}}]).\u0275providers:[]]}const Ru=new t.OlP("");let VM=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"meta",void 0),(0,_.Z)(this,"title","gloomhavensecretariat"),(0,_.Z)(this,"theme",""),this.meta=e}ngOnInit(){this.applyStyle(),d.v.uiChange.subscribe({next:()=>{this.applyStyle(),this.applyAnimations()}})}applyStyle(){this.theme=R.r.settings.theme,"fh"==this.theme?(document.body.classList.remove("modern"),document.body.classList.add("fh"),this.meta.updateTag({name:"theme-color",content:"#a2bbd1"})):"modern"==this.theme?(document.body.classList.remove("fh"),document.body.classList.add("modern"),this.meta.updateTag({name:"theme-color",content:"#0e1f1f"})):(document.body.classList.remove("fh"),document.body.classList.remove("modern"),this.meta.updateTag({name:"theme-color",content:"#936658"})),R.r.settings.portraitMode?document.body.classList.add("portrait-mode"):document.body.classList.remove("portrait-mode"),this.isAppDevMode()||R.r.settings.debugRightClick?document.body.classList.contains("disable-context-menu-touch")&&document.body.classList.remove("disable-context-menu-touch"):document.body.classList.contains("disable-context-menu-touch")||document.body.classList.add("disable-context-menu-touch")}applyAnimations(){R.r.settings.disableAnimations?document.body.classList.add("no-animations"):document.body.classList.remove("no-animations")}isAppDevMode(){return(0,t.X6Q)()}onRightClick(){return!(!this.isAppDevMode()&&!R.r.settings.debugRightClick)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(on))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["app-root"]],decls:2,vars:1,consts:[[1,"container",3,"ngClass","contextmenu"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("contextmenu",function(){return i.onRightClick()}),t._UZ(1,"router-outlet"),t.qZA()),2&e&&t.Q6J("ngClass",i.theme)},dependencies:[x.mk,jc],styles:[".container[_ngcontent-%COMP%]{position:relative;width:100vw;max-width:100vw;height:100vh;max-height:100vh;background-image:url(bg.21a3b4d9cc4773f5.jpg);background-size:cover;overflow:auto}.container.fh[_ngcontent-%COMP%]{background-image:url(bg.b402b1d465a94b7a.jpg)}.container.modern[_ngcontent-%COMP%]{background-image:url(bg.cca7e4a6587b5386.jpg)}"]})),a})();var vt=E(7227),re=E(9310),Gn=E(6140),ae=E(3157),zr=E(9144),ee=E(4377),oe=E(5609),ci=function(o){return o.active="active",o.target="target",o.conditional="conditional",o.ally="ally",o.blank="blank",o.invisible="invisible",o}(ci||{});class Fi{constructor(a,n,e,i){(0,_.Z)(this,"x",0),(0,_.Z)(this,"y",0),(0,_.Z)(this,"type",ci.active),(0,_.Z)(this,"value",""),this.x=a,this.y=n,this.type=e,this.value=i}static fromString(a){let n=new RegExp(/^\((\d+),(\d+),(active|target|conditional|ally|blank|invisible)(\:(\w*))?\)$/).exec(a);if(null==n)return null;let e="";return n.length>5&&n[5]&&(e=n[5]),new Fi(+n[1],+n[2],n[3],e)}static toString(a){return"("+a.x+","+a.y+","+ci[a.type]+(a.value?":"+a.value:"")+")"}}var Lt=E(2098);const Qd=/\%((\w+|\.|\-|\:|\,|\+|\(|\)|\||\_|\[|\]|\||\{|\}|\$|\\|\/|\%U+200B)+)\%/,ja=function(o,a=[],n=!1,e=!1){const i=!e&&R.r.settings.fhStyle||"fh"==e;for(;o.match(Qd);)o=o.replace(Qd,(s,...l)=>{let m=l[0],O="";-1!=m.indexOf(":")&&(O=m.split(":")[1],m=m.split(":")[0]);let k=m.split(".");!O&&-1!=l[0].indexOf(":")&&(O=k[k.length-1]),O||(O="");const W=k[0],ct=k[1];let Ct=s,Ot="";if("condition"==ct)Ot='',O&&(Ot+=''+O+""),Ct=''+(i?" ":R.r.getLabel(m,[""]))+Ot+"";else if("action"!=ct||3!=k.length||k[2].startsWith("specialTarget")||k[2].startsWith("summon")||k[2].startsWith("area"))if("element"==ct){let xt=k[2];"consume"==xt?(Ot='',xt=k[3]):Ot='',Ot+='',Ct=Ot}else if("elementHalf"==ct){let xt=!1;k[2]&&k[2].startsWith("consume")&&(xt=!0);const Gt=O.split("|");Ct=''}else if("action"==ct&&k[2].startsWith("area"))Ct='',O.split("|").forEach(xt=>{const Gt=Fi.fromString(xt);null!=Gt&&(Ct+='')}),Ct+="";else if("initiative"==ct&&3==k.length)Ot='',Ct=''+k[2]+Ot+"";else if("action"==ct&&4==k.length)Ot='',Ct=''+Ot+O+"";else if("game"==W&&"items"==ct&&4==k.length)Ot='',Ct=''+Ot+O+"";else if("game"==W&&"itemFh"==ct&&3==k.length){const xt=+k[2];Ct=''+(xt<100?"0":"")+(xt<10?"0":"")+xt+""}else if("card"==ct&&3==k.length){let xt=k[2],Gt="";O&&(Gt=''+O+""),Ot='',Ct=''+Ot+''+Gt+""}else if("attackmodifier"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("experience"==ct)Ot='',Ct=''+Ot+(O?''+O+"":"")+"";else if("characterIcon"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("characterIconColored"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("characterIconColoredBg"==ct&&3==k.length){const xt=k[2];Ot='',Ct=''+Ot+""}else if("characterIconIdentity"==ct&&4==k.length)Ot='',Ct=''+Ot+"";else if("characterIconIdentityColored"==ct&&4==k.length)Ot='',Ct=''+Ot+"";else if("characterIconIdentityColoredBg"==ct&&4==k.length){const xt=k[2];Ot='',Ct=''+Ot+""}else if("characterToken"==ct&&k.length>=3){const xt=k[2];let Gt=d.v.characterManager.characterIcon(xt),se=!1;k.length>3&&(Gt="./assets/images/character/token/"+xt+"-"+k[3]+".svg",se=!0),Ot='',Ct=''+Ot+""}else if("coloredToken"==ct&&k.length>3)Ot='',Ct=''+Ot+"";else if("monsterType"==ct&&3==k.length){const xt=k[2];Ct=''+R.r.getLabel("game.monster."+xt)+""}else if("mapMarker"==ct&&3==k.length)"element"==k[2]?(Ot='',Ct=''+Ot+""):Ct=''+k[2]+"";else if("objectiveMarker"==ct&&3==k.length)Ct=''+k[2]+"";else if("scenarioNumber"==ct)Ct=''+O+"";else if(i&&"target"==ct&&2==k.length)Ot='',Ct=''+Ot+"";else if(i||"damage"!=ct)if(i&&"damage"==ct)Ot='',Ct=' '+Ot+O+"";else if("loot"==ct&&4==k.length)Ot='',Ct=''+Ot+"";else if("resource"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("section"==ct&&O)Ot='',Ct=''+Ot+O+"";else if("checkmark"==ct)Ct='';else if("itemSlot"==ct&&O)Ct='';else if("townGuardAm"==ct&&3==k.length&&O){const xt=k[2];let Gt="";xt==Lt.tI.plus?Gt="+":xt==Lt.tI.minus?Gt="-":xt==Lt.tI.multiply&&(Gt="x"),Ct=''+Gt+O+""}else if("fhIcon"==ct&&O)Ot='',Ct=''+Ot+"";else if("trait"==ct&&O)Ot='',Ct=''+Ot+R.r.getLabel("data.character.traits."+O)+"";else{let xt=m.split(":").splice(1).map(Gt=>ja(R.r.getLabel(Gt),a,n));O&&(xt=[O,...xt]),xt.push(...a),Ct=R.r.getLabel(m.split(":")[0],xt)+Ot}else Ct=''+R.r.getLabel("game.damage",[O])+"";else{k.splice(0,1);const xt=-1!=q1.indexOf(k[k.length-1]);Ot='',Ct=''+(i?" ":R.r.getLabel(m))+Ot+O+""}return Ct});return YM(o,n)},YM=function(o,a){for(;o.match(ae.HY);)o=o.replace(ae.HY,(n,...e)=>{if(R.r.settings.calculate&&!a)return""+(0,ae.j9)(n);{let i=e[2];const s=i&&i.startsWith("$");return s&&(i=i.replace("$","")),s?e[0]+" "+R.r.getLabel("game.custom."+i):e[0]}});for(;o.match(ae.et);)o=o.replace(ae.et,(n,...e)=>{let i=e[2];const s=i&&i.startsWith("$");return s&&(i=i.replace("$","")),s?e[0]+" "+R.r.getLabel("game.custom."+i):e[0]});return o};let ie=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"args",[]),(0,_.Z)(this,"argLabel",!0),(0,_.Z)(this,"empty",!0),(0,_.Z)(this,"attribute",""),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"C",void 0),(0,_.Z)(this,"L",void 0),(0,_.Z)(this,"locale",void 0),(0,_.Z)(this,"calc",!1),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e,e.nativeElement.classList.add("placeholder"),this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.locale=R.r.settings.locale,this.calc=R.r.settings.calculate,this.fhStyle=R.r.settings.fhStyle}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{(this.locale!=R.r.settings.locale||this.C!=d.v.game.figures.filter(e=>e instanceof oe.z).length||this.L!=d.v.game.level||this.fhStyle!=R.r.settings.fhStyle||this.calc!=R.r.settings.calculate)&&(this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.locale=R.r.settings.locale,this.calc=R.r.settings.calculate,this.fhStyle=R.r.settings.fhStyle,this.apply())}}),this.apply()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){(e.args&&JSON.stringify(e.args.previousValue)!=JSON.stringify(e.args.currentValue)||e.value&&e.value.previousValue!=e.value.currentValue||e.style&&e.style.previousValue!=e.style.currentValue)&&this.apply()}apply(){let e=this.args||[];this.argLabel&&(e=e.map(s=>ja(R.r.getLabel(s,[],!1,this.empty),[],this.relative,this.style)));const i=this.value&&ja(R.r.getLabel(this.value,e,!1,this.empty),e,this.relative,this.style)||"";this.attribute?this.el.nativeElement.setAttribute(this.attribute,i):this.el.nativeElement.innerHTML=i}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","ghs-label",""]],inputs:{value:["ghs-label","value"],args:["ghs-label-args","args"],argLabel:["ghs-label-args-replace","argLabel"],empty:["ghs-label-empty","empty"],attribute:["ghs-label-attribute","attribute"],relative:"relative",style:"style"},features:[t.TTD]})),a})();function Rd(o,a=void 0,n=!1){if("number"==typeof o)return n&&0==o?"-":o;if("string"==typeof o&&"0"==o)return"-";if(!o)return n?"-":"";let e=d.v.game.level;if(a&&a>0&&(e=a),R.r.settings.calculate&&(o.match(ae.GB)||o.match(ae.HY)))try{return(0,ae.j9)(o,e)}catch{return console.error("Could not calculate value for: ",o),o}const i=o.match(ae.HY);if(i){let s=i[3];const l=s&&s.startsWith("$");return l&&(s=s.replace("$","")),l?i[1]+" "+R.r.getLabel("game.custom."+s):i[1]}for(;o.match(Qd);)o=o.replace(Qd,(s,...l)=>R.r.getLabel(l[0]));return o||(n?"-":"")}let ng=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"level",void 0),(0,_.Z)(this,"empty",!1),(0,_.Z)(this,"C",void 0),(0,_.Z)(this,"L",void 0),(0,_.Z)(this,"calc",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e,this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.calc=R.r.settings.calculate}ngOnChanges(e){this.el.nativeElement.innerHTML=Rd(this.value,this.level,this.empty)}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{(this.calc!=R.r.settings.calculate||this.C!=Math.max(2,d.v.characterManager.characterCount())||this.L!=d.v.game.level)&&(this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.calc=R.r.settings.calculate,this.el.nativeElement.innerHTML=Rd(this.value,this.level,this.empty))}}),this.el.nativeElement.innerHTML=Rd(this.value,this.level,this.empty)}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","value-calc",""]],inputs:{value:["value-calc","value"],level:"level",empty:"empty"},features:[t.TTD]})),a})();const Go=function(o){return{small:o}};function w0(o,a){if(1&o&&(t.TgZ(0,"span",20),t._UZ(1,"ghs-action-hex",21),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(4,Go,n.action.small)),t.xp6(1),t.Q6J("action",n.action)("value",""+n.action.value)("size",n.hexSize)}}function k0(o,a){if(1&o&&t._UZ(0,"img",31),2&o){const n=t.oxw(3);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/condition/"+n.getConditionName(n.getValues(n.action)[0])+".svg",t.LSH)}}function T0(o,a){1&o&&t._UZ(0,"img",32)}function KM(o,a){if(1&o&&(t.TgZ(0,"span",33),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Oqu(n.getValues(n.action)[1])}}function Rk(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function $M(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Rk,2,0,"span",19),t._UZ(2,"ghs-action",36),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("statsCalculation",i.statsCalculation)("highlightElements",i.highlightElements)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function Z0(o,a){if(1&o&&(t.TgZ(0,"div",34),t.YNc(1,$M,3,13,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const mf=function(o){return{"highlight-text":o}},Fk=function(o){return[o]},A0=function(){return[]};function S0(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",22)(1,"span",23),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.TgZ(2,"span",24),t._UZ(3,"span",25),t.qZA(),t.TgZ(4,"span",26),t.YNc(5,k0,1,1,"img",27),t.YNc(6,T0,1,0,"img",28),t.YNc(7,KM,2,1,"span",29),t.qZA()(),t.YNc(8,Z0,3,4,"div",30),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(11,Go,n.action.small)),t.xp6(1),t.Q6J("ngClass",t.VKq(13,mf,n.highlightAction()))("clickBehind",!n.highlightAction()),t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","game.condition."+n.getConditionName(n.getValues(n.action)[0]))("ghs-label-args",n.getValues(n.action).length>1?t.VKq(15,Fk,n.getValues(n.action)[1]):t.DdM(17,A0)),t.xp6(2),t.Q6J("ngIf","invalid"!=n.getConditionName(n.getValues(n.action)[0])),t.xp6(1),t.Q6J("ngIf","invalid"==n.getConditionName(n.getValues(n.action)[0])),t.xp6(1),t.Q6J("ngIf",n.getValues(n.action).length>1),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function WM(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",48),t.NdJ("singleClick",function(i){const l=t.CHM(n).$implicit,m=t.oxw(2).index,O=t.oxw(4);return t.KtG(O.elementAction(i,O.action,l,m,!0))}),t._UZ(1,"img",44),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2).index,i=t.oxw(4);t.Q6J("clickBehind",!i.highlightElement(i.getValues(i.action),i.action.valueType==i.ActionValueType.minus,e)),t.xp6(1),t.Q6J("src","./assets/images"+(i.fhStyle?"/fh":"")+"/element/"+n+".svg",t.LSH)}}function XM(o,a){if(1&o&&(t.TgZ(0,"span",46),t.YNc(1,WM,2,2,"span",47),t.qZA()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("ngForOf",n.action.valueType==n.ActionValueType.minus?n.wildToConsume():n.wildToCreate())}}const t1=function(o,a,n){return{consume:o,highlight:a,wild:n}};function e1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",43),t.NdJ("singleClick",function(i){const s=t.CHM(n),l=s.$implicit,m=s.index,O=t.oxw(4);return t.KtG(O.elementAction(i,O.action,l,m))}),t._UZ(1,"img",44),t.YNc(2,XM,2,1,"span",45),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Q6J("clickBehind",!i.highlightElement(i.getValues(i.action),i.action.valueType==i.ActionValueType.minus,e))("ngClass",t.kEZ(4,t1,i.action.valueType==i.ActionValueType.minus,i.highlightElement(i.getValues(i.action),i.action.valueType==i.ActionValueType.minus,e),"wild"==n)),t.xp6(1),t.Q6J("src","./assets/images"+(i.fhStyle?"/fh":"")+"/element/"+n+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf","wild"==n)}}function n1(o,a){1&o&&(t.TgZ(0,"span",49),t._uU(1,":"),t.qZA())}function o1(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",40),t.YNc(2,e1,3,8,"span",41),t.YNc(3,n1,2,0,"span",42),t.qZA(),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngForOf",n.getValues(n.action)),t.xp6(1),t.Q6J("ngIf",n.action.valueType==n.ActionValueType.minus&&n.subActions.length>0)}}function a1(o,a){1&o&&(t.TgZ(0,"span",49),t._uU(1,":"),t.qZA())}const vf=function(o,a){return{consume:o,highlight:a}};function s1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",40)(1,"span",50),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.elementAction(i,s.action,s.getValues(s.action)[0],0))}),t._UZ(2,"img",44),t.qZA(),t.TgZ(3,"span",50),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.elementAction(i,s.action,s.getValues(s.action)[1],1))}),t._UZ(4,"img",44),t.qZA(),t.YNc(5,a1,2,0,"span",42),t.qZA()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.WLB(7,vf,n.action.valueType==n.ActionValueType.minus,n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,0)))("clickBehind",!n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,0)),t.xp6(1),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/element/"+n.getValues(n.action)[0]+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.WLB(10,vf,n.action.valueType==n.ActionValueType.minus,n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,1)))("clickBehind",!n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,1)),t.xp6(1),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/element/"+n.getValues(n.action)[1]+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.action.valueType==n.ActionValueType.minus)}}function r1(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function Fd(o,a){if(1&o&&(t.ynx(0),t.YNc(1,r1,2,0,"span",19),t._UZ(2,"ghs-action",52),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("relative",i.relative||i.forceRelative)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements&&(i.action.valueType!=i.ActionValueType.minus||i.elementActionsPerformed(i.getValues(i.action),!0)))("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function c1(o,a){if(1&o&&(t.TgZ(0,"div",51),t.YNc(1,Fd,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const l1=function(o,a){return{small:o,"action-element-consume":a}};function g1(o,a){if(1&o&&(t.TgZ(0,"span",37),t.YNc(1,o1,4,2,"ng-container",19),t.YNc(2,s1,6,13,"span",38),t.YNc(3,c1,3,4,"div",39),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.WLB(4,l1,n.action.small,n.action.valueType==n.ActionValueType.minus)),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.element),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.elementHalf&&2==n.getValues(n.action).length),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function d1(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function h1(o,a){if(1&o&&(t.ynx(0),t.YNc(1,d1,2,0,"span",19),t._UZ(2,"ghs-action",59),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(5);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("relative",i.relative)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.getMonsterType(""+i.action.value))}}function u1(o,a){if(1&o&&(t.TgZ(0,"div",58),t.YNc(1,h1,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function E0(o,a){if(1&o&&(t.TgZ(0,"span",54)(1,"span",55),t._UZ(2,"span",56),t._uU(3,":"),t.qZA(),t.YNc(4,u1,3,4,"div",57),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngClass","monster-type-"+n.action.value),t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","monster."+n.action.value),t.xp6(2),t.Q6J("ngIf",n.subActions.length>0)}}function qk(o,a){if(1&o&&(t.ynx(0),t.YNc(1,E0,5,8,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.relative||n.hasEntities(""+n.action.value))}}function Hk(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function _1(o,a){if(1&o&&(t.TgZ(0,"span",66),t._uU(1),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Oqu(n.getEliteRange())}}function p1(o,a){if(1&o&&(t.TgZ(0,"span",64)(1,"span"),t._uU(2),t.qZA(),t.YNc(3,Hk,2,0,"span",19),t.YNc(4,_1,2,1,"span",65),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(4,Go,n.action.small)),t.xp6(2),t.Oqu(n.getRange()),t.xp6(1),t.Q6J("ngIf",n.getEliteRange()&&n.getRange()!=n.getEliteRange()),t.xp6(1),t.Q6J("ngIf",n.getEliteRange()&&n.getRange()!=n.getEliteRange())}}function f1(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function D0(o,a){if(1&o&&(t.ynx(0),t.YNc(1,f1,2,0,"span",19),t._UZ(2,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function I0(o,a){if(1&o&&(t.TgZ(0,"div",67),t.YNc(1,D0,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const qd=function(o,a){return{"text-white":o,small:a}},N0=function(){return["alliesRange:","alliesRangeAffect:","allyAffectRange:","enemiesRange:","enemiesRangeAffect:","enemyRange:"]};function Cf(o,a){if(1&o&&(t.TgZ(0,"span",60),t._UZ(1,"span",61),t.YNc(2,p1,5,6,"span",62),t.YNc(3,I0,3,4,"div",63),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.specialTarget."+n.getValues(n.action)[0])("ghs-label-args",n.getValues(n.action).splice(1))("relative",n.relative||n.forceRelative)("ngClass",t.WLB(8,qd,!n.right,n.action.small)),t.xp6(1),t.Q6J("ngIf",-1!=t.DdM(11,N0).indexOf(n.action.value+"")),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function J0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function jk(o,a){if(1&o&&(t.TgZ(0,"div",72),t.YNc(1,J0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const Hd=function(o,a){return{small:o,"text-white":a}};function Bk(o,a){if(1&o&&(t.TgZ(0,"span",69),t._UZ(1,"span",70),t.YNc(2,jk,3,4,"div",71),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(6,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function jd(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function U0(o,a){if(1&o&&(t.TgZ(0,"div",72),t.YNc(1,jd,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const m1=function(o,a){return[o,a]};function L0(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",74)(1,"span",75),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.qZA(),t.YNc(2,U0,3,4,"div",71),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(9,mf,n.highlightAction())),t.xp6(1),t.Akn(n.style),t.Q6J("clickBehind",!n.highlightAction())("ghs-label","game.sufferDamage")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(11,Hd,n.action.small,!n.right))("ghs-label-args",t.WLB(14,m1,n.monster?"%data.monster."+n.monster.name+"%":"",n.action.value+"")),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function Fu(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function v1(o,a){if(1&o&&(t.TgZ(0,"div",72),t.YNc(1,Fu,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function Q0(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",74)(1,"span",76),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.qZA(),t.YNc(2,v1,3,4,"div",71),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(8,mf,n.highlightAction())),t.xp6(1),t.Akn(n.style),t.Q6J("clickBehind",!n.highlightAction())("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(10,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function C1(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",!0)("statsCalculation",!1)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function qu(o,a){if(1&o&&(t.TgZ(0,"div",80),t.YNc(1,C1,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function R0(o,a){if(1&o&&(t.TgZ(0,"span",77),t._UZ(1,"span",78),t.YNc(2,qu,3,4,"div",79),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(6,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function F0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function M1(o,a){if(1&o&&(t.ynx(0),t.YNc(1,F0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function q0(o,a){if(1&o&&(t.TgZ(0,"span",81),t._UZ(1,"ghs-action-summon",82),t.YNc(2,M1,3,4,"ng-container",19),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(11,Go,n.action.small)),t.xp6(1),t.Akn(n.style),t.Q6J("action",n.action)("right",n.right)("monster",n.monster)("objective",n.objective)("highlight",n.highlightElements)("index",n.actionIndex)("monsterType",n.monsterType),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function H0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function O1(o,a){if(1&o&&(t.ynx(0),t.YNc(1,H0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function Hu(o,a){if(1&o&&(t.TgZ(0,"span",81),t._UZ(1,"ghs-action-summon",83),t.YNc(2,O1,3,4,"ng-container",19),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(12,Go,n.action.small)),t.xp6(1),t.Akn(n.style),t.Q6J("action",n.action)("right",n.right)("monster",n.monster)("objective",n.objective)("spawn",!0)("highlight",n.highlightElements)("index",n.actionIndex)("monsterType",n.monsterType),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function j0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function B0(o,a){if(1&o&&(t.ynx(0),t.YNc(1,j0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function P1(o,a){if(1&o&&(t.TgZ(0,"span",84),t._UZ(1,"span",70),t.YNc(2,B0,3,4,"ng-container",19),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(6,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function y1(o,a){if(1&o&&t._UZ(0,"span",90),2&o){const n=t.oxw(6);t.Akn(n.style),t.Q6J("ghs-label",n.getValues(n.action)[0])("relative",n.relative||n.forceRelative)}}function Mf(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function b1(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,y1,1,4,"span",89),t.YNc(2,Mf,2,0,"span",19),t.qZA()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("ngIf",!n.fhStyle),t.xp6(1),t.Q6J("ngIf",n.fhStyle)}}function z0(o,a){if(1&o&&(t.TgZ(0,"span",88),t.YNc(1,b1,3,2,"span",19),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.getValues(n.action).length>0)}}function x1(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.YNc(2,z0,2,1,"span",87),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType),t.xp6(1),t.Q6J("ngIf",!i.inline&&(i.getValues(i.action).length>1&&+i.getValues(i.action)[1]>0&&e<+i.getValues(i.action)[1]-1||i.getValues(i.action).length<2&&e0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function V0(o,a){if(1&o&&(t.TgZ(0,"div",34),t.YNc(1,G0,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.Dn7(2,1,n.subActions,+n.getValues(n.action)[1]+(n.hasAOE?1:0),n.subActions.length))}}function Of(o,a){if(1&o&&(t.TgZ(0,"span",85)(1,"span",86),t.YNc(2,x1,3,14,"ng-container",35),t.ALo(3,"slice"),t.qZA(),t.YNc(4,V0,3,5,"div",30),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(7,Go,n.action.small)),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,3,n.subActions,n.hasAOE?1:0,n.getValues(n.action).length>1?+n.getValues(n.action)[1]:n.subActions.length)),t.xp6(2),t.Q6J("ngIf",n.getValues(n.action).length>1&&n.subActions.length>+n.getValues(n.action)[1])}}function Pf(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function k1(o,a){if(1&o&&(t.TgZ(0,"span",92),t.YNc(1,Pf,2,13,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.Udp("--ghs-grid-columns",n.action.value||2),t.Q6J("ngClass",t.VKq(7,Go,n.action.small)),t.xp6(1),t.Q6J("ngForOf",t.xi3(2,4,n.subActions,n.hasAOE?1:0))}}function yf(o,a){if(1&o&&(t.TgZ(0,"span",85),t.YNc(1,k1,3,9,"span",91),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",t.xi3(2,1,n.subActions,n.hasAOE?1:0).length>0)}}function bf(o,a){if(1&o&&t._UZ(0,"span",96),2&o){const n=t.oxw(3);t.Akn(n.style),t.Q6J("ghs-label",""+n.action.value)("relative",n.relative||n.forceRelative)}}function Y0(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function K0(o,a){if(1&o&&(t.TgZ(0,"span",93),t.YNc(1,bf,1,4,"span",94),t.TgZ(2,"span",95),t.YNc(3,Y0,2,13,"ng-container",35),t.ALo(4,"slice"),t.qZA()()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngIf",n.action.value),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,3,n.subActions,n.hasAOE?1:0))}}function $0(o,a){if(1&o&&t._UZ(0,"span",96),2&o){const n=t.oxw(3);t.Akn(n.style),t.Q6J("ghs-label",""+n.action.value)("relative",n.relative||n.forceRelative)}}function W0(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function T1(o,a){if(1&o&&(t.TgZ(0,"span",97),t.YNc(1,$0,1,4,"span",94),t.TgZ(2,"span",95),t.YNc(3,W0,2,13,"ng-container",35),t.ALo(4,"slice"),t.qZA()()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngIf",n.action.value),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,3,n.subActions,n.hasAOE?1:0))}}function xf(o,a){if(1&o&&t._UZ(0,"span",96),2&o){const n=t.oxw(3);t.Akn(n.style),t.Q6J("ghs-label",""+n.action.value)("relative",n.relative||n.forceRelative)}}function Z1(o,a){1&o&&(t.TgZ(0,"span",100)(1,"span",33),t._uU(2,"!"),t.qZA()())}function A1(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function S1(o,a){if(1&o&&(t.TgZ(0,"span",98),t.YNc(1,xf,1,4,"span",94),t.YNc(2,Z1,3,0,"span",99),t.TgZ(3,"span",95),t.YNc(4,A1,2,13,"ng-container",35),t.ALo(5,"slice"),t.qZA()()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(7,Go,n.action.small)),t.xp6(1),t.Q6J("ngIf",n.action.value),t.xp6(1),t.Q6J("ngIf",!n.action.value),t.xp6(2),t.Q6J("ngForOf",t.xi3(5,4,n.subActions,n.hasAOE?1:0))}}function E1(o,a){if(1&o&&t._UZ(0,"img",106),2&o){const n=t.oxw(3);t.MGl("src","./assets/images/action/card/overlay/",n.getValues(n.action)[0],".svg",t.LSH)}}function X0(o,a){if(1&o&&t._UZ(0,"span",107),2&o){const n=t.oxw(3);t.Udp("mask-image","url('/assets/images/action/card/overlay/"+n.getValues(n.action)[0]+".svg')")("-webkit-mask-image","url('/assets/images/action/card/overlay/"+n.getValues(n.action)[0]+".svg')")}}function D1(o,a){if(1&o&&(t.TgZ(0,"span",33),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Oqu(n.getValues(n.action)[1])}}function I1(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",101)(2,"div",102),t._UZ(3,"img",103),t.YNc(4,E1,1,1,"img",104),t.YNc(5,X0,1,4,"span",105),t.YNc(6,D1,2,1,"span",29),t.qZA()(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngClass",n.getValues(n.action)[0]),t.xp6(1),t.MGl("src","./assets/images/action/card/",n.getValues(n.action)[0],".svg",t.LSH),t.xp6(1),t.Q6J("ngIf","slot"!=n.getValues(n.action)[0]&&"slotStart"!=n.getValues(n.action)[0]&&"slotXp"!=n.getValues(n.action)[0]),t.xp6(1),t.Q6J("ngIf","slot"==n.getValues(n.action)[0]||"slotStart"==n.getValues(n.action)[0]||"slotXp"==n.getValues(n.action)[0]),t.xp6(1),t.Q6J("ngIf",n.getValues(n.action).length>1)}}function tx(o,a){if(1&o&&(t.TgZ(0,"span",108)(1,"span",109),t._UZ(2,"span",56),t._uU(3),t.qZA(),t._UZ(4,"ghs-actions",110),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(16,Go,n.action.small)),t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","game.action."+n.action.type),t.xp6(1),t.hij(" ",n.action.value,":"),t.xp6(1),t.Akn(n.style),t.Q6J("actions",n.getSpecial(n.action))("monster",n.monster)("inline",n.inline)("right",n.right)("hexSize",n.hexSize)("highlightElements",n.highlightElements)("relative",n.relative||n.forceRelative)("statsCalculation",n.statsCalculation)("index",n.actionIndex)}}const Bd=function(o){return{"ghs-svg":o}};function ex(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/"+n.action.type+".svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function Ao(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function ig(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",117),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("value-calc",n.getNormalValue())("level",n.level)}}function nx(o,a){1&o&&(t.ynx(0),t.TgZ(1,"span"),t._uU(2,"/"),t.qZA(),t.BQk())}const N1=function(o){return{elite:o}};function zk(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",118),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("ngClass",t.VKq(3,N1,n.hasEntities(n.MonsterType.normal)))("value-calc",n.getEliteValue())("level",n.level)}}function Gk(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,ig,2,2,"ng-container",19),t.YNc(2,nx,3,0,"ng-container",19),t.YNc(3,zk,2,5,"ng-container",19),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)||!n.monster),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)&&n.hasEntities(n.MonsterType.elite)&&n.getNormalValue()!=n.getEliteValue()),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.elite)&&(n.getNormalValue()!=n.getEliteValue()||!n.hasEntities(n.MonsterType.normal)))}}function J1(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",90),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.getNormalValue()+"")("relative",n.relative||n.forceRelative)}}function wf(o,a){1&o&&(t.ynx(0),t.TgZ(1,"span"),t._uU(2,"/"),t.qZA(),t.BQk())}function Vk(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",119),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Akn(n.style),t.Q6J("ngClass",t.VKq(5,N1,n.hasEntities(n.MonsterType.normal)))("ghs-label",n.getEliteValue()+"")("relative",n.relative||n.forceRelative)}}function Yk(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t.qZA())}function Kk(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,J1,2,4,"ng-container",19),t.YNc(2,wf,3,0,"ng-container",19),t.YNc(3,Vk,2,7,"ng-container",19),t.YNc(4,Yk,2,0,"span",19),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)||!n.monster||n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)&&n.hasEntities(n.MonsterType.elite)&&n.getNormalValue()!=n.getEliteValue()),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.elite)&&(n.getNormalValue()!=n.getEliteValue()||!n.hasEntities(n.MonsterType.normal))),t.xp6(1),t.Q6J("ngIf",!n.fhStyle)}}function zd(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",113),t._UZ(2,"span",56),t.qZA(),t.TgZ(3,"span",114),t.YNc(4,ex,1,4,"img",115),t.YNc(5,Ao,1,4,"img",115),t.qZA(),t.TgZ(6,"span",33),t.YNc(7,Gk,4,3,"span",19),t.YNc(8,Kk,5,4,"span",19),t.qZA(),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","game.action."+n.action.type),t.xp6(2),t.Q6J("ngIf",n.action.type!=n.ActionType.move||!n.monster||!n.monster.flying),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.move&&n.monster&&n.monster.flying),t.xp6(2),t.Q6J("ngIf",!n.relative&&!n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.relative||n.forceRelative)}}function ix(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function kf(o,a){if(1&o&&t._UZ(0,"span",122),2&o){const n=t.oxw(5);t.Q6J("value-calc",n.getEliteValue())("level",n.level)}}function ox(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",117),t.YNc(2,ix,2,0,"span",19),t.YNc(3,kf,1,2,"span",121),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("value-calc",n.getNormalValue())("level",n.level),t.xp6(1),t.Q6J("ngIf",n.getEliteValue()&&n.getNormalValue()!=n.getEliteValue()),t.xp6(1),t.Q6J("ngIf",n.getEliteValue()&&n.getNormalValue()!=n.getEliteValue())}}function U1(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t._UZ(2,"span",123),t.qZA()),2&o){const n=t.oxw(5);t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label",n.getEliteValue()+"")("relative",n.relative||n.forceRelative)}}function ax(o,a){if(1&o&&(t.TgZ(0,"span",90),t.YNc(1,U1,3,4,"span",19),t.qZA()),2&o){const n=t.oxw(4);t.Akn(n.style),t.Q6J("ghs-label",n.getNormalValue()+"")("relative",n.relative||n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.getNormalValue()!=n.getEliteValue())}}function sx(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t.qZA())}function rx(o,a){if(1&o&&(t.TgZ(0,"span",113),t._UZ(1,"span",56),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.action.targets")}}function Tf(o,a){if(1&o&&(t.TgZ(0,"span",113),t._UZ(1,"span",56),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.action."+n.action.type)}}function L1(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/"+n.action.type+".svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function cx(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function ju(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._uU(2),t.YNc(3,ox,4,4,"span",19),t.YNc(4,ax,2,5,"span",89),t.YNc(5,sx,2,0,"span",19),t.qZA(),t.YNc(6,rx,2,3,"span",120),t.YNc(7,Tf,2,3,"span",120),t.YNc(8,L1,1,4,"img",115),t.YNc(9,cx,1,4,"img",115),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.action.valueType==n.ActionValueType.add?"+":"-"," "),t.xp6(1),t.Q6J("ngIf",!n.relative&&!n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.relative||n.forceRelative),t.xp6(1),t.Q6J("ngIf",!n.fhStyle),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.target&&n.EntityValueFunction(n.action.value)>1),t.xp6(1),t.Q6J("ngIf",n.action.type!=n.ActionType.target||n.EntityValueFunction(n.action.value)<2),t.xp6(1),t.Q6J("ngIf",n.action.type!=n.ActionType.move||!n.monster||!n.monster.flying),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.move&&n.monster&&n.monster.flying)}}function Zf(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function $k(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Zf,2,0,"span",19),t._UZ(2,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function Q1(o,a){if(1&o&&(t.TgZ(0,"div",34),t.YNc(1,$k,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.statsCalculation&&n.additionalSubActions.length>0?n.additionalSubActions:n.subActions,n.hasAOE?1:0))}}const lx=function(o,a){return{small:o,"highlight-text":a}};function R1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",111),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.TgZ(1,"span",112),t.YNc(2,zd,9,7,"ng-container",19),t.YNc(3,ju,10,8,"ng-container",19),t.qZA(),t.YNc(4,Q1,3,4,"div",30),t.ALo(5,"slice"),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass","action-"+n.action.type)("clickBehind",!n.highlightAction()),t.xp6(1),t.Q6J("ngClass",t.WLB(9,lx,n.action.small,n.highlightAction())),t.xp6(1),t.Q6J("ngIf",n.action.valueType!=n.ActionValueType.add&&n.action.valueType!=n.ActionValueType.subtract),t.xp6(1),t.Q6J("ngIf",n.action.valueType==n.ActionValueType.add||n.action.valueType==n.ActionValueType.subtract),t.xp6(1),t.Q6J("ngIf",t.xi3(5,6,n.statsCalculation&&n.additionalSubActions.length>0?n.additionalSubActions:n.subActions,n.hasAOE?1:0).length>0)}}function og(o,a){if(1&o&&(t.TgZ(0,"div",124),t._UZ(1,"ghs-action",125),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(13,Go,n.action.small)),t.xp6(1),t.Akn(n.style),t.Q6J("ngClass","subaction-area")("action",(n.statsCalculation&&n.additionalSubActions.length>0?n.additionalSubActions:n.subActions)[0])("monster",n.monster)("inline",n.inline)("right",n.right)("hexSize",n.hexSize)("highlightElements",n.highlightElements)("relative",n.relative||n.forceRelative)("statsCalculation",n.statsCalculation)("monsterType",n.monsterType)}}function gx(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function F1(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",126),t.YNc(2,gx,1,13,"ghs-action",73),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",n.elementActions)}}const Af=function(o,a,n,e,i){return{highlight:o,inline:a,right:n,fh:e,aoe:i}};function Wk(o,a){if(1&o&&(t.TgZ(0,"span",1),t.YNc(1,w0,2,6,"span",2),t.YNc(2,S0,9,18,"span",3),t.YNc(3,g1,4,7,"span",4),t.YNc(4,qk,2,1,"ng-container",5),t.YNc(5,Cf,4,12,"span",6),t.YNc(6,Bk,3,9,"span",7),t.YNc(7,L0,3,17,"span",8),t.YNc(8,Q0,3,13,"span",8),t.YNc(9,R0,3,9,"span",9),t.YNc(10,q0,3,13,"span",10),t.YNc(11,Hu,3,14,"span",10),t.YNc(12,P1,3,9,"span",11),t.YNc(13,Of,5,9,"span",12),t.YNc(14,yf,3,4,"span",12),t.YNc(15,K0,5,8,"span",13),t.YNc(16,T1,5,8,"span",14),t.YNc(17,S1,6,9,"span",15),t.YNc(18,I1,7,8,"ng-container",5),t.YNc(19,tx,5,18,"span",16),t.YNc(20,R1,6,12,"span",17),t.YNc(21,og,2,15,"div",18),t.YNc(22,F1,3,1,"ng-container",19),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngSwitch",n.action.type)("ngClass",t.qbA(23,Af,n.highlight,n.inline,n.right,n.fhStyle,n.hasAOE)),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.area),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.condition),t.xp6(1),t.Q6J("ngSwitchCase",t.WLB(29,m1,n.ActionType.element,n.ActionType.elementHalf).includes(n.action.type)?n.action.type:""),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.monsterType),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.specialTarget),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.custom),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.sufferDamage),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.switchType),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.grant),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.summon),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.spawn),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.trigger),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.concatenation),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.grid),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.box),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.boxFhSubActions),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.forceBox),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.card),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.special),t.xp6(2),t.Q6J("ngIf",n.hasAOE),t.xp6(1),t.Q6J("ngIf",n.elementActions.length>0&&n.fhStyle)}}const q1=[vt.Us.attack,vt.Us.damage,vt.Us.fly,vt.Us.heal,vt.Us.jump,vt.Us.loot,vt.Us.move,vt.Us.range,vt.Us.retaliate,vt.Us.shield,vt.Us.target,vt.Us.teleport];let Gr=(()=>{var o;class a{constructor(){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"monsterType",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"origAction",void 0),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"inline",!1),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"highlight",!1),(0,_.Z)(this,"highlightElements",!1),(0,_.Z)(this,"statsCalculation",!1),(0,_.Z)(this,"hexSize",void 0),(0,_.Z)(this,"actionIndex",""),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"subActions",[]),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"additionalSubActions",[]),(0,_.Z)(this,"elementActions",[]),(0,_.Z)(this,"additionAttackSubActionTypes",[vt.Us.condition,vt.Us.target,vt.Us.pierce,vt.Us.pull,vt.Us.push,vt.Us.swing,vt.Us.area]),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"hasAOE",!1),(0,_.Z)(this,"forceRelative",!1),(0,_.Z)(this,"level",0),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.fhStyle=R.r.settings.fhStyle&&!this.style||"fh"==this.style,this.action=this.origAction?JSON.parse(JSON.stringify(this.origAction)):void 0,this.action&&!this.action.subActions&&(this.action.subActions=[]),this.action&&void 0===this.action.value&&(this.action.value=""),this.action&&this.action.type==vt.Us.monsterType&&(this.monsterType=this.action.value),this.updateSubActions(),this.forceRelative=null!=this.monster&&!this.hasEntities(),this.monster&&!this.relative&&!this.forceRelative&&R.r.settings.calculate&&this.action&&(this.action.type==vt.Us.shield||this.action.type==vt.Us.retaliate)&&this.action.valueType!=vt.EF.minus&&this.action.subActions&&this.action.subActions.find(e=>e.type==vt.Us.specialTarget&&!(e.value+"").startsWith("self"))&&(this.forceRelative=!0,this.action.valueType=vt.EF.plus),this.level=this.monster?this.monster.level:d.v.game.level}hasEntities(e=void 0){return e==ee.M.normal&&this.monster&&this.monster.boss?this.hasEntities(ee.M.boss):this.monster&&(!this.monsterType||!e||this.monsterType==e)&&this.monster.entities.some(i=>(!e||i.type==e)&&d.v.entityManager.isAlive(i))||!1}getNormalValue(){return this.getValue(this.monster&&this.monster.boss?ee.M.boss:ee.M.normal)}getEliteValue(){return this.hasEntities(ee.M.elite)?this.getValue(ee.M.elite):this.getNormalValue()}getMonsterType(e){return e}getStat(e){return this.monster?d.v.monsterManager.getStat(this.monster,e):new zr.c(e,d.v.game.level,0,0,0,0)}getRange(e=ee.M.normal){return this.monster&&this.monster.boss&&(e=ee.M.boss),Rd(this.getStat(e).range,this.monster?this.monster.level:void 0)}getEliteRange(){return this.monster&&!this.monster.entities.some(e=>e.type==ee.M.elite&&d.v.entityManager.isAlive(e))?this.getRange():this.getRange(ee.M.elite)}getValues(e){return e.value&&"string"==typeof e.value?e.value.split(":"):[]}getSpecial(e){if(this.monster&&this.monster.boss)return this.getStat(ee.M.boss).special[e.value-1];{const i=this.getStat(ee.M.normal).special[e.value-1],s=this.getStat(ee.M.elite).special[e.value-1];return i!=s&&JSON.stringify(i)!=JSON.stringify(s)?[new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,i),new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,s)]:i}}getValue(e){if(!this.action)return"";if(R.r.settings.calculate&&!this.relative&&!this.forceRelative){const i=this.getStat(e);let s=0,l=!0;switch(this.action.type){case vt.Us.attack:if("number"==typeof i.attack)s=i.attack;else try{s=(0,ae.j9)(i.attack,this.level)}catch{l=!1}i.actions&&i.actions.forEach(m=>{m.type==vt.Us.attack&&(m.valueType==vt.EF.add?s+=(0,ae.j9)(m.value,this.level):m.valueType==vt.EF.subtract&&(s-=(0,ae.j9)(m.value,this.level),s<0&&(s=0)))});break;case vt.Us.move:s=i.movement;break;case vt.Us.range:s=i.range}if(l&&(this.action.value||0==this.action.value)&&("number"==typeof this.action.value||this.action.value.match(ae.GB)||this.action.value.match(ae.HY))){if(this.action.valueType==vt.EF.plus)return s+(0,ae.j9)(this.action.value);if(this.action.valueType==vt.EF.minus)return s-(0,ae.j9)(this.action.value)}}if(R.r.settings.calculateStats&&R.r.settings.calculateShieldStats&&!this.relative&&!this.forceRelative){const i=this.getStat(e);let s=0;if(this.action.type==vt.Us.shield||this.action.type==vt.Us.retaliate){if(!this.action.subActions||!this.action.subActions.find(l=>l.type==vt.Us.specialTarget&&!(l.value+"").startsWith("self"))){const l=i.actions&&i.actions.find(m=>this.action&&m.type==this.action.type);l&&l!=this.action&&(s=(0,ae.j9)(l.value,this.level))}if(s>0)return s+(0,ae.j9)(this.action.value,this.level)}}return this.action.valueType==vt.EF.plus?"+"+(R.r.settings.fhStyle?"":" ")+this.action.value:this.action.valueType==vt.EF.minus?"-"+(R.r.settings.fhStyle?"":" ")+this.action.value:R.r.settings.calculate&&((""+this.action.value).match(ae.GB)||(""+this.action.value).match(ae.HY))?(0,ae.j9)(this.action.value,this.level):this.action.value}getConditionName(e){return new re.gP(e).name}updateSubActions(){if(this.action){if(R.r.settings.fhStyle&&-1==[vt.Us.element,vt.Us.concatenation,vt.Us.box].indexOf(this.action.type)?(this.elementActions=this.action.subActions.filter(e=>e.type==vt.Us.element),this.action.subActions=this.action.subActions.filter(e=>e.type!=vt.Us.element)):this.elementActions=[],this.additionalSubActions=JSON.parse(JSON.stringify(this.action.subActions)),this.hasAOE=this.additionalSubActions.some((e,i)=>0==i&&e.type==vt.Us.area)&&(this.action.type!=vt.Us.element||this.action.valueType!=vt.EF.minus),this.monster&&R.r.settings.calculateStats&&!this.relative){let e=[];const i=d.v.monsterManager.getStat(this.monster,this.monster.boss?ee.M.boss:ee.M.normal);let s=this.monster.boss?void 0:d.v.monsterManager.getStat(this.monster,ee.M.elite);if(this.action.type==vt.Us.attack&&this.action.valueType!=vt.EF.add&&this.action.valueType!=vt.EF.subtract){let O=this.additionalSubActions.find(W=>W.type==vt.Us.monsterType&&W.value==ee.M.normal),k=this.additionalSubActions.find(W=>W.type==vt.Us.monsterType&&W.value==ee.M.elite);if((i.range||s&&s.range)&&!this.action.subActions.some(W=>W.type==vt.Us.range||W.type==vt.Us.area&&-1!=(""+W.value).indexOf("active")||W.type==vt.Us.specialTarget)){const W=new vt.aU(vt.Us.range,0,vt.EF.plus);W.small=!0,i.range&&(s&&s.range||!s)?this.additionalSubActions.splice(this.hasAOE?1:0,0,W):i.range?O?O.subActions.push(W):(O=new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[W]),e.push(O)):s&&s.range&&(k?k.subActions.push(W):(k=new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[W]),e.push(k)))}i.actions&&this.monster.entities.some(W=>d.v.entityManager.isAlive(W)&&(W.type==ee.M.normal||W.type==ee.M.boss))&&i.actions.filter(W=>-1!=this.additionAttackSubActionTypes.indexOf(W.type)).forEach(W=>{const ct=new vt.aU(W.type,W.value,W.valueType,W.subActions);this.action&&!this.subActionExists(this.action.subActions,ct)&&!this.subActionExists(e,ct)&&(W.type!=vt.Us.area||this.action.subActions.every(Ct=>Ct.type!=vt.Us.area))&&(!s||s.actions&&this.subActionExists(s.actions,ct,!1)||R.r.settings.hideStats&&this.monster&&!this.monster.entities.some(Ct=>d.v.entityManager.isAlive(Ct)&&Ct.type==ee.M.elite)?(ct.small=!0,e.push(ct)):s&&(!s.actions||!this.subActionExists(s.actions,ct))&&!this.subActionExists(this.action.subActions,ct)&&!this.subActionExists(e,ct)&&(O?this.subActionExists(O.subActions,ct)||O.subActions.push(ct):(O=new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[ct]),e.push(O))))}),s&&s.actions&&this.monster.entities.some(W=>d.v.entityManager.isAlive(W)&&W.type==ee.M.elite)&&s.actions.filter(W=>-1!=this.additionAttackSubActionTypes.indexOf(W.type)).forEach(W=>{const ct=new vt.aU(W.type,W.value,W.valueType,W.subActions);this.action&&(!i.actions||!this.subActionExists(i.actions,ct,!1)||!this.hasEntities(ee.M.normal))&&(this.hasEntities(ee.M.normal)?!this.subActionExists(this.action.subActions,ct)&&!this.subActionExists(e,ct)&&(k?this.subActionExists(k.subActions,ct)||k.subActions.push(ct):(k=new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,[ct]),e.push(k))):(ct.small=!0,e.push(ct)))})}e.forEach(O=>{if(this.action)if(O.type==vt.Us.target)if(this.additionalSubActions.some(k=>k.type==vt.Us.target||k.type==vt.Us.specialTarget&&k.value!=vt.q2.enemyOneAll)){if((O.valueType==vt.EF.add||O.valueType==vt.EF.fixed)&&this.additionalSubActions.some(k=>k.type==vt.Us.target)&&!this.additionalSubActions.some(k=>k.type==vt.Us.specialTarget)){const k=this.additionalSubActions.find(W=>W.type==vt.Us.target&&W!=O);k&&(O.valueType=vt.EF.fixed,O.value=(0,ae.j9)(O.value,this.level)+(k.valueType!=vt.EF.subtract&&k.valueType!=vt.EF.minus?(0,ae.j9)(k.value,this.level):-(0,ae.j9)(k.value,this.level)),this.additionalSubActions.splice(this.additionalSubActions.indexOf(k),1,O))}}else O.valueType==vt.EF.add&&(O.valueType=vt.EF.fixed,O.value=(0,ae.j9)(O.value,this.level)+1),this.additionalSubActions.length>0&&(this.additionalSubActions[this.additionalSubActions.length-1].type==vt.Us.element||this.additionalSubActions[this.additionalSubActions.length-1].type==vt.Us.specialTarget&&this.additionalSubActions[this.additionalSubActions.length-1].value==vt.q2.enemyOneAll)?this.additionalSubActions.splice(this.additionalSubActions.length-1,0,O):this.additionalSubActions.push(O);else if(O.type!=vt.Us.range||this.additionalSubActions.some(k=>k.type==vt.Us.range)){if(O.type!=vt.Us.range&&!this.subActionExists(this.additionalSubActions,O))if(O.type==vt.Us.area)this.additionalSubActions.splice(0,0,O),this.hasAOE=!0;else if(this.action&&O.type==vt.Us.card&&this.action.subActions.find(k=>k.type==vt.Us.pierce)){const k=this.action.subActions.find(W=>W.type==vt.Us.pierce);k&&(k.value=(0,ae.j9)(k.value,this.level)+(0,ae.j9)(O.value,this.level))}else O.small=!0,O.type==vt.Us.monsterType&&(O.small=!1,O.subActions.forEach(k=>k.small=!0)),this.additionalSubActions.length>0&&this.additionalSubActions[this.additionalSubActions.length-1].type==vt.Us.element?this.additionalSubActions.splice(this.additionalSubActions.length-1,0,O):this.additionalSubActions.push(O)}else this.additionalSubActions.length>0&&this.action.subActions[this.additionalSubActions.length-1].type==vt.Us.element?this.additionalSubActions.splice(this.action.subActions.length-1,0,O):this.additionalSubActions.push(O)});const l=this.additionalSubActions.find(O=>O.type==vt.Us.target&&(O.valueType==vt.EF.add||O.valueType==vt.EF.subtract));if(l){let O=!1;e.forEach(k=>{if(this.action&&k.type==vt.Us.monsterType&&k.subActions.find(W=>W.type==vt.Us.target)){const W=k.subActions.find(ct=>ct.type==vt.Us.target);W&&(O=!0,W.value=(0,ae.j9)(W.value,this.level)+(l.valueType==vt.EF.add?(0,ae.j9)(l.value,this.level):-(0,ae.j9)(l.value,this.level)))}}),O&&this.additionalSubActions.splice(this.additionalSubActions.indexOf(l),1)}if(this.action.type==vt.Us.move&&!this.action.subActions.find(O=>O.type==vt.Us.jump)){let O=new vt.aU(vt.Us.jump,"");O.small=!0,i.actions.find(k=>k.type==vt.Us.jump)?s&&!s.actions.find(k=>k.type==vt.Us.jump)&&this.hasEntities(ee.M.elite)?this.additionalSubActions.push(new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[O])):this.additionalSubActions.push(O):s&&s.actions.find(k=>k.type==vt.Us.jump)&&(this.hasEntities(ee.M.normal)?this.additionalSubActions.push(new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,[O])):this.additionalSubActions.push(O))}let m=this.additionalSubActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k)));for(R.r.settings.fhStyle&&(m=this.elementActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k))));m;)R.r.settings.fhStyle?(this.elementActions.splice(this.elementActions.indexOf(m),1),m=this.elementActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k)))):(this.additionalSubActions.splice(this.additionalSubActions.indexOf(m),1),m=this.additionalSubActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k))));if(this.additionalSubActions.some((O,k,W)=>O.type==vt.Us.monsterType&&kk.type==vt.Us.monsterType);this.additionalSubActions.splice(O,2,new vt.aU(vt.Us.grid,"",vt.EF.fixed,[this.additionalSubActions[O],this.additionalSubActions[O+1]]))}}this.subActions=this.action.subActions.filter(e=>!e.hidden),this.additionalSubActions=this.additionalSubActions.filter(e=>!e.hidden)}}subActionExists(e,i,s=!0){return(!s||i.type!=vt.Us.condition||-1==new re.gP(i.value+"").types.indexOf(re.CP.stack))&&e.some(l=>l.type==i.type&&l.value==i.value&&(l.valueType||vt.EF.fixed)==(i.valueType||vt.EF.fixed))}isGhsSvg(e){return-1!=q1.indexOf(e)}highlightAction(){return!(!this.monster||!this.action||(this.action.type!=vt.Us.heal&&this.action.type!=vt.Us.condition||!this.action.subActions||1!=this.action.subActions.length||!this.action.subActions.find(e=>e.type==vt.Us.specialTarget&&(""+e.value).startsWith("self")))&&this.action.type!=vt.Us.sufferDamage&&this.action.type!=vt.Us.switchType)&&(this.action.type!=vt.Us.heal||!this.monster.entities.every(e=>e.dead||e.health<1||e.health==e.maxHealth))&&this.highlightElements&&(this.monster.active&&this.monster&&null!=this.monster.entities.find(e=>this.action&&d.v.entityManager.isAlive(e,!0)&&!e.tags.find(i=>this.action&&i=="roundAction-"+(this.actionIndex?this.actionIndex+"-":"")+this.action.type))||!1)}applyHighlightAction(e){if(this.monster&&this.highlightAction()&&this.action){d.v.stateManager.before("applyHighlightAction."+this.action.type,"data.monster."+this.monster.name,""+this.action.value);let i=!0;if(this.monster.entities.filter(s=>d.v.entityManager.isAlive(s,!0)).forEach(s=>{if(this.action&&!s.tags.find(l=>l=="roundAction-"+(this.actionIndex?this.actionIndex+"-":"")+this.action?.type))if(s.tags.push("roundAction-"+(this.actionIndex?this.actionIndex+"-":"")+this.action.type),this.monster&&this.action.type==vt.Us.heal){const l=(0,ae.j9)(this.action.value,this.level);s.health+=l,d.v.entityManager.addCondition(s,new re.gP(re.fT.heal,l),this.monster&&this.monster.active||!1,this.monster&&this.monster.off||!1),d.v.entityManager.applyCondition(s,this.monster,re.fT.heal,!0)}else if(this.action.type==vt.Us.condition)if("bless"==this.action.value||"curse"==this.action.value){const l=R.r.settings.allyAttackModifierDeck&&(d.v.fhRules()||R.r.settings.alwaysAllyAttackModifierDeck)&&(this.monster?.isAlly||this.monster?.isAllied)?d.v.game.allyAttackModifierDeck:d.v.game.monsterAttackModifierDeck;d.v.attackModifierManager.addModifier(l,new Lt.YY("bless"==this.action.value?Lt.kl.bless:Lt.kl.curse))}else d.v.entityManager.addCondition(s,new re.gP(""+this.action.value),this.monster?.active||!1,this.monster?.off||!1);else this.action.type==vt.Us.sufferDamage&&(s.health-=(0,ae.j9)(this.action.value,this.level),s.health<=0&&(s.health=0,s.dead=!0),this.monster&&s.dead&&(i=!1,setTimeout(()=>{this.monster&&s.dead&&(d.v.monsterManager.removeMonsterEntity(this.monster,s),this.monster.entities.every(l=>l.dead||l.health<=0||!l.active)&&(this.monster.off=!0,this.monster.active&&d.v.roundManager.toggleFigure(this.monster))),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500)))}),this.action.type==vt.Us.switchType&&this.monster){const s=this.monster.stats.find(m=>this.monster&&m.level==this.monster.level&&m.type==ee.M.normal),l=this.monster.stats.find(m=>this.monster&&m.level==this.monster.level&&m.type==ee.M.elite);s&&l&&this.monster.entities.forEach(m=>{this.monster&&d.v.entityManager.isAlive(m)&&(m.type=m.type==ee.M.elite?ee.M.normal:ee.M.elite,m.maxHealth=(0,ae.j9)(m.type==ee.M.normal?s.health:l.health,this.monster.level),(m.health>m.maxHealth||m.healthl.type==e[s]&&l.state!=Gn.fq.new&&l.state!=Gn.fq.strong&&l.state!=Gn.fq.always))||i&&d.v.game.elementBoard.some(l=>!(l.type!=e[s]&&e[s]!=Gn.W_.wild||l.state!=Gn.fq.strong&&l.state!=Gn.fq.waning&&l.state!=Gn.fq.always)))&&(0==s||this.elementActionPerformed(e[s-1],i,s-1))&&null==this.elementActionPerformed(e[s],i,s)||!1)}wildToConsume(){return d.v.game.elementBoard.filter(e=>e.state!=Gn.fq.inert&&e.state!=Gn.fq.new).map(e=>e.type)}wildToCreate(){return d.v.game.elementBoard.filter(e=>e.state!=Gn.fq.new&&e.state!=Gn.fq.strong&&e.state!=Gn.fq.always).map(e=>e.type)}elementAction(e,i,s,l,m=!1){if(this.monster&&this.highlightElement(this.getValues(i),i.valueType==vt.EF.minus,l)){const O=this.monster&&this.monster.entities.find(k=>d.v.entityManager.isAlive(k)&&!k.tags.some(W=>W=="roundAction-element-"+(i.valueType==vt.EF.minus?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+l+s));d.v.game.elementBoard.forEach(i.valueType==vt.EF.minus?k=>{k.type==s&&this.monster&&(d.v.stateManager.before("monsterConsumeElement","data.monster."+this.monster.name,"game.element."+s),k.state!=Gn.fq.always&&(k.state=Gn.fq.consumed),O&&O.tags.push("roundAction-element-consume-"+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+(m?"wild":s)),d.v.stateManager.after())}:k=>{k.type==s&&this.monster&&(d.v.stateManager.before("monsterInfuseElement","data.monster."+this.monster.name,"game.element."+s),k.state!=Gn.fq.always&&(k.state=Gn.fq.new),O&&O.tags.push("roundAction-element-"+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+(m?"wild":s)),d.v.stateManager.after())}),e.preventDefault()}}elementActionPerformed(e,i,s){return this.monster&&this.monster.entities.find(l=>d.v.entityManager.isAlive(l)&&l.tags.some(m=>m=="roundAction-element-"+(i?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+s+"-"+e))}elementActionsPerformed(e,i){return this.monster&&e.every((s,l)=>this.monster&&this.monster.entities.find(m=>d.v.entityManager.isAlive(m)&&m.tags.some(O=>O=="roundAction-element-"+(i?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+s)))||!1}elementActionsPerformedSome(e,i){return this.monster&&e.some((s,l)=>this.monster&&this.monster.entities.find(m=>d.v.entityManager.isAlive(m)&&m.tags.some(O=>O=="roundAction-element-"+(i?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+s)))||!0}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-action"]],inputs:{monster:"monster",monsterType:"monsterType",objective:"objective",origAction:["action","origAction"],relative:"relative",inline:"inline",right:"right",highlight:"highlight",highlightElements:"highlightElements",statsCalculation:"statsCalculation",hexSize:"hexSize",actionIndex:["index","actionIndex"],style:"style"},decls:1,vars:1,consts:[["class","action",3,"ngSwitch","ngClass",4,"ngIf"],[1,"action",3,"ngSwitch","ngClass"],["class","action-area",3,"ngClass",4,"ngSwitchCase"],["class","action-condition",3,"ngClass",4,"ngSwitchCase"],["class","action-element",3,"ngClass",4,"ngSwitchCase"],[4,"ngSwitchCase"],["class","action-specialTarget",4,"ngSwitchCase"],["class","action-custom",4,"ngSwitchCase"],["class","action-custom",3,"ngClass",4,"ngSwitchCase"],["class","action-grant",4,"ngSwitchCase"],["class","action-summon",3,"ngClass",4,"ngSwitchCase"],["class","action-trigger",4,"ngSwitchCase"],["class","action-default",4,"ngSwitchCase"],["class","action-box-container",3,"ngClass",4,"ngSwitchCase"],["class","action-box-fh-subactions-container",3,"ngClass",4,"ngSwitchCase"],["class","action-box-container-forced",3,"ngClass",4,"ngSwitchCase"],["class","action-default action-special",3,"ngClass",4,"ngSwitchCase"],["class","action-default","ghs-pointer-input","",3,"ngClass","clickBehind","singleClick",4,"ngSwitchDefault"],["class","aoe-value",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"action-area",3,"ngClass"],[3,"action","value","size"],[1,"action-condition",3,"ngClass"],["ghs-pointer-input","",1,"condition",3,"ngClass","clickBehind","singleClick"],[1,"condition-value"],[3,"ghs-label","ghs-label-args"],[1,"condition-image"],["class","icon",3,"src",4,"ngIf"],["class","icon warning","src","./assets/images/warning.svg",4,"ngIf"],["class","value",4,"ngIf"],["class","subactions",4,"ngIf"],[1,"icon",3,"src"],["src","./assets/images/warning.svg",1,"icon","warning"],[1,"value"],[1,"subactions"],[4,"ngFor","ngForOf"],[3,"ngClass","action","monster","inline","right","hexSize","statsCalculation","highlightElements","index","monsterType"],[1,"action-element",3,"ngClass"],["class","elements",4,"ngIf"],["class","element-subactions",4,"ngIf"],[1,"elements"],["class","element","ghs-pointer-input","",3,"clickBehind","ngClass","singleClick",4,"ngFor","ngForOf"],["class","minus",4,"ngIf"],["ghs-pointer-input","",1,"element",3,"clickBehind","ngClass","singleClick"],[3,"src"],["class","choose-element-container",4,"ngIf"],[1,"choose-element-container"],["class","choose-element","ghs-pointer-input","",3,"clickBehind","singleClick",4,"ngFor","ngForOf"],["ghs-pointer-input","",1,"choose-element",3,"clickBehind","singleClick"],[1,"minus"],["ghs-pointer-input","",1,"element","element-half",3,"ngClass","clickBehind","singleClick"],[1,"element-subactions"],[1,"element-subaction",3,"ngClass","action","monster","relative","inline","right","hexSize","highlightElements","statsCalculation","index","monsterType"],["class","action-monster-type",3,"ngClass",4,"ngIf"],[1,"action-monster-type",3,"ngClass"],[1,"monster-type","small",3,"ngClass"],[3,"ghs-label"],["class","monster-type-subactions",4,"ngIf"],[1,"monster-type-subactions"],[3,"ngClass","action","monster","relative","inline","right","hexSize","highlightElements","statsCalculation","index","monsterType"],[1,"action-specialTarget"],[1,"special-target-value",3,"ghs-label","ghs-label-args","relative","ngClass"],[3,"ngClass",4,"ngIf"],["class","special-target-subactions",4,"ngIf"],[3,"ngClass"],["class","elite",4,"ngIf"],[1,"elite"],[1,"special-target-subactions"],[3,"ngClass","action","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","index","monsterType"],[1,"action-custom"],[1,"custom-value",3,"ghs-label","relative","ngClass"],["class","custom-subactions",4,"ngIf"],[1,"custom-subactions"],[3,"ngClass","action","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","index","monsterType","style",4,"ngFor","ngForOf"],[1,"action-custom",3,"ngClass"],["ghs-pointer-input","",1,"custom-value",3,"clickBehind","ghs-label","relative","ngClass","ghs-label-args","singleClick"],["ghs-pointer-input","",1,"custom-value",3,"clickBehind","ghs-label","relative","ngClass","singleClick"],[1,"action-grant"],[1,"grant-value",3,"ghs-label","relative","ngClass"],["class","grant-subactions",4,"ngIf"],[1,"grant-subactions"],[1,"action-summon",3,"ngClass"],[3,"action","right","monster","objective","highlight","index","monsterType"],[3,"action","right","monster","objective","spawn","highlight","index","monsterType"],[1,"action-trigger"],[1,"action-default"],[1,"action-concatenation",3,"ngClass"],["class","action-concatenation-item",4,"ngIf"],[1,"action-concatenation-item"],[3,"ghs-label","relative","style",4,"ngIf"],[3,"ghs-label","relative"],["class","action-grid",3,"--ghs-grid-columns","ngClass",4,"ngIf"],[1,"action-grid",3,"ngClass"],[1,"action-box-container",3,"ngClass"],["class","action-box-label",3,"ghs-label","relative","style",4,"ngIf"],[1,"action-box"],[1,"action-box-label",3,"ghs-label","relative"],[1,"action-box-fh-subactions-container",3,"ngClass"],[1,"action-box-container-forced",3,"ngClass"],["class","action-box-label",4,"ngIf"],[1,"action-box-label"],[1,"action-card",3,"ngClass"],[1,"card-value",3,"ngClass"],[1,"ghs-svg",3,"src"],["class","overlay",3,"src",4,"ngIf"],["class","overlay",3,"mask-image","-webkit-mask-image",4,"ngIf"],[1,"overlay",3,"src"],[1,"overlay"],[1,"action-default","action-special",3,"ngClass"],[1,"special-type"],[1,"special-subactions",3,"actions","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","index"],["ghs-pointer-input","",1,"action-default",3,"ngClass","clickBehind","singleClick"],[1,"main-action",3,"ngClass"],[1,"type"],[1,"action-icon"],["class","icon",3,"src","ngClass",4,"ngIf"],[1,"icon",3,"src","ngClass"],[3,"value-calc","level"],[3,"ngClass","value-calc","level"],[3,"ngClass","ghs-label","relative"],["class","type",4,"ngIf"],["class","elite",3,"value-calc","level",4,"ngIf"],[1,"elite",3,"value-calc","level"],[1,"elite",3,"ghs-label","relative"],[1,"aoe-value",3,"ngClass"],[3,"ngClass","action","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","monsterType"],[1,"element-actions"]],template:function(e,i){1&e&&t.YNc(0,Wk,23,32,"span",0),2&e&&t.Q6J("ngIf",i.action)},styles:['.action[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;position:relative;width:100%;color:var(--ghs-color-white);line-height:.8em}.action.aoe[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:.2em;align-items:center}@keyframes _ngcontent-%COMP%_highlight-animation{0%{background-position:0% center;-webkit-mask-position:0% center;mask-position:0% center}65%{background-position:0% center;-webkit-mask-position:0% center;mask-position:0% center}to{background-position:200% center;-webkit-mask-position:200% center;mask-position:200% center}}@keyframes _ngcontent-%COMP%_highlight-image{0%{opacity:1}50%{opacity:1}to{opacity:.5}}.action.highlight[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-image:linear-gradient(-225deg,var(--ghs-color-white) 0%,var(--ghs-color-white) 50%,var(--ghs-color-darkgray) 75%,var(--ghs-color-white) 100%);background-position:0% center;background-clip:border-box;background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_highlight-animation 3s linear infinite;animation-delay:-1.5s}.action.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_highlight-image 3s ease-in-out infinite;animation-delay:-1.5s}.action.highlight.right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-image:linear-gradient(-225deg,var(--ghs-color-black) 0%,var(--ghs-color-black) 50%,var(--ghs-color-white) 75%,var(--ghs-color-black) 100%)}.action[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .placeholder-action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin:0 .1em .1em;height:1em;width:auto}.action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:not(.ghs-svg){filter:var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .summon-value[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .type.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .condition-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .custom-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .special-target-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .summon-value.small[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%]{font-size:82%;line-height:82%}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .summon-value[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .placeholder-action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:not(.ghs-svg){filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%]{filter:drop-shadow(.01em .01em .01em var(--ghs-color-black))}.action[_ngcontent-%COMP%] .action-monster-type[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{white-space:nowrap}.action[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%]{width:100%}.action[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{width:100%}.action[_ngcontent-%COMP%] .action-area[_ngcontent-%COMP%]{margin-top:.3em}.action[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{padding:0 .2em}.action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]{position:relative;font-size:82%;line-height:82%;padding:0 .5em}.action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]:before, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]:after, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]:before, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]:after{content:" ";position:absolute;width:2em;height:.09em;left:-1.6em;top:50%;transform:translateY(-50%);background:linear-gradient(90deg,transparent 0%,var(--ghs-color-white) 100%)}.action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]:after, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]:after{left:auto;right:-1.6em;background:linear-gradient(90deg,var(--ghs-color-white) 0%,transparent 100%)}.action[_ngcontent-%COMP%] .action-special[_ngcontent-%COMP%] > .type[_ngcontent-%COMP%]{margin-bottom:.1em}.action[_ngcontent-%COMP%] .special-type[_ngcontent-%COMP%]{color:var(--ghs-color-red);filter:var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{position:relative;width:1em;height:1em;margin:0 .1em .1em}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:100%;height:auto;margin:0;filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img.icon.warning[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:.45em;line-height:1em;color:var(--ghs-color-white);position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:flex-end;width:100%;height:100%}.action[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%]{display:block}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;margin:.15em 0}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%]{position:relative;height:1.2em}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;height:100%;width:auto;z-index:1}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:var(--ghs-font-title);font-size:.8em;filter:invert(1);z-index:3}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%]{height:2em}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background-color:var(--ghs-ability-color);-webkit-mask-position:top left;mask-position:top left;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{left:42%}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%]{margin-left:-.1em}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{margin-left:.1em}.action[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%]{text-transform:uppercase}.action[_ngcontent-%COMP%] .elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:.3em;align-items:flex-start;margin-top:.5%}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{display:flex;flex-wrap:unset;justify-content:center;align-items:center}@keyframes _ngcontent-%COMP%_element-pulse{0%{transform:scale(.8)}50%{transform:scale(1)}to{transform:scale(.8)}}@keyframes _ngcontent-%COMP%_element-half-pulse{0%{transform:scale(.8)}50%{transform:scale(1)}to{transform:scale(.8)}}@keyframes _ngcontent-%COMP%_element-half-pulse-right{0%{transform:scale(.8)}50%{transform:scale(1)}to{transform:scale(.8)}}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{position:relative;width:1.2em;height:1.2em}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%]{display:none;position:absolute;width:400%;height:400%;top:50%;left:50%;transform:translate(-50%,-50%)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-color-darkgray);opacity:.5;z-index:0;border-radius:100%}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]{display:block;position:absolute;top:50%;left:50%;width:25%;height:25%;margin:-12.5%;z-index:1}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:hover{filter:brightness(.8) grayscale(.4)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(1){transform:rotate(-30deg) translate(125%) rotate(30deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(2){transform:rotate(-210deg) translate(125%) rotate(210deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-330deg) translate(125%) rotate(330deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(4){transform:rotate(-150deg) translate(125%) rotate(150deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(5){transform:rotate(-90deg) translate(125%) rotate(90deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(6){transform:rotate(-270deg) translate(125%) rotate(270deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element.highlight[_ngcontent-%COMP%]{cursor:pointer!important;animation:_ngcontent-%COMP%_element-pulse 1.2s ease-in-out infinite}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element.highlight[_ngcontent-%COMP%]:hover{animation:none;transform:scale(1)!important;z-index:5}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element.highlight[_ngcontent-%COMP%]:hover .choose-element-container[_ngcontent-%COMP%]{display:block}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]{position:relative;width:.6em;overflow:hidden}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:200%}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(1){left:0;margin-right:-.01em}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(1).highlight{animation:_ngcontent-%COMP%_element-half-pulse 1.2s ease-in-out infinite;transform-origin:center right}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(1).highlight:hover{transform:scale(1)!important}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2){right:0;margin-left:-.01em}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2) img[_ngcontent-%COMP%]{transform:translate(-50%)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2):before{background-position:right}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2).highlight{animation:_ngcontent-%COMP%_element-half-pulse-right 1.2s ease-in-out infinite;transform-origin:center left}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2).highlight:hover{transform:scale(1)!important}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .minus[_ngcontent-%COMP%]{font-size:1.5em}@keyframes _ngcontent-%COMP%_highlight-text-pulse{0%{transform:scale(.9)}50%{transform:scale(1)}to{transform:scale(.9)}}.action[_ngcontent-%COMP%] .highlight-text[_ngcontent-%COMP%]{cursor:pointer;animation:_ngcontent-%COMP%_highlight-text-pulse 1.2s ease-in-out infinite}.action[_ngcontent-%COMP%] .highlight-text[_ngcontent-%COMP%]:hover{transform:scale(1);opacity:.8;animation:none}.action[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%]:not(:nth-of-type(1)){margin-top:.1%}.action[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%]:nth-of-type(1){flex-basis:0}.action[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%]:nth-of-type(1) .action-area[_ngcontent-%COMP%] ghs-action-hex[_ngcontent-%COMP%]{position:relative}.action[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{margin-top:0}.action[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%;justify-content:center;flex:1 0 auto}.action[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{margin-top:0;margin-left:5%}.action[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%]{width:100%}.action[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%]{text-transform:uppercase}.action[_ngcontent-%COMP%] .monster-type.monster-type-elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.action[_ngcontent-%COMP%] .monster-type.monster-type-boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.action[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{flex-basis:auto;flex-shrink:0}.action[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%] .action-concatenation-item[_ngcontent-%COMP%]{margin:0 .15em}.action[_ngcontent-%COMP%] .action-grid[_ngcontent-%COMP%]{--ghs-grid-columns: 2;display:grid;grid-template-columns:repeat(var(--ghs-grid-columns),auto);column-gap:.5em;margin:0 .5em;align-items:center}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%]{width:100%;position:relative;display:flex;flex-direction:column;margin-bottom:.5em}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%]{color:var(--ghs-ability-color);text-align:left;padding:.3em 1em}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.2em .3em}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-black);opacity:.5;z-index:0}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%]{width:100%;position:relative;display:flex;flex-direction:column;margin-bottom:.5em}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%]{color:var(--ghs-ability-color);text-align:left;padding:.3em 1em}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.2em .3em;border:.04em dashed var(--ghs-color-white);border-radius:2em/100%}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:-.04em;left:-.02em;height:100%;width:100%;background-color:var(--ghs-color-white);opacity:.2;border:.04em solid var(--ghs-color-white);border-radius:2em/100%;z-index:-1}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%]{width:100%;position:relative;display:flex;margin-bottom:.5em}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%]{position:relative;top:.1em;display:flex;flex-grow:1;justify-content:center;align-items:center;padding:.3em;border-right:.1em solid var(--ghs-color-white)}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1.5em}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]{position:relative;display:flex;flex-grow:1;justify-content:flex-start;align-items:center;padding:.2em}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-black);opacity:.5;z-index:0;border:.1em solid var(--ghs-color-white);border-radius:.5em}.action[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] ghs-action.subaction-monsterType[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.action.inline[_ngcontent-%COMP%]{justify-content:flex-start;margin-top:0;margin-bottom:0}.action.inline[_ngcontent-%COMP%]:not(:nth-child(1)){margin-top:.1em}.action.inline[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.action.inline[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .summon-value[_ngcontent-%COMP%]{filter:none!important}.action.inline[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%]{align-self:flex-start;justify-content:flex-start}.action.inline[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{text-align:left;padding:0!important}.action.inline[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%]{justify-content:flex-start}.action.inline[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{flex-basis:unset}.action.inline[_ngcontent-%COMP%] .element-subactions.subaction-area[_ngcontent-%COMP%] ~ ghs-action[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%] ~ ghs-action[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:1;margin-left:.1%}.action.inline[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{flex-wrap:unset}.action.inline[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%]{align-items:flex-start;flex-wrap:wrap}.action.inline[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:.7em;width:auto}.action.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%]{align-items:flex-start}.action.right[_ngcontent-%COMP%]{color:var(--ghs-color-black);filter:none;justify-content:flex-end;text-align:right}.action.right[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{justify-content:flex-end;text-align:right}.action.right[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%]{justify-content:flex-end;text-align:right;width:100%}.action.right.inline[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.right.inline[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.right.inline[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{text-align:right;width:100%}.action.right.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]{align-items:flex-end;align-self:flex-end}.action.right.inline[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:none}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] .subaction-area[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%] .subaction-area[_ngcontent-%COMP%]{margin-top:.3em}.action.fh[_ngcontent-%COMP%]{max-width:100%}.action.fh[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap}.action.fh[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%]{font-family:var(--ghs-font-text)}.action.fh[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%]{font-size:125%;line-height:125%}.action.fh[_ngcontent-%COMP%] .main-action.small[_ngcontent-%COMP%]{font-size:90%;line-height:90%}.action.fh[_ngcontent-%COMP%] .main-action.small[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:.8em}.action.fh[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%]{display:none}.action.fh[_ngcontent-%COMP%] .action-monster-type[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.action.fh[_ngcontent-%COMP%] .action-monster-type.action-monster-type[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .element-subactions.action-monster-type[_ngcontent-%COMP%]{flex-wrap:wrap}.action.fh[_ngcontent-%COMP%] .action-grid[_ngcontent-%COMP%]{column-gap:.1em;margin:0}.action.fh[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%]{text-transform:initial}.action.fh[_ngcontent-%COMP%]:not(.inline) .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{width:1.4em;height:1.4em;display:flex;justify-content:center;align-items:center}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{width:1.2em;height:1em;display:flex;justify-content:center;align-items:center}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:1.5em;height:1.5em;margin:0}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-push[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pull[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pierce[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]{width:1.7em;height:1em;justify-content:flex-start}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-push[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pull[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pierce[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:1.5em;height:1.5em;margin:0}.action.fh[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;max-width:95%;padding:.1em;margin-left:.2em;width:auto}.action.fh[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%]:before{content:" ";position:absolute;z-index:0;top:50%;width:100%;height:100%;transform:translateY(-50%);background-color:var(--ghs-color-white);opacity:.2;border-radius:1em/100%}.action.fh[_ngcontent-%COMP%] .subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .condition-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .monster-type-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions.monster-type-subactions[_ngcontent-%COMP%]:before{display:none}.action.fh[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{margin:0 .1em}.action.fh[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%] .action-concatenation-item[_ngcontent-%COMP%]{margin:0}.action.fh[_ngcontent-%COMP%] .special-type[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:0}.action.fh[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .minus[_ngcontent-%COMP%]{margin-left:.15em}.action.fh[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]:not(:first-child){margin-left:.3em}.action.fh[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .subaction-element[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{padding:0}.action.fh[_ngcontent-%COMP%] .element-actions[_ngcontent-%COMP%]{flex-basis:100%}.action.fh[_ngcontent-%COMP%] .element-actions[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{margin-top:.5em}.action.fh[_ngcontent-%COMP%] .element-actions[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:-.4em;left:50%;transform:translate(-50%);width:2em;height:.4em;color:radial-gradient(var(--ghs-color-white) 0%,transparent 100%);background:radial-gradient(var(--ghs-color-white) 0%,transparent 100%);background-clip:padding-box;clip-path:polygon(48% 100%,52% 100%,52% 15%,100% 15%,100% 0%,0% 0%,0% 15%,48.5% 15%);z-index:-1}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;padding:.2em}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%]{margin-left:-.2em}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]{padding:0}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%]{margin-left:.1em}.action.fh[_ngcontent-%COMP%] .action-element-consume[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;z-index:1;border:.04em dashed var(--ghs-color-white);border-radius:2em/100%}.action.fh[_ngcontent-%COMP%] .action-element-consume[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:-.04em;left:-.02em;height:100%;width:100%;background-color:var(--ghs-color-white);opacity:.2;border:.04em solid var(--ghs-color-white);border-radius:2em/100%;z-index:-1}.action.fh.inline[_ngcontent-%COMP%]{width:100%}.action.fh.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]:before{background-color:var(--ghs-color-darkgray);opacity:.3}.action.fh.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]{justify-content:center;align-self:center}']})),a})();function dx(o,a){1&o&&t._UZ(0,"div",5)}const hx=function(o){return{spacing:o}};function ux(o,a){if(1&o&&(t.ynx(0),t.YNc(1,dx,1,0,"div",3),t._UZ(2,"ghs-action",4),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Q6J("ngIf",i.divider[e]),t.xp6(1),t.Akn(i.style),t.Q6J("action",n)("monster",i.monster)("objective",i.objective)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("relative",i.relative)("statsCalculation",i.statsCalculation)("highlight",-1!=i.highlightActions.indexOf(n.type))("highlightElements",i.highlightElements)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("ngClass",t.VKq(15,hx,!i.noDivider&&!i.inline&&e>0&&!i.divider[e]))}}function H1(o,a){if(1&o&&t._UZ(0,"div",6),2&o){const n=t.oxw();t.Q6J("ghs-label",n.hint)}}const j1=function(o,a,n){return{inline:o,right:a,fh:n}};let ag=(()=>{var o;class a{constructor(){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"actions",void 0),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"inline",!1),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"statsCalculation",!1),(0,_.Z)(this,"highlightElements",!1),(0,_.Z)(this,"highlightActions",[]),(0,_.Z)(this,"hexSize",void 0),(0,_.Z)(this,"hint",void 0),(0,_.Z)(this,"actionIndex",""),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"noDivider",!1),(0,_.Z)(this,"divider",[]),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"additionalActions",[]),(0,_.Z)(this,"additionActionTypes",[vt.Us.shield,vt.Us.retaliate,vt.Us.heal,vt.Us.element,vt.Us.elementHalf]),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){if(this.additionalActions=[],this.monster&&R.r.settings.calculateStats){const e=d.v.monsterManager.getStat(this.monster,this.monster.boss?ee.M.boss:ee.M.normal);let i=this.monster.boss?void 0:d.v.monsterManager.getStat(this.monster,ee.M.elite);e.actions&&e.actions.filter(s=>-1!=this.additionActionTypes.indexOf(s.type)).forEach(s=>{!i||i.actions&&i.actions.some(l=>JSON.stringify(s)==JSON.stringify(l))?this.additionalActions.push(JSON.parse(JSON.stringify(s))):i&&(!i.actions||!i.actions.some(l=>JSON.stringify(s)==JSON.stringify(l)))&&this.additionalActions.push(new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[JSON.parse(JSON.stringify(s))]))}),i&&i.actions.filter(s=>-1!=this.additionActionTypes.indexOf(s.type)).forEach(s=>{(!e.actions||!e.actions.some(l=>JSON.stringify(s)==JSON.stringify(l)))&&this.additionalActions.push(new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,[JSON.parse(JSON.stringify(s))]))})}this.noDivider||this.actions.forEach((e,i)=>{this.divider[i]=this.calcDivider(e,i)})}calcDivider(e,i){return!(i<1||this.inline||(e.type==vt.Us.element||e.type==vt.Us.elementHalf)&&e.valueType!=vt.EF.minus||e.type==vt.Us.card||this.actions[i-1].type==vt.Us.box||R.r.settings.calculate&&this.actions[i-1].type==vt.Us.monsterType&&this.monster&&!this.monster.entities.find(s=>d.v.entityManager.isAlive(s)&&s.type==this.actions[i-1].value)||e.type==vt.Us.concatenation&&e.subActions.every(s=>s.type==vt.Us.card||s.type==vt.Us.element||s.type==vt.Us.elementHalf))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-actions"]],inputs:{monster:"monster",objective:"objective",actions:"actions",relative:"relative",inline:"inline",right:"right",statsCalculation:"statsCalculation",highlightElements:"highlightElements",highlightActions:"highlightActions",hexSize:"hexSize",hint:"hint",actionIndex:["index","actionIndex"],style:"style",noDivider:"noDivider"},decls:3,vars:7,consts:[[1,"actions",3,"ngClass"],[4,"ngFor","ngForOf"],["class","hint",3,"ghs-label",4,"ngIf"],["class","divider",4,"ngIf"],[3,"action","monster","objective","inline","right","hexSize","relative","statsCalculation","highlight","highlightElements","index","ngClass"],[1,"divider"],[1,"hint",3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,ux,3,17,"ng-container",1),t.YNc(2,H1,1,1,"div",2),t.qZA()),2&e&&(t.Q6J("ngClass",t.kEZ(3,j1,i.inline,i.right,i.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("ngForOf",i.actions),t.xp6(1),t.Q6J("ngIf",i.hint))},dependencies:[x.mk,x.sg,x.O5,Gr,ie],styles:[".actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;height:100%}.actions.inline[_ngcontent-%COMP%]{align-items:flex-start}.actions.right[_ngcontent-%COMP%]{align-items:flex-end;text-align:right}.actions.right[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{margin-left:auto}.actions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{position:relative;width:100%}.actions[_ngcontent-%COMP%] ghs-action.spacing[_ngcontent-%COMP%]{margin-top:.7em}.actions[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:2em;border-top:.11em var(--ghs-color-white) dotted;margin:.1em}.actions[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{position:relative;width:60%;background:rgb(124,210,224);background:linear-gradient(90deg,rgb(124,210,224) 0%,rgb(193,236,245) 100%);color:var(--ghs-color-black);font-size:70%;font-weight:700;margin:calc(var(--ghs-unit) * .5);margin-top:calc(var(--ghs-unit) * 1);padding:calc(var(--ghs-unit) * .5)}.actions[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:auto}.actions[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:auto}.actions.fh[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:3em;height:.06em;min-height:.06em;border-top:none;background:linear-gradient(90deg,transparent 0%,var(--ghs-color-white) 50%,transparent 100%);margin:.2em}"]})),a})();function B1(o,a){if(1&o&&(t.TgZ(0,"span",5),t._UZ(1,"img",3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/condition/"+n.value+".svg",t.LSH)("alt",e.action.small)}}function z1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",2),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.click(s))}),t._UZ(1,"img",3),t.YNc(2,B1,2,2,"span",4),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Udp("grid-column-start",2*n.x+1+n.y%2)("grid-column-end",2*n.x+3+n.y%2)("grid-row-start",n.y+1)("grid-row-end",n.y+1),t.Q6J("title",e.ActionHex.toString(n)),t.xp6(1),t.Q6J("src","./assets/images/action/hex/"+n.type+".svg",t.LSH)("alt",e.action.small),t.xp6(1),t.Q6J("ngIf",e.hasCondition(n))}}const _x=function(o){return{small:o}};let Sf=(()=>{var o;class a{constructor(){(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"size",void 0),(0,_.Z)(this,"clickCallback",new t.vpe),(0,_.Z)(this,"doubleclickCallback",new t.vpe),(0,_.Z)(this,"hexes",[]),(0,_.Z)(this,"ActionHex",Fi),(0,_.Z)(this,"doubleClick",null)}ngOnChanges(e){this.hexes=[],this.value||(this.value=""+this.action.value),this.value.split("|").forEach(i=>{const s=Fi.fromString(i);null!=s&&this.hexes.push(s)})}click(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,this.doubleclickCallback.emit(e)):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.clickCallback.emit(e),this.doubleClick=null)},200)}hasCondition(e){return e.value&&Object.keys(re.fT).includes(e.value)||!1}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-action-hex"]],inputs:{action:"action",value:"value",size:"size"},outputs:{clickCallback:"clickCallback",doubleclickCallback:"doubleclickCallback"},features:[t.TTD],decls:2,vars:6,consts:[[1,"hex-grid",3,"ngClass"],["class","hex",3,"grid-column-start","grid-column-end","grid-row-start","grid-row-end","title","click",4,"ngFor","ngForOf"],[1,"hex",3,"title","click"],[3,"src","alt"],["class","condition",4,"ngIf"],[1,"condition"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,z1,3,12,"div",1),t.qZA()),2&e&&(t.Udp("--ghs-hex-size",i.size),t.Q6J("ngClass",t.VKq(4,_x,i.action.small)),t.xp6(1),t.Q6J("ngForOf",i.hexes))},dependencies:[x.mk,x.sg,x.O5],styles:[".hex-grid[_ngcontent-%COMP%]{--ghs-hex-size: 1;display:grid;justify-items:center;align-items:center;grid-template-columns:calc(.6em * var(--ghs-hex-size));filter:var(--ghs-filter-shadow)}.hex-grid.small[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(.6em * var(--ghs-hex-size) * 2);height:calc(.6em * var(--ghs-hex-size) * 1.7)}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:absolute;top:calc(.6em * var(--ghs-hex-size) * -.2);left:calc(.6em * var(--ghs-hex-size) * -.1);width:calc(.6em * var(--ghs-hex-size) * 1.3)}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}"]})),a})();var he=E(8927),Ze=E(7177),In=E(4968),qe=E(9120),Ee=E(8272),ge=E(6565);function px(o,a){if(1&o&&(t.TgZ(0,"div",12)(1,"div",13),t._UZ(2,"div",14),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Udp("background-image",n.monster.noThumbnail||n.settingsManager.settings.disableArtwork?"":"url("+n.gameManager.monsterManager.monsterThumbnail(n.monster)+")")}}function fx(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw();t.Q6J("ghs-label",(n.monster.isAlly?"game.ally.addEntity.":"monster.addEntity.")+n.type)}}const G1=function(o,a){return[o,a]};function V1(o,a){if(1&o&&t._UZ(0,"span",15),2&o){const n=t.oxw();t.Q6J("ghs-label","monster.changeStandee")("ghs-label-args",t.WLB(2,G1,n.entity.type,""+n.entity.number))}}function Xk(o,a){if(1&o&&t._UZ(0,"span",15),2&o){const n=t.oxw();t.Q6J("ghs-label","monster.setStandees")("ghs-label-args",t.WLB(2,G1,n.type,""+n.entitiesLeft()))}}const t6=function(o,a,n,e){return{disabled:o,existing:a,elite:n,boss:e}};function e6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.pickNumber(s))}),t.TgZ(1,"span",17),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.l5B(2,t6,e.hasNumber(n)&&(!e.change||!e.entity),e.hasNumber(n),e.type==e.MonsterType.elite,e.type==e.MonsterType.boss)),t.xp6(2),t.Oqu(n)}}const n6=function(o){return{active:o}};function i6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.summon=!i.summon)}),t._UZ(1,"img",19),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,n6,n.summon)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.monster.summonColor,".png",t.LSH)}}function o6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",20)(1,"a",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleMonsterType())}),t._UZ(2,"span",15),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","monster.changeType")("ghs-label-args",t.WLB(2,G1,n.entity.type==n.MonsterType.normal?n.entity.type:n.MonsterType.elite,n.entity.type==n.MonsterType.normal?n.MonsterType.elite:n.MonsterType.normal))}}function a6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",22)(1,"a",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(2,"span",3),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","monster.cancelNumberpicker"))}const s6=function(o,a){return{elite:o,boss:a}},r6=function(o,a){return{extended:o,small:a}};let Gd=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"max",void 0),(0,_.Z)(this,"range",void 0),(0,_.Z)(this,"summon",!1),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"entities",void 0),(0,_.Z)(this,"automatic",!1),(0,_.Z)(this,"change",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"timeout",void 0),(0,_.Z)(this,"gameManager",d.v),this.dialogRef=i,this.monster=e.monster,this.type=e.type,this.max=d.v.monsterManager.monsterStandeeMax(this.monster),this.range=e.range,this.entity=e.entity,this.entities=e.entities,this.automatic=e.automatic||!1,this.change=e.change||!1,this.entity||(this.entity=this.entities&&this.entities.find(s=>s.number<0)||void 0),this.entity&&(this.type=this.entity.type)}onKeyPress(e){if(e.key in["0","1","2","3","4","5","6","7","8","9"]){if(this.timeout){clearTimeout(this.timeout),this.timeout=void 0;const i=+e.key+10,s=+e.key;i<=this.max?this.pickNumber(i):(this.pickNumber(1),this.pickNumber(s))}else"1"===e.key&&this.range.filter(i=>i>=10).some(i=>!this.hasNumber(i))?this.timeout=setTimeout(()=>{this.pickNumber(1)},1e3):this.pickNumber(+e.key);e.preventDefault(),e.stopPropagation()}}ngOnInit(){this.range=Array.from(Array(this.max).keys()).map(e=>e+1)}hasEntity(){return this.monster.entities.filter(e=>d.v.entityManager.isAlive(e)&&(!R.r.settings.hideStats||e.type==this.type)).length>0}hasNumber(e){return null!=d.v.monsterManager.monsterStandeeUsed(this.monster,e)}entitiesLeft(){return this.entities&&this.entities.filter(e=>e.type==this.type&&e.number<1).length||0}randomStandee(){const e=(0,ae.j9)(this.monster.standeeCount||this.monster.count,this.monster.level);let i=Math.floor(Math.random()*e)+1;for(;this.monster.entities.some(s=>s.number==i);)i=Math.floor(Math.random()*e)+1;this.pickNumber(i,!0,!1)}nextStandee(){let e=1;for(;this.monster.entities.some(i=>i.number==e);)e+=1;this.pickNumber(e,!0,!0)}pickNumber(e,i=!1,s=!1){if(!(e<1||e>this.max)){if(this.hasNumber(e)||!this.type||this.change){if(this.change&&this.entity&&this.entity.number!=e){d.v.stateManager.before("updateStandee","data.monster."+this.monster.name,"monster."+this.entity.type,""+e);let l=d.v.monsterManager.monsterStandeeUsed(this.monster,e);if(l){let m=-1;for(;d.v.monsterManager.monsterStandeeUsed(this.monster,m);)m-=1;l.number=m}this.entity.number=e,d.v.stateManager.after()}}else{let l="addStandee";i&&!s?l="addRandomStandee":i&&(l="addNextStandee"),d.v.stateManager.before(l,"data.monster."+this.monster.name,"monster."+this.type,""+e);const m=this.monster.entities.find(O=>O.number==e);if(m&&d.v.monsterManager.removeMonsterEntity(this.monster,m),this.entity)this.entity.number=e,this.entity.revealed&&(this.entity.revealed=!1),this.entity=this.entities&&(this.entities.find(O=>O.number<0&&O.type==this.type)||this.entities.find(O=>O.number<0))||void 0,this.entity&&(this.type=this.entity.type);else{const O=d.v.monsterManager.addMonsterEntity(this.monster,e,this.type,this.summon);d.v.game.state==ge.D2.next&&O&&(this.monster.active=!d.v.game.figures.some(k=>k.active),this.monster.active&&(d.v.sortFigures(this.monster),O.active=!0))}d.v.stateManager.after(),(this.entities?this.monster.entities.filter(O=>O.number>0).length:d.v.entityManager.entities(this.monster).length)==(0,ae.j9)(this.monster.count,this.monster.level)||!this.entity&&this.entities?this.dialogRef.close():this.entity&&this.entities&&this.monster.entities.filter(O=>O.number>0).length==(0,ae.j9)(this.monster.count,this.monster.level)-1&&this.nextStandee()}this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}}toggleMonsterType(){if(this.entity&&(this.entity.type==ee.M.normal||this.entity.type==ee.M.elite)){const e=this.monster.stats.find(s=>s.level==this.monster.level&&s.type==ee.M.normal),i=this.monster.stats.find(s=>s.level==this.monster.level&&s.type==ee.M.elite);e&&i?(d.v.stateManager.before("changeMonsterType","data.monster."+this.monster.name,"monster."+this.entity.type,""+this.entity.number,this.entity.type==ee.M.normal?ee.M.elite:ee.M.normal),this.entity.type=this.entity.type==ee.M.normal?ee.M.elite:ee.M.normal,this.entity.maxHealth=(0,ae.j9)(this.entity.type==ee.M.normal?e.health:i.health,this.monster.level),(this.entity.health>this.entity.maxHealth||this.entity.health0),t.xp6(1),t.Q6J("ngClass",t.WLB(14,r6,4==i.max,(i.automatic||i.change||i.entities&&i.entities.length>0)&&i.max>4&&i.max<10)),t.xp6(1),t.Q6J("ngForOf",i.range),t.xp6(1),t.Q6J("ngIf",!(i.change||i.automatic||i.entities&&0!=i.entities.length)),t.xp6(1),t.Q6J("ngIf",i.change&&i.entity&&i.entity.type!=i.MonsterType.boss),t.xp6(1),t.Q6J("ngIf",i.automatic))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;display:flex;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 7.8 * var(--ghs-text-factor))}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:25% 25% 5% 5%;border:solid calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) var(--ghs-color-gray);overflow:hidden;z-index:0}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{position:absolute;top:-8%;left:0;width:100%;height:150%;background-color:var(--ghs-color-darkgray);background-size:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor)) AUTO;background-repeat:no-repeat;background-position:top center;filter:brightness(70%)}.title[_ngcontent-%COMP%] .elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.title[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,auto);justify-items:center;align-items:center;gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.number-container.extended[_ngcontent-%COMP%]{grid-template-columns:repeat(5,auto)}.number-container.small[_ngcontent-%COMP%]{grid-template-columns:repeat(3,auto)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.number-container[_ngcontent-%COMP%] .number-button.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .number-button.existing[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray)}.number-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]{pointer-events:none}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] img.summon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .summon-button.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;border-radius:100%}.change-type[_ngcontent-%COMP%]{display:flex;justify-content:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.change-type[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.change-type[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.cancel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.cancel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.cancel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}"]})),a})();var Nn=E(5601),oa=E(1975);const mx=function(o){return{selected:o}};function Bu(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",7),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.toggleSelect(s))}),t._UZ(1,"img",8),t.TgZ(2,"span",9),t._uU(3),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(3,mx,i.selected==e)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.hij(" ",i.gameManager.characterManager.characterName(n,!0)," ")}}const Y1=function(o){return[o]},c6=function(o){return{disabled:o}},l6=function(){return[]};let K1=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"selected",0),(0,_.Z)(this,"characters",void 0),(0,_.Z)(this,"type",void 0),this.data=e,this.dialogRef=i,this.characters=e.characters,this.type=e.type}toggleSelect(e){this.selected=this.selected==e?-1:e}select(){this.dialogRef.close(this.selected)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-additional-am-select-dialog"]],decls:9,vars:14,consts:[[3,"ghs-label","ghs-label-args"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"menu"],[1,"cancel",3,"click"],[3,"ghs-label"],[1,"select",3,"ngClass","click"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[1,"name"]],template:function(e,i){1&e&&(t.TgZ(0,"p"),t._UZ(1,"span",0),t.qZA(),t.TgZ(2,"div",1),t.YNc(3,Bu,4,5,"div",2),t.qZA(),t.TgZ(4,"div",3)(5,"a",4),t.NdJ("click",function(){return i.dialogRef.close()}),t._UZ(6,"span",5),t.qZA(),t.TgZ(7,"a",6),t.NdJ("click",function(){return i.select()}),t._UZ(8,"span",0),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ghs-label","game.attackModifiers.additional.dialog")("ghs-label-args",t.VKq(7,Y1,i.type)),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngClass",t.VKq(9,c6,-1==i.selected)),t.xp6(1),t.Q6J("ghs-label",-1==i.selected?"game.attackModifiers.additional.select":"game.attackModifiers.additional.apply")("ghs-label-args",-1!=i.selected?t.VKq(11,Y1,i.characters[i.selected].title||"%data.character."+i.characters[i.selected].name+"%"):t.DdM(13,l6)))},dependencies:[x.mk,x.sg,ie],styles:["p[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-align:center}.characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:.25em;padding:.25em;border:1px solid transparent}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;color:var(--ghs-color-green);margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5;color:var(--ghs-color-gray)}"]})),a})();const $1=function(o){return{hint:o}};let vx=(()=>{var o;class a{constructor(){(0,_.Z)(this,"value",""),(0,_.Z)(this,"args",[]),(0,_.Z)(this,"argLabel",!0),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"size",void 0),(0,_.Z)(this,"hint",!1)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-tooltip"]],inputs:{value:"value",args:["ghs-label-args","args"],argLabel:["ghs-label-args-replace","argLabel"],style:"style",relative:"relative",size:"size",hint:"hint"},decls:2,vars:12,consts:[[3,"ngClass"],[1,"placeholder","text-white",3,"ghs-label","ghs-label-args","ghs-label-args-replace","relative"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"span",1),t.qZA()),2&e&&(t.Tol(i.size),t.Q6J("ngClass",t.VKq(10,$1,i.hint)),t.xp6(1),t.Akn(i.style),t.Q6J("ghs-label",i.value)("ghs-label-args",i.args)("ghs-label-args-replace",i.argLabel)("relative",i.relative))},dependencies:[x.mk,ie],styles:['[_nghost-%COMP%]{display:block;z-index:3000}div[_ngcontent-%COMP%]{position:relative;font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-text-factor));font-weight:200;margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));max-width:calc(var(--ghs-unit) * 50 * var(--ghs-text-factor))}div[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-color-darkgray);border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));opacity:.9;z-index:0}div[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{z-index:1}div.hint[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));background-color:var(--ghs-color-black)}div.small[_ngcontent-%COMP%]{font-weight:100;font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}div.large[_ngcontent-%COMP%]{font-weight:400;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}'],data:{animation:[fo("tooltip",[li(":enter",[Wa({opacity:0}),Pe(300,Wa({opacity:1}))]),li(":leave",[Pe(300,Wa({opacity:0}))])])]},changeDetection:0})),a})(),Ba=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"overlayPositionBuilder",void 0),(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"value",""),(0,_.Z)(this,"args",[]),(0,_.Z)(this,"argLabel",!0),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"size",void 0),(0,_.Z)(this,"hint",!1),(0,_.Z)(this,"toggable",!0),(0,_.Z)(this,"originX",void 0),(0,_.Z)(this,"originY",void 0),(0,_.Z)(this,"overlayX",void 0),(0,_.Z)(this,"overlayY",void 0),(0,_.Z)(this,"offsetX",0),(0,_.Z)(this,"offsetY",0),(0,_.Z)(this,"delay",0),(0,_.Z)(this,"overlayRef",void 0),(0,_.Z)(this,"timeout",void 0),this.overlay=e,this.overlayPositionBuilder=i,this.elementRef=s}ngOnInit(){const e=this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([{originX:this.originX||"start",originY:this.originY||"bottom",overlayX:this.overlayX||(this.hint?"center":"start"),overlayY:this.overlayY||"top",offsetX:this.offsetX,offsetY:this.offsetY}]);this.overlayRef=this.overlay.create({positionStrategy:e}),this.overlayRef.hostElement.style.zIndex="3000",this.timeout=null}show(){(R.r.settings.tooltips||!this.toggable)&&this.value&&!this.overlayRef.hasAttached()&&!this.timeout&&(this.timeout=setTimeout(()=>{const e=this.overlayRef.attach(new zs.C5(vx));e.instance.value=this.value,e.instance.args=this.args,e.instance.argLabel=this.argLabel,e.instance.style=this.style,e.instance.relative=this.relative,e.instance.size=this.size,e.instance.hint=this.hint},this.delay||!this.hint&&500||1))}hide(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.overlayRef.hasAttached()&&this.overlayRef.detach()}ngOnDestroy(){this.hide(),this.overlayRef.dispose()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ti.aV),t.Y36(ti.wJ),t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","ghs-tooltip",""]],hostBindings:function(e,i){1&e&&t.NdJ("mouseover",function(){return i.show()})("mouseleave",function(){return i.hide()})},inputs:{value:["ghs-tooltip","value"],args:["ghs-label-args","args"],argLabel:["ghs-label-args-replace","argLabel"],style:"style",relative:"relative",size:"size",hint:"hint",toggable:"toggable",originX:"originX",originY:"originY",overlayX:"overlayX",overlayY:"overlayY",offsetX:"offsetX",offsetY:"offsetY",delay:"delay"}})),a})();function Cx(o,a){1&o&&t._UZ(0,"span",11)}const Vd=function(o,a,n){return{active:o,disabled:a,immunity:n}};function Mx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(2,"img",9),t.qZA(),t.YNc(3,Cx,1,0,"span",10),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(8,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function Yd(o,a){1&o&&t._UZ(0,"span",11)}const Yc=function(o){return{disabled:o}};function Ox(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",13),t._uU(5),t.qZA()(),t.YNc(6,Yd,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function Px(o,a){1&o&&t._UZ(0,"span",11)}function yx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",15),t._uU(5),t.qZA()(),t.YNc(6,Px,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function bx(o,a){1&o&&t._UZ(0,"span",11)}function xx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(2,"img",9),t.qZA(),t.YNc(3,bx,1,0,"span",10),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(8,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function wx(o,a){1&o&&t._UZ(0,"span",11)}function Ef(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",13),t._uU(5),t.qZA()(),t.YNc(6,wx,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function kx(o,a){1&o&&t._UZ(0,"span",11)}function Tx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",15),t._uU(5),t.qZA()(),t.YNc(6,kx,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}const Zx=function(o){return{fh:o}},W1=function(o){return{active:o}};let zu=(()=>{var o;class a{constructor(){(0,_.Z)(this,"entityConditions",void 0),(0,_.Z)(this,"immunities",void 0),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"entities",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"columns",3),(0,_.Z)(this,"onChange",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"standardNegative",[]),(0,_.Z)(this,"upgradeNegative",[]),(0,_.Z)(this,"stackNegative",[]),(0,_.Z)(this,"standardPositive",[]),(0,_.Z)(this,"upgradePositive",[]),(0,_.Z)(this,"stackPositive",[]),(0,_.Z)(this,"monsterType",!1),(0,_.Z)(this,"permanentEnabled",!1),(0,_.Z)(this,"immunityEnabled",!1),d.v.uiChange.subscribe({next:()=>{this.initializeConditions()}})}ngOnInit(){if(this.initializeConditions(),this.entities){const e=this.entities.map(i=>i instanceof In.g&&i.type).filter((i,s,l)=>i&&l.indexOf(i)==s);1==e.length&&(this.monsterType=e[0])}window.addEventListener("keydown",e=>{if(!(e.altKey||e.metaKey||window.document.activeElement&&("INPUT"==window.document.activeElement.tagName||"SELECT"==window.document.activeElement.tagName||"TEXTAREA"==window.document.activeElement.tagName)||e.ctrlKey||e.shiftKey||-1==["1","2","3","4","5","6","7","8","9","0"].indexOf(e.key))){if((!(this.entity instanceof qe.CH)||this.entity.escort)&&(!(this.figure instanceof Nn.k)||this.figure.escort)){let s,i=+e.key;0==i?i=9:i--,il.name==e.name&&l.state!=re.tT.removed&&!l.expired&&(!this.permanentEnabled||(i||this.permanentEnabled)&&l.permanent)):this.entity?d.v.entityManager.hasCondition(this.entity,e,i||this.permanentEnabled):this.entities.every(l=>d.v.entityManager.hasCondition(l,e,i||this.permanentEnabled))}isImmune(e){return this.immunities?-1!=this.immunities.indexOf(e):this.figure instanceof Ze.Q?this.entity instanceof In.g?d.v.entityManager.isImmune(this.entity,this.figure,e):this.entities.every(i=>this.figure instanceof Ze.Q&&i instanceof In.g&&d.v.entityManager.isImmune(i,this.figure,e)):this.figure instanceof oe.z&&this.entity instanceof oe.z&&d.v.entityManager.isImmune(this.entity,this.figure,e)}isPermanent(e){return!!this.entityConditions&&this.entityConditions.some(i=>i.name==e&&i.permanent&&!i.expired)}inc(e){e.value=this.getValue(e)+1,this.checkUpdate(e),this.onChange.emit(this.entityConditions)}dec(e){e.value=this.getValue(e)-1,e.value<1&&(e.value=1),this.checkUpdate(e),this.onChange.emit(this.entityConditions)}getValue(e){const i=this.entityConditions.find(s=>s.name==e.name&&!s.expired);return i?i.value:e.value}checkUpdate(e){const i=this.entityConditions.find(s=>s.name==e.name&&!s.expired);i&&(i.value=e.value)}toggleCondition(e,i=!1){if(this.immunityEnabled&&!i)-1==this.immunities.indexOf(e.name)?this.immunities.push(e.name):this.immunities.splice(this.immunities.indexOf(e.name),1);else{if(this.hasCondition(e,i||this.permanentEnabled)){let s=this.entityConditions.find(l=>l.name==e.name&&(!i||l.permanent));s&&(s.expired=!0,s.lastState=s.state,s.state=re.tT.removed)}else{let s=this.entityConditions.find(l=>l.name==e.name&&(!i||l.permanent));s?(s.expired=!1,s.lastState=s.state,s.state=re.tT.new):(s=new re.hT(e.name,e.value),s.lastState=s.state,s.state=re.tT.new,this.entityConditions.push(s)),s.permanent=i||this.permanentEnabled}this.onChange.emit(this.entityConditions)}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-conditions"]],inputs:{entityConditions:"entityConditions",immunities:"immunities",entity:"entity",entities:"entities",figure:"figure",type:"type",columns:"columns"},outputs:{onChange:"change"},decls:14,vars:17,consts:[[3,"ngClass"],[1,"condition-container","negative"],["class","item",4,"ngFor","ngForOf"],[1,"condition-container","positive"],[1,"condition-container","menu"],[1,"item"],[1,"condition","permanent",3,"ngClass","click"],[1,"condition","immunity",3,"ngClass","click"],[1,"condition",3,"ghs-tooltip","originX","overlayX","originY","overlayY","ngClass","click"],[3,"src"],["class","condition permanent permanent-overlay",4,"ngIf"],[1,"condition","permanent","permanent-overlay"],["src","./assets/images/left.svg",1,"ghs-svg","dec",3,"ngClass","click"],[1,"value"],["src","./assets/images/right.svg",1,"ghs-svg","inc",3,"click"],[1,"value","stack"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,Mx,4,12,"a",2),t.YNc(3,Ox,8,16,"a",2),t.YNc(4,yx,8,16,"a",2),t.qZA(),t.TgZ(5,"div",3),t.YNc(6,xx,4,12,"a",2),t.YNc(7,Ef,8,16,"a",2),t.YNc(8,Tx,8,16,"a",2),t.qZA(),t.TgZ(9,"div",4)(10,"a",5)(11,"span",6),t.NdJ("click",function(){return i.permanentEnabled=!i.permanentEnabled,i.immunityEnabled=!1}),t.qZA()(),t.TgZ(12,"a",5)(13,"span",7),t.NdJ("click",function(){return i.immunityEnabled=!i.immunityEnabled,i.permanentEnabled=!1}),t.qZA()()()()),2&e&&(t.Udp("--condition-columns",i.columns),t.Q6J("ngClass",t.VKq(11,Zx,i.settingsManager.settings.fhStyle)),t.xp6(2),t.Q6J("ngForOf",i.standardNegative),t.xp6(1),t.Q6J("ngForOf",i.upgradeNegative),t.xp6(1),t.Q6J("ngForOf",i.stackNegative),t.xp6(2),t.Q6J("ngForOf",i.standardPositive),t.xp6(1),t.Q6J("ngForOf",i.upgradePositive),t.xp6(1),t.Q6J("ngForOf",i.stackPositive),t.xp6(3),t.Q6J("ngClass",t.VKq(13,W1,i.permanentEnabled)),t.xp6(2),t.Q6J("ngClass",t.VKq(15,W1,i.immunityEnabled)))},dependencies:[x.mk,x.sg,x.O5,Ba],styles:['.condition-container[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(var(--condition-columns),calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto}.condition-container[_ngcontent-%COMP%]:not(:first-child){margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{cursor:pointer;display:flex;position:relative;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));z-index:1}.item[_ngcontent-%COMP%] .condition.permanent-overlay[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));pointer-events:none;z-index:2}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:after{pointer-events:none;content:" ";height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);position:absolute;bottom:0;left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));transform:translate(-50%)}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value.stack[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor))}.item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:after{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-red) solid}.item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray);filter:brightness(.5) grayscale(.2)}.item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.item[_ngcontent-%COMP%] .dec[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc[_ngcontent-%COMP%]{cursor:pointer;position:absolute;width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow);top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:translateY(-50%)}.item[_ngcontent-%COMP%] .dec.dec[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc.dec[_ngcontent-%COMP%]{left:0}.item[_ngcontent-%COMP%] .dec.inc[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc.inc[_ngcontent-%COMP%]{right:0}.item[_ngcontent-%COMP%] .dec.disabled[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc.disabled[_ngcontent-%COMP%]{pointer-events:none;filter:var(--ghs-filter-darkgray)}']})),a})(),Kd=(()=>{var o;class a{transform(e,...i){return(0,he.uZ)(e,-1!=i.indexOf("empty"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275pipe",t.Yjl({name:"ghsValueSign",type:o,pure:!0})),a})(),Ii=(()=>{var o;class a{transform(e,i,s=!1){e.length=0;for(let l=0;l{var o;class a{transform(e){return Math.floor(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275pipe",t.Yjl({name:"ghsFloor",type:o,pure:!0})),a})(),sg=(()=>{var o;class a{transform(e){return e<0?0:e}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275pipe",t.Yjl({name:"ghsMinZero",type:o,pure:!0})),a})(),Ax=(()=>{var o;class a{transform(e,i){return e.filter(s=>{if(!i||""==i)return!0;i=i.toLowerCase();let l=s.index.toLowerCase(),m=0;for(;i.startsWith("0");)m++,i=i.replace("0","");for(let O=0;O=10),t.xp6(1),t.Q6J("ngClass",t.VKq(3,Df,n.entityIndex<10&&n.entityIndex==n.gameManager.stateManager.keyboardSelect)),t.xp6(2),t.Oqu(n.entityIndex%10)}}let Gu=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"show",!1),(0,_.Z)(this,"entityIndex",-1),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.entityIndex=d.v.entityManager.getIndexForEntity(this.entity),-1!=this.entityIndex&&this.entityIndex++}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-entity-index-key"]],inputs:{entity:"entity",show:"show"},decls:1,vars:1,consts:[["class","key-container",4,"ngIf"],[1,"key-container"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,i){1&e&&t.YNc(0,Sx,5,5,"span",0),2&e&&t.Q6J("ngIf",i.gameManager.stateManager.keyboardSelecting||i.show)},dependencies:[x.mk,x.O5,X1],styles:['.key-container[_ngcontent-%COMP%]{display:flex;min-width:calc(var(--ghs-unit) * 10);max-width:calc(var(--ghs-unit) * 10);z-index:999}kbd[_ngcontent-%COMP%]{position:relative;display:inline-block;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);border-radius:calc(var(--ghs-unit) * .5);background:linear-gradient(180deg,#282828,#202020);box-shadow:inset calc(var(--ghs-unit) * -.4) 0 calc(var(--ghs-unit) * .4) #00000026,inset 0 calc(var(--ghs-unit) * -.4) calc(var(--ghs-unit) * .4) #00000040,0 0 0 calc(var(--ghs-unit) * .1) #000000bf,calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * 1.25) #0006;overflow:hidden}kbd[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * .125);left:calc(var(--ghs-unit) * .2);bottom:calc(var(--ghs-unit) * .7);right:calc(var(--ghs-unit) * .6);background:linear-gradient(90deg,#232323,#4a4a4a);border-radius:calc(var(--ghs-unit) * .5);box-shadow:calc(var(--ghs-unit) * -.5) calc(var(--ghs-unit) * -.5) calc(var(--ghs-unit) * .5) #ffffff40,calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .25) calc(var(--ghs-unit) * .5) #00000026;border-left:calc(var(--ghs-unit) * .05) solid rgba(0,0,0,.2666666667);border-bottom:calc(var(--ghs-unit) * .05) solid rgba(0,0,0,.2666666667);border-top:calc(var(--ghs-unit) * .05) solid rgba(0,0,0,.6)}kbd[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * .3);left:calc(var(--ghs-unit) * .9);font-size:calc(var(--ghs-unit) * 2);font-family:ghs-normal;font-style:normal;text-shadow:none;color:#ddd}kbd.highlight[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .3);height:calc(var(--ghs-unit) * 3.7);box-shadow:inset calc(var(--ghs-unit) * -.1) 0 calc(var(--ghs-unit) * .1) #00000026,inset 0 calc(var(--ghs-unit) * -.1) calc(var(--ghs-unit) * .1) #00000040,0 0 0 calc(var(--ghs-unit) * .025) #000000bf,calc(var(--ghs-unit) * .125) calc(var(--ghs-unit) * .25) calc(var(--ghs-unit) * .3) #0006}kbd.highlight[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#888}kbd.highlight[_ngcontent-%COMP%]:before{bottom:calc(var(--ghs-unit) * .3)}']})),a})(),iO=(()=>{var o;class a{constructor(){(0,_.Z)(this,"directives",[]),(0,_.Z)(this,"active",void 0),(0,_.Z)(this,"behindActive",void 0),(0,_.Z)(this,"currentZoom",0),(0,_.Z)(this,"zoomDiff",-1),this.currentZoom=R.r.settings.zoom,window.addEventListener("mousedown",e=>{if(this.active=this.find(e.target),this.active){if(this.active.clickBehind&&(this.active=this.find(this.active.elementRef.nativeElement.parentElement),!this.active)){const i=document.elementsFromPoint(e.clientX,e.clientY);for(let s=0;sl&&m.elementRef.nativeElement==l),this.active))break}}this.active&&(this.active.pointerdown(e),e.preventDefault(),e.stopPropagation())}}),window.addEventListener("touchstart",e=>{if(1==e.touches.length&&(this.active=this.find(e.target),this.active)){if(this.active.clickBehind&&(this.behindActive=this.find(this.active.elementRef.nativeElement.parentElement),!this.behindActive)){const i=document.elementsFromPoint(e.touches[0].clientX,e.touches[0].clientY);for(let s=0;sl&&m.elementRef.nativeElement==l),this.behindActive)){this.behindActive.pointerdown(e);break}}}this.active&&(this.active.pointerdown(e),e.preventDefault(),e.stopPropagation())}}),window.addEventListener("mousemove",e=>{this.active&&(this.active.pointermove(e),window.document.body.classList.add("dragging"),window.document.body.classList.add("no-pointer"))},{passive:!0}),window.addEventListener("touchmove",e=>{1==e.touches.length&&this.active?(this.active.pointermove(e),window.document.body.classList.add("dragging"),window.document.body.classList.add("no-pointer"),this.behindActive&&(this.behindActive.cancel(),this.behindActive=void 0)):(this.cancel(),this.touchmove(e))},{passive:!0}),window.addEventListener("mouseup",e=>{this.active&&(this.active.pointerup(e),this.active=void 0,e.preventDefault(),e.stopPropagation()),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")}),window.addEventListener("touchend",e=>{this.active?(this.active.pointerup(e),this.active=void 0,this.behindActive&&(this.behindActive.pointerup(e),this.behindActive=void 0),e.preventDefault(),e.stopPropagation()):this.touchend(e),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")}),window.addEventListener("touchcancel",e=>{this.active?(this.active.pointerup(e),this.behindActive&&(this.behindActive.pointerup(e),this.behindActive=void 0),this.active.clickBehind||(e.preventDefault(),e.stopPropagation()),this.active=void 0):this.touchend(e),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")})}zoom(e){this.currentZoom+=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+"");const i=+window.getComputedStyle(document.body).getPropertyValue("min-width").replace("px","");e<0&&i>=window.innerWidth&&(this.currentZoom-=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+""))}touchmove(e){if(!R.r.settings.disablePinchZoom&&2===e.touches.length){const i=Math.abs(e.touches[0].clientX-e.touches[1].clientX);this.zoomDiff>0&&this.zoom(Math.ceil(.25*(this.zoomDiff-i))),this.zoomDiff=i}}touchend(e){R.r.settings.disablePinchZoom||e.touches.length<2&&this.zoomDiff>-1&&R.r.settings.zoom!=this.currentZoom&&(this.zoomDiff=-1,R.r.setZoom(this.currentZoom))}cancel(){this.active&&(this.active.cancel(),this.active=void 0),this.behindActive&&(this.behindActive.cancel(),this.behindActive=void 0),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")}register(e){this.directives.push(e)}unregister(e){this.directives.splice(this.directives.indexOf(e),1)}find(e){let i=e,s=this.directives.find(m=>i&&m.elementRef.nativeElement==i),l=0;for(;!s&&l<50&&i!==document.body&&i.parentElement;)i=i.parentElement,s=this.directives.find(m=>i&&m.elementRef.nativeElement==i),l++;return s}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275prov",t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"})),a})(),An=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"service",void 0),(0,_.Z)(this,"clickBehind",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"screenWidth",!1),(0,_.Z)(this,"repeat",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"forcePress",!1),(0,_.Z)(this,"forceDoubleClick",!1),(0,_.Z)(this,"onRelease",!1),(0,_.Z)(this,"dragMove",new t.vpe),(0,_.Z)(this,"dragEnd",new t.vpe),(0,_.Z)(this,"dragCancel",new t.vpe),(0,_.Z)(this,"singleClick",new t.vpe),(0,_.Z)(this,"doubleClick",new t.vpe),(0,_.Z)(this,"timeout",null),(0,_.Z)(this,"relativeValue",-1),(0,_.Z)(this,"value",-1),(0,_.Z)(this,"repeats",-1),(0,_.Z)(this,"down",!1),(0,_.Z)(this,"clicks",0),(0,_.Z)(this,"startX",0),(0,_.Z)(this,"move",!1),this.elementRef=e,this.service=i,this.value=-1,this.elementRef.nativeElement.style["touch-action"]="pan-y"}ngOnInit(){this.service.register(this)}ngOnDestroy(){this.service.unregister(this)}pointerdown(e){(!(e instanceof MouseEvent)||!e.button)&&(this.down=!0,this.startX=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,this.move||!this.repeat||this.doubleClick.observed?(this.forcePress||R.r.settings.pressDoubleClick&&!this.forceDoubleClick&&this.doubleClick.observed&&!this.move&&!(e instanceof MouseEvent))&&(this.timeout=setTimeout(()=>{(e instanceof MouseEvent||!this.onRelease)&&this.doubleClick.emit(e),this.timeout=null,this.clicks=2},550)):(this.repeats=-1,this.repeatTimeout(e)))}pointermove(e){if(this.down){const i=e instanceof MouseEvent?e.clientX:e.touches[0].clientX;!this.move&&Math.abs(this.startX-i)>7?this.panstart(e):this.move&&this.panmove(e)}}pointerup(e){this.down&&(this.down=!1,this.startX=0,this.move?this.clicks=0:!this.forcePress&&(e instanceof MouseEvent||!R.r.settings.pressDoubleClick||this.forceDoubleClick)?(this.clicks++,this.timeout&&(clearTimeout(this.timeout),this.timeout=null),2==this.clicks&&this.doubleClick.observed?(this.doubleClick.emit(e),this.clicks=0):this.timeout=setTimeout(()=>{this.clicks>0&&(!this.repeat||this.doubleClick.observed)&&this.singleClick.emit(e),this.clicks=0,this.timeout=null},this.doubleClick.observed?250:0)):e instanceof MouseEvent||!this.onRelease||2!=this.clicks?(this.clicks<2&&(!this.repeat||this.doubleClick.observed)&&this.singleClick.emit(e),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.clicks=0):(this.doubleClick.emit(e),this.clicks=0),this.panend(e))}panstart(e){!this.disabled&&R.r.settings.dragValues&&(this.dragMove.observed||this.dragEnd.observed)&&(this.elementRef.nativeElement.classList.add("dragging"),this.move=!0,this.timeout&&(clearTimeout(this.timeout),this.timeout=null))}panmove(e){if(!this.disabled&&R.r.settings.dragValues&&(this.dragMove.observed||this.dragEnd.observed)){const i=this.elementRef.nativeElement.getBoundingClientRect(),s=e instanceof MouseEvent?e.clientX:e.touches[0].clientX;this.screenWidth?document.body.clientWidth>1200?this.value=Math.min(99,Math.max(0,s*(1200/document.body.clientWidth)/document.body.clientWidth*100)):(this.value=Math.min(99,Math.max(0,s/document.body.clientWidth*100)),this.relative&&(this.value=.4*this.value)):this.value=Math.min(99,Math.max(0,(s-i.left)/i.width*100)),this.relative&&-1==this.relativeValue&&(this.relativeValue=this.value),this.value=Math.floor(this.relative?this.value-this.relativeValue:this.value),this.dragMove.emit(this.value)}}panend(e){!this.disabled&&R.r.settings.dragValues&&(this.dragMove.observed||this.dragEnd.observed)&&((this.value>=0||this.relative)&&this.dragEnd.emit(this.value),this.repeats=-1,this.startX=-1,this.move=!1,this.value=-1,this.relativeValue=-1,this.elementRef.nativeElement.classList.remove("dragging"))}cancel(){this.down=!1,this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.dragCancel.emit(this.value),this.repeats=-1,this.clicks=0,this.startX=-1,this.move=!1,this.value=-1,this.relativeValue=-1,this.elementRef.nativeElement.classList.remove("dragging")}repeatTimeout(e){this.down&&!this.move&&(this.singleClick.emit(e),-1==this.repeats?this.repeats=500:(this.repeats-=25,this.repeats<25&&(this.repeats=25)),this.timeout=setTimeout(()=>{this.repeatTimeout(e)},this.repeats))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(iO))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["ghs-pointer-input"],["","ghs-pointer-input",""]],inputs:{clickBehind:"clickBehind",relative:"relative",screenWidth:"screenWidth",repeat:"repeat",disabled:"disabled",forcePress:"forcePress",forceDoubleClick:"forceDoubleClick",onRelease:"onRelease"},outputs:{dragMove:"dragMove",dragEnd:"dragEnd",dragCancel:"dragCancel",singleClick:"singleClick",doubleClick:"doubleClick"}})),a})(),aa=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"value",0),(0,_.Z)(this,"colored",!0),(0,_.Z)(this,"empty",!0),(0,_.Z)(this,"hideEmpty",!1),(0,_.Z)(this,"container",!1),this.el=e,this.update()}ngOnChanges(e){this.update()}update(){this.el.nativeElement.innerHTML=(0,he.uZ)(this.value,this.empty),this.container&&(this.el.nativeElement.innerHTML=''+(0,he.uZ)(this.value,this.empty)+""),this.el.nativeElement.classList.remove("hide-zero-value","positive-value","negative-value"),0==this.value&&this.hideEmpty?this.el.nativeElement.classList.add("hide-zero-value"):this.colored&&(this.value>0?this.el.nativeElement.classList.add("positive-value"):this.value<0&&this.el.nativeElement.classList.add("negative-value"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","value-sign",""]],inputs:{value:["value-sign","value"],colored:"colored",empty:"empty",hideEmpty:"hideEmpty",container:"container"},features:[t.TTD]})),a})();const oO=["charactertitle"],Jf=["objectiveTitle"],Uf=["summonTitle"];function Ix(o,a){if(1&o&&t._UZ(0,"ghs-entity-index-key",7),2&o){const n=t.oxw();t.Q6J("entity",n.data.entity)("show",!0)}}const h6=function(o){return{absent:o}};function aO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t._UZ(1,"span",8),t.TgZ(2,"img",9),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleCharacterMarker())}),t.qZA(),t.TgZ(3,"span",10),t._uU(4),t.qZA(),t._UZ(5,"span",8),t.TgZ(6,"img",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleCharacterAbsent())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("src",n.gameManager.toCharacter(n.data.figure).iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(6,h6,n.gameManager.toCharacter(n.data.figure).absent)),t.xp6(1),t.Oqu(n.gameManager.characterManager.characterName(n.gameManager.toCharacter(n.data.figure),!0)),t.xp6(2),t.Q6J("src","./assets/images/status/"+(n.gameManager.toCharacter(n.data.figure).absent?"absent":"present")+".svg",t.LSH)("ghs-label",n.gameManager.toCharacter(n.data.figure).absent?"character.present":"character.absent")("ghs-label-attribute","title")}}function Nx(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.gameManager.toObjective(n.data.entity).title)}}function Jx(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label","data.objective."+n.gameManager.toObjective(n.data.entity).name)}}function Ux(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.gameManager.toObjective(n.data.entity).escort?"escort":"objective")}}function Lx(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," \xa0( "),t._UZ(2,"span",14),t._uU(3," ) "),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label",n.gameManager.toObjective(n.data.entity).escort?"escort":"objective")}}function sO(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",12),t.YNc(2,Nx,2,1,"span",3),t.YNc(3,Jx,1,1,"span",13),t.YNc(4,Ux,1,1,"span",13),t.YNc(5,Lx,4,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.gameManager.toObjective(n.data.entity).escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjective(n.data.entity).title),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjective(n.data.entity).title&&n.gameManager.toObjective(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjective(n.data.entity).title&&!n.gameManager.toObjective(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjective(n.data.entity).title)}}function u6(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.gameManager.toObjectiveContainer(n.data.figure).title)}}function rO(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label","data.objective."+n.gameManager.toObjectiveContainer(n.data.figure).name)}}function Qx(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.gameManager.toObjectiveContainer(n.data.figure).escort?"escort":"objective")}}function cO(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," \xa0( "),t._UZ(2,"span",14),t._uU(3," ) "),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label",n.gameManager.toObjectiveContainer(n.data.figure).escort?"escort":"objective")}}function _6(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",12),t.YNc(2,u6,2,1,"span",3),t.YNc(3,rO,1,1,"span",13),t.YNc(4,Qx,1,1,"span",13),t.YNc(5,cO,4,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.gameManager.toObjectiveContainer(n.data.figure).escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjectiveContainer(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjectiveContainer(n.data.figure).title&&n.gameManager.toObjectiveContainer(n.data.figure).name),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjectiveContainer(n.data.figure).title&&!n.gameManager.toObjectiveContainer(n.data.figure).name),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjectiveContainer(n.data.figure).title)}}function Lf(o,a){if(1&o&&t._UZ(0,"img",20),2&o){const n=t.oxw(2);t.Q6J("src",n.gameManager.monsterManager.monsterThumbnail(n.gameManager.toMonster(n.data.figure)),t.LSH)}}function lO(o,a){1&o&&(t.TgZ(0,"span",21),t._UZ(1,"span",14),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function gO(o,a){1&o&&(t.TgZ(0,"span",22),t._UZ(1,"span",14),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function Rx(o,a){if(1&o&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",n.gameManager.toMonsterEntity(n.data.entity).type),t.xp6(1),t.hij("#",n.gameManager.toMonsterEntity(n.data.entity).number,"")}}const dO=function(o){return{"change-entity":o}};function hO(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeMonsterEntity())}),t.YNc(1,Lf,1,1,"img",16),t._UZ(2,"span",14),t._uU(3,"\xa0 "),t.YNc(4,lO,3,1,"span",17),t.YNc(5,gO,3,1,"span",18),t.YNc(6,Rx,2,2,"span",19),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(6,dO,n.gameManager.monsterManager.monsterStandeeMax(n.gameManager.toMonster(n.data.figure))>1||n.data.entity&&n.gameManager.isMonsterEntity(n.data.entity)&&n.gameManager.toMonsterEntity(n.data.entity).type!=n.MonsterType.boss)),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toMonster(n.data.figure).noThumbnail&&!n.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.data.figure.name),t.xp6(2),t.Q6J("ngIf",n.gameManager.toMonster(n.data.figure).isAlly),t.xp6(1),t.Q6J("ngIf",n.gameManager.toMonster(n.data.figure).isAllied),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isMonsterEntity(n.data.entity))}}function rg(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.gameManager.toCharacter(n.data.figure).title)}}function Vu(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0("),t._UZ(2,"span",14),t._uU(3,")"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.character."+n.data.figure.name)}}function uO(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label","data.character."+n.data.figure.name)}}function _O(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("",n.gameManager.toSummon(n.data.entity).title,"\xa0")}}function Fx(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"("),t.qZA())}function qx(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,")"),t.qZA())}function p6(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,Fx,2,0,"span",3),t._UZ(2,"span",14),t.YNc(3,qx,2,0,"span",3),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).title),t.xp6(1),t.Q6J("ghs-label","data.summon."+n.gameManager.toSummon(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).title)}}function pO(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",14),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.summon"))}function Hx(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"small"),t._UZ(2,"img",12),t.YNc(3,rg,2,1,"span",3),t.YNc(4,Vu,4,1,"span",3),t.YNc(5,uO,1,1,"span",13),t.qZA(),t.YNc(6,_O,2,1,"span",3),t.YNc(7,p6,4,3,"span",3),t.YNc(8,pO,2,1,"span",3),t.TgZ(9,"span",24),t._UZ(10,"img",25),t.TgZ(11,"span",26),t._uU(12),t.qZA()(),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("src",n.gameManager.toCharacter(n.data.figure).iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",n.gameManager.toCharacter(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",n.gameManager.toCharacter(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toCharacter(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).title),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toSummon(n.data.entity).name),t.xp6(2),t.MGl("src","./assets/images/summons/",n.gameManager.toSummon(n.data.entity).color,".png",t.LSH),t.xp6(2),t.Oqu(n.gameManager.toSummon(n.data.entity).number)}}function jx(o,a){if(1&o&&(t.TgZ(0,"div",33),t._UZ(1,"ghs-action",34),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("action",n)("highlight",e.settingsManager.settings.statAnimations)}}const qi=function(o){return{disabled:o}};function f6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.changeLoot(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",38)(5,"span",39),t._uU(6),t.qZA(),t._UZ(7,"img",47)(8,"span",45),t.qZA(),t.TgZ(9,"span",35)(10,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.changeLoot(1))}),t._UZ(11,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(4);t.xp6(2),t.Q6J("ngClass",t.VKq(8,qi,n.gameManager.toCharacter(n.data.entity).loot+n.loot==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.loot")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(n.gameManager.toCharacter(n.data.entity).loot+n.loot),t.xp6(2),t.Q6J("value-sign",n.loot)("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0)}}function m6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(4);return t.KtG(l.changeCharacterToken(-1,s))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",46)(5,"span",39),t._uU(6),t.qZA(),t._UZ(7,"span",14)(8,"span",45),t.qZA(),t.TgZ(9,"span",35)(10,"ghs-pointer-input",36),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(4);return t.KtG(l.changeCharacterToken(1,s))}),t._UZ(11,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(2),t.Q6J("ngClass",t.VKq(9,qi,i.gameManager.toCharacter(i.data.entity).tokenValues[e]+i.characterTokenValues[e]==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","data.character.token."+n)("ghs-label-attribute","title"),t.xp6(2),t.Oqu(i.gameManager.toCharacter(i.data.entity).tokenValues[e]+i.characterTokenValues[e]),t.xp6(1),t.Q6J("ghs-label","%data.characterToken."+i.gameManager.toCharacter(i.data.entity).name+"."+n+"%"),t.xp6(1),t.Q6J("value-sign",i.characterTokenValues[e])("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0)}}function fO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeExperience(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",38)(5,"span",39),t._uU(6),t.qZA(),t._UZ(7,"img",44)(8,"span",45),t.qZA(),t.TgZ(9,"span",35)(10,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeExperience(1))}),t._UZ(11,"img",43),t.qZA()(),t.YNc(12,f6,12,10,"ng-container",3),t.TgZ(13,"span",35)(14,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeCharacterToken(-1))}),t._UZ(15,"img",37),t.qZA()(),t.TgZ(16,"span",46)(17,"span",39),t._uU(18),t.qZA(),t._UZ(19,"span",14)(20,"span",45),t.qZA(),t.TgZ(21,"span",35)(22,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeCharacterToken(1))}),t._UZ(23,"img",43),t.qZA()(),t.YNc(24,m6,12,11,"ng-container",32),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(19,qi,n.gameManager.toCharacter(n.data.entity).experience+n.experience==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.experience")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(n.gameManager.toCharacter(n.data.entity).experience+n.experience),t.xp6(2),t.Q6J("value-sign",n.experience)("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngIf",!n.settingsManager.settings.alwaysLootDeck&&!n.gameManager.fhRules()),t.xp6(2),t.Q6J("ngClass",t.VKq(21,qi,n.gameManager.toCharacter(n.data.entity).token+n.characterToken==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.character.token")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(n.gameManager.toCharacter(n.data.entity).token+n.characterToken),t.xp6(1),t.Q6J("ghs-label","%data.characterToken."+n.gameManager.toCharacter(n.data.entity).name+"%"),t.xp6(1),t.Q6J("value-sign",n.characterToken)("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngForOf",n.gameManager.toCharacter(n.data.entity).tokens)}}function Bx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeHealth(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",38)(5,"span",39),t._uU(6),t.ALo(7,"ghsMinZero"),t.qZA(),t._UZ(8,"img",40)(9,"span",41),t.qZA(),t.TgZ(10,"span",35)(11,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeHealth(1))}),t._UZ(12,"img",43),t.qZA()(),t.YNc(13,fO,25,23,"ng-container",3),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(t.lcZ(7,9,n.data.entity.health+n.health)),t.xp6(3),t.Q6J("value-sign",n.health)("hideEmpty",!0),t.xp6(2),t.Q6J("ngClass",t.VKq(11,qi,n.data.entity.health+n.health==n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp))("repeat",!0),t.xp6(2),t.Q6J("ngIf",n.gameManager.isCharacter(n.data.entity))}}function zx(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function Gx(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function v6(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function C6(o,a){if(1&o&&(t.TgZ(0,"span",61),t._UZ(1,"img",25),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("src",n.empowerChar.iconUrl,t.LSH)}}function M6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEmpower(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",56)(5,"span",57),t._uU(6),t.qZA(),t.TgZ(7,"span",58),t._UZ(8,"img",59),t.qZA(),t._UZ(9,"span",45),t.YNc(10,v6,2,0,"span",51),t.YNc(11,C6,2,1,"span",60),t.qZA(),t.TgZ(12,"span",35)(13,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEmpower(1))}),t._UZ(14,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(14,qi,n.countUpcomingAttackModifier(n.AttackModifierType.empower)+n.empower==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-tooltip","game.condition.empower.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom"),t.xp6(2),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.empower)+n.empower),t.xp6(3),t.Q6J("value-sign",n.empower)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.countEmpower()<0),t.xp6(1),t.Q6J("ngIf",n.empowerChar),t.xp6(2),t.Q6J("ngClass",t.VKq(16,qi,n.empowerChar&&n.empower>=n.countEmpower()))("repeat",!0)}}function O6(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function P6(o,a){if(1&o&&(t.TgZ(0,"span",61),t._UZ(1,"img",25),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("src",n.enfeebleChar.iconUrl,t.LSH)}}function Vx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEnfeeble(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",56)(5,"span",62),t._uU(6),t.qZA(),t.TgZ(7,"span",58),t._UZ(8,"img",63),t.qZA(),t._UZ(9,"span",45),t.YNc(10,O6,2,0,"span",51),t.YNc(11,P6,2,1,"span",60),t.qZA(),t.TgZ(12,"span",35)(13,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEnfeeble(1))}),t._UZ(14,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(14,qi,n.countUpcomingAttackModifier(n.AttackModifierType.enfeeble)+n.enfeeble==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-tooltip","game.condition.enfeeble.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom"),t.xp6(2),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.enfeeble)+n.enfeeble),t.xp6(3),t.Q6J("value-sign",n.enfeeble)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.countEnfeeble()<0),t.xp6(1),t.Q6J("ngIf",n.enfeebleChar),t.xp6(2),t.Q6J("ngClass",t.VKq(16,qi,n.enfeebleChar&&n.enfeeble>=n.countEnfeeble()))("repeat",!0)}}const $d=function(o){return{"immunity disabled":o}};function Yx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeBless(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",35)(5,"span",48),t._uU(6),t.qZA(),t.TgZ(7,"span",49),t._UZ(8,"img",50),t.qZA(),t._UZ(9,"span",45),t.YNc(10,zx,2,0,"span",51),t.qZA(),t.TgZ(11,"span",35)(12,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeBless(1))}),t._UZ(13,"img",43),t.qZA()(),t.TgZ(14,"span",35)(15,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCurse(-1))}),t._UZ(16,"img",37),t.qZA()(),t.TgZ(17,"span",35)(18,"span",52),t._uU(19),t.qZA(),t.TgZ(20,"span",49),t._UZ(21,"img",53),t.qZA(),t._UZ(22,"span",45),t.YNc(23,Gx,2,0,"span",51),t.qZA(),t.TgZ(24,"span",35)(25,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCurse(1))}),t._UZ(26,"img",43),t.qZA()(),t.YNc(27,M6,15,18,"ng-container",3),t.YNc(28,Vx,15,18,"ng-container",3),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(30,qi,n.countUpcomingAttackModifier(n.AttackModifierType.bless)+n.bless==0||n.isImmune(n.ConditionName.bless)))("repeat",!0),t.xp6(4),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.bless)+n.bless),t.xp6(1),t.Q6J("ghs-tooltip","game.condition.bless.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.VKq(32,$d,n.isImmune(n.ConditionName.bless))),t.xp6(2),t.Q6J("value-sign",n.bless)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingBlesses()+n.bless>10),t.xp6(2),t.Q6J("ngClass",t.VKq(34,qi,n.gameManager.attackModifierManager.countUpcomingBlesses()+n.bless>=10||n.isImmune(n.ConditionName.bless)))("repeat",!0),t.xp6(3),t.Q6J("ngClass",t.VKq(36,qi,n.countUpcomingAttackModifier(n.AttackModifierType.curse)+n.curse==0||n.isImmune(n.ConditionName.curse)))("repeat",!0),t.xp6(4),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.curse)+n.curse),t.xp6(1),t.Q6J("ghs-tooltip","game.condition.curse.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.VKq(38,$d,n.isImmune(n.ConditionName.curse))),t.xp6(2),t.Q6J("value-sign",n.curse)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingCurses(n.gameManager.isMonster(n.data.figure)&&!n.gameManager.toMonster(n.data.figure).isAlly&&!n.gameManager.toMonster(n.data.figure).isAllied)+n.curse>10),t.xp6(2),t.Q6J("ngClass",t.VKq(40,qi,n.gameManager.attackModifierManager.countUpcomingCurses(n.gameManager.isMonster(n.data.figure)&&!n.gameManager.toMonster(n.data.figure).isAlly&&!n.gameManager.toMonster(n.data.figure).isAllied)+n.curse>=10||n.isImmune(n.ConditionName.curse)))("repeat",!0),t.xp6(2),t.Q6J("ngIf",n.hasCondition(n.ConditionName.empower)&&n.empowerChars.length>0),t.xp6(1),t.Q6J("ngIf",n.hasCondition(n.ConditionName.enfeeble)&&n.enfeebleChars.length>0)}}const mO=function(o){return{empty:o}};function vO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(-1))}),t._UZ(3,"img",64),t.qZA()(),t.TgZ(4,"span",35)(5,"span",65),t._uU(6),t.qZA()(),t.TgZ(7,"span",35)(8,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(1))}),t._UZ(9,"img",66),t.qZA()(),t.TgZ(10,"span",35)(11,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(-1))}),t._UZ(12,"img",64),t.qZA()(),t.TgZ(13,"span",35)(14,"span",67),t._uU(15),t.qZA()(),t.TgZ(16,"span",35)(17,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(1))}),t._UZ(18,"img",66),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("repeat",!0),t.xp6(4),t.Oqu((n.gameManager.toObjective(n.data.entity).id+n.id)%12+1),t.xp6(2),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("ngClass",t.VKq(7,mO,!n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjective(n.data.entity).marker))%n.OBJECTIV_MARKERS.length])),t.xp6(1),t.Oqu(n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjective(n.data.entity).marker))%n.OBJECTIV_MARKERS.length]),t.xp6(2),t.Q6J("repeat",!0)}}function Kc(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(-1))}),t._UZ(3,"img",64),t.qZA()(),t.TgZ(4,"span",35)(5,"span",65),t._uU(6),t.qZA()(),t.TgZ(7,"span",35)(8,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(1))}),t._UZ(9,"img",66),t.qZA()(),t.TgZ(10,"span",35)(11,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(-1))}),t._UZ(12,"img",64),t.qZA()(),t.TgZ(13,"span",35)(14,"span",67),t._uU(15),t.qZA()(),t.TgZ(16,"span",35)(17,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(1))}),t._UZ(18,"img",66),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("repeat",!0),t.xp6(4),t.Oqu(n.gameManager.toObjectiveEntity(n.data.entity).number+n.id),t.xp6(2),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("ngClass",t.VKq(7,mO,!n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjectiveEntity(n.data.entity).marker))%n.OBJECTIV_MARKERS.length])),t.xp6(1),t.Oqu(n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjectiveEntity(n.data.entity).marker))%n.OBJECTIV_MARKERS.length]),t.xp6(2),t.Q6J("repeat",!0)}}function CO(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(3);t.Q6J("ghs-label",""+n.gameManager.toSummon(n.data.entity).attack)}}function Qf(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Rf(o,a){if(1&o&&(t.TgZ(0,"span",75),t._UZ(1,"ghs-action",76),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("action",n.gameManager.toSummon(n.data.entity).action)}}function Kx(o,a){if(1&o&&(t.TgZ(0,"span",75),t._UZ(1,"ghs-action",76),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("action",n.gameManager.toSummon(n.data.entity).additionalAction)}}function Ff(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",68)(2,"span",69),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._UZ(3,"img",70),t.TgZ(4,"span",71),t._uU(5,">"),t.qZA()(),t.TgZ(6,"span",69),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._UZ(7,"img",72),t.YNc(8,CO,1,1,"span",13),t.YNc(9,Qf,2,0,"span",3),t.qZA(),t.TgZ(10,"span",69),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._UZ(11,"img",73),t.TgZ(12,"span",71),t._uU(13,">"),t.qZA()(),t.YNc(14,Rf,2,1,"span",74),t.YNc(15,Kx,2,1,"span",74),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(4),t.Q6J("value-calc",n.gameManager.toSummon(n.data.entity).movement)("empty",!0),t.xp6(4),t.Q6J("ngIf",0!=n.gameManager.toSummon(n.data.entity).attack),t.xp6(1),t.Q6J("ngIf",0==n.gameManager.toSummon(n.data.entity).attack),t.xp6(3),t.Q6J("value-calc",n.gameManager.toSummon(n.data.entity).range)("empty",!0),t.xp6(2),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).action),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).additionalAction)}}const Yu=function(o,a){return{active:o,new:a}};function Ku(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleSummon())}),t._UZ(1,"img",25),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.WLB(2,Yu,n.gameManager.toMonsterEntity(n.data.entity).summon==n.SummonState.true,n.gameManager.toMonsterEntity(n.data.entity).summon==n.SummonState.new)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.gameManager.toMonster(n.data.figure).summonColor,".png",t.LSH)}}const qf=function(o){return{active:o}};function y6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",78),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.toggleMarker(s))}),t.TgZ(2,"span",79),t._UZ(3,"img",25),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(2,qf,e.hasMarker(n))),t.xp6(2),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function b6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",80)(2,"a",81),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleExhausted())}),t._UZ(3,"img",82),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.exhausted")("ghs-label-attribute","title")("ngClass",t.VKq(3,qf,n.gameManager.toCharacter(n.data.entity).exhausted))}}function MO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleDead())}),t._UZ(3,"img",84),t.qZA()(),t.TgZ(4,"span",80)(5,"a",81),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleExhausted())}),t._UZ(6,"img",82),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","game.exhausted")("ghs-label-attribute","title")("ngClass",t.VKq(5,qf,n.gameManager.toObjective(n.data.entity).exhausted||!1))}}function $x(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleDead())}),t._UZ(3,"img",84),t.qZA()(),t.BQk()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"))}function Wx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",85),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._uU(3),t._UZ(4,"img",86),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",n.data.figure.level," ")}}function Xx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleDead())}),t._UZ(3,"img",84),t.qZA()(),t.TgZ(4,"span",38)(5,"a",85),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._uU(6),t._UZ(7,"img",86),t.qZA()(),t.TgZ(8,"span",35)(9,"a",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleSummonStatus())}),t._UZ(10,"img",25),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",n.data.figure.level," "),t.xp6(3),t.Q6J("ngClass",t.WLB(7,Yu,n.gameManager.toSummon(n.data.entity).state==n.SummonState.true,n.gameManager.toSummon(n.data.entity).state==n.SummonState.new)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.gameManager.toSummon(n.data.entity).color,".png",t.LSH)}}function tw(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",88)(1,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeMaxHealth(-1))}),t._UZ(2,"img",37),t.qZA(),t._UZ(3,"img",89),t.TgZ(4,"span",90),t._uU(5),t.qZA(),t.TgZ(6,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeMaxHealth(1))}),t._UZ(7,"img",43),t.qZA()()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.maxHealth")("ghs-label-attribute","title"),t.xp6(2),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp0)}}function PO(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-conditions",91),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entity",n.data.entity)("figure",n.data.figure)("type",n.conditionType)}}function yO(o,a){if(1&o&&(t.TgZ(0,"div",27)(1,"div",28),t.YNc(2,jx,2,2,"div",29),t.YNc(3,Bx,14,13,"ng-container",3),t.YNc(4,Yx,29,42,"ng-container",3),t.YNc(5,vO,19,9,"ng-container",3),t.YNc(6,Kc,19,9,"ng-container",3),t.YNc(7,Ff,16,8,"ng-container",3),t.TgZ(8,"div",30),t.YNc(9,Ku,2,5,"a",31),t.YNc(10,y6,4,4,"span",32),t.qZA(),t.YNc(11,b6,4,5,"ng-container",3),t.YNc(12,MO,7,7,"ng-container",3),t.YNc(13,$x,4,2,"ng-container",3),t.YNc(14,Wx,5,3,"ng-container",3),t.YNc(15,Xx,11,10,"ng-container",3),t.YNc(16,OO,5,3,"ng-container",3),t.qZA(),t.YNc(17,PO,2,5,"ng-container",3),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngForOf",n.actionHints),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal)),t.xp6(1),t.Q6J("ngIf",(n.gameManager.isCharacter(n.data.figure)&&n.settingsManager.settings.characterAttackModifierDeck||n.gameManager.isMonster(n.data.figure))&&(!n.data.entity||n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal))),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjective(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjectiveEntity(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isSummon(n.data.entity)),t.xp6(2),t.Q6J("ngIf",n.data.entity&&n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal)&&n.gameManager.isMonsterEntity(n.data.entity)),t.xp6(1),t.Q6J("ngForOf",n.markers()),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isCharacter(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjective(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjectiveEntity(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isCharacter(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isSummon(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isMonsterEntity(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isObjective(n.data.entity)||n.gameManager.toObjective(n.data.entity).escort)&&(!n.gameManager.isObjectiveEntity(n.data.entity)||n.gameManager.isObjectiveContainer(n.data.figure)&&n.gameManager.toObjectiveContainer(n.data.figure).escort)&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal))}}function ew(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMaxHealth(-1))}),t._UZ(2,"img",37),t.qZA(),t.TgZ(3,"span",35),t._UZ(4,"img",40),t.TgZ(5,"span",90),t._uU(6),t.qZA()(),t.TgZ(7,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMaxHealth(1))}),t._UZ(8,"img",43),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(6),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp0&&n.settingsManager.settings.characterIdentities),t.xp6(3),t.Q6J("ghs-label","game.maxHealth")("ghs-label-attribute","title"),t.xp6(3),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp"),t.qZA()(),t.TgZ(18,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMovement(1))}),t._UZ(19,"img",43),t.qZA(),t.TgZ(20,"a",110),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeAttack(-1))}),t._UZ(21,"img",37),t.qZA(),t.TgZ(22,"span",35),t._UZ(23,"img",72),t.YNc(24,k6,1,2,"span",112),t.YNc(25,ow,2,0,"span",113),t.qZA(),t.TgZ(26,"a",110),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeAttack(1))}),t._UZ(27,"img",43),t.qZA(),t.TgZ(28,"a",110),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeRange(-1))}),t._UZ(29,"img",37),t.qZA(),t.TgZ(30,"span",35),t._UZ(31,"img",73),t.TgZ(32,"span",111),t._uU(33,">"),t.qZA()(),t.TgZ(34,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeRange(1))}),t._UZ(35,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(4),t.Q6J("ngClass",t.VKq(13,qi,n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp==0)),t.xp6(5),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp{var o;class a{constructor(e,i,s,l,m){if((0,_.Z)(this,"data",void 0),(0,_.Z)(this,"changeDetectorRef",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterTitleInput",void 0),(0,_.Z)(this,"objectiveTitleInput",void 0),(0,_.Z)(this,"summonTitleInput",void 0),(0,_.Z)(this,"conditionType",""),(0,_.Z)(this,"levelDialog",!1),(0,_.Z)(this,"health",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"attack",0),(0,_.Z)(this,"movement",0),(0,_.Z)(this,"range",0),(0,_.Z)(this,"bless",0),(0,_.Z)(this,"curse",0),(0,_.Z)(this,"empower",0),(0,_.Z)(this,"enfeeble",0),(0,_.Z)(this,"marker",0),(0,_.Z)(this,"id",0),(0,_.Z)(this,"characterToken",0),(0,_.Z)(this,"characterTokenValues",[]),(0,_.Z)(this,"objectiveDead",!1),(0,_.Z)(this,"entityConditions",[]),(0,_.Z)(this,"entityImmunities",[]),(0,_.Z)(this,"actionHints",[]),(0,_.Z)(this,"titles",[]),(0,_.Z)(this,"empowerChar",void 0),(0,_.Z)(this,"empowerChars",[]),(0,_.Z)(this,"enfeebleChar",void 0),(0,_.Z)(this,"enfeebleChars",[]),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"ConditionName",re.fT),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"OBJECTIV_MARKERS",qe.H4),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"ghsModulo",he.Hy),this.data=e,this.changeDetectorRef=i,this.dialogRef=s,this.dialog=l,this.overlay=m,e.entity instanceof oe.z){this.conditionType="character";for(let O=0;O1&&R.r.settings.characterIdentities){if(this.titles=e.entity.title.split("|"),this.titles.lengthnew vt.aU(O.type,O.value,vt.EF.fixed,O.range?[new vt.aU(vt.Us.range,O.range,vt.EF.fixed,[],!0)]:[]))),this.dialogRef.closed.subscribe({next:O=>{O||this.close()}}),this.empowerChars=d.v.game.figures.filter(O=>O instanceof oe.z&&d.v.entityManager.isAlive(O)&&O.additionalModifier&&O.additionalModifier.find(k=>k.attackModifier&&k.attackModifier.type==Lt.kl.empower)).map(O=>O),this.empowerChars.forEach(O=>{O.active&&(this.empowerChar=O)}),!this.empowerChar&&1==this.empowerChars.length&&(this.empowerChar=this.empowerChars[0]),this.enfeebleChars=d.v.game.figures.filter(O=>O instanceof oe.z&&d.v.entityManager.isAlive(O)&&!O.absent&&O.additionalModifier&&O.additionalModifier.find(k=>k.attackModifier&&k.attackModifier.type==Lt.kl.enfeeble)).map(O=>O),this.enfeebleChars.forEach(O=>{O.active&&(this.enfeebleChar=O)}),!this.enfeebleChar&&1==this.enfeebleChars.length&&(this.enfeebleChar=this.enfeebleChars[0])}keyboardShortcuts(e){!this.levelDialog&&!e.altKey&&!e.metaKey&&(!window.document.activeElement||"INPUT"!=window.document.activeElement.tagName&&"SELECT"!=window.document.activeElement.tagName&&"TEXTAREA"!=window.document.activeElement.tagName)&&(e.ctrlKey||e.shiftKey||"ArrowRight"!==e.key?e.ctrlKey||e.shiftKey||"ArrowLeft"!==e.key?e.ctrlKey||e.shiftKey||"ArrowUp"!==e.key?e.ctrlKey||e.shiftKey||"ArrowDown"!==e.key?e.ctrlKey||"b"!==e.key.toLowerCase()?e.ctrlKey||"c"!==e.key.toLowerCase()?!e.ctrlKey&&!e.shiftKey&&("k"===e.key.toLowerCase()||"d"===e.key.toLowerCase())&&(this.data.entity instanceof oe.z?this.toggleExhausted():this.toggleDead(),e.preventDefault(),e.stopPropagation()):(this.changeCurse(e.shiftKey?-1:1),e.preventDefault(),e.stopPropagation()):(this.changeBless(e.shiftKey?-1:1),e.preventDefault(),e.stopPropagation()):(this.changeMaxHealth(-1),e.preventDefault(),e.stopPropagation()):(this.changeMaxHealth(1),e.preventDefault(),e.stopPropagation()):(this.changeHealth(-1),e.preventDefault(),e.stopPropagation()):(this.changeHealth(1),e.preventDefault(),e.stopPropagation()))}changeHealth(e){this.health+=e,this.data.entity&&this.data.entity.health+this.health>(0,ae.j9)(this.data.entity.maxHealth)+this.maxHp&&(this.health=(0,ae.j9)(this.data.entity.maxHealth)+this.maxHp-this.data.entity.health)}changeExperience(e){this.data.entity instanceof oe.z&&(this.experience+=e,this.data.entity.experience+this.experience<=0&&(this.experience=-this.data.entity.experience))}changeCharacterToken(e,i=-1){this.data.entity instanceof oe.z&&(i<0?(this.characterToken+=e,this.data.entity.token+this.characterToken<=0&&(this.characterToken=-this.data.entity.token)):(this.characterTokenValues[i]+=e,this.data.entity.tokenValues[i]+this.characterTokenValues[i]<=0&&(this.characterTokenValues[i]=-this.data.entity.tokenValues[i])))}changeLoot(e){this.data.entity instanceof oe.z&&(this.loot+=e,this.data.entity.loot+this.loot<=0&&(this.loot=-this.data.entity.loot))}attackModifierDeck(){return d.v.attackModifierManager.byFigure(this.data.figure)}beforeAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,this.data.figure instanceof oe.z?"data.character."+this.data.figure.name:this.data.figure instanceof Ze.Q&&(this.data.figure.isAlly||this.data.figure.isAllied)?"ally":"monster",...e.values)}afterAttackModifierDeck(e){this.attackModifierDeck().merge(e.deck),d.v.stateManager.after()}countAttackModifier(e){return this.attackModifierDeck().cards.filter(i=>i.type==e).length}countUpcomingAttackModifier(e,i=void 0){return this.attackModifierDeck().cards.filter((s,l)=>s.type==e&&l>this.attackModifierDeck().current&&(!i||s.id&&s.id.startsWith(i))).length}countDrawnAttackModifier(e){return this.attackModifierDeck().cards.filter((i,s)=>i.type==e&&s<=this.attackModifierDeck().current).length}changeAttackModifier(e,i){if(i>0){if(e==Lt.kl.bless&&d.v.attackModifierManager.countUpcomingBlesses()>=10)return;if(e==Lt.kl.curse&&d.v.attackModifierManager.countUpcomingCurses(this.data.figure instanceof Ze.Q&&!this.data.figure.isAlly&&!this.data.figure.isAllied)>=10)return;for(let s=0;sl.type==e&&m>this.attackModifierDeck().current);for(;s&&i<0;)this.attackModifierDeck().cards.splice(this.attackModifierDeck().cards.indexOf(s),1),s=this.attackModifierDeck().cards.find((l,m)=>l.type==e&&m>this.attackModifierDeck().current),i++}}changeBless(e){if(this.data.figure instanceof oe.z||this.data.figure instanceof Ze.Q){this.bless+=e;const i=d.v.attackModifierManager.countUpcomingBlesses();this.bless+i>=10?this.bless=10-i:this.bless+i<0&&(this.bless=-i)}}changeCurse(e){if(this.data.figure instanceof oe.z||this.data.figure instanceof Ze.Q){this.curse+=e;const i=d.v.attackModifierManager.countUpcomingCurses(this.data.figure instanceof Ze.Q&&!this.data.figure.isAlly&&!this.data.figure.isAllied);this.curse+i>=10?this.curse=10-i:this.curse+i<0&&(this.curse=-i)}}countEmpower(e=!1){return this.empowerChar?this.empowerChar.additionalModifier.filter(i=>i.attackModifier&&i.attackModifier.type==Lt.kl.empower).map(i=>i.count).reduce((i,s)=>i+s)-(e?0:d.v.attackModifierManager.countUpcomingAdditional(this.empowerChar,Lt.kl.empower)):-1}countEnfeeble(e=!1){return this.enfeebleChar?this.enfeebleChar.additionalModifier.filter(i=>i.attackModifier&&i.attackModifier.type==Lt.kl.enfeeble).map(i=>i.count).reduce((i,s)=>i+s)-(e?0:d.v.attackModifierManager.countUpcomingAdditional(this.enfeebleChar,Lt.kl.enfeeble)):-1}changeEmpower(e){if(this.empowerChar||e<0){this.empower+=e;const i=this.countUpcomingAttackModifier(Lt.kl.empower),s=this.countEmpower();this.empower>=s?this.empower=s:this.empower+i<0&&(this.empower=-i)}else this.dialog.open(K1,{panelClass:"dialog",data:{characters:this.empowerChars,type:Lt.kl.empower}}).closed.subscribe({next:s=>{"number"==typeof s&&-1!=s&&(this.empowerChar=this.empowerChars[s])}})}changeEnfeeble(e){if(this.enfeebleChar||e<0){this.enfeeble+=e;const i=this.countUpcomingAttackModifier(Lt.kl.enfeeble),s=this.countEnfeeble();this.enfeeble>=s?this.enfeeble=s:this.enfeeble+i<0&&(this.enfeeble=-i)}else this.dialog.open(K1,{panelClass:"dialog",data:{characters:this.enfeebleChars,type:Lt.kl.enfeeble}}).closed.subscribe({next:s=>{"number"==typeof s&&-1!=s&&(this.enfeebleChar=this.enfeebleChars[s])}})}hasCondition(e){return null!=d.v.conditions(d.v.game.edition).find(i=>i.name==e)}toggleExhausted(){(this.data.entity instanceof oe.z||this.data.entity instanceof qe.CH)&&(this.data.entity instanceof oe.z?d.v.stateManager.before(this.data.entity.exhausted?"unsetExhausted":"setExhausted","data.character."+this.data.entity.name):d.v.stateManager.before(this.data.entity.exhausted?"unsetObjectiveExhausted":"setObjectiveExhausted",this.data.entity.title||this.data.entity.name),this.exhausted(),d.v.stateManager.after())}exhausted(){(this.data.entity instanceof oe.z||this.data.entity instanceof qe.CH)&&(this.data.entity.exhausted=!this.data.entity.exhausted,this.data.entity.exhausted?(this.data.entity.off=!0,this.data.entity.active=!1):this.data.entity.off=!1)}changeMaxHealth(e){this.maxHp+=e,!(this.data.entity instanceof oe.z)&&!(this.data.entity instanceof qe.CH)&&!(this.data.figure instanceof Nn.k)&&(this.health+=e),this.data.figure instanceof Nn.k?(0,ae.j9)(this.data.figure.health)+this.maxHp<=1&&(this.maxHp=1-(0,ae.j9)(this.data.figure.health)):this.data.entity&&(0,ae.j9)(this.data.entity.maxHealth)+this.maxHp<=1&&(this.maxHp=1-(0,ae.j9)(this.data.entity.maxHealth))}setLevel(e){this.data.entity instanceof oe.z&&(d.v.stateManager.before("setLevel","data.character."+this.data.entity.name,""+e),d.v.characterManager.setLevel(this.data.entity,e),d.v.stateManager.after())}isImmune(e){return!!this.data.entity&&d.v.entityManager.isImmune(this.data.entity,this.data.figure,e)}markers(){return this.data.entity?[...d.v.markers(),...this.data.entity.markers].filter((e,i,s)=>i==s.indexOf(e)):[]}hasMarker(e){return!!this.data.entity&&d.v.entityManager.hasMarker(this.data.entity,e)}toggleCharacterAbsent(){this.data.entity instanceof oe.z&&(this.data.entity.absent||d.v.characterManager.characterCount()>1)&&(d.v.stateManager.before(this.data.entity.absent?"unsetAbsent":"setAbsent","data.character."+this.data.entity.name),this.data.entity.absent=!this.data.entity.absent,this.data.entity.absent&&this.data.entity.active&&d.v.roundManager.toggleFigure(this.data.entity),d.v.stateManager.after())}toggleCharacterMarker(){this.data.entity instanceof oe.z&&(d.v.stateManager.before(this.data.entity.marker?"disableMarker":"enableMarker","data.character."+this.data.entity.name),this.data.entity.marker=!this.data.entity.marker,d.v.stateManager.after())}toggleMarker(e){this.data.entity&&(this.data.entity instanceof In.g?d.v.stateManager.before(this.hasMarker(e)?"removeEntityMarker":"addEntityMarker","data.monster."+this.data.figure.name,""+this.data.entity.number,"data.character."+e.split("-")[1]):this.data.entity instanceof oe.z?d.v.stateManager.before(this.hasMarker(e)?"removeMarker":"addMarker","data.character."+this.data.entity.name,"data.character."+e.split("-")[1]):this.data.entity instanceof Ee.eU?d.v.stateManager.before(this.hasMarker(e)?"removeSummonMarker":"addSummonMarker","data.character."+this.data.figure.name,"data.summon."+this.data.entity.name,"data.character."+e.split("-")[1]):this.data.entity instanceof qe.CH?d.v.stateManager.before(this.hasMarker(e)?"removeObjectiveMarker":"addObjectiveMarker",this.data.entity.title||this.data.entity.name,"data.character."+e.split("-")[1]):this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W&&d.v.stateManager.before(this.hasMarker(e)?"removeObjectiveEntityMarker":"addObjectiveEntityMarker",this.data.figure.title||this.data.figure.name,""+this.data.entity.number,"data.character."+e.split("-")[1]),d.v.entityManager.toggleMarker(this.data.entity,e),d.v.stateManager.after())}toggleSummon(){if(this.data.entity instanceof In.g){let e=Ee.HY.false;this.data.entity.summon==Ee.HY.false?e=Ee.HY.new:this.data.entity.summon==Ee.HY.new&&(e=Ee.HY.true),d.v.stateManager.before("setEntitySummonState","data.monster."+this.data.figure.name,"monster."+this.data.entity.type,""+this.data.entity.number,"summon.state."+e),this.data.entity.summon=e,d.v.stateManager.after()}}changeMonsterEntity(){this.data.figure instanceof Ze.Q&&this.data.entity instanceof In.g&&(d.v.monsterManager.monsterStandeeMax(this.data.figure)>1||this.data.entity.type!=ee.M.boss)&&(this.close(),this.dialog.open(Gd,{panelClass:"dialog",data:{monster:this.data.figure,entity:this.data.entity,change:!0},positionStrategy:this.overlay.position().flexibleConnectedTo(this.data.positionElement).withPositions((0,he.sm)())}),this.dialogRef.close())}toggleDead(){(this.data.entity instanceof In.g||this.data.entity instanceof Ee.eU||this.data.entity instanceof qe.CH||this.data.entity instanceof oa.W)&&this.dead()}dead(){if(this.data.figure instanceof Ze.Q&&this.data.entity instanceof In.g)d.v.stateManager.before("entityDead","data.monster."+this.data.figure.name,"monster."+this.data.entity.type,""+this.data.entity.number),this.data.entity.dead=!0,this.data.figure.entities.every(e=>e.dead)&&this.data.figure.active&&d.v.roundManager.toggleFigure(this.data.figure),setTimeout(()=>{this.data.figure instanceof Ze.Q&&this.data.entity instanceof In.g&&(d.v.monsterManager.removeMonsterEntity(this.data.figure,this.data.entity),d.v.stateManager.after())},R.r.settings.disableAnimations?0:1500);else if(this.data.figure instanceof oe.z&&this.data.entity instanceof Ee.eU)d.v.stateManager.before("summonDead","data.character."+this.data.figure.name,"data.summon."+this.data.entity.name),this.data.entity.dead=!0,setTimeout(()=>{this.data.figure instanceof oe.z&&this.data.entity instanceof Ee.eU&&(d.v.characterManager.removeSummon(this.data.figure,this.data.entity),d.v.stateManager.after())},R.r.settings.disableAnimations?0:1500);else if(this.data.entity instanceof qe.CH)d.v.stateManager.before("removeObjective",this.data.entity.title||this.data.entity.name),d.v.characterManager.removeObjective(this.data.entity),d.v.stateManager.after();else if(this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W){let e=this.data.figure.name;e||(e=this.data.figure.title,e||(e=this.data.figure.escort?"%escort%":"%objective%")),d.v.stateManager.before("objectiveEntityDead",e,""+this.data.entity.number),this.data.entity.dead=!0,this.data.figure.entities.every(i=>i.dead)&&this.data.figure.active&&d.v.roundManager.toggleFigure(this.data.figure),setTimeout(()=>{this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W&&(d.v.objectiveManager.removeObjectiveEntity(this.data.figure,this.data.entity),d.v.stateManager.after())},R.r.settings.disableAnimations||!this.data.figure.entities.some(i=>d.v.entityManager.isAlive(i))?0:1500)}this.dialogRef.close(!0)}changeAttack(e){this.data.entity instanceof Ee.eU&&(this.attack+=e,"number"==typeof this.data.entity.attack&&this.data.entity.attack+this.attack<0&&(this.attack=-this.data.entity.attack))}changeMovement(e){this.data.entity instanceof Ee.eU&&(this.movement+=e,this.data.entity.movement+this.movement<=0&&(this.movement=-this.data.entity.movement))}changeRange(e){this.data.entity instanceof Ee.eU&&(this.range+=e,this.data.entity.range+this.range<=0&&(this.range=-this.data.entity.range))}toggleSummonStatus(){if(this.data.entity instanceof Ee.eU){let e=Ee.HY.new;this.data.entity.state==Ee.HY.new&&(e=Ee.HY.true),d.v.stateManager.before("setSummonState","data.character."+this.data.figure.name,"data.summon."+this.data.entity.name,"summon.state."+e),this.data.entity.state=e,d.v.stateManager.after()}}changeId(e){if(this.data.entity instanceof qe.CH&&(this.id=(0,he.Hy)(this.id+e,12),d.v.game.figures.filter(i=>i instanceof qe.CH).length<12))for(;d.v.game.figures.some(i=>i instanceof qe.CH&&i.id==this.id);)this.id=(0,he.Hy)(this.id+e,12);if(this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W){this.id+=e;let i=this.data.entity.number+this.id;if(i<1?this.id=12-this.data.entity.number:i>12&&(this.id=1-this.data.entity.number),i=this.data.entity.number+this.id,this.data.figure.entities.length<12)for(;this.data.figure.entities.some(s=>s.number==i&&s!=this.data.entity);)this.id+=e,i=this.data.entity.number+this.id,i<1?this.id=12-this.data.entity.number:i>12&&(this.id=1-this.data.entity.number),i=this.data.entity.number+this.id}}changeMarker(e){(this.data.entity instanceof qe.CH||this.data.entity instanceof oa.W)&&(this.marker=(0,he.Hy)(this.marker+e,qe.H4.length))}openLevelDialog(){if(this.levelDialog=!0,this.changeDetectorRef.detectChanges(),this.data.entity instanceof oe.z&&(this.characterTitleInput&&(this.characterTitleInput.nativeElement.value=this.data.entity.title||R.r.getLabel("data.character."+this.data.entity.name.toLowerCase())),this.titles=[],this.data.entity.identities&&this.data.entity.identities.length>1&&R.r.settings.characterIdentities)){if(this.titles=this.data.entity.title.split("|"),this.titles.length0){for(let i=0;i0&&this.data.entity.health<=0||this.data.entity.dead)&&(0==this.data.entity.entityConditions.length||this.data.entity.entityConditions.every(e=>!e.highlight&&-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))&&this.dead())}closeSummon(){this.data.figure instanceof oe.z&&this.data.entity instanceof Ee.eU&&(this.data.entity.init?(d.v.characterManager.removeSummon(this.data.figure,this.data.entity),d.v.stateManager.before("addSummon","data.character."+this.data.figure.name,this.data.entity.name),this.data.entity.init=!1,0!=this.health&&d.v.entityManager.changeHealth(this.data.entity,this.data.figure,this.health),0!=this.attack&&"number"==typeof this.data.entity.attack&&(this.data.entity.attack+=this.attack),0!=this.movement&&(this.data.entity.movement+=this.movement),0!=this.range&&(this.data.entity.range+=this.range),this.maxHp&&((this.data.entity.maxHealth+this.maxHp!e.highlight&&-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))&&this.dead())}showMaxHealth(){return this.data.entity instanceof qe.CH?!isNaN(+this.data.entity.maxHealth)&&(0,ae.j9)(this.data.entity.maxHealth)>0:this.data.figure instanceof Nn.k&&!isNaN(+this.data.figure.health)&&(0,ae.j9)(this.data.figure.health)>0}closeObjective(){if(this.data.entity instanceof qe.CH){this.maxHp&&(d.v.stateManager.before("changeObjectiveMaxHp",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",(0,he.uZ)(this.maxHp)),(+this.data.entity.maxHealth+this.maxHp<(0,ae.j9)(this.data.entity.maxHealth)||this.data.entity.health==(0,ae.j9)(this.data.entity.maxHealth))&&(this.data.entity.health=+this.data.entity.maxHealth+this.maxHp),this.data.entity.maxHealth=+this.data.entity.maxHealth+this.maxHp,d.v.stateManager.after()),0!=this.health&&(d.v.stateManager.before("changeHP",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.data.entity,this.data.figure,this.health),(this.data.entity.health<=0||this.data.entity.exhausted&&this.health>=0&&this.data.entity.health>0)&&(this.data.entity.escort?this.exhausted():d.v.characterManager.removeObjective(this.data.entity)),d.v.stateManager.after(),this.health=0);const e=(0,he.Hy)(this.id+this.data.entity.id,12);e!=this.data.entity.id&&(d.v.stateManager.before("changeObjectiveId",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",""+(e+1)),this.data.entity.id=e,d.v.stateManager.after()),this.id=0,this.data.entity.marker||(this.data.entity.marker="");const i=qe.H4[(0,he.Hy)(this.marker+qe.H4.indexOf(this.data.entity.marker),qe.H4.length)];i!=this.data.entity.marker&&(d.v.stateManager.before("changeObjectiveMarker",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",i),this.data.entity.marker=i,d.v.stateManager.after()),this.marker=0,this.objectiveTitleInput&&(this.objectiveTitleInput.nativeElement.value&&this.objectiveTitleInput.nativeElement.value!=this.data.entity.name?this.data.entity.title!=this.objectiveTitleInput.nativeElement.value&&(d.v.stateManager.before("setTitle",this.data.entity.name,this.objectiveTitleInput.nativeElement.value),this.data.entity.title=this.objectiveTitleInput.nativeElement.value,d.v.stateManager.after()):""!=this.data.entity.title&&(d.v.stateManager.before("unsetTitle",this.data.entity.name||this.data.entity.escort?"escort":"objective",this.data.entity.title),this.data.entity.title="",d.v.stateManager.after()))}}closeObjectiveEntity(){if(this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W){if(this.maxHp){d.v.stateManager.before("changeObjectiveMaxHp",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",(0,he.uZ)(this.maxHp));const s=(0,ae.j9)(this.data.figure.health)+this.maxHp;this.data.figure.health=s,this.data.figure.entities.forEach(l=>{(l.health==l.maxHealth||l.health>s)&&(l.health=s),l.maxHealth=s}),d.v.stateManager.after()}0!=this.health&&(d.v.stateManager.before("changeObjectiveEntityHP",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",""+this.data.entity.number,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.data.entity,this.data.figure,this.health),this.data.entity.health<=0&&d.v.objectiveManager.removeObjectiveEntity(this.data.figure,this.data.entity),d.v.stateManager.after(),this.health=0);const e=this.data.entity.number+this.id;e!=this.data.entity.number&&(d.v.stateManager.before("changeObjectiveEntityNumber",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",""+this.data.entity.number,""+e),this.data.entity.number=e,d.v.stateManager.after()),this.id=0,this.data.entity.marker||(this.data.entity.marker="");const i=qe.H4[(0,he.Hy)(this.marker+qe.H4.indexOf(this.data.entity.marker),qe.H4.length)];i!=this.data.entity.marker&&(d.v.stateManager.before("changeObjectiveEntityMarker",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",""+this.data.entity.number,i),this.data.entity.marker=i,d.v.stateManager.after()),this.marker=0,this.objectiveTitleInput&&(this.objectiveTitleInput.nativeElement.value&&this.objectiveTitleInput.nativeElement.value!=this.data.figure.name?this.data.figure.title!=this.objectiveTitleInput.nativeElement.value&&(d.v.stateManager.before("setTitle",this.data.figure.name,this.objectiveTitleInput.nativeElement.value),this.data.figure.title=this.objectiveTitleInput.nativeElement.value,d.v.stateManager.after()):""!=this.data.figure.title&&(d.v.stateManager.before("unsetTitle",this.data.figure.name||this.data.figure.escort?"escort":"objective",this.data.figure.title),this.data.figure.title="",d.v.stateManager.after()))}}closeAMs(){if(0!=this.bless&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.bless<0?"removeCondition"+(this.bless<-1?"s":""):"addCondition"+(this.bless>1?"s":"")),Lt.kl.bless,""+(this.bless>0?this.bless:-1*this.bless)),this.changeAttackModifier(Lt.kl.bless,this.bless),d.v.stateManager.after(),this.bless=0),0!=this.curse&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.curse<0?"removeCondition"+(this.curse<-1?"s":""):"addCondition"+(this.curse>1?"s":"")),Lt.kl.curse,""+(this.curse>0?this.curse:-1*this.curse)),this.changeAttackModifier(Lt.kl.curse,this.curse),d.v.stateManager.after(),this.curse=0),0!=this.empower&&(this.empowerChar||this.empower<0)){if(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.empower<0?"removeCondition"+(this.empower<-1?"s":""):"addCondition"+(this.empower>1?"s":"")),Lt.kl.empower,""+(this.empower>0?this.empower:-1*this.empower)),this.empowerChar&&this.empower>0){const e=d.v.attackModifierManager.getAdditional(this.empowerChar,Lt.kl.empower);for(let i=0;il>this.attackModifierDeck().current&&s.type==Lt.kl.empower);i&&this.attackModifierDeck().cards.splice(this.attackModifierDeck().cards.indexOf(i),1)}d.v.stateManager.after(),this.empower=0}if(0!=this.enfeeble&&(this.enfeebleChar||this.enfeeble<0)){if(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.enfeeble<0?"removeCondition"+(this.enfeeble<-1?"s":""):"addCondition"+(this.enfeeble>1?"s":"")),Lt.kl.enfeeble,""+(this.enfeeble>0?this.enfeeble:-1*this.enfeeble)),this.enfeebleChar&&this.enfeeble>0){const e=d.v.attackModifierManager.getAdditional(this.enfeebleChar,Lt.kl.enfeeble);for(let i=0;il>this.attackModifierDeck().current&&s.type==Lt.kl.enfeeble);i&&this.attackModifierDeck().cards.splice(this.attackModifierDeck().cards.indexOf(i),1)}d.v.stateManager.after(),this.enfeeble=0}}closeConditions(){this.data.entity&&(this.entityConditions.filter(e=>e.state==re.tT.new||e.state==re.tT.removed).forEach(e=>{this.data.entity&&(e.state==re.tT.new||d.v.entityManager.hasCondition(this.data.entity,e,e.permanent))&&(this.data.entity instanceof oe.z&&e.name==re.fT.muddle&&e.state==re.tT.new&&this.data.entity.progress.equippedItems.find(i=>"gh"==i.edition&&"108"==i.name)&&(e.name=re.fT.strengthen),e.expired=e.state==re.tT.new,d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,e.state==re.tT.removed?"removeCondition":"addCondition"),e.name,this.data.entity instanceof In.g?"monster."+this.data.entity.type+" ":""),e.state==re.tT.removed?d.v.entityManager.removeCondition(this.data.entity,e,e.permanent):d.v.entityManager.addCondition(this.data.entity,e,this.data.figure.active,this.data.figure.off,e.permanent),d.v.stateManager.after())}),this.entityConditions.forEach(e=>{if(this.data.entity){const i=this.data.entity.entityConditions.find(s=>s.name==e.name&&!s.expired);i&&i.value!=e.value&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,"setConditionValue"),e.name,""+e.value,this.data.entity instanceof In.g?"monster."+this.data.entity.type+" ":""),i.value=e.value,d.v.stateManager.after())}}),this.data.entity.immunities.forEach(e=>{this.data.entity&&-1==this.entityImmunities.indexOf(e)&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,"removeImmunity"),e),this.data.entity.immunities=this.data.entity.immunities.filter(i=>i!=e),d.v.stateManager.after())}),this.entityImmunities.forEach(e=>{this.data.entity&&-1==this.data.entity.immunities.indexOf(e)&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,"addImmunity"),e),this.data.entity.immunities.push(e),d.v.stateManager.after())}))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(t.sBO),t.Y36(He),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-entity-menu-dialog"]],viewQuery:function(e,i){if(1&e&&(t.Gf(oO,5),t.Gf(Jf,5),t.Gf(Uf,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.characterTitleInput=s.first),t.iGM(s=t.CRH())&&(i.objectiveTitleInput=s.first),t.iGM(s=t.CRH())&&(i.summonTitleInput=s.first)}},hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(l){return i.keyboardShortcuts(l)},!1,t.evT)},decls:12,vars:10,consts:[[1,"entity-menu-dialog"],[3,"entity","show",4,"ngIf"],[1,"name"],[4,"ngIf"],["class","name",3,"ngClass","click",4,"ngIf"],["class","status-container",4,"ngIf"],["class","level-dialog",4,"ngIf"],[3,"entity","show"],[1,"spacer"],[1,"icon","character-icon",3,"src","click"],[1,"character-title",3,"ngClass"],[1,"absent",3,"src","ghs-label","ghs-label-attribute","click"],[1,"icon",3,"src"],[3,"ghs-label",4,"ngIf"],[3,"ghs-label"],[1,"name",3,"ngClass","click"],["class","standee",3,"src",4,"ngIf"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","standee-number",3,"ngClass",4,"ngIf"],[1,"standee",3,"src"],[1,"ally"],[1,"allied"],[1,"standee-number",3,"ngClass"],[1,"summon-icon"],[3,"src"],[1,"summon-number"],[1,"status-container"],[1,"entity-container"],["class","action-hint",4,"ngFor","ngForOf"],[1,"marker-container"],["class","summon",3,"ngClass","click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"action-hint"],[3,"action","highlight"],[1,"item"],[1,"button",3,"repeat","singleClick"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],[1,"badge","badge-left"],["src","./assets/images/status/health.svg"],[1,"badge","badge-right","health-count",3,"value-sign","hideEmpty"],[1,"button",3,"ngClass","repeat","singleClick"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/status/experience.svg"],[1,"badge","badge-right",3,"value-sign","hideEmpty"],[1,"item","character-token",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/loot.svg"],[1,"badge","badge-left","bless-count"],[1,"condition",3,"ghs-tooltip","originX","overlayX","originY","overlayY","ngClass"],["src","./assets/images/status/bless.svg"],["class","badge badge-center badge-warning",4,"ngIf"],[1,"badge","badge-left","curse-count"],["src","./assets/images/status/curse.svg"],[1,"badge","badge-center","badge-warning"],["src","./assets/images/warning.svg"],[1,"item",3,"ghs-tooltip","originX","overlayX","originY","overlayY"],[1,"badge","badge-left","empower-count"],[1,"condition"],["src","./assets/images/status/empower.svg"],["class","badge badge-character-icon",4,"ngIf"],[1,"badge","badge-character-icon"],[1,"badge","badge-left","enfeeble-count"],["src","./assets/images/status/enfeeble.svg"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"objective-marker"],["src","./assets/images/right.svg",1,"ghs-svg"],[1,"map-marker",3,"ngClass"],[1,"summon-stats-container"],[1,"stat",3,"click"],["src","./assets/images/action/move.svg",1,"ghs-svg"],[3,"value-calc","empty"],["src","./assets/images/action/attack.svg",1,"ghs-svg"],["src","./assets/images/action/range.svg",1,"ghs-svg"],["class","action",4,"ngIf"],[1,"action"],[3,"action"],[1,"summon",3,"ngClass","click"],[1,"item",3,"ngClass","click"],[1,"condition","marker"],[1,"item",3,"ghs-label","ghs-label-attribute","ngClass"],[1,"exhausted",3,"click"],["src","./assets/images/status/exhausted.svg",1,"ghs-svg"],[1,"button",3,"click"],["src","./assets/images/status/dead.svg"],[1,"button","level-button",3,"click"],["src","./assets/images/status/level.svg"],["class","item max-health-container",4,"ngIf"],[1,"item","max-health-container"],["src","./assets/images/status/health.svg",3,"ghs-label","ghs-label-attribute"],[1,"badge","badge-right","max-health"],[3,"entityConditions","immunities","entity","figure","type"],[1,"objective-container"],[1,"title",3,"value"],["objectiveTitle",""],[1,"level-dialog"],[1,"level-container"],["class","item",4,"ngFor","ngForOf"],[1,"char-container"],["class","titles-container",4,"ngIf"],[1,"level",3,"ngClass","click"],["type","text",1,"title",3,"value"],["charactertitle",""],[1,"titles-container"],["class","title-container",4,"ngFor","ngForOf"],[1,"title-container"],["type","text",1,"title",3,"value","change"],[1,"title"],["summonTitle",""],[1,"summon-container"],[1,"button",3,"ngClass","click"],[1,"badge","badge-right",3,"value-calc","empty"],["class","badge badge-right",3,"value-calc","empty",4,"ngIf"],["class","badge badge-right",4,"ngIf"],[1,"badge","badge-right"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ix,1,2,"ghs-entity-index-key",1),t.TgZ(2,"div",2),t.YNc(3,aO,7,8,"ng-container",3),t.YNc(4,sO,6,5,"ng-container",3),t.YNc(5,_6,6,5,"ng-container",3),t.YNc(6,hO,7,8,"div",4),t.YNc(7,Hx,13,9,"ng-container",3),t.qZA(),t.YNc(8,yO,18,15,"div",5),t.YNc(9,nw,5,2,"ng-container",3),t.YNc(10,Hf,5,2,"ng-container",3),t.YNc(11,sw,3,2,"div",6),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.data.entityIndexKey&&i.data.entity),t.xp6(2),t.Q6J("ngIf",i.data.entity&&i.gameManager.isCharacter(i.data.figure)&&i.gameManager.isCharacter(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.data.entity&&i.gameManager.isObjective(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjectiveContainer(i.data.figure)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isMonster(i.data.figure)),t.xp6(1),t.Q6J("ngIf",i.data.entity&&i.gameManager.isCharacter(i.data.figure)&&i.gameManager.isSummon(i.data.entity)),t.xp6(1),t.Q6J("ngIf",!(i.levelDialog||i.gameManager.isCharacter(i.data.figure)&&i.gameManager.toCharacter(i.data.figure).absent)),t.xp6(1),t.Q6J("ngIf",i.data.entity&&i.gameManager.isObjective(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjectiveContainer(i.data.figure)&&i.data.entity&&i.gameManager.isObjectiveEntity(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.levelDialog))},dependencies:[x.mk,x.sg,x.O5,zu,Gr,Gu,ie,ng,An,aa,Ba,Ii,sg],styles:['.entity-menu-dialog[_ngcontent-%COMP%]{position:relative}.entity-menu-dialog[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 44 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.standee[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top-left-radius:30%;border-top-right-radius:30%;height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%]{cursor:pointer}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%]:hover{opacity:.4}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title[_ngcontent-%COMP%]{display:flex;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title.absent[_ngcontent-%COMP%]{text-decoration:line-through}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.absent[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));cursor:pointer;filter:var(--ghs-filter-white)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .change-entity[_ngcontent-%COMP%]{cursor:w-resize}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number.normal[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .summon-icon[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .summon-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .summon-icon[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.25 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));border-bottom-left-radius:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));z-index:1;opacity:.9}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:0;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] small[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .status-container[_ngcontent-%COMP%]{display:flex;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .status-container[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));row-gap:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto}.entity-menu-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.entity-menu-dialog[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%]:hover, .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]:hover{opacity:.4}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.entity-menu-dialog[_ngcontent-%COMP%] .character-token[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 3.25 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-evenly;grid-column:2 span;width:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline);text-align:center}.entity-menu-dialog[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-left[_ngcontent-%COMP%]{left:0}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-right[_ngcontent-%COMP%]{right:0}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-center[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));left:50%;transform:translate(-50%)}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-character-icon[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:40%}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-character-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] input.badge[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * -1.5 * var(--ghs-dialog-factor));min-width:0;border:none;width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));background:transparent}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));row-gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto;grid-column:1/span 3}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item.active[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item.new[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .item.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .action-hint[_ngcontent-%COMP%]{grid-column:span 3;font-size:1.5em}.entity-menu-dialog[_ngcontent-%COMP%] .exhausted[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] .condition.marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.entity-menu-dialog[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));filter:grayscale(70%)}.entity-menu-dialog[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]:after, .entity-menu-dialog[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover:after{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));background-image:url(minus.97c98a810771fceb.svg);background-size:cover}.entity-menu-dialog[_ngcontent-%COMP%] .summon.active[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%;filter:none}.entity-menu-dialog[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%;filter:none}.entity-menu-dialog[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]:hover:after, .entity-menu-dialog[_ngcontent-%COMP%] .summon.active[_ngcontent-%COMP%]:hover:after{content:"";display:none}.entity-menu-dialog[_ngcontent-%COMP%] .summon.active[_ngcontent-%COMP%]:hover{filter:grayscale(70%)}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%]{justify-content:space-evenly!important;width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor))!important}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.2 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red)}.entity-menu-dialog[_ngcontent-%COMP%] .summon-stats-container[_ngcontent-%COMP%]{grid-column:span 3;grid-row:span 2;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:auto}.entity-menu-dialog[_ngcontent-%COMP%] .summon-stats-container[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .summon-stats-container[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .map-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4.7 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .map-marker.empty[_ngcontent-%COMP%]{filter:grayscale(.7)}.entity-menu-dialog[_ngcontent-%COMP%] input.title[_ngcontent-%COMP%]{max-width:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor));margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * 1);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .objective-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .objective-container[_ngcontent-%COMP%] .max-health[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-button[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));display:flex;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%] .titles-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%] .titles-container[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%] .max-health[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{left:50%;transform:translate(-50%,calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)))}']})),a})();function kO(o,a){1&o&&(t.TgZ(0,"span",13),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function TO(o,a){1&o&&(t.TgZ(0,"span",14),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function rw(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1,"["),t._UZ(2,"span",3),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","data.edition."+n.getEdition())}}const ZO=function(o,a){return{current:o,active:a}};function AO(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s))}),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(2,ZO,n==e.gameManager.game.level,n==e.monster.level)),t.xp6(1),t.Oqu(n)}}const T6=function(o,a){return{ally:o,allied:a}};let cw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),(0,_.Z)(this,"gameManager",d.v),this.monster=e,this.dialogRef=i}setLevel(e){this.dialogRef.close(e)}getEdition(){return d.v.getEdition(this.monster)}toggleAlly(){d.v.stateManager.before(this.monster.isAlly?"unsetAlly":"setAlly","data.monster."+this.monster.name),this.monster.isAlly=!this.monster.isAlly,d.v.stateManager.after()}toggleallied(){d.v.stateManager.before(this.monster.isAllied?"unsetallied":"setallied","data.monster."+this.monster.name),this.monster.isAllied=!this.monster.isAllied,d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-level-dialog"]],decls:14,vars:10,consts:[[1,"level-dialog"],[1,"title"],[1,"name"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","edition",4,"ngIf"],[1,"level-container"],[1,"item"],["src","./assets/images/status/level.svg"],[4,"ngFor","ngForOf"],["ghs-pointer-input","",1,"toggle-ally",3,"ngClass","singleClick","doubleClick"],["src","./assets/images/monster/enemy.png"],[1,"ally"],[1,"allied"],[1,"edition"],[1,"level",3,"ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"span",1)(2,"span",2),t._UZ(3,"span",3),t.YNc(4,kO,2,1,"span",4),t.YNc(5,TO,2,1,"span",5),t.YNc(6,rw,4,1,"span",6),t.qZA(),t._UZ(7,"span",3),t.qZA(),t.TgZ(8,"div",7)(9,"span",8),t._UZ(10,"img",9),t.qZA(),t.YNc(11,AO,3,5,"span",10),t.TgZ(12,"span",11),t.NdJ("singleClick",function(){return i.toggleAlly()})("doubleClick",function(){return i.toggleallied()}),t._UZ(13,"img",12),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(1),t.Q6J("ngIf",i.monster.isAlly),t.xp6(1),t.Q6J("ngIf",i.monster.isAllied),t.xp6(1),t.Q6J("ngIf",i.getEdition()),t.xp6(1),t.Q6J("ghs-label","game.level"),t.xp6(4),t.Q6J("ngForOf",i.levels),t.xp6(1),t.Q6J("ngClass",t.WLB(7,T6,i.monster.isAlly,i.monster.isAllied)))},dependencies:[x.mk,x.sg,x.O5,ie,An],styles:['.level-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column}.level-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));text-align:center;width:100%}.level-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover, .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.current[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .max-health[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;display:flex;justify-content:center;align-items:center;z-index:4}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .toggle-ally.ally[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:50%;left:50%;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));transform:translate(-50%,-50%);background-color:var(--ghs-color-red);clip-path:polygon(10% 0,0 10%,40% 50%,0 90%,10% 100%,50% 60%,90% 100%,100% 90%,60% 50%,100% 10%,90% 0,50% 40%)}']})),a})();const Bf=function(o,a){return{closed:o,opened:a}},SO=function(o){return{flipped:o}};let Wd=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"opened",!1),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"forceStats",void 0),this.data=e,this.dialogRef=i,this.monster=e.monster,this.forceStats=e.forceStats}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},1e3)}getBackside(){let e=new Ze.Q(this.monster);return e.boss?d.v.monsterManager.addMonsterEntity(e,1,ee.M.boss):(d.v.monsterManager.addMonsterEntity(e,1,ee.M.normal),d.v.monsterManager.addMonsterEntity(e,1,ee.M.elite)),e.isAlly=this.monster.isAlly,e.isAllied=this.monster.isAllied,e.level=this.monster.level<4?this.monster.level+4:this.monster.level-4,e.errors=this.monster.errors,e}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-stat-dialog"]],decls:9,vars:15,consts:[[1,"stat-dialog",3,"ngClass","click"],[1,"stat-container"],[1,"card-container"],[1,"card","reverse",3,"ngClass"],[1,"card-back"],[3,"monster","noClick","disablePoup","forceStats"],[1,"card-front"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(){return i.close()}),t.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"ghs-monster-stats",5),t.qZA(),t.TgZ(6,"div",6),t._UZ(7,"ghs-monster-stats",5),t.qZA()()()()(),t.TgZ(8,"div",7),t.NdJ("click",function(){return i.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.WLB(10,Bf,!i.opened,i.opened)),t.xp6(3),t.Q6J("ngClass",t.VKq(13,SO,i.opened)),t.xp6(2),t.Q6J("monster",i.getBackside())("noClick",!0)("disablePoup",!0)("forceStats",i.forceStats),t.xp6(2),t.Q6J("monster",i.monster)("noClick",!0)("disablePoup",!0)("forceStats",i.forceStats))},styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.stat-dialog[_ngcontent-%COMP%]{position:relative;width:100vw;height:100vh;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0);z-index:2;overflow:auto;display:flex;justify-content:center;align-items:center;-ms-overflow-style:none;scrollbar-width:none}.stat-dialog[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.stat-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.stat-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.8s}.stat-dialog[_ngcontent-%COMP%] .stat-container[_ngcontent-%COMP%]{overflow:visible;width:100vw;max-width:600px;max-height:100vh}.stat-dialog[_ngcontent-%COMP%] .stat-container[_ngcontent-%COMP%] .card-container[_ngcontent-%COMP%]{width:100%;height:100%;margin:1vh 0}.close-container[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1}"]})),a})();function lw(o,a){1&o&&(t.TgZ(0,"span",11),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function $u(o,a){1&o&&(t.TgZ(0,"span",12),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function gw(o,a){if(1&o&&(t.TgZ(0,"span",13),t._uU(1,"["),t._UZ(2,"span",2),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","data.edition."+n.getEdition())}}function dw(o,a){if(1&o&&(t.TgZ(0,"div",14),t._UZ(1,"ghs-monster-stats",15),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("monster",e.getMonsterForLevel(n))("forceStats",!0)("noClick",!0)}}let zf=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),this.monster=e,this.dialogRef=i,this.dialog=s}getEdition(){return d.v.getEdition(this.monster)}getMonsterForLevel(e){let i=new Ze.Q(this.monster,e);return i.isAlly=this.monster.isAlly,i.isAllied=this.monster.isAllied,i.errors=this.monster.errors,i}toggleAlly(){d.v.stateManager.before(this.monster.isAlly?"unsetAlly":"setAlly","data.monster."+this.monster.name),this.monster.isAlly=!this.monster.isAlly,d.v.stateManager.after()}toggleallied(){d.v.stateManager.before(this.monster.isAllied?"unsetallied":"setallied","data.monster."+this.monster.name),this.monster.isAllied=!this.monster.isAllied,d.v.stateManager.after()}openStatPopup(e){const i=new Ze.Q(this.monster,e);this.dialog.open(Wd,{panelClass:"fullscreen-panel",data:{monster:i,forceStats:!0}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-stats-popup"]],decls:11,vars:7,consts:[[1,"stats-dialog"],[1,"name"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","edition",4,"ngIf"],[1,"menu"],[1,"toggle-ally",3,"ghs-label","click"],[1,"toggle-allied",3,"ghs-label","click"],[1,"stats-container"],["class","stats",4,"ngFor","ngForOf"],[1,"ally"],[1,"allied"],[1,"edition"],[1,"stats"],[3,"monster","forceStats","noClick"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"span",1),t._UZ(2,"span",2),t.YNc(3,lw,2,1,"span",3),t.YNc(4,$u,2,1,"span",4),t.YNc(5,gw,4,1,"span",5),t.qZA(),t.TgZ(6,"div",6)(7,"a",7),t.NdJ("click",function(){return i.toggleAlly()}),t.qZA(),t.TgZ(8,"a",8),t.NdJ("click",function(){return i.toggleallied()}),t.qZA()(),t.TgZ(9,"div",9),t.YNc(10,dw,2,3,"div",10),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(1),t.Q6J("ngIf",i.monster.isAlly),t.xp6(1),t.Q6J("ngIf",i.monster.isAllied),t.xp6(1),t.Q6J("ngIf",i.getEdition()),t.xp6(2),t.Q6J("ghs-label","monster.toggleAlly."+(i.monster.isAlly?"off":"on")),t.xp6(1),t.Q6J("ghs-label","monster.toggleAllied."+(i.monster.isAllied?"off":"on")),t.xp6(2),t.Q6J("ngForOf",i.levels))},styles:[".stats-dialog[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 46 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.stats-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));text-align:center;width:100%}.stats-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;align-items:center}.stats-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-text);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ally[_ngcontent-%COMP%]{text-decoration:line-through}.stats-dialog[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%]{text-align:initial;display:flex;flex-direction:column;align-items:center;margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));max-height:80vh;overflow-y:auto;overflow-x:hidden}.stats-dialog[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:top left}"]})),a})();const EO=["levelButton"];function Z6(o,a){1&o&&t._UZ(0,"div",22)}function hw(o,a){1&o&&t._UZ(0,"div",23)}function A6(o,a){1&o&&(t.TgZ(0,"span",24),t._UZ(1,"span",8),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function uw(o,a){1&o&&(t.TgZ(0,"span",25),t._UZ(1,"span",8),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function S6(o,a){if(1&o&&(t.TgZ(0,"span",26),t._UZ(1,"img",27),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)}}function E6(o,a){if(1&o&&(t.TgZ(0,"span",28),t._uU(1,"["),t._UZ(2,"span",8),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function _w(o,a){1&o&&(t.TgZ(0,"span",29),t._UZ(1,"img",30),t.qZA())}const So=function(o){return{hidden:o}};function D6(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",35),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).range)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/range.svg",t.LSH)}}const I6=function(o,a){return{hidden:o,range:a}},DO=function(o,a){return{hidden:o,bordered:a}};function N6(o,a){if(1&o&&(t.TgZ(0,"div",31)(1,"span",32),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.TgZ(5,"span",32),t._UZ(6,"span",33),t.qZA(),t.TgZ(7,"span",34),t._UZ(8,"img",27),t.qZA(),t.TgZ(9,"span",35),t._UZ(10,"span",33),t.qZA(),t.TgZ(11,"span",34),t._UZ(12,"img",27),t.qZA(),t.YNc(13,D6,5,7,"ng-container",19),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(17,I6,n.hideStats(n.MonsterType.boss),n.hideStats(n.MonsterType.boss)||n.statsForType(n.MonsterType.boss).range)),t.xp6(1),t.Q6J("ngClass",t.VKq(20,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).health)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/hp.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(22,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).movement)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/"+(n.monster.flying?"fly":"move")+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.WLB(24,DO,n.hideStats(n.MonsterType.boss),n.hideStats(n.MonsterType.boss)||n.statsForType(n.MonsterType.boss).range)),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).attack)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/attack.svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.hideStats(n.MonsterType.boss)||n.statsForType(n.MonsterType.boss).range)}}const J6=function(o){return{boss:o}};function pw(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-pointer-input",36),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(1,J6,n.monster.boss))}}function U6(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",40),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.TgZ(5,"span",41),t._UZ(6,"span",33),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(9,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).range)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/range.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(11,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).range)("level",n.monster.level)("empty",!0)}}const L6=function(o){return{range:o}};function Q6(o,a){if(1&o&&(t.TgZ(0,"div",37)(1,"span",38),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.TgZ(5,"span",39),t._UZ(6,"span",33),t.qZA(),t.TgZ(7,"span",38),t._UZ(8,"span",33),t.qZA(),t.TgZ(9,"span",34),t._UZ(10,"img",27),t.qZA(),t.TgZ(11,"span",39),t._UZ(12,"span",33),t.qZA(),t.TgZ(13,"span",40),t._UZ(14,"span",33),t.qZA(),t.TgZ(15,"span",34),t._UZ(16,"img",27),t.qZA(),t.TgZ(17,"span",41),t._UZ(18,"span",33),t.qZA(),t.YNc(19,U6,7,13,"ng-container",19),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(29,L6,n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.elite)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)),t.xp6(1),t.Q6J("ngClass",t.VKq(31,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).health)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/hp.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(33,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).health)("level",n.monster.level)("empty",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(35,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).movement)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/"+(n.monster.flying?"fly":"move")+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(37,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).movement)("level",n.monster.level)("empty",!0),t.xp6(1),t.Q6J("ngClass",t.WLB(39,DO,n.hideStats(n.MonsterType.normal),n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.normal)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).attack)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/attack.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.WLB(42,DO,n.hideStats(n.MonsterType.elite),n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.normal)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).attack)("level",n.monster.level)("empty",!0),t.xp6(1),t.Q6J("ngIf",n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.elite)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)}}function R6(o,a){if(1&o&&(t.TgZ(0,"div",53)(1,"span",54),t._uU(2),t.qZA(),t._UZ(3,"ghs-actions",55),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.hij("",e+1,":"),t.xp6(1),t.Q6J("actions",n)("inline",!0)("statsCalculation",!1)("relative",!0)("right",!0)("hexSize",.5)("monster",i.monster)}}function F6(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH)}}function fw(o,a){if(1&o&&(t.TgZ(0,"div",53)(1,"span",54),t._uU(2),t.qZA(),t._UZ(3,"ghs-actions",58),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.hij("",e+1,":"),t.xp6(1),t.Q6J("actions",n)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("monster",i.monster)}}function q6(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH)}}function r(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",42),t._UZ(2,"div",43),t.TgZ(3,"div",44),t._UZ(4,"ghs-actions",45),t.qZA(),t.YNc(5,R6,4,8,"div",46),t.qZA(),t.TgZ(6,"div",47),t.YNc(7,F6,2,1,"span",48),t.qZA(),t.TgZ(8,"div",49),t._UZ(9,"div",50),t.TgZ(10,"div",44),t._UZ(11,"ghs-actions",51),t.qZA(),t.YNc(12,fw,4,7,"div",46),t.qZA(),t.TgZ(13,"div",52),t.YNc(14,q6,2,1,"span",48),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(25,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("ghs-label",n.statsForType(n.MonsterType.normal).note),t.xp6(2),t.Q6J("actions",n.statsForType(n.MonsterType.normal).actions)("inline",!0)("statsCalculation",!1)("relative",!0)("right",!0)("hexSize",.5)("highlightActions",n.highlightActions)("monster",n.monster),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.normal).special),t.xp6(1),t.Q6J("ngClass",t.VKq(27,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.normal).immunities),t.xp6(1),t.Q6J("ngClass",t.VKq(29,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("ghs-label",n.statsForType(n.MonsterType.elite).note),t.xp6(2),t.Q6J("actions",n.statsForType(n.MonsterType.elite).actions)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("highlightActions",n.highlightActions)("monster",n.monster),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.elite).special),t.xp6(1),t.Q6J("ngClass",t.VKq(31,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.elite).immunities)}}function c(o,a){if(1&o&&(t.TgZ(0,"div",53)(1,"span",54),t._uU(2),t.qZA(),t._UZ(3,"ghs-actions",58),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.hij("",e+1,":"),t.xp6(1),t.Q6J("actions",n)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("monster",i.monster)}}function g(o,a){if(1&o&&(t.TgZ(0,"div",59),t._UZ(1,"div",50),t.TgZ(2,"div",44),t._UZ(3,"ghs-actions",51),t.qZA(),t.YNc(4,c,4,7,"div",46),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(10,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("ghs-label",n.statsForType(n.MonsterType.boss).note),t.xp6(2),t.Q6J("actions",n.statsForType(n.MonsterType.boss).actions)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("highlightActions",n.highlightActions)("monster",n.monster),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.boss).special)}}function u(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH)}}function f(o,a){if(1&o&&(t.TgZ(0,"div",60),t.YNc(1,u,2,1,"span",48),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.boss).immunities)}}const C=function(o,a,n,e){return{boss:o,fh:a,"no-click":n,denied:e}},w=function(o,a){return{"is-ally":o,"is-allied":a}};let T=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"forceStats",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"noClick",!1),(0,_.Z)(this,"disablePoup",!1),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"stats",void 0),(0,_.Z)(this,"eliteStats",void 0),(0,_.Z)(this,"statOverview",!1),(0,_.Z)(this,"highlightActions",[vt.Us.shield,vt.Us.retaliate]),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"catching",!1),(0,_.Z)(this,"levelButton",void 0),this.dialog=e,this.overlay=i,this.element=s}ngOnInit(){this.setStats(),R.r.settings.statAnimations||(this.highlightActions=[]),this.edition=d.v.getEdition(this.monster),this.catching=this.monster.catching&&null!=d.v.game.party.buildings.find(e=>"stables"==e.name&&e.level>0&&"wrecked"!=e.state),d.v.uiChange.subscribe({next:()=>{this.highlightActions=R.r.settings.statAnimations?[vt.Us.shield,vt.Us.retaliate]:[],this.edition=d.v.getEdition(this.monster),this.catching=this.monster.catching&&null!=d.v.game.party.buildings.find(e=>"stables"==e.name&&e.level>0&&"wrecked"!=e.state)}})}hideStats(e){return!this.forceStats&&R.r.settings.hideStats&&this.monster.entities.every(i=>i.dead||i.type!=e)}setStats(){this.monster.boss?this.stats=d.v.monsterManager.getStat(this.monster,ee.M.boss):(this.stats=d.v.monsterManager.getStat(this.monster,ee.M.normal),this.eliteStats=d.v.monsterManager.getStat(this.monster,ee.M.elite))}statsForType(e){let i=this.monster.stats.find(s=>s.level==this.monster.level&&s.type==e);return i||(i=new zr.c(e,this.monster.level,0,0,0,0),this.monster.stats.push(i)),i}setLevel(e){e!=this.monster.level&&(d.v.stateManager.before("setLevel","data.monster."+this.monster.name,""+e),d.v.monsterManager.setLevel(this.monster,e),this.setStats(),d.v.stateManager.after())}openLevelDialog(){this.dialog.open(cw,{panelClass:"dialog",data:this.monster,positionStrategy:this.overlay.position().flexibleConnectedTo(this.levelButton).withPositions((0,he.sm)())}).closed.subscribe({next:i=>{"number"==typeof i&&this.setLevel(i)}})}openStatsPopup(){this.noClick?this.disablePoup||this.dialog.open(Wd,{panelClass:"fullscreen-panel",data:{monster:this.monster,forceStats:this.forceStats}}):this.dialog.open(zf,{panelClass:"dialog",data:this.monster})}openStatPopup(){!this.noClick&&!this.disablePoup&&this.dialog.open(Wd,{panelClass:"fullscreen-panel",data:{monster:this.monster,forceStats:this.forceStats}})}openEntityMenu(e){this.noClick||this.dialog.open($c,{panelClass:"dialog",data:{entity:void 0,figure:this.monster},positionStrategy:this.overlay.position().flexibleConnectedTo(this.element).withPositions((0,he.sm)())})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV),t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-stats"]],viewQuery:function(e,i){if(1&e&&t.Gf(EO,5,t.SBq),2&e){let s;t.iGM(s=t.CRH())&&(i.levelButton=s.first)}},inputs:{monster:"monster",forceStats:"forceStats",relative:"relative",noClick:"noClick",disablePoup:"disablePoup"},decls:23,vars:29,consts:[[1,"stats-container",3,"ngClass"],["card",""],[1,"level",3,"ghs-label","ghs-label-attribute","click"],["levelButton",""],["class","filter-stats normal",4,"ngIf"],["class","filter-stats elite",4,"ngIf"],["ghs-pointer-input","",1,"name-container",3,"singleClick","doubleClick"],[1,"name"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","flying",4,"ngIf"],["class","edition",4,"ngIf"],["class","catching",4,"ngIf"],[1,"toggle-ally",3,"ngClass"],["src","./assets/images/monster/enemy.png"],["class","stats boss",3,"ngClass",4,"ngIf"],["class","entity-menu",3,"ngClass","singleClick",4,"ngIf"],["class","stats",3,"ngClass",4,"ngIf"],[4,"ngIf"],["class","extra boss",3,"ngClass",4,"ngIf"],["class","immunities boss",3,"ngClass",4,"ngIf"],[1,"filter-stats","normal"],[1,"filter-stats","elite"],[1,"ally"],[1,"allied"],[1,"flying"],[3,"src"],[1,"edition"],[1,"catching"],["src","./assets/images/fh/catching.svg",1,"ghs-svg"],[1,"stats","boss",3,"ngClass"],[1,"stat","boss","bordered",3,"ngClass"],[1,"value",3,"value-calc","level","empty"],[1,"stat-icon"],[1,"stat","boss",3,"ngClass"],[1,"entity-menu",3,"ngClass","singleClick"],[1,"stats",3,"ngClass"],[1,"stat","normal","bordered",3,"ngClass"],[1,"stat","elite","bordered",3,"ngClass"],[1,"stat","normal",3,"ngClass"],[1,"stat","elite",3,"ngClass"],[1,"extra","normal",3,"ngClass"],[1,"notes",3,"ghs-label"],[1,"additional"],[3,"actions","inline","statsCalculation","relative","right","hexSize","highlightActions","monster"],["class","specials",4,"ngFor","ngForOf"],[1,"immunities","normal",3,"ngClass"],["class","immunity",4,"ngFor","ngForOf"],[1,"extra","elite",3,"ngClass"],[1,"notes","text-white",3,"ghs-label"],[3,"actions","inline","statsCalculation","relative","hexSize","highlightActions","monster"],[1,"immunities","elite",3,"ngClass"],[1,"specials"],[1,"special"],[3,"actions","inline","statsCalculation","relative","right","hexSize","monster"],[1,"immunity"],[1,"icon",3,"src"],[3,"actions","inline","statsCalculation","relative","hexSize","monster"],[1,"extra","boss",3,"ngClass"],[1,"immunities","boss",3,"ngClass"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0,1)(2,"div",2,3),t.NdJ("click",function(){return i.openLevelDialog()}),t._uU(4),t.qZA(),t.YNc(5,Z6,1,0,"div",4),t.YNc(6,hw,1,0,"div",5),t.TgZ(7,"div",6),t.NdJ("singleClick",function(){return i.openStatsPopup()})("doubleClick",function(){return i.openStatPopup()}),t.TgZ(8,"span",7),t._UZ(9,"span",8),t.YNc(10,A6,2,1,"span",9),t.YNc(11,uw,2,1,"span",10),t.qZA(),t.YNc(12,S6,2,1,"span",11),t.YNc(13,E6,4,1,"span",12),t.YNc(14,_w,2,0,"span",13),t.qZA(),t.TgZ(15,"span",14),t._UZ(16,"img",15),t.qZA(),t.YNc(17,N6,14,27,"div",16),t.YNc(18,pw,1,3,"ghs-pointer-input",17),t.YNc(19,Q6,20,45,"div",18),t.YNc(20,r,15,33,"ng-container",19),t.YNc(21,g,5,12,"div",20),t.YNc(22,f,2,4,"div",21),t.qZA()),2&e){const s=t.MAs(1);t.Udp("font-size",.03*s.offsetWidth+"px"),t.Q6J("ngClass",t.l5B(21,C,i.monster.boss,i.settingsManager.settings.fhStyle,i.noClick,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.monsterPermissions[i.monster.name+"|"+i.monster.edition])),t.xp6(2),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij("",i.monster.level," "),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.hideStats(i.MonsterType.normal)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.hideStats(i.MonsterType.elite)),t.xp6(3),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(1),t.Q6J("ngIf",i.monster.isAlly),t.xp6(1),t.Q6J("ngIf",i.monster.isAllied),t.xp6(1),t.Q6J("ngIf",i.monster.flying),t.xp6(1),t.Q6J("ngIf",i.edition),t.xp6(1),t.Q6J("ngIf",i.catching),t.xp6(1),t.Q6J("ngClass",t.WLB(26,w,i.monster.isAlly,i.monster.isAllied)),t.xp6(2),t.Q6J("ngIf",i.monster.boss),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.gameManager.gameplayFigure(i.monster)),t.xp6(1),t.Q6J("ngIf",!i.monster.boss),t.xp6(1),t.Q6J("ngIf",!i.monster.boss),t.xp6(1),t.Q6J("ngIf",i.monster.boss),t.xp6(1),t.Q6J("ngIf",i.monster.boss)}},dependencies:[x.mk,x.sg,x.O5,ag,ie,ng,An],styles:['.stats-container[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;display:flex;border-radius:1em}.stats-container[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{transition:opacity 1s ease-in-out}.stats-container[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{opacity:0}.stats-container[_ngcontent-%COMP%]:before{content:" ";position:absolute;width:100%;height:100%;background-image:url(standard.6c0bb378c65c9245.png);background-position:top;background-size:100% auto;background-repeat:no-repeat;border-radius:1em;z-index:0}.stats-container[_ngcontent-%COMP%]:after{content:" ";position:absolute;width:100%;height:100%;background-image:url(standard_repeat.40e23c6c9521de3d.png);background-position:top;background-size:100% auto;background-repeat:repeat-y;border-radius:1em;z-index:-1}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]{position:absolute;top:.4em;right:1.8em;width:11.3em;display:flex;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:2.1em;filter:drop-shadow(.1em .1em .1em var(--ghs-color-black));text-align:left;white-space:nowrap;overflow:auto;z-index:4;-ms-overflow-style:none;scrollbar-width:none}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{margin-left:.1em}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:auto;margin-left:.3em}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .catching[_ngcontent-%COMP%]{position:absolute;right:1em;top:50%;width:1.2em;height:auto;filter:var(--ghs-filter-white);transform:translateY(-50%)}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]:hover{cursor:pointer;color:var(--ghs-color-gray)}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]:hover .flying[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]:hover .catching[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.stats-container[_ngcontent-%COMP%] .entity-menu[_ngcontent-%COMP%]{position:absolute;inset:0 38%;z-index:3}.stats-container[_ngcontent-%COMP%] .entity-menu.boss[_ngcontent-%COMP%]{left:25%;right:55%}.stats-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%]{position:absolute;top:.2em;right:.8em;height:3.4em;width:2.4em;cursor:pointer;display:flex;justify-content:center;align-items:center;z-index:4}.stats-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.stats-container[_ngcontent-%COMP%] .toggle-ally.is-ally[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:.5em .1em;background-color:var(--ghs-color-red);clip-path:polygon(10% 0,0 10%,40% 50%,0 90%,10% 100%,50% 60%,90% 100%,100% 90%,60% 50%,100% 10%,90% 0,50% 40%)}.stats-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{position:absolute;top:.2em;left:.7em;font-family:ghs-title;font-size:3em;text-shadow:var(--ghs-outline);color:var(--ghs-color-gray);cursor:pointer;z-index:4}.stats-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover, .stats-container[_ngcontent-%COMP%] .level.active-button[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{position:absolute;top:4.8em;left:16.5em;width:8.4em;height:11.4em;display:grid;grid-template-columns:50% 0 50%;grid-template-rows:repeat(3,33%);filter:drop-shadow(.01em .01em .01em var(--ghs-color-black));z-index:1;transform:translate(-50%)}.stats-container[_ngcontent-%COMP%] .stats.boss[_ngcontent-%COMP%]{top:5.2em;left:9.6em;grid-template-columns:8em 0}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{position:relative;font-size:2.4em;line-height:1.7em;padding-top:0;width:100%;display:flex}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:block;width:100%;white-space:nowrap;overflow-x:auto;overflow-y:hidden}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.normal[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.boss[_ngcontent-%COMP%]{justify-self:end;justify-content:flex-end;filter:drop-shadow(.01em .01em .01em var(--ghs-color-white));padding-right:.8em}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.normal[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.boss[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{text-align:right}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.normal.bordered[_ngcontent-%COMP%]:before, .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.boss.bordered[_ngcontent-%COMP%]:before{content:" ";position:absolute;bottom:0;right:0;height:1px;width:100%;background:linear-gradient(to right,transparent,var(--ghs-color-darkred))}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.elite[_ngcontent-%COMP%]{justify-self:start;color:var(--ghs-color-white);filter:drop-shadow(.01em .01em .01em var(--ghs-color-black));padding-left:.8em}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.elite.bordered[_ngcontent-%COMP%]:before{content:" ";position:absolute;bottom:0;left:0;height:1px;width:100%;background:linear-gradient(to right,var(--ghs-color-white),transparent)}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%]{position:relative;justify-self:center;align-self:center;width:2.5em;height:2.5em;display:flex;justify-content:center;align-items:center;z-index:1}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:50%;left:50%;width:2em;height:2em;background-color:var(--ghs-color-darkgray);border:.25em solid var(--ghs-color-white);z-index:1;transform:translate(-50%,-50%) rotate(45deg);filter:var(--ghs-filter-outline-thin)}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);height:1.4em;width:auto;z-index:2}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%]{grid-template-rows:repeat(4,25%)}.stats-container[_ngcontent-%COMP%] .stats.range.boss[_ngcontent-%COMP%]{top:29%}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{line-height:1.3em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat.normal[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat.boss[_ngcontent-%COMP%]{padding-right:.7em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat.elite[_ngcontent-%COMP%]{padding-left:.6em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%]:before{width:1.4em;height:1.4em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em}.stats-container.boss[_ngcontent-%COMP%]:before{background-image:url(boss.1798cff24c4bb013.png)}.stats-container.boss[_ngcontent-%COMP%]:after{background-image:url(boss_repeat.40e23c6c9521de3d.png)}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%]{position:relative;margin-top:3em;padding-bottom:.4em;width:7.5em;display:flex;flex-direction:column;font-size:1.6em;min-height:8.2em;z-index:2;overflow:auto}.stats-container[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%]{left:0;text-align:right}.stats-container[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{justify-content:end}.stats-container[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{filter:drop-shadow(.01em .01em .01em var(--ghs-color-gray))}.stats-container[_ngcontent-%COMP%] .extra.elite[_ngcontent-%COMP%]{left:5.6em;color:var(--ghs-color-white)}.stats-container[_ngcontent-%COMP%] .extra.boss[_ngcontent-%COMP%]{width:10.7em;height:auto;left:10em;color:var(--ghs-color-white)}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .notes[_ngcontent-%COMP%]{margin-top:2.3%;line-height:.8em;filter:drop-shadow(.01em .01em .01em var(--ghs-color-black))}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials[_ngcontent-%COMP%]{display:flex;align-items:baseline;font-size:calc(1em * var(--ghs-fontsize))}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]:first-child, .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]:first-child{margin-top:2.3%}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional.specials[_ngcontent-%COMP%] .special[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials.specials[_ngcontent-%COMP%] .special[_ngcontent-%COMP%]{margin-right:.5%}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%]{position:absolute;top:5.6em;left:1.4em;display:grid;justify-items:center;align-items:center;grid-template-columns:repeat(5,2.25em);grid-template-rows:repeat(8,1.125em);column-gap:.4em;row-gap:.2em}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]{position:relative;display:block;width:2.25em;height:2.25em}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(1){grid-column:1;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(2){grid-column-start:1;grid-column-end:3;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(3){grid-column:2;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(4){grid-column-start:2;grid-column-end:4;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(5){grid-column-start:1;grid-column-end:3;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(6){grid-column:2;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(7){grid-column-start:2;grid-column-end:4;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(8){grid-column:3;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(9){grid-column-start:2;grid-column-end:4;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(10){grid-column:3;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(11){grid-column-start:3;grid-column-end:5;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(12){grid-column-start:3;grid-row:1;grid-column-end:5}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(5){grid-column:3;grid-row:6}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(6){grid-column-start:3;grid-column-end:5;grid-row:7}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(7){grid-column-start:1;grid-column-end:3;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(8){grid-column:2;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(9){grid-column-start:2;grid-column-end:4;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(10){grid-column:3;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(11){grid-column-start:3;grid-column-end:5;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(12){grid-column:4;grid-row:6}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%]{left:initial;right:1.4em}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(1){grid-column:5;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(2){grid-column-start:4;grid-column-end:6;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(3){grid-column:4;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(4){grid-column-start:3;grid-column-end:5;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(5){grid-column:3;grid-row:6}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(6){grid-column-start:2;grid-column-end:4;grid-row:7}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(7){grid-column-start:4;grid-column-end:6;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(8){grid-column:4;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(9){grid-column-start:3;grid-column-end:5;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(10){grid-column:3;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(11){grid-column-start:2;grid-column-end:4;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(12){grid-column:2;grid-row:6}.stats-container.no-click[_ngcontent-%COMP%] .level[_ngcontent-%COMP%], .stats-container.no-click[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%]{pointer-events:none}.stats-container.no-click[_ngcontent-%COMP%] .entity-menu[_ngcontent-%COMP%]{display:none}.stats-container[_ngcontent-%COMP%] .filter-stats[_ngcontent-%COMP%]{display:none;position:absolute;inset:0;background-color:var(--ghs-color-darkgray);opacity:.4;z-index:3}.stats-container[_ngcontent-%COMP%] .filter-stats.normal[_ngcontent-%COMP%]{right:50%}.stats-container[_ngcontent-%COMP%] .filter-stats.elite[_ngcontent-%COMP%]{left:50%;right:0}.stats-editor[_nghost-%COMP%] .extra[_ngcontent-%COMP%], .stats-editor[_nghost-%COMP%] .name-container[_ngcontent-%COMP%]{display:none!important}']})),a})();var J=E(5861);var ot=E(7866);class ft{constructor(a,n,e=!1,i=-1,s="",l=[],m=void 0){(0,_.Z)(this,"id",void 0),(0,_.Z)(this,"marker",void 0),(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"health",void 0),(0,_.Z)(this,"escort",void 0),(0,_.Z)(this,"initiative",void 0),(0,_.Z)(this,"actions",[]),(0,_.Z)(this,"allyDeck",!1),(0,_.Z)(this,"tags",[]),this.name=a,this.health=n,this.escort=e,this.id=i,this.marker=s,this.tags=l,this.initiative=m}}var Pt=E(3306),At=E(301);const zt=function(o){return{disabled:o}};function ne(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",5)(1,"label"),t._UZ(2,"span",2),t.qZA(),t.TgZ(3,"select",null,6)(5,"option",7),t._UZ(6,"span",2),t.qZA(),t.TgZ(7,"option",8),t._UZ(8,"span",2),t.qZA(),t.TgZ(9,"option",9),t._UZ(10,"span",2),t.qZA(),t.TgZ(11,"option",10),t._UZ(12,"span",2),t.qZA(),t.TgZ(13,"option",11),t._UZ(14,"span",2),t.qZA(),t.TgZ(15,"option",12),t._UZ(16,"span",2),t.qZA()(),t._UZ(17,"p",13)(18,"p",13)(19,"label",2)(20,"textarea",null,14),t.TgZ(22,"p",15),t._uU(23,"Please write in English or German / Bitte in Englisch oder Deutsch verfassen!"),t.qZA(),t.TgZ(24,"div",16)(25,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.downloadDataDump())}),t._UZ(26,"span",2),t.qZA(),t.TgZ(27,"a",18),t._UZ(28,"span",2),t.qZA()()()}if(2&o){const n=t.MAs(4),e=t.MAs(21),i=t.oxw();t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type"),t.xp6(4),t.Q6J("ghs-label","tools.feedback.reportIssue.type.abilityCard"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.monsterStat"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.characterStat"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.artwork"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.software"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.feedback"),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.type."+n.value+".hint"),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.specify"),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.text"),t.xp6(7),t.Q6J("ghs-label","tools.feedback.reportIssue.download"),t.xp6(1),t.Q6J("ngClass",t.VKq(14,zt,!e.value))("href",i.issueMail(n.value,e.value),t.LSH),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.send")}}const _e=function(o){return{active:o}};let ye=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"form","issue")}scenarioMail(e,i,s){let l="mailto:scenario@gloomhaven-secretariat.de",m=new At.tR;return m.name=e,m.index=i,m.monsters=d.v.game.figures.filter(O=>O instanceof Ze.Q).map(O=>O.name),m.allies=d.v.game.figures.filter(O=>O instanceof Ze.Q&&O.isAlly).map(O=>O.name),m.allied=d.v.game.figures.filter(O=>O instanceof Ze.Q&&O.isAllied).map(O=>O.name),m.drawExtra=d.v.game.figures.filter(O=>O instanceof Ze.Q&&O.drawExtra).map(O=>O.name),m.objectives=d.v.game.figures.filter(O=>O instanceof qe.CH||O instanceof Nn.k).map(O=>{if(O instanceof qe.CH||O instanceof Nn.k){if(O.objectiveId){const k=d.v.objectiveDataByScenarioObjectiveIdentifier(O.objectiveId);if(k)return k}if(O instanceof qe.CH)return new ft(O.name,O.maxHealth,O.escort,O.id,O.marker,O.tags,O.initiative);if(O instanceof Nn.k)return new ft(O.name,O.health,O.escort,-1,O.marker,[],O.initiative)}return new ft(O.name,0,!1)}),m.rooms=d.v.game.scenario?.rooms||[],m.marker=d.v.game.scenario?.marker||"",m.rules=d.v.game.scenario?.rules||[],m.edition=d.v.game.scenario?.edition||d.v.currentEdition(),l+="?subject=Submit Scenario #"+m.index+" "+m.name+" ("+R.r.getLabel("data.edition."+m.edition)+")",l+="&body="+s+"%0D%0A%0D%0AJSON:%0D%0A"+JSON.stringify(m,void 0,2),l}issueMail(e,i){let s="mailto:issue@gloomhaven-secretariat.de";return s+="?subject=[GHS v0.80.1] "+R.r.getLabel("tools.feedback.reportIssue.type."+e+".subject"),s+="&body="+R.r.getLabel("tools.feedback.reportIssue.type."+e+".hint")+"%0D%0A%0D%0A"+i,s}downloadDataDump(){return(0,J.Z)(function*(){try{let e=yield Pt.j.datadump(),i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-data-dump.json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}catch{console.warn("Could not read datadump")}})()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-feedback-dialog"]],decls:6,vars:6,consts:[[1,"feedback-dialog"],[3,"ngClass","click"],[3,"ghs-label"],["class","form issue-form",4,"ngIf"],["href","https://github.com/Lurkars/gloomhavensecretariat/issues/new/choose","target","_blank"],[1,"form","issue-form"],["issueType",""],["value","abilityCard"],["value","monsterStat"],["value","characterStat"],["value","artwork"],["value","software"],["value","feedback"],[1,"hint",3,"ghs-label"],["issuerText",""],[1,"hint"],[1,"buttons"],[1,"button",3,"click"],[1,"button",3,"ngClass","href"]],template:function(e,i){1&e&&(t.TgZ(0,"span",0)(1,"a",1),t.NdJ("click",function(){return i.form="issue"}),t._UZ(2,"span",2),t.qZA(),t.YNc(3,ne,29,16,"div",3),t.TgZ(4,"a",4),t._UZ(5,"span",2),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.VKq(4,_e,"issue"==i.form)),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue"),t.xp6(1),t.Q6J("ngIf","issue"==i.form),t.xp6(2),t.Q6J("ghs-label","tools.feedback.githubIssue"))},dependencies:[x.mk,x.O5,wo,ko,ie],styles:[".feedback-dialog[_ngcontent-%COMP%]{font-size:150%;display:flex;flex-direction:column;padding:.5em}.feedback-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}.feedback-dialog[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-weight:700;pointer-events:none;text-decoration:none}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;align-items:center;justify-items:start;column-gap:.5em;row-gap:.5em}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-gray);display:flex}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{grid-column:2;padding:0;margin:0;font-family:var(--ghs-font-text);font-size:.7em;color:var(--ghs-color-gray);opacity:.9}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 65 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor));max-width:60vw}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;grid-column:span 2;place-self:end;padding:.3em .7em;border-radius:.5em;background-color:var(--ghs-color-darkgray);color:var(--ghs-color-white);text-decoration:none;font-family:var(--ghs-font-title)}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.8}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray);opacity:.8}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;grid-column:span 2;place-self:end}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin:0 .5em}"]})),a})(),Kt=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"active",!1),this.el=e}ngOnChanges(e){e.active&&e.active.currentValue&&e.active.currentValue!=e.active.previousValue&&setTimeout(()=>{this.el.nativeElement.scrollIntoView({behavior:R.r.settings.disableAnimations?"auto":"smooth",block:"center",inline:"center"})},5)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","autoscroll",""]],inputs:{active:["autoscroll","active"]},features:[t.TTD]})),a})(),Ge=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"block","center"),(0,_.Z)(this,"inline","center"),(0,_.Z)(this,"active",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{setTimeout(()=>{R.r.settings.autoscroll&&!this.active&&this.figure.active&&this.el.nativeElement.scrollIntoView({behavior:R.r.settings.disableAnimations?"auto":"smooth",block:this.block,inline:this.inline}),this.active=this.figure.active},R.r.settings.disableAnimations?5:300)}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","figure-autoscroll",""]],inputs:{figure:["figure-autoscroll","figure"],block:"block",inline:"inline"}})),a})();function gn(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moreRedos())}),t._UZ(1,"span",3),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","state.loadMore"))}function Hn(o,a){if(1&o&&(t._UZ(0,"span",27),t.ALo(1,"slice")),2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ghs-label","state.info."+e.getRedoInfo(n)[0])("ghs-label-args",t.Dn7(1,3,e.getRedoInfo(n),1,e.getRedoInfo(n).length))("ghs-label-empty",!0)}}const Xi=function(o){return[o]};function ir(o,a){if(1&o&&(t.TgZ(0,"span",28),t._UZ(1,"img",29)(2,"span",30),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+(e.getRedoRevision(n)-e.getRedoRevision(n-1)-1)))}}const Wc=function(o,a){return{confirm:o,disabled:a}};function Gf(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.redo(s))})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelConfirm())}),t.TgZ(2,"span",12),t._uU(3),t.qZA(),t.YNc(4,Hn,2,7,"span",25),t._UZ(5,"span",14),t.TgZ(6,"span",15),t._uU(7),t.qZA()(),t.YNc(8,ir,3,4,"span",26),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(7,Wc,e.undoConfirm=="redo-"+n,!e.gameManager.stateManager.redoPermission)),t.xp6(2),t.hij("",e.getRedoRevision(n)+1,"."),t.xp6(1),t.Q6J("ngIf",e.getRedoInfo(n).length>0),t.xp6(3),t.lnq("",e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revision," - ",e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revisionOffset," - ",e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revision-e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revisionOffset,""),t.xp6(1),t.Q6J("ngIf",n>0&&e.getRedoRevision(n)-e.getRedoRevision(n-1)!=1)}}function mw(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.gameOffsetWarning=!1)}),t._UZ(1,"img",29)(2,"span",30),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+n.undoOffset))}}function vw(o,a){if(1&o&&(t.TgZ(0,"span",28),t._UZ(1,"img",29)(2,"span",30),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+(e.gameManager.game.revision-e.gameManager.game.revisionOffset-e.getUndoRevision(n)-1)))}}function AZ(o,a){if(1&o&&(t.TgZ(0,"span",28),t._UZ(1,"img",29)(2,"span",30),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+(e.getUndoRevision(n+1)-e.getUndoRevision(n)-1)))}}function SZ(o,a){if(1&o&&(t._UZ(0,"span",27),t.ALo(1,"slice")),2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ghs-label","state.info."+e.getUndoInfo(n)[0])("ghs-label-args",t.Dn7(1,3,e.getUndoInfo(n),1,e.getUndoInfo(n).length))("ghs-label-empty",!0)}}function EZ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,vw,3,4,"span",26),t.YNc(2,AZ,3,4,"span",26),t.TgZ(3,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.undo(s))})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelConfirm())}),t.TgZ(4,"span",12),t._uU(5),t.qZA(),t.YNc(6,SZ,2,7,"span",25),t._UZ(7,"span",14),t.TgZ(8,"span",15),t._uU(9),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",!e.undoOffset&&n==e.undoArray.length-1&&e.gameManager.game.revision-e.gameManager.game.revisionOffset-e.getUndoRevision(n)-1),t.xp6(1),t.Q6J("ngIf",n0),t.xp6(3),t.lnq("",e.gameManager.stateManager.undos[n].revision," - ",e.gameManager.stateManager.undos[n].revisionOffset," - ",e.gameManager.stateManager.undos[n].revision-e.gameManager.stateManager.undos[n].revisionOffset,"")}}function DZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",32),t.NdJ("inViewportAction",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moreUndos())})("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moreUndos())}),t._UZ(1,"span",3),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","state.loadMore"))}function IZ(o,a){1&o&&t._UZ(0,"span")}const H6=function(o,a){return{disabled:o,confirm:a}};function NZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",33),t.NdJ("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm="")})("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.clearUndos())}),t._UZ(1,"span",3),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,H6,!n.gameManager.stateManager.undoPermission,"clearUndos"==n.confirm)),t.xp6(1),t.Q6J("ghs-label","state.clear.undos"),t.xp6(1),t.Oqu("clearUndos"==n.confirm?"!":"?")}}function JZ(o,a){1&o&&(t.TgZ(0,"span",4),t._uU(1,"|"),t.qZA())}function UZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",33),t.NdJ("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm="")})("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.clearRedos())}),t._UZ(1,"span",3),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,H6,!n.gameManager.stateManager.redoPermission,"clearRedos"==n.confirm)),t.xp6(1),t.Q6J("ghs-label","state.clear.redos"),t.xp6(1),t.Oqu("clearRedos"==n.confirm?"!":"?")}}const j6=function(o){return{disabled:o}},LZ=function(o,a){return{"has-undos":o,"has-redos":a}};let QZ=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"undoOffset",0),(0,_.Z)(this,"confirm",""),(0,_.Z)(this,"undoArray",[]),(0,_.Z)(this,"redoArray",[]),(0,_.Z)(this,"undoConfirm",""),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=e,this.dialogRef.overlayRef.hostElement.style.zIndex="3000",this.dialogRef.overlayRef.backdropElement&&(this.dialogRef.overlayRef.backdropElement.style.zIndex="3000")}ngOnInit(){this.undoOffset=d.v.stateManager.undos.length>0?d.v.game.revision-(d.v.game.revisionOffset||0)-this.getUndoRevision(d.v.stateManager.undos.length-1)-1:0,this.undoArray=Array.from({length:Math.min(10,d.v.stateManager.undos.length)}).map((e,i)=>d.v.stateManager.undos.length-i-1),this.redoArray=Array.from({length:Math.min(10,d.v.stateManager.redos.length)}).map((e,i)=>Math.min(10,d.v.stateManager.redos.length)-i-1),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.undoOffset=d.v.stateManager.undos.length>0?d.v.game.revision-(d.v.game.revisionOffset||0)-this.getUndoRevision(d.v.stateManager.undos.length-1)-1:0,this.undoArray=Array.from({length:Math.min(10,d.v.stateManager.undos.length)}).map((e,i)=>d.v.stateManager.undos.length-i-1),this.redoArray=Array.from({length:Math.min(10,d.v.stateManager.redos.length)}).map((e,i)=>Math.min(10,d.v.stateManager.redos.length)-i-1)}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}moreUndos(){this.undoArray.lengthd.v.stateManager.undos.length-i-1))}moreRedos(){if(this.redoArray.lengthe-s-1)}}getUndoInfo(e){let i=[];return d.v.stateManager.undos.length>0&&d.v.stateManager.undoInfos.length>=d.v.stateManager.undos.length&&e>=0&&e1&&"serverSync"==i[0]?i="setInitiative"==i[1]&&i.length>3?["serverSync",R.r.getLabel("state.info."+i[1],[i[2],""])]:["serverSync",R.r.getLabel("state.info."+i[1],i.slice(2))]:i&&1==i.length&&"serverSync"==i[0]?i=["serverSync",""]:i||(i=["unknown"])),i}getRedoInfo(e){let i=[];return d.v.stateManager.redos.length>0&&d.v.stateManager.undoInfos.length>=d.v.stateManager.undos.length+d.v.stateManager.redos.length&&e>=0&&e1&&"serverSync"==i[0]?i="setInitiative"==i[1]&&i.length>3?["serverSync",R.r.getLabel("state.info."+i[1],[i[2],""])]:["serverSync",R.r.getLabel("state.info."+i[1],i.slice(2))]:i&&1==i.length&&"serverSync"==i[0]?i=["serverSync",""]:i||(i=["unknown"])),i}getUndoRevision(e){const i=d.v.stateManager.undos;return i[e].revision-(i[e].revisionOffset||0)}getRedoRevision(e){const i=d.v.stateManager.redos,s=i.length-e-1;return i[s].revision-(i[s].revisionOffset||0)}undo(e,i=!1){i||this.undoConfirm=="undo-"+e?d.v.stateManager.fixedUndo(this.undoArray.length-e):this.undoConfirm="undo-"+e}redo(e,i=!1){i||this.undoConfirm=="redo-"+e?d.v.stateManager.fixedRedo(e+1):this.undoConfirm="redo-"+e}cancelConfirm(){this.undoConfirm=""}clearUndos(){"clearUndos"!=this.confirm?this.confirm="clearUndos":(this.undoArray=[],this.undoOffset=0,d.v.stateManager.clearUndos())}clearRedos(){"clearRedos"!=this.confirm?this.confirm="clearRedos":(this.redoArray=[],d.v.stateManager.clearRedos())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-undo-dialog"]],decls:30,vars:27,consts:[[1,"undo-dialog"],[1,"menu"],[1,"state","undo",3,"ngClass","click"],[3,"ghs-label"],[1,"separator"],[1,"state","redo",3,"ngClass","click"],[1,"container"],[1,"list","redos"],["class","more",3,"click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"list","current",3,"autoscroll","ngClass"],[1,"entry"],[1,"revision"],[1,"info",3,"ghs-label"],[1,"spacer"],[1,"debug"],["class","warning undo-offset",3,"click",4,"ngIf"],[1,"list","undos"],["class","more","inViewport","",3,"inViewportAction","click",4,"ngIf"],[1,"menu","clear-menu"],[4,"ngIf"],["class","state",3,"ngClass","mouseleave","click",4,"ngIf"],["class","separator",4,"ngIf"],[1,"more",3,"click"],[1,"entry",3,"ngClass","click","mouseleave"],["class","info text-white",3,"ghs-label","ghs-label-args","ghs-label-empty",4,"ngIf"],["class","warning",4,"ngIf"],[1,"info","text-white",3,"ghs-label","ghs-label-args","ghs-label-empty"],[1,"warning"],["src","./assets/images/warning.svg"],[3,"ghs-label","ghs-label-args"],[1,"warning","undo-offset",3,"click"],["inViewport","",1,"more",3,"inViewportAction","click"],[1,"state",3,"ngClass","mouseleave","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"a",2),t.NdJ("click",function(){return i.gameManager.stateManager.undo()}),t._UZ(3,"span",3),t.qZA(),t.TgZ(4,"span",4),t._uU(5,"|"),t.qZA(),t.TgZ(6,"a",5),t.NdJ("click",function(){return i.gameManager.stateManager.redo()}),t._UZ(7,"span",3),t.qZA()(),t.TgZ(8,"div",6)(9,"div",7),t.YNc(10,gn,2,1,"span",8),t.YNc(11,Gf,9,10,"ng-container",9),t.qZA(),t.TgZ(12,"div",10)(13,"span",11)(14,"span",12),t._uU(15),t.qZA(),t._UZ(16,"span",13)(17,"span",14),t.TgZ(18,"span",15),t._uU(19),t.qZA()(),t.YNc(20,mw,3,4,"span",16),t.qZA(),t.TgZ(21,"div",17),t.YNc(22,EZ,10,11,"ng-container",9),t.YNc(23,DZ,2,1,"span",18),t.qZA()(),t._UZ(24,"div",14),t.TgZ(25,"div",19),t.YNc(26,IZ,1,0,"span",20),t.YNc(27,NZ,3,6,"a",21),t.YNc(28,JZ,2,0,"span",22),t.YNc(29,UZ,3,6,"a",21),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngClass",t.VKq(20,j6,!i.gameManager.stateManager.undoPermission||i.undoOffset&&i.gameManager.stateManager.gameOffsetWarning||0==i.undoArray.length)),t.xp6(1),t.Q6J("ghs-label","state.undo"),t.xp6(3),t.Q6J("ngClass",t.VKq(22,j6,!i.gameManager.stateManager.redoPermission||0==i.redoArray.length)),t.xp6(1),t.Q6J("ghs-label","state.redo"),t.xp6(3),t.Q6J("ngIf",i.redoArray.length0,i.redoArray.length>0)),t.xp6(3),t.hij("",i.gameManager.game.revision-(i.gameManager.game.revisionOffset||0)+1,"."),t.xp6(1),t.Q6J("ghs-label","state.currentGame"),t.xp6(3),t.lnq("",i.gameManager.game.revision," - ",i.gameManager.game.revisionOffset," - ",i.gameManager.game.revision-i.gameManager.game.revisionOffset,""),t.xp6(1),t.Q6J("ngIf",i.undoOffset&&i.gameManager.stateManager.gameOffsetWarning),t.xp6(2),t.Q6J("ngForOf",i.undoArray),t.xp6(1),t.Q6J("ngIf",i.undoArray.length0),t.xp6(1),t.Q6J("ngIf",i.undoArray.length>0&&i.redoArray.length>0),t.xp6(1),t.Q6J("ngIf",i.redoArray.length>0))},dependencies:[x.mk,x.sg,x.O5,mC,ie,Kt,x.OU],styles:[".undo-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;padding:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));min-width:calc(var(--ghs-unit) * 70);height:calc(var(--ghs-unit) * 68 * var(--ghs-dialog-factor));max-height:calc(var(--ghs-unit) * 68 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .working[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray);animation:ghs-spinning 1.5s linear infinite;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:center}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{color:var(--ghs-color-disabled);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.undo-dialog[_ngcontent-%COMP%] .menu.clear-menu[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu.clear-menu[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-text)}.undo-dialog[_ngcontent-%COMP%] .menu.clear-menu[_ngcontent-%COMP%] .state.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.undo-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));max-height:100%;overflow:auto}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;color:var(--ghs-color-white)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%] .revision[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;text-align:right;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%]:hover{filter:brightness(.5)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry.confirm[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry.disabled[_ngcontent-%COMP%]{pointer-events:none}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%] .debug[_ngcontent-%COMP%]{display:none}.undo-dialog[_ngcontent-%COMP%] .list.current[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid transparent;border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid transparent}.undo-dialog[_ngcontent-%COMP%] .list.current[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-style:italic}.undo-dialog[_ngcontent-%COMP%] .list.current.has-undos[_ngcontent-%COMP%]{border-bottom-color:var(--ghs-color-gray)}.undo-dialog[_ngcontent-%COMP%] .list.current.has-redos[_ngcontent-%COMP%]{border-top-color:var(--ghs-color-gray)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-red)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning.undo-offset[_ngcontent-%COMP%]{cursor:zoom-out}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning.undo-offset[_ngcontent-%COMP%]:hover{opacity:.7}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-gray)}"]})),a})();const RZ=function(o){return[o]};function FZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.gameManager.stateManager.gameOffsetWarning=!1)}),t._UZ(1,"img",32)(2,"span",33),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,RZ,""+n.undoOffset))}}function qZ(o,a){if(1&o&&(t._UZ(0,"span",34),t.ALo(1,"slice")),2&o){const n=t.oxw(2);t.Q6J("ghs-label","state.info."+n.undoInfo[0])("ghs-label-args",t.Dn7(1,3,n.undoInfo,1,n.undoInfo.length))("ghs-label-empty",!0)}}function HZ(o,a){if(1&o&&(t._UZ(0,"span",34),t.ALo(1,"slice")),2&o){const n=t.oxw(2);t.Q6J("ghs-label","state.info."+n.redoInfo[0])("ghs-label-args",t.Dn7(1,3,n.redoInfo,1,n.redoInfo.length))("ghs-label-empty",!0)}}const Cw=function(o){return{denied:o}},Vf=function(o,a){return{disabled:o,denied:a}};function jZ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",35)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.scenario))}),t._UZ(3,"span",16),t.qZA()(),t.TgZ(4,"div",35)(5,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.section))}),t._UZ(6,"span",16),t.qZA()(),t.TgZ(7,"div",35)(8,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.monster_add))}),t._UZ(9,"span",16),t.qZA()(),t.TgZ(10,"div",35)(11,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.monster_remove))}),t._UZ(12,"span",16),t.qZA()(),t._UZ(13,"div",21),t.TgZ(14,"div",35)(15,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.character_add))}),t._UZ(16,"span",16),t.qZA()(),t.TgZ(17,"div",35)(18,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.character_remove))}),t._UZ(19,"span",16),t.qZA()(),t.TgZ(20,"div",35)(21,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.objective_add))}),t._UZ(22,"span",16),t.qZA()(),t.TgZ(23,"div",35)(24,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.objective_remove))}),t._UZ(25,"span",16),t.qZA()(),t._UZ(26,"div",21),t.TgZ(27,"div",36)(28,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.campaign))}),t._UZ(29,"span",16),t.qZA()(),t._UZ(30,"div",21),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(17,Cw,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.scenario)),t.xp6(2),t.Q6J("ghs-label","scenario.set"),t.xp6(1),t.Q6J("ngClass",t.WLB(19,Vf,!n.hasSections(),n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.scenario)),t.xp6(2),t.Q6J("ghs-label","section"),t.xp6(1),t.Q6J("ngClass",t.WLB(22,Vf,n.hasAllMonster(),n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters)),t.xp6(2),t.Q6J("ghs-label","monster.add"),t.xp6(1),t.Q6J("ngClass",t.WLB(25,Vf,0==n.monsters().length,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters)),t.xp6(2),t.Q6J("ghs-label","monster.remove"),t.xp6(2),t.Q6J("ngClass",t.VKq(28,Cw,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","character.add"),t.xp6(1),t.Q6J("ngClass",t.WLB(30,Vf,0==n.characters().length,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","character.remove"),t.xp6(1),t.Q6J("ngClass",t.VKq(33,Cw,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","objective.add"),t.xp6(1),t.Q6J("ngClass",t.WLB(35,Vf,0==n.objectives().length,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","objective.remove"),t.xp6(4),t.Q6J("ghs-label","campaign")}}function BZ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.datamanagement))}),t._UZ(3,"span",16),t.qZA()(),t.BQk()}2&o&&(t.xp6(3),t.Q6J("ghs-label","datamanagement"))}function zZ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.menu.connected"))}function GZ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connecting"))}function VZ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.menu.connect"))}function YZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",37),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.close())}),t._UZ(2,"img",38),t._uU(3,"\xa0 "),t._UZ(4,"span",16),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("routerLink","/"),t.xp6(3),t.Q6J("ghs-label","tools.backToGhs"))}function KZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",39),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.gameManager.stateManager.install())}),t._UZ(2,"img",40)(3,"span",16),t.qZA()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","app.install"))}function $Z(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",41)(1,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.update())}),t._uU(2,"<"),t._UZ(3,"span",16),t._uU(4,"(!)>"),t.qZA()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","update"))}const B6=function(o){return{disabled:o}};function WZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"div",12),t.YNc(2,FZ,3,4,"span",13),t.TgZ(3,"a",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.undo())}),t.TgZ(4,"span",15),t._UZ(5,"span",16),t.qZA(),t.YNc(6,qZ,2,7,"span",17),t.qZA(),t.TgZ(7,"span",18),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openUndoDialog(i))}),t._UZ(8,"img",19),t.qZA(),t.TgZ(9,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.redo())}),t._UZ(10,"span",16),t.YNc(11,HZ,2,7,"span",17),t.qZA()(),t._UZ(12,"div",21),t.YNc(13,jZ,31,38,"ng-container",22),t.TgZ(14,"div",23)(15,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.settings))}),t._UZ(16,"span",16),t.qZA()(),t.YNc(17,BZ,4,1,"ng-container",22),t._UZ(18,"div",21),t.TgZ(19,"div",23)(20,"a",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.server))}),t.YNc(21,zZ,2,1,"span",3),t.YNc(22,GZ,2,1,"span",3),t.YNc(23,VZ,2,1,"span",26),t.qZA()(),t._UZ(24,"div",21),t.TgZ(25,"div",23)(26,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.about))}),t._UZ(27,"span",16),t.qZA()(),t.TgZ(28,"div",23)(29,"a",27),t._UZ(30,"span",16),t.qZA()(),t._UZ(31,"div",21),t.YNc(32,YZ,5,2,"div",28),t.YNc(33,KZ,4,1,"div",28),t.TgZ(34,"div",23)(35,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.feedbackDialog())}),t._UZ(36,"img",29),t._uU(37,"\xa0 "),t._UZ(38,"span",16),t.qZA()(),t.YNc(39,$Z,5,1,"div",30),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.undoOffset&&n.gameManager.stateManager.gameOffsetWarning),t.xp6(1),t.Q6J("ngClass",t.VKq(19,B6,!n.gameManager.stateManager.undoPermission||n.undoOffset&&n.gameManager.stateManager.gameOffsetWarning||0==n.gameManager.stateManager.undos.length)),t.xp6(2),t.Q6J("ghs-label","state.undo"),t.xp6(1),t.Q6J("ngIf",n.undoInfo.length>0),t.xp6(3),t.Q6J("ngClass",t.VKq(21,B6,!n.gameManager.stateManager.redoPermission||0==n.gameManager.stateManager.redos.length)),t.xp6(1),t.Q6J("ghs-label","state.redo"),t.xp6(1),t.Q6J("ngIf",n.redoInfo.length>0),t.xp6(2),t.Q6J("ngIf",!n.standalone),t.xp6(3),t.Q6J("ghs-label","settings"),t.xp6(1),t.Q6J("ngIf",!n.standalone),t.xp6(3),t.Q6J("ngSwitch",n.gameManager.stateManager.wsState()),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.OPEN),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CONNECTING),t.xp6(5),t.Q6J("ghs-label","about"),t.xp6(3),t.Q6J("ghs-label","help"),t.xp6(2),t.Q6J("ngIf",n.standalone),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.installPrompt),t.xp6(5),t.Q6J("ghs-label","tools.feedback"),t.xp6(1),t.Q6J("ngIf",n.isUpdateAvailable())}}function XZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-scenario-menu",42),t.NdJ("close",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t.qZA()}}function t3(o,a){1&o&&t._UZ(0,"ghs-section-menu")}function e3(o,a){1&o&&t._UZ(0,"ghs-character-menu")}function n3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-campaign-menu",42),t.NdJ("close",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t.qZA()}}function i3(o,a){if(1&o&&(t.TgZ(0,"span",47),t._uU(1,"\xa0 "),t.TgZ(2,"span"),t._uU(3,"["),t.qZA(),t._UZ(4,"span",16),t.TgZ(5,"span"),t._uU(6,"]"),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(4),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function o3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeCharacter(s))}),t._UZ(2,"img",45),t.TgZ(3,"span"),t._uU(4),t.qZA(),t.YNc(5,i3,7,1,"span",46),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Oqu(e.gameManager.characterManager.characterName(n,!0)),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function a3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllCharacters())}),t._uU(3," <"),t._UZ(4,"span",16),t._uU(5,"> "),t.qZA()(),t.YNc(6,o3,6,3,"div",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(4),t.Q6J("ghs-label","character.removeAll"),t.xp6(2),t.Q6J("ngForOf",n.characters())}}function s3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",48)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addObjectiveContainer())}),t._UZ(3,"img",49)(4,"span",16),t.qZA()(),t.TgZ(5,"div",23)(6,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addObjectiveContainer(!0))}),t._UZ(7,"img",50)(8,"span",16),t.qZA()()()}2&o&&(t.xp6(4),t.Q6J("ghs-label","objective.add"),t.xp6(4),t.Q6J("ghs-label","escort.add"))}function r3(o,a){1&o&&t._UZ(0,"img",49)}function c3(o,a){1&o&&t._UZ(0,"img",50)}function l3(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.title)}}function g3(o,a){if(1&o&&t._UZ(0,"span",16),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.objective."+n.name)}}function d3(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"("),t.qZA())}function h3(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,")"),t.qZA())}function u3(o,a){if(1&o&&(t.TgZ(0,"span",57),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Oqu(e.gameManager.toObjective(n).id+1)}}function _3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeObjective(s))}),t.YNc(2,r3,1,0,"img",52),t.YNc(3,c3,1,0,"img",53),t.YNc(4,l3,2,1,"span",22),t.YNc(5,g3,1,1,"span",54),t.YNc(6,d3,2,0,"span",22),t._UZ(7,"span",16),t.YNc(8,h3,2,0,"span",22),t._UZ(9,"span",55),t.YNc(10,u3,2,1,"span",56),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ngIf",!n.escort),t.xp6(1),t.Q6J("ngIf",n.escort),t.xp6(1),t.Q6J("ngIf",n.title),t.xp6(1),t.Q6J("ngIf",!n.title&&n.name),t.xp6(1),t.Q6J("ngIf",n.title||n.name),t.xp6(1),t.Q6J("ghs-label",n.escort?"escort":"objective"),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(2),t.Q6J("ngIf",e.gameManager.isObjective(n))}}function p3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",51)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllObjectives())}),t._uU(3," <"),t._UZ(4,"span",16),t._uU(5,"> "),t.qZA()(),t.YNc(6,_3,11,8,"div",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(4),t.Q6J("ghs-label","objective.removeAll"),t.xp6(2),t.Q6J("ngForOf",n.objectives())}}function f3(o,a){1&o&&t._UZ(0,"ghs-monster-menu")}function m3(o,a){if(1&o&&(t.TgZ(0,"span",60),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.hij("\xa0(",e.gameManager.entityManager.entities(n).length,")")}}function v3(o,a){if(1&o&&(t.TgZ(0,"span",47),t._uU(1,"\xa0["),t._UZ(2,"span",16),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function C3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeMonster(s))}),t._UZ(2,"span",16),t.YNc(3,m3,2,1,"span",59),t.YNc(4,v3,4,1,"span",46),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",e.gameManager.entityManager.entities(n).length>0),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function M3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",58)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllMonsters())}),t._uU(3," <"),t._UZ(4,"span",16),t._uU(5,"> "),t.qZA()(),t.YNc(6,C3,5,3,"div",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(4),t.Q6J("ghs-label","monster.removeAll"),t.xp6(2),t.Q6J("ngForOf",n.monsters())}}function O3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-settings-menu",61),t.NdJ("setMenu",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setActive(i))}),t.qZA()}}function P3(o,a){1&o&&t._UZ(0,"ghs-debug-menu")}function y3(o,a){1&o&&t._UZ(0,"ghs-server-menu")}function b3(o,a){1&o&&t._UZ(0,"ghs-datamanagement-menu")}const w3=function(){return["Cephalofair Games"]},T3=function(){return[" AGPL3"]};function Z3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",62)(1,"div",23),t._UZ(2,"p",33),t.qZA(),t.TgZ(3,"div",63)(4,"div",64)(5,"div",23)(6,"a",65),t._uU(7),t.qZA()()(),t.TgZ(8,"div",64)(9,"div",23)(10,"p")(11,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update(!0))}),t._UZ(12,"span",16),t.qZA()()()()(),t.TgZ(13,"div",23)(14,"div",63)(15,"div",64)(16,"p")(17,"a",66),t._UZ(18,"span",16),t.qZA()()(),t.TgZ(19,"div",64)(20,"p")(21,"a",67),t._UZ(22,"span",16),t.qZA()()(),t.TgZ(23,"div",64),t._UZ(24,"p",33),t.qZA()()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","about.ip")("ghs-label-args",t.DdM(9,w3)),t.xp6(4),t.Q6J("href","https://github.com/Lurkars/gloomhavensecretariat/releases/tag/v"+n.version,t.LSH),t.xp6(1),t.hij("Gloomhaven Secretariat v",n.version,""),t.xp6(5),t.Q6J("ghs-label","about.forceUpdate"),t.xp6(6),t.Q6J("ghs-label","about.support"),t.xp6(4),t.Q6J("ghs-label","about.sourceCode"),t.xp6(2),t.Q6J("ghs-label","about.license")("ghs-label-args",t.DdM(10,T3))}}function A3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",68),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.main))}),t._UZ(1,"img",38),t.qZA()}2&o&&t.Q6J("ghs-label","menu.backToMain")("ghs-label-attribute","title")}var cg=function(o){return o[o.main=0]="main",o[o.scenario=1]="scenario",o[o.section=2]="section",o[o.monster_add=3]="monster_add",o[o.monster_remove=4]="monster_remove",o[o.character_add=5]="character_add",o[o.character_remove=6]="character_remove",o[o.objective_add=7]="objective_add",o[o.objective_remove=8]="objective_remove",o[o.settings=9]="settings",o[o.debug=10]="debug",o[o.server=11]="server",o[o.datamanagement=12]="datamanagement",o[o.about=13]="about",o[o.campaign=14]="campaign",o}(cg||{});let z6=(()=>{var o;class a{constructor(e,i,s,l){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"swUpdate",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"active",cg.main),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"hasSpoilers",he.Ul),(0,_.Z)(this,"isSpoiled",he.NB),(0,_.Z)(this,"notSpoiled",he.q_),(0,_.Z)(this,"version","0.80.1"),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"undoInfo",[]),(0,_.Z)(this,"undoOffset",0),(0,_.Z)(this,"redoInfo",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.swUpdate=l,this.active=e.subMenu,this.standalone=e.standalone,this.dialogRef.overlayRef.hostElement.style.zIndex="3000",this.dialogRef.overlayRef.backdropElement&&(this.dialogRef.overlayRef.backdropElement.style.zIndex="3000")}ngOnInit(){this.updateUndoRedo(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.updateUndoRedo()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}close(){this.dialogRef.close()}updateUndoRedo(){const e=d.v.stateManager.undos,i=d.v.stateManager.redos,s=d.v.stateManager.undoInfos;e.length>0&&s.length>=e.length?(this.undoInfo=s[e.length-1],this.undoOffset=d.v.game.revision-(d.v.game.revisionOffset||0)-(e[e.length-1].revision-(e[e.length-1].revisionOffset||0))-1,this.undoInfo&&this.undoInfo.length>1&&"serverSync"==this.undoInfo[0]?this.undoInfo="setInitiative"==this.undoInfo[1]&&this.undoInfo.length>3?["serverSync",R.r.getLabel("state.info."+this.undoInfo[1],[this.undoInfo[2],""])]:["serverSync",R.r.getLabel("state.info."+this.undoInfo[1],this.undoInfo.slice(2))]:this.undoInfo&&1==this.undoInfo.length&&"serverSync"==this.undoInfo[0]?this.undoInfo=["serverSync",""]:this.undoInfo||(this.undoInfo=["unknown"])):(this.undoInfo=[],this.undoOffset=0),i.length>0&&s.length>e.length?(this.redoInfo=s[e.length],this.redoInfo&&this.redoInfo.length>1&&"serverSync"==this.redoInfo[0]?this.redoInfo="setInitiative"==this.redoInfo[1]&&this.redoInfo.length>3?["serverSync",R.r.getLabel("state.info."+this.redoInfo[1],[this.redoInfo[2],""])]:["serverSync",R.r.getLabel("state.info."+this.redoInfo[1],this.redoInfo.slice(2))]:this.redoInfo&&1==this.redoInfo.length&&"serverSync"==this.redoInfo[0]?this.redoInfo=["serverSync",""]:this.redoInfo||(this.redoInfo=["unknown"])):this.redoInfo=[]}openUndoDialog(e){this.dialog.open(QZ,{panelClass:"dialog"}),this.close(),e.preventDefault(),e.stopPropagation()}setActive(e){this.active=e}hasSections(){return d.v.editionData.some(e=>e.edition==d.v.currentEdition()&&e.sections&&e.sections.length>0)}characters(){return d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e).sort((e,i)=>{const s=e.title.toLowerCase()||R.r.getLabel("data.character."+e.name).toLowerCase(),l=i.title.toLowerCase()||R.r.getLabel("data.character."+i.name).toLowerCase();return s>l?1:se instanceof qe.CH||e instanceof Nn.k).map(e=>e).sort((e,i)=>{const s=(e.title?e.title:R.r.getLabel(e.name?"data.objective."+e.name:e.escort?"escort":"objective")).toLowerCase(),l=(i.title?i.title:R.r.getLabel(i.name?"data.objective."+i.name:i.escort?"escort":"objective")).toLowerCase();return s>l?1:se instanceof Ze.Q).map(e=>e).sort((e,i)=>{const s=R.r.getLabel("data.monster."+e.name).toLowerCase(),l=R.r.getLabel("data.monster."+i.name).toLowerCase();return s>l?1:s!(e instanceof oe.z)),this.close(),d.v.stateManager.after()}addObjectiveContainer(e=!1){d.v.stateManager.before("addObjective"+(e?".escort":"")),d.v.objectiveManager.addObjective(new ft("",e?3:7,e)),this.close(),d.v.stateManager.after()}removeObjective(e){d.v.stateManager.before("removeObjective",e.title||e.name),e instanceof qe.CH?d.v.characterManager.removeObjective(e):d.v.objectiveManager.removeObjective(e),0==this.objectives().length&&this.close(),d.v.stateManager.after()}removeAllObjectives(){d.v.stateManager.before("removeAllObjectives"),d.v.game.figures=d.v.game.figures.filter(e=>!(e instanceof qe.CH||e instanceof Nn.k)),this.close(),d.v.stateManager.after()}removeMonster(e){d.v.stateManager.before("removeMonster","data.monster."+e.name),d.v.monsterManager.removeMonster(e),0==this.monsters().length&&this.close(),d.v.stateManager.after()}removeAllMonsters(){d.v.stateManager.before("removeAllMonster"),d.v.game.figures=d.v.game.figures.filter(e=>!(e instanceof Ze.Q)),this.close(),d.v.stateManager.after()}hasAllMonster(){return d.v.monstersData().every(e=>d.v.game.figures.some(i=>i instanceof ot.A&&i.name==e.name&&i.edition==e.edition))}isUpdateAvailable(){return d.v.stateManager.hasUpdate}update(e=!1){(this.isUpdateAvailable()||e)&&(this.swUpdate.isEnabled?this.swUpdate.activateUpdate().then(()=>{this.clearAndRefresh()}):this.clearAndRefresh())}clearAndRefresh(){return(0,J.Z)(function*(){if("caches"in window){const e=yield caches.keys();yield Promise.all(e.map(function(){var i=(0,J.Z)(function*(s){return yield caches.delete(s)});return function(s){return i.apply(this,arguments)}}()))}window.location.reload()})()}feedbackDialog(){this.dialog.open(ye,{panelClass:"dialog"}),this.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te),t.Y36(Gg))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-main-menu"]],decls:17,vars:17,consts:[[1,"scroll-container",3,"ngSwitch"],["class","menu-container main two-column",4,"ngSwitchCase"],[3,"close",4,"ngSwitchCase"],[4,"ngSwitchCase"],["class","menu-container character-remove",4,"ngSwitchCase"],["class","menu-container objective-add",4,"ngSwitchCase"],["class","menu-container objective-remove",4,"ngSwitchCase"],["class","menu-container monster-remove",4,"ngSwitchCase"],[3,"setMenu",4,"ngSwitchCase"],["class","menu-container about",4,"ngSwitchCase"],["class","back",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],[1,"menu-container","main","two-column"],[1,"line","state-container","span"],["class","warning",3,"click",4,"ngIf"],[1,"state","undo",3,"ngClass","click"],[1,"undo-text"],[3,"ghs-label"],["class","info text-white",3,"ghs-label","ghs-label-args","ghs-label-empty",4,"ngIf"],[1,"undo-dialog",3,"click"],["src","./assets/images/long-rest.svg",1,"ghs-svg"],[1,"state","redo",3,"ngClass","click"],[1,"separator"],[4,"ngIf"],[1,"line"],[3,"click"],[3,"ngSwitch","click"],[4,"ngSwitchDefault"],["href","https://help.gloomhaven-secretariat.de","target","_blank"],["class","line",4,"ngIf"],["src","./assets/images/hint.svg",1,"ghs-svg"],["class","line separator",4,"ngIf"],[1,"warning",3,"click"],["src","./assets/images/warning.svg"],[3,"ghs-label","ghs-label-args"],[1,"info","text-white",3,"ghs-label","ghs-label-args","ghs-label-empty"],[1,"line",3,"ngClass"],[1,"line","span"],[3,"routerLink","click"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"install",3,"click"],["src","./assets/images/install.svg",1,"ghs-svg"],[1,"line","separator"],[3,"close"],[1,"menu-container","character-remove"],["class","line",4,"ngFor","ngForOf"],[1,"icon",3,"src"],["class","edition",4,"ngIf"],[1,"edition"],[1,"menu-container","objective-add"],["src","./assets/images/objective/objective.svg",1,"icon"],["src","./assets/images/objective/escort.svg",1,"icon"],[1,"menu-container","objective-remove"],["class","icon","src","./assets/images/objective/objective.svg",4,"ngIf"],["class","icon","src","./assets/images/objective/escort.svg",4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"spacer"],["class","objective-marker",4,"ngIf"],[1,"objective-marker"],[1,"menu-container","monster-remove"],["class","count",4,"ngIf"],[1,"count"],[3,"setMenu"],[1,"menu-container","about"],[1,"columns"],[1,"column"],["target","_blank",3,"href"],["href","https://ko-fi.com/lurkars","target","_blank"],["href","https://github.com/Lurkars/gloomhavensecretariat","target","_blank"],[1,"back",3,"ghs-label","ghs-label-attribute","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,WZ,40,23,"div",1),t.YNc(2,XZ,1,0,"ghs-scenario-menu",2),t.YNc(3,t3,1,0,"ghs-section-menu",3),t.YNc(4,e3,1,0,"ghs-character-menu",3),t.YNc(5,n3,1,0,"ghs-campaign-menu",2),t.YNc(6,a3,7,2,"div",4),t.YNc(7,s3,9,2,"div",5),t.YNc(8,p3,7,2,"div",6),t.YNc(9,f3,1,0,"ghs-monster-menu",3),t.YNc(10,M3,7,2,"div",7),t.YNc(11,O3,1,0,"ghs-settings-menu",8),t.YNc(12,P3,1,0,"ghs-debug-menu",3),t.YNc(13,y3,1,0,"ghs-server-menu",3),t.YNc(14,b3,1,0,"ghs-datamanagement-menu",3),t.YNc(15,Z3,25,11,"div",9),t.qZA(),t.YNc(16,A3,2,2,"div",10)),2&e&&(t.Q6J("ngSwitch",i.active),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.main),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.scenario),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.section),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.character_add),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.campaign),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.character_remove),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.objective_add),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.objective_remove),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.monster_add),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.monster_remove),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.settings),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.debug),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.server),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.datamanagement),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.about),t.xp6(1),t.Q6J("ngIf",i.active!=i.SubMenu.main))},styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}']})),a})();function S3(o,a){1&o&&t._UZ(0,"img",31)}function E3(o,a){1&o&&t._UZ(0,"img",31)}function D3(o,a){1&o&&t._UZ(0,"img",31)}const nn=function(o){return{disabled:o}};function I3(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",7)(2,"div",8)(3,"div",3)(4,"label")(5,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAbilities(!i.settingsManager.settings.abilities))}),t.qZA(),t._UZ(6,"span",2),t.qZA(),t._UZ(7,"img",10),t.TgZ(8,"span",5),t._UZ(9,"span",6),t.qZA()()(),t.TgZ(10,"div",8)(11,"div",3)(12,"label",11)(13,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCalculate(!i.settingsManager.settings.calculate))}),t.qZA(),t._UZ(14,"span",2),t.qZA(),t._UZ(15,"img",10),t.TgZ(16,"span",5),t._UZ(17,"span",6),t.qZA()()(),t.TgZ(18,"div",8)(19,"div",3)(20,"label",11)(21,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCalculateStats(!i.settingsManager.settings.calculateStats))}),t.qZA(),t._UZ(22,"span",2),t.qZA(),t._UZ(23,"img",10),t.TgZ(24,"span",5),t._UZ(25,"span",6),t.qZA()()(),t.TgZ(26,"div",8)(27,"div",3)(28,"label",11)(29,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCalculateShieldStats(!i.settingsManager.settings.calculateShieldStats))}),t.qZA(),t._UZ(30,"span",2),t.qZA(),t._UZ(31,"img",10),t.TgZ(32,"span",5),t._UZ(33,"span",6),t.qZA()()(),t.TgZ(34,"div",8)(35,"div",3)(36,"label",11)(37,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setInteractiveAbilities(!i.settingsManager.settings.interactiveAbilities))}),t.qZA(),t._UZ(38,"span",2),t.qZA(),t._UZ(39,"img",10),t.TgZ(40,"span",5),t._UZ(41,"span",6),t.qZA()()(),t.TgZ(42,"div",8)(43,"div",3)(44,"label",11)(45,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAbilityReveal(!i.settingsManager.settings.abilityReveal))}),t.qZA(),t._UZ(46,"span",2),t.qZA(),t._UZ(47,"img",10),t.TgZ(48,"span",5),t._UZ(49,"span",6),t.qZA()()()(),t.TgZ(50,"div",7)(51,"div",8)(52,"div",3)(53,"label",11)(54,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCombineSummonAction(!i.settingsManager.settings.combineSummonAction))}),t.qZA(),t._UZ(55,"span",2),t.qZA(),t._UZ(56,"img",10),t.TgZ(57,"span",5),t._UZ(58,"span",6),t.qZA()()(),t.TgZ(59,"div",8)(60,"div",3)(61,"label",11)(62,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAbilityNumbers(!i.settingsManager.settings.abilityNumbers))}),t.qZA(),t._UZ(63,"span",2),t.qZA(),t._UZ(64,"img",10),t.TgZ(65,"span",5),t._UZ(66,"span",6),t.qZA()()(),t.TgZ(67,"div",8)(68,"div",3)(69,"label",11)(70,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setShowExpandedAbilityCard(!i.settingsManager.settings.showExpandedAbilityCard))}),t.qZA(),t._UZ(71,"span",2),t.qZA(),t._UZ(72,"img",10),t.TgZ(73,"span",5),t._UZ(74,"span",6),t.qZA()()(),t.TgZ(75,"div",8)(76,"div",3)(77,"label",11)(78,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setShowFullAbilityCard(!i.settingsManager.settings.showFullAbilityCard))}),t.qZA(),t._UZ(79,"span",2),t.qZA(),t._UZ(80,"img",10),t.TgZ(81,"span",5),t._UZ(82,"span",6),t.qZA()()(),t.TgZ(83,"div",8)(84,"div",3)(85,"label")(86,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setHideStats(!i.settingsManager.settings.hideStats))}),t.qZA(),t._UZ(87,"span",2),t.qZA(),t._UZ(88,"img",10),t.TgZ(89,"span",5),t._UZ(90,"span",6),t.qZA()()(),t.TgZ(91,"div",8)(92,"div",3)(93,"label")(94,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAddAllMonsters(!i.settingsManager.settings.addAllMonsters))}),t.qZA(),t._UZ(95,"span",2),t.qZA(),t._UZ(96,"img",10),t.TgZ(97,"span",5),t._UZ(98,"span",6),t.qZA()()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(5),t.Q6J("checked",n.settingsManager.settings.abilities),t.xp6(1),t.Q6J("ghs-label","settings.abilities"),t.xp6(3),t.Q6J("ghs-label","settings.abilities.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(45,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.calculate),t.xp6(1),t.Q6J("ghs-label","settings.calc"),t.xp6(3),t.Q6J("ghs-label","settings.calc.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(47,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.calculateStats),t.xp6(1),t.Q6J("ghs-label","settings.calculateStats"),t.xp6(3),t.Q6J("ghs-label","settings.calculateStats.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(49,nn,!n.settingsManager.settings.abilities||!n.settingsManager.settings.calculateStats)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.calculateStats&&n.settingsManager.settings.calculateShieldStats),t.xp6(1),t.Q6J("ghs-label","settings.calculateShieldStats"),t.xp6(3),t.Q6J("ghs-label","settings.calculateShieldStats.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(51,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.interactiveAbilities),t.xp6(1),t.Q6J("ghs-label","settings.interactiveAbilities"),t.xp6(3),t.Q6J("ghs-label","settings.interactiveAbilities.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(53,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.abilityReveal),t.xp6(1),t.Q6J("ghs-label","settings.abilityReveal"),t.xp6(3),t.Q6J("ghs-label","settings.abilityReveal.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(55,nn,!n.settingsManager.settings.abilities||!n.settingsManager.settings.interactiveAbilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.combineSummonAction&&n.settingsManager.settings.abilities&&n.settingsManager.settings.interactiveAbilities),t.xp6(1),t.Q6J("ghs-label","settings.combineSummonAction"),t.xp6(3),t.Q6J("ghs-label","settings.combineSummonAction.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(57,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.abilityNumbers),t.xp6(1),t.Q6J("ghs-label","settings.abilityNumbers"),t.xp6(3),t.Q6J("ghs-label","settings.abilityNumbers.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(59,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.showExpandedAbilityCard),t.xp6(1),t.Q6J("ghs-label","settings.showExpandedAbilityCard"),t.xp6(3),t.Q6J("ghs-label","settings.showExpandedAbilityCard.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(61,nn,!n.settingsManager.settings.abilities||n.settingsManager.settings.showExpandedAbilityCard)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&(n.settingsManager.settings.showFullAbilityCard||n.settingsManager.settings.showExpandedAbilityCard)),t.xp6(1),t.Q6J("ghs-label","settings.showFullAbilityCard"),t.xp6(3),t.Q6J("ghs-label","settings.showFullAbilityCard.hint"),t.xp6(4),t.Q6J("checked",n.settingsManager.settings.hideStats),t.xp6(1),t.Q6J("ghs-label","settings.hideStats"),t.xp6(3),t.Q6J("ghs-label","settings.hideStats.hint"),t.xp6(4),t.Q6J("checked",n.settingsManager.settings.addAllMonsters),t.xp6(1),t.Q6J("ghs-label","settings.addAllMonsters"),t.xp6(3),t.Q6J("ghs-label","settings.addAllMonsters.hint")}}function N3(o,a){1&o&&t._UZ(0,"img",31)}function J3(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",8)(2,"div",3)(3,"label",11)(4,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setEliteFirst(!i.settingsManager.settings.eliteFirst))}),t.qZA(),t._UZ(5,"span",2),t.qZA(),t._UZ(6,"img",10),t.TgZ(7,"span",5),t._UZ(8,"span",6),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ngClass",t.VKq(4,nn,n.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.eliteFirst&&!n.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.eliteFirst"),t.xp6(3),t.Q6J("ghs-label","settings.eliteFirst.hint")}}function U3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",7)(1,"div",8)(2,"div",3)(3,"label",11)(4,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAutomaticStandeesDialog(!i.settingsManager.settings.automaticStandeesDialog))}),t.qZA(),t._UZ(5,"span",2),t.qZA(),t._UZ(6,"img",10),t.TgZ(7,"span",5),t._UZ(8,"span",6),t.qZA()()(),t.TgZ(9,"div",8)(10,"div",3)(11,"label",11)(12,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setRandomStandees(!i.settingsManager.settings.randomStandees))}),t.qZA(),t._UZ(13,"span",2),t.qZA(),t._UZ(14,"img",10),t.TgZ(15,"span",5),t._UZ(16,"span",6),t.qZA()()(),t.TgZ(17,"div",8)(18,"div",3)(19,"label")(20,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setDisableStandees(!i.settingsManager.settings.disableStandees))}),t.qZA(),t._UZ(21,"span",2),t.qZA(),t._UZ(22,"img",10),t.TgZ(23,"span",5),t._UZ(24,"span",6),t.qZA()()()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ngClass",t.VKq(11,nn,!n.settingsManager.settings.scenarioRooms||n.settingsManager.settings.disableStandees||!n.settingsManager.settings.automaticStandees||n.settingsManager.settings.randomStandees)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.automaticStandeesDialog&&n.settingsManager.settings.automaticStandees&&!n.settingsManager.settings.disableStandees&&!n.settingsManager.settings.randomStandees&&n.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.automaticStandeesDialog"),t.xp6(3),t.Q6J("ghs-label","settings.automaticStandeesDialog.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(13,nn,n.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.randomStandees&&!n.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.randomStandees"),t.xp6(3),t.Q6J("ghs-label","settings.randomStandees.hint"),t.xp6(4),t.Q6J("checked",n.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.disableStandees"),t.xp6(3),t.Q6J("ghs-label","settings.disableStandees.hint")}}function L3(o,a){1&o&&t._UZ(0,"img",31)}const G6=function(o){return{immunity:o}},V6=function(o){return{right:o}};function Q3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3)(1,"div",32),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleApplyConditionsExclude(s))}),t._UZ(2,"img",33),t.qZA(),t._UZ(3,"img",10),t.TgZ(4,"span",34),t._UZ(5,"span",6),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(4,G6,-1!=i.settingsManager.settings.applyConditionsExcludes.indexOf(n))),t.xp6(1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH),t.xp6(2),t.Q6J("ngClass",t.VKq(6,V6,e>2)),t.xp6(1),t.Q6J("ghs-label","settings.applyConditions.hint."+n)}}function R3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3)(1,"div",32),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleActiveApplyConditionsExclude(s))}),t._UZ(2,"img",33),t.qZA(),t._UZ(3,"img",10),t.TgZ(4,"span",34),t._UZ(5,"span",6),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(4,G6,-1!=i.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n))),t.xp6(1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH),t.xp6(2),t.Q6J("ngClass",t.VKq(6,V6,e>2)),t.xp6(1),t.Q6J("ghs-label","settings.activeApplyConditions.hint."+n)}}function F3(o,a){1&o&&t._UZ(0,"img",31)}function q3(o,a){1&o&&t._UZ(0,"img",31)}function H3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"div",3)(2,"label")(3,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setDisableWakeLock(!i.settingsManager.settings.disableWakeLock))}),t.qZA(),t._UZ(4,"span",2),t.qZA(),t._UZ(5,"img",10),t.TgZ(6,"span",5),t._UZ(7,"span",6),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("checked",n.settingsManager.settings.disableWakeLock),t.xp6(1),t.Q6J("ghs-label","settings.disableWakeLock"),t.xp6(3),t.Q6J("ghs-label","settings.disableWakeLock.hint")}}function j3(o,a){1&o&&t._UZ(0,"img",35)}function B3(o,a){1&o&&t._UZ(0,"div",38),2&o&&t.Q6J("ghs-label","settings.maxUndo.warning.firefox")}function z3(o,a){if(1&o&&(t.TgZ(0,"div",5)(1,"div",36),t._UZ(2,"div",2)(3,"br"),t.YNc(4,B3,1,1,"div",37),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","settings.maxUndo.warning"),t.xp6(2),t.Q6J("ngIf",n.platform.FIREFOX)}}function G3(o,a){1&o&&t._UZ(0,"img",31)}function V3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"label",11)(2,"input",9),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.settingsManager.setLocale(s))}),t.qZA(),t._UZ(3,"span",2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(3,nn,e.settingsManager.settings.locale==n)),t.xp6(1),t.Q6J("checked",e.settingsManager.settings.locale==n),t.xp6(1),t.Q6J("ghs-label","settings.locale."+n)}}function Y3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"label",11)(2,"input",9),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.settingsManager.setTheme(s))}),t.qZA(),t._UZ(3,"span",2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(3,nn,e.settingsManager.settings.theme==n)),t.xp6(1),t.Q6J("checked",e.settingsManager.settings.theme==n),t.xp6(1),t.Q6J("ghs-label","settings.theme."+n)}}const K3=function(o){return{connected:o}},$3=function(){return["default","fh","modern"]};let W3=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"platform",void 0),(0,_.Z)(this,"setMenu",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"storageManager",Pt.j),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"wakeLock",void 0),(0,_.Z)(this,"applyConditionsExcludes",[]),(0,_.Z)(this,"activeApplyConditionsExcludes",[]),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"doubleClick",null),this.platform=e,this.wakeLock="wakeLock"in navigator,Object.keys(re.fT).forEach(i=>{const s=new re.gP(i);(-1!=s.types.indexOf(re.CP.turn)||-1!=s.types.indexOf(re.CP.afterTurn))&&this.applyConditionsExcludes.push(s.name),-1!=s.types.indexOf(re.CP.apply)&&this.activeApplyConditionsExcludes.push(s.name)})}toggleApplyConditionsExclude(e){let i=R.r.settings.applyConditionsExcludes.indexOf(e);-1==i?R.r.settings.applyConditionsExcludes.push(e):R.r.settings.applyConditionsExcludes.splice(i,1),R.r.storeSettings()}toggleActiveApplyConditionsExclude(e){let i=R.r.settings.activeApplyConditionsExcludes.indexOf(e);-1==i?R.r.settings.activeApplyConditionsExcludes.push(e):R.r.settings.activeApplyConditionsExcludes.splice(i,1),R.r.storeSettings()}zoomOut(e=!1){this.zoom(5,e)}zoomIn(e=!1){this.zoom(-5,e)}zoom(e,i){let s=+window.getComputedStyle(document.body).getPropertyValue("--ghs-factor");s+=e,this.setZoom(s,e,i)}setZoom(e,i,s){if(R.r.settings.zoom!=e){if(document.body.style.setProperty("--ghs-factor",e+""),!s){const l=+window.getComputedStyle(document.body).getPropertyValue("min-width").replace("px","");i<0&&l>=window.innerWidth&&(e-=i,document.body.style.setProperty("--ghs-factor",e+""))}R.r.setZoom(e)}}resetZoom(){this.setZoom(100,0,!0)}updateBarsize(e){document.body.style.setProperty("--ghs-barsize",e.target.value+"")}setBarsize(e){R.r.setBarsize(e.target.value),document.body.style.setProperty("--ghs-barsize",R.r.settings.barsize+"")}resetBarsize(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,R.r.setBarsize(1),document.body.style.setProperty("--ghs-barsize",R.r.settings.barsize+"")):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.doubleClick=null)},200)}updateFontsize(e){document.body.style.setProperty("--ghs-fontsize",e.target.value+"")}setFontsize(e){R.r.setFontsize(e.target.value),document.body.style.setProperty("--ghs-fontsize",R.r.settings.fontsize+"")}resetFontsize(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,R.r.setFontsize(1),document.body.style.setProperty("--ghs-fontsize",R.r.settings.fontsize+"")):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.doubleClick=null)},200)}updateGlobalFontsize(e){document.body.style.setProperty("--ghs-global-fontsize",e.target.value+"")}setGlobalFontsize(e){R.r.setGlobalFontsize(e.target.value),document.body.style.setProperty("--ghs-global-fontsize",R.r.settings.globalFontsize+"")}resetGlobalFontsize(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,R.r.setGlobalFontsize(1),document.body.style.setProperty("--ghs-global-fontsize",R.r.settings.globalFontsize+"")):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.doubleClick=null)},200)}setTheme(e){R.r.setTheme(e.target.value)}fullscreen(){R.r.setFullscreen(!R.r.settings.fullscreen),R.r.settings.fullscreen?document.body.requestFullscreen():document.exitFullscreen()}togglePortraitMode(){R.r.setPortraitMode(!R.r.settings.portraitMode),R.r.settings.portraitMode?document.body.classList.add("portrait-mode"):document.body.classList.remove("portrait-mode")}helperDefaults(){R.r.settings.abilityNumbers=!1,R.r.settings.activeApplyConditions=!1,R.r.settings.activeStandees=!1,R.r.settings.activeSummons=!1,R.r.settings.applyConditions=!1,R.r.settings.applyLongRest=!1,R.r.settings.allyAttackModifierDeck=!1,R.r.settings.automaticUnlocking=!1,R.r.settings.automaticStandees=!1,R.r.settings.autoscroll=!1,R.r.settings.battleGoals=!1,R.r.settings.calculate=!0,R.r.settings.calculateStats=!1,R.r.settings.characterAttackModifierDeck=!1,R.r.settings.characterIdentities=!1,R.r.settings.characterItems=!1,R.r.settings.characterHandSize=!1,R.r.settings.characterSheet=!1,R.r.settings.disabledTurnConfirmation=!0,R.r.settings.disableStandees=!1,R.r.settings.dragValues=!0,R.r.settings.eliteFirst=!0,R.r.settings.expireConditions=!1,R.r.settings.fhStyle=!1,R.r.settings.hideAbsent=!1,R.r.settings.hideStats=!0,R.r.settings.hints=!0,R.r.settings.initiativeRequired=!0,R.r.settings.initiativeRequired=!0,R.r.settings.lootDeck=!1,R.r.settings.moveElements=!0,R.r.settings.partySheet=!1,R.r.settings.randomStandees=!1,R.r.settings.scenarioRooms=!1,R.r.settings.standeeStats=!1,R.r.settings.theme="default",R.r.storeSettings()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Xn.t4))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-settings-menu"]],outputs:{setMenu:"setMenu"},decls:663,vars:344,consts:[[1,"menu-container","two-column","settings",3,"ngClass"],[1,"line","title","span"],[3,"ghs-label"],[1,"hint-container"],["src","./assets/images/sync-settings.svg","class","hint-trigger ghs-svg sync-settings",4,"ngIf"],[1,"hint"],[1,"text",3,"ghs-label"],[1,"column"],[1,"line"],["type","checkbox",3,"checked","change"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg"],[3,"ngClass"],[4,"ngIf"],["class","column",4,"ngIf"],[1,"line",3,"ngClass"],[1,"condition-list"],["class","hint-container",4,"ngFor","ngForOf"],[1,"separator"],["ghs-pointer-input","",3,"singleClick","doubleClick"],[3,"click"],["class","line",4,"ngIf"],["type","range","min","0.1","step","0.1","max","2",3,"value","change","input"],[1,"hint-container","warning"],[1,"label"],["type","number","min","0",3,"value","max","size","ghs-label","ghs-label-attribute","keyup","change"],["maxUndo",""],["src","./assets/images/warning.svg","class","hint-trigger ghs-svg",4,"ngIf"],["class","hint",4,"ngIf"],[1,"line","disabled"],[1,"line","title"],["class","line",4,"ngFor","ngForOf"],["src","./assets/images/sync-settings.svg",1,"hint-trigger","ghs-svg","sync-settings"],[1,"condition",3,"ngClass","click"],[3,"src"],[1,"hint",3,"ngClass"],["src","./assets/images/warning.svg",1,"hint-trigger","ghs-svg"],[1,"text"],["class","firefox",3,"ghs-label",4,"ngIf"],[1,"firefox",3,"ghs-label"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1)(2,"label"),t._UZ(3,"span",2),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,S3,1,0,"img",4),t.TgZ(6,"span",5),t._UZ(7,"span",6),t.qZA()()(),t.TgZ(8,"div",7)(9,"div",8)(10,"div",3)(11,"label")(12,"input",9),t.NdJ("change",function(){return i.settingsManager.setScenarioRooms(!i.settingsManager.settings.scenarioRooms)}),t.qZA(),t._UZ(13,"span",2),t.qZA(),t._UZ(14,"img",10),t.TgZ(15,"span",5),t._UZ(16,"span",6),t.qZA()()(),t.TgZ(17,"div",8)(18,"div",3)(19,"label")(20,"input",9),t.NdJ("change",function(){return i.settingsManager.setScenarioRules(!i.settingsManager.settings.scenarioRules)}),t.qZA(),t._UZ(21,"span",2),t.qZA(),t._UZ(22,"img",10),t.TgZ(23,"span",5),t._UZ(24,"span",6),t.qZA()()()(),t.TgZ(25,"div",7)(26,"div",8)(27,"div",3)(28,"label",11)(29,"input",9),t.NdJ("change",function(){return i.settingsManager.setTreasures(!i.settingsManager.settings.treasures)}),t.qZA(),t._UZ(30,"span",2),t.qZA(),t._UZ(31,"img",10),t.TgZ(32,"span",5),t._UZ(33,"span",6),t.qZA()()(),t.TgZ(34,"div",8)(35,"div",3)(36,"label",11)(37,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisabledTurnConfirmation(!i.settingsManager.settings.disabledTurnConfirmation)}),t.qZA(),t._UZ(38,"span",2),t.qZA(),t._UZ(39,"img",10),t.TgZ(40,"span",5),t._UZ(41,"span",6),t.qZA()()()(),t.TgZ(42,"div",1)(43,"label"),t._UZ(44,"span",2),t.qZA(),t.TgZ(45,"div",3),t.YNc(46,E3,1,0,"img",4),t.TgZ(47,"span",5),t._UZ(48,"span",6),t.qZA()()(),t.TgZ(49,"div",7)(50,"div",8)(51,"div",3)(52,"label")(53,"input",9),t.NdJ("change",function(){return i.settingsManager.setInitiativeRequired(!i.settingsManager.settings.initiativeRequired)}),t.qZA(),t._UZ(54,"span",2),t.qZA(),t._UZ(55,"img",10),t.TgZ(56,"span",5),t._UZ(57,"span",6),t.qZA()()(),t.TgZ(58,"div",8)(59,"div",3)(60,"label")(61,"input",9),t.NdJ("change",function(){return i.settingsManager.setHideAbsent(!i.settingsManager.settings.hideAbsent)}),t.qZA(),t._UZ(62,"span",2),t.qZA(),t._UZ(63,"img",10),t.TgZ(64,"span",5),t._UZ(65,"span",6),t.qZA()()(),t.TgZ(66,"div",8)(67,"div",3)(68,"label",11)(69,"input",9),t.NdJ("change",function(){return i.settingsManager.setTreasuresLoot(!i.settingsManager.settings.treasuresLoot)}),t.qZA(),t._UZ(70,"span",2),t.qZA(),t._UZ(71,"img",10),t.TgZ(72,"span",5),t._UZ(73,"span",6),t.qZA()()(),t.TgZ(74,"div",8)(75,"div",3)(76,"label")(77,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyLongRest(!i.settingsManager.settings.applyLongRest)}),t.qZA(),t._UZ(78,"span",2),t.qZA(),t._UZ(79,"img",10),t.TgZ(80,"span",5),t._UZ(81,"span",6),t.qZA()()(),t.TgZ(82,"div",8)(83,"div",3)(84,"label",11)(85,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyRetirement(!i.settingsManager.settings.applyRetirement)}),t.qZA(),t._UZ(86,"span",2),t.qZA(),t._UZ(87,"img",10),t.TgZ(88,"span",5),t._UZ(89,"span",6),t.qZA()()(),t.TgZ(90,"div",8)(91,"div",3)(92,"label")(93,"input",9),t.NdJ("change",function(){return i.settingsManager.setActiveSummons(!i.settingsManager.settings.activeSummons)}),t.qZA(),t._UZ(94,"span",2),t.qZA(),t._UZ(95,"img",10),t.TgZ(96,"span",5),t._UZ(97,"span",6),t.qZA()()()(),t.TgZ(98,"div",7)(99,"div",8)(100,"div",3)(101,"label")(102,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterIdentities(!i.settingsManager.settings.characterIdentities)}),t.qZA(),t._UZ(103,"span",2),t.qZA(),t._UZ(104,"img",10),t.TgZ(105,"span",5),t._UZ(106,"span",6),t.qZA()()(),t.TgZ(107,"div",8)(108,"div",3)(109,"label",11)(110,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterIdentityHint(!i.settingsManager.settings.characterIdentityHint)}),t.qZA(),t._UZ(111,"span",2),t.qZA(),t._UZ(112,"img",10),t.TgZ(113,"span",5),t._UZ(114,"span",6),t.qZA()()(),t.TgZ(115,"div",8)(116,"div",3)(117,"label",11)(118,"input",9),t.NdJ("change",function(){return i.settingsManager.setBattleGoalsCharacter(!i.settingsManager.settings.battleGoalsCharacter)}),t.qZA(),t._UZ(119,"span",2),t.qZA(),t._UZ(120,"img",10),t.TgZ(121,"span",5),t._UZ(122,"span",6),t.qZA()()(),t.TgZ(123,"div",8)(124,"div",3)(125,"label")(126,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterHandSize(!i.settingsManager.settings.characterHandSize)}),t.qZA(),t._UZ(127,"span",2),t.qZA(),t._UZ(128,"img",10),t.TgZ(129,"span",5),t._UZ(130,"span",6),t.qZA()()(),t.TgZ(131,"div",8)(132,"div",3)(133,"label")(134,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterTraits(!i.settingsManager.settings.characterTraits)}),t.qZA(),t._UZ(135,"span",2),t.qZA(),t._UZ(136,"img",10),t.TgZ(137,"span",5),t._UZ(138,"span",6),t.qZA()()()(),t.TgZ(139,"div",1)(140,"label"),t._UZ(141,"span",2),t.qZA(),t.TgZ(142,"div",3),t.YNc(143,D3,1,0,"img",4),t.TgZ(144,"span",5),t._UZ(145,"span",6),t.qZA()()(),t.YNc(146,I3,99,63,"ng-container",12),t.TgZ(147,"div",1)(148,"label"),t._UZ(149,"span",2),t.qZA(),t.TgZ(150,"div",3),t.YNc(151,N3,1,0,"img",4),t.TgZ(152,"span",5),t._UZ(153,"span",6),t.qZA()()(),t.TgZ(154,"div",7),t.YNc(155,J3,9,6,"ng-container",12),t.TgZ(156,"div",8)(157,"div",3)(158,"label",11)(159,"input",9),t.NdJ("change",function(){return i.settingsManager.setActiveStandees(!i.settingsManager.settings.activeStandees)}),t.qZA(),t._UZ(160,"span",2),t.qZA(),t._UZ(161,"img",10),t.TgZ(162,"span",5),t._UZ(163,"span",6),t.qZA()()(),t.TgZ(164,"div",8)(165,"div",3)(166,"label",11)(167,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticStandees(!i.settingsManager.settings.automaticStandees)}),t.qZA(),t._UZ(168,"span",2),t.qZA(),t._UZ(169,"img",10),t.TgZ(170,"span",5),t._UZ(171,"span",6),t.qZA()()(),t.TgZ(172,"div",8)(173,"div",3)(174,"label",11)(175,"input",9),t.NdJ("change",function(){return i.settingsManager.setStandeeStats(!i.settingsManager.settings.standeeStats)}),t.qZA(),t._UZ(176,"span",2),t.qZA(),t._UZ(177,"img",10),t.TgZ(178,"span",5),t._UZ(179,"span",6),t.qZA()()()(),t.YNc(180,U3,25,15,"div",13),t.TgZ(181,"div",1)(182,"label"),t._UZ(183,"span",2),t.qZA(),t.TgZ(184,"div",3),t.YNc(185,L3,1,0,"img",4),t.TgZ(186,"span",5),t._UZ(187,"span",6),t.qZA()()(),t.TgZ(188,"div",7)(189,"div",8)(190,"div",3)(191,"label")(192,"input",9),t.NdJ("change",function(){return i.settingsManager.setExpireConditions(!i.settingsManager.settings.expireConditions)}),t.qZA(),t._UZ(193,"span",2),t.qZA(),t._UZ(194,"img",10),t.TgZ(195,"span",5),t._UZ(196,"span",6),t.qZA()()(),t.TgZ(197,"div",8)(198,"div",3)(199,"label")(200,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyConditions(!i.settingsManager.settings.applyConditions)}),t.qZA(),t._UZ(201,"span",2),t.qZA(),t._UZ(202,"img",10),t.TgZ(203,"span",5),t._UZ(204,"span",6),t.qZA()()(),t.TgZ(205,"div",7)(206,"div",14)(207,"div",15),t.YNc(208,Q3,6,8,"div",16),t.qZA()()()(),t.TgZ(209,"div",7)(210,"div",8)(211,"div",3)(212,"label")(213,"input",9),t.NdJ("change",function(){return i.settingsManager.setMoveElements(!i.settingsManager.settings.moveElements)}),t.qZA(),t._UZ(214,"span",2),t.qZA(),t._UZ(215,"img",10),t.TgZ(216,"span",5),t._UZ(217,"span",6),t.qZA()()(),t.TgZ(218,"div",8)(219,"div",3)(220,"label",11)(221,"input",9),t.NdJ("change",function(){return i.settingsManager.setActiveApplyConditions(!i.settingsManager.settings.activeApplyConditions)}),t.qZA(),t._UZ(222,"span",2),t.qZA(),t._UZ(223,"img",10),t.TgZ(224,"span",5),t._UZ(225,"span",6),t.qZA()()(),t.TgZ(226,"div",7)(227,"div",14)(228,"div",15),t.YNc(229,R3,6,8,"div",16),t.qZA()()()(),t._UZ(230,"div",17),t.TgZ(231,"div",1)(232,"label"),t._UZ(233,"span",2),t.qZA(),t.TgZ(234,"div",3),t.YNc(235,F3,1,0,"img",4),t.TgZ(236,"span",5),t._UZ(237,"span",6),t.qZA()()(),t.TgZ(238,"div",7)(239,"div",8)(240,"div",3)(241,"label",11)(242,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyLoot(!i.settingsManager.settings.applyLoot)}),t.qZA(),t._UZ(243,"span",2),t.qZA(),t._UZ(244,"img",10),t.TgZ(245,"span",5),t._UZ(246,"span",6),t.qZA()()(),t.TgZ(247,"div",8)(248,"div",3)(249,"label",11)(250,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyLootRandomItem(!i.settingsManager.settings.applyLootRandomItem)}),t.qZA(),t._UZ(251,"span",2),t.qZA(),t._UZ(252,"img",10),t.TgZ(253,"span",5),t._UZ(254,"span",6),t.qZA()()(),t.TgZ(255,"div",8)(256,"div",3)(257,"label",11)(258,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysLootApplyDialog(!i.settingsManager.settings.alwaysLootApplyDialog)}),t.qZA(),t._UZ(259,"span",2),t.qZA(),t._UZ(260,"img",10),t.TgZ(261,"span",5),t._UZ(262,"span",6),t.qZA()()(),t.TgZ(263,"div",8)(264,"div",3)(265,"label",11)(266,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysLootDeck(!i.settingsManager.settings.alwaysLootDeck)}),t.qZA(),t._UZ(267,"span",2),t.qZA(),t._UZ(268,"img",10),t.TgZ(269,"span",5),t._UZ(270,"span",6),t.qZA()()(),t.TgZ(271,"div",8)(272,"div",3)(273,"label",11)(274,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyBuildingRewards(!i.settingsManager.settings.applyBuildingRewards)}),t.qZA(),t._UZ(275,"span",2),t.qZA(),t._UZ(276,"img",10),t.TgZ(277,"span",5),t._UZ(278,"span",6),t.qZA()()()(),t.TgZ(279,"div",7)(280,"div",8)(281,"div",3)(282,"label",11)(283,"input",9),t.NdJ("change",function(){return i.settingsManager.setBattleGoalsFh(!i.settingsManager.settings.battleGoalsFh)}),t.qZA(),t._UZ(284,"span",2),t.qZA(),t._UZ(285,"img",10),t.TgZ(286,"span",5),t._UZ(287,"span",6),t.qZA()()(),t.TgZ(288,"div",8)(289,"div",3)(290,"label",11)(291,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysAllyAttackModifierDeck(!i.settingsManager.settings.alwaysAllyAttackModifierDeck)}),t.qZA(),t._UZ(292,"span",2),t.qZA(),t._UZ(293,"img",10),t.TgZ(294,"span",5),t._UZ(295,"span",6),t.qZA()()(),t.TgZ(296,"div",8)(297,"div",3)(298,"label",11)(299,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysHazardousTerrain(!i.settingsManager.settings.alwaysHazardousTerrain)}),t.qZA(),t._UZ(300,"span",2),t.qZA(),t._UZ(301,"img",10),t.TgZ(302,"span",5),t._UZ(303,"span",6),t.qZA()()(),t.TgZ(304,"div",8)(305,"div",3)(306,"label",11)(307,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysFhSolo(!i.settingsManager.settings.alwaysFhSolo)}),t.qZA(),t._UZ(308,"span",2),t.qZA(),t._UZ(309,"img",10),t.TgZ(310,"span",5),t._UZ(311,"span",6),t.qZA()()(),t.TgZ(312,"div",8)(313,"div",3)(314,"label",11)(315,"input",9),t.NdJ("change",function(){return i.settingsManager.setFhGhItems(!i.settingsManager.settings.fhGhItems)}),t.qZA(),t._UZ(316,"span",2),t.qZA(),t._UZ(317,"img",10),t.TgZ(318,"span",5),t._UZ(319,"span",6),t.qZA()()()(),t._UZ(320,"div",17),t.TgZ(321,"div",1)(322,"label"),t._UZ(323,"span",2),t.qZA(),t.TgZ(324,"div",3),t.YNc(325,q3,1,0,"img",4),t.TgZ(326,"span",5),t._UZ(327,"span",6),t.qZA()()(),t.TgZ(328,"div",7)(329,"div",8)(330,"div",3)(331,"label")(332,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierDeck(!i.settingsManager.settings.characterAttackModifierDeck)}),t.qZA(),t._UZ(333,"span",2),t.qZA(),t._UZ(334,"img",10),t.TgZ(335,"span",5),t._UZ(336,"span",6),t.qZA()()(),t.TgZ(337,"div",8)(338,"div",3)(339,"label")(340,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterSheet(!i.settingsManager.settings.characterSheet)}),t.qZA(),t._UZ(341,"span",2),t.qZA(),t._UZ(342,"img",10),t.TgZ(343,"span",5),t._UZ(344,"span",6),t.qZA()()(),t.TgZ(345,"div",8)(346,"div",3)(347,"label")(348,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticUnlocking(!i.settingsManager.settings.automaticUnlocking)}),t.qZA(),t._UZ(349,"span",2),t.qZA(),t._UZ(350,"img",10),t.TgZ(351,"span",5),t._UZ(352,"span",6),t.qZA()()(),t.TgZ(353,"div",8)(354,"div",3)(355,"label")(356,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterItems(!i.settingsManager.settings.characterItems)}),t.qZA(),t._UZ(357,"span",2),t.qZA(),t._UZ(358,"img",10),t.TgZ(359,"span",5),t._UZ(360,"span",6),t.qZA()()(),t.TgZ(361,"div",8)(362,"div",3)(363,"label")(364,"input",9),t.NdJ("change",function(){return i.settingsManager.setBattleGoals(!i.settingsManager.settings.battleGoals)}),t.qZA(),t._UZ(365,"span",2),t.qZA(),t._UZ(366,"img",10),t.TgZ(367,"span",5),t._UZ(368,"span",6),t.qZA()()()(),t.TgZ(369,"div",7)(370,"div",8)(371,"div",3)(372,"label")(373,"input",9),t.NdJ("change",function(){return i.settingsManager.setLootDeck(!i.settingsManager.settings.lootDeck)}),t.qZA(),t._UZ(374,"span",2),t.qZA(),t._UZ(375,"img",10),t.TgZ(376,"span",5),t._UZ(377,"span",6),t.qZA()()(),t.TgZ(378,"div",8)(379,"div",3)(380,"label")(381,"input",9),t.NdJ("change",function(){return i.settingsManager.setAllyAttackModifierDeck(!i.settingsManager.settings.allyAttackModifierDeck)}),t.qZA(),t._UZ(382,"span",2),t.qZA(),t._UZ(383,"img",10),t.TgZ(384,"span",5),t._UZ(385,"span",6),t.qZA()()(),t.TgZ(386,"div",8)(387,"div",3)(388,"label")(389,"input",9),t.NdJ("change",function(){return i.settingsManager.setPartySheet(!i.settingsManager.settings.partySheet)}),t.qZA(),t._UZ(390,"span",2),t.qZA(),t._UZ(391,"img",10),t.TgZ(392,"span",5),t._UZ(393,"span",6),t.qZA()()(),t.TgZ(394,"div",8)(395,"div",3)(396,"label")(397,"input",9),t.NdJ("change",function(){return i.settingsManager.setMonsters(!i.settingsManager.settings.monsters)}),t.qZA(),t._UZ(398,"span",2),t.qZA(),t._UZ(399,"img",10),t.TgZ(400,"span",5),t._UZ(401,"span",6),t.qZA()()()(),t.TgZ(402,"div",1)(403,"label"),t._UZ(404,"span",2),t.qZA()(),t.TgZ(405,"div",7)(406,"div",8)(407,"div",3)(408,"label")(409,"input",9),t.NdJ("change",function(){return i.settingsManager.setFhStyle(!i.settingsManager.settings.fhStyle)}),t.qZA(),t._UZ(410,"span",2),t.qZA(),t._UZ(411,"img",10),t.TgZ(412,"span",5),t._UZ(413,"span",6),t.qZA()()(),t.TgZ(414,"div",8)(415,"div",3)(416,"label")(417,"input",9),t.NdJ("change",function(){return i.settingsManager.setDragValues(!i.settingsManager.settings.dragValues)}),t.qZA(),t._UZ(418,"span",2),t.qZA(),t._UZ(419,"img",10),t.TgZ(420,"span",5),t._UZ(421,"span",6),t.qZA()()(),t.TgZ(422,"div",8)(423,"div",3)(424,"label")(425,"input",9),t.NdJ("change",function(){return i.settingsManager.setPressDoubleClick(!i.settingsManager.settings.pressDoubleClick)}),t.qZA(),t._UZ(426,"span",2),t.qZA(),t._UZ(427,"img",10),t.TgZ(428,"span",5),t._UZ(429,"span",6),t.qZA()()(),t.TgZ(430,"div",8)(431,"div",3)(432,"label")(433,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableDragFigures(!i.settingsManager.settings.disableDragFigures)}),t.qZA(),t._UZ(434,"span",2),t.qZA(),t._UZ(435,"img",10),t.TgZ(436,"span",5),t._UZ(437,"span",6),t.qZA()()(),t.TgZ(438,"div",8)(439,"div",3)(440,"label",11)(441,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticAttackModifierFullscreen(!i.settingsManager.settings.automaticAttackModifierFullscreen)}),t.qZA(),t._UZ(442,"span",2),t.qZA(),t._UZ(443,"img",10),t.TgZ(444,"span",5),t._UZ(445,"span",6),t.qZA()()(),t.TgZ(446,"div",8)(447,"div",3)(448,"label",11)(449,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterSheetCompact(!i.settingsManager.settings.characterSheetCompact)}),t.qZA(),t._UZ(450,"span",2),t.qZA(),t._UZ(451,"img",10),t.TgZ(452,"span",5),t._UZ(453,"span",6),t.qZA()()()(),t.TgZ(454,"div",7)(455,"div",8)(456,"div",3)(457,"label",11)(458,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierAnimate(!i.settingsManager.settings.characterAttackModifierAnimate)}),t.qZA(),t._UZ(459,"span",2),t.qZA(),t._UZ(460,"img",10),t.TgZ(461,"span",5),t._UZ(462,"span",6),t.qZA()()(),t.TgZ(463,"div",8)(464,"div",3)(465,"label",11)(466,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierDeckPermanent(!i.settingsManager.settings.characterAttackModifierDeckPermanent)}),t.qZA(),t._UZ(467,"span",2),t.qZA(),t._UZ(468,"img",10),t.TgZ(469,"span",5),t._UZ(470,"span",6),t.qZA()()(),t.TgZ(471,"div",8)(472,"div",3)(473,"label",11)(474,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierDeckPermanentActive(!i.settingsManager.settings.characterAttackModifierDeckPermanentActive)}),t.qZA(),t._UZ(475,"span",2),t.qZA(),t._UZ(476,"img",10),t.TgZ(477,"span",5),t._UZ(478,"span",6),t.qZA()()(),t.TgZ(479,"div",8)(480,"div",3)(481,"label",11)(482,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterItemsPermanent(!i.settingsManager.settings.characterItemsPermanent)}),t.qZA(),t._UZ(483,"span",2),t.qZA(),t._UZ(484,"img",10),t.TgZ(485,"span",5),t._UZ(486,"span",6),t.qZA()()(),t.TgZ(487,"div",8)(488,"div",3)(489,"label",11)(490,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterItemsPermanentActive(!i.settingsManager.settings.characterItemsPermanentActive)}),t.qZA(),t._UZ(491,"span",2),t.qZA(),t._UZ(492,"img",10),t.TgZ(493,"span",5),t._UZ(494,"span",6),t.qZA()()()(),t._UZ(495,"div",17),t.TgZ(496,"div",7)(497,"div",8)(498,"a",18),t.NdJ("singleClick",function(){return i.zoomOut()})("doubleClick",function(){return i.zoomOut(!0)}),t._UZ(499,"span",2),t.qZA()(),t.TgZ(500,"div",8)(501,"a",18),t.NdJ("singleClick",function(){return i.zoomIn()})("doubleClick",function(){return i.zoomIn(!0)}),t._UZ(502,"span",2),t.qZA()(),t.TgZ(503,"div",8)(504,"a",19),t.NdJ("click",function(){return i.resetZoom()}),t._UZ(505,"span",2),t.qZA()(),t.TgZ(506,"div",8)(507,"div",3)(508,"label")(509,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisablePinchZoom(!i.settingsManager.settings.disablePinchZoom)}),t.qZA(),t._UZ(510,"span",2),t.qZA(),t._UZ(511,"img",10),t.TgZ(512,"span",5),t._UZ(513,"span",6),t.qZA()()(),t.TgZ(514,"div",8)(515,"div",3)(516,"label")(517,"input",9),t.NdJ("change",function(){return i.fullscreen()}),t.qZA(),t._UZ(518,"span",2),t.qZA(),t._UZ(519,"img",10),t.TgZ(520,"span",5),t._UZ(521,"span",6),t.qZA()()(),t.TgZ(522,"div",8)(523,"div",3)(524,"label")(525,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutoscroll(!i.settingsManager.settings.autoscroll)}),t.qZA(),t._UZ(526,"span",2),t.qZA(),t._UZ(527,"img",10),t.TgZ(528,"span",5),t._UZ(529,"span",6),t.qZA()()(),t.TgZ(530,"div",8)(531,"div",3)(532,"label")(533,"input",9),t.NdJ("change",function(){return i.togglePortraitMode()}),t.qZA(),t._UZ(534,"span",2),t.qZA(),t._UZ(535,"img",10),t.TgZ(536,"span",5),t._UZ(537,"span",6),t.qZA()()()(),t.TgZ(538,"div",7)(539,"div",8)(540,"div",3)(541,"label")(542,"input",9),t.NdJ("change",function(){return i.settingsManager.setHints(!i.settingsManager.settings.hints)}),t.qZA(),t._UZ(543,"span",2),t.qZA(),t._UZ(544,"img",10),t.TgZ(545,"span",5),t._UZ(546,"span",6),t.qZA()()(),t.TgZ(547,"div",8)(548,"div",3)(549,"label")(550,"input",9),t.NdJ("change",function(){return i.settingsManager.setTooltips(!i.settingsManager.settings.tooltips)}),t.qZA(),t._UZ(551,"span",2),t.qZA(),t._UZ(552,"img",10),t.TgZ(553,"span",5),t._UZ(554,"span",6),t.qZA()()(),t.TgZ(555,"div",8)(556,"div",3)(557,"label")(558,"input",9),t.NdJ("change",function(){return i.settingsManager.setBackupHint(!i.settingsManager.settings.backupHint)}),t.qZA(),t._UZ(559,"span",2),t.qZA(),t._UZ(560,"img",10),t.TgZ(561,"span",5),t._UZ(562,"span",6),t.qZA()()(),t.TgZ(563,"div",8)(564,"div",3)(565,"label")(566,"input",9),t.NdJ("change",function(){return i.settingsManager.setStatAnimations(!i.settingsManager.settings.statAnimations)}),t.qZA(),t._UZ(567,"span",2),t.qZA(),t._UZ(568,"img",10),t.TgZ(569,"span",5),t._UZ(570,"span",6),t.qZA()()(),t.TgZ(571,"div",8)(572,"div",3)(573,"label")(574,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableColumns(!i.settingsManager.settings.disableColumns)}),t.qZA(),t._UZ(575,"span",2),t.qZA(),t._UZ(576,"img",10),t.TgZ(577,"span",5),t._UZ(578,"span",6),t.qZA()()(),t.TgZ(579,"div",8)(580,"div",3)(581,"label")(582,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableAnimations(!i.settingsManager.settings.disableAnimations)}),t.qZA(),t._UZ(583,"span",2),t.qZA(),t._UZ(584,"img",10),t.TgZ(585,"span",5),t._UZ(586,"span",6),t.qZA()()(),t.TgZ(587,"div",8)(588,"div",3)(589,"label")(590,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableArtwork(!i.settingsManager.settings.disableArtwork)}),t.qZA(),t._UZ(591,"span",2),t.qZA(),t._UZ(592,"img",10),t.TgZ(593,"span",5),t._UZ(594,"span",6),t.qZA()()(),t.YNc(595,H3,8,3,"div",20),t.qZA(),t.TgZ(596,"div",8)(597,"div",3)(598,"label",19),t.NdJ("click",function(m){return i.resetBarsize(m)}),t._UZ(599,"span",2),t.TgZ(600,"input",21),t.NdJ("change",function(m){return i.setBarsize(m)})("input",function(m){return i.updateBarsize(m)}),t.qZA()(),t._UZ(601,"img",10),t.TgZ(602,"span",5),t._UZ(603,"span",6),t.qZA()()(),t.TgZ(604,"div",8)(605,"div",3)(606,"label",19),t.NdJ("click",function(m){return i.resetFontsize(m)}),t._UZ(607,"span",2),t.TgZ(608,"input",21),t.NdJ("change",function(m){return i.setFontsize(m)})("input",function(m){return i.updateFontsize(m)}),t.qZA()(),t._UZ(609,"img",10),t.TgZ(610,"span",5),t._UZ(611,"span",6),t.qZA()()(),t._UZ(612,"div",17),t.TgZ(613,"div",8)(614,"div",22)(615,"label",23),t._UZ(616,"span",2),t.TgZ(617,"input",24,25),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(s);const m=t.MAs(618);return t.KtG(i.settingsManager.setMaxUndo(+m.value))}),t.qZA()(),t.YNc(619,j3,1,0,"img",26),t.YNc(620,z3,5,2,"div",27),t.qZA()(),t.TgZ(621,"div",28)(622,"label")(623,"input",9),t.NdJ("change",function(){return i.settingsManager.setBrowserNavigation(!i.settingsManager.settings.browserNavigation)}),t.qZA(),t._UZ(624,"span",2),t.qZA()(),t.TgZ(625,"div",7)(626,"div",29)(627,"label"),t._UZ(628,"span",2),t.qZA(),t.TgZ(629,"div",3),t.YNc(630,G3,1,0,"img",4),t.TgZ(631,"span",5),t._UZ(632,"span",6),t.qZA()()(),t.YNc(633,V3,4,5,"div",30),t.qZA(),t.TgZ(634,"div",7)(635,"div",29)(636,"label"),t._UZ(637,"span",2),t.qZA()(),t.YNc(638,Y3,4,5,"div",30),t._UZ(639,"div",17),t.TgZ(640,"div",8)(641,"div",3)(642,"label")(643,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticTheme(!i.settingsManager.settings.automaticTheme)}),t.qZA(),t._UZ(644,"span",2),t.qZA(),t._UZ(645,"img",10),t.TgZ(646,"span",5),t._UZ(647,"span",6),t.qZA()()(),t.TgZ(648,"div",8)(649,"div",3)(650,"label",11)(651,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterCompact(!i.settingsManager.settings.characterCompact)}),t.qZA(),t._UZ(652,"span",2),t.qZA(),t._UZ(653,"img",10),t.TgZ(654,"span",5),t._UZ(655,"span",6),t.qZA()()()(),t._UZ(656,"div",17),t.TgZ(657,"div",8)(658,"a",19),t.NdJ("click",function(){return i.helperDefaults()}),t._UZ(659,"span",2),t.qZA()(),t.TgZ(660,"div",8)(661,"a",19),t.NdJ("click",function(){return i.setMenu.emit(i.SubMenu.debug)}),t._UZ(662,"span",2),t.qZA()()()}if(2&e){const s=t.MAs(618);t.Q6J("ngClass",t.VKq(281,K3,i.gameManager.stateManager.wsState()==i.WebSocket.OPEN)),t.xp6(3),t.Q6J("ghs-label","settings.gameplay"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.scenarioRooms"),t.xp6(3),t.Q6J("ghs-label","settings.scenarioRooms.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.scenarioRules),t.xp6(1),t.Q6J("ghs-label","settings.scenarioRules"),t.xp6(3),t.Q6J("ghs-label","settings.scenarioRules.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(283,nn,!i.settingsManager.settings.scenarioRooms)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.treasures&&i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.treasures"),t.xp6(3),t.Q6J("ghs-label","settings.treasures.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(285,nn,!i.settingsManager.settings.expireConditions&&!i.settingsManager.settings.applyConditions)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.disabledTurnConfirmation||!i.settingsManager.settings.expireConditions&&!i.settingsManager.settings.applyConditions),t.xp6(1),t.Q6J("ghs-label","settings.disabledTurnConfirmation"),t.xp6(3),t.Q6J("ghs-label","settings.disabledTurnConfirmation.hint"),t.xp6(3),t.Q6J("ghs-label","settings.character"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.initiativeRequired),t.xp6(1),t.Q6J("ghs-label","settings.initiativeRequired"),t.xp6(3),t.Q6J("ghs-label","settings.initiativeRequired.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.hideAbsent),t.xp6(1),t.Q6J("ghs-label","settings.hideAbsent"),t.xp6(3),t.Q6J("ghs-label","settings.hideAbsent.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(287,nn,!i.settingsManager.settings.scenarioRooms||!i.settingsManager.settings.treasures)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.treasuresLoot&&i.settingsManager.settings.scenarioRooms&&i.settingsManager.settings.treasures),t.xp6(1),t.Q6J("ghs-label","settings.treasuresLoot"),t.xp6(3),t.Q6J("ghs-label","settings.treasuresLoot.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.applyLongRest),t.xp6(1),t.Q6J("ghs-label","settings.applyLongRest"),t.xp6(3),t.Q6J("ghs-label","settings.applyLongRest.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(289,nn,!i.settingsManager.settings.characterSheet)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterSheet&&i.settingsManager.settings.applyRetirement),t.xp6(1),t.Q6J("ghs-label","settings.applyRetirement"),t.xp6(3),t.Q6J("ghs-label","settings.applyRetirement.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.activeSummons),t.xp6(1),t.Q6J("ghs-label","settings.activeSummons"),t.xp6(3),t.Q6J("ghs-label","settings.activeSummons.hint"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.characterIdentities),t.xp6(1),t.Q6J("ghs-label","settings.characterIdentities"),t.xp6(3),t.Q6J("ghs-label","settings.characterIdentities.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(291,nn,!i.settingsManager.settings.characterIdentities)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterIdentities&&i.settingsManager.settings.characterIdentityHint),t.xp6(1),t.Q6J("ghs-label","settings.characterIdentityHint"),t.xp6(3),t.Q6J("ghs-label","settings.characterIdentityHint.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(293,nn,!i.settingsManager.settings.battleGoals||!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.battleGoals&&(i.settingsManager.settings.battleGoalsCharacter||!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("ghs-label","settings.battleGoalsCharacter"),t.xp6(3),t.Q6J("ghs-label","settings.battleGoalsCharacter.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterHandSize),t.xp6(1),t.Q6J("ghs-label","settings.characterHandSize"),t.xp6(3),t.Q6J("ghs-label","settings.characterHandSize.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterTraits),t.xp6(1),t.Q6J("ghs-label","settings.characterTraits"),t.xp6(3),t.Q6J("ghs-label","settings.characterTraits.hint"),t.xp6(3),t.Q6J("ghs-label","settings.monsters"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.monsters),t.xp6(3),t.Q6J("ghs-label","settings.standees"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.monsters),t.xp6(3),t.Q6J("ngClass",t.VKq(295,nn,i.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.activeStandees&&!i.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.activeStandees"),t.xp6(3),t.Q6J("ghs-label","settings.activeStandees.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(297,nn,!i.settingsManager.settings.scenarioRooms||i.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.automaticStandees&&!i.settingsManager.settings.disableStandees&&i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.automaticStandees"),t.xp6(3),t.Q6J("ghs-label","settings.automaticStandees.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(299,nn,i.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",!i.settingsManager.settings.disableStandees&&i.settingsManager.settings.standeeStats),t.xp6(1),t.Q6J("ghs-label","settings.standeeStats"),t.xp6(3),t.Q6J("ghs-label","settings.standeeStats.hint"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.monsters),t.xp6(3),t.Q6J("ghs-label","settings.conditions"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.expireConditions),t.xp6(1),t.Q6J("ghs-label","settings.expireConditions"),t.xp6(3),t.Q6J("ghs-label","settings.expireConditions.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.applyConditions),t.xp6(1),t.Q6J("ghs-label","settings.applyConditions"),t.xp6(3),t.Q6J("ghs-label","settings.applyConditions.hint"),t.xp6(2),t.Q6J("ngClass",t.VKq(301,nn,!i.settingsManager.settings.applyConditions)),t.xp6(2),t.Q6J("ngForOf",i.applyConditionsExcludes),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.moveElements),t.xp6(1),t.Q6J("ghs-label","settings.moveElements"),t.xp6(3),t.Q6J("ghs-label","settings.moveElements.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(303,nn,!i.settingsManager.settings.applyConditions)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.applyConditions&&i.settingsManager.settings.activeApplyConditions),t.xp6(1),t.Q6J("ghs-label","settings.activeApplyConditions"),t.xp6(3),t.Q6J("ghs-label","settings.activeApplyConditions.hint"),t.xp6(2),t.Q6J("ngClass",t.VKq(305,nn,!i.settingsManager.settings.applyConditions||!i.settingsManager.settings.activeApplyConditions)),t.xp6(2),t.Q6J("ngForOf",i.activeApplyConditionsExcludes),t.xp6(4),t.Q6J("ghs-label","settings.fhRules"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(4),t.Q6J("ngClass",t.VKq(307,nn,!i.settingsManager.settings.lootDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot),t.xp6(1),t.Q6J("ghs-label","settings.applyLoot"),t.xp6(3),t.Q6J("ghs-label","settings.applyLoot.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(309,nn,!i.settingsManager.settings.lootDeck||!i.settingsManager.settings.applyLoot)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot&&i.settingsManager.settings.applyLootRandomItem),t.xp6(1),t.Q6J("ghs-label","settings.applyLootRandomItem"),t.xp6(3),t.Q6J("ghs-label","settings.applyLootRandomItem.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(311,nn,!i.settingsManager.settings.lootDeck||!i.settingsManager.settings.applyLoot)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.alwaysLootApplyDialog&&i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot),t.xp6(1),t.Q6J("ghs-label","settings.alwaysLootApplyDialog"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysLootApplyDialog.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(313,nn,!i.settingsManager.settings.lootDeck||i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.lootDeck&&(i.settingsManager.settings.alwaysLootDeck||i.gameManager.fhRules())),t.xp6(1),t.Q6J("ghs-label","settings.alwaysLootDeck"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysLootDeck.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(315,nn,!i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.applyBuildingRewards&&i.gameManager.fhRules()),t.xp6(1),t.Q6J("ghs-label","settings.applyBuildingRewards"),t.xp6(3),t.Q6J("ghs-label","settings.applyBuildingRewards.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(317,nn,!i.settingsManager.settings.battleGoals||i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.battleGoals&&(i.gameManager.fhRules()||i.settingsManager.settings.battleGoalsFh)),t.xp6(1),t.Q6J("ghs-label","settings.battleGoalsFh"),t.xp6(3),t.Q6J("ghs-label","settings.battleGoalsFh.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(319,nn,!i.settingsManager.settings.allyAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.allyAttackModifierDeck&&i.settingsManager.settings.alwaysAllyAttackModifierDeck),t.xp6(1),t.Q6J("ghs-label","settings.alwaysAllyAttackModifierDeck"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysAllyAttackModifierDeck.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(321,nn,i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.alwaysHazardousTerrain||i.gameManager.fhRules()),t.xp6(1),t.Q6J("ghs-label","settings.alwaysHazardousTerrain"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysHazardousTerrain.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(323,nn,i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.alwaysFhSolo||i.gameManager.fhRules()),t.xp6(1),t.Q6J("ghs-label","settings.alwaysFhSolo"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysFhSolo.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(325,nn,!i.settingsManager.settings.characterItems&&!i.settingsManager.settings.characterSheet||!i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",(i.settingsManager.settings.characterItems||i.settingsManager.settings.characterSheet)&&i.settingsManager.settings.fhGhItems),t.xp6(1),t.Q6J("ghs-label","settings.fhGhItems"),t.xp6(3),t.Q6J("ghs-label","settings.fhGhItems.hint"),t.xp6(4),t.Q6J("ghs-label","settings.additional"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierDeck"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierDeck.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterSheet),t.xp6(1),t.Q6J("ghs-label","settings.characterSheet"),t.xp6(3),t.Q6J("ghs-label","settings.characterSheet.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.automaticUnlocking),t.xp6(1),t.Q6J("ghs-label","settings.automaticUnlocking"),t.xp6(3),t.Q6J("ghs-label","settings.automaticUnlocking.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterItems),t.xp6(1),t.Q6J("ghs-label","settings.characterItems"),t.xp6(3),t.Q6J("ghs-label","settings.characterItems.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.battleGoals),t.xp6(1),t.Q6J("ghs-label","settings.battleGoals"),t.xp6(3),t.Q6J("ghs-label","settings.battleGoals.hint"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.lootDeck),t.xp6(1),t.Q6J("ghs-label","settings.lootDeck"),t.xp6(3),t.Q6J("ghs-label","settings.lootDeck.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.allyAttackModifierDeck),t.xp6(1),t.Q6J("ghs-label","settings.allyAttackModifierDeck"),t.xp6(3),t.Q6J("ghs-label","settings.allyAttackModifierDeck.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.partySheet),t.xp6(1),t.Q6J("ghs-label","settings.partySheet"),t.xp6(3),t.Q6J("ghs-label","settings.partySheet.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.monsters),t.xp6(1),t.Q6J("ghs-label","settings.monsters"),t.xp6(3),t.Q6J("ghs-label","settings.monsters.hint"),t.xp6(3),t.Q6J("ghs-label","settings.interface"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.fhStyle),t.xp6(1),t.Q6J("ghs-label","settings.fhStyle"),t.xp6(3),t.Q6J("ghs-label","settings.fhStyle.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.dragValues),t.xp6(1),t.Q6J("ghs-label","settings.dragValues"),t.xp6(3),t.Q6J("ghs-label","settings.dragValues.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.pressDoubleClick),t.xp6(1),t.Q6J("ghs-label","settings.pressDoubleClick"),t.xp6(3),t.Q6J("ghs-label","settings.pressDoubleClick.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableDragFigures),t.xp6(1),t.Q6J("ghs-label","settings.disableDragFigures"),t.xp6(3),t.Q6J("ghs-label","settings.disableDragFigures.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(327,nn,!i.settingsManager.settings.portraitMode)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.automaticAttackModifierFullscreen&&i.settingsManager.settings.portraitMode),t.xp6(1),t.Q6J("ghs-label","settings.automaticAttackModifierFullscreen"),t.xp6(3),t.Q6J("ghs-label","settings.automaticAttackModifierFullscreen.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(329,nn,!i.settingsManager.settings.characterSheet)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterSheet&&i.settingsManager.settings.characterSheetCompact),t.xp6(1),t.Q6J("ghs-label","settings.characterSheetCompact"),t.xp6(3),t.Q6J("ghs-label","settings.characterSheetCompact.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(331,nn,!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierAnimate),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierAnimate"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierAnimate.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(333,nn,!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierDeckPermanent),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanent"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanent.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(335,nn,!i.settingsManager.settings.characterAttackModifierDeck||!i.settingsManager.settings.characterAttackModifierDeckPermanent)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierDeckPermanent&&i.settingsManager.settings.characterAttackModifierDeckPermanentActive),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanentActive"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanentActive.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(337,nn,!i.settingsManager.settings.characterItems)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterItems&&i.settingsManager.settings.characterItemsPermanent),t.xp6(1),t.Q6J("ghs-label","settings.characterItemsPermanent"),t.xp6(3),t.Q6J("ghs-label","settings.characterItemsPermanent.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(339,nn,!i.settingsManager.settings.characterItems||!i.settingsManager.settings.characterItemsPermanent)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterItems&&i.settingsManager.settings.characterItemsPermanent&&i.settingsManager.settings.characterItemsPermanentActive),t.xp6(1),t.Q6J("ghs-label","settings.characterItemsPermanentActive"),t.xp6(3),t.Q6J("ghs-label","settings.characterItemsPermanentActive.hint"),t.xp6(5),t.Q6J("ghs-label","settings.zoom.out"),t.xp6(3),t.Q6J("ghs-label","settings.zoom.in"),t.xp6(3),t.Q6J("ghs-label","settings.zoom.reset"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disablePinchZoom),t.xp6(1),t.Q6J("ghs-label","settings.disablePinchZoom"),t.xp6(3),t.Q6J("ghs-label","settings.disablePinchZoom.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.fullscreen),t.xp6(1),t.Q6J("ghs-label","settings.fullscreen"),t.xp6(3),t.Q6J("ghs-label","settings.fullscreen.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.autoscroll),t.xp6(1),t.Q6J("ghs-label","settings.autoscroll"),t.xp6(3),t.Q6J("ghs-label","settings.autoscroll.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.portraitMode),t.xp6(1),t.Q6J("ghs-label","settings.portraitMode"),t.xp6(3),t.Q6J("ghs-label","settings.portraitMode.hint"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.hints),t.xp6(1),t.Q6J("ghs-label","settings.hints"),t.xp6(3),t.Q6J("ghs-label","settings.hints.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.tooltips),t.xp6(1),t.Q6J("ghs-label","settings.tooltips"),t.xp6(3),t.Q6J("ghs-label","settings.tooltips.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.backupHint),t.xp6(1),t.Q6J("ghs-label","settings.backupHint"),t.xp6(3),t.Q6J("ghs-label","settings.backupHint.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.statAnimations),t.xp6(1),t.Q6J("ghs-label","settings.statAnimations"),t.xp6(3),t.Q6J("ghs-label","settings.statAnimations.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableColumns),t.xp6(1),t.Q6J("ghs-label","settings.disableColumns"),t.xp6(3),t.Q6J("ghs-label","settings.disableColumns.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableAnimations),t.xp6(1),t.Q6J("ghs-label","settings.disableAnimations"),t.xp6(3),t.Q6J("ghs-label","settings.disableAnimations.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ghs-label","settings.disableArtwork"),t.xp6(3),t.Q6J("ghs-label","settings.disableArtwork.hint"),t.xp6(1),t.Q6J("ngIf",i.wakeLock),t.xp6(4),t.Q6J("ghs-label","settings.barsize"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.barsize),t.xp6(3),t.Q6J("ghs-label","settings.barsize.hint"),t.xp6(4),t.Q6J("ghs-label","settings.fontsize"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.fontsize),t.xp6(3),t.Q6J("ghs-label","settings.fontsize.hint"),t.xp6(5),t.Q6J("ghs-label","settings.maxUndo"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.maxUndo)("max",i.storageManager.db?"":50)("size",s.value.length)("ghs-label","settings.maxUndo")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngIf",!i.storageManager.db),t.xp6(1),t.Q6J("ngIf",!i.storageManager.db),t.xp6(3),t.Q6J("checked",i.settingsManager.settings.browserNavigation),t.xp6(1),t.Q6J("ghs-label","settings.browserNavigation"),t.xp6(4),t.Q6J("ghs-label","settings.locale"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(1),t.Q6J("ngForOf",i.settingsManager.locales),t.xp6(4),t.Q6J("ghs-label","settings.theme"),t.xp6(1),t.Q6J("ngForOf",t.DdM(341,$3)),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.automaticTheme),t.xp6(1),t.Q6J("ghs-label","settings.automaticTheme"),t.xp6(3),t.Q6J("ghs-label","settings.automaticTheme.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(342,nn,"modern"==i.settingsManager.settings.theme)),t.xp6(1),t.Q6J("checked","modern"!=i.settingsManager.settings.theme&&i.settingsManager.settings.characterCompact),t.xp6(1),t.Q6J("ghs-label","settings.characterCompact"),t.xp6(3),t.Q6J("ghs-label","settings.characterCompact.hint"),t.xp6(4),t.Q6J("ghs-label","settings.helperDefaults"),t.xp6(3),t.Q6J("ghs-label","settings.debug")}},dependencies:[x.mk,x.sg,x.O5,ie,An],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',"@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%]{display:flex;align-items:center}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition.immunity[_ngcontent-%COMP%]{opacity:.7;filter:grayscale(.3)}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{opacity:.6;filter:none}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .hint-trigger[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .hint.right[_ngcontent-%COMP%]{transform:translate(-50%)}.line.disabled[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{filter:grayscale(.6)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg.sync-settings[_ngcontent-%COMP%]{height:2em;width:auto;filter:var(--ghs-filter-disabled) var(--ghs-filter-outline-thin-black)}.menu-container.connected[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg.sync-settings[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-outline-thin-black)}"]})),a})();const X3=["characterSheet"];let IO=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"characterSheet",void 0),this.character=e,this.dialogRef=i,this.dialogRef.closed.subscribe({next:()=>{this.characterSheet.applyValues()}})}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-sheet-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(X3,5),2&e){let s;t.iGM(s=t.CRH())&&(i.characterSheet=s.first)}},decls:4,vars:1,consts:[[1,"light","character-sheet-dialog"],[1,"scroll-container"],[3,"character"],["characterSheet",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"ghs-character-sheet",2,3),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("character",i.character))},styles:[".character-sheet-dialog[_ngcontent-%COMP%]{position:relative;background-color:var(--ghs-color-white)}.character-sheet-dialog[_ngcontent-%COMP%] ghs-character-sheet[_ngcontent-%COMP%]{display:block}"]})),a})();var Wu=E(7680),Vn=E(6223),le=E(6441),Mw=E(9048),ei=E(4756);function tA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(n.value.split(":")[1])}}function eA(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function nA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}const Ow=function(o){return{target:o}};function iA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",11),t.YNc(2,tA,2,1,"span",12),t.YNc(3,eA,2,7,"span",13),t.YNc(4,nA,2,3,"span",14),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,Ow,e.getTarget(n)||e.getRange(n)))("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"condition/"+n.value.split(":")[0]+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.value.split(":").length>1),t.xp6(1),t.Q6J("ngIf",e.getTarget(n)),t.xp6(1),t.Q6J("ngIf",e.getRange(n))}}function oA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",19),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value+".svg",t.LSH)}}function aA(o,a){if(1&o&&(t.TgZ(0,"span",20)(1,"span",21),t._UZ(2,"img",22),t.qZA(),t.TgZ(3,"span",21),t._UZ(4,"img",22),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value.split("|")[0]+".svg",t.LSH),t.xp6(2),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value.split("|")[1]+".svg",t.LSH)}}function sA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function rA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",23),t._UZ(2,"img",22),t.qZA(),t.TgZ(3,"span",24),t._uU(4,":"),t.qZA(),t.YNc(5,sA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value+".svg",t.LSH),t.xp6(3),t.Q6J("ngIf",n.effects)}}function cA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,+n.value))}}function lA(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function gA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}const dA=function(o,a){return{target:o,"sub-effects":a}},NO=function(o){return{"ghs-svg":o}};function hA(o,a){if(1&o&&(t.TgZ(0,"div",28),t._UZ(1,"img",29),t.YNc(2,cA,3,3,"span",12),t.YNc(3,lA,2,7,"span",13),t.YNc(4,gA,2,3,"span",14),t.TgZ(5,"div",26)(6,"span",24),t._uU(7,","),t.qZA(),t._UZ(8,"ghs-attackmodifier-effects",27),t.qZA()()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Udp("border-width",s.offsetWidth*(s.attackModifier.type==s.AttackModifierType.plus0&&0==e?.02:.01)+"px"),t.Q6J("ngClass",t.WLB(12,dA,s.getTarget(i)||s.getRange(i),s.subEffects(i).length>0)),t.xp6(1),t.Q6J("ngClass",t.VKq(15,NO,s.isGhsSvg(i.type)))("src","./assets/images/action/"+i.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.value),t.xp6(1),t.Q6J("ngIf",s.getTarget(i)),t.xp6(1),t.Q6J("ngIf",s.getRange(i)),t.xp6(4),t.Q6J("attackModifier",s.attackModifier)("effects",s.subEffects(i))("offsetWidth",s.offsetWidth)("newStyle",s.newStyle)}}function uA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(+n.value)}}function _A(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function pA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}function fA(o,a){if(1&o&&(t.TgZ(0,"div",30),t._UZ(1,"img",29),t.YNc(2,uA,2,1,"span",12),t.YNc(3,_A,2,7,"span",13),t.YNc(4,pA,2,3,"span",14),t.TgZ(5,"div",26),t._UZ(6,"ghs-attackmodifier-effects",27),t.qZA()()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Udp("border-width",s.offsetWidth*(s.attackModifier.type==s.AttackModifierType.plus0&&0==e?.02:.01)+"px"),t.Q6J("ngClass",t.VKq(12,Ow,s.getTarget(i)||s.getRange(i))),t.xp6(1),t.Q6J("ngClass",t.VKq(14,NO,s.isGhsSvg(i.type)))("src","./assets/images/"+(s.settingsManager.settings.fhStyle?"fh/":"")+"action/"+i.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.value),t.xp6(1),t.Q6J("ngIf",s.getTarget(i)),t.xp6(1),t.Q6J("ngIf",s.getRange(i)),t.xp6(2),t.Q6J("attackModifier",s.attackModifier)("effects",s.subEffects(i))("offsetWidth",s.offsetWidth)("newStyle",s.newStyle)}}function mA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(+n.value)}}function vA(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function CA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}function MA(o,a){if(1&o&&(t.TgZ(0,"div",31),t._UZ(1,"img",29),t.YNc(2,mA,2,1,"span",12),t.YNc(3,vA,2,7,"span",13),t.YNc(4,CA,2,3,"span",14),t.TgZ(5,"div",26),t._UZ(6,"ghs-attackmodifier-effects",27),t.qZA()()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Udp("border-width",s.offsetWidth*(s.attackModifier.type==s.AttackModifierType.plus0&&0==e?.02:.01)+"px"),t.Q6J("ngClass",t.VKq(12,Ow,s.getTarget(i)||s.getRange(i))),t.xp6(1),t.Q6J("ngClass",t.VKq(14,NO,s.isGhsSvg(i.type)))("src","./assets/images/"+(s.settingsManager.settings.fhStyle?"fh/":"")+"action/"+i.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.value),t.xp6(1),t.Q6J("ngIf",s.getTarget(i)),t.xp6(1),t.Q6J("ngIf",s.getRange(i)),t.xp6(2),t.Q6J("attackModifier",s.attackModifier)("effects",s.subEffects(i))("offsetWidth",s.offsetWidth)("newStyle",s.newStyle)}}function OA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function PA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",19),t.YNc(2,OA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/target.svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.effects)}}function yA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function bA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action-hex",32),t.YNc(2,yA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("value",n.value),t.xp6(1),t.Q6J("ngIf",n.effects)}}function xA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function wA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._UZ(2,"img",34)(3,"img",35),t.qZA(),t.YNc(4,xA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(4),t.Q6J("ngIf",n.effects)}}function kA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function TA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",36)(2,"span",33),t._UZ(3,"img",34)(4,"img",35),t.qZA(),t.TgZ(5,"span",37),t._UZ(6,"span",38),t.qZA(),t.YNc(7,kA,2,4,"div",25),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(6),t.Q6J("ghs-label","game.attackModifiers.effects.refreshSpentItem"),t.xp6(1),t.Q6J("ngIf",n.effects)}}function ZA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function AA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._UZ(2,"img",39)(3,"img",40),t.qZA(),t.YNc(4,ZA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(4),t.Q6J("ngIf",n.effects)}}function SA(o,a){if(1&o&&(t.TgZ(0,"span",45),t._uU(1),t.qZA()),2&o){const n=t.oxw(5);t.xp6(1),t.AsE("",n.attackModifier.value<0?"-":"+","",n.attackModifier.value,"")}}const EA=function(o){return{"text-white":o}};function DA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,SA,2,2,"span",42),t.TgZ(2,"span",43),t._UZ(3,"span",44),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.townGuard),t.xp6(2),t.Q6J("ngClass",t.VKq(3,EA,!e.settingsManager.settings.fhStyle||e.townGuard))("ghs-label",n.value+"")}}function IA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",46),t._UZ(2,"img",22),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(2),t.Q6J("src","./assets/images/action/custom/"+n.value+".svg",t.LSH)}}function NA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function JA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,DA,4,5,"ng-container",41),t.YNc(2,IA,3,1,"ng-container",41),t.YNc(3,NA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",!n.icon),t.xp6(1),t.Q6J("ngIf",n.icon),t.xp6(1),t.Q6J("ngIf",n.effects)}}const UA=function(o){return{"new-style":o}};function LA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",47),t._UZ(2,"span",38),t.qZA(),t._UZ(3,"ghs-attackmodifier-effects",27),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(6,UA,e.newStyle)),t.xp6(1),t.Q6J("ghs-label","or"),t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function QA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function RA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",48),t.YNc(2,QA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/overlays/replace/"+n.value+".png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.effects)}}function FA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(+n.value)}}function qA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",11),t.YNc(2,FA,2,1,"span",12),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(3,NO,e.isGhsSvg(n.type)))("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"action/"+n.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.value)}}const HA=function(o,a,n,e,i,s,l,m){return{center:o,fh:a,"new-style":n,"town-guard":e,multiple:i,"multiple-2":s,"multiple-3":l,"multiple-4":m}};function jA(o,a){if(1&o&&(t.TgZ(0,"span",3),t.ynx(1,4),t.YNc(2,iA,5,7,"ng-container",5),t.YNc(3,oA,2,1,"ng-container",5),t.YNc(4,aA,5,2,"span",6),t.YNc(5,rA,6,2,"ng-container",5),t.YNc(6,hA,9,17,"div",7),t.YNc(7,fA,7,16,"div",8),t.YNc(8,MA,7,16,"div",9),t.YNc(9,PA,3,2,"ng-container",5),t.YNc(10,bA,3,2,"ng-container",5),t.YNc(11,wA,5,1,"ng-container",5),t.YNc(12,TA,8,2,"ng-container",5),t.YNc(13,AA,5,1,"ng-container",5),t.YNc(14,JA,4,3,"ng-container",5),t.YNc(15,LA,4,8,"ng-container",5),t.YNc(16,RA,3,2,"ng-container",5),t.YNc(17,qA,3,5,"ng-container",10),t.BQk(),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Gre("effect ",n.type,""),t.Q6J("ngClass",t.qlk(20,HA,e.attackModifier.type==e.AttackModifierType.plus0||e.newStyle||0==e.attackModifier.value&&e.townGuard,e.settingsManager.settings.fhStyle,e.newStyle,e.townGuard,e.effects.length>1,2==e.effects.length,3==e.effects.length,4==e.effects.length)),t.xp6(1),t.Q6J("ngSwitch",n.type),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.condition),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.element),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.elementHalf),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.elementConsume),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.heal),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.shield),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.retaliate),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.target),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.area),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.refreshItem),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.refreshSpentItem),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.recoverRandomDiscard),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.custom),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.or),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.changeType)}}function BA(o,a){if(1&o&&(t.TgZ(0,"span",1),t.YNc(1,jA,18,29,"span",2),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.effects)}}let zA=(()=>{var o;class a{constructor(){(0,_.Z)(this,"offsetWidth",void 0),(0,_.Z)(this,"attackModifier",void 0),(0,_.Z)(this,"effects",void 0),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"AttackModifierEffectType",Lt.US),(0,_.Z)(this,"invertIcons",[Lt.US.attack,Lt.US.heal,Lt.US.range,Lt.US.retaliate,Lt.US.shield,Lt.US.target])}getTarget(e){if(e.effects){const i=e.effects.find(l=>l.type==Lt.US.specialTarget);if(i)return"game.specialTarget."+i.value;const s=e.effects.find(l=>l.type==Lt.US.custom);if(s)return s.value}return""}getRange(e){if(e.effects){const i=e.effects.find(s=>s.type==Lt.US.range);if(i)return"%game.action.range:"+i.value+"%"}return""}subEffects(e){return e.effects&&e.effects.filter(i=>i.type!=Lt.US.specialTarget&&i.type!=Lt.US.target&&i.type!=Lt.US.range&&i.type!=Lt.US.custom)||[]}isGhsSvg(e){return-1!=this.invertIcons.indexOf(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-effects"]],inputs:{offsetWidth:"offsetWidth",attackModifier:"attackModifier",effects:"effects",newStyle:"newStyle",townGuard:"townGuard"},decls:1,vars:1,consts:[["class","effects",4,"ngIf"],[1,"effects"],[3,"class","ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","element-half-container",4,"ngSwitchCase"],["class","effect-container heal-container",3,"border-width","ngClass",4,"ngSwitchCase"],["class","effect-container shield-container",3,"border-width","ngClass",4,"ngSwitchCase"],["class","effect-container retaliate-container",3,"border-width","ngClass",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"full",3,"ngClass","src"],["class","value",4,"ngIf"],[3,"class",4,"ngIf"],["class","target-value-container range",4,"ngIf"],[1,"value"],[1,"target-value","text-white",3,"ghs-label","ghs-label-args"],[1,"target-value-container","range"],[1,"target-value","text-white",3,"ghs-label"],[1,"full",3,"src"],[1,"element-half-container"],[1,"element-half"],[3,"src"],[1,"element","consume"],[1,"divider"],["class","sub-effects",4,"ngIf"],[1,"sub-effects"],[3,"attackModifier","effects","offsetWidth","newStyle"],[1,"effect-container","heal-container",3,"ngClass"],[3,"ngClass","src"],[1,"effect-container","shield-container",3,"ngClass"],[1,"effect-container","retaliate-container",3,"ngClass"],[3,"value"],[1,"card-action"],["src","./assets/images/action/card/refresh.svg",1,"ghs-svg"],["src","./assets/images/action/card/overlay/refresh.svg",1,"overlay"],[1,"card-action-container"],[1,"label"],[3,"ghs-label"],["src","./assets/images/action/card/recover.svg",1,"ghs-svg"],["src","./assets/images/action/card/overlay/recover.svg",1,"overlay"],[4,"ngIf"],["class","type",4,"ngIf"],[1,"custom-value-container"],[1,"custom-value",3,"ngClass","ghs-label"],[1,"type"],[1,"effect-icon"],[1,"or-label",3,"ngClass"],[1,"overlay",3,"src"]],template:function(e,i){1&e&&t.YNc(0,BA,2,1,"span",0),2&e&&t.Q6J("ngIf",i.effects)},dependencies:[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,o,Sf,ie,Kd],styles:['.effects[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;z-index:3;width:18%;height:28%;top:35%;left:6%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]:nth-child(2){top:5%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] img.full[_ngcontent-%COMP%]{width:100%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:35%;left:50%;transform:translate(-50%);font-family:var(--ghs-font-title);font-size:.6em;color:var(--ghs-color-white)}.effects[_ngcontent-%COMP%] .effect.condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:55%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:40%;bottom:5%;font-family:var(--ghs-font-title);font-size:.6em;line-height:.8em;color:var(--ghs-color-white);left:50%;transform:translate(-50%)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%] .target-value[_ngcontent-%COMP%]{display:inline;text-align:center}.effects[_ngcontent-%COMP%] .effect.fh[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:.7em}.effects[_ngcontent-%COMP%] .effect.fh[_ngcontent-%COMP%] .target-value-container.target-self[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.fh[_ngcontent-%COMP%] .target-value-container.target-allyShort[_ngcontent-%COMP%]{font-size:1.3em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;border:1px solid var(--ghs-color-white);border-radius:100%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:8%;width:40%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:22%;font-size:.8em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:10%;left:50%;transform:translate(-50%);width:50%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:35%;left:50%;transform:translate(-50%);font-family:ghs-title;font-size:.6em;color:var(--ghs-color-black)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container[_ngcontent-%COMP%]{background-color:#a11f1a}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%]{display:none}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{left:35%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%]{display:block;position:absolute;top:15%;left:40%;width:100%;height:100%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{position:absolute;top:10%;left:10%;color:var(--ghs-color-white);margin-left:5%;margin-right:3%;font-size:1.5em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{top:0;left:0;width:100%;height:100%;transform:none}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container[_ngcontent-%COMP%]{background-color:#6e4e34}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:10%;width:80%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1em;top:35%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:15%;width:48%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:17%;font-size:.8em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container[_ngcontent-%COMP%]{background-color:#384c5a;position:relative}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50%;left:42%;top:20%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:1em;top:25%;left:80%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:15%;width:48%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:17%;font-size:.8em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%]{position:relative;width:80%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;top:0;left:0;width:100%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%] img.overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--ghs-color-white);text-transform:uppercase}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-normal)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{display:block;text-align:center;font-size:.8em;line-height:.8em;text-shadow:var(--ghs-outline-thin);white-space:break-spaces}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .element.consume[_ngcontent-%COMP%]{width:50%;height:auto;display:flex}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{margin-left:5%;margin-right:3%}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%]{width:50%}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%]{position:relative;display:block;width:100%}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%] .effect.center.element[_ngcontent-%COMP%]{width:100%;height:auto;display:flex}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.effects[_ngcontent-%COMP%] .effect.pull[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.push[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:60%}.effects[_ngcontent-%COMP%] .effect.pierce[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{left:30%;background-color:#c6833f}.effects[_ngcontent-%COMP%] .effect.pierce.fh[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{background-color:#c88c4e;font-size:1.2em;left:25%;font-family:ghs-title;top:32%}.effects[_ngcontent-%COMP%] .effect.push.fh[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ghs-title;top:12%;color:#4f504f}.effects[_ngcontent-%COMP%] .effect.pull.fh[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ghs-title;top:40%;color:#4f504f}.effects[_ngcontent-%COMP%] .effect.loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:60%;height:auto;filter:var(--ghs-filter-white)}.effects[_ngcontent-%COMP%] .effect.loot[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-black)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .element-background[_ngcontent-%COMP%]{position:absolute;inset:0;background-image:url(am-front.48806d22feb6f4bf.png);background-size:100%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%]{top:50%;left:49.5%;width:34%;height:52%;transform:translate(-50%,-50%)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(1){transform:translate(-70%,-70%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(2){transform:translate(-30%,-30%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(3), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(3), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(3), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(3){transform:translate(-30%,-70%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(4), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(4), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(4), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(4){transform:translate(-70%,-30%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition.multiple-2[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull.multiple-2[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.push.multiple-2[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce.multiple-2[_ngcontent-%COMP%]:nth-child(1){transform:translate(-67.5%,-67.5%) scale(.6)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition.multiple-2[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull.multiple-2[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.push.multiple-2[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce.multiple-2[_ngcontent-%COMP%]:nth-child(2){transform:translate(-32.5%,-32.5%) scale(.6)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(1){transform:translate(-72.5%,-75%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(2){transform:translate(-27.5%,-25%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(3){transform:translate(-27.5%,-75%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(4){transform:translate(-72.5%,-25%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element.multiple-3[_ngcontent-%COMP%]:nth-child(2){transform:translate(-50%,-25%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.heal[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center.shield[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center.retaliate[_ngcontent-%COMP%]{width:46%;height:68%}.effects[_ngcontent-%COMP%] .effect.center.element[_ngcontent-%COMP%]{width:38%;height:50%}.effects[_ngcontent-%COMP%] .effect.center.custom[_ngcontent-%COMP%]{width:46%;height:68%}.effects[_ngcontent-%COMP%] .effect.center.custom[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{position:absolute;top:-2%;left:20%;font-family:ghs-title;font-size:3em;color:var(--ghs-color-white);text-shadow:var(--ghs-outline-thin)}.effects[_ngcontent-%COMP%] .effect.center.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{width:80%;height:40%;top:20%}.effects[_ngcontent-%COMP%] .effect.center.custom.new-style[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{display:none}.effects[_ngcontent-%COMP%] .effect.center.custom.new-style[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{top:0;width:70%;height:70%}.effects[_ngcontent-%COMP%] .effect.center.custom.fh[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{text-shadow:none}.effects[_ngcontent-%COMP%] .effect.center.changeType[_ngcontent-%COMP%]{top:0;left:0;width:100%;height:100%;transform:none}.effects[_ngcontent-%COMP%] .effect.center.changeType[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%]{position:absolute;top:40%;left:-15%;width:135%;height:50%}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%]{width:100%;height:100%}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] .or-label[_ngcontent-%COMP%]{font-size:.8em;color:var(--ghs-color-white);position:relative}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] .or-label.new-style[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:-1em -1.25em 1em .75em;color:var(--ghs-color-white);background-color:var(--ghs-color-white);clip-path:polygon(100% 0%,95% 0%,0% 95%,0% 100%,5% 100%,100% 5%)}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] .or-label.new-style[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:1em .75em -1em -1.25em;color:var(--ghs-color-white);background-color:var(--ghs-color-white);clip-path:polygon(100% 0%,95% 0%,0% 95%,0% 100%,5% 100%,100% 5%)}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%]{position:absolute;inset:0}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]:nth-child(1){transform:translate(-70%,-70%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]:nth-child(2){transform:translate(-30%,-30%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1em}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%]{flex-direction:column}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1.3em}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%] img.full.target[_ngcontent-%COMP%]{width:60%;top:0;position:absolute}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{width:90%;height:40%;bottom:5%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%]{width:80%;height:80%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:2em;top:25%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{width:80%;height:30%;bottom:10%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .target-value-container.target-self[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .target-value-container.target-allyShort[_ngcontent-%COMP%]{font-size:1.2em}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:8%;width:35%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:20%;font-size:1.4em}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.shield-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.retaliate-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:10%;width:50%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.shield-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.retaliate-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:15%}.effects[_ngcontent-%COMP%] .effect.town-guard[_ngcontent-%COMP%]{top:70%;left:49.5%;width:34%;height:22%;transform:translate(-50%,-50%)}.effects[_ngcontent-%COMP%] .effect.town-guard.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{font-family:ghs-title;font-size:.8em}.effects[_ngcontent-%COMP%] .effect.town-guard.center[_ngcontent-%COMP%]{top:50%;left:49.5%;width:34%;height:52%;transform:translate(-50%,-50%)}.effects[_ngcontent-%COMP%] .effect.town-guard.center.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{min-width:130%;width:auto;height:auto;top:initial}.effects[_ngcontent-%COMP%] .effect.town-guard.center.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{font-family:ghs-title;font-size:2.6em;text-shadow:var(--ghs-outline-thin)}']})),a})(),Yf=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"clicked",!1),(0,_.Z)(this,"change",new t.vpe),this.el=e,this.el.nativeElement.classList.add("reveal")}onClick(){this.disabled?this.clicked&&(this.clicked=!1,this.el.nativeElement.classList.remove("confirm")):this.el.nativeElement.classList.contains("flipped")?(this.el.nativeElement.classList.remove("flipped"),this.change.emit(!1)):this.clicked?(this.el.nativeElement.classList.add("flipped"),this.change.emit(!0),this.clicked=!1,this.el.nativeElement.classList.remove("confirm")):(this.clicked=!0,this.el.nativeElement.classList.add("confirm"))}onMouseLeave(){(!this.disabled||this.clicked)&&(this.clicked=!1,this.el.nativeElement.classList.remove("confirm"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","card-reveal",""]],hostBindings:function(e,i){1&e&&t.NdJ("click",function(){return i.onClick()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{disabled:"disabled"},outputs:{change:"change"}})),a})();const Xu=function(o,a){return{"new-style":o,fh:a}};function GA(o,a){if(1&o&&(t.TgZ(0,"div",0),t._UZ(1,"img",22),t.qZA()),2&o){const n=t.oxw(2);t.Gre("type ",n.effectClasses,""),t.Q6J("ngClass",t.WLB(5,Xu,n.newStyle,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/"+(!n.defaultType||n.townGuard||n.csOak||n.newStyle&&n.attackModifier.valueType==n.AttackModifierValueType.plus&&n.attackModifier.effects&&0!=n.attackModifier.effects.length?"am-front":n.attackModifier.type)+".png",t.LSH)}}const Y6=function(o,a,n,e,i){return{"new-style":o,fh:a,"multiple-2":n,"multiple-3":e,"multiple-4":i}};function VA(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(3);t.MT6("type multiple ",n.type," ",n.value,""),t.Q6J("ngClass",t.qbA(5,Y6,e.newStyle,e.settingsManager.settings.fhStyle,2==e.attackModifier.effects.length,3==e.attackModifier.effects.length,4==e.attackModifier.effects.length))}}function YA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,VA,1,11,"div",23),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.attackModifier.effects)}}function KA(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.MT6("type multiple multiple-mixed-element ",n.type," ",n.value,""),t.Q6J("ngClass",t.WLB(5,Xu,e.newStyle,e.settingsManager.settings.fhStyle))}}function $A(o,a){if(1&o&&(t.ynx(0),t.YNc(1,KA,1,8,"div",8),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.filter(n))}}function WA(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(4);t.MT6("type multiple multiple-mixed-element multiple-mixed-element-or ",n.type," ",n.value,""),t.Q6J("ngClass",t.WLB(5,Xu,e.newStyle,e.settingsManager.settings.fhStyle))}}function XA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,WA,1,8,"div",23),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.orTypeEffect.effects)}}function tS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"div",0),t.YNc(2,$A,2,1,"ng-container",24),t.YNc(3,XA,2,1,"ng-container",7),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Gre("type multiple multiple-mixed-element ",n.mixedElement.value,""),t.Q6J("ngClass",t.WLB(6,Xu,n.newStyle,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("ngForOf",n.effects()),t.xp6(1),t.Q6J("ngIf",n.orTypeEffect&&n.orTypeEffect.effects.length>1)}}function eS(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(3);t.MT6("type multiple ",n.type," ",n.value,""),t.Q6J("ngClass",t.qbA(5,Y6,e.newStyle,e.settingsManager.settings.fhStyle,2==e.orTypeEffect.effects.length,3==e.orTypeEffect.effects.length,4==e.orTypeEffect.effects.length))}}function nS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,eS,1,11,"div",23),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.orTypeEffect.effects)}}function iS(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(3);t.Gre("type multiple multiple-1 ",n,""),t.Q6J("ngClass",t.WLB(4,Xu,e.newStyle,e.settingsManager.settings.fhStyle))}}function oS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,iS,1,7,"div",23),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.attackModifier.effects[0].value.split("|"))}}function aS(o,a){1&o&&(t.ynx(0),t._UZ(1,"div",25)(2,"div",26)(3,"div",27)(4,"div",28)(5,"div",29)(6,"div",30),t.BQk())}function sS(o,a){1&o&&(t.TgZ(0,"div",31),t._UZ(1,"img",32),t.qZA())}function rS(o,a){1&o&&(t.TgZ(0,"div",33),t._UZ(1,"img",34),t.qZA())}function cS(o,a){1&o&&(t.TgZ(0,"div",35),t._UZ(1,"img",36),t.qZA())}const lS=function(o){return{side:o}};function gS(o,a){if(1&o&&t._UZ(0,"img",37),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,lS,n.newStyle))("src","./assets/images/attackmodifier/"+(n.newStyle?"icons/":"overlays/")+n.attackModifier.type+".png",t.LSH)}}function dS(o,a){if(1&o&&t._UZ(0,"img",38),2&o){const n=t.oxw(2);t.Q6J("src","./assets/images/attackmodifier/"+(n.newStyle?"icons/":"overlays/")+n.attackModifier.valueType+n.attackModifier.value+".png",t.LSH)}}function hS(o,a){1&o&&t._UZ(0,"img",39)}function uS(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.numeration)}}function _S(o,a){1&o&&(t.TgZ(0,"span",41),t._uU(1," * "),t.qZA())}function pS(o,a){if(1&o&&(t.TgZ(0,"span",42),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("+",n.attackModifier.value,"")}}function fS(o,a){if(1&o&&(t.TgZ(0,"span",42),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("-",n.attackModifier.value,"")}}function mS(o,a){if(1&o&&(t.TgZ(0,"span",43),t._UZ(1,"img",22),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src",n.characterIcon,t.LSH)}}function vS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-attackmodifier-effects",44),t.BQk()),2&o){const n=t.oxw(2),e=t.MAs(2);t.xp6(1),t.Q6J("attackModifier",n.attackModifier)("effects",n.effects())("offsetWidth",e.offsetWidth)("newStyle",n.newStyle)}}const CS=function(o){return[o]};function MS(o,a){if(1&o&&(t.TgZ(0,"div",45),t._UZ(1,"ghs-attackmodifier-effects",44),t.qZA()),2&o){const n=t.oxw(2),e=t.MAs(2);t.xp6(1),t.Q6J("attackModifier",n.attackModifier)("effects",t.VKq(4,CS,n.mixedElement))("offsetWidth",e.offsetWidth)("newStyle",n.newStyle)}}function OS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,GA,2,8,"div",8),t.YNc(2,YA,2,1,"ng-container",7),t.YNc(3,tS,4,9,"ng-container",7),t.YNc(4,nS,2,1,"ng-container",7),t.YNc(5,oS,2,1,"ng-container",7),t.YNc(6,aS,7,0,"ng-container",7),t.YNc(7,sS,2,0,"div",9),t.YNc(8,rS,2,0,"div",10),t.YNc(9,cS,2,0,"div",11),t._UZ(10,"img",12)(11,"img",13),t.YNc(12,gS,1,4,"img",14),t.YNc(13,dS,1,1,"img",15),t.YNc(14,hS,1,0,"img",16),t.YNc(15,uS,2,1,"span",17),t.YNc(16,_S,2,0,"span",18),t.YNc(17,pS,2,1,"span",19),t.YNc(18,fS,2,1,"span",19),t.YNc(19,mS,2,1,"span",20),t.YNc(20,vS,2,4,"ng-container",7),t.YNc(21,MS,2,6,"div",21),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",!n.mixedElement&&!n.multipe||n.wildElement),t.xp6(1),t.Q6J("ngIf",n.multipe&&n.attackModifier.effects.length>1),t.xp6(1),t.Q6J("ngIf",n.mixedElement&&n.effects().length>0),t.xp6(1),t.Q6J("ngIf",!n.mixedElement&&n.orTypeEffect&&n.orTypeEffect.effects.length>1),t.xp6(1),t.Q6J("ngIf",n.multipe&&1==n.attackModifier.effects.length),t.xp6(1),t.Q6J("ngIf",n.wildElement),t.xp6(1),t.Q6J("ngIf",n.csOak),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.empower),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.enfeeble),t.xp6(3),t.Q6J("ngIf",n.attackModifier.effects&&n.attackModifier.effects.length>0&&(n.attackModifier.type!=n.AttackModifierType.plus0&&n.attackModifier.type!=n.AttackModifierType.plus&&n.attackModifier.type!=n.AttackModifierType.minus||n.newStyle)&&n.attackModifier.type!=n.AttackModifierType.empower&&n.attackModifier.type!=n.AttackModifierType.enfeeble),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.empower||n.attackModifier.type==n.AttackModifierType.enfeeble),t.xp6(1),t.Q6J("ngIf",n.attackModifier.rolling),t.xp6(1),t.Q6J("ngIf",(!n.characterIcon&&!n.ally||!n.attackModifier.character&&n.attackModifier.type!=n.AttackModifierType.curse)&&n.attackModifier.type!=n.AttackModifierType.bless&&!n.csOak&&n.attackModifier.type!=n.AttackModifierType.minus1extra),t.xp6(1),t.Q6J("ngIf",(n.characterIcon||n.ally)&&n.attackModifier.type==n.AttackModifierType.curse||n.attackModifier.type==n.AttackModifierType.minus1extra),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.plus),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.minus),t.xp6(1),t.Q6J("ngIf",n.characterIcon&&n.attackModifier.character),t.xp6(1),t.Q6J("ngIf",n.attackModifier.effects),t.xp6(1),t.Q6J("ngIf",n.mixedElement)}}const K6=function(o){return{effects:o}};function PS(o,a){if(1&o&&(t.TgZ(0,"span",49),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(2,K6,!n.townGuardEffectIcon&&n.attackModifier.effects.length>0||n.townGuardEffectIcon&&n.attackModifier.effects.length>1)),t.xp6(1),t.hij("+",n.attackModifier.value,"")}}function yS(o,a){if(1&o&&(t.TgZ(0,"span",49),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(2,K6,n.attackModifier.effects.length>0)),t.xp6(1),t.hij("-",n.attackModifier.value,"")}}function bS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,PS,2,4,"span",48),t.YNc(2,yS,2,4,"span",48),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(n.attackModifier.value>0||0==n.attackModifier.effects.length)&&(n.attackModifier.valueType==n.AttackModifierValueType.plus||n.attackModifier.valueType==n.AttackModifierValueType.default)),t.xp6(1),t.Q6J("ngIf",n.attackModifier.valueType==n.AttackModifierValueType.minus)}}function xS(o,a){if(1&o&&(t.TgZ(0,"span",50),t._UZ(1,"img",22),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/action/custom/"+n.townGuardEffectIcon.value+".svg",t.LSH)}}function wS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-attackmodifier-effects",51),t.BQk()),2&o){const n=t.oxw(2),e=t.MAs(2);t.xp6(1),t.Q6J("attackModifier",n.attackModifier)("effects",n.effects())("offsetWidth",e.offsetWidth)("townGuard",!0)}}function kS(o,a){1&o&&t._UZ(0,"img",39)}function TS(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",46),t._UZ(2,"img",22),t.qZA(),t.YNc(3,bS,3,2,"ng-container",7),t.YNc(4,xS,2,1,"span",47),t.YNc(5,wS,2,4,"ng-container",7),t.YNc(6,kS,1,0,"img",16),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(6,Xu,n.newStyle,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/town-guard/"+(n.attackModifier.type==n.AttackModifierType.townguard?n.attackModifier.valueType:n.attackModifier.type)+".png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.townguard),t.xp6(1),t.Q6J("ngIf",n.townGuardEffectIcon),t.xp6(1),t.Q6J("ngIf",n.attackModifier.effects),t.xp6(1),t.Q6J("ngIf",n.attackModifier.rolling)}}const ZS=function(o){return{"town-guard":o}},AS=function(o,a){return{flipped:o,"no-animations":a}};let JO=(()=>{var o;class a{constructor(){(0,_.Z)(this,"attackModifier",void 0),(0,_.Z)(this,"characterIcon",void 0),(0,_.Z)(this,"ally",!1),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"number",0),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"disableFlip",!1),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"effectClasses",""),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"AttackModifierValueType",Lt.tI),(0,_.Z)(this,"AttackModifierEffectType",Lt.US),(0,_.Z)(this,"defaultType",!0),(0,_.Z)(this,"animate",!0),(0,_.Z)(this,"multipe",!1),(0,_.Z)(this,"wildElement",!1),(0,_.Z)(this,"csOak",!1),(0,_.Z)(this,"mixedElement",void 0),(0,_.Z)(this,"orTypeEffect",void 0),(0,_.Z)(this,"townGuardEffectIcon",void 0),(0,_.Z)(this,"settingsManager",R.r)}ngOnInit(){this.animate=!this.disableFlip,this.init()}init(){this.attackModifier&&(this.csOak=this.attackModifier.id.startsWith("cs-oak"),this.newStyle=this.newStyle||this.attackModifier.type==Lt.kl.empower||this.attackModifier.type==Lt.kl.enfeeble,this.multipe=!1,this.wildElement=!1,this.mixedElement=void 0,this.orTypeEffect=void 0,this.attackModifier.effects&&(this.attackModifier.effects.find(e=>e.type==Lt.US.element)&&this.attackModifier.effects.some(e=>e.type!=Lt.US.element)&&(this.mixedElement=this.attackModifier.effects.find(e=>e.type==Lt.US.element)),this.townGuard&&(this.townGuardEffectIcon=this.attackModifier.effects.find(e=>e.type==Lt.US.custom&&e.icon)),this.multipe=this.effects().length>1&&this.effects().every(e=>e.type==Lt.US.element)||this.effects().length>1&&this.effects().every(e=>e.type==Lt.US.condition||e.type==Lt.US.pierce||e.type==Lt.US.pull||e.type==Lt.US.push)||1==this.effects().length&&this.effects().every(e=>e.type==Lt.US.elementHalf)||!1,this.wildElement=1==this.effects().length&&this.effects().every(e=>(e.type==Lt.US.element||e.type==Lt.US.elementConsume)&&"wild"==e.value),this.orTypeEffect=this.effects().find(e=>e.type==Lt.US.or),this.effects().forEach(e=>{e.type!=Lt.US.heal&&e.type!=Lt.US.shield&&(this.defaultType=!1),this.effectClasses+=e.type==Lt.US.condition||e.type==Lt.US.element||e.type==Lt.US.elementHalf?" "+e.value.replaceAll("|","-").replaceAll(":","-"):" "+e.type})))}onChange(e){this.attackModifier.revealed=e}ngOnChanges(e){const i=e.flipped;i&&!this.disableFlip&&i.currentValue&&i.currentValue!=i.previousValue&&(this.animate=!0);const s=e.attackModifier;s&&s.currentValue&&s.currentValue!=s.previousValue&&this.init()}getTarget(e){if(e.effects){const i=e.effects.find(s=>s.type==Lt.US.specialTarget);if(i)return""+i.value}return""}effects(){return(this.mixedElement?this.attackModifier.effects.filter(e=>e!=this.mixedElement):this.attackModifier.effects).filter(e=>!this.townGuard||e.type!=Lt.US.custom||!e.icon)}filter(e){return-1!=[Lt.US.element,Lt.US.elementConsume,Lt.US.elementHalf,Lt.US.condition,Lt.US.custom,Lt.US.pull,,Lt.US.push,Lt.US.pierce].indexOf(e.type)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier"]],inputs:{attackModifier:"attackModifier",characterIcon:"characterIcon",ally:"ally",numeration:"numeration",number:"number",reveal:"reveal",disableFlip:"disableFlip",flipped:"flipped",newStyle:"newStyle",townGuard:"townGuard"},features:[t.TTD],decls:9,vars:16,consts:[[3,"ngClass"],["card-reveal","",1,"card",3,"ngClass","disabled","change"],["card",""],[1,"card-back","back"],[1,"revealed"],[3,"ghs-label"],[1,"card-front","front"],[4,"ngIf"],[3,"class","ngClass",4,"ngIf"],["class","type cs-oak",4,"ngIf"],["class","type empower",4,"ngIf"],["class","type enfeeble",4,"ngIf"],["src","./assets/images/attackmodifier/overlays/custom.png",1,"overlay","custom"],["src","./assets/images/attackmodifier/overlays/custom-fh.png",1,"overlay","custom-fh"],["class","overlay",3,"ngClass","src",4,"ngIf"],["class","overlay side",3,"src",4,"ngIf"],["class","rolling","src","./assets/images/attackmodifier/rolling.svg",4,"ngIf"],["class","numeration",4,"ngIf"],["class","numeration character-curse-icon",4,"ngIf"],["class","am-value",4,"ngIf"],["class","character-icon",4,"ngIf"],["class","mixed-element",4,"ngIf"],[3,"src"],[3,"class","ngClass",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"type","multiple","wild","air"],[1,"type","multiple","wild","ice"],[1,"type","multiple","wild","fire"],[1,"type","multiple","wild","earth"],[1,"type","multiple","wild","light"],[1,"type","multiple","wild","dark"],[1,"type","cs-oak"],["src","./assets/images/attackmodifier/cs-oak.png"],[1,"type","empower"],["src","./assets/images/attackmodifier/empower.png"],[1,"type","enfeeble"],["src","./assets/images/attackmodifier/enfeeble.png"],[1,"overlay",3,"ngClass","src"],[1,"overlay","side",3,"src"],["src","./assets/images/attackmodifier/rolling.svg",1,"rolling"],[1,"numeration"],[1,"numeration","character-curse-icon"],[1,"am-value"],[1,"character-icon"],[3,"attackModifier","effects","offsetWidth","newStyle"],[1,"mixed-element"],[1,"type",3,"ngClass"],["class","town-guard-icon",4,"ngIf"],["class","am-value",3,"ngClass",4,"ngIf"],[1,"am-value",3,"ngClass"],[1,"town-guard-icon"],[3,"attackModifier","effects","offsetWidth","townGuard"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1,2),t.NdJ("change",function(l){return i.onChange(l)}),t.TgZ(3,"div",3)(4,"span",4),t._UZ(5,"span",5),t.qZA()(),t.TgZ(6,"div",6),t.YNc(7,OS,22,19,"ng-container",7),t.YNc(8,TS,7,9,"ng-container",7),t.qZA()()()),2&e){const s=t.MAs(2);t.Gre("attack-modifier ",i.attackModifier.type,""),t.Q6J("ngClass",t.VKq(11,ZS,i.townGuard)),t.xp6(1),t.Udp("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.WLB(13,AS,i.flipped||i.attackModifier.revealed,!i.animate))("disabled",!i.reveal),t.xp6(4),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(2),t.Q6J("ngIf",!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.townGuard)}},dependencies:[x.mk,x.sg,x.O5,zA,Yf,ie],styles:[".attack-modifier{position:relative;width:100%;height:100%;transition:filter 2s linear,transform .8s cubic-bezier(.75,0,.85,1),top .5s linear,left .5s linear}.attack-modifier .back{background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-back.e947b7717f678f92.png);border-radius:5%}.attack-modifier .front{display:flex;position:relative;top:0;left:0;width:100%;height:100%;border-radius:5%}.attack-modifier .front .type{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.attack-modifier .front .type img{position:absolute;top:0;left:0;width:100%;height:100%}.attack-modifier .front .type.custom.new-style{filter:none}.attack-modifier .front .type.custom.new-style~.overlay.custom{display:inline-block}.attack-modifier .front .type.custom.fh~.overlay.custom{display:none}.attack-modifier .front .type.custom.fh~.overlay.custom-fh{display:inline-block}.attack-modifier .front .type.multiple{background-image:url(am-front.48806d22feb6f4bf.png);background-size:100%}.attack-modifier .front .type.multiple.multiple-mixed-element:not(:nth-child(1)){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 25%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%);mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 25%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%)}.attack-modifier .front .type.multiple.multiple-mixed-element.multiple-mixed-element-or{-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 20%,rgb(0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 20%,rgb(0,0,0) 100%)}.attack-modifier .front .type.multiple.multiple-1:nth-child(2){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 45%,rgb(0,0,0) 55%,rgb(0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 45%,rgb(0,0,0) 55%,rgb(0,0,0) 100%)}.attack-modifier .front .type.multiple.multiple-1.fh:nth-child(2){-webkit-mask-image:conic-gradient(from 110deg at 50% 50%,rgb(0,0,0) 20%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%);mask-image:conic-gradient(from 110deg at 50% 50%,rgb(0,0,0) 20%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%)}.attack-modifier .front .type.multiple.multiple-2:nth-child(2){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 35%,rgba(0,0,0,0) 40%,rgba(0,0,0,0) 85%,rgb(0,0,0) 95%);mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 35%,rgba(0,0,0,0) 40%,rgba(0,0,0,0) 85%,rgb(0,0,0) 95%)}.attack-modifier .front .type.multiple.multiple-3:nth-child(2){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgba(0,0,0,0) 5%,rgb(0,0,0) 10%,rgb(0,0,0) 40%,rgba(0,0,0,0) 45%);mask-image:conic-gradient(from 90deg at 50% 50%,rgba(0,0,0,0) 5%,rgb(0,0,0) 10%,rgb(0,0,0) 40%,rgba(0,0,0,0) 45%)}.attack-modifier .front .type.multiple.multiple-3:nth-child(3){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 5%,rgba(0,0,0,0) 10%,rgba(0,0,0,0) 60%,rgb(0,0,0) 75%);mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 5%,rgba(0,0,0,0) 10%,rgba(0,0,0,0) 60%,rgb(0,0,0) 75%)}.attack-modifier .front .type.multiple.wild.air{-webkit-mask-image:conic-gradient(from 90deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%);mask-image:conic-gradient(from 90deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%)}.attack-modifier .front .type.multiple.wild.ice{-webkit-mask-image:conic-gradient(from 180deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%);mask-image:conic-gradient(from 180deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%)}.attack-modifier .front .type.multiple.wild.fire{-webkit-mask-image:conic-gradient(from 270deg at 66% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 270deg at 66% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.multiple.wild.earth{-webkit-mask-image:conic-gradient(from 290deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 290deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.multiple.wild.light{-webkit-mask-image:conic-gradient(from 30deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 30deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.multiple.wild.dark{-webkit-mask-image:conic-gradient(from 40deg at 33% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 40deg at 33% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.air{filter:hue-rotate(160deg) saturate(80%)}.attack-modifier .front .type.dark{filter:hue-rotate(180deg) saturate(20%) brightness(85%)}.attack-modifier .front .type.earth{filter:hue-rotate(60deg) saturate(160%)}.attack-modifier .front .type.fire{filter:hue-rotate(355deg) saturate(250%)}.attack-modifier .front .type.ice{filter:hue-rotate(165deg) saturate(250%) brightness(120%)}.attack-modifier .front .type.light{filter:hue-rotate(20deg) saturate(200%) brightness(110%)}.attack-modifier .front .type.bless{filter:hue-rotate(20deg) saturate(250%) brightness(100%)}.attack-modifier .front .type.brittle{filter:hue-rotate(175deg) saturate(90%)}.attack-modifier .front .type.curse{filter:hue-rotate(254deg) saturate(110%) brightness(90%)}.attack-modifier .front .type.disarm{filter:hue-rotate(200deg) saturate(50%) sepia(10%)}.attack-modifier .front .type.immobilize{filter:hue-rotate(330deg) saturate(200%) brightness(80%)}.attack-modifier .front .type.invisible{filter:hue-rotate(200deg) saturate(20%) brightness(70%) contrast(110%)}.attack-modifier .front .type.muddle{filter:hue-rotate(335deg) saturate(170%) sepia(40%) brightness(80%)}.attack-modifier .front .type.poison{filter:hue-rotate(80deg) saturate(90%)}.attack-modifier .front .type.regenerate{filter:hue-rotate(290deg) saturate(200%)}.attack-modifier .front .type.strengthen{filter:hue-rotate(165deg) saturate(100%)}.attack-modifier .front .type.stun{filter:hue-rotate(168deg) saturate(150%)}.attack-modifier .front .type.wound{filter:hue-rotate(355deg) saturate(250%)}.attack-modifier .front .type.push,.attack-modifier .front .type.pull{filter:grayscale(80%)}.attack-modifier .front .type.pierce{filter:hue-rotate(10deg) saturate(180%)}.attack-modifier .front .type.retaliate{filter:hue-rotate(160deg) grayscale(30%)}.attack-modifier .front .type.target{filter:hue-rotate(330deg) saturate(350%) brightness(80%)}.attack-modifier .front .type.refreshItem{filter:hue-rotate(330deg) saturate(130%)}.attack-modifier .front .type.custom{filter:hue-rotate(330deg) saturate(250%)}.attack-modifier .front img.overlay{position:absolute;width:100%;height:100%;z-index:2}.attack-modifier .front img.overlay.custom,.attack-modifier .front img.overlay.custom-fh{display:none}.attack-modifier .front img.overlay.side{top:50%;width:18%;height:auto;left:5%;transform:translateY(-50%)}.attack-modifier .front img.rolling{position:absolute;z-index:3;width:auto;height:28%;top:36%;right:5%}.attack-modifier .front .numeration{position:absolute;left:9.6%;top:74%;font-family:ghs-title;font-size:.8em;line-height:.8em;color:var(--ghs-color-white);z-index:2;width:8%;height:12%;display:flex;justify-content:center;align-items:center}.attack-modifier .front .numeration.character-curse-icon{font-size:1.8em;top:80%}.attack-modifier .front .numeration img{filter:grayscale(100%) brightness(100) contrast(100%);width:90%;height:auto}.attack-modifier .front .character-icon{position:absolute;left:7.5%;top:67%;z-index:2;width:14%;height:20%;display:flex;justify-content:center;align-items:center;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-character-icon.83c1ab396221d56b.png)}.attack-modifier .front .character-icon img{filter:grayscale(100%) brightness(100) contrast(100%);height:70%;width:auto}.attack-modifier .front .town-guard-icon{position:absolute;left:7.5%;top:67%;z-index:2;width:16%;height:24%;display:flex;justify-content:center;align-items:center;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-town-guard-icon.c02be0601faddc20.png)}.attack-modifier .front .town-guard-icon img{filter:var(--ghs-filter-white) var(--ghs-filter-shadow);height:70%;width:auto}.attack-modifier .front .am-value{position:absolute;display:flex;justify-content:center;align-items:center;top:50%;left:49.5%;width:34%;height:52%;transform:translate(-50%,-50%);font-family:ghs-title;color:var(--ghs-color-white);font-size:3.5em;z-index:1;text-shadow:1px 0px var(--ghs-color-darkgray),0px 1px var(--ghs-color-darkgray),1px 0px var(--ghs-color-darkgray),0px 1px var(--ghs-color-darkgray);filter:drop-shadow(1px 1px 1px var(--ghs-color-darkgray))}.attack-modifier .front .mixed-element{position:absolute;top:0;left:-7%;width:40%;height:40%}.attack-modifier.bless .front:before{display:none}.attack-modifier.draw{z-index:0}.attack-modifier .confirm .revealed{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:1.3em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black))}.attack-modifier.town-guard .back{background-image:url(back.86db9c801336d036.png)}.attack-modifier.town-guard .front .am-value.effects{top:43%}\n"],encapsulation:2})),a})();const SS=["menu"];function ES(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeDrawnDiscards())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.removeDrawnDiscards"))}function DS(o,a){1&o&&(t.TgZ(0,"span",31),t._UZ(1,"img",32),t.qZA())}function IS(o,a){1&o&&(t.TgZ(0,"span",31),t._UZ(1,"img",32),t.qZA())}function NS(o,a){1&o&&(t.TgZ(0,"span",31),t._UZ(1,"img",32),t.qZA())}const t_=function(o){return{disabled:o}};function JS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",18)(1,"span",19)(2,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(-1))}),t._UZ(3,"img",21),t.qZA()(),t.TgZ(4,"span",22),t._UZ(5,"img",23),t.TgZ(6,"span",24),t._uU(7),t.qZA(),t.YNc(8,DS,2,0,"span",25),t.qZA(),t.TgZ(9,"span",19)(10,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(1))}),t._UZ(11,"img",26),t.qZA()(),t.TgZ(12,"span",19)(13,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(-1))}),t._UZ(14,"img",21),t.qZA()(),t.TgZ(15,"span",22),t._UZ(16,"img",27),t.TgZ(17,"span",28),t._uU(18),t.qZA(),t.YNc(19,IS,2,0,"span",25),t.qZA(),t.TgZ(20,"span",19)(21,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(1))}),t._UZ(22,"img",26),t.qZA()(),t.TgZ(23,"span",19)(24,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeMinus1Extra(-1))}),t._UZ(25,"img",21),t.qZA()(),t.TgZ(26,"span",22),t._UZ(27,"img",29),t.TgZ(28,"span",30),t._uU(29),t.qZA(),t.YNc(30,NS,2,0,"span",25),t.qZA(),t.TgZ(31,"span",19)(32,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeMinus1Extra(1))}),t._UZ(33,"img",26),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngClass",t.VKq(18,t_,0==n.countUpcomingAttackModifier(n.AttackModifierType.bless))),t.xp6(2),t.Q6J("ghs-label","game.condition.bless")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.bless)),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingBlesses()>10),t.xp6(2),t.Q6J("ngClass",t.VKq(20,t_,n.gameManager.attackModifierManager.countUpcomingBlesses()>=10)),t.xp6(3),t.Q6J("ngClass",t.VKq(22,t_,0==n.countUpcomingAttackModifier(n.AttackModifierType.curse))),t.xp6(2),t.Q6J("ghs-label","game.condition.curse")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.curse)),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingCurses(!n.character&&!n.ally)>10),t.xp6(2),t.Q6J("ngClass",t.VKq(24,t_,n.gameManager.attackModifierManager.countUpcomingCurses(!n.character&&!n.ally)>=10)),t.xp6(3),t.Q6J("ngClass",t.VKq(26,t_,0==n.countAttackModifier(n.AttackModifierType.minus1extra))),t.xp6(2),t.Q6J("ghs-label","game.attackmodifiers.types.minus1")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.countAttackModifier(n.AttackModifierType.minus1extra)),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countExtraMinus1()>15),t.xp6(2),t.Q6J("ngClass",t.VKq(28,t_,n.gameManager.attackModifierManager.countExtraMinus1()>=15))}}function US(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.restoreDefault())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.restore"))}function LS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",33)(1,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.newFirst(i.type))}),t._UZ(2,"img",26),t.qZA(),t.TgZ(3,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType(!0))}),t._UZ(4,"img",35),t.qZA(),t.TgZ(5,"span",36),t._UZ(6,"img",37),t.qZA(),t.TgZ(7,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType())}),t._UZ(8,"img",38),t.qZA(),t.TgZ(9,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.newShuffle(i.type))}),t._UZ(10,"img",39),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(6),t.MGl("src","./assets/images/attackmodifier/",n.type,".png",t.LSH)}}function QS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",33)(1,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addModifier())}),t._UZ(2,"img",26),t.qZA(),t.TgZ(3,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType(!0))}),t._UZ(4,"img",35),t.qZA(),t.TgZ(5,"span",36),t._UZ(6,"ghs-attackmodifier",40),t.qZA(),t.TgZ(7,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType())}),t._UZ(8,"img",38),t.qZA(),t.TgZ(9,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addModifierShuffle())}),t._UZ(10,"img",39),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(6),t.Q6J("attackModifier",n.tgAM)("flipped",!0)("newStyle",!0)("characterIcon",n.characterIcon)("ally",n.ally)("townGuard",n.townGuard)}}function RS(o,a){1&o&&t._UZ(0,"div",17)}function FS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",45),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(i+s.deck.current+1))}),t._UZ(1,"img",21),t.qZA()}}function qS(o,a){1&o&&t._UZ(0,"div",46)}function HS(o,a){if(1&o&&(t.TgZ(0,"div",41),t._UZ(1,"ghs-attackmodifier",42),t.YNc(2,FS,2,0,"a",43),t.YNc(3,qS,1,0,"div",44),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("attackModifier",n)("numeration",e.numeration)("reveal",!0)("flipped",2==e.reveal||n.revealed)("newStyle",e.newStyle)("characterIcon",e.characterIcon)("ally",e.ally)("townGuard",e.townGuard),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}function jS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",45),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(s.deck.current-i))}),t._UZ(1,"img",21),t.qZA()}}function BS(o,a){1&o&&t._UZ(0,"div",46)}function zS(o,a){if(1&o&&(t.TgZ(0,"div",41),t._UZ(1,"ghs-attackmodifier",47),t.YNc(2,jS,2,0,"a",43),t.YNc(3,BS,1,0,"div",44),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("attackModifier",n)("numeration",e.numeration)("flipped",!0)("newStyle",e.newStyle)("characterIcon",e.characterIcon)("ally",e.ally)("townGuard",e.townGuard),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}const $6=function(o){return{denied:o}};let W6=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"characterIcon",""),(0,_.Z)(this,"ally",!1),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"type",Lt.kl.minus1),(0,_.Z)(this,"tgAM",Lt.Bt[0]),(0,_.Z)(this,"currentAttackModifier",-1),(0,_.Z)(this,"drawing",!1),this.dialogRef=i,this.deck=e.deck,this.character=e.character,this.ally=e.ally,this.numeration=e.numeration,this.newStyle=e.newStyle,this.townGuard=e.townGuard,this.before=e.before,this.after=e.after,this.dialogRef.closed.subscribe(()=>{this.upcomingCards().forEach(s=>s.revealed=!1)})}ngOnInit(){this.character&&(this.deck=this.character.attackModifierDeck,this.numeration=""+this.character.number,this.characterIcon=this.character.iconUrl),setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},R.r.settings.disableAnimations?0:250)}toggleEdit(){this.edit=!this.edit,setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}upcomingCards(){return this.deck.cards.filter((e,i)=>i>this.deck.current)}disgardedCards(){return this.deck.cards.filter((e,i)=>i<=this.deck.current).reverse()}shuffle(){this.before.emit(new xn(this.deck,"shuffle")),d.v.attackModifierManager.shuffleModifiers(this.deck),this.after.emit(new xn(this.deck,"shuffle"))}removeDrawnDiscards(){this.before.emit(new xn(this.deck,"removeDrawnDiscards")),d.v.attackModifierManager.removeDrawnDiscards(this.deck),this.after.emit(new xn(this.deck,"removeDrawnDiscards"))}restoreDefault(){this.before.emit(new xn(this.deck,"restoreDefault")),this.character?(this.character.mergeAttackModifierDeck(d.v.attackModifierManager.buildCharacterAttackModifierDeck(this.character)),d.v.attackModifierManager.fromModel(this.deck,this.character.attackModifierDeck.toModel())):this.townGuard?this.deck=d.v.attackModifierManager.buildTownGuardAttackModifierDeck(d.v.game.party,d.v.campaignData()):(this.deck=new Lt.ut,d.v.game.party.townGuardDeck=this.deck.toModel()),this.after.emit(new xn(this.deck,"restoreDefault"))}hasDrawnDiscards(){return this.deck.cards.some((e,i)=>i<=this.deck.current&&(e.type==Lt.kl.bless||e.type==Lt.kl.curse))}dropUpcoming(e){if(this.before.emit(new xn(this.deck,"reorder")),e.container==e.previousContainer){const i=this.deck.current+1;Fn(this.deck.cards,e.previousIndex+i,e.currentIndex+i)}else{const i=this.deck.current;Fn(this.deck.cards,i-e.previousIndex,e.currentIndex+i),this.deck.current=this.deck.current-1}this.after.emit(new xn(this.deck,"reorder"))}dropDisgarded(e){if(this.before.emit(new xn(this.deck,"reorder")),e.container==e.previousContainer)Fn(this.deck.cards,this.deck.current-e.previousIndex,this.deck.current-e.currentIndex);else{this.deck.current=this.deck.current+1;const i=this.deck.current;Fn(this.deck.cards,e.previousIndex+i,i-e.currentIndex),this.deck.cards[i-e.currentIndex].revealed=!0}this.after.emit(new xn(this.deck,"reorder"))}remove(e){this.before.emit(new xn(this.deck,"removeCard",""+e)),e<=this.deck.current&&(this.deck.current--,this.currentAttackModifier=this.deck.current),this.deck.cards.splice(e,1),this.after.emit(new xn(this.deck,"removeCard",""+e))}newFirst(e){this.before.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+e));let i=new Lt.YY(e);i.revealed=!0,this.deck.cards.splice(this.deck.current+1,0,i),this.after.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+e))}newShuffle(e){this.before.emit(new xn(this.deck,"addCardShuffled","game.attackModifiers.types."+e)),this.deck.cards.splice(this.deck.current+1+Math.random()*(this.deck.cards.length-this.deck.current),0,new Lt.YY(e)),this.after.emit(new xn(this.deck,"addCardShuffled","game.attackModifiers.types."+e))}addModifier(){this.before.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type));let e=this.tgAM.clone();e.revealed=!0,this.deck.attackModifiers.find(i=>i.id==e.id)||this.deck.attackModifiers.push(e),this.deck.cards.splice(this.deck.current+1,0,e),this.after.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type))}addModifierShuffle(){this.before.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type));let e=this.tgAM.clone();this.deck.cards.splice(this.deck.current+1+Math.random()*(this.deck.cards.length-this.deck.current),0,e),this.deck.attackModifiers.find(i=>i.id==e.id)||this.deck.attackModifiers.push(e),this.after.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type))}countAttackModifier(e){return this.deck.cards.filter(i=>i.type==e&&!i.character).length}countDrawnAttackModifier(e){return this.deck.cards.filter((i,s)=>i.type==e&&s<=this.deck.current).length}countUpcomingAttackModifier(e){return this.deck.cards.filter((i,s)=>i.type==e&&s>this.deck.current).length}changeAttackModifier(e,i){if(i>0){if(e==Lt.kl.bless&&d.v.attackModifierManager.countUpcomingBlesses()>=10)return;if(e==Lt.kl.curse&&d.v.attackModifierManager.countUpcomingCurses(!this.character&&!this.ally)>=10)return;if(e==Lt.kl.minus1&&d.v.attackModifierManager.countExtraMinus1()>=15)return;d.v.attackModifierManager.addModifier(this.deck,new Lt.YY(e))}else if(i<0){const s=this.deck.cards.find((l,m)=>l.type==e&&m>this.deck.current);s&&this.deck.cards.splice(this.deck.cards.indexOf(s),1)}}changeBless(e){this.before.emit(new xn(this.deck,e<0?"removeBless":"addBless")),this.changeAttackModifier(Lt.kl.bless,e),this.after.emit(new xn(this.deck,e<0?"removeBless":"addBless"))}changeCurse(e){this.before.emit(new xn(this.deck,e<0?"removeCurse":"addCurse")),this.changeAttackModifier(Lt.kl.curse,e),this.after.emit(new xn(this.deck,e<0?"removeCurse":"addCurse"))}changeMinus1Extra(e){this.before.emit(new xn(this.deck,e<0?"removeMinus1":"addMinus1")),this.changeAttackModifier(Lt.kl.minus1extra,e),this.after.emit(new xn(this.deck,e<0?"removeMinus1":"addMinus1"))}onChange(e,i){e.revealed=i}changeType(e=!1){if(this.townGuard){let i=Lt.Bt.indexOf(this.tgAM)+(e?-1:1);i<0?i=Lt.Bt.length-1:i>=Lt.Bt.length&&(i=0),this.tgAM=Lt.Bt[i]}else{let i=Object.values(Lt.kl).indexOf(this.type)+(e?-1:1);i<0?i=Object.values(Lt.kl).length-1:i>=Object.values(Lt.kl).length&&(i=0),this.type=Object.values(Lt.kl)[i],-1!=[Lt.kl.plus,Lt.kl.plus3,Lt.kl.plus4,Lt.kl.plusX,Lt.kl.invalid,Lt.kl.minus,Lt.kl.minus1extra,Lt.kl.empower,Lt.kl.enfeeble,Lt.kl.townguard,Lt.kl.success,Lt.kl.wreck].indexOf(this.type)&&this.changeType(e)}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-deck-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(SS,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},decls:25,vars:26,consts:[[1,"attack-modifiers-dialog"],[1,"scroll-container"],[1,"menu",3,"ngClass"],["menu",""],[3,"click"],[3,"ghs-label"],[3,"click",4,"ngIf"],["type","checkbox",3,"checked","click"],["class","curse-bless",4,"ngIf"],["class","insert-menu",4,"ngIf"],[1,"attack-modifiers-container"],["cdkDropList","",1,"upcoming","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","ngClass","cdkDropListDropped"],["upcomingList","cdkDropList"],["class","empty",4,"ngIf"],["class","attack-modifier-container","cdkDrag","",4,"ngFor","ngForOf"],["cdkDropList","",1,"disgarded","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["disgardedList","cdkDropList"],[1,"empty"],[1,"curse-bless"],[1,"item"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/bless.svg"],[1,"badge","bless-count"],["class","warning",4,"ngIf"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/status/curse.svg"],[1,"badge","curse-count"],["src","./assets/images/attackmodifier/icons/minus1.png"],[1,"badge","minus1-count"],[1,"warning"],["src","./assets/images/warning.svg"],[1,"insert-menu"],[1,"icon-button",3,"click"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"attack-modifier"],[3,"src"],["src","./assets/images/right.svg",1,"ghs-svg"],["src","./assets/images/shuffle.svg",1,"ghs-svg"],[1,"drag-hidden",3,"attackModifier","flipped","newStyle","characterIcon","ally","townGuard"],["cdkDrag","",1,"attack-modifier-container"],[1,"drag-hidden",3,"attackModifier","numeration","reveal","flipped","newStyle","characterIcon","ally","townGuard"],["class","button-remove",3,"click",4,"ngIf"],["cdkDragHandle","","class","drag-handle",4,"ngIf"],[1,"button-remove",3,"click"],["cdkDragHandle","",1,"drag-handle"],[1,"drag-hidden",3,"attackModifier","numeration","flipped","newStyle","characterIcon","ally","townGuard"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"a",4),t.NdJ("click",function(){return i.reveal=(i.reveal+1)%3}),t._UZ(5,"span",5),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return i.shuffle()}),t._UZ(7,"span",5),t.qZA(),t.YNc(8,ES,2,1,"a",6),t.TgZ(9,"label")(10,"input",7),t.NdJ("click",function(){return i.toggleEdit()}),t.qZA(),t._UZ(11,"span",5),t.qZA(),t.YNc(12,JS,34,30,"div",8),t.YNc(13,US,2,1,"a",6),t.YNc(14,LS,11,1,"div",9),t.YNc(15,QS,11,6,"div",9),t.qZA(),t.TgZ(16,"div",10)(17,"div",11,12),t.NdJ("cdkDropListDropped",function(l){return i.dropUpcoming(l)}),t.YNc(19,RS,1,0,"div",13),t.YNc(20,HS,4,10,"div",14),t.qZA(),t.TgZ(21,"div",15,16),t.NdJ("cdkDropListDropped",function(l){return i.dropDisgarded(l)}),t._UZ(23,"div",17),t.YNc(24,zS,4,9,"div",14),t.qZA()()()()),2&e){const s=t.MAs(18),l=t.MAs(22);t.xp6(2),t.Q6J("ngClass",t.VKq(22,$6,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.attackModifiers&&(!i.character||!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]))),t.xp6(3),t.Q6J("ghs-label",2==i.reveal?"game.cards.coverAll":0==i.reveal?"game.cards.revealAll":"game.cards.revealAllConfirm"),t.xp6(2),t.Q6J("ghs-label","game.cards.shuffle"),t.xp6(1),t.Q6J("ngIf",i.hasDrawnDiscards()),t.xp6(2),t.Q6J("checked",i.edit),t.xp6(1),t.Q6J("ghs-label","game.cards.edit"),t.xp6(1),t.Q6J("ngIf",!i.edit&&!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit&&!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.edit&&i.townGuard),t.xp6(1),t.Udp("max-height",i.maxHeight),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",l)("cdkDropListAutoScrollStep",20)("ngClass",t.VKq(24,$6,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.attackModifiers&&(!i.character||!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]))),t.xp6(2),t.Q6J("ngIf",0==i.upcomingCards().length),t.xp6(1),t.Q6J("ngForOf",i.upcomingCards()),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",s)("cdkDropListAutoScrollStep",20),t.xp6(3),t.Q6J("ngForOf",i.disgardedCards())}},dependencies:[x.mk,x.sg,x.O5,Bs,Ms,Zr,JO,ie],styles:['.attack-modifiers-dialog[_ngcontent-%COMP%]{position:relative}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap;max-width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%]{display:flex;max-width:calc(100% - var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * 2)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%]{display:flex;align-items:center;flex-basis:100%;flex-shrink:0;max-width:calc(100% - var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * 2)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .attack-modifier[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));flex-grow:1}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .attack-modifier[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:auto;border-radius:5%}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .attack-modifier[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 19.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 13 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .drop-list[_ngcontent-%COMP%]{position:relative}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor));overflow:auto}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 30 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 17 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .7 * var(--ghs-dialog-factor));display:block;border-style:dashed;border-width:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));border-color:var(--ghs-color-white);width:calc(var(--ghs-unit) * 25.1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 16.6 * var(--ghs-dialog-factor));border-radius:5%}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;left:50%;top:50%;width:50%;height:70%;transform:translate(-50%,-50%)}.cdk-drag-preview[_ngcontent-%COMP%]{opacity:0;cursor:grabbing;z-index:999}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.5;cursor:grabbing}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}']})),a})();function GS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",8),t._uU(2),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",n.gameManager.characterManager.characterName(n.character,!0)," \xa0 ")}}function VS(o,a){1&o&&t._UZ(0,"img",10)}function YS(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",11),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","monster"))}function KS(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",11),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function $S(o,a){if(1&o&&(t.ynx(0),t.YNc(1,VS,1,0,"img",9),t.YNc(2,YS,3,1,"span",3),t.YNc(3,KS,3,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf","m"==n.numeration),t.xp6(1),t.Q6J("ngIf","m"==n.numeration),t.xp6(1),t.Q6J("ngIf","A"==n.numeration)}}function WS(o,a){1&o&&t._UZ(0,"span",11),2&o&&t.Q6J("ghs-label","game.attackModifiers")}function XS(o,a){1&o&&t._UZ(0,"span",11),2&o&&t.Q6J("ghs-label","party.campaign.townGuardDeck")}function tE(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("\xa0",n.numeration,"")}}const eE=function(o){return{vertical:o}};let Pw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"ally",void 0),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),(0,_.Z)(this,"gameManager",d.v),this.dialogRef=i,this.deck=e.deck,this.character=e.character,this.ally=e.ally,this.numeration=e.numeration,this.newStyle=e.newStyle,this.townGuard=e.townGuard,this.before=e.before,this.after=e.after}beforeAttackModifierDeck(e){this.before.emit(e)}afterAttackModifierDeck(e){this.after.emit(e)}vertical(){return window.innerWidth<800}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-deck-fullscreen"]],decls:12,vars:16,consts:[[1,"attack-modifiers-fullscreen"],[1,"header"],[1,"title"],[4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"attack-modifierdeck-container",3,"ngClass"],[3,"deck","character","ally","numeration","fullscreen","vertical","townGuard","initTimeout","before","after"],[1,"close-container",3,"click"],[1,"icon",3,"src"],["class","icon","src","./assets/images/monster/enemy.png",4,"ngIf"],["src","./assets/images/monster/enemy.png",1,"icon"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,GS,3,2,"ng-container",3),t.YNc(4,$S,4,3,"ng-container",3),t.YNc(5,WS,1,1,"span",4),t.YNc(6,XS,1,1,"span",4),t.YNc(7,tE,2,1,"span",3),t.qZA()(),t.TgZ(8,"div",5)(9,"ghs-attackmodifier-deck",6),t.NdJ("before",function(l){return i.beforeAttackModifierDeck(l)})("after",function(l){return i.afterAttackModifierDeck(l)}),t.qZA(),t.TgZ(10,"div",7),t.NdJ("click",function(){return i.dialogRef.close()}),t.qZA()(),t.TgZ(11,"div",7),t.NdJ("click",function(){return i.dialogRef.close()}),t.qZA()()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",!i.character&&!i.townGuard),t.xp6(1),t.Q6J("ngIf",!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.townGuard),t.xp6(1),t.Q6J("ngIf",!i.character&&"m"!=i.numeration&&"A"!=i.numeration),t.xp6(1),t.Q6J("ngClass",t.VKq(14,eE,i.vertical())),t.xp6(1),t.Q6J("deck",i.deck)("character",i.character)("ally",i.ally)("numeration",i.numeration)("fullscreen",!1)("vertical",i.vertical())("townGuard",i.townGuard)("initTimeout",1))},styles:[".attack-modifiers-fullscreen[_ngcontent-%COMP%]{width:100vw;height:100vh}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:1}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));cursor:initial}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));width:auto;margin-right:.2em}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%]{position:relative;width:100%;height:30vw;max-height:350px;overflow-x:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:3}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:800px;height:25.5vw;max-height:213px;z-index:3;margin-top:2em;margin-left:1%}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;width:99vw;max-width:800px;height:100%;max-height:initial}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container.vertical[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:calc(100% - var(--ghs-unit) * 10 * var(--ghs-text-factor));max-height:initial;transform:none}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .close-container[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;display:flex;width:100%;height:100%;z-index:2;top:0;left:0}"]})),a})();function nE(o,a){1&o&&t._UZ(0,"img",15)}function iE(o,a){1&o&&t._UZ(0,"img",16)}const oE=function(){return[]};function aE(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"div",8),t.TgZ(2,"div",9),t._UZ(3,"span",10),t.qZA(),t.TgZ(4,"div",11),t.YNc(5,nE,1,0,"img",12),t.ALo(6,"ghsRange"),t.qZA(),t.TgZ(7,"div",13),t._uU(8),t.YNc(9,iE,1,0,"img",14),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.battleGoals."+n.battleGoal.cardId),t.xp6(2),t.Q6J("ghs-label","data.battleGoals."+n.battleGoal.cardId+".text"),t.xp6(2),t.Q6J("ngForOf",t.xi3(6,5,t.DdM(8,oE),n.battleGoal.checks)),t.xp6(3),t.hij(" ",n.battleGoal.cardId," "),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.fhStyle)}}const sE=function(o,a,n,e,i){return{flipped:o,selected:a,disabled:n,filtered:e,fh:i}};let yw=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"battleGoal",void 0),(0,_.Z)(this,"identifier",void 0),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"selected",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"filtered",!1),(0,_.Z)(this,"reveal",!1)}ngOnChanges(e){e.identifier&&e.identifier.previousValue!=e.identifier.currentValue&&!this.battleGoal&&this.identifier&&(this.battleGoal=d.v.battleGoalManager.getBattleGoal(this.identifier))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-battlegoal"]],inputs:{battleGoal:"battleGoal",identifier:"identifier",flipped:"flipped",selected:"selected",disabled:"disabled",filtered:"filtered",reveal:"reveal"},features:[t.TTD],decls:8,vars:12,consts:[[1,"battlegoal-container"],["container",""],["card-reveal","",1,"card","vertical","reverse","battlegoal",3,"ngClass","disabled"],[1,"card-front"],[4,"ngIf"],[1,"card-back"],[1,"revealed"],[3,"ghs-label"],[1,"name",3,"ghs-label"],[1,"text"],[1,"placeholder",3,"ghs-label"],[1,"checks"],["src","./assets/images/check.svg",4,"ngFor","ngForOf"],[1,"card-id"],["src","./assets/images/fh/battlegoals/winter.svg",4,"ngIf"],["src","./assets/images/check.svg"],["src","./assets/images/fh/battlegoals/winter.svg"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0,1)(2,"div",2)(3,"div",3),t.YNc(4,aE,10,9,"ng-container",4),t.qZA(),t.TgZ(5,"div",5)(6,"span",6),t._UZ(7,"span",7),t.qZA()()()()),2&e){const s=t.MAs(1);t.xp6(2),t.Udp("font-size",.072*s.offsetWidth+"px"),t.Q6J("ngClass",t.qbA(6,sE,i.flipped,i.selected,i.disabled,i.filtered,i.settingsManager.settings.fhStyle))("disabled",!i.reveal),t.xp6(2),t.Q6J("ngIf",i.battleGoal),t.xp6(3),t.Q6J("ghs-label","game.cards.confirmReveal")}},dependencies:[x.mk,x.sg,x.O5,Yf,ie,Ii],styles:[".battlegoal-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-bottom:147%}.battlegoal[_ngcontent-%COMP%]{cursor:pointer;position:absolute;width:100%;height:100%;border:.2em solid transparent;border-radius:.5em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%]{background-image:url(battle-goal-front.e7531094c588ed2e.png);background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{position:absolute;top:22.5%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;transform:translate(-50%);font-family:var(--ghs-font-title);color:var(--ghs-color-black);font-size:1.5em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{position:absolute;top:30%;left:50%;width:55%;height:40%;display:flex;justify-content:center;align-items:center;text-align:center;transform:translate(-50%);font-family:var(--ghs-font-text);color:var(--ghs-color-black);font-size:1em;line-height:1em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .checks[_ngcontent-%COMP%]{position:absolute;top:70%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;transform:translate(-50%)}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .checks[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.5em;width:auto;margin:0 .2em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;top:80%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;text-align:center;text-transform:uppercase;transform:translate(-50%);font-family:var(--ghs-font-normal);font-size:.75em;color:var(--ghs-color-white);filter:var(--ghs-filter-outline-thin)}.battlegoal[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%]{background-image:url(battle-goal-back.d069b60d499428ec.png);background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.battlegoal.confirm[_ngcontent-%COMP%] .revealed[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--ghs-color-white);font-size:1.5em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black))}.battlegoal.disabled[_ngcontent-%COMP%]{cursor:initial}.battlegoal.selected[_ngcontent-%COMP%]{border-color:var(--ghs-color-green)}.battlegoal.filtered[_ngcontent-%COMP%]{border-color:var(--ghs-color-red)}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%]{background-image:url(battle-goal-front-fh.9cbd213e8708b674.png)}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal)}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{color:var(--ghs-color-brown);filter:none;font-weight:700}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-left:.1em;filter:var(--ghs-filter-brown)}.battlegoal.fh[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%]{background-image:url(battle-goal-back-fh.60856d4f807bfc05.png)}"]})),a})();const rE=function(o){return[o]},X6=function(o){return{selected:o}};function cE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",4)(1,"span",11),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.selectEdition(s))}),t.qZA(),t.TgZ(2,"span",6),t._uU(3),t.qZA(),t.TgZ(4,"input",12),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEdition(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.battleGoals.edition")("ghs-label-args",t.VKq(6,rE,n))("ngClass",t.VKq(8,X6,n==e.currentEdition)),t.xp6(2),t.hij("(",e.gameManager.battleGoalManager.getBattleGoalsForEdition(n).length,")"),t.xp6(1),t.Q6J("checked",-1!=e.gameManager.game.battleGoalEditions.indexOf(n)||e.gameManager.editionRules(n,!1))("disabled",e.gameManager.editionRules(n,!1))}}function lE(o,a){1&o&&t._UZ(0,"span",13),2&o&&t.Q6J("ghs-label","game.battleGoals.setup.empty")}const gE=function(o){return{disabled:o}};function dE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-battlegoal",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleFilter(s))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("battleGoal",n)("flipped",!0)("disabled",!e.selected(n)&&!e.filtered(n)||e.selectedAlias(n))("reveal",!1)("selected",!e.selectedAlias(n)&&e.selected(n))("filtered",e.filtered(n))("ngClass",t.VKq(7,gE,n.alias&&e.selectedAlias(n)))}}let UO=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"currentEdition",""),(0,_.Z)(this,"editions",[]),(0,_.Z)(this,"battleGoals",[]),this.dialogRef=e,this.editions=d.v.battleGoalManager.getBattleGoalEditions(),d.v.game.edition&&-1!=d.v.battleGoalManager.getBattleGoalEditions().indexOf(d.v.game.edition)&&(!d.v.game.battleGoalEditions||0==d.v.game.battleGoalEditions.length||1==d.v.game.battleGoalEditions.length&&-1!=d.v.game.battleGoalEditions.indexOf(d.v.game.edition))&&this.selectEdition(d.v.game.edition),this.update()}selectedAlias(e){return e.alias&&null!=d.v.battleGoalManager.getBattleGoals().find(i=>e.alias&&i.edition==e.alias.edition&&i.name==e.alias.name)||!1}selectEdition(e=""){this.currentEdition=e,this.update()}update(){this.battleGoals=this.currentEdition?d.v.battleGoalManager.getBattleGoalsForEdition(this.currentEdition):d.v.battleGoalManager.getBattleGoals(!1,!0)}toggleEdition(e){d.v.editionRules(e,!1)||(d.v.game.battleGoalEditions=d.v.game.battleGoalEditions||[],d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals||[],d.v.stateManager.before("battleGoals.setup."+(-1==d.v.game.battleGoalEditions.indexOf(e)?"addEdition":"removeEdition"),e),-1==d.v.game.battleGoalEditions.indexOf(e)?d.v.game.battleGoalEditions.push(e):(d.v.game.battleGoalEditions=d.v.game.battleGoalEditions.filter(i=>i!=e),d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals.filter(i=>i.edition!=e)),d.v.stateManager.after(),this.update())}selected(e){return!this.filtered(e)&&(e.edition==d.v.game.edition||-1!=d.v.game.battleGoalEditions.indexOf(e.edition))}filtered(e){return null!=d.v.game.filteredBattleGoals.find(i=>i.edition==e.edition&&i.name==e.name)}toggleFilter(e){d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals||[],d.v.stateManager.before("battleGoals.setup.filter."+(this.filtered(e)?"addCard":"removeCard"),e.edition,e.name),this.filtered(e)?d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals.filter(i=>i.edition!=e.edition||i.name!=e.name):this.selected(e)&&!this.selectedAlias(e)&&d.v.game.filteredBattleGoals.push(new Vn.xb(e.name,e.edition)),d.v.stateManager.after(),this.update()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-battlegoal-setup"]],decls:12,vars:9,consts:[[1,"battle-goals-setup-dialog"],[1,"scroll-container"],[1,"header",3,"ghs-label"],[1,"editions"],[1,"edition"],[1,"name",3,"ghs-label","ngClass","click"],[1,"size"],["class","edition",4,"ngFor","ngForOf"],[1,"battle-goals"],["class","warning",3,"ghs-label",4,"ngIf"],["class","battlegoal",3,"battleGoal","flipped","disabled","reveal","selected","filtered","ngClass","click",4,"ngFor","ngForOf"],[1,"name",3,"ghs-label","ghs-label-args","ngClass","click"],["type","checkbox",3,"checked","disabled","change"],[1,"warning",3,"ghs-label"],[1,"battlegoal",3,"battleGoal","flipped","disabled","reveal","selected","filtered","ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"div",3)(4,"div",4)(5,"span",5),t.NdJ("click",function(){return i.selectEdition()}),t.qZA(),t.TgZ(6,"span",6),t._uU(7),t.qZA()(),t.YNc(8,cE,5,10,"div",7),t.qZA(),t.TgZ(9,"div",8),t.YNc(10,lE,1,1,"span",9),t.YNc(11,dE,1,9,"ghs-battlegoal",10),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","game.battleGoals.setup"),t.xp6(3),t.Q6J("ghs-label","game.battleGoals.all")("ngClass",t.VKq(7,X6,""==i.currentEdition)),t.xp6(2),t.hij("(",i.gameManager.battleGoalManager.getBattleGoals().length,")"),t.xp6(1),t.Q6J("ngForOf",i.editions),t.xp6(2),t.Q6J("ngIf",0==i.battleGoals.length),t.xp6(1),t.Q6J("ngForOf",i.battleGoals))},dependencies:[x.mk,x.sg,x.O5,yw,ie],styles:[".battle-goals-setup-dialog[_ngcontent-%COMP%]{position:relative;width:100%}.battle-goals-setup-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{cursor:pointer}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%] .name.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));font-weight:700}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] ghs-battlegoal[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor))}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] ghs-battlegoal.disabled[_ngcontent-%COMP%]{opacity:.5}@media (max-width: 600px),(orientation: portrait){.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}"]})),a})();function hE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-battlegoal",8),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.select(s))})("doubleClick",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.select(s,!0))}),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("battleGoal",n)("flipped",i.gameManager.roundManager.firstRound||i.selected==e||!i.character.battleGoal||-1!=i.revealed.indexOf(e))("selected",i.selected==e)("reveal",i.gameManager.game.round>0&&i.selected!=e&&i.character.battleGoal&&-1==i.revealed.indexOf(e))("disabled",i.character.battleGoal&&i.gameManager.game.scenario&&i.gameManager.game.round>0||!1)}}const uE=function(o){return{disabled:o}};function _E(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",9)(1,"a",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancel())}),t.qZA(),t.TgZ(2,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.accept())}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.battleGoals.cancel"),t.xp6(1),t.Q6J("ngClass",t.VKq(3,uE,-1==n.selected))("ghs-label","game.battleGoals.chooseCard")}}const pE=function(o,a){return[o,a]};let bw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"battleGoals",[]),(0,_.Z)(this,"revealed",[]),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"selected",void 0),(0,_.Z)(this,"cardOnly",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.character=e.character,this.selected=this.character.battleGoal?0:-1,this.cardOnly=e.cardOnly,0==d.v.battleGoalManager.getBattleGoals().length?this.dialog.open(UO,{panelClass:["dialog"]}).closed.subscribe({next:()=>{d.v.battleGoalManager.getBattleGoals().length>(d.v.fhRules()||R.r.settings.battleGoalsFh?2:1)&&e.draw?this.drawCards():this.close()}}):e.draw?this.drawCards():this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.character=d.v.game.figures.find(l=>l instanceof oe.z&&l.edition==this.character.edition&&l.name==this.character.name)||this.character,this.selected=this.character.battleGoal?0:-1,this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}drawCards(){d.v.battleGoalManager.getBattleGoals().length>(d.v.fhRules()||R.r.settings.battleGoalsFh?2:1)&&(d.v.stateManager.before("battleGoals.drawCards","data.character."+this.character.name),this.character.battleGoals=[],this.character.battleGoal=!1,d.v.battleGoalManager.drawBattleGoal(this.character),d.v.battleGoalManager.drawBattleGoal(this.character),(d.v.fhRules()||R.r.settings.battleGoalsFh)&&d.v.battleGoalManager.drawBattleGoal(this.character),d.v.stateManager.after()),this.update()}update(){this.battleGoals=this.character.battleGoals.map(e=>d.v.battleGoalManager.getBattleGoal(e)).filter(e=>e).map(e=>e),this.character.battleGoal&&-1==this.revealed.indexOf(0)&&this.revealed.push(0)}drawCard(){d.v.stateManager.before("battleGoals.drawCard","data.character."+this.character.name),d.v.battleGoalManager.drawBattleGoal(this.character),d.v.stateManager.after(),this.update()}select(e,i=!1){!this.cardOnly&&(i||!this.character.battleGoal||d.v.roundManager.firstRound)&&(-1==this.revealed.indexOf(e)&&this.revealed.push(e),-1!=this.selected&&-1==this.revealed.indexOf(this.selected)&&this.revealed.push(this.selected),this.selected=this.selected==e?-1:e)}setup(){this.dialog.open(UO,{panelClass:["dialog"]}).closed.subscribe({next:()=>{d.v.battleGoalManager.getBattleGoals().length<(d.v.fhRules()||R.r.settings.battleGoalsFh?3:2)?this.close():this.update()}})}accept(){(-1!=this.selected&&!this.character.battleGoal||0!=this.selected&&this.character.battleGoal)&&(d.v.stateManager.before("battleGoals."+(-1!=this.selected?"select":"deselect"),"data.character."+this.character.name),-1!=this.selected?(this.character.battleGoal=!0,Fn(this.character.battleGoals,this.selected,0)):this.character.battleGoal=!1,d.v.stateManager.after()),this.close()}cancel(){this.selected=this.character.battleGoal?0:-1,this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-battlegoals"]],decls:11,vars:10,consts:[[1,"battle-goals-dialog"],[1,"scroll-container"],[1,"header",3,"ghs-label","ghs-label-args"],[1,"battle-goals"],["ghs-pointer-input","",3,"battleGoal","flipped","selected","reveal","disabled","singleClick","doubleClick",4,"ngFor","ngForOf"],["class","menu",4,"ngIf"],[1,"menu","small"],[3,"ghs-label","click"],["ghs-pointer-input","",3,"battleGoal","flipped","selected","reveal","disabled","singleClick","doubleClick"],[1,"menu"],[1,"cancel",3,"ghs-label","click"],[1,"accept",3,"ngClass","ghs-label","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"div",3),t.YNc(4,hE,1,5,"ghs-battlegoal",4),t.qZA(),t.YNc(5,_E,3,5,"div",5),t.TgZ(6,"div",6)(7,"a",7),t.NdJ("click",function(){return i.drawCards()}),t.qZA(),t.TgZ(8,"a",7),t.NdJ("click",function(){return i.drawCard()}),t.qZA()(),t.TgZ(9,"div",6)(10,"a",7),t.NdJ("click",function(){return i.setup()}),t.qZA()()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label",i.character.battleGoal?"game.battleGoals.chosen":"game.battleGoals.choose")("ghs-label-args",t.WLB(7,pE,i.character.name,i.gameManager.characterManager.characterName(i.character))),t.xp6(2),t.Q6J("ngForOf",i.battleGoals),t.xp6(1),t.Q6J("ngIf",!i.character.battleGoal||0!=i.selected),t.xp6(2),t.Q6J("ghs-label","game.battleGoals.drawCards"),t.xp6(1),t.Q6J("ghs-label","game.battleGoals.drawCard"),t.xp6(2),t.Q6J("ghs-label","game.battleGoals.setup"))},dependencies:[x.mk,x.sg,x.O5,yw,ie,An],styles:[".battle-goals-dialog[_ngcontent-%COMP%]{position:relative}.battle-goals-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{text-align:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.battle-goals-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.battle-goals-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] ghs-battlegoal[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.battle-goals-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor)) 0;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.battle-goals-dialog[_ngcontent-%COMP%] .menu.small[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)) 0;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor))}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center;margin:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.accept[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}"]})),a})();const fE=["menu"],mE=["drawCard"];function vE(o,a){1&o&&t._UZ(0,"img",15)}function CE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openBattleGoals(i))}),t._UZ(1,"img",13),t.YNc(2,vE,1,0,"img",14),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.battleGoals")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/battlegoals/battle-goal-back-fh.png":"./assets/images/battlegoals/battle-goal-back.png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.character.battleGoal&&n.character.battleGoals.length>0)}}function ME(o,a){1&o&&t._UZ(0,"img",16),2&o&&t.Q6J("ghs-label","game.cards.openDialog")("ghs-label-attribute","title")}function OE(o,a){if(1&o&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.numeration)}}function PE(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",13),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.characterIcon,t.LSH)}}const yE=function(o,a){return{vertical:o,minimize:a}};function bE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openFullscreen(i))}),t._UZ(1,"img",20),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.fullscreen")("ghs-label-attribute","title")("ngClass",t.WLB(3,yE,n.vertical,!n.deck.active))}}const xE=function(o,a,n){return{vertical:o,"without-fullscreen":a,minimize:n}};function wE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.open(i))}),t._UZ(1,"img",22),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.openDialog")("ghs-label-attribute","title")("ngClass",t.kEZ(3,xE,n.vertical,!n.fullscreen,!n.deck.active))}}const kE=function(o,a,n,e,i,s,l,m,O,k){return{disgarded:o,current:a,last:n,bottom:e,rolling:i,active:s,"disgard-active":l,animate:m,"animate-reverse":O,disabled:k}};function TE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",24),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw();return t.KtG(l.clickCard(s,i))}),t._UZ(1,"ghs-attackmodifier",25),t.qZA()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(),l=t.MAs(3);t.Udp("z-index",e>s.current?s.deck.cards.length-e:s.deck.cards.length+e+1)("left",i.rolling&&!s.vertical&&s.rollingIndex[e]?"calc(75% + "+(s.rollingIndex[e]-1)+" * 25%)":"")("top",i.rolling&&s.vertical&&s.rollingIndex[e]?"calc("+l.offsetHeight/1.3*(s.rollingIndex[e]-1)+"px)":""),t.Q6J("ngClass",t.rFY(17,kE,[es.rollingIndexPrev[e],e0||e>i.current-3||e>=i.current&&n.active&&-1==i.deck.disgarded.indexOf(e)))}}const AE=function(o,a,n){return{disabled:o,vertical:a,character:n}},SE=function(o){return{denied:o}},EE=function(o,a){return{"town-guard":o,disabled:a}},DE=function(o){return{"has-shuffle":o}};class xn{constructor(a,n,...e){(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"values",void 0),this.deck=a,this.type=n,this.values=e}}let Kf=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"ally",!1),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"bottom",!1),(0,_.Z)(this,"before",new t.vpe),(0,_.Z)(this,"after",new t.vpe),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"fullscreen",!0),(0,_.Z)(this,"vertical",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"battleGoals",!0),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"initTimeout",1500),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"characterIcon",""),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"type",Lt.kl.minus1),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"drawTimeout",null),(0,_.Z)(this,"queue",0),(0,_.Z)(this,"queueTimeout",null),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"rollingIndex",[]),(0,_.Z)(this,"rollingIndexPrev",[]),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"initServer",!1),(0,_.Z)(this,"drawCard",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.element.nativeElement.addEventListener("click",s=>{let l=document.elementsFromPoint(s.clientX,s.clientY);l[0].classList.contains("attack-modifiers")&&l.length>2&&l[2].click()})}ngOnInit(){this.character?(this.deck=this.character.attackModifierDeck,this.edition=this.character.edition,this.numeration=""+this.character.number,this.characterIcon=this.character.iconUrl):this.battleGoals=!1,this.current=this.deck.current,this.compact=!this.drawing&&this.fullscreen&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400),this.deck.cards.forEach((e,i)=>{this.rollingIndex[i]=this.calcRollingIndex(i,this.current),this.rollingIndexPrev[i]=this.calcRollingIndex(i,this.current-1)}),this.init||(this.drawTimeout=setTimeout(()=>{this.current=this.deck.current,this.drawTimeout=null,this.init=!0},R.r.settings.disableAnimations?0:this.initTimeout)),this.uiChangeSubscription=d.v.uiChange.subscribe({next:e=>{this.update(e)}}),this.edition&&!this.newStyle&&(this.newStyle=d.v.newAmStyle(this.edition)),R.r.settings.fhStyle&&(this.newStyle=!0),this.disabled=!this.standalone&&(!this.townGuard&&d.v.game.state==ge.D2.draw||this.townGuard&&null!=d.v.game.scenario),window.addEventListener("resize",e=>{this.compact=R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)}),window.addEventListener("fullscreenchange",e=>{this.compact=R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){e.deck&&this.update()}update(e=!1){this.disabled=!this.standalone&&(!this.townGuard&&d.v.game.state==ge.D2.draw||this.townGuard&&null!=d.v.game.scenario),this.character&&this.deck!=this.character.attackModifierDeck&&(this.deck=this.character.attackModifierDeck),this.initServer&&d.v.stateManager.wsState()!=WebSocket.OPEN&&(this.initServer=!1),this.deck.active?!this.init||e&&!this.initServer?(this.current=this.deck.current,e&&!this.initServer&&(this.initServer=!0)):this.current{this.rollingIndex[s]=this.calcRollingIndex(s,this.current),this.rollingIndexPrev[s]=this.calcRollingIndex(s,this.current-1)}),this.compact=R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)}drawQueue(){this.drawing=!0,this.element.nativeElement.getElementsByClassName("attack-modifiers")[0].classList.add("drawing"),this.queueTimeout=setTimeout(()=>{this.drawing=!1,this.queueTimeout=null,this.queue>0?(this.queue--,this.current++,this.drawQueue()):(this.element.nativeElement.getElementsByClassName("attack-modifiers")[0].classList.remove("drawing"),this.queue<0&&(this.queue=0))},R.r.settings.disableAnimations?0:this.vertical?1050:1850)}draw(e){this.compact&&this.fullscreen?this.openFullscreen(e):this.disabled?this.dialog.open(W6,{panelClass:"dialog",data:{deck:this.deck,character:this.character,ally:this.ally,numeration:this.numeration,newStyle:this.newStyle,townGuard:this.townGuard,before:this.before,after:this.after}}):!this.drawTimeout&&this.deck.current{this.before.emit(new xn(this.deck,"draw")),d.v.attackModifierManager.drawModifier(this.deck),this.after.emit(new xn(this.deck,"draw")),this.drawTimeout=null},R.r.settings.disableAnimations?0:150))}openFullscreen(e){this.dialog.open(Pw,{backdropClass:"fullscreen-backdrop",data:{deck:this.deck,character:this.character,ally:this.ally,numeration:this.numeration,newStyle:this.newStyle,townGuard:this.townGuard,before:this.before,after:this.after}}),e.preventDefault(),e.stopPropagation()}openBattleGoals(e){this.dialog.open(bw,{panelClass:["dialog"],data:{character:this.character,draw:!this.character.battleGoals||0==this.character.battleGoals.length}}),e.preventDefault(),e.stopPropagation()}calcRollingIndex(e,i){const s=this.deck.cards[e];if(!s.rolling||s.active&&-1!=this.deck.disgarded.indexOf(e)||i<0)return 0;if(e==i-2)return 2;if(el.rolling))return i-e;if(e-1&&this.deck.cards[m].rolling&&!this.deck.cards[m].active;)m--,l++;return 1+this.deck.cards.slice(e,i-1).filter(O=>O.active&&-1==this.deck.disgarded.indexOf(this.deck.cards.indexOf(O))).length+l}return 0}clickCard(e,i){(!this.drawing||e>this.current)&&(this.deck.cards[e].active&&-1==this.deck.disgarded.indexOf(e)?(this.before.emit(new xn(this.deck,"disgard",""+e)),this.deck.disgarded.push(e),this.after.emit(new xn(this.deck,"disgard",""+e))):this.open(i))}open(e){d.v.game.state==ge.D2.next&&this.fullscreen&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)?this.openFullscreen(e):(this.dialog.open(W6,{panelClass:"dialog",data:{deck:this.deck,character:this.character,ally:this.ally,numeration:this.numeration,newStyle:this.newStyle,townGuard:this.townGuard,before:this.before,after:this.after}}),e.preventDefault(),e.stopPropagation())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-deck"]],viewQuery:function(e,i){if(1&e&&(t.Gf(fE,5),t.Gf(mE,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first),t.iGM(s=t.CRH())&&(i.drawCard=s.first)}},inputs:{deck:"deck",character:"character",ally:"ally",numeration:"numeration",bottom:"bottom",fullscreen:"fullscreen",vertical:"vertical",townGuard:"townGuard",battleGoals:"battleGoals",standalone:"standalone",edition:"edition",initTimeout:"initTimeout"},outputs:{before:"before",after:"after"},features:[t.TTD],decls:13,vars:29,consts:[[1,"attack-modifiers",3,"ngClass"],["class","battlegoals-button",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],[1,"am-container","draw",3,"ngClass"],["drawCard",""],[1,"am",3,"ghs-label","ghs-label-attribute","ngClass","click"],[1,"number",3,"ngClass"],["class","shuffle","src","./assets/images/shuffle.svg",3,"ghs-label","ghs-label-attribute",4,"ngIf"],["class","numeration",4,"ngIf"],["class","character-icon",4,"ngIf"],["class","fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],["class","settings",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"battlegoals-button",3,"ghs-label","ghs-label-attribute","click"],[3,"src"],["class","check","src","./assets/images/check.svg",4,"ngIf"],["src","./assets/images/check.svg",1,"check"],["src","./assets/images/shuffle.svg",1,"shuffle",3,"ghs-label","ghs-label-attribute"],[1,"numeration"],[1,"character-icon"],[1,"fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/fullscreen.svg"],[1,"settings",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/settings.svg",1,"ghs-svg"],["class","am-container",3,"z-index","ngClass","left","top","ghs-label","ghs-label-attribute","click",4,"ngIf"],[1,"am-container",3,"ngClass","ghs-label","ghs-label-attribute","click"],[1,"am",3,"attackModifier","numeration","characterIcon","ally","flipped","disableFlip","newStyle","townGuard"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t.YNc(1,CE,3,4,"div",1),t.TgZ(2,"div",2,3)(4,"div",4),t.NdJ("click",function(l){return i.draw(l)}),t.TgZ(5,"span",5),t._uU(6),t.qZA(),t.YNc(7,ME,1,2,"img",6),t.YNc(8,OE,2,1,"span",7),t.YNc(9,PE,2,1,"span",8),t.qZA(),t.YNc(10,bE,2,6,"span",9),t.YNc(11,wE,2,7,"span",10),t.qZA(),t.YNc(12,ZE,2,1,"ng-container",11),t.qZA()),2&e){const s=t.MAs(3);t.Q6J("ngClass",t.kEZ(18,AE,!i.standalone&&(!i.townGuard&&i.gameManager.game.state==i.GameState.draw||i.townGuard&&i.gameManager.game.scenario),i.vertical,i.character)),t.xp6(1),t.Q6J("ngIf",i.character&&i.battleGoals&&i.gameManager.game.scenario&&i.settingsManager.settings.battleGoals&&i.gameManager.game.round>0&&!i.settingsManager.settings.battleGoalsCharacter),t.xp6(1),t.Udp("z-index",i.deck.cards.length+1)("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.VKq(22,SE,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.attackModifiers&&(!i.character||!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]))),t.xp6(2),t.Q6J("ghs-label",i.deck.current==i.deck.cards.length-1?"game.cards.shuffle":"game.cards.draw")("ghs-label-attribute","title")("ngClass",t.WLB(24,EE,i.townGuard,i.disabled)),t.xp6(1),t.Q6J("ngClass",t.VKq(27,DE,i.deck.current==i.deck.cards.length-1)),t.xp6(1),t.hij(" ",i.deck.current{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"lootTypes",Object.values(le.CG)),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"loot",{}),this.data=e,this.dialogRef=i,this.character=e.character,e.all&&this.lootTypes.forEach(s=>{this.loot[s]=this.character.progress.loot[s]||0})}ngOnInit(){this.character.progress||(this.character.progress=new tT.f)}changeLoot(e,i){this.loot[e]||(this.loot[e]=0),this.loot[e]=this.loot[e]+i,this.loot[e]<0?this.loot[e]=0:(!this.character.progress.loot[e]||this.loot[e]>this.character.progress.loot[e])&&(this.loot[e]=this.character.progress.loot[e]||0)}moveLoot(){Object.keys(this.loot).forEach(e=>{const i=e;let s=this.loot[i]||0;(this.character.progress.loot[i]||0)0&&(d.v.stateManager.before("moveResource","data.character."+this.character.name,"game.loot."+i,s+""),d.v.game.party.loot[i]=(d.v.game.party.loot[i]||0)+s,this.character.progress.loot[i]=(this.character.progress.loot[i]||0)-s,d.v.stateManager.after())}),this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-move-resources"]],decls:14,vars:9,consts:[[1,"move-resources-dialog"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"icon","character-icon",3,"src"],[1,"character-title",3,"ngClass"],[1,"values"],[4,"ngFor","ngForOf"],[1,"menu"],[1,"cancel",3,"click"],[1,"apply",3,"click"],["class","loot",4,"ngIf"],[1,"loot"],[1,"ghs-svg",3,"src"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"value",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/plus.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"img",4),t.TgZ(5,"span",5),t._uU(6),t.qZA()()(),t.TgZ(7,"div",6),t.YNc(8,NE,2,1,"ng-container",7),t.qZA(),t.TgZ(9,"div",8)(10,"a",9),t.NdJ("click",function(){return i.close()}),t._UZ(11,"span",2),t.qZA(),t.TgZ(12,"a",10),t.NdJ("click",function(){return i.moveLoot()}),t._UZ(13,"span",2),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","character.progress.resources.move"),t.xp6(2),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(7,JE,i.character.absent)),t.xp6(1),t.Oqu(i.gameManager.characterManager.characterName(i.character,!0)),t.xp6(2),t.Q6J("ngForOf",i.lootTypes),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(2),t.Q6J("ghs-label","character.progress.resources.apply"))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".move-resources-dialog[_ngcontent-%COMP%]{padding:.5em}.move-resources-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 44 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title[_ngcontent-%COMP%]{display:flex;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title.absent[_ngcontent-%COMP%]{text-decoration:line-through}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto auto auto;font-size:2em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:flex-start;align-items:center;white-space:nowrap}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);margin-right:.3em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();const UE=function(o,a){return[o,a]};function LE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dialogRef.close(s))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ghs-label","scenario.section.conclusion"+(e.data.parent.conclusion?".continue":"")+(n.named?".named":""))("ghs-label-args",t.WLB(2,UE,"%data.section:"+n.index+"%",n.named?"data.section."+n.name:""))}}let lg=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),this.data=e,this.dialogRef=i,1==this.data.conclusions.length&&this.dialogRef.close(this.data.conclusions[0])}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-conclusion-dialog"]],decls:9,vars:3,consts:[[1,"section-popup"],[1,"header"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"],[3,"ghs-label"],[1,"conclusions"],["class","placeholder text-white conclusion",3,"ghs-label","ghs-label-args","click",4,"ngFor","ngForOf"],[1,"buttons"],[1,"cancel",3,"click"],[1,"placeholder","text-white","conclusion",3,"ghs-label","ghs-label-args","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"img",2)(3,"span",3),t.qZA(),t.TgZ(4,"div",4),t.YNc(5,LE,1,5,"span",5),t.qZA(),t.TgZ(6,"div",6)(7,"a",7),t.NdJ("click",function(){return i.dialogRef.close()}),t._UZ(8,"span",3),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ghs-label","scenario.section.conclusion.select"),t.xp6(2),t.Q6J("ngForOf",i.data.conclusions),t.xp6(3),t.Q6J("ghs-label","scenario.section.cancel"))},dependencies:[x.sg,ie],styles:[".section-popup[_ngcontent-%COMP%]{text-align:center;min-width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.section-popup[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white)}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]:hover{opacity:.7}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]:not(:first-child){border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}"]})),a})();var Ni=E(1235);function QE(o,a){if(1&o&&(t.TgZ(0,"span",30),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.hij("",n.edition,"\xa0")}}function RE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function FE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function qE(o,a){if(1&o&&(t.TgZ(0,"div",27)(1,"span",28),t._UZ(2,"span",29),t.qZA(),t.TgZ(3,"div",23),t.YNc(4,QE,2,1,"span",24),t.YNc(5,RE,2,0,"span",25),t.YNc(6,FE,2,0,"span",25),t.TgZ(7,"span"),t._uU(8),t.qZA()()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(2),t.Q6J("ngIf",n.edition),t.xp6(1),t.Q6J("ngIf",n.item.id<100),t.xp6(1),t.Q6J("ngIf",n.item.id<10),t.xp6(2),t.Oqu(n.item.id)}}const ww=function(o){return{fh:o}};function HE(o,a){if(1&o&&t._UZ(0,"span",40),2&o){const n=t.oxw().index,e=t.oxw(4);t.Q6J("ngClass",t.VKq(2,ww,e.settingsManager.settings.fhStyle))("ghs-label","%game.characterToken."+e.slotsBackMarked[n]+"%")}}const e_=function(o){return{interactive:o}};function jE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",37),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(4);return t.KtG(l.clickedSlotBack.emit(s))}),t._UZ(1,"ghs-action",38),t.YNc(2,HE,1,4,"span",39),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Q6J("ngClass",t.VKq(5,e_,i.clickedSlotBack.observed)),t.xp6(1),t.Akn(i.fhStyle?"fh":"gh"),t.Q6J("action",n),t.xp6(1),t.Q6J("ngIf",i.slotsBackMarked.length>=e-1&&i.slotsBackMarked[e])}}function BE(o,a){if(1&o&&(t.TgZ(0,"div",35),t.YNc(1,jE,3,7,"span",36),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.slotsBack)}}function zE(o,a){if(1&o&&(t.TgZ(0,"div",41),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.AsE("",n.count,"/",n.item.count,"")}}function GE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.flipped=!i.flipped)}),t._UZ(1,"span",43),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.card.flip%"))}function VE(o,a){if(1&o&&(t.TgZ(0,"span",30),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.hij("",n.edition,"\xa0")}}function YE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function KE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function $E(o,a){if(1&o&&(t.TgZ(0,"div",31),t._UZ(1,"img",7)(2,"div",8),t.TgZ(3,"div",9)(4,"div",32),t._UZ(5,"ghs-actions",33),t.qZA(),t.YNc(6,BE,2,1,"div",11),t.qZA(),t.YNc(7,zE,2,2,"div",12),t.YNc(8,GE,2,1,"div",34),t.TgZ(9,"div",23),t.YNc(10,VE,2,1,"span",24),t.YNc(11,YE,2,0,"span",25),t.YNc(12,KE,2,0,"span",25),t.TgZ(13,"span"),t._uU(14),t.qZA()()()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/artwork/items/"+n.item.edition+"-"+(n.item.id<100?"0":"")+(n.item.id<10?"0":"")+n.item.id+".png",t.LSH),t.xp6(1),t.Q6J("ghs-label","data.items."+n.item.edition+"-"+n.item.id),t.xp6(3),t.Akn(n.fhStyle?"fh":"gh"),t.Q6J("actions",n.item.actionsBack)("noDivider",!0),t.xp6(1),t.Q6J("ngIf",n.slotsBack.length>0),t.xp6(1),t.Q6J("ngIf",n.item.count),t.xp6(1),t.Q6J("ngIf",n.item.actionsBack&&n.item.actionsBack.length>0),t.xp6(2),t.Q6J("ngIf",n.edition),t.xp6(1),t.Q6J("ngIf",n.item.id<100),t.xp6(1),t.Q6J("ngIf",n.item.id<10),t.xp6(2),t.Oqu(n.item.id)}}function WE(o,a){if(1&o&&(t.TgZ(0,"div",32),t._UZ(1,"ghs-actions",33),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.fhStyle?"fh":"gh"),t.Q6J("actions",n.item.actions)("noDivider",!0)}}function XE(o,a){if(1&o&&t._UZ(0,"span",40),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ngClass",t.VKq(2,ww,e.settingsManager.settings.fhStyle))("ghs-label","%game.characterToken."+e.slotsMarked[n]+"%")}}function tD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",37),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(3);return t.KtG(l.clickedSlot.emit(s))}),t._UZ(1,"ghs-action",38),t.YNc(2,XE,1,4,"span",39),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.Q6J("ngClass",t.VKq(5,e_,i.clickedSlot.observed)),t.xp6(1),t.Akn(i.fhStyle?"fh":"gh"),t.Q6J("action",n),t.xp6(1),t.Q6J("ngIf",i.slotsMarked.length>=e-1&&i.slotsMarked[e])}}function eD(o,a){if(1&o&&(t.TgZ(0,"div",35),t.YNc(1,tD,3,7,"span",36),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.slots)}}function nD(o,a){if(1&o&&(t.TgZ(0,"div",41),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.AsE("",n.count,"/",n.item.count,"")}}function iD(o,a){1&o&&t._UZ(0,"span",47),2&o&&t.Q6J("ghs-label","%game.itemFh."+a.$implicit+"%")}function oD(o,a){if(1&o&&(t.ynx(0),t.YNc(1,iD,1,1,"span",46),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.item.requiredItems)}}function aD(o,a){if(1&o&&(t.TgZ(0,"span",52),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("x",n.value,"")}}function sD(o,a){if(1&o&&(t.TgZ(0,"span",49),t._UZ(1,"img",50),t.YNc(2,aD,2,1,"span",51),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n.key+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.value&&n.value>1)}}function rD(o,a){if(1&o&&(t.ynx(0),t.YNc(1,sD,3,2,"span",48),t.ALo(2,"keyvalue"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,1,n.item.resources))}}function cD(o,a){if(1&o&&(t.TgZ(0,"span",52),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("x",n.value,"")}}const lD=function(o){return[o]};function gD(o,a){if(1&o&&(t.TgZ(0,"span",49),t._UZ(1,"span",53),t.YNc(2,cD,2,1,"span",51),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ghs-label","game.items.anyResource")("ghs-label-args",t.VKq(3,lD,n.key)),t.xp6(1),t.Q6J("ngIf",n.value&&n.value>1)}}function dD(o,a){if(1&o&&(t.ynx(0),t.YNc(1,gD,3,5,"span",48),t.ALo(2,"keyvalue"),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,1,n))}}const hD=function(){return[]};function uD(o,a){if(1&o&&(t.TgZ(0,"div",44),t.YNc(1,oD,2,1,"ng-container",25),t.YNc(2,rD,3,3,"ng-container",25),t.YNc(3,dD,3,3,"ng-container",45),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.item.requiredItems),t.xp6(1),t.Q6J("ngIf",n.item.resources),t.xp6(1),t.Q6J("ngForOf",n.item.resourcesAny||t.DdM(3,hD))}}function _D(o,a){if(1&o&&(t.TgZ(0,"div",54)(1,"span",52),t._uU(2),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Oqu(n.item.cost)}}function pD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",55),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedConsumed.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedConsumed.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedConsumed.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.lost%")}}function fD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",56),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedSpent.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedSpent.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedSpent.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.spent%")}}function mD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return i.flipped=!i.flipped,t.KtG(i.clickedFlip.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedFlip.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedFlip.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.flip%")}}function vD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",58),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedPersistent.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedPersistent.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedPersistent.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.persistent%")}}function CD(o,a){1&o&&(t.TgZ(0,"div",59),t._UZ(1,"span",43),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.card.loss%"))}function MD(o,a){1&o&&(t.TgZ(0,"div",60),t._UZ(1,"span",43),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.card.round%"))}function OD(o,a){if(1&o&&(t.TgZ(0,"div",61)(1,"span",62),t._UZ(2,"img",63),t.qZA(),t.TgZ(3,"span",52),t._uU(4),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh/attackmodifier/icons/minus1.png":"/items/minus1.svg"),t.LSH),t.xp6(2),t.hij("x",n.item.minusOne,"")}}function PD(o,a){if(1&o&&(t.TgZ(0,"div",64),t._UZ(1,"img",65),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/items/slots/"+n.item.slot+".svg",t.LSH)}}function yD(o,a){if(1&o&&(t.TgZ(0,"span",30),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("",n.edition,"\xa0")}}function bD(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function xD(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function wD(o,a){if(1&o&&(t.TgZ(0,"div",66),t._UZ(1,"span",29),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,ww,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("ghs-label","%game.characterToken."+n.item.solo+"%")}}const kD=function(o,a,n,e){return{flipped:o,random:a,fh:n,craft:e}};function TD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",1,2)(2,"div",3),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.emitRevealed(i))}),t.YNc(3,qE,9,5,"div",4),t.YNc(4,$E,15,13,"div",5),t.TgZ(5,"div",6),t._UZ(6,"img",7)(7,"div",8),t.TgZ(8,"div",9),t.YNc(9,WE,2,4,"div",10),t.YNc(10,eD,2,1,"div",11),t.qZA(),t.YNc(11,nD,2,2,"div",12),t.YNc(12,uD,4,4,"div",13),t.YNc(13,_D,3,1,"div",14),t.YNc(14,pD,2,4,"div",15),t.YNc(15,fD,2,4,"div",16),t.YNc(16,mD,2,4,"div",17),t.YNc(17,vD,2,4,"div",18),t.YNc(18,CD,2,1,"div",19),t.YNc(19,MD,2,1,"div",20),t.YNc(20,OD,5,2,"div",21),t.YNc(21,PD,2,1,"div",22),t.TgZ(22,"div",23),t.YNc(23,yD,2,1,"span",24),t.YNc(24,bD,2,0,"span",25),t.YNc(25,xD,2,0,"span",25),t.TgZ(26,"span"),t._uU(27),t.qZA()(),t.YNc(28,wD,2,4,"div",26),t.qZA()()()}if(2&o){const n=t.MAs(1),e=t.oxw();t.xp6(2),t.Udp("font-size",.072*n.offsetWidth+"px"),t.Q6J("ngClass",t.l5B(26,kD,e.flipped,e.item.random,e.fhStyle,e.craft))("disabled",!e.reveal||e.item.actionsBack&&e.item.actionsBack.length>0||!1),t.xp6(1),t.Q6J("ngIf",!e.item.actionsBack||0==e.item.actionsBack.length),t.xp6(1),t.Q6J("ngIf",e.item.actionsBack&&e.item.actionsBack.length>0),t.xp6(2),t.Q6J("src","./assets/artwork/items/"+e.item.edition+"-"+(e.item.id<100?"0":"")+(e.item.id<10?"0":"")+e.item.id+".png",t.LSH),t.xp6(1),t.Q6J("ghs-label","data.items."+e.item.edition+"-"+e.item.id),t.xp6(2),t.Q6J("ngIf",e.item.actions&&e.item.actions.length>0),t.xp6(1),t.Q6J("ngIf",e.slots.length>0),t.xp6(1),t.Q6J("ngIf",e.item.count),t.xp6(1),t.Q6J("ngIf",e.craft),t.xp6(1),t.Q6J("ngIf",e.item.cost&&!e.item.solo),t.xp6(1),t.Q6J("ngIf",e.item.consumed),t.xp6(1),t.Q6J("ngIf",e.item.spent),t.xp6(1),t.Q6J("ngIf",e.item.actionsBack&&e.item.actionsBack.length>0),t.xp6(1),t.Q6J("ngIf",e.item.persistent),t.xp6(1),t.Q6J("ngIf",e.item.loss),t.xp6(1),t.Q6J("ngIf",e.item.round),t.xp6(1),t.Q6J("ngIf",e.item.minusOne),t.xp6(1),t.Q6J("ngIf",e.item.slot),t.xp6(2),t.Q6J("ngIf",e.edition),t.xp6(1),t.Q6J("ngIf",e.item.id<100),t.xp6(1),t.Q6J("ngIf",e.item.id<10),t.xp6(2),t.Oqu(e.item.id),t.xp6(1),t.Q6J("ngIf",e.item.solo)}}let Xd=(()=>{var o;class a{constructor(){(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"identifier",void 0),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"count",1),(0,_.Z)(this,"slotsMarked",[]),(0,_.Z)(this,"slotsBackMarked",[]),(0,_.Z)(this,"editionLabel",""),(0,_.Z)(this,"revealed",new t.vpe),(0,_.Z)(this,"clickedConsumed",new t.vpe),(0,_.Z)(this,"clickedSpent",new t.vpe),(0,_.Z)(this,"clickedFlip",new t.vpe),(0,_.Z)(this,"clickedSlot",new t.vpe),(0,_.Z)(this,"clickedSlotBack",new t.vpe),(0,_.Z)(this,"clickedPersistent",new t.vpe),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"craft",!1),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"slots",[]),(0,_.Z)(this,"slotsBack",[]),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"gameManager",d.v)}ngOnInit(){if(!this.item&&this.identifier&&(this.item=d.v.itemManager.getItem(+this.identifier.name,this.identifier.edition,!0)),this.item&&(this.item.edition!=this.editionLabel&&(this.edition=this.item.edition),"fh"==this.item.edition&&(this.fhStyle=!0),(this.item.resources&&Object.values(this.item.resources).some(e=>e)||this.item.requiredItems&&this.item.requiredItems.length>0||this.item.resourcesAny&&this.item.resourcesAny.length>0)&&(this.fhStyle=!0,this.craft=!0),this.item.actions=this.item.actions||[],this.applySlots(this.item.slots,this.slots),this.item.slotsBack&&(this.item.actionsBack=this.item.actionsBack||[],this.applySlots(this.item.slotsBack,this.slots)),this.item.summon&&!this.item.actions.find(e=>e.type==vt.Us.summon&&"summonDataItem"==e.value))){const e=new vt.aU(vt.Us.summon,"summonDataItem");e.valueObject=this.item.summon,e.small=!0,this.item.actions.push(e)}}applySlots(e,i){if(e&&!i.find(s=>s.type==vt.Us.card&&s.subActions.length>0&&(""+s.value).startsWith("slot")))for(let s=0;s3&&(l.small=!0),i.push(l)}}applySlotsGrid(e,i){if(e&&!i.find(s=>s.type==vt.Us.grid&&s.subActions.length>0&&s.subActions[0].type==vt.Us.card&&(""+s.subActions[0].value).startsWith("slot")))if(e<5){const s=new vt.aU(vt.Us.grid,e);for(let l=0;l3&&(s.small=!0),i.push(s)}else{const s=Math.ceil(e/3);for(let l=0;l1&&(O.small=!0);for(let k=0;k0,n.countFlag(n.ItemFlags.persistent)>0))}}function DD(o,a){1&o&&(t.TgZ(0,"span",9),t._UZ(1,"img",10),t.qZA())}const ID=function(o,a){return{equipped:o,disabled:a}};let kw=(()=>{var o;class a{constructor(){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ItemFlags",Ni.CT),(0,_.Z)(this,"GameState",ge.D2)}equipped(){return this.character.progress.equippedItems.find(e=>e.name==""+this.item.id&&e.edition==this.item.edition)}isLootRandomItem(){return this.character.progress.equippedItems.find(e=>e.name==""+this.item.id&&e.edition==this.item.edition&&"loot-random-item"==e.marker)}toggleEquippedItem(e=!1){(this.setup||e)&&null!=this.character.progress.items.find(i=>i.name==""+this.item.id&&i.edition==this.item.edition)&&(d.v.stateManager.before(this.equipped()?"unequipItem":"equipItem","data.character."+this.character.name,""+this.item.id,this.item.edition),d.v.itemManager.toggleEquippedItem(this.item,this.character,e),d.v.stateManager.after(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500))}countFlag(e){const i=this.equipped();return i&&i.tags&&i.tags.filter(s=>s==e).length||0}toggleFlag(e,i){if(!this.setup&&d.v.game.state==ge.D2.next||e){const s=this.equipped();s&&(s.tags=s.tags||[],d.v.stateManager.before(-1==s.tags.indexOf(i)?"characterItemApply."+i:"characterItemUnapply."+i,"data.character."+this.character.name,""+this.item.id,this.item.edition),-1==s.tags.indexOf(i)?s.tags.push(i):(s.tags=s.tags.filter(l=>l!=i),i==Ni.CT.spent&&(s.tags=s.tags.filter(l=>l!=Ni.CT.slot&&l!=Ni.CT.slotBack))),d.v.stateManager.after(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500))}}toggleFlagCount(e,i){if(!this.setup&&d.v.game.state==ge.D2.next){const s=this.equipped();if(s){s.tags=s.tags||[];const l=this.countFlag(i);if(d.v.stateManager.before(l<=e?"characterItemApply."+i:"characterItemUnapply."+i,"data.character."+this.character.name,""+this.item.id,this.item.edition),l<=e){for(let m=l;m<=e;m++)s.tags.push(i);i==Ni.CT.slot&&this.countFlag(i)==this.item.slots&&(this.item.spent&&!this.countFlag(Ni.CT.spent)?this.toggleFlag(!0,Ni.CT.spent):this.item.consumed&&!this.countFlag(Ni.CT.consumed)&&this.toggleFlag(!0,Ni.CT.consumed))}else for(let m=e;m{d.v.uiChange.emit()},500)}}}slotsMarked(e){let i=[];for(let s=0;s{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"opened",!1),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"setup",!1),this.data=e,this.dialogRef=i,this.item=e.item,this.character=e.character,this.setup=e.setup||!1}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},1e3)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-item-dialog"]],decls:4,vars:7,consts:[[1,"item-dialog",3,"ngClass","click"],[3,"item","flipped","editionLabel",4,"ngIf"],[3,"character","item","setup",4,"ngIf"],["class","close-container",3,"click",4,"ngIf"],[3,"item","flipped","editionLabel"],[3,"character","item","setup"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(){return!i.character&&i.close()}),t.YNc(1,ND,1,3,"ghs-item",1),t.YNc(2,JD,1,3,"ghs-character-item",2),t.qZA(),t.YNc(3,UD,1,0,"div",3)),2&e&&(t.Q6J("ngClass",t.WLB(4,LD,!i.opened,i.opened)),t.xp6(1),t.Q6J("ngIf",!i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",!i.character))},dependencies:[x.mk,x.O5,kw,Xd],styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.item-dialog[_ngcontent-%COMP%]{width:66.66vh;max-width:400px;height:100vh;max-height:600px;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0)}.item-dialog[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%], .item-dialog[_ngcontent-%COMP%] ghs-character-item[_ngcontent-%COMP%]{width:100%;height:auto}.item-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.item-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.8s}@media (max-width: 600px),(orientation: portrait){.item-dialog[_ngcontent-%COMP%]{width:80vw;max-width:400px;height:120vw;max-height:600px}}.close-container[_ngcontent-%COMP%]{position:absolute;inset:0}"]})),a})();var yn=E(9148);function QD(o,a){if(1&o&&t._UZ(0,"span",7),2&o){const n=t.oxw().index,e=t.oxw(2);t.Q6J("ghs-label",e.rewardLabel[n][0]+".result")("ghs-label-args",e.rewardResults[n])}}function RD(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,",\xa0"),t.qZA())}function FD(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",4),t.YNc(2,QD,1,2,"span",5),t.YNc(3,RD,2,0,"span",6),t.BQk()),2&o){const n=a.index,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",e.rewardLabel[n][0])("ghs-label-args",e.rewardLabel[n].slice(1)),t.xp6(1),t.Q6J("ngIf",e.rewardResults&&e.rewardResults[n]&&e.rewardResults[n].length>0),t.xp6(1),t.Q6J("ngIf",e.treasure.rewards.length>1&&n0)}}let $f=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"treasure",void 0),(0,_.Z)(this,"index",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"rewardResults",void 0),(0,_.Z)(this,"itemCards",!1),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"rewardLabel",[]),(0,_.Z)(this,"labelPrefix","game.loot.treasures.rewards."),this.dialog=e}ngOnInit(){if(this.treasure)this.index=this.treasure.index;else{const e=d.v.editionData.find(i=>i.edition==this.edition);if(e&&e.treasures){const i=this.index-(e.treasureOffset||0);i>=0&&i{this.rewardLabel[i]=this.calcRewardLabel(e)}),this.itemCards&&this.treasure.rewards.forEach((e,i)=>{if(-1!=[yn.Hj.item,yn.Hj.itemBlueprint,yn.Hj.itemDesign,yn.Hj.itemFh].indexOf(e.type)){const s=""+e.value;let l=this.edition,m=-1;isNaN(+s)?(m=+s.split("-")[0],l=s.split("-")[1]):m=+s;const O=d.v.itemManager.getItem(m,l,!0);O&&this.items.push(O)}else if(-1!=[yn.Hj.randomItem,yn.Hj.randomItemBlueprint,yn.Hj.randomItemDesign].indexOf(e.type)&&this.rewardResults&&this.rewardResults[i]&&this.rewardResults[i][0]&&!isNaN(+this.rewardResults[i][0])){const s=d.v.itemManager.getItem(+this.rewardResults[i][0],this.rewardResults[i][2],!0);s&&this.items.push(s)}}))}calcRewardLabel(e){if("custom"==e.type)return[""+e.value];const i=""+(e.value||"");switch(e.type){case yn.Hj.gold:case yn.Hj.goldFh:case yn.Hj.experience:case yn.Hj.experienceFh:case yn.Hj.battleGoal:case yn.Hj.randomScenario:case yn.Hj.randomScenarioFh:case yn.Hj.randomItem:case yn.Hj.randomItemDesign:case yn.Hj.randomItemBlueprint:case yn.Hj.partyAchievement:case yn.Hj.campaignSticker:case yn.Hj.heal:case yn.Hj.loot:case yn.Hj.lootCards:return[this.labelPrefix+e.type,i];case yn.Hj.damage:return"terrain"==i?[this.labelPrefix+e.type,"%game.level.hazardousTerrain%"]:[this.labelPrefix+e.type,"%game.damage:"+i+"%"];case yn.Hj.condition:const s=i.split("+").map(se=>"%game.condition."+se+"%");let l=s[0];return s.length>1&&(l=s.slice(0,-1).join(","),l+=" %and% "+s[s.length-1]),[this.labelPrefix+e.type,l];case yn.Hj.item:case yn.Hj.itemDesign:case yn.Hj.itemFh:case yn.Hj.itemBlueprint:const m=[],O=[];i.split("+").forEach(se=>{let De=this.edition,un=-1;isNaN(+se)?(un=+se.split("-")[0],De=se.split("-")[1]):un=+se;const vn=d.v.itemManager.getItem(un,De,!0);vn?(m.push(e.type==yn.Hj.itemFh||e.type==yn.Hj.itemBlueprint?vn.id+"":"%game.item% "+(De==this.edition?vn.id:vn.id+" [%data.edition."+vn.edition+"%]")),O.push('"'+R.r.getLabel("data.items."+vn.name)+'"')):(console.warn("Invalid Item '"+un+"' (Edition "+De+") on treasure"+this.index+"' for Edition "+this.edition),O.push(' %item%'))});let k=m[0];m.length>1&&(k=m.slice(0,-1).join(","),k+=" %and% "+m[m.length-1]);let W=O[0];return O.length>1&&(W=O.slice(0,-1).join(","),W+=" %and% "+O[O.length-1]),[this.labelPrefix+e.type,k,W];case yn.Hj.scenario:const ct=d.v.scenarioManager.getScenario(i,this.edition,void 0);return ct?[this.labelPrefix+e.type,ct.index,"data.scenario."+ct.name]:(console.warn("Invalid Scenario '"+i+"' on treasure "+this.index+"' for Edition "+this.edition),[this.labelPrefix+e.type,i,' %scenario%']);case yn.Hj.event:const Ct=i.split("-")[0],Ot=i.split("-")[1];return[this.labelPrefix+e.type+"."+Ct,""+Ot];case yn.Hj.resource:const xt=i.split("+").map(se=>se.split("-")[1]+'');let Gt=xt[0];return xt.length>1&&(Gt=xt.slice(0,-1).join(","),Gt+=" %and% "+xt[xt.length-1]),[this.labelPrefix+e.type,Gt];case yn.Hj.calendarSection:if(i.split("-").length>1)return[this.labelPrefix+e.type,i.split("-")[0],i.split("-")[1]]}return[]}openItemDialog(e){this.dialog.open(gg,{data:{item:e}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-treasure-label"]],inputs:{treasure:"treasure",index:"index",edition:"edition",rewardResults:"rewardResults",itemCards:"itemCards"},decls:1,vars:1,consts:[["class","treasure-label",4,"ngIf"],[1,"treasure-label"],[4,"ngFor","ngForOf"],["class","items",4,"ngIf"],[1,"label",3,"ghs-label","ghs-label-args"],["class","result",3,"ghs-label","ghs-label-args",4,"ngIf"],[4,"ngIf"],[1,"result",3,"ghs-label","ghs-label-args"],[1,"items"],[3,"item","flipped","editionLabel","click",4,"ngFor","ngForOf"],[3,"item","flipped","editionLabel","click"]],template:function(e,i){1&e&&t.YNc(0,jD,3,2,"span",0),2&e&&t.Q6J("ngIf",i.treasure)},dependencies:[x.sg,x.O5,Xd,ie],styles:[".treasure-label{display:inline-block;line-height:1em}.treasure-label:first-letter{text-transform:uppercase}.treasure-label .items{display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.treasure-label .items ghs-item{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor))}\n"],encapsulation:2})),a})();function BD(o,a){1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.finish.success"))}function zD(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"span",3),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label",n.conclusion.name?"data.section."+n.conclusion.name:"%scenario.section% #"+n.conclusion.index)}}function GD(o,a){1&o&&(t.TgZ(0,"span",19),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.summary.casualWarning"))}function VD(o,a){1&o&&(t.TgZ(0,"span",20),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.finish.failure"))}const YD=function(o){return{absent:o}},nT=function(o){return{denied:o}};function KD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",29)(1,"img",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.openCharacterSheet(s))}),t.qZA(),t.TgZ(2,"span",31),t._uU(3),t.qZA(),t.TgZ(4,"span",32)(5,"img",33),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.toggleAbsent(s))}),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(7,YD,n.absent)),t.xp6(1),t.hij(" ",e.gameManager.characterManager.characterName(n,!0)," "),t.xp6(1),t.Q6J("ngClass",t.VKq(9,nT,!e.gameManager.stateManager.characterPermissions[n.name+"|"+n.edition])),t.xp6(1),t.Q6J("src","./assets/images/status/"+(n.absent?"absent":"present")+".svg",t.LSH)("ghs-label",n.absent?"character.present":"character.absent")("ghs-label-attribute","title")}}function $D(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,n.loot)," ")}}function WD(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,n.rewards.gold)," ")}}function XD(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,WD,3,3,"span",25),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.rewards.gold"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function tI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",34)(1,"input",35),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.changeCollectiveGold(i,l))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(3);t.xp6(1),t.Q6J("max",e.collectiveGold[n]+e.availableCollectiveGold())("value",e.collectiveGold[n])}}function eI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,tI,2,2,"span",25),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.rewards.collectiveGold"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function nI(o,a){1&o&&t._UZ(0,"span",3),2&o&&t.Q6J("ghs-label","scenario.summary.gold")}function iI(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",36),t._uU(2),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/fh/loot/money.svg",t.LSH),t.xp6(1),t.AsE(" ",n.lootedGold,"/",n.totalGold," ")}}function oI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",37),t._uU(2),t.ALo(3,"ghsValueSign"),t.qZA(),t._uU(4),t.qZA()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,2,(s.success&&s.rewards&&s.rewards.gold?s.rewards.gold:0)+(s.collectiveGold[e]?s.collectiveGold[e]:0)+i.loot*s.gameManager.levelManager.loot())),t.xp6(2),t.hij(" (",i.progress.gold+(s.success&&s.rewards&&s.rewards.gold?s.rewards.gold:0)+(s.collectiveGold[e]?s.collectiveGold[e]:0)+i.loot*s.gameManager.levelManager.loot(),") ")}}function aI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span"),t._uU(2,"/"),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.hij(" (",n.progress.gold,") ")}}function sI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,oI,5,4,"span",14),t.YNc(2,aI,4,1,"span",14),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function rI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",38),t._uU(2),t.ALo(3,"ghsValueSign"),t.qZA(),t._uU(4),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,2,i.lootValue(n,e))),t.xp6(2),t.hij(" (",(n.progress.loot[e]||0)+i.lootValue(n,e),") ")}}function cI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",38),t._uU(2,"/"),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit;t.xp6(3),t.hij(" (",n.progress.loot[e]||0,") ")}}function lI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,rI,5,4,"span",14),t.YNc(2,cI,4,1,"span",14),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function gI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"img",36),t._uU(3),t.qZA(),t.YNc(4,lI,3,2,"ng-container",28),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH),t.xp6(1),t.AsE(" ",i.lootColumnsLooted[e],"/",i.lootColumnsTotal[e]," "),t.xp6(1),t.Q6J("ngForOf",i.characters)}}function dI(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,n.experience)," ")}}function hI(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Oqu(t.lcZ(2,1,n.gameManager.levelManager.experience()))}}function uI(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function _I(o,a){if(1&o&&(t.TgZ(0,"span",34),t.YNc(1,hI,3,3,"span",14),t.YNc(2,uI,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function pI(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.hij(" ",t.lcZ(2,1,n.rewards.experience)," ")}}function fI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,pI,3,3,"span",25),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.summary.rewards.experience"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function mI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,_I,3,2,"span",25),t.YNc(4,fI,4,2,"ng-container",14),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.xpBonus"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.success&&n.rewards&&n.rewards.experience)}}function vI(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Oqu(t.lcZ(2,1,2*n.challenges))}}function CI(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function MI(o,a){if(1&o&&(t.TgZ(0,"span",34),t.YNc(1,vI,3,3,"span",14),t.YNc(2,CI,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function OI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,MI,3,2,"span",25),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.xpChallenges"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function PI(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,(e.rewards&&e.rewards.experience?e.rewards.experience:0)+2*e.challenges+n.experience+(e.rewards&&e.rewards.ignoredBonus&&-1!=e.rewards.ignoredBonus.indexOf("experience")?0:e.gameManager.levelManager.experience())))}}function yI(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,n.experience))}}function bI(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,PI,3,3,"span",39),t.YNc(2,yI,3,3,"span",39),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.success),t.xp6(1),t.Q6J("ngIf",!e.success),t.xp6(1),t.hij(" (",n.progress.experience+2*e.challenges+n.experience+(e.success&&e.rewards&&e.rewards.experience?e.rewards.experience:0)+(!e.success||e.rewards&&e.rewards.ignoredBonus&&-1!=e.rewards.ignoredBonus.indexOf("experience")?0:e.gameManager.levelManager.experience()),") ")}}function xI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",40),t._uU(2,"/"),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.hij(" (",n.progress.experience,") ")}}function wI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,bI,4,3,"span",14),t.YNc(2,xI,4,1,"span",14),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function kI(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function TI(o,a){if(1&o&&t._UZ(0,"ghs-treasure-label",48),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("edition",e.scenario.edition)("index",+(""+n).split(":")[0]-1)("rewardResults",e.treasureRewardsFromString(""+n))}}function ZI(o,a){if(1&o&&(t.TgZ(0,"div",44)(1,"span",45),t.YNc(2,kI,2,0,"span",14),t._uU(3),t.qZA(),t.TgZ(4,"span",46),t.YNc(5,TI,1,3,"ghs-treasure-label",47),t.qZA()()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G")&&+n<10),t.xp6(1),t.hij("",(""+n).startsWith("G-")?"G":(""+n).split(":")[0]," "),t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G-"))}}const or=function(){return[]};function AI(o,a){if(1&o&&(t.TgZ(0,"span",42),t.YNc(1,ZI,6,3,"div",43),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",n.treasures||t.DdM(1,or))}}function SI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",3),t.qZA(),t.YNc(3,AI,2,2,"span",41),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.treasures"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function EI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw(2);return t.KtG(s.openItemDialog(i))}),t.qZA()}if(2&o){const n=t.oxw(2).$implicit;t.Q6J("item",n)("flipped",!0)}}function DI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span"),t.YNc(1,EI,1,2,"ghs-item",50),t.TgZ(2,"input",51),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw().index,O=t.oxw(2);return t.KtG(O.toggleItem(i,l,m))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw().index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",i.items[n]&&-1!=i.items[n].indexOf(e)),t.xp6(1),t.Q6J("disabled",i.itemDistributed(n,e))("checked",i.items[n]&&-1!=i.items[n].indexOf(e))}}const Ji=function(o){return[o]};function II(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",49),t.qZA(),t.YNc(3,DI,3,3,"span",28),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.item")("ghs-label-args",t.VKq(3,Ji,n.name)),t.xp6(1),t.Q6J("ngForOf",e.characters)}}function NI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.openItemDialog(i.randomItem))}),t.qZA()}if(2&o){const n=t.oxw(4);t.Q6J("item",n.randomItem)("flipped",!0)}}function JI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span"),t.YNc(1,NI,1,2,"ghs-item",50),t.TgZ(2,"input",51),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.toggleRandomItem(i,l))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.randomItemIndex==n),t.xp6(1),t.Q6J("disabled",e.randomItemIndex>-1&&e.randomItemIndex!=n)("checked",e.randomItemIndex==n)}}function UI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",49),t.qZA(),t.YNc(3,JI,3,3,"span",28),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.randomItem")("ghs-label-args",t.VKq(3,Ji,n.randomItem.name)),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function LI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openItemDialog(i))}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("item",n)("flipped",!0)}}function QI(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,LI,1,2,"ghs-item",50),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n)}}function RI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",3),t.qZA(),t.YNc(3,QI,2,1,"span",28),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.randomItems"),t.xp6(1),t.Q6J("ngForOf",n.randomItems)}}function FI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",57),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openBattleGoals(i))}),t._UZ(1,"ghs-battlegoal",58),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("identifier",n.battleGoal&&n.battleGoals[0])("flipped",n.battleGoal)}}function qI(o,a){1&o&&t._UZ(0,"input",60),2&o&&t.Q6J("disabled",!0)("checked",!0)}function HI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,qI,1,2,"input",59),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,or),n.rewards.battleGoals))}}function jI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",61),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw(3);return t.KtG(l.toggleBattleGoal(i,s,2))}),t.qZA()}if(2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("checked",e.battleGoals[n]>1)}}function BI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"span",53),t.YNc(2,FI,2,2,"span",54),t.TgZ(3,"span",55),t.YNc(4,HI,3,5,"ng-container",14),t.TgZ(5,"input",51),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.toggleBattleGoal(i,l,1))}),t.qZA(),t.YNc(6,jI,1,1,"input",56),t.qZA()()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.battleGoals&&n.battleGoal&&n.battleGoals.length>0),t.xp6(2),t.Q6J("ngIf",i.rewards&&i.rewards.battleGoals),t.xp6(1),t.Q6J("disabled",n.absent)("checked",!n.absent&&i.battleGoals[e]>0),t.xp6(1),t.Q6J("ngIf",!n.absent&&i.battleGoals[e]>0)}}function zI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",3),t.qZA(),t.YNc(3,BI,7,5,"span",28),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","game.battleGoals"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function GI(o,a){if(1&o&&(t.TgZ(0,"div",21)(1,"span",22),t._UZ(2,"span",3),t.qZA(),t.YNc(3,KD,6,11,"span",23),t.TgZ(4,"span",24),t._UZ(5,"span",3),t.qZA(),t.YNc(6,$D,3,3,"span",25),t.YNc(7,XD,4,2,"ng-container",14),t.YNc(8,eI,4,2,"ng-container",14),t.TgZ(9,"span",26),t.YNc(10,nI,1,1,"span",27),t.YNc(11,iI,3,3,"ng-container",14),t.qZA(),t.YNc(12,sI,3,2,"ng-container",28),t.YNc(13,gI,5,4,"ng-container",28),t.TgZ(14,"span",24),t._UZ(15,"span",3),t.qZA(),t.YNc(16,dI,3,3,"span",25),t.YNc(17,mI,5,3,"ng-container",14),t.YNc(18,OI,4,2,"ng-container",14),t.TgZ(19,"span",26),t._UZ(20,"span",3),t.qZA(),t.YNc(21,wI,3,2,"ng-container",28),t.YNc(22,SI,4,2,"ng-container",14),t.YNc(23,II,4,5,"ng-container",28),t.YNc(24,UI,4,5,"ng-container",14),t.YNc(25,RI,4,2,"ng-container",14),t.YNc(26,zI,4,2,"ng-container",14),t.qZA()),2&o){const n=t.oxw();t.Udp("--ghs-summary-columns",1+n.characters.length),t.xp6(2),t.Q6J("ghs-label","scenario.summary.name"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(2),t.Q6J("ghs-label","scenario.summary.loot"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.success&&n.rewards&&n.rewards.gold),t.xp6(1),t.Q6J("ngIf",n.success&&n.rewards&&n.rewards.collectiveGold),t.xp6(2),t.Q6J("ngIf",!n.totalGold),t.xp6(1),t.Q6J("ngIf",n.totalGold),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngForOf",n.lootColumns),t.xp6(2),t.Q6J("ghs-label","scenario.summary.xpGained"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.success&&(!n.rewards||!n.rewards.ignoredBonus||-1==n.rewards.ignoredBonus.indexOf("experience"))),t.xp6(1),t.Q6J("ngIf",n.success&&n.challenges>0),t.xp6(2),t.Q6J("ghs-label","scenario.summary.xp"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.gameManager.scenarioManager.getTreasures(n.scenario,n.gameManager.game.sections).length>0),t.xp6(1),t.Q6J("ngForOf",n.rewardItems),t.xp6(1),t.Q6J("ngIf",n.randomItem),t.xp6(1),t.Q6J("ngIf",n.randomItems&&n.randomItems.length>0),t.xp6(1),t.Q6J("ngIf",n.success)}}function VI(o,a){1&o&&(t.TgZ(0,"div",65)(1,"span"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.alreadyWarning.hint"))}function YI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",62)(1,"label"),t._UZ(2,"span",3),t.qZA(),t.TgZ(3,"div",63),t.YNc(4,VI,3,1,"div",64),t.TgZ(5,"div",65)(6,"a",66),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.updateState(!i.forceCampaign))}),t._UZ(7,"span",3),t.qZA()()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.summary.alreadyWarning"),t.xp6(2),t.Q6J("ngIf",!n.forceCampaign),t.xp6(3),t.Q6J("ghs-label","scenario.summary.alreadyWarning."+(n.forceCampaign?"reapply":"ignore"))}}function KI(o,a){1&o&&(t.TgZ(0,"div",65)(1,"span"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning.hintFh"))}function $I(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",65)(1,"a",66),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return i.characterProgress=!i.gameManager.fhRules()||!i.characterProgress,t.KtG(i.updateState())}),t._UZ(2,"span",3),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning."+(n.characterProgress||n.forceCampaign?"reapply":"ignore"))}}function WI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",65)(1,"a",66),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.updateState(!0))}),t._UZ(2,"span",3),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning.campaignRewards"))}function XI(o,a){if(1&o&&(t.TgZ(0,"div",62)(1,"label"),t._UZ(2,"span",3),t.qZA(),t.TgZ(3,"div",63),t.YNc(4,KI,3,1,"div",64),t.YNc(5,$I,3,1,"div",64),t.YNc(6,WI,3,1,"div",64),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning"+(n.gameManager.fhRules()?".fh":"")),t.xp6(2),t.Q6J("ngIf",!n.characterProgress&&n.gameManager.fhRules()),t.xp6(1),t.Q6J("ngIf",n.forceCampaign||n.gameManager.fhRules()),t.xp6(1),t.Q6J("ngIf",!n.forceCampaign)}}function t5(o,a){1&o&&(t.TgZ(0,"div",62)(1,"label"),t._UZ(2,"span",3),t.qZA(),t.TgZ(3,"div",63)(4,"div",65),t._UZ(5,"span",69),t.qZA()()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.conclusionWarning"),t.xp6(3),t.Q6J("ghs-label","scenario.summary.conclusionWarning.hint"))}function e5(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function n5(o,a){if(1&o&&(t.TgZ(0,"div",73),t._UZ(1,"span",3)(2,"span",3),t.YNc(3,e5,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);let s;t.xp6(1),t.Q6J("ghs-label","data.scenario."+(null==(s=i.gameManager.scenarioManager.getScenario(n,i.scenario.edition,i.scenario.group))?null:s.name)),t.xp6(1),t.Q6J("ghs-label","%data.scenarioNumber:"+n+"%"),t.xp6(1),t.Q6J("ngIf",i.scenario.unlocks.length>1&&e1||n.rewards&&n.rewards.chooseLocation&&n.rewards.chooseLocation.length>1?"scenario.rewards.locations":"scenario.rewards.location"),t.xp6(1),t.Q6J("ngIf",n.scenario.unlocks),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.chooseLocation)}}function c5(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function l5(o,a){if(1&o&&(t.TgZ(0,"div",73),t._UZ(1,"span",3)(2,"span",3),t.YNc(3,c5,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);let s;t.xp6(1),t.Q6J("ghs-label","data.scenario."+(null==(s=i.gameManager.scenarioManager.getScenario(n,i.conclusion.edition,i.conclusion.group))?null:s.name)),t.xp6(1),t.Q6J("ghs-label","%data.scenarioNumber:"+n+"%"),t.xp6(1),t.Q6J("ngIf",i.conclusion.unlocks.length>1&&e1?"scenario.rewards.locations":"scenario.rewards.location"),t.xp6(2),t.Q6J("ngForOf",n.conclusion.unlocks)}}function d5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.globalAchievements[n])}}function h5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,d5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.globalAchievements."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.globalAchievements&&i.rewards.hints.globalAchievements[e])}}function u5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,h5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.globalAchievements"),t.xp6(3),t.Q6J("ngForOf",n.rewards.globalAchievements)}}function _5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.lostPartyAchievements[n])}}function p5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,_5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.partyAchievements."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.lostPartyAchievements&&i.rewards.hints.lostPartyAchievements[e])}}function f5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,p5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.lostPartyAchievements"),t.xp6(3),t.Q6J("ngForOf",n.rewards.lostPartyAchievements)}}function m5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.partyAchievements[n])}}function v5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,m5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.partyAchievements."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.partyAchievements&&i.rewards.hints.partyAchievements[e])}}function C5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,v5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.partyAchievements"),t.xp6(3),t.Q6J("ngForOf",n.rewards.partyAchievements)}}function M5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.campaignSticker[n])}}function O5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,M5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.campaignSticker."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.campaignSticker&&i.rewards.hints.campaignSticker[e])}}function P5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,O5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.campaignSticker"),t.xp6(3),t.Q6J("ngForOf",n.rewards.campaignSticker)}}function y5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.calendarSection[n])}}const LO=function(o,a,n){return[o,a,n]};function b5(o,a){if(1&o&&(t.TgZ(0,"div",79),t._UZ(1,"span",82),t.YNc(2,y5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.calendarSection.add"+(n.split("-")[1].split(":").length>1?".next":""))("ghs-label-args",t.kEZ(3,LO,n.split("-")[0],n.split("-")[1].split(":").length>1?n.split("-")[1].split(":")[1]:n.split("-")[1],n.split("-")[1].split(":").length>1?n.split("-")[1].split(":")[0]:"")),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.calendarSection&&i.rewards.hints.calendarSection[e])}}function x5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,b5,3,7,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.calendarSection"),t.xp6(3),t.Q6J("ngForOf",n.rewards.calendarSection)}}function w5(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",79),t._UZ(1,"span",69),t.TgZ(2,"input",83),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.changeCalendarSectionManual(i,l))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label",n.hint),t.xp6(1),t.Q6J("value",i.calendarSectionManual[e]||-1)}}function k5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,w5,3,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.calendarSection"),t.xp6(3),t.Q6J("ngForOf",n.rewards.calendarSectionManual)}}function T5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.envelopes[n])}}function Z5(o,a){if(1&o&&(t.TgZ(0,"div",108),t._UZ(1,"span",82),t.YNc(2,T5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.envelope")("ghs-label-args",t.VKq(3,Ji,n)),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.envelopes&&i.rewards.hints.envelopes[e])}}function A5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.gold)}}function S5(o,a){if(1&o&&(t.TgZ(0,"div",109)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,A5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.gold")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.gold)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.gold)}}function E5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.experience)}}function D5(o,a){if(1&o&&(t.TgZ(0,"div",110)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,E5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.experience")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.experience)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.experience)}}function I5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.collectiveGold)}}function N5(o,a){if(1&o&&(t.TgZ(0,"div",111)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,I5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.collectiveGold")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.collectiveGold)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.collectiveGold)}}const dg=function(o,a){return[o,a]};function J5(o,a){if(1&o&&t._UZ(0,"span",82),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("ghs-label","scenario.rewards.resources"+(e.EntityValueFunction(n.value)<0?"Lose":""))("ghs-label-args",t.WLB(2,dg,""+n.type,""+e.EntityValueFunction(n.value)))}}function U5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(4);t.Q6J("ghs-label",e.rewards.hints.resources[n])}}function L5(o,a){if(1&o&&(t.ynx(0),t.YNc(1,J5,1,5,"span",113),t.YNc(2,U5,1,1,"span",80),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.value),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.resources&&i.rewards.hints.resources[e])}}function Q5(o,a){if(1&o&&(t.TgZ(0,"div",112),t.YNc(1,L5,3,2,"ng-container",28),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.rewards.resources)}}function R5(o,a){if(1&o&&t._UZ(0,"span",82),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("ghs-label","scenario.rewards.collectiveResources"+(e.EntityValueFunction(n.value)<0?"Lose":""))("ghs-label-args",t.WLB(2,dg,""+n.type,""+e.EntityValueFunction(n.value)))}}function F5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(4);t.Q6J("ghs-label",e.rewards.hints.resources[n])}}function q5(o,a){if(1&o&&(t.ynx(0),t.YNc(1,R5,1,5,"span",113),t.YNc(2,F5,1,1,"span",80),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.value),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.resources&&i.rewards.hints.resources[e])}}function H5(o,a){if(1&o&&(t.TgZ(0,"div",114),t.YNc(1,q5,3,2,"ng-container",28),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.rewards.collectiveResources)}}function j5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.reputation)}}function B5(o,a){if(1&o&&(t.TgZ(0,"div",115)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,j5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.reputation")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.rewards.reputation))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.reputation)}}function z5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.prosperity)}}function G5(o,a){if(1&o&&(t.TgZ(0,"div",116)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,z5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.prosperity")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.rewards.prosperity))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.prosperity)}}function V5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.inspiration)}}function Y5(o,a){if(1&o&&(t.TgZ(0,"div",117)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,V5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.inspiration")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.EntityValueFunction(n.rewards.inspiration)))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.inspiration)}}function K5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.morale)}}function $5(o,a){if(1&o&&(t.TgZ(0,"div",118)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,K5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.morale")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.EntityValueFunction(n.rewards.morale)))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.morale)}}function W5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.perks)}}function X5(o,a){if(1&o&&(t.TgZ(0,"div",119)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,W5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.perks")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.perks)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.perks)}}function t4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.battleGoals)}}function e4(o,a){if(1&o&&(t.TgZ(0,"div",120),t._UZ(1,"span",82),t.YNc(2,t4,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.battleGoals")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.battleGoals)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.battleGoals)}}function n4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split(":")[0].split("-")[0],i.split(":")[0].split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(3);let i;t.Q6J("ghs-label","scenario.rewards.items")("ghs-label-args",t.kEZ(2,LO,n.split(":")[0].split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split(":")[0].split("-")[0],n.split(":")[0].split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||"",n.split(":")[1]))}}function i4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split("-")[0],i.split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(3);let i;t.Q6J("ghs-label","scenario.rewards.item")("ghs-label-args",t.WLB(2,dg,n.split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split("-")[0],n.split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||""))}}function o4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.items[n])}}function a4(o,a){if(1&o&&(t.TgZ(0,"div",121),t.YNc(1,n4,1,6,"span",122),t.YNc(2,i4,1,5,"span",122),t.YNc(3,o4,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",-1!=n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",-1==n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.items&&i.rewards.hints.items[e])}}function s4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(5);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split(":")[0].split("-")[0],i.split(":")[0].split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(5);let i;t.Q6J("ghs-label","scenario.rewards.items")("ghs-label-args",t.kEZ(2,LO,n.split(":")[0].split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split(":")[0].split("-")[0],n.split(":")[0].split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||"",n.split(":")[1]))}}function r4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(5);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split("-")[0],i.split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(5);let i;t.Q6J("ghs-label","scenario.rewards.item")("ghs-label-args",t.WLB(2,dg,n.split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split("-")[0],n.split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||""))}}function c4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(2).index,e=t.oxw(4);t.Q6J("ghs-label",e.rewards.hints.chooseItem[n])}}function l4(o,a){if(1&o&&(t.ynx(0),t.YNc(1,s4,1,6,"span",122),t.YNc(2,r4,1,5,"span",122),t.YNc(3,c4,1,1,"span",80),t.BQk()),2&o){const n=a.$implicit,e=t.oxw().index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",-1!=n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",-1==n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.chooseItem&&i.rewards.hints.chooseItem[e])}}function g4(o,a){1&o&&t._UZ(0,"span",69),2&o&&t.Q6J("ghs-label","or")}function d4(o,a){if(1&o&&(t.ynx(0),t.YNc(1,l4,4,3,"ng-container",28),t.YNc(2,g4,1,1,"span",125),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",n||t.DdM(2,or)),t.xp6(1),t.Q6J("ngIf",e0),t.xp6(1),t.Q6J("ngIf",-1==n),t.xp6(1),t.Q6J("ngIf",e.rewards.hints&&e.rewards.hints.randomItemBlueprint)}}function Z4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.events[n])}}function A4(o,a){if(1&o&&(t.TgZ(0,"div",128),t._UZ(1,"span",82),t.YNc(2,Z4,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.event."+n.split(":")[0])("ghs-label-args",t.VKq(3,Ji,n.split(":")[1])),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.events&&i.rewards.hints.events[e])}}function S4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.removeEvents[n])}}function E4(o,a){if(1&o&&(t.TgZ(0,"div",128),t._UZ(1,"span",82),t.YNc(2,S4,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.removeEvent."+n.split(":")[0])("ghs-label-args",t.VKq(3,Ji,n.split(":")[1])),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.removeEvents&&i.rewards.hints.removeEvents[e])}}function D4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",133),t.NdJ("change",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(4);return t.KtG(s.selectCharacter(i))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("value",n)("checked",e.chooseUnlockCharacter==n)}}function I4(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","or"))}const N4=function(o,a){return{unlocked:o,disabled:a}};function J4(o,a){if(1&o&&(t.TgZ(0,"label",131),t.YNc(1,D4,1,2,"input",132),t._UZ(2,"span",82),t.YNc(3,I4,2,1,"span",14),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Q6J("ngClass",t.WLB(5,N4,i.unlocked(n),!i.settingsManager.settings.automaticUnlocking)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.automaticUnlocking),t.xp6(1),t.Q6J("ghs-label","scenario.rewards.unlockCharacter.box")("ghs-label-args",t.VKq(8,Ji,n)),t.xp6(1),t.Q6J("ngIf",e0),t.xp6(1),t.Q6J("ngForOf",n.rewards.itemDesigns||t.DdM(28,or)),t.xp6(1),t.Q6J("ngForOf",n.rewards.itemBlueprints||t.DdM(29,or)),t.xp6(1),t.Q6J("ngIf",n.rewards.randomItemBlueprints),t.xp6(1),t.Q6J("ngForOf",n.randomItemBlueprints),t.xp6(1),t.Q6J("ngForOf",n.rewards.events||t.DdM(30,or)),t.xp6(1),t.Q6J("ngForOf",n.rewards.removeEvents||t.DdM(31,or)),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.chooseUnlockCharacter&&n.rewards.chooseUnlockCharacter.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.unlockCharacter),t.xp6(1),t.Q6J("ngIf",n.rewards.custom),t.xp6(1),t.Q6J("ngForOf",n.rewards.lootDeckCards||t.DdM(32,or)),t.xp6(1),t.Q6J("ngIf",n.townGuardAMs&&n.townGuardAMs.length>0)}}function B4(o,a){if(1&o&&(t.ynx(0),t.YNc(1,t5,6,2,"div",13),t.YNc(2,r5,5,3,"div",67),t.YNc(3,g5,5,2,"div",67),t.YNc(4,u5,6,2,"div",68),t.YNc(5,f5,6,2,"div",68),t.YNc(6,C5,6,2,"div",68),t.YNc(7,P5,6,2,"div",68),t.YNc(8,x5,6,2,"div",68),t.YNc(9,k5,6,2,"div",68),t.YNc(10,j4,30,33,"div",15),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.conclusionWarning),t.xp6(1),t.Q6J("ngIf",n.success&&(n.scenario.unlocks&&n.scenario.unlocks.length>0||n.rewards&&n.rewards.chooseLocation&&n.rewards.chooseLocation.length>0)),t.xp6(1),t.Q6J("ngIf",n.success&&(!n.scenario.unlocks||0==n.scenario.unlocks.length)&&n.conclusion&&n.conclusion.unlocks&&n.conclusion.unlocks.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.globalAchievements&&n.rewards.globalAchievements.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.lostPartyAchievements&&n.rewards.lostPartyAchievements.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.partyAchievements&&n.rewards.partyAchievements.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.campaignSticker&&n.rewards.campaignSticker.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.calendarSection&&n.rewards.calendarSection.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.calendarSectionManual&&n.rewards.calendarSectionManual.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.hasRewards())}}function z4(o,a){if(1&o&&(t.TgZ(0,"div",117)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.inspiration")("ghs-label-args",t.VKq(4,Ji,""+t.lcZ(3,2,n.EntityValueFunction("4-C"))))}}function G4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",61),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.toggleChallenges(!0))}),t.qZA()}if(2&o){const n=t.oxw(3);t.Q6J("checked",n.challenges>1)}}function V4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",140),t._UZ(1,"span",3),t.TgZ(2,"input",61),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleChallenges())}),t.qZA(),t.YNc(3,G4,1,1,"input",56),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","scenario.summary.challenges."+(n.numberChallenges>1?"completed":"complete")),t.xp6(1),t.Q6J("checked",n.challenges>0),t.xp6(1),t.Q6J("ngIf",n.numberChallenges>1)}}function Y4(o,a){if(1&o&&(t.TgZ(0,"div",84)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,z4,4,6,"div",93),t.YNc(6,V4,4,3,"div",139),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.rewards.bonus"),t.xp6(3),t.Q6J("ngIf",n.gameManager.fhRules()&&n.EntityValueFunction("4-C")),t.xp6(1),t.Q6J("ngIf",n.numberChallenges>0)}}function K4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",149),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.finish(s))}),t._UZ(1,"span",49),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ghs-label","scenario.summary.link")("ghs-label-args",t.VKq(2,Ji,n))}}function $4(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",147),t._UZ(2,"span",3),t.qZA(),t.YNc(3,K4,2,4,"a",148),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.summary.forcedLinks"),t.xp6(1),t.Q6J("ngForOf",n.scenario.forcedLinks)}}function W4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",151),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.finish(s))}),t._UZ(1,"span",49),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ghs-label","scenario.summary.link")("ghs-label-args",t.VKq(2,Ji,n))}}function X4(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",147),t._UZ(2,"span",3),t.qZA(),t.YNc(3,W4,2,4,"a",150),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.summary.links"),t.xp6(1),t.Q6J("ngForOf",n.scenario.links)}}function tN(o,a){if(1&o&&(t.TgZ(0,"span",146),t.YNc(1,$4,4,2,"ng-container",14),t.YNc(2,X4,4,2,"ng-container",14),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.scenario.forcedLinks&&n.scenario.forcedLinks.length>0),t.xp6(1),t.Q6J("ngIf",!n.scenario.forcedLinks||0==n.scenario.forcedLinks.length)}}function eN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",152),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.finish())}),t._UZ(1,"span",3),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",n.conclusionOnly?"scenario.summary.solve":"scenario.summary.apply")}}function nN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",153),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.restart())}),t._UZ(1,"span",3),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",n.lootColumns.length>0?"scenario.summary.restartLoseLoot":"scenario.summary.restart")}}function iN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",141)(1,"a",142),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(2,"span",3),t.qZA(),t.YNc(3,tN,3,2,"span",143),t.YNc(4,eN,2,1,"a",144),t.YNc(5,nN,2,1,"a",145),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(5,nT,n.gameManager.stateManager.permissions&&(!n.gameManager.stateManager.permissions.round||!n.gameManager.stateManager.permissions.scenario||!n.gameManager.stateManager.permissions.characters))),t.xp6(2),t.Q6J("ghs-label","scenario.summary.cancel"),t.xp6(1),t.Q6J("ngIf",n.success&&(n.gameManager.game.party.campaignMode||n.forceCampaign)&&(n.scenario.links&&n.scenario.links.length>0||n.scenario.forcedLinks&&n.scenario.forcedLinks.length>0)),t.xp6(1),t.Q6J("ngIf",!n.success||!n.gameManager.game.party.campaignMode||n.alreadyWarning||n.forceCampaign||!n.scenario.forcedLinks||0==n.scenario.forcedLinks.length),t.xp6(1),t.Q6J("ngIf",!n.success)}}const oN=function(o,a){return{fh:o,modern:a}};let uo=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"scenario",void 0),(0,_.Z)(this,"conclusion",void 0),(0,_.Z)(this,"success",void 0),(0,_.Z)(this,"conclusionWarning",void 0),(0,_.Z)(this,"alreadyWarning",!1),(0,_.Z)(this,"characterProgress",!0),(0,_.Z)(this,"gainRewards",!0),(0,_.Z)(this,"forceCampaign",!1),(0,_.Z)(this,"conclusionOnly",void 0),(0,_.Z)(this,"rewardsOnly",void 0),(0,_.Z)(this,"characters",void 0),(0,_.Z)(this,"battleGoals",[]),(0,_.Z)(this,"collectiveGold",[]),(0,_.Z)(this,"lootColumns",[]),(0,_.Z)(this,"lootColumnsLooted",[]),(0,_.Z)(this,"lootColumnsTotal",[]),(0,_.Z)(this,"lootedGold",0),(0,_.Z)(this,"totalGold",0),(0,_.Z)(this,"rewardItems",[]),(0,_.Z)(this,"rewardItemCount",[]),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"chooseLocation",void 0),(0,_.Z)(this,"chooseUnlockCharacter",void 0),(0,_.Z)(this,"rewards",void 0),(0,_.Z)(this,"challenges",0),(0,_.Z)(this,"numberChallenges",0),(0,_.Z)(this,"calendarSectionManual",[]),(0,_.Z)(this,"randomItem",void 0),(0,_.Z)(this,"randomItemIndex",-1),(0,_.Z)(this,"randomItems",[]),(0,_.Z)(this,"randomItemBlueprints",[]),(0,_.Z)(this,"townGuardAMs",[]),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"waitForClose",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.scenario=e.scenario,this.success=e.success,this.conclusion=e.conclusion,this.conclusionOnly=e.conclusionOnly,this.rewardsOnly=e.rewardsOnly,this.conclusionOnly&&(this.conclusion=this.scenario,this.success=!0),this.conclusionWarning=this.success&&!this.conclusion&&null!=d.v.sectionData(this.scenario.edition).find(l=>l.parent==this.scenario.index&&l.group==this.scenario.group&&l.edition==this.scenario.edition&&l.conclusion),this.characters=d.v.game.figures.filter(l=>l instanceof oe.z).map((l,m)=>(this.battleGoals[m]=0,l)).sort((l,m)=>{if(!l.absent&&m.absent)return-1;if(l.absent&&!m.absent)return 1;const O=l.title.toLowerCase()||R.r.getLabel("data.character."+l.name).toLowerCase(),k=m.title.toLowerCase()||R.r.getLabel("data.character."+m.name).toLowerCase();return O>k?1:OO.lootCards&&O.lootCards.some(k=>d.v.game.lootDeck.cards[k].type==m))&&(this.lootColumns.push(m),this.lootColumnsLooted.push(this.characters.map(O=>this.lootValue(O,m)).reduce((O,k)=>O+k)),this.lootColumnsTotal.push(d.v.lootManager.getTotal(d.v.game.lootDeck,m)))}d.v.game.lootDeck&&d.v.game.lootDeck.cards.length>0&&(this.characters.length>0&&(this.lootedGold=this.characters.map(l=>this.lootValue(l,le.CG.money)+this.lootValue(l,le.CG.special1)+this.lootValue(l,le.CG.special2)).reduce((l,m)=>l+m)),this.totalGold=d.v.lootManager.getTotal(d.v.game.lootDeck,le.CG.money),this.totalGold+=d.v.lootManager.getTotal(d.v.game.lootDeck,le.CG.special1),this.totalGold+=d.v.lootManager.getTotal(d.v.game.lootDeck,le.CG.special2)),this.alreadyWarning=!this.rewardsOnly&&d.v.game.party.campaignMode&&this.success&&(null!=d.v.game.party.scenarios.find(l=>l.index==this.scenario.index&&l.edition==this.scenario.edition&&l.group==this.scenario.group)||this.conclusion&&null!=d.v.game.party.conclusions.find(l=>this.conclusion&&l.index==this.conclusion.index&&l.edition==this.conclusion.edition&&l.group==this.conclusion.group))||!1,this.characterProgress=!this.rewardsOnly&&!this.conclusionOnly&&(d.v.game.party.campaignMode||!d.v.fhRules()),this.gainRewards=d.v.game.party.campaignMode,this.updateState(),d.v.stateManager.scenarioSummary=!0,d.v.game.finish||this.conclusionOnly||this.rewardsOnly?this.loadFinish():(d.v.stateManager.before("finishScenario.dialog",...d.v.scenarioManager.scenarioUndoArgs()),this.updateFinish(),d.v.stateManager.after()),this.dialogRef.closed.subscribe({next:()=>{d.v.stateManager.scenarioSummary&&!this.conclusionOnly&&!this.rewardsOnly&&!this.waitForClose&&(d.v.stateManager.before("finishScenario.close",...d.v.scenarioManager.scenarioUndoArgs()),d.v.stateManager.scenarioSummary=!1,d.v.game.finish=void 0,d.v.stateManager.after())}}),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.conclusionOnly||(d.v.game.finish?this.loadFinish():(d.v.stateManager.scenarioSummary=!1,this.dialogRef.close()))}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}updateFinish(){const e=new At.ZW;e.conclusion=this.conclusion?new ei._b(this.conclusion.index,this.conclusion.edition,this.conclusion.group):void 0,e.success=this.success,e.battleGoals=this.battleGoals,e.challenges=this.challenges,e.chooseLocation=this.chooseLocation,e.chooseUnlockCharacter=this.chooseUnlockCharacter,e.collectiveGold=this.collectiveGold,e.items=this.items,e.calendarSectionManual=this.calendarSectionManual,e.randomItem=this.randomItem?new Vn.xb(""+this.randomItem.id,this.randomItem.edition):void 0,e.randomItemIndex=this.randomItemIndex,e.randomItems=this.randomItems?this.randomItems.map(i=>i?new Vn.xb(""+i.id,i.edition):void 0):[],e.randomItemBlueprints=this.randomItemBlueprints,d.v.game.finish=e}loadFinish(){if(d.v.game.finish){const e=d.v.game.finish;this.conclusion=e.conclusion?d.v.sectionData(e.conclusion.edition).find(i=>e.conclusion&&i.index==e.conclusion.index&&i.group==e.conclusion.group&&i.conclusion):void 0,this.success=e.success,this.battleGoals=e.battleGoals,this.challenges=e.challenges,this.chooseLocation=e.chooseLocation,this.chooseUnlockCharacter=e.chooseUnlockCharacter,this.collectiveGold=e.collectiveGold,this.items=e.items,this.calendarSectionManual=e.calendarSectionManual||e.calenderSectionManual,this.randomItem=e.randomItem?d.v.itemManager.getItem(+e.randomItem.name,e.randomItem.edition,!0):void 0,this.randomItemIndex=e.randomItemIndex,this.randomItems=e.randomItems?e.randomItems.map(i=>i?d.v.itemManager.getItem(+i.name,i.edition,!0):void 0):[],this.randomItemBlueprints=e.randomItemBlueprints}}updateState(e=!1){if(this.forceCampaign=e,this.challenges=0,this.numberChallenges=0,this.rewards=void 0,this.townGuardAMs=[],(d.v.game.party.campaignMode||e)&&this.success){if(this.conclusion&&(this.rewards=this.conclusion.rewards),this.rewards||(this.rewards=this.scenario.rewards),this.rewards=this.scenario.rewards,this.conclusion&&this.conclusion.rewards&&(this.rewards?Object.assign(this.rewards,this.conclusion.rewards):this.rewards=this.conclusion.rewards),this.rewards){if(this.rewards.collectiveGold&&this.characters.forEach((i,s)=>this.collectiveGold[s]=0),this.rewards.items&&(this.characters.forEach((i,s)=>this.items[s]=[]),this.rewards.items.forEach((i,s)=>{const l=d.v.itemManager.getItem(+i.split(":")[0].split("-")[0],i.split(":")[0].split("-").slice(1).join("-")||this.scenario.edition,!0);if(l){if(this.rewardItems.push(l),this.rewardItemCount.push(-1==i.indexOf(":")?1:+i.split(":")[1]),1==this.characters.filter(m=>!m.absent).length){const m=this.characters.find(O=>!O.absent);m&&this.items[this.characters.indexOf(m)].push(s)}}else console.error("Unknown Item '"+i+"' for scenario '"+this.scenario.index+" ("+this.scenario.edition+")")})),this.rewards.chooseItem&&(this.characters.forEach((i,s)=>this.items[s]=[]),this.rewards.chooseItem.forEach(i=>{i.forEach((s,l)=>{const m=d.v.itemManager.getItem(+s.split(":")[0].split("-")[0],s.split(":")[0].split("-").slice(1).join("-")||this.scenario.edition,!0);m?(this.rewardItems.push(m),this.rewardItemCount.push(-1==s.indexOf(":")?1:+s.split(":")[1])):console.error("Unknown Item '"+s+"' for scenario '"+this.scenario.index+" ("+this.scenario.edition+")")})})),this.rewards.chooseLocation&&this.rewards.chooseLocation.length>0&&(this.chooseLocation=this.rewards.chooseLocation[0]),this.rewards.chooseUnlockCharacter&&this.rewards.chooseUnlockCharacter.length>0){let i=0;for(;ithis.calendarSectionManual[s]=0),this.rewards.randomItemBlueprint&&this.randomItemBlueprints.lengths.blueprint&&!d.v.game.party.unlockedItems.find(l=>l.name==""+s.id&&l.edition==s.edition)&&(!s.requiredBuilding||d.v.game.party.buildings.find(l=>l.name==s.requiredBuilding&&l.level>=s.requiredBuildingLevel)));for(let s=this.randomItemBlueprints.length;s0&&d.v.game.party.unlockedItems.find(O=>m&&O.name==m.name&&O.edition==m.edition);)i=i.filter(O=>m&&(O.id+""!=m.name||O.edition!=m.edition)),i.length>0?(l=i[Math.floor(Math.random()*i.length)],m=new Vn.xb(""+l.id,l.edition)):m=void 0;this.randomItemBlueprints.push(m?+m.name:-1)}}if(this.rewards.randomItem&&!this.randomItem){const i=+this.rewards.randomItem.split("-")[0],s=+this.rewards.randomItem.split("-")[1],l=this.rewards.randomItem.split("-").length>2?this.rewards.randomItem.split("-")[2]:this.scenario.edition;let m=d.v.itemManager.getItems(this.scenario.edition,!0).filter(W=>W.id>=i&&W.id<=s&&W.edition==l),O=m[Math.floor(Math.random()*m.length)],k=O?new Vn.xb(""+O.id,O.edition):void 0;for(;m.length>0&&this.characters.flatMap(W=>W.progress.items).filter(W=>k&&W.name==k.name&&W.edition==k.edition).length>=O.count;)m=m.filter(W=>k&&(W.id+""!=k.name||W.edition!=k.edition)),m.length>0?(O=m[Math.floor(Math.random()*m.length)],k=new Vn.xb(""+O.id,O.edition)):k=void 0;k&&O&&(this.randomItem=O)}if(this.rewards.randomItems&&this.randomItems.length1){const i=+this.rewards.randomItems.split("-")[0],s=+this.rewards.randomItems.split("-")[1],l=this.rewards.randomItems.split("-").length>2?this.rewards.randomItems.split("-")[2]:this.scenario.edition;let m=d.v.itemManager.getItems(this.scenario.edition,!0).filter(O=>O.id>=i&&O.id<=s&&O.edition==l);for(let O=this.randomItems.length;O0&&this.characters.flatMap(Ct=>Ct.progress.items).filter(Ct=>ct&&Ct.name==ct.name&&Ct.edition==ct.edition).length>=W.count;)m=m.filter(Ct=>ct&&(Ct.id+""!=ct.name||Ct.edition!=ct.edition)),m.length>0?(W=m[Math.floor(Math.random()*m.length)],ct=new Vn.xb(""+W.id,W.edition)):ct=void 0;for(;m.find(Ct=>!k.progress.items.find(Ot=>Ot.name==Ct.id+""&&Ot.edition==Ct.edition))&&k.progress.items.find(Ct=>ct&&Ct.name==ct.name+""&&Ct.edition==ct.edition);)W=m[Math.floor(Math.random()*m.length)],ct=new Vn.xb(""+W.id,W.edition);k.progress.items.find(Ct=>ct&&Ct.name==ct.name+""&&Ct.edition==ct.edition)&&(ct=void 0),this.randomItems.push(ct&&W?W:void 0)}}}this.rewards.townGuardAm&&(this.townGuardAMs=this.rewards.townGuardAm.map(i=>Lt.Bt.find(s=>s.id==i)))}if(d.v.fhRules()){const i=d.v.game.party.buildings.find(s=>"town-hall"==s.name&&"wrecked"!=s.state);i&&(1==i.level||2==i.level?this.numberChallenges=1:3==i.level&&(this.numberChallenges=2))}}}hasRewards(){const e=this.rewards;return!(!e||!(e.envelopes||e.gold||e.experience||e.collectiveGold||e.resources||e.collectiveResources||e.reputation||e.prosperity||e.inspiration||e.morale||e.perks||e.battleGoals||e.items||e.chooseItem||e.itemDesigns||e.itemBlueprints||e.randomItemBlueprint||e.randomItemBlueprints||e.events||e.chooseUnlockCharacter||e.unlockCharacter||e.custom||e.lootDeckCards||e.townGuardAm))}hasBonus(){return(d.v.game.party.campaignMode||this.forceCampaign)&&this.success&&!this.conclusionOnly&&!this.scenario.solo&&(d.v.fhRules()&&d.v.characterManager.characterCount()<4||this.numberChallenges>0)}availableCollectiveGold(){return this.rewards&&this.rewards.collectiveGold&&this.collectiveGold.length>0&&this.rewards.collectiveGold-this.collectiveGold.reduce((e,i)=>e+i)||0}lootValue(e,i){let s=0;return e.lootCards&&e.lootCards.forEach(l=>{const m=d.v.game.lootDeck.cards[l];m&&m.type==i&&(s+=d.v.lootManager.getValue(m))}),s}treasureRewardsFromString(e){return e.split(":").length<2?[]:e.split(":")[1].split("|").map(i=>i.split("+"))}toggleBattleGoal(e,i,s){const l=this.characters[i];let m;d.v.stateManager.before("finishScenario.battleGoal",l.name,""+s),R.r.settings.battleGoals&&l.battleGoal&&l.battleGoals.length>0&&(m=d.v.battleGoalManager.getBattleGoal(l.battleGoals[0])),e.target.checked&&this.battleGoals[i]s&&(this.battleGoals[i]=m.checks)):this.battleGoals[i]>=s&&(this.battleGoals[i]=s-1,m&&m.checks>s-1&&(this.battleGoals[i]=0)),this.updateFinish(),d.v.stateManager.after()}openBattleGoals(e){this.dialog.open(bw,{panelClass:["dialog"],data:{character:e,cardOnly:e.battleGoal}})}toggleChallenges(e=!1){d.v.stateManager.before("finishScenario.dialog.challenge"+(e?"s":"")),this.challenges=this.challenges>(e?1:0)?e?1:0:e?2:1,this.updateFinish(),d.v.stateManager.after()}itemDistributed(e,i,s=!0){if(this.items[e]||(this.items[e]=[]),s&&this.rewards&&this.rewards.chooseItem){let k=0,W=0,ct=0,Ct=!1;if(this.rewards.chooseItem.forEach(Ot=>{!Ct&&ixt!=i&&(xtW)&&this.characters.some((Gt,se)=>this.itemDistributed(se,xt,!1))))return!0}const l=this.rewardItems[i];if(this.characters[e].progress.items.find(k=>k.name==""+l.id&&k.edition==l.edition))return!0;const m=this.rewardItems[i],O=s?m.count-this.characters.filter(k=>k.progress.items.find(W=>W.name==""+m.id&&W.edition==m.edition)).length:1;return-1==this.items[e].indexOf(i)&&this.items.filter(k=>-1!=k.indexOf(i)).length>=Math.min(this.rewardItemCount[i],O)}toggleItem(e,i,s){d.v.stateManager.before("finishScenario.dialog.item",""+i,""+this.rewardItems[s].id),-1==this.items[i].indexOf(s)?this.items[i].push(s):this.items[i].splice(this.items[i].indexOf(s),1),this.updateFinish(),d.v.stateManager.after()}toggleRandomItem(e,i){d.v.stateManager.before("finishScenario.dialog.item",""+i),this.randomItemIndex=this.randomItemIndex==i?-1:i,this.updateFinish(),d.v.stateManager.after()}openItemDialog(e){e&&this.dialog.open(gg,{data:{item:e}})}changeCollectiveGold(e,i){d.v.stateManager.before("finishScenario.dialog.collectiveGold",""+i,e.target.value),this.collectiveGold[i]=+e.target.value,this.updateFinish(),d.v.stateManager.after()}changeCalendarSectionManual(e,i){d.v.stateManager.before("finishScenario.dialog.calendarSectionManual",""+i,e.target.value),this.calendarSectionManual[i]=+e.target.value,this.updateFinish(),d.v.stateManager.after()}selectLocation(e){d.v.stateManager.before("finishScenario.dialog.chooseLocation",e),this.chooseLocation=e,this.updateFinish(),d.v.stateManager.after()}selectCharacter(e){d.v.stateManager.before("finishScenario.dialog.chooseUnlockCharacter",e),this.chooseUnlockCharacter=e,this.updateFinish(),d.v.stateManager.after()}openCharacterSheet(e){this.dialog.open(IO,{panelClass:["dialog-invert"],data:e})}toggleAbsent(e){d.v.stateManager.before(e.absent?"unsetAbsent":"setAbsent","data.character."+e.name),e.absent=!e.absent,d.v.stateManager.after()}finish(e=void 0){var i=this;return(0,J.Z)(function*(){i.waitForClose=!0;const s=d.v.scenarioData(i.scenario.edition).find(l=>l.group==i.scenario.group&&l.index==e);if(i.conclusionOnly?d.v.stateManager.before("finishConclusion",...d.v.scenarioManager.scenarioUndoArgs(i.scenario)):d.v.stateManager.before(i.success&&s?"finishScenario.linked":"finishScenario."+(i.success?"success":"failure"),...d.v.scenarioManager.scenarioUndoArgs(),e||""),i.success){if(d.v.game.figures.filter(l=>l instanceof oe.z).map(l=>l).sort((l,m)=>{const O=l.title.toLowerCase()||R.r.getLabel("data.character."+l.name).toLowerCase(),k=m.title.toLowerCase()||R.r.getLabel("data.character."+m.name).toLowerCase();return O>k?1:O{if(!l.absent&&(i.battleGoals[m]>0&&(l.progress.battleGoals+=i.battleGoals[m]),i.collectiveGold[m]>0&&(l.progress.gold+=i.collectiveGold[m]),i.rewardItems.forEach((O,k)=>{i.items.every(W=>-1==W.indexOf(k))&&i.items[m].push(k)}),i.items[m]&&i.items[m].length>0&&i.items[m].forEach(O=>{const k=i.rewardItems[O];l.progress.items.push(new Vn.xb(""+k.id,k.edition)),d.v.itemManager.addItemCount(k)}),i.challenges))for(let O=0;O0&&i.randomItemBlueprints.forEach(l=>{-1==l?d.v.game.party.inspiration+=1:d.v.game.party.unlockedItems.push(new Vn.Jc(""+l,i.scenario.edition))}),(i.gainRewards||i.forceCampaign)&&i.rewards&&i.rewards.calendarSectionManual&&i.rewards.calendarSectionManual.forEach((l,m)=>{if(i.calendarSectionManual[m]>=0){const O=d.v.game.party.weeks+i.calendarSectionManual[m];d.v.game.party.weekSections[O]||(d.v.game.party.weekSections[O]=[]),d.v.game.party.weekSections[O]?.push(l.section)}})}i.conclusionOnly?d.v.scenarioManager.finishScenario(i.scenario,!0,i.conclusion,!1,void 0,i.characterProgress||i.forceCampaign,i.gainRewards||i.forceCampaign,!0):d.v.scenarioManager.finishScenario(d.v.game.scenario,i.success,i.conclusion,!1,s?new ei.$4(s):void 0,i.characterProgress||i.forceCampaign,i.gainRewards||i.forceCampaign),yield d.v.stateManager.after(0,R.r.settings.autoBackup>-1&&R.r.settings.autoBackupFinish&&(0==R.r.settings.autoBackup||(d.v.game.revision+d.v.game.revisionOffset)%R.r.settings.autoBackup!=0)),i.dialogRef.close()})()}restart(){this.waitForClose=!0,d.v.stateManager.before("finishScenario.restart",...d.v.scenarioManager.scenarioUndoArgs()),d.v.scenarioManager.finishScenario(this.gameManager.game.scenario,this.success,this.conclusion,!0,void 0,this.characterProgress||this.forceCampaign,this.gainRewards||this.forceCampaign,!1),d.v.stateManager.after(1e3),this.dialogRef.close()}close(){this.dialogRef.close()}unlocked(e){return-1!=d.v.game.unlockedCharacters.indexOf(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-summary"]],decls:19,vars:17,consts:[[1,"scroll-container"],[1,"header"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"text-white",3,"ghs-label"],["class","success",4,"ngIf"],["class","conclusion",4,"ngIf"],["class","casual",4,"ngIf"],["class","failure",4,"ngIf"],[1,"main",3,"ngClass"],["class","table",3,"--ghs-summary-columns",4,"ngIf"],[1,"rewards"],["class","reward warning",4,"ngIf"],[4,"ngIf"],["class","reward",4,"ngIf"],["class","buttons",3,"ngClass",4,"ngIf"],[1,"success"],[1,"conclusion"],[1,"casual"],[1,"failure"],[1,"table"],[1,"head-col","first"],["class","first",4,"ngFor","ngForOf"],[1,"head-col","calc-col"],["class","calc-col",4,"ngFor","ngForOf"],[1,"head-col"],[3,"ghs-label",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"first"],[1,"icon","character-icon",3,"src","click"],[1,"name",3,"ngClass"],[1,"absent-icon-container",3,"ngClass"],[1,"ghs-svg","absent-icon",3,"src","ghs-label","ghs-label-attribute","click"],[1,"calc-col"],["type","number","min","0",3,"max","value","change"],[1,"ghs-svg",3,"src"],[1,"gold"],[1,"loot"],["class","xp",4,"ngIf"],[1,"xp"],["class","treasures",4,"ngFor","ngForOf"],[1,"treasures"],["class","hint-container",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"treasure","hint-trigger"],[1,"hint","above","center"],["class","text placeholder text-white",3,"edition","index","rewardResults",4,"ngIf"],[1,"text","placeholder","text-white",3,"edition","index","rewardResults"],[3,"ghs-label","ghs-label-args"],[3,"item","flipped","click",4,"ngIf"],["type","checkbox",3,"disabled","checked","change"],[3,"item","flipped","click"],[1,"battlegoals"],["class","battlegoal",3,"click",4,"ngIf"],[1,"checkmarks"],["type","checkbox",3,"checked","change",4,"ngIf"],[1,"battlegoal",3,"click"],[3,"identifier","flipped"],["type","checkbox",3,"disabled","checked",4,"ngFor","ngForOf"],["type","checkbox",3,"disabled","checked"],["type","checkbox",3,"checked","change"],[1,"reward","warning"],[1,"list"],["class","item",4,"ngIf"],[1,"item"],[3,"click"],["class","reward locations",4,"ngIf"],["class","reward achievements",4,"ngIf"],[1,"placeholder","text-white",3,"ghs-label"],[1,"reward","locations"],["class","list",4,"ngIf"],["class","item location",4,"ngFor","ngForOf"],[1,"item","location"],["class","item location choose",4,"ngFor","ngForOf"],[1,"item","location","choose"],["type","radio","name","chooseLocation",3,"value","checked","change"],[1,"reward","achievements"],["class","item achievement",4,"ngFor","ngForOf"],[1,"item","achievement"],["class","placeholder text-white hint",3,"ghs-label",4,"ngIf"],[1,"placeholder","text-white","hint",3,"ghs-label"],[1,"placeholder","text-white",3,"ghs-label","ghs-label-args"],["type","number","min","-1",3,"value","change"],[1,"reward"],["class","item envelope",4,"ngFor","ngForOf"],["class","item gold",4,"ngIf"],["class","item experience",4,"ngIf"],["class","item collectiveGold",4,"ngIf"],["class","item resources",4,"ngIf"],["class","item collective-resources",4,"ngIf"],["class","item reputation",4,"ngIf"],["class","item prosperity",4,"ngIf"],["class","item inspiration",4,"ngIf"],["class","item morale",4,"ngIf"],["class","item perks",4,"ngIf"],["class","item battleGoals",4,"ngIf"],["class","item items",4,"ngFor","ngForOf"],["class","item chooseItem",4,"ngIf"],["class","item item-designs",4,"ngFor","ngForOf"],["class","item item-blueprints",4,"ngFor","ngForOf"],["class","item item-blueprints",4,"ngIf"],["class","item events",4,"ngFor","ngForOf"],["class","list-inline unlock-character",4,"ngIf"],["class","item character",4,"ngIf"],["class","item custom",4,"ngIf"],["class","item loot-deck-cards",4,"ngFor","ngForOf"],["class","item town-guard-am",4,"ngIf"],[1,"item","envelope"],[1,"item","gold"],[1,"item","experience"],[1,"item","collectiveGold"],[1,"item","resources"],["class","placeholder text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"item","collective-resources"],[1,"item","reputation"],[1,"item","prosperity"],[1,"item","inspiration"],[1,"item","morale"],[1,"item","perks"],[1,"item","battleGoals"],[1,"item","items"],["class","placeholder text-white",3,"ghs-label","ghs-label-args","click",4,"ngIf"],[1,"placeholder","text-white",3,"ghs-label","ghs-label-args","click"],[1,"item","chooseItem"],["class","placeholder text-white",3,"ghs-label",4,"ngIf"],[1,"item","item-designs"],[1,"item","item-blueprints"],[1,"item","events"],[1,"list-inline","unlock-character"],["class","item character choose",3,"ngClass",4,"ngFor","ngForOf"],[1,"item","character","choose",3,"ngClass"],["type","radio","name","chooseUnlockCharacter",3,"value","checked","change",4,"ngIf"],["type","radio","name","chooseUnlockCharacter",3,"value","checked","change"],[1,"item","character"],[1,"item","custom"],[1,"item","loot-deck-cards"],[1,"item","town-guard-am"],["class","placeholder text-white",3,"ghs-label","ghs-label-args",4,"ngFor","ngForOf"],["class","item challenges",4,"ngIf"],[1,"item","challenges"],[1,"buttons",3,"ngClass"],[1,"cancel",3,"click"],["class","links",4,"ngIf"],["class","apply",3,"click",4,"ngIf"],["class","restart",3,"click",4,"ngIf"],[1,"links"],[1,"text"],["class","apply forced-link",3,"click",4,"ngFor","ngForOf"],[1,"apply","forced-link",3,"click"],["class","link",3,"click",4,"ngFor","ngForOf"],[1,"link",3,"click"],[1,"apply",3,"click"],[1,"restart",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span",2),t._UZ(3,"span",3),t.TgZ(4,"span",4),t._uU(5),t._UZ(6,"span",5),t.qZA()(),t.YNc(7,BD,2,1,"span",6),t.YNc(8,zD,2,1,"span",7),t.YNc(9,GD,2,1,"span",8),t.YNc(10,VD,2,1,"span",9),t.qZA(),t.TgZ(11,"div",10),t.YNc(12,GI,27,23,"div",11),t.TgZ(13,"div",12),t.YNc(14,YI,8,3,"div",13),t.YNc(15,XI,7,4,"div",13),t.YNc(16,B4,11,10,"ng-container",14),t.YNc(17,Y4,7,3,"div",15),t.qZA()(),t.YNc(18,iN,6,7,"div",16),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ghs-label",i.conclusionOnly?"scenario.conclusion":i.rewardsOnly?"scenario.summary.rewards":"scenario.summary"),t.xp6(2),t.hij("#",i.scenario.index," "),t.xp6(1),t.Q6J("ghs-label","data.scenario."+i.scenario.name),t.xp6(1),t.Q6J("ngIf",i.success&&!i.conclusionOnly&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",i.conclusion&&i.conclusion!=i.scenario),t.xp6(1),t.Q6J("ngIf",i.success&&!i.gameManager.game.party.campaignMode&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",!i.success),t.xp6(1),t.Q6J("ngClass",t.WLB(14,oN,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(1),t.Q6J("ngIf",i.characters.length>0&&(i.characterProgress||i.forceCampaign)&&i.settingsManager.settings.characterSheet&&!i.conclusionOnly&&!i.rewardsOnly),t.xp6(2),t.Q6J("ngIf",!i.conclusionOnly&&i.alreadyWarning&&i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ngIf",!i.conclusionOnly&&!i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ngIf",!i.alreadyWarning&&i.gameManager.game.party.campaignMode||i.forceCampaign),t.xp6(1),t.Q6J("ngIf",i.hasBonus()),t.xp6(1),t.Q6J("ngIf",!(i.conclusionOnly&&i.alreadyWarning||i.rewardsOnly)))},dependencies:[x.mk,x.sg,x.O5,$f,Xd,yw,ie,Kd,Ii],styles:['.header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-white);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .failure[_ngcontent-%COMP%]{color:var(--ghs-color-red);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:var(--ghs-color-green);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .casual[_ngcontent-%COMP%]{color:var(--ghs-color-red);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.main[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap-reverse;height:100%}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-summary-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-summary-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white);overflow:auto}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent-icon[_ngcontent-%COMP%]{cursor:pointer}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%]:hover, .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent-icon[_ngcontent-%COMP%]:hover{opacity:.7}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .character-icon.absent-icon[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent-icon.absent-icon[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent[_ngcontent-%COMP%]{text-decoration:line-through}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .gold[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .xp[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .gold.gold[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .xp.gold[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot.gold[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .gold.xp[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .xp.xp[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot.xp[_ngcontent-%COMP%]{color:var(--ghs-color-blue)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-image:url(dialog_background.fa4ff388462f6a00.png);position:sticky;left:0;z-index:1}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{flex-grow:1;width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));text-align:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%] .battlegoal[_ngcontent-%COMP%]{display:flex;justify-content:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%] .battlegoal[_ngcontent-%COMP%] ghs-battlegoal[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%] .checkmarks[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);justify-content:center;align-items:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;background-image:url(treasure.0792d529e76ec279.png);background-size:contain;background-repeat:no-repeat;background-position:center;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-black);width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor))}.main.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.main.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.rewards[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;flex-direction:column;min-width:0;max-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-brown);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;width:100%;height:100%;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-text);padding-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background:linear-gradient(180deg,var(--ghs-color-brown) 0%,var(--ghs-color-brown) calc(100% - var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor)),transparent 100%);opacity:.2;filter:brightness(20);border-top-left-radius:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));border-top-right-radius:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));z-index:0}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;z-index:1;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.location[_ngcontent-%COMP%], .rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character[_ngcontent-%COMP%]{flex-direction:row;align-items:flex-end;margin:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{white-space:nowrap}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.choose[_ngcontent-%COMP%]{cursor:pointer;color:var(--ghs-color-white);justify-content:flex-start;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-text)}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.choose[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-normal);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.disabled[_ngcontent-%COMP%], .rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character.unlocked[_ngcontent-%COMP%]{pointer-events:none}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character.unlocked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:50%;left:0;right:0;height:.1em;background-color:var(--ghs-color-white);transform:translateY(-50%);z-index:2}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.challenges[_ngcontent-%COMP%]{flex-direction:row;justify-content:center;align-items:center;margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .location[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{display:flex;justify-content:center;width:1.5em;height:1.5em;font-size:1em;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border-radius:100%;border:2px solid var(--ghs-color-black);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list-inline[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-end;flex-wrap:wrap}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list-inline[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{margin:0 .1em}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list-inline[_ngcontent-%COMP%] .choose[_ngcontent-%COMP%]{align-items:flex-end}.rewards[_ngcontent-%COMP%] .reward.warning[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.rewards[_ngcontent-%COMP%] .reward.warning[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.buttons[_ngcontent-%COMP%] .apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.buttons[_ngcontent-%COMP%] .links[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.buttons[_ngcontent-%COMP%] .links[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.buttons.denied[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{pointer-events:initial}']})),a})();function aN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.openConclusions(i))}),t._UZ(1,"img",14)(2,"span",15),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.openConclusion"))}function sN(o,a){if(1&o&&(t.TgZ(0,"span",10),t._UZ(1,"img",11),t._uU(2),t.YNc(3,aN,3,1,"a",12),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/"+(e.isSolved(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," "),t.xp6(1),t.Q6J("ngIf",e.hasConclusions(n))}}function rN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.openConclusions(i))}),t._UZ(1,"img",14)(2,"span",15),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.openConclusion"))}const cN=function(o){return{finish:o}};function lN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",10)(1,"span",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.finishConclusion(s))}),t._UZ(2,"img",11),t._uU(3),t.qZA(),t.YNc(4,rN,3,1,"a",12),t._UZ(5,"span",17),t.TgZ(6,"img",18),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeSection(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(4,cN,e.isConclusion(n))),t.xp6(1),t.Q6J("src","./assets/images/"+(e.isSolved(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," "),t.xp6(1),t.Q6J("ngIf",e.hasConclusions(n))}}const iT=function(o){return[o]};let gN=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"week",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),this.week=e,this.dialog=i}sectionsFixed(){const e=d.v.campaignData();return e.weeks&&e.weeks[this.week]&&e.weeks[this.week]||[]}sections(){return d.v.game.party.weekSections[this.week]||[]}isConclusion(e){return null!=d.v.sectionData(d.v.currentEdition()).find(i=>i.index==e&&!i.group&&i.conclusion)}isSolved(e){return null!=d.v.game.party.conclusions.find(i=>i.edition==d.v.game.edition&&i.index==e)}hasConclusions(e){const i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&1==s.parentSections.length&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e)));return i.length>0&&i.every(s=>!d.v.game.party.conclusions.find(l=>l.edition==s.edition&&l.index==s.index&&l.group==s.group))}finishConclusion(e){const i=d.v.sectionData(d.v.currentEdition()).find(s=>s.index==e&&s.conclusion);if(i){const s=new ei.$4(i);this.dialog.open(uo,{panelClass:"dialog",data:{scenario:s,conclusionOnly:!0}})}}openConclusions(e){let i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&1==s.parentSections.length&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e))).map(s=>(s.name="",s));i.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.sectionData(d.v.game.edition).find(s=>s.index==e&&!s.group)}}).closed.subscribe({next:s=>{if(s){const l=new ei.$4(s);d.v.stateManager.before("finishConclusion",...d.v.scenarioManager.scenarioUndoArgs(l)),d.v.scenarioManager.finishScenario(l,!0,void 0,!1,void 0,!1,d.v.game.party.campaignMode,!0),d.v.game.party.weekSections[this.week]=d.v.game.party.weekSections[this.week]||[],d.v.game.party.weekSections[this.week]?.push(l.index),d.v.stateManager.after(),this.dialog.open(uo,{panelClass:"dialog",data:{scenario:l,conclusionOnly:!0}})}}})}addSection(e){d.v.game.party.weekSections[this.week]||(d.v.game.party.weekSections[this.week]=[]),e.classList.add("error"),-1==d.v.game.party.weekSections[this.week]?.indexOf(e.value)&&(d.v.stateManager.before("addPartyWeekSection",d.v.game.party.name,this.week+"",e.value+""),d.v.game.party.weekSections[this.week]?.push(e.value),e.classList.remove("error"),e.value="",d.v.stateManager.after())}removeSection(e){-1!=d.v.game.party.weekSections[this.week]?.indexOf(e)&&(d.v.stateManager.before("removePartyWeekSection",d.v.game.party.name,this.week+"",e+""),d.v.game.party.weekSections[this.week]?.splice(d.v.game.party.weekSections[this.week]?.indexOf(e)||-1,1),0==d.v.game.party.weekSections[this.week]?.length&&delete d.v.game.party.weekSections[this.week],this.isSolved(e)&&(d.v.game.party.conclusions=d.v.game.party.conclusions.filter(i=>i.edition!=d.v.game.edition||i.index!=e)),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-week-dialog"]],decls:12,vars:14,consts:[[1,"week-dialog"],[1,"title"],[3,"ghs-label","ghs-label-args"],[1,"sub-title"],[1,"sections"],["class","section",4,"ngFor","ngForOf"],[1,"add-section"],[3,"ghs-label","ghs-label-attribute","keyup","keyup.enter"],["scenario",""],["src","./assets/images/plus.svg",1,"button",3,"ghs-label","ghs-label-attribute","click"],[1,"section"],[3,"src"],["class","conclusion",3,"click",4,"ngIf"],[1,"conclusion",3,"click"],["src","./assets/images/hint.svg"],[3,"ghs-label"],[1,"index",3,"ngClass","click"],[1,"spacer"],["src","./assets/images/close.svg",1,"button",3,"click"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"span",2),t.qZA()(),t.TgZ(5,"div",4),t.YNc(6,sN,4,3,"span",5),t.YNc(7,lN,7,6,"span",5),t.qZA(),t.TgZ(8,"div",6)(9,"input",7,8),t.NdJ("keyup",function(){t.CHM(s);const m=t.MAs(10);return m.classList.remove("error"),t.KtG(m.classList.remove("error"))})("keyup.enter",function(){t.CHM(s);const m=t.MAs(10);return t.KtG(i.addSection(m))}),t.qZA(),t.TgZ(11,"img",9),t.NdJ("click",function(){t.CHM(s);const m=t.MAs(10);return t.KtG(i.addSection(m))}),t.qZA()()()}2&e&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections")("ghs-label-args",t.VKq(10,iT,i.week+"")),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.calc")("ghs-label-args",t.VKq(12,iT,i.week-i.gameManager.game.party.weeks+"")),t.xp6(2),t.Q6J("ngForOf",i.sectionsFixed()),t.xp6(1),t.Q6J("ngForOf",i.sections()),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.section")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.addSection")("ghs-label-attribute","title"))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".week-dialog[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer}.week-dialog[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.8}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;flex-direction:column}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%], .week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{display:flex;align-items:center}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .finish[_ngcontent-%COMP%]{cursor:pointer}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-black)}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-right:.3em}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]:hover{opacity:.7}.week-dialog[_ngcontent-%COMP%] .add-section[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .add-section[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);outline:none}"]})),a})();const Xc=function(o){return[o]};function dN(o,a){if(1&o&&(t.TgZ(0,"div",10),t._UZ(1,"span",11),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","scenario.requirements.solo")("ghs-label-args",t.VKq(2,Xc,n.solo))}}function hN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.party")("ghs-label-args",t.VKq(2,Xc,n))}}const Tw=function(o,a,n){return[o,a,n]};function uN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.partyCount")("ghs-label-args",t.kEZ(2,Tw,n.name,""+(n.required-n.count),""+n.required))}}function _N(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.partyMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function pN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.global")("ghs-label-args",t.VKq(2,Xc,n))}}function fN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.globalCount")("ghs-label-args",t.kEZ(2,Tw,n.name,""+(n.required-n.count),""+n.required))}}function mN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.globalMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function vN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.campaignStickers")("ghs-label-args",t.VKq(2,Xc,n))}}function CN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.campaignStickersCount")("ghs-label-args",t.kEZ(2,Tw,n.name,""+(n.required-n.count),""+n.required))}}function MN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.campaignStickersMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function ON(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.buildings")("ghs-label-args",t.VKq(2,Xc,n))}}const PN=function(o,a){return[o,a]};function yN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.buildingsLevel")("ghs-label-args",t.WLB(2,PN,n.name,""+n.level))}}function bN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.buildingsMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function xN(o,a){1&o&&(t.TgZ(0,"span",20),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","or"))}function wN(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",12)(2,"div",13),t.YNc(3,hN,1,4,"div",14),t.qZA(),t.TgZ(4,"div",13),t.YNc(5,uN,1,6,"div",14),t.qZA(),t.TgZ(6,"div",13),t.YNc(7,_N,1,4,"div",14),t.qZA(),t.TgZ(8,"div",15),t.YNc(9,pN,1,4,"div",14),t.qZA(),t.TgZ(10,"div",15),t.YNc(11,fN,1,6,"div",14),t.qZA(),t.TgZ(12,"div",15),t.YNc(13,mN,1,4,"div",14),t.qZA(),t.TgZ(14,"div",16),t.YNc(15,vN,1,4,"div",14),t.qZA(),t.TgZ(16,"div",16),t.YNc(17,CN,1,6,"div",14),t.qZA(),t.TgZ(18,"div",16),t.YNc(19,MN,1,4,"div",14),t.qZA(),t.TgZ(20,"div",17),t.YNc(21,ON,1,4,"div",14),t.qZA(),t.TgZ(22,"div",17),t.YNc(23,yN,1,5,"div",14),t.qZA(),t.TgZ(24,"div",17),t.YNc(25,bN,1,4,"div",14),t.qZA()(),t.YNc(26,xN,2,1,"span",18),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(3),t.Q6J("ngForOf",n.partyAchievements),t.xp6(2),t.Q6J("ngForOf",n.partyAchievementsCount),t.xp6(2),t.Q6J("ngForOf",n.partyAchievementsMissing),t.xp6(2),t.Q6J("ngForOf",n.globalAchievements),t.xp6(2),t.Q6J("ngForOf",n.globalAchievementsCount),t.xp6(2),t.Q6J("ngForOf",n.globalAchievementsMissing),t.xp6(2),t.Q6J("ngForOf",n.campaignStickers),t.xp6(2),t.Q6J("ngForOf",n.campaignStickersCount),t.xp6(2),t.Q6J("ngForOf",n.campaignStickersMissing),t.xp6(2),t.Q6J("ngForOf",n.buildings),t.xp6(2),t.Q6J("ngForOf",n.buildingsLevel),t.xp6(2),t.Q6J("ngForOf",n.buildingsMissing),t.xp6(1),t.Q6J("ngIf",e{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"solo",""),(0,_.Z)(this,"missingRequirements",[]),(0,_.Z)(this,"all",!1),(0,_.Z)(this,"scenarioData",void 0),(0,_.Z)(this,"hideMenu",!1),(0,_.Z)(this,"hideAll",!1),this.data=e,this.dialogRef=i,this.scenarioData=e.scenarioData,this.hideMenu=e.hideMenu||!1,this.update()}update(){this.missingRequirements=this.getRequirements(this.all),this.solo="",this.hideAll=!this.all&&JSON.stringify(this.getRequirements(!0))==JSON.stringify(this.missingRequirements)}getRequirements(e=!1){let i=[];return this.scenarioData.solo&&(e||!d.v.game.figures.find(s=>s instanceof oe.z&&s.name==this.scenarioData.solo&&s.level>=5))&&(this.solo=this.scenarioData.solo),this.scenarioData.requirements&&this.scenarioData.requirements.forEach(s=>{let l=!1,m=new ZN;s.global&&s.global.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.globalAchievementsList.find(k=>k.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()))&&(m.globalAchievementsMissing.push(O.substring(1,O.length)),l=!0);else if(-1==O.indexOf(":")||isNaN(+O.split(":")[1]))(e||!d.v.game.party.globalAchievementsList.find(k=>k.toLowerCase().trim()==O.toLowerCase().trim()))&&(m.globalAchievements.push(O),l=!0);else{let k=+O.split(":")[1];d.v.game.party.globalAchievementsList.forEach(W=>{W.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&k--}),(e||k>0)&&(m.globalAchievementsCount.push({name:O.split(":")[0],count:k,required:+O.split(":")[1]}),l=!0)}}),s.party&&s.party.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.achievementsList.find(k=>k.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()))&&(m.partyAchievementsMissing.push(O.substring(1,O.length)),l=!0);else if(-1==O.indexOf(":")||isNaN(+O.split(":")[1]))(e||!d.v.game.party.achievementsList.find(k=>k.toLowerCase().trim()==O.toLowerCase().trim()))&&(m.partyAchievements.push(O),l=!0);else{let k=+O.split(":")[1];d.v.game.party.achievementsList.forEach(W=>{W.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&k--}),k>0&&(m.partyAchievementsCount.push({name:O.split(":")[0],count:k,required:+O.split(":")[1]}),l=!0)}}),s.campaignSticker&&s.campaignSticker.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.campaignStickers.find(k=>k.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()))&&(m.campaignStickersMissing.push(O.substring(1,O.length)),l=!0);else if(-1==O.indexOf(":")||isNaN(+O.split(":")[1]))(e||!d.v.game.party.campaignStickers.find(k=>k.toLowerCase().trim()==O.toLowerCase().trim()))&&(m.campaignStickers.push(O),l=!0);else{let k=+O.split(":")[1];d.v.game.party.campaignStickers.forEach(W=>{W.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&k--}),k>0&&(m.campaignStickersCount.push({name:O.split(":")[0],count:k,required:+O.split(":")[1]}),l=!0)}}),s.buildings&&s.buildings.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.buildings.find(k=>k.name.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()&&k.level>0))&&(m.buildingsMissing.push(O.substring(1,O.length)),l=!0);else if(-1!=O.indexOf(":")){let k=+O.split(":")[1];(e||!d.v.game.party.buildings.find(W=>W.name.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&W.level>=k))&&(m.buildingsLevel.push({name:O.split(":")[0],level:k}),l=!0)}else(e||!d.v.game.party.buildings.find(k=>k.name.toLowerCase().trim()==O.toLowerCase().trim()&&k.level>0))&&(m.buildings.push(O),l=!0)}),l&&i.push(m)}),i}startScenario(){d.v.stateManager.before("setScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(this.scenarioData))),d.v.scenarioManager.setScenario(new ei.$4(this.scenarioData)),d.v.stateManager.after(),this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-requirements-dialog"]],decls:12,vars:7,consts:[[1,"requirements-dialog"],[1,"header"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"requirements"],["class","solo",4,"ngIf"],[4,"ngFor","ngForOf"],["class","checkbox",4,"ngIf"],["class","buttons",4,"ngIf"],[1,"solo"],[3,"ghs-label","ghs-label-args"],[1,"requirement"],[1,"party"],["class","achievement",3,"ghs-label","ghs-label-args",4,"ngFor","ngForOf"],[1,"global"],[1,"campaign-stickers"],[1,"buildings"],["class","separator",4,"ngIf"],[1,"achievement",3,"ghs-label","ghs-label-args"],[1,"separator"],[1,"checkbox"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"buttons"],[1,"cancel",3,"click"],[1,"start",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span",2),t._UZ(3,"span",3),t.TgZ(4,"span",4),t._uU(5),t._UZ(6,"span",3),t.qZA()()(),t.TgZ(7,"div",5),t.YNc(8,dN,2,4,"div",6),t.YNc(9,wN,27,13,"ng-container",7),t.YNc(10,kN,3,2,"label",8),t.qZA(),t.YNc(11,TN,5,2,"div",9),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ghs-label","scenario.requirements"),t.xp6(2),t.hij("#",i.scenarioData.index," "),t.xp6(1),t.Q6J("ghs-label","data.scenario."+i.scenarioData.name),t.xp6(2),t.Q6J("ngIf",i.solo),t.xp6(1),t.Q6J("ngForOf",i.missingRequirements),t.xp6(1),t.Q6J("ngIf",!i.hideAll),t.xp6(1),t.Q6J("ngIf",!i.hideMenu))},dependencies:[x.sg,x.O5,va,yi,Si,ie],styles:[".requirements-dialog[_ngcontent-%COMP%]{position:relative;color:var(--ghs-color-white)}.requirements-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column}.requirements-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .requirements[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .requirements[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.requirements-dialog[_ngcontent-%COMP%] .requirements[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));display:flex;align-items:center;font-family:var(--ghs-font-text);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center;margin:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));white-space:nowrap}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .start[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}"]})),a})();var AN=E(8433),QO=E.n(AN);let aT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"worldMap",void 0),(0,_.Z)(this,"scenarios",[]),(0,_.Z)(this,"columns",[]),(0,_.Z)(this,"rows",[]),(0,_.Z)(this,"offsetX",[]),(0,_.Z)(this,"offsetY",[]),(0,_.Z)(this,"success",[]),(0,_.Z)(this,"scale",1),(0,_.Z)(this,"zooming",!1),this.edition=e,this.dialogRef=i;const s=R.r.settings.disablePinchZoom;R.r.settings.disablePinchZoom=!0;const l=d.v.editionData.find(m=>m.edition==this.edition);l&&(this.worldMap=l.worldMap,this.worldMap&&(this.scenarios=d.v.scenarioManager.scenarioData(this.edition).filter(m=>m.coordinates))),this.dialogRef.closed.subscribe({next:()=>{R.r.settings.disablePinchZoom=s}})}ngAfterViewInit(){if(this.worldMap){const s=this.worldMap.width,l=this.worldMap.height;var e=QO().map("map",{crs:QO().CRS.Simple,maxBounds:[[-.5*l,-.5*s],[1.5*l,1.5*s]],minZoom:-4,attributionControl:!1}),i=[[0,0],[l,s]];QO().imageOverlay("./assets/images/world-map/"+this.edition+"/map.jpg",i).addTo(e),e.fitBounds(i),e.zoomIn(),this.scenarios.forEach((m,O)=>{if(d.v.game.party.scenarios.find(k=>k.edition==m.edition&&k.index==m.index&&k.group==m.group)&&(this.success[O]=!0),m.coordinates){let k=m.index;for(;k.length<3;)k="0"+k;let W=QO().imageOverlay("./assets/images/world-map/"+this.edition+"/scenarios/"+m.edition+"-"+k+".png",[[l-m.coordinates.y,m.coordinates.x],[l-m.coordinates.y-m.coordinates.height,m.coordinates.x+m.coordinates.width]],{interactive:!0}).addTo(e);W.getElement()?.classList.add("scenario"),d.v.game.party.scenarios.find(ct=>ct.edition==m.edition&&ct.index==m.index&&ct.group==m.group)&&W.getElement()?.classList.add("success"),d.v.scenarioManager.isBlocked(m)?W.getElement()?.classList.add("blocked"):d.v.scenarioManager.isLocked(m)&&W.getElement()?.classList.add("locked"),W.setZIndex(O+1),W.on("click",()=>{const ct=this.scenarios[O];if(!this.success[O]&&d.v.game.party.campaignMode&&!d.v.scenarioManager.isBlocked(ct)){const Ct=new ei.$4(ct);d.v.stateManager.before("setScenario",...d.v.scenarioManager.scenarioUndoArgs(Ct)),d.v.scenarioManager.setScenario(Ct),this.dialogRef.close(),d.v.stateManager.after()}}),W.on("mouseover",ct=>{ct.target.setZIndex(this.scenarios.length+1)}),W.on("mouseout",ct=>{ct.target.setZIndex(O+1)})}})}}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-world-map"]],decls:3,vars:0,consts:[[1,"world-map-container"],["id","map",1,"world-map"],["map",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"div",1,2),t.qZA())},styles:[".world-map-container{position:absolute;top:0;left:0;width:100vw;height:100vh}.world-map-container .world-map{position:relative;width:100%;height:100%;max-width:100%;max-height:100%;overflow:auto;background:none}.world-map-container .world-map .scenario{z-index:2;filter:brightness(1.2) drop-shadow(4px 4px 4px var(--ghs-color-darkgray)) drop-shadow(-4px -4px 4px var(--ghs-color-darkgray))}.world-map-container .world-map .scenario:hover{cursor:pointer;filter:brightness(1.1);opacity:.9}.world-map-container .world-map .scenario.success{cursor:initial;z-index:2;filter:brightness(.8) hue-rotate(30deg)}.world-map-container .world-map .scenario.success:hover{cursor:initial;filter:none}.world-map-container .world-map .scenario.locked:not(.blocked){cursor:initial;z-index:1;filter:brightness(1)}.world-map-container .world-map .scenario.locked:not(.blocked):hover{cursor:initial;filter:brightness(.8) grayscale(.8)}.world-map-container .world-map .scenario.blocked{cursor:initial;z-index:1;filter:brightness(.7) sepia(2.5) hue-rotate(340deg)}.world-map-container .world-map .scenario.blocked:hover{cursor:initial;filter:brightness(.8) grayscale(.8)}\n"],encapsulation:2})),a})();function SN(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}const EN=function(o,a){return{looted:o,highlight:a}};function DN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",9),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.toggleTreasure(s))}),t.YNc(1,SN,2,0,"span",8),t._uU(2),t._UZ(3,"img",10),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.WLB(3,EN,-1!=i.looted.indexOf(e),e==i.treasureIndex)),t.xp6(1),t.Q6J("ngIf",!(""+n).startsWith("G")&&+n<10),t.xp6(1),t.hij("",n," ")}}function IN(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function NN(o,a){if(1&o&&t._UZ(0,"ghs-treasure-label",19),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("edition",e.edition)("index",+(""+n).split(":")[0]-1)("rewardResults",e.rewardsFromString(""+n))}}function JN(o,a){if(1&o&&(t.TgZ(0,"div",15)(1,"div",16),t.YNc(2,IN,2,0,"span",8),t._uU(3),t.qZA(),t.TgZ(4,"span",17),t.YNc(5,NN,1,3,"ghs-treasure-label",18),t.qZA()()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G")&&+n<10),t.xp6(1),t.hij("",(""+n).startsWith("G-")?"G":(""+n).split(":")[0]," "),t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G-"))}}const UN=function(o,a){return{selected:o,disabled:a}};function LN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCharacter(s))}),t._UZ(1,"img",12),t.TgZ(2,"span",13),t._uU(3),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,JN,6,3,"div",14),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.WLB(4,UN,e.character==n,e.treasures.length==e.looted.length)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.hij(" ",e.gameManager.characterManager.characterName(n,!0)," "),t.xp6(2),t.Q6J("ngForOf",n.treasures)}}const QN=function(o,a){return[o,a]};function RN(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"p"),t._UZ(2,"span",20),t.qZA(),t.TgZ(3,"div",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.lootTreasure())}),t._UZ(4,"span",2),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","game.loot.lootTreasure")("ghs-label-args",t.WLB(3,QN,n.character.title||"%data.character."+n.character.name+"%",""+n.treasures[n.treasureIndex])),t.xp6(2),t.Q6J("ghs-label","game.loot.lootTreasure.confirm")}}const Zw=function(o){return[o]};function FN(o,a){if(1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",20),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.loot.lootTreasure.selectTreasure")("ghs-label-args",t.VKq(2,Zw,n.character.title||"%data.character."+n.character.name+"%"))}}function qN(o,a){if(1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",20),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.loot.lootTreasure.selectCharacter")("ghs-label-args",t.VKq(2,Zw,(""+n.treasures[n.treasureIndex]).startsWith("G-")?"G":(""+n.treasures[n.treasureIndex]).split(":")[0]))}}function HN(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.loot.treasures.rewards.goal"))}function jN(o,a){if(1&o&&t._UZ(0,"ghs-treasure-label",23),2&o){const n=t.oxw(2);t.Q6J("edition",n.edition)("index",+n.treasures[n.treasureIndex]-1)("rewardResults",n.rewardResults)("itemCards",!0)}}function BN(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"p"),t._UZ(2,"span",20),t.qZA(),t.YNc(3,HN,2,1,"span",8),t.YNc(4,jN,1,4,"ghs-treasure-label",22),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","game.loot.lootTreasure.looted")("ghs-label-args",t.VKq(4,Zw,n.character.title||"%data.character."+n.character.name+"%")),t.xp6(1),t.Q6J("ngIf","G"==n.treasures[n.treasureIndex]),t.xp6(1),t.Q6J("ngIf","G"!=n.treasures[n.treasureIndex])}}let Aw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"scenario",void 0),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"treasures",[]),(0,_.Z)(this,"treasureIndex",-1),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"looted",[]),(0,_.Z)(this,"rewardResults",[]),(0,_.Z)(this,"init",!0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.data=e,d.v.game.scenario||e.treasures&&e.edition?e&&e.treasures&&e.edition?(this.treasures=e.treasures,this.edition=e.edition):d.v.game.scenario&&(this.scenario=d.v.game.scenario||d.v.scenarioManager.createScenario(),this.edition=this.scenario.edition):i.close()}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.scenario=d.v.game.scenario||d.v.scenarioManager.createScenario(),this.characters=d.v.game.figures.filter(i=>i instanceof oe.z&&!i.absent&&d.v.entityManager.isAlive(i)).map(i=>i),this.scenario&&(!this.data||!this.data.treasures)&&(this.edition=this.scenario.edition,this.treasures=d.v.scenarioManager.getTreasures(this.scenario,d.v.game.sections)),this.looted=[];let e=-1;this.treasures.forEach((i,s)=>{-1==this.looted.indexOf(s)&&(this.characters.find(l=>d.v.lootManager.hasTreasure(l,i,s))||d.v.game.party.treasures.find(l=>l.name==""+i&&l.edition==this.edition))?this.looted.push(s):e=s}),this.init&&this.treasures.length==this.looted.length+1&&this.treasureIndex!=e&&-1==this.looted.indexOf(e)&&(this.treasureIndex=e),!this.character&&this.treasures.length!=this.looted.length&&(this.character=this.characters.find(i=>i.active)||this.characters.length>0&&this.characters[0]||void 0)}toggleCharacter(e){this.character!=e&&this.treasures.length!=this.looted.length?(this.character=e,-1!=this.treasureIndex&&-1!=this.looted.indexOf(this.treasureIndex)&&(this.treasureIndex=-1)):this.character=void 0}toggleTreasure(e){this.treasureIndex=this.treasureIndex!=e?e:-1}removeTreasure(e,i){"number"==typeof i?(d.v.stateManager.before("removeCharTresure",""+i,this.edition,"data.character."+e.name),this.looted.splice(this.treasures.indexOf(i),1)):(d.v.stateManager.before("removeCharTresure","G",this.edition),this.looted.splice(+i.replace("G-",""),1)),e.treasures.splice(e.treasures.indexOf(i),1),d.v.stateManager.after()}lootTreasure(){if(-1!=this.treasureIndex){this.init=!1,this.rewardResults=[];const e=this.treasures[this.treasureIndex];this.character&&e&&-1==this.character.treasures.indexOf("G"==e?"G-"+this.treasureIndex:e)&&(d.v.stateManager.before("lootCharTreasure",""+e,this.edition,"data.character."+this.character.name),this.looted.push(this.treasureIndex),"G"!=e&&R.r.settings.treasuresLoot&&(this.rewardResults=d.v.lootManager.lootTreasure(this.character,e-1,this.edition)),this.character.treasures=this.character.treasures||[],this.character.treasures.push("G"==e?"G-"+this.treasureIndex:this.rewardResults.some(i=>i.length>0)?e+":"+this.rewardResults.map(i=>i.join("+")).join("|"):e),"number"==typeof e&&d.v.game.party.treasures.push(new Vn.xb(""+e,this.edition)),d.v.stateManager.after())}}rewardsFromString(e){return e.split(":").length<2?[]:e.split(":")[1].split("|").map(i=>i.split("+"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-treasures-dialog"]],decls:12,vars:7,consts:[[1,"treasures-popup"],[1,"title"],[3,"ghs-label"],[1,"treasures"],["class","treasure",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"loot"],[4,"ngIf"],[1,"treasure",3,"ngClass","click"],["src","./assets/images/check.svg",1,"overlay","check"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[1,"name"],["class","hint-container",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"treasure","hint-trigger"],[1,"hint","center"],["class","text placeholder text-white",3,"edition","index","rewardResults",4,"ngIf"],[1,"text","placeholder","text-white",3,"edition","index","rewardResults"],[3,"ghs-label","ghs-label-args"],[1,"button",3,"click"],["class","placeholder text-white",3,"edition","index","rewardResults","itemCards",4,"ngIf"],[1,"placeholder","text-white",3,"edition","index","rewardResults","itemCards"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.qZA(),t.TgZ(3,"div",3),t.YNc(4,DN,4,6,"div",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,LN,6,7,"div",6),t.qZA(),t.TgZ(7,"div",7),t.YNc(8,RN,5,6,"ng-container",8),t.YNc(9,FN,2,4,"p",8),t.YNc(10,qN,2,4,"p",8),t.YNc(11,BN,5,6,"ng-container",8),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","game.loot.treasures"),t.xp6(2),t.Q6J("ngForOf",i.treasures),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngIf",i.character&&-1!=i.treasureIndex&&!i.gameManager.lootManager.hasTreasure(i.character,i.treasures[i.treasureIndex],i.treasureIndex)),t.xp6(1),t.Q6J("ngIf",i.character&&-1==i.treasureIndex),t.xp6(1),t.Q6J("ngIf",!i.character&&-1!=i.treasureIndex),t.xp6(1),t.Q6J("ngIf",i.character&&-1!=i.treasureIndex&&i.gameManager.lootManager.hasTreasure(i.character,i.treasures[i.treasureIndex],i.treasureIndex)))},dependencies:[x.mk,x.sg,x.O5,$f,ie],styles:[".treasures-popup[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));min-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;background-image:url(treasure.0792d529e76ec279.png);background-size:contain;background-repeat:no-repeat;background-position:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-black);width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));transition:translate .5s ease-in-out}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:30%;left:50%;transform:translate(-50%);height:50%;width:auto}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay.check[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]:hover{opacity:.8;transform:scale(1.1)}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%]{pointer-events:none;opacity:.4}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:block}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin:.25em;padding:.25em;border:1px solid transparent}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.disabled[_ngcontent-%COMP%]{cursor:initial!important;border-color:transparent}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{position:relative}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{cursor:help!important;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:0;margin:0}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));color:var(--ghs-color-green)}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.6}"]})),a})();const zN=["treasureIndex"];function GN(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function VN(o,a){if(1&o&&(t.TgZ(0,"span",21),t._UZ(1,"ghs-treasure-label",22),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit;t.xp6(1),t.Q6J("edition",e.edition)("index",n)}}const YN=function(o,a){return{looted:o,highlight:a}};function KN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"div",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.toggleTreasure(s))}),t.YNc(2,GN,2,0,"span",17),t._uU(3),t._UZ(4,"img",18)(5,"img",19),t.qZA(),t.YNc(6,VN,2,2,"span",20),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(4,YN,-1!=e.looted.indexOf(n),-1!=e.selected.indexOf(n))),t.xp6(1),t.Q6J("ngIf",n<10),t.xp6(1),t.hij("",n," "),t.xp6(3),t.Q6J("ngIf",-1!=e.looted.indexOf(n))}}function $N(o,a){if(1&o&&(t.TgZ(0,"div",11)(1,"div",2),t._UZ(2,"span",12)(3,"span",12),t.qZA(),t.TgZ(4,"div",13),t.YNc(5,KN,7,7,"div",14),t.qZA()()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","%data.scenarioNumber:"+n.index+"%"),t.xp6(1),t.Q6J("ghs-label","data.scenario."+n.name),t.xp6(2),t.Q6J("ngForOf",e.treasures[n.index])}}const WN=function(o){return{disabled:o}};function XN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.apply())}),t._UZ(1,"span",4),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,WN,0==n.selected.length)),t.xp6(1),t.Q6J("ghs-label","party.campaign.treasures.applySelect")}}let tJ=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"treasureIndex",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"scenarios",[]),(0,_.Z)(this,"treasures",{}),(0,_.Z)(this,"looted",[]),(0,_.Z)(this,"selected",[]),(0,_.Z)(this,"select",!0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.edition=e.edition}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.scenarios=[],this.treasures={},this.looted=[],this.selected=[],d.v.scenarioManager.scenarioData(this.edition).filter(e=>d.v.game.party.scenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)||d.v.game.party.casualScenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)).forEach(e=>{let i=d.v.scenarioManager.getAllTreasures(e).filter(s=>"number"==typeof s).map(s=>+s);this.select||(i=i.filter(s=>!this.hasTreasure(""+s,this.edition))),i.length>0&&(this.scenarios.push(e),this.treasures[e.index]=i,i.forEach(s=>{this.hasTreasure(""+s,this.edition)&&this.looted.push(s)}))})}toggleTreasure(e){this.select?-1==this.selected.indexOf(e)?this.selected.push(e):this.selected.splice(this.selected.indexOf(e),1):-1==this.looted.indexOf(e)&&this.dialog.open(Aw,{panelClass:"dialog",data:{treasures:[e],edition:this.edition}})}hasTreasure(e,i){return d.v.game.party.treasures&&d.v.game.party.treasures.some(s=>s.name==e&&s.edition==i)}apply(){const e=this.selected.filter(s=>-1!=this.looted.indexOf(s)),i=this.selected.filter(s=>-1==this.looted.indexOf(s));e.length>0&&(d.v.stateManager.before("removeTreasures",this.edition,"["+e.join(",")+"]"),d.v.game.party.treasures=d.v.game.party.treasures.filter(s=>s.edition!=this.edition||isNaN(+s.name)||-1==e.indexOf(+s.name)),d.v.stateManager.after()),i.length>0&&(d.v.stateManager.before("addTreasures",this.edition,"["+i.join(",")+"]"),d.v.game.party.treasures.push(...i.map(s=>new Vn.xb(""+s,this.edition))),d.v.stateManager.after()),this.update()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-treasures-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(zN,5),2&e){let s;t.iGM(s=t.CRH())&&(i.treasureIndex=s.first)}},decls:14,vars:6,consts:[[1,"treasures-dialog"],[1,"header"],[1,"title"],["src","./assets/images/scenario/treasure.svg",1,"icon"],[3,"ghs-label"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"scenarios"],["class","scenario",4,"ngFor","ngForOf"],[1,"buttons"],[1,"cancel",3,"click"],["class","apply",3,"ngClass","click",4,"ngIf"],[1,"scenario"],[1,"text-white",3,"ghs-label"],[1,"treasures"],["class","hint-container",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"treasure","hint-trigger",3,"ngClass","click"],[4,"ngIf"],["src","./assets/images/check.svg",1,"overlay","check"],["src","./assets/images/close.svg",1,"overlay","uncheck"],["class","hint center",4,"ngIf"],[1,"hint","center"],[1,"text","placeholder","text-white",3,"edition","index"],[1,"apply",3,"ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"img",3)(4,"span",4),t.qZA(),t.TgZ(5,"label")(6,"input",5),t.NdJ("ngModelChange",function(l){return i.select=l})("change",function(){return i.update()}),t.qZA(),t._UZ(7,"span",4),t.qZA()(),t.TgZ(8,"div",6),t.YNc(9,$N,6,3,"div",7),t.qZA(),t.TgZ(10,"div",8)(11,"a",9),t.NdJ("click",function(){return i.close()}),t._UZ(12,"span",4),t.qZA(),t.YNc(13,XN,2,4,"a",10),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("ghs-label","party.campaign.treasures"),t.xp6(2),t.Q6J("ngModel",i.select),t.xp6(1),t.Q6J("ghs-label","party.campaign.treasures.batchSelect"),t.xp6(2),t.Q6J("ngForOf",i.scenarios),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngIf",i.select))},dependencies:[x.mk,x.sg,x.O5,va,yi,Si,$f,ie],styles:[".treasures-dialog[_ngcontent-%COMP%]{color:var(--ghs-color-white);min-width:25vw}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-yellow)}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-white);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:auto;max-height:70vh}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;background-image:url(treasure.0792d529e76ec279.png);background-size:contain;background-repeat:no-repeat;background-position:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-black);width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));transition:translate .5s ease-in-out}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:30%;left:50%;transform:translate(-50%);height:50%;width:auto}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay.check[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay.uncheck[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]:hover{opacity:.8;transform:scale(1.1)}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%]{cursor:initial;opacity:.4}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:block}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight.looted[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:none}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight.looted[_ngcontent-%COMP%] .uncheck[_ngcontent-%COMP%]{display:block}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}"]})),a})();var eJ=E(1028),nJ=E.n(eJ);class Wf{constructor(a,n="",e=!1,i=""){(0,_.Z)(this,"label",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"revelead",void 0),(0,_.Z)(this,"group",void 0),this.label=a,this.value=n,this.revelead=e,this.group=i}}let iJ=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"values",[]),(0,_.Z)(this,"spoiler",!1),(0,_.Z)(this,"emptyLabel",""),(0,_.Z)(this,"select",new t.vpe),this.el=e}ngOnInit(){let e=document.createElement("div");this.el.nativeElement.after(e);const i=this.select;nJ()({input:this.el.nativeElement,container:e,emptyMsg:this.emptyLabel?R.r.getLabel(this.emptyLabel):"",minLength:3,disableAutoSelect:!0,fetch:(s,l)=>{l(this.values.filter(m=>m.label&&m.label.toLowerCase().startsWith(s.toLowerCase())).sort((m,O)=>m.revelead&&!O.revelead?-1:O.revelead&&!m.revelead?1:0))},onSelect:s=>{this.el.nativeElement.value=s.label||"",i.emit(s.label)},render:(s,l,m)=>{const O=document.createElement("div");return O.textContent=s.label,s.revelead&&O.classList.add("revealed"),O},customize:()=>{if(this.spoiler&&(e.children.length>1||this.el.nativeElement.value.length<6))for(let s=0;s{l.classList.contains("spoiler")&&(m.preventDefault(),m.stopPropagation())}),l.addEventListener("touchend",m=>{if(l.classList.contains("spoiler")){m.preventDefault(),m.stopPropagation(),l.classList.remove("spoiler");for(let O=0;O{switch(s.event.key){case"ArrowUp":case"ArrowDown":case"Escape":if(this.spoiler&&(e.children.length>1||this.el.nativeElement.value.length<6))for(let m=0;m{var o;class a{constructor(e){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"total",{}),(0,_.Z)(this,"lootColumns",[le.CG.lumber,le.CG.metal,le.CG.hide,le.CG.arrowvine,le.CG.axenut,le.CG.corpsecap,le.CG.flamefruit,le.CG.rockroot,le.CG.snowthistle]),this.dialogRef=e}ngOnInit(){this.characters=d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e),this.lootColumns.forEach(e=>{this.total[e]=d.v.game.party.loot[e]||0,this.characters.length>0&&(this.total[e]=(this.total[e]||0)+this.characters.map(i=>i.progress.loot[e]||0).reduce((i,s)=>i+s))})}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-resources"]],decls:9,vars:6,consts:[[1,"resources-dialog"],[1,"table"],[1,"head-col","first"],[1,"first"],[3,"ghs-label"],["class","first",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"icon","character-icon",3,"src"],[1,"name"],[1,"head-col"],[1,"ghs-svg",3,"src"],[1,"loot"],[1,"loot",3,"ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"span",4),t.qZA(),t.YNc(5,oJ,4,2,"span",5),t.TgZ(6,"span",3),t._UZ(7,"span",4),t.qZA(),t.YNc(8,rJ,10,7,"ng-container",6),t.qZA()()),2&e&&(t.xp6(1),t.Udp("--ghs-resource-columns",3+i.characters.length),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(1),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.supply.total"),t.xp6(1),t.Q6J("ngForOf",i.lootColumns))},dependencies:[x.mk,x.sg,ie],styles:[".resources-dialog[_ngcontent-%COMP%]{position:relative}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-resource-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-resource-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));overflow:auto}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot.total[_ngcontent-%COMP%]{line-height:1em;border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-color:var(--ghs-color-white);position:sticky;left:0;z-index:1}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}"]})),a})();var Sw=E(3281);function lJ(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("(",n.building.data.id,")")}}function gJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.lumber,"")}}function dJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",20),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.metal,"")}}function hJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",21),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.hide,"")}}function uJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",22),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.gold,"")}}const sT=function(o){return{force:o}};function _J(o,a){if(1&o&&(t.TgZ(0,"span",16),t.YNc(1,gJ,3,1,"span",17),t.YNc(2,dJ,3,1,"span",17),t.YNc(3,hJ,3,1,"span",17),t.YNc(4,uJ,3,1,"span",17),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(5,sT,n.force)),t.xp6(1),t.Q6J("ngIf",n.costs.lumber),t.xp6(1),t.Q6J("ngIf",n.costs.metal),t.xp6(1),t.Q6J("ngIf",n.costs.hide),t.xp6(1),t.Q6J("ngIf",n.costs.gold)}}const hg=function(o){return[o]};function pJ(o,a){if(1&o&&(t.TgZ(0,"span",16),t._UZ(1,"span",7),t.TgZ(2,"span",18),t._UZ(3,"img",23),t.qZA(),t.TgZ(4,"span",18),t._UZ(5,"img",24),t.qZA(),t.TgZ(6,"span",18),t._UZ(7,"img",25),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(3,sT,n.force)),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.repair.costs")("ghs-label-args",t.VKq(5,hg,""+n.repair))}}function fJ(o,a){1&o&&(t.TgZ(0,"div",26),t._UZ(1,"span",27),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.discount"))}function mJ(o,a){if(1&o&&t._UZ(0,"span",28),2&o){const n=t.oxw();t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.loseMorale")("ghs-label-args",t.VKq(2,hg,""+n.rewards.loseMorale))}}function vJ(o,a){if(1&o&&t._UZ(0,"span",36),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.prosperity")("ghs-label-args",t.VKq(2,hg,""+n.rewards.prosperity))}}function CJ(o,a){if(1&o&&t._UZ(0,"span",37),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.defense")("ghs-label-args",t.VKq(2,hg,""+n.rewards.defense))}}function MJ(o,a){if(1&o&&t._UZ(0,"span",38),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.soldiers")("ghs-label-args",t.VKq(2,hg,""+n.rewards.soldiers))}}function OJ(o,a){if(1&o&&t._UZ(0,"span",39),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.plot"+(n.rewards.plots>0?"s":""))("ghs-label-args",t.VKq(2,hg,""+n.rewards.plots))}}function PJ(o,a){if(1&o&&t._UZ(0,"span",40),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.items")("ghs-label-args",n.rewards.items.split("-"))}}const yJ=function(o){return{active:o}};function bJ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",41),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.sectionRewards(i.rewards.section))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(3,yJ,n.rewardsOnly))("ghs-label","party.campaign.sheet.buildings.rewards.section")("ghs-label-args",t.VKq(5,hg,n.rewards.section))}}function xJ(o,a){if(1&o&&(t.TgZ(0,"div",29),t.YNc(1,vJ,1,4,"span",30),t.YNc(2,CJ,1,4,"span",31),t.YNc(3,MJ,1,4,"span",32),t.YNc(4,OJ,1,4,"span",33),t.YNc(5,PJ,1,2,"span",34),t.YNc(6,bJ,1,7,"span",35),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.rewards.prosperity),t.xp6(1),t.Q6J("ngIf",n.rewards.defense),t.xp6(1),t.Q6J("ngIf",n.rewards.soldiers),t.xp6(1),t.Q6J("ngIf",n.rewards.plots),t.xp6(1),t.Q6J("ngIf",n.rewards.items),t.xp6(1),t.Q6J("ngIf",n.rewards.section)}}function wJ(o,a){if(1&o&&(t.TgZ(0,"span",26)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Oqu(n.paidResources||"-"),t.xp6(1),t.hij("/",n.repair||"-"," ")}}function kJ(o,a){1&o&&t._UZ(0,"span",3),2&o&&t.Q6J("ghs-label","party.campaign.sheet.buildings.costs")}const TJ=function(o){return{absent:o}};function ZJ(o,a){if(1&o&&(t.TgZ(0,"span",45),t._UZ(1,"img",48),t.TgZ(2,"span",49),t._uU(3),t.qZA()()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(3,TJ,n.absent)),t.xp6(1),t.hij(" ",e.gameManager.characterManager.characterName(n,n.absent)," ")}}function AJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.gold||"-"),t.xp6(1),t.hij(" / ",n.costs.gold,"")}}const sa=function(o){return{disabled:o}};function SJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("gold",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("gold",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].gold)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].gold||"-"," / ",i.progress.gold," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,0==i.progress.gold||i.progress.gold==s.characterSpent[e].gold||s.spent.gold==s.costs.gold||s.repair&&s.paidResources==s.repair))}}function EJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function DJ(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,SJ,7,10,"ng-container",4),t.YNc(2,EJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.gold),t.xp6(1),t.Q6J("ngIf",!n.progress.gold)}}const RO=function(o,a,n){return{costs:o,some:a,full:n}};function IJ(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",51),t.YNc(3,AJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t._uU(5," - "),t.qZA(),t.YNc(6,DJ,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(4,RO,!n.repair,n.spent.gold,n.spent.gold==n.costs.gold)),t.xp6(1),t.Q6J("src","./assets/images/"+(n.settingsManager.settings.fhStyle?"fh/":"")+"loot.svg",t.LSH),t.xp6(1),t.Q6J("ngIf",!n.repair),t.xp6(3),t.Q6J("ngForOf",n.characters)}}function NJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.lumber||"-"),t.xp6(1),t.hij(" / ",n.costs.lumber,"")}}function JJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("lumber",i.fhSupportSpent,-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("lumber",i.fhSupportSpent,1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==n.fhSupportSpent.lumber)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",n.fhSupportSpent.lumber||"-"," / ",n.gameManager.game.party.loot.lumber||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!n.gameManager.game.party.loot.lumber||n.gameManager.game.party.loot.lumber==n.fhSupportSpent.lumber||n.spent.lumber==n.costs.lumber||n.repair&&n.paidResources==n.repair))}}function UJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function LJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("lumber",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("lumber",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].lumber)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].lumber||"-"," / ",i.progress.loot.lumber||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!i.progress.loot.lumber||i.progress.loot.lumber==s.characterSpent[e].lumber||s.spent.lumber==s.costs.lumber||s.repair&&s.paidResources==s.repair))}}function QJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function RJ(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,LJ,7,10,"ng-container",4),t.YNc(2,QJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.loot.lumber),t.xp6(1),t.Q6J("ngIf",!n.progress.loot.lumber)}}function FJ(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",19),t.YNc(3,NJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t.YNc(5,JJ,7,10,"ng-container",4),t.YNc(6,UJ,2,0,"span",4),t.qZA(),t.YNc(7,RJ,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(5,RO,!n.repair,n.spent.lumber,n.spent.lumber==n.costs.lumber||n.requiredResources-(n.discount?1:0)==n.paidResources)),t.xp6(2),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.party.loot.lumber),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.party.loot.lumber),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function qJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.metal||"-"),t.xp6(1),t.hij(" / ",n.costs.metal,"")}}function HJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("metal",i.fhSupportSpent,-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("metal",i.fhSupportSpent,1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==n.fhSupportSpent.metal)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",n.fhSupportSpent.metal||"-"," / ",n.gameManager.game.party.loot.metal||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!n.gameManager.game.party.loot.metal||n.gameManager.game.party.loot.metal==n.fhSupportSpent.metal||n.spent.metal==n.costs.metal||n.repair&&n.paidResources==n.repair))}}function jJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function BJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("metal",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("metal",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].metal)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].metal||"-"," / ",i.progress.loot.metal||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!i.progress.loot.metal||i.progress.loot.metal==s.characterSpent[e].metal||s.spent.metal==s.costs.metal||s.repair&&s.paidResources==s.repair))}}function zJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function GJ(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,BJ,7,10,"ng-container",4),t.YNc(2,zJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.loot.metal),t.xp6(1),t.Q6J("ngIf",!n.progress.loot.metal)}}function VJ(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",20),t.YNc(3,qJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t.YNc(5,HJ,7,10,"ng-container",4),t.YNc(6,jJ,2,0,"span",4),t.qZA(),t.YNc(7,GJ,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(5,RO,!n.repair,n.spent.metal,n.spent.metal==n.costs.metal||n.requiredResources-(n.discount?1:0)==n.paidResources)),t.xp6(2),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.party.loot.metal),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.party.loot.metal),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function YJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.hide||"-"),t.xp6(1),t.hij(" / ",n.costs.hide,"")}}function KJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("hide",i.fhSupportSpent,-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("hide",i.fhSupportSpent,1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==n.fhSupportSpent.hide)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",n.fhSupportSpent.hide||"-"," / ",n.gameManager.game.party.loot.hide||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!n.gameManager.game.party.loot.hide||n.gameManager.game.party.loot.hide==n.fhSupportSpent.hide||n.spent.hide==n.costs.hide||n.repair&&n.paidResources==n.repair))}}function $J(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function WJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("hide",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("hide",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].hide)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].hide||"-"," / ",i.progress.loot.hide||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!i.progress.loot.hide||i.progress.loot.hide==s.characterSpent[e].hide||s.spent.hide==s.costs.hide||s.repair&&s.paidResources==s.repair))}}function XJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function tU(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,WJ,7,10,"ng-container",4),t.YNc(2,XJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.loot.hide),t.xp6(1),t.Q6J("ngIf",!n.progress.loot.hide)}}function eU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",21),t.YNc(3,YJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t.YNc(5,KJ,7,10,"ng-container",4),t.YNc(6,$J,2,0,"span",4),t.qZA(),t.YNc(7,tU,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(5,RO,!n.repair,n.spent.hide,n.spent.hide==n.costs.hide||n.requiredResources-(n.discount?1:0)==n.paidResources)),t.xp6(2),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.party.loot.hide),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.party.loot.hide),t.xp6(1),t.Q6J("ngForOf",n.characters)}}const nU=function(o,a,n,e){return{first:o,costs:a,some:n,full:e}};function iU(o,a){if(1&o&&(t.TgZ(0,"div",42)(1,"span",43),t.YNc(2,wJ,4,2,"span",9),t.YNc(3,kJ,1,1,"span",44),t.qZA(),t.TgZ(4,"span",45),t._UZ(5,"span",3),t.qZA(),t.YNc(6,ZJ,4,5,"span",46),t.YNc(7,IJ,7,8,"ng-container",4),t.YNc(8,FJ,8,9,"ng-container",4),t.YNc(9,VJ,8,9,"ng-container",4),t.YNc(10,eU,8,9,"ng-container",4),t.qZA()),2&o){const n=t.oxw();t.Udp("--ghs-summary-columns",2+n.characters.length),t.xp6(1),t.Q6J("ngClass",t.l5B(11,nU,!n.repair,n.repair,n.paidResources,n.requiredResources-(n.discount?1:0)<=n.paidResources)),t.xp6(1),t.Q6J("ngIf",n.repair),t.xp6(1),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.costs.gold),t.xp6(1),t.Q6J("ngIf",n.costs.lumber),t.xp6(1),t.Q6J("ngIf",n.costs.metal),t.xp6(1),t.Q6J("ngIf",n.costs.hide)}}function oU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",58),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,sa,!n.force&&(n.requiredResources-(n.discount?1:0)>n.paidResources||n.costs.gold&&n.costs.gold>n.spent.gold||!1))),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.selectResources.confirm")}}const aU=function(o,a){return{fh:o,modern:a}};class th{constructor(a,n,e){(0,_.Z)(this,"characters",void 0),(0,_.Z)(this,"characterSpent",void 0),(0,_.Z)(this,"fhSupportSpent",void 0),this.characters=a,this.characterSpent=n,this.fhSupportSpent=e}}let FO=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"building",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"costs",void 0),(0,_.Z)(this,"requiredResources",void 0),(0,_.Z)(this,"paidResources",0),(0,_.Z)(this,"repair",void 0),(0,_.Z)(this,"force",void 0),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"characterSpent",[]),(0,_.Z)(this,"fhSupportSpent",{gold:0,hide:0,lumber:0,metal:0,prosperity:0}),(0,_.Z)(this,"spent",{gold:0,hide:0,lumber:0,metal:0,prosperity:0}),(0,_.Z)(this,"rewards",void 0),(0,_.Z)(this,"rewardsOnly",void 0),(0,_.Z)(this,"discount",void 0),this.data=e,this.dialogRef=i,this.dialog=s,this.repair=e.repair||0,this.requiredResources=this.repair,this.building=e.building,this.action=e.action,this.force=e.force||!1,this.rewardsOnly="rewards"==this.action,this.discount=null!=d.v.game.party.buildings.find(l=>"carpenter"==l.name&&l.level>0&&"wrecked"!=l.state)&&!this.repair,this.repair?this.costs={gold:0,hide:this.repair,lumber:this.repair,metal:this.repair,prosperity:0}:(this.costs=e.costs||{gold:0,hide:0,lumber:0,metal:0,prosperity:0},this.costs.gold=this.costs.gold||0,this.costs.hide=this.costs.hide||0,this.costs.lumber=this.costs.lumber||0,this.costs.metal=this.costs.metal||0,this.requiredResources=this.costs.hide+this.costs.lumber+this.costs.metal,this.fhSupportSpent.hide=this.costs.hide,this.fhSupportSpent.hide>(d.v.game.party.loot[le.CG.hide]||0)&&(this.fhSupportSpent.hide=d.v.game.party.loot[le.CG.hide]||0),this.spent[le.CG.hide]=this.fhSupportSpent.hide,this.paidResources+=this.fhSupportSpent.hide,this.fhSupportSpent.lumber=this.costs.lumber,this.fhSupportSpent.lumber>(d.v.game.party.loot[le.CG.lumber]||0)&&(this.fhSupportSpent.lumber=d.v.game.party.loot[le.CG.lumber]||0),this.spent[le.CG.lumber]=this.fhSupportSpent.lumber,this.paidResources+=this.fhSupportSpent.lumber,this.fhSupportSpent.metal=this.costs.metal,this.fhSupportSpent.metal>(d.v.game.party.loot[le.CG.metal]||0)&&(this.fhSupportSpent.metal=d.v.game.party.loot[le.CG.metal]||0),this.spent[le.CG.metal]=this.fhSupportSpent.metal,this.paidResources+=this.fhSupportSpent.metal,("build"==this.action||"upgrade"==this.action)&&this.building.data.rewards&&this.building.data.rewards[this.building.model.level]?this.rewards=this.building.data.rewards[this.building.model.level]:"rewards"==this.action&&this.building.data.rewards&&this.building.data.rewards[this.building.model.level-1]&&(this.rewards=this.building.data.rewards[this.building.model.level-1])),this.characters=d.v.game.figures.filter(l=>l instanceof oe.z).map(l=>l),this.characters.forEach((l,m)=>{this.characterSpent[m]={gold:0,hide:0,lumber:0,metal:0,prosperity:0}})}ngOnInit(){this.force&&!R.r.settings.applyBuildingRewards&&this.dialogRef.close(!0)}changeValue(e,i,s){i[e]+=s,this.spent[e]+=s,"gold"!=e&&"prosperity"!=e&&(this.paidResources+=s)}sectionRewards(e,i=""){const s=d.v.sectionData(i||d.v.currentEdition()).find(l=>l.index==e);if(this.rewardsOnly&&s){const l=d.v.buildingsManager.rewardSection(s),m=d.v.sectionData(s.edition).filter(O=>O.conclusion&&!O.parent&&O.parentSections&&O.parentSections.find(k=>1==k.length&&-1!=k.indexOf(s.index)));if(l||0==m.length){const O=new ei.$4(l||s);this.close(),this.dialog.open(uo,{panelClass:"dialog",data:{scenario:O,success:!0,conclusionOnly:!0,rewardsOnly:null!=l}})}else m.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:m,parent:s}}).closed.subscribe({next:O=>{O&&this.sectionRewards(O.index,O.edition)}})}}confirm(){this.force?this.dialogRef.close(!0):this.paidResources==this.requiredResources-(this.discount?1:0)&&(!this.costs.gold||this.costs.gold==this.spent.gold)&&this.dialogRef.close(new th(this.characters,this.characterSpent,this.fhSupportSpent))}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-buildings-upgrade-dialog"]],decls:18,vars:19,consts:[[1,"move-resources-dialog",3,"ngClass"],[1,"title"],[1,"name"],[3,"ghs-label"],[4,"ngIf"],[1,"building"],[1,"action",3,"src"],[3,"ghs-label","ghs-label-args"],["class","costs",3,"ngClass",4,"ngIf"],["class","costs",4,"ngIf"],["class","lose-morale",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","rewards",4,"ngIf"],["class","table",3,"--ghs-summary-columns",4,"ngIf"],[1,"menu"],[1,"cancel",3,"click"],["class","apply",3,"ngClass","click",4,"ngIf"],[1,"costs",3,"ngClass"],["class","cost",4,"ngIf"],[1,"cost"],["src","./assets/images/fh/loot/lumber.svg",1,"ghs-svg"],["src","./assets/images/fh/loot/metal.svg",1,"ghs-svg"],["src","./assets/images/fh/loot/hide.svg",1,"ghs-svg"],["src","./assets/images/fh/loot.svg",1,"ghs-svg"],["src","./assets/images/fh/loot/lumber.svg"],["src","./assets/images/fh/loot/metal.svg"],["src","./assets/images/fh/loot/hide.svg"],[1,"costs"],[1,"cost",3,"ghs-label"],[1,"lose-morale",3,"ghs-label","ghs-label-args"],[1,"rewards"],["class","text-white prosperity",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white defense",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white soldiers",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white plots",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white items",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white section",3,"ngClass","ghs-label","ghs-label-args","click",4,"ngIf"],[1,"text-white","prosperity",3,"ghs-label","ghs-label-args"],[1,"text-white","defense",3,"ghs-label","ghs-label-args"],[1,"text-white","soldiers",3,"ghs-label","ghs-label-args"],[1,"text-white","plots",3,"ghs-label","ghs-label-args"],[1,"text-white","items",3,"ghs-label","ghs-label-args"],[1,"text-white","section",3,"ngClass","ghs-label","ghs-label-args","click"],[1,"table"],[1,"head-col",3,"ngClass"],[3,"ghs-label",4,"ngIf"],[1,"first"],["class","first",4,"ngFor","ngForOf"],[1,"current"],[1,"icon","character-icon",3,"src"],[1,"name",3,"ngClass"],[1,"head-col","calc-col",3,"ngClass"],[1,"ghs-svg",3,"src"],[1,"calc-col"],["class","calc-col",4,"ngFor","ngForOf"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"value",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"apply",3,"ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1)(2,"span",2),t._UZ(3,"span",3),t.YNc(4,lJ,2,1,"span",4),t.qZA(),t.TgZ(5,"span",5),t._UZ(6,"img",6)(7,"span",7),t.qZA(),t.YNc(8,_J,5,7,"span",8),t.YNc(9,pJ,8,7,"span",8),t.YNc(10,fJ,2,1,"div",9),t.YNc(11,mJ,1,4,"span",10),t.YNc(12,xJ,7,6,"div",11),t.qZA(),t.YNc(13,iU,11,16,"div",12),t.TgZ(14,"div",13)(15,"a",14),t.NdJ("click",function(){return i.close()}),t._UZ(16,"span",3),t.qZA(),t.YNc(17,oU,2,4,"a",15),t.qZA()()),2&e&&(t.Q6J("ngClass",t.WLB(14,aU,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ghs-label","data.buildings."+i.building.data.name),t.xp6(1),t.Q6J("ngIf",i.building.data.id),t.xp6(2),t.Q6J("src","./assets/images/fh/buildings/"+i.action+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings."+i.action+".action")("ghs-label-args",t.VKq(17,hg,""+(i.building.model.level+(i.rewardsOnly?0:1)))),t.xp6(1),t.Q6J("ngIf",!i.repair&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",i.repair&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",i.discount&&!i.force),t.xp6(1),t.Q6J("ngIf",i.rewards&&i.rewards.loseMorale),t.xp6(1),t.Q6J("ngIf",i.rewards),t.xp6(1),t.Q6J("ngIf",(i.costs.gold||i.costs.hide||i.costs.lumber||i.costs.metal)&&!i.force&&!i.rewardsOnly),t.xp6(3),t.Q6J("ghs-label",i.rewardsOnly?"close":"cancel"),t.xp6(1),t.Q6J("ngIf",!i.rewardsOnly))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".move-resources-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em}.move-resources-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .building[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] img.action[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs.force[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{color:var(--ghs-color-gray);text-shadow:none;opacity:.5}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs.force[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .lose-morale[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));color:#000;text-shadow:none;padding:.1em 1em;margin-top:.5em;background:radial-gradient(ellipse at center,#98c2c0 0%,#4B9490 75%);clip-path:polygon(100% 0%,93% 50%,100% 100%,0 100%,7% 50%,0 0%)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor));margin-top:.5em;padding-top:.5em;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));border-top:.1em solid var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{cursor:pointer}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-summary-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-summary-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white);overflow:auto}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-image:url(dialog_background.fa4ff388462f6a00.png);position:sticky;left:0;z-index:1}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{white-space:nowrap}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.some[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.some[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.full[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.full[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:0 .15em;white-space:nowrap}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:0 .15em}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important;opacity:.6}.move-resources-dialog.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.move-resources-dialog.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();function sU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("(",n.data.id,")")}}function rU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",21),t._UZ(2,"img",22),t._uU(3),t.qZA(),t.TgZ(4,"span",21),t._UZ(5,"img",23),t._uU(6),t.qZA(),t.TgZ(7,"span",21),t._UZ(8,"img",24),t._uU(9),t.qZA(),t.TgZ(10,"span",21),t._UZ(11,"img",25),t._uU(12),t.qZA(),t.TgZ(13,"span",21),t._UZ(14,"img",26),t._uU(15),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",n.data.costs.prosperity||"-",""),t.xp6(3),t.hij(" ",n.data.costs.lumber||"-",""),t.xp6(3),t.hij(" ",n.data.costs.metal||"-",""),t.xp6(3),t.hij(" ",n.data.costs.hide||"-",""),t.xp6(3),t.hij(" ",n.data.costs.gold||"-","")}}function cU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",21),t._UZ(2,"img",22),t._uU(3),t.qZA(),t.TgZ(4,"span",21),t._UZ(5,"img",23),t._uU(6),t.qZA(),t.TgZ(7,"span",21),t._UZ(8,"img",24),t._uU(9),t.qZA(),t.TgZ(10,"span",21),t._UZ(11,"img",25),t._uU(12),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].prosperity||"-",""),t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].lumber||"-",""),t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].metal||"-",""),t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].hide||"-","")}}const lU=function(o){return[o]};function gU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",27),t._UZ(2,"span",28),t.TgZ(3,"span",21),t._UZ(4,"img",23),t.qZA(),t.TgZ(5,"span",21),t._UZ(6,"img",24),t.qZA(),t.TgZ(7,"span",21),t._UZ(8,"img",25),t.qZA()(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.repair.costs")("ghs-label-args",t.VKq(2,lU,""+n.data.repair[n.model.level-1]))}}function dU(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span"),t.TgZ(2,"span",21),t._UZ(3,"img",23),t._uU(4),t.qZA(),t.TgZ(5,"span",21),t._UZ(6,"img",24),t._uU(7),t.qZA(),t.TgZ(8,"span",21),t._UZ(9,"img",25),t._uU(10),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(4),t.hij(" ",n.data.rebuild[n.model.level-1].lumber||"-",""),t.xp6(3),t.hij(" ",n.data.rebuild[n.model.level-1].metal||"-",""),t.xp6(3),t.hij(" ",n.data.rebuild[n.model.level-1].hide||"-","")}}function hU(o,a){if(1&o&&(t.ynx(0),t.YNc(1,cU,13,4,"ng-container",17),t.YNc(2,gU,9,4,"ng-container",17),t.YNc(3,dU,11,3,"ng-container",17),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf","normal"==n.model.state&&n.model.level0?"upgrade.hint":"build.hint"))("originX","end")("originY","bottom")("overlayX","end"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings."+(n.model.level>0?"upgrade":"build")),t.xp6(1),t.Q6J("src","./assets/images/fh/buildings/"+(n.model.level>0?"upgrade":"build")+".svg",t.LSH)}}function _U(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",29),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.repair(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.repair(i,!0))}),t._UZ(1,"span",3)(2,"img",31),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(6,Xf,!e.upgradeable(n)))("ghs-tooltip","party.campaign.sheet.buildings.repair.hint")("originX","end")("originY","bottom")("overlayX","end"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.repair")}}function pU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",29),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.rebuild(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.rebuild(i,!0))}),t._UZ(1,"span",3)(2,"img",32),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(6,Xf,!e.upgradeable(n)))("ghs-tooltip","party.campaign.sheet.buildings.rebuild.hint")("originX","end")("originY","bottom")("overlayX","end"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.rebuild")}}const fU=function(o){return{buildable:o}};function mU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"span",16),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleState(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleState(s,!0))}),t._UZ(2,"span")(3,"span",3),t.qZA(),t.TgZ(4,"span",10),t.YNc(5,sU,2,1,"span",17),t.qZA(),t.TgZ(6,"span",18),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.rewardsDialog(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.downgrade(s))}),t._uU(7),t.qZA(),t.TgZ(8,"span",19),t.YNc(9,rU,16,5,"ng-container",17),t.YNc(10,hU,4,3,"ng-container",17),t.qZA(),t.TgZ(11,"span",13),t.YNc(12,uU,3,9,"span",20),t.YNc(13,_U,3,8,"span",20),t.YNc(14,pU,3,8,"span",20),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(16,fU,!n.model.level)),t.xp6(1),t.Q6J("ngClass",t.VKq(18,Xf,!n.model.level||!n.data.repair)),t.xp6(1),t.Gre("state ",n.model.state,""),t.xp6(1),t.Q6J("ghs-label","data.buildings."+n.model.name),t.xp6(2),t.Q6J("ngIf",n.data.id),t.xp6(1),t.Q6J("ghs-tooltip","party.campaign.sheet.buildings.level.hint")("originY","bottom"),t.xp6(1),t.Oqu(n.model.level||"-"),t.xp6(1),t.Q6J("ngClass",t.VKq(20,Xf,!e.upgradeable(n))),t.xp6(1),t.Q6J("ngIf",!n.model.level),t.xp6(1),t.Q6J("ngIf",n.model.level>0),t.xp6(2),t.Q6J("ngIf",(n.model.level{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"party",void 0),(0,_.Z)(this,"buildings",[]),this.dialog=e}ngOnInit(){this.updateBuildings(),d.v.uiChange.subscribe({next:()=>{this.party=d.v.game.party,this.updateBuildings()}})}updateBuildings(){this.buildings=[];const e=d.v.campaignData();e.buildings.filter(i=>this.initialBuilding(i)).forEach(i=>{this.party.buildings.find(s=>i.name==s.name)||(this.party.buildings.push(new Sw.Y(i.name,1)),i.rewards[0]&&d.v.buildingsManager.applyRewards(i.rewards[0]))}),e.buildings.filter(i=>i.prosperityUnlock&&i.costs.prosperity<=d.v.prosperityLevel()).forEach(i=>{this.party.buildings.find(s=>i.name==s.name)||(!i.requires||this.party.buildings.find(s=>s.name==i.requires))&&this.party.buildings.push(new Sw.Y(i.name,0))}),this.party.buildings.forEach(i=>{const s=e.buildings.find(l=>l.name==i.name);s&&this.buildings.push({model:i,data:s})}),this.buildings.sort((i,s)=>i.model.level&&!s.model.level?-1:!i.model.level&&s.model.level?1:i.data.id&&s.data.id?i.data.idm.name==i.toLowerCase().replaceAll(" ","-")||m.id==i||!isNaN(+m.id)&&!isNaN(+i)&&+m.id==+i);l&&!this.party.buildings.find(m=>m.name==l.name)&&(d.v.stateManager.before("addBuilding","data.buildings."+l.name),this.party.buildings.push(new Sw.Y(l.name,0)),this.updateBuildings(),e.value="",d.v.stateManager.after())}}upgradeable(e){if(e.data.manualUpgrades>0&&e.data.manualUpgrades>=e.model.level)return!0;let i=e.model.level?e.data.upgrades[e.model.level-1]:e.data.costs;if(e.model.level&&!e.data.repair)return!1;if(e.data.repair&&"damaged"==e.model.state){const l=e.data.repair[e.model.level-1];return this.partyResource(le.CG.lumber)+this.partyResource(le.CG.metal)+this.partyResource(le.CG.hide)>l}let s=null!=d.v.game.party.buildings.find(l=>"carpenter"==l.name&&l.level>0&&"wrecked"!=l.state);if("wrecked"==e.model.state){if(i=e.data.rebuild[e.model.level-1],i.lumber>this.partyResource(le.CG.lumber)){if(!s||i.lumber!=this.partyResource(le.CG.lumber)+1)return!1;s=!1}if(i.metal>this.partyResource(le.CG.metal)){if(!s||i.metal!=this.partyResource(le.CG.metal)+1)return!1;s=!1}if(i.hide>this.partyResource(le.CG.hide)){if(!s||i.hide!=this.partyResource(le.CG.hide)+1)return!1;s=!1}return!0}if(e.model.leveld.v.prosperityLevel())return!1;if((i.lumber||0)>this.partyResource(le.CG.lumber)){if(!s||i.lumber!=this.partyResource(le.CG.lumber)+1)return!1;s=!1}if((i.metal||0)>this.partyResource(le.CG.metal)){if(!s||i.metal!=this.partyResource(le.CG.metal)+1)return!1;s=!1}if((i.hide||0)>this.partyResource(le.CG.hide)){if(!s||i.hide!=this.partyResource(le.CG.hide)+1)return!1;s=!1}return!((i.gold||0)>d.v.game.figures.filter(l=>l instanceof oe.z).map(l=>l.progress.gold).reduce((l,m)=>l+m))}return!1}partyResource(e){return(this.party.loot[e]||0)+(0==d.v.game.figures.filter(i=>i instanceof oe.z).length?0:d.v.game.figures.filter(i=>i instanceof oe.z).map(i=>i.progress.loot[e]||0).reduce((i,s)=>i+s))}upgrade(e,i=!1){(e.model.level0?"upgrade":"build",force:i}}).closed.subscribe({next:l=>{if(i&&1==l||l instanceof th){if(d.v.stateManager.before(e.model.level?"upgradeBuilding":"buildBuilding","data.buildings."+e.model.name,""+(e.model.level+1)),!i&&l instanceof th&&this.applySelectResources(l),e.model.level++,R.r.settings.applyBuildingRewards&&e.data.rewards&&e.data.rewards[e.model.level-1]){const m=e.data.rewards[e.model.level-1];d.v.buildingsManager.applyRewards(m),m.section&&this.openConclusion(m.section)}d.v.stateManager.after()}}})}openConclusion(e){const i=d.v.sectionData(d.v.currentEdition()).find(s=>s.index==e);if(i){const s=new ei.$4(i);this.hasConclusions(s.index)?this.openConclusions(s.index):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:s,conclusionOnly:!0}})}}hasConclusions(e){const i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e)));return i.length>0&&i.every(s=>!d.v.game.party.conclusions.find(l=>l.edition==s.edition&&l.index==s.index&&l.group==s.group))}openConclusions(e){let i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e))).map(s=>s);i.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.sectionData(d.v.game.edition).find(s=>s.index==e&&!s.group)}}).closed.subscribe({next:s=>{if(s){const l=new ei.$4(s);this.openConclusion(l.index)}}})}rebuild(e,i=!1){"wrecked"==e.model.state&&(this.upgradeable(e)||i)&&this.dialog.open(FO,{panelClass:["dialog"],data:{costs:e.data.rebuild[e.model.level-1],building:e,action:"rebuild",force:i}}).closed.subscribe({next:s=>{(i&&1==s||s instanceof th)&&(d.v.stateManager.before("rebuildBuilding","data.buildings."+e.model.name),!i&&s instanceof th&&this.applySelectResources(s),e.model.state="normal",d.v.stateManager.after())}})}repair(e,i=!1){"damaged"==e.model.state&&(this.upgradeable(e)||i)&&this.dialog.open(FO,{panelClass:["dialog"],data:{repair:e.data.repair&&e.data.repair[e.model.level-1],building:e,action:"repair",force:i}}).closed.subscribe({next:s=>{(i&&1==s||s instanceof th)&&(d.v.stateManager.before("repairBuilding","data.buildings."+e.data.name),!i&&s instanceof th&&this.applySelectResources(s),e.model.state="normal",d.v.stateManager.after())}})}rewardsDialog(e){if(e.data.rewards&&e.data.rewards[e.model.level-1]){const i=e.data.rewards[e.model.level-1];(i.defense||i.items||i.loseMorale||i.plots||i.prosperity||i.section||i.soldiers)&&this.dialog.open(FO,{panelClass:["dialog"],data:{building:e,action:"rewards"}})}}applySelectResources(e){e.characters.forEach((i,s)=>{e.characterSpent[s].gold&&(i.progress.gold-=e.characterSpent[s].gold),e.characterSpent[s].hide&&(i.progress.loot[le.CG.hide]=(i.progress.loot[le.CG.hide]||0)-e.characterSpent[s].hide),e.characterSpent[s].lumber&&(i.progress.loot[le.CG.lumber]=(i.progress.loot[le.CG.lumber]||0)-e.characterSpent[s].lumber),e.characterSpent[s].metal&&(i.progress.loot[le.CG.metal]=(i.progress.loot[le.CG.metal]||0)-e.characterSpent[s].metal)}),e.fhSupportSpent.hide&&(d.v.game.party.loot[le.CG.hide]=(d.v.game.party.loot[le.CG.hide]||0)-e.fhSupportSpent.hide),e.fhSupportSpent.lumber&&(d.v.game.party.loot[le.CG.lumber]=(d.v.game.party.loot[le.CG.lumber]||0)-e.fhSupportSpent.lumber),e.fhSupportSpent.metal&&(d.v.game.party.loot[le.CG.metal]=(d.v.game.party.loot[le.CG.metal]||0)-e.fhSupportSpent.metal)}toggleState(e,i=!1){e.data.repair&&e.model.level>0&&("normal"==e.model.state?(d.v.stateManager.before("changeBuildingState",e.model.name,"damaged"),e.model.state="damaged",d.v.stateManager.after()):"damaged"==e.model.state?(d.v.stateManager.before("changeBuildingState",e.model.name,"wrecked"),e.model.state="wrecked",d.v.stateManager.after()):i&&"wrecked"==e.model.state&&(d.v.stateManager.before("changeBuildingState",e.model.name,"normal"),e.model.state="normal",d.v.stateManager.after()))}downgrade(e,i=!1){const s=this.party.buildings.indexOf(e.model);if(-1!=s){if(this.initialBuilding(e.data)||0!=e.model.level&&!i){if(!this.initialBuilding(e.data)||e.model.level>1){if(d.v.stateManager.before("downgradeBuilding",e.model.name,""+(e.model.level-1)),e.model.level--,this.party.campaignMode&&e.data.rewards&&e.data.rewards[e.model.level]&&e.data.rewards[e.model.level].section){const l=d.v.sectionData(d.v.currentEdition()).find(m=>m.index==e.data.rewards[e.model.level].section);if(l){const m=d.v.buildingsManager.rewardSection(l);m&&(this.party.conclusions=this.party.conclusions.filter(O=>O.edition!=m.edition||O.group!=m.group||O.index!=m.index))}}d.v.stateManager.after()}}else{if(d.v.stateManager.before("removeBuilding","data.buildings."+e.model.name),this.party.buildings.splice(s,1),this.party.campaignMode&&e.data.rewards&&e.data.rewards[0]&&e.data.rewards[0].section){const l=d.v.sectionData(d.v.currentEdition()).find(m=>m.index==e.data.rewards[0].section);if(l){const m=d.v.buildingsManager.rewardSection(l);m&&(this.party.conclusions=this.party.conclusions.filter(O=>O.edition!=m.edition||O.group!=m.group||O.index!=m.index))}}d.v.stateManager.after()}this.updateBuildings()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-buildings"]],inputs:{party:"party"},decls:21,vars:9,consts:[[1,"buildings-container"],[1,"header",3,"submit"],["src","./assets/images/fh/buildings/build.svg"],[3,"ghs-label"],["type","text",3,"ghs-label","ghs-label-attribute"],["building",""],["src","./assets/images/plus.svg",3,"click"],[1,"buildings"],[1,"building","head"],[1,"name"],[1,"id"],[1,"level"],[1,"costs"],[1,"action"],["class","building",3,"ngClass",4,"ngFor","ngForOf"],[1,"building",3,"ngClass"],["ghs-pointer-input","",1,"name",3,"ngClass","singleClick","doubleClick"],[4,"ngIf"],["ghs-pointer-input","",1,"level",3,"ghs-tooltip","originY","singleClick","doubleClick"],[1,"costs",3,"ngClass"],["class","button upgrade","ghs-pointer-input","",3,"ngClass","ghs-tooltip","originX","originY","overlayX","singleClick","doubleClick",4,"ngIf"],[1,"cost"],["src","./assets/images/fh/buildings/prosperity.svg"],["src","./assets/images/fh/loot/lumber.svg"],["src","./assets/images/fh/loot/metal.svg"],["src","./assets/images/fh/loot/hide.svg"],["src","./assets/images/fh/loot.svg"],[1,"repair"],[3,"ghs-label","ghs-label-args"],["ghs-pointer-input","",1,"button","upgrade",3,"ngClass","ghs-tooltip","originX","originY","overlayX","singleClick","doubleClick"],[3,"src"],["src","./assets/images/fh/buildings/repair.svg"],["src","./assets/images/fh/buildings/rebuild.svg"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"form",1),t.NdJ("submit",function(){t.CHM(s);const m=t.MAs(6);return t.KtG(i.unlockBuilding(m))}),t.TgZ(2,"label"),t._UZ(3,"img",2)(4,"span",3),t.qZA(),t._UZ(5,"input",4,5),t.TgZ(7,"img",6),t.NdJ("click",function(){t.CHM(s);const m=t.MAs(6);return t.KtG(i.unlockBuilding(m))}),t.qZA()(),t.TgZ(8,"div",7)(9,"div",8)(10,"span",9),t._UZ(11,"span",3),t.qZA(),t.TgZ(12,"span",10),t._UZ(13,"span",3),t.qZA(),t.TgZ(14,"span",11),t._UZ(15,"span",3),t.qZA(),t.TgZ(16,"span",12),t._UZ(17,"span",3),t.qZA(),t.TgZ(18,"span",13),t._UZ(19,"span",3),t.qZA()(),t.YNc(20,mU,15,22,"div",14),t.qZA()()}2&e&&(t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.buildings"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.unlock")("ghs-label-attribute","placeholder"),t.xp6(6),t.Q6J("ghs-label","party.campaign.sheet.buildings.name"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.id"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.level"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.costs"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.action"),t.xp6(1),t.Q6J("ngForOf",i.buildings))},dependencies:[x.mk,x.sg,x.O5,Al,wl,Dr,ie,An,Ba],styles:['.buildings-container[_ngcontent-%COMP%]{flex-direction:column;display:flex}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:.8em;width:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;height:1.2em;width:auto}.buildings-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:0;min-width:initial;max-width:initial;margin:0;color:var(--ghs-color-black);background-color:var(--form-background);border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));flex-grow:1;margin-left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;overflow-y:auto;margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:30% 10% 10% 25% 25%;align-items:center;margin:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) 0}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.buildable[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 2);border-top:solid calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.buildable[_ngcontent-%COMP%] ~ .buildable[_ngcontent-%COMP%]{margin-top:0;border-top:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%]:nth-child(odd):before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-gray);opacity:.35;z-index:-1}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;padding:0 .2em}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{width:0;height:1em;background-size:auto 90%;background-repeat:no-repeat;background-position:center center;display:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .state.normal[_ngcontent-%COMP%]{width:1em;background-image:url(damaged.4f5e0cf68a1b64dd.svg)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .state.damaged[_ngcontent-%COMP%]{width:1em;background-image:url(wrecked.a5fd49fad8c36290.svg)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover{opacity:.7}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover .state[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name.disabled[_ngcontent-%COMP%]{pointer-events:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .id[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{opacity:.7}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .level.disabled[_ngcontent-%COMP%]{pointer-events:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%]{display:grid;justify-content:end;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor)))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{display:flex;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:.9em;width:auto;margin:0 calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .repair[_ngcontent-%COMP%]{grid-column:span 5;display:flex;align-items:center;justify-content:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .repair[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:0 calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs.disabled[_ngcontent-%COMP%]{opacity:.7;color:var(--ghs-color-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs.disabled[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade[_ngcontent-%COMP%]:hover{opacity:.7}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade.disabled[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%]{border-bottom:solid calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{pointer-events:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-right:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%]:before{opacity:.1}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-red)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.5}']})),a})();var n_=E(2501);function CU(o,a){1&o&&t._UZ(0,"span",4),2&o&&t.Q6J("ghs-label","and")}function MU(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",2),t.YNc(2,CU,1,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label",n.perk.custom),t.xp6(1),t.Q6J("ngIf",n.perk.type!=n.PerkType.custom)}}function OU(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",5),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.attackModifiers.perks.type."+n.perk.type)("ghs-label-args",n.perkLabel(n.perk))}}let rT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"perk",void 0),(0,_.Z)(this,"PerkType",n_.Ib)}perkLabel(e){let i=[],s=[];if(e.cards){if(e.cards.forEach(l=>{s.push(R.r.getLabel("game.attackModifiers.perks.cardLabel",["game.attackModifiers.perks.cards."+l.count,this.attackModifierHtml(l.attackModifier),l.count>1?"game.attackModifiers.perks.cards":"game.attackModifiers.perks.card"]))}),e.type==n_.Ib.replace){const l=d.v.attackModifierManager.replaceCount(e);if(1==l&&2==s.length)i=s;else{if(l>1){let m="";for(let O=l-1;O>=0;O--)m=m?R.r.getLabel("game.attackModifiers.perks.additional",[s[O],m]):s[O];i.push(m)}else i.push(s[0]);if(s.length-l==1)i.push(s[l]);else{let m="";for(let O=s.length;O>=l;O--)m=m?R.r.getLabel("game.attackModifiers.perks.additional",[s[O],m]):s[O];i.push(m)}}}s.length<2?i=s:s.forEach((l,m,O)=>{m%2==0&&m-'+e.value+"":e.valueType==Lt.tI.multiply?''+e.value+"x":e.type==Lt.kl.plusX?'+X':'+'+e.value+""),e.effects&&(e.effects.length>1&&(i+='"'),e.effects.forEach((s,l)=>{l>0&&(i+=","),i+=this.attackModifierEffectHtml(s,e.effects.length>1)}),e.effects.length>1&&(i+='"')),R.r.settings.fhStyle&&e.rolling&&(i+=''),i+="",i}attackModifierEffectHtml(e,i=!1){let s="",l=!1;switch(e.type){case Lt.US.condition:let m=e.value.split(":")[0];m=m.replace("_x",""),s+=''+(R.r.settings.fhStyle?"":R.r.getLabel("game.condition."+m))+'',e.value.split(":").length>1&&(s+=e.value.split(":")[1]),s+="";break;case Lt.US.element:s+='';break;case Lt.US.elementHalf:const O=e.value.split("|");s+='';break;case Lt.US.elementConsume:return s+='',e.effects&&(s+=":",e.effects.forEach(k=>{s+=this.attackModifierEffectHtml(k,!0)})),i?s:'"'+s+'"';case Lt.US.target:s+=R.r.settings.fhStyle?'+'+e.value+'':''+R.r.getLabel(+e.value<=1?"game.custom.perks.addTarget":"game.custom.perks.addTargets",[e.value+""])+'';break;case Lt.US.specialTarget:e.value.split(":").length>1?s+=''+R.r.getLabel("game.specialTarget."+e.value.split(":")[0],e.value.split(":").slice(1))+"":s+=R.r.settings.fhStyle&&"allyShort"==e.value?''+R.r.getLabel("game.specialTarget.ally")+"":''+R.r.getLabel("game.specialTarget."+e.value)+"";break;case Lt.US.refreshItem:s+=''+R.r.getLabel("game.attackModifiers.perks.effects."+e.type+(R.r.settings.fhStyle?"Fh":""))+"";break;case Lt.US.refreshSpentItem:case Lt.US.recoverRandomDiscard:s+=''+R.r.getLabel("game.attackModifiers.perks.effects."+e.type)+"";break;case Lt.US.custom:s+=e.hint?''+R.r.getLabel(e.hint)+"":''+R.r.getLabel(""+e.value)+"",l=!0;break;case Lt.US.or:return e.effects&&e.effects.forEach((k,W)=>{s+=this.attackModifierEffectHtml(k,!0),W":e.value.startsWith("minus")?s+='-'+e.value.replace("minus","")+"":e.value.startsWith("multiply")&&(s+='x'+e.value.replace("multiply","")+""),e.effects&&e.effects.forEach(k=>{s+=this.attackModifierEffectHtml(k)}),s;default:s+=''+(R.r.settings.fhStyle?"":R.r.getLabel("game.action."+e.type))+''+e.value+"",-1==[Lt.US.pull,Lt.US.push,Lt.US.swing,Lt.US.pierce].indexOf(e.type)&&(l=!0)}return e.effects&&(l=!0,e.effects.forEach(m=>{s+=","+this.attackModifierEffectHtml(m,!0)})),l&&!i&&(s='"'+s+'"'),s}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-perk-label"]],inputs:{perk:"perk"},decls:3,vars:2,consts:[[1,"perk-label","capitalize"],[4,"ngIf"],[3,"ghs-label"],["class","and",3,"ghs-label",4,"ngIf"],[1,"and",3,"ghs-label"],[1,"label",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.TgZ(0,"span",0),t.YNc(1,MU,3,2,"ng-container",1),t.YNc(2,OU,2,2,"ng-container",1),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.perk.custom),t.xp6(1),t.Q6J("ngIf",i.perk.type!=i.PerkType.custom))},dependencies:[x.O5,ie],styles:['.perk-label{display:inline-block;line-height:1em}.perk-label:first-letter{text-transform:uppercase}.perk-label .and{margin:0 calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-container{white-space:nowrap}.perk-label .attack-modifier-container *{white-space:initial}.perk-label .attack-modifier-effect{position:relative;margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect img.action-icon{position:relative;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor));width:auto;vertical-align:middle}.perk-label .attack-modifier-effect img.action-icon.sw{filter:invert(1) contrast(1) grayscale(1) brightness(2.5);filter:none}.perk-label .attack-modifier-effect img.action-icon.circled{border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:100%}.perk-label .attack-modifier-effect.rolling img.action-icon,.perk-label .attack-modifier-effect.condition img.action-icon,.perk-label .attack-modifier-effect.target img.action-icon,.perk-label .attack-modifier-effect.pierce img.action-icon,.perk-label .attack-modifier-effect.pull img.action-icon,.perk-label .attack-modifier-effect.push img.action-icon,.perk-label .attack-modifier-effect.element img.action-icon,.perk-label .attack-modifier-effect.element-half img.action-icon{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect .value{margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect.condition,.perk-label .attack-modifier-effect.target,.perk-label .attack-modifier-effect.pierce{text-transform:uppercase}.perk-label .attack-modifier-effect.element img{margin:0}.perk-label .attack-modifier-effect.element-half-placeholder{display:inline-block;position:relative;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:0}.perk-label .attack-modifier-effect.element-half-placeholder .element-half-container{position:absolute;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -1.6 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect.element-half-placeholder.fh{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect.element-half-placeholder.fh .element-half-container{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -2.5 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect .placeholder-action{vertical-align:middle}.perk-label .attack-modifier-icon{position:relative;display:inline-flex;justify-content:center;align-items:center;font-family:ghs-title;font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));vertical-align:middle}.perk-label .attack-modifier-icon.small{font-size:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-icon:before{content:" ";position:absolute;left:0;top:calc(var(--ghs-unit) * -.15 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:100%}\n'],encapsulation:2})),a})();const PU=["itemIndex"],yU=["treasureIndex"];function bU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.name)}}function xU(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t._uU(2),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","party.campaign"),t.xp6(1),t.hij("\xa0",n.id,"")}}function wU(o,a){if(1&o&&(t.TgZ(0,"option",47),t.YNc(1,bU,2,1,"span",20),t.YNc(2,xU,3,2,"span",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.s9C("value",n.id),t.Q6J("selected",n.id==e.party.id)("disabled",n.id==e.party.id),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(1),t.Q6J("ngIf",!n.name)}}function kU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",45),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.selectParty(i))}),t.YNc(1,wU,3,5,"option",46),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.change")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngForOf",n.gameManager.game.parties)}}function TU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",48),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openMap())}),t._UZ(1,"img",49)(2,"span",13),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.map"))}function ZU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.removeParty())}),t.qZA()}2&o&&t.Q6J("ghs-label","party.remove")("ghs-label-attribute","title")}function AU(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,ZU,1,2,"img",50),t._UZ(2,"span",16),t.TgZ(3,"img",51),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.newParty())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1),t.xp6(2),t.Q6J("ghs-label","party.new")("ghs-label-attribute","title")}}function SU(o,a){1&o&&(t.ynx(0),t.TgZ(1,"div",53),t._UZ(2,"img",54),t.TgZ(3,"span",55)(4,"span",56),t._UZ(5,"span",13),t.qZA()()(),t.BQk()),2&o&&(t.xp6(5),t.Q6J("ghs-label","party.new.hint"))}function EU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",n.split(":")[1],"x\xa0 ")}}function DU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t.YNc(1,EU,2,1,"span",20),t._UZ(2,"span",13)(3,"span",16),t.TgZ(4,"span",58),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.removeAchievement(s))}),t._UZ(5,"img",59),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.split(":").length>0&&"1"!=n.split(":")[1]),t.xp6(1),t.Q6J("ghs-label","data.partyAchievements."+n.split(":")[0])}}const i_=function(o){return{checked:o}};function IU(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",60),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setReputation(40-s-20))}),t.qZA(),t.TgZ(2,"span",61),t._uU(3),t.ALo(4,"ghsValueSign"),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(4,i_,e.party.reputation==40-n-20)),t.xp6(2),t.Oqu(t.lcZ(4,2,40-n-20))}}function NU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,-5+n))}}function JU(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","party.shop.none"))}const cT=function(o){return{active:o}};function UU(o,a){if(1&o&&(t.TgZ(0,"div",62),t.YNc(1,NU,3,3,"span",20),t.YNc(2,JU,2,1,"span",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(3,cT,e.priceModifier==-5+n)),t.xp6(1),t.Q6J("ngIf",5!=n),t.xp6(1),t.Q6J("ngIf",5==n)}}const lT=function(o){return{"fh-sheet":o}},ar=function(){return[]};function LU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.campaign=!0)}),t._UZ(5,"img",12)(6,"span",13),t.qZA(),t.TgZ(7,"label",14),t._UZ(8,"span",13),t.qZA(),t.YNc(9,kU,2,3,"select",15),t._UZ(10,"span",16),t.YNc(11,TU,3,1,"span",17),t.qZA(),t.TgZ(12,"div",18)(13,"label"),t._UZ(14,"span",13),t._uU(15,":"),t.qZA(),t.TgZ(16,"input",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setName(i))}),t.qZA(),t.YNc(17,AU,4,3,"ng-container",20),t.YNc(18,SU,6,1,"ng-container",20),t.qZA(),t.TgZ(19,"div",21)(20,"label"),t._UZ(21,"span",13),t._uU(22,":"),t.qZA(),t.TgZ(23,"input",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setLocation(i))}),t.qZA()(),t.TgZ(24,"div",22)(25,"label"),t._UZ(26,"span",13),t._uU(27,":"),t.qZA(),t.TgZ(28,"textarea",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setNotes(i))}),t.qZA()(),t.TgZ(29,"div",23)(30,"label"),t._UZ(31,"span",13),t._uU(32,":"),t.qZA(),t.TgZ(33,"div",24)(34,"div",25),t.YNc(35,DU,6,2,"div",26),t.qZA(),t.TgZ(36,"div",27)(37,"input",28,29),t.NdJ("keyup.enter",function(){t.CHM(n);const i=t.MAs(38),s=t.oxw();return t.KtG(s.addAchievement(i))}),t.qZA(),t.TgZ(39,"a",30),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(38),s=t.oxw();return t.KtG(s.addAchievement(i))}),t._UZ(40,"img",31),t.qZA()()()()(),t.TgZ(41,"div",32)(42,"div",8)(43,"div",33)(44,"label"),t._UZ(45,"span",13),t.qZA(),t.TgZ(46,"div",34),t.YNc(47,IU,5,6,"ng-container",35),t.ALo(48,"ghsRange"),t.qZA()(),t.TgZ(49,"div",36)(50,"label"),t._UZ(51,"span",13),t.qZA(),t.TgZ(52,"div",37),t.YNc(53,UU,3,5,"div",38),t.ALo(54,"ghsRange"),t.qZA()()(),t.TgZ(55,"div",39)(56,"label",40),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.exportParty())}),t._UZ(57,"img",41),t.TgZ(58,"span"),t._UZ(59,"span",13),t.qZA()(),t.TgZ(60,"label",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.ghsInputFullScreenCheck())}),t.TgZ(61,"input",43),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.importParty(i))}),t.qZA(),t._UZ(62,"img",44),t.TgZ(63,"span"),t._UZ(64,"span",13),t.qZA()()()()()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(44,lT,n.fhSheet)),t.xp6(6),t.Q6J("ghs-label","party.campaign"),t.xp6(2),t.Q6J("ghs-label","party.sheet"),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1&&!n.gameManager.game.scenario),t.xp6(2),t.Q6J("ngIf",n.worldMap),t.xp6(3),t.Q6J("ghs-label","party.name"),t.xp6(2),t.Q6J("value",n.party.name)("ghs-label","party.name")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario),t.xp6(3),t.Q6J("ghs-label","party.location"),t.xp6(2),t.Q6J("value",n.party.location)("ghs-label","party.location")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.notes"),t.xp6(2),t.Q6J("value",n.party.notes)("ghs-label","party.notes")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.achievements"),t.xp6(4),t.Q6J("ngForOf",n.partyAchievementsList),t.xp6(2),t.Q6J("autocomplete",n.partyAchievements)("spoiler",!0)("emptyLabel","party.addPartyAchievement.empty")("ghs-label","party.addPartyAchievement")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.addPartyAchievement")("ghs-label-attribute","title"),t.xp6(6),t.Q6J("ghs-label","party.reputation"),t.xp6(2),t.Q6J("ngForOf",t.xi3(48,38,t.DdM(46,ar),41)),t.xp6(4),t.Q6J("ghs-label","party.shop"),t.xp6(2),t.Q6J("ngForOf",t.xi3(54,41,t.DdM(47,ar),11)),t.xp6(3),t.Q6J("ghs-label","party.export")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","party.export"),t.xp6(1),t.Q6J("ghs-label","party.import")("ghs-label-attribute","title"),t.xp6(4),t.Q6J("ghs-label","party.import")}}function QU(o,a){if(1&o&&(t.TgZ(0,"div",131),t._UZ(1,"img",132),t._uU(2),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src","./assets/images/"+(e.hasConclusions(n)?"hint.svg":e.isConclusion(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," ")}}function RU(o,a){if(1&o&&(t.TgZ(0,"div",133),t._UZ(1,"img",132),t._uU(2),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src","./assets/images/"+(e.hasConclusions(n)?"hint.svg":e.isConclusion(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," ")}}const FU=function(o,a){return{checked:o,section:a}};function qU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",128),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.setWeek(s+1+80*l.calendarSheet))})("doubleClick",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.setWeekSection(s+1+80*l.calendarSheet))}),t.YNc(1,QU,3,2,"div",129),t.YNc(2,RU,3,2,"div",130),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("ghs-tooltip","party.campaign.sheet.weekSections.hint")("ngClass",t.WLB(4,FU,i.party.weeks>e+80*i.calendarSheet,i.sectionsForWeekFixed(n+80*i.calendarSheet).length>0||i.sectionsForWeek(n+80*i.calendarSheet).length>0)),t.xp6(1),t.Q6J("ngForOf",i.sectionsForWeekFixed(n+80*i.calendarSheet)),t.xp6(1),t.Q6J("ngForOf",i.sectionsForWeek(n+80*i.calendarSheet))}}function HU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",134),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setWeek(i.party.weeks+1))}),t._UZ(1,"span",13)(2,"img",135),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.nextWeek"))}function jU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.removeParty())}),t.qZA()}2&o&&t.Q6J("ghs-label","party.remove")("ghs-label-attribute","title")}function BU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.name)}}function zU(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t._uU(2),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","party.campaign"),t.xp6(1),t.hij("\xa0",n.id,"")}}function GU(o,a){if(1&o&&(t.TgZ(0,"option",47),t.YNc(1,BU,2,1,"span",20),t.YNc(2,zU,3,2,"span",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(4);t.s9C("value",n.id),t.Q6J("selected",n.id==e.party.id)("disabled",n.id==e.party.id),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(1),t.Q6J("ngIf",!n.name)}}function VU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",45),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.selectParty(i))}),t.YNc(1,GU,3,5,"option",46),t.qZA()}if(2&o){const n=t.oxw(3);t.Q6J("ghs-label","party.change")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngForOf",n.gameManager.game.parties)}}function YU(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,jU,1,2,"img",50),t.YNc(2,VU,2,3,"select",15),t.TgZ(3,"img",51),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.newParty())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1&&!n.gameManager.game.scenario),t.xp6(1),t.Q6J("ghs-label","party.new")("ghs-label-attribute","title")}}function KU(o,a){1&o&&(t.ynx(0),t.TgZ(1,"div",53),t._UZ(2,"img",54),t.TgZ(3,"span",55)(4,"span",56),t._UZ(5,"span",13),t.qZA()()(),t.BQk()),2&o&&(t.xp6(5),t.Q6J("ghs-label","party.new.hint"))}function $U(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",139),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.moveResources(s))}),t._UZ(1,"img",132),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH)}}function WU(o,a){if(1&o&&(t.TgZ(0,"div",136)(1,"span",137),t._UZ(2,"span",13),t._uU(3,":"),t.qZA(),t.YNc(4,$U,2,1,"span",138),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","character.progress.resources.move"),t.xp6(2),t.Q6J("ngForOf",n.characters)}}function XU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",143),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw().$implicit,m=t.oxw(2);return t.KtG(m.setSoldiers(s+(l>0?2+2*l:0)+1))}),t._UZ(1,"img",144)(2,"div",145),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(1,i_,n+(e>0?2+2*e:0)0?2:4))}}function eL(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",60),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setMorale(20-s))}),t.TgZ(2,"span",61),t._uU(3),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(2,i_,e.party.morale==20-n)),t.xp6(2),t.Oqu(20-n)}}function nL(o,a){1&o&&t._UZ(0,"img",146)}function iL(o,a){1&o&&t._UZ(0,"img",146)}function oL(o,a){1&o&&(t.TgZ(0,"span",149),t._UZ(1,"img",150),t._uU(2,":"),t.qZA())}function aL(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,oL,3,0,"span",147),t.TgZ(2,"span",148),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setTownGuardPerks(s+1))}),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n%3==0),t.xp6(1),t.Q6J("ngClass",t.VKq(2,i_,e.party.townGuardPerks>=n+1))}}const sL=function(o,a){return{checked:o,disabled:a}};function rL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",155),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.toggleTownGuardPerkSection(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.toggleTownGuardPerkSection(s,!0))}),t.ALo(1,"ghsFloor"),t._UZ(2,"img",112),t._uU(3),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.WLB(4,sL,-1!=e.party.townGuardPerkSections.indexOf(n),-1==e.party.townGuardPerkSections.indexOf(n)&&e.party.townGuardPerkSections.length>=t.lcZ(1,2,e.party.townGuardPerks/3))),t.xp6(3),t.hij(" ",n," ")}}function cL(o,a){if(1&o&&(t.TgZ(0,"div",151)(1,"div",152),t.YNc(2,rL,4,7,"div",153),t.qZA(),t._UZ(3,"ghs-perk-label",154),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ngForOf",n.sections),t.xp6(1),t.Q6J("perk",n.perk)}}function lL(o,a){1&o&&(t.TgZ(0,"div",156),t._UZ(1,"img",157)(2,"span",13),t.qZA()),2&o&&(t.Q6J("ghs-label","game.attackModifiers.perks.warning")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ghs-label","game.attackModifiers.perks.warning"))}function gL(o,a){if(1&o&&(t.TgZ(0,"span",56),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n)}}function dL(o,a){if(1&o&&t._UZ(0,"img",162),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw(2);t.Q6J("src",s.campaignStickerImage(e,i),t.LSH)("title",e)}}function hL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",158),t.YNc(1,gL,2,1,"span",159),t.YNc(2,dL,1,2,"img",160),t.TgZ(3,"img",161),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeCampaignSticker(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!i.campaignStickerImage(n,e)),t.xp6(1),t.Q6J("ngIf",i.campaignStickerImage(n,e))}}const uL=function(o,a){return{collapsed:o,full:a}};function _L(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",163)(1,"div",164)(2,"ghs-attackmodifier-deck",165),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.beforeTownGuardDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.afterTownGuardDeck(i))}),t.qZA(),t.TgZ(3,"div",166),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleTownGuardDeck())}),t._UZ(4,"span",167),t.qZA()()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(4,cT,n.townGuardDeck.active)),t.xp6(1),t.Q6J("ngClass",t.WLB(6,uL,!n.townGuardDeck.active,n.townGuardDeck.active)),t.xp6(1),t.Q6J("deck",n.townGuardDeck)("townGuard",!0)}}const Vr=function(o){return{highlight:o}};function pL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",63)(1,"div",64)(2,"label",65),t._UZ(3,"img",66)(4,"span",13),t.qZA(),t.TgZ(5,"label",67),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.campaign=!0)}),t._UZ(6,"span",13),t.TgZ(7,"span",68),t._UZ(8,"img",12)(9,"span",13),t.qZA()(),t.TgZ(10,"label",69),t._UZ(11,"span",13)(12,"img",70),t.qZA()(),t.TgZ(13,"div",71),t.YNc(14,qU,3,7,"div",72),t.ALo(15,"ghsRange"),t.YNc(16,HU,3,1,"span",73),t.qZA(),t.TgZ(17,"div",74)(18,"label"),t._UZ(19,"span",13),t._uU(20,":"),t.qZA(),t.TgZ(21,"input",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setName(i))}),t.qZA(),t.YNc(22,YU,4,4,"ng-container",20),t.YNc(23,KU,6,1,"ng-container",20),t.qZA(),t.TgZ(24,"div",75)(25,"div",76)(26,"label",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openResources())}),t._UZ(27,"span",13),t._uU(28,":"),t.qZA(),t._UZ(29,"span",16),t.YNc(30,WU,5,2,"div",78),t.qZA(),t.TgZ(31,"div",79)(32,"div",80)(33,"div",81),t._UZ(34,"img",82),t.TgZ(35,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.lumber,i))}),t.qZA()(),t.TgZ(36,"div",84),t._UZ(37,"img",85),t.TgZ(38,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.metal,i))}),t.qZA()(),t.TgZ(39,"div",86),t._UZ(40,"img",87),t.TgZ(41,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.hide,i))}),t.qZA()()(),t.TgZ(42,"div",88)(43,"div",89),t._UZ(44,"img",90),t.TgZ(45,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.arrowvine,i))}),t.qZA()(),t.TgZ(46,"div",91),t._UZ(47,"img",92),t.TgZ(48,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.axenut,i))}),t.qZA()(),t.TgZ(49,"div",93),t._UZ(50,"img",94),t.TgZ(51,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.corpsecap,i))}),t.qZA()(),t.TgZ(52,"div",95),t._UZ(53,"img",96),t.TgZ(54,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.flamefruit,i))}),t.qZA()(),t.TgZ(55,"div",97),t._UZ(56,"img",98),t.TgZ(57,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.rockroot,i))}),t.qZA()(),t.TgZ(58,"div",99),t._UZ(59,"img",100),t.TgZ(60,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.snowthistle,i))}),t.qZA()()()()(),t.TgZ(61,"div",101)(62,"label"),t._UZ(63,"span",13),t._uU(64,":"),t.qZA(),t.TgZ(65,"input",102),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setInspiration(i))}),t.qZA()(),t.TgZ(66,"div",103)(67,"label"),t._UZ(68,"span",13),t._uU(69,":"),t.qZA(),t.TgZ(70,"input",102),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setTotalDefense(i))}),t.qZA()(),t.TgZ(71,"div",104)(72,"label"),t._UZ(73,"span",13),t._uU(74,":"),t.qZA(),t.TgZ(75,"div",105),t.YNc(76,tL,9,7,"div",106),t.ALo(77,"ghsRange"),t.qZA()(),t.TgZ(78,"div",107)(79,"label"),t._UZ(80,"span",13),t.qZA(),t.TgZ(81,"div",108),t.YNc(82,eL,4,4,"ng-container",35),t.ALo(83,"ghsRange"),t.qZA()(),t.TgZ(84,"div",109)(85,"label"),t._UZ(86,"span",13),t.qZA(),t.TgZ(87,"div",110)(88,"span",111),t._UZ(89,"img",112),t._uU(90),t.YNc(91,nL,1,0,"img",113),t.qZA(),t.TgZ(92,"span",62),t._uU(93,"+15"),t.qZA(),t.TgZ(94,"span",62),t._uU(95,"+10"),t.qZA(),t.TgZ(96,"span",62),t._uU(97,"+5"),t.qZA(),t.TgZ(98,"span",62),t._uU(99,"0"),t.qZA(),t.TgZ(100,"span",62),t._uU(101,"-5"),t.qZA(),t.TgZ(102,"span",62),t._uU(103,"-10"),t.qZA(),t.TgZ(104,"span",111),t._UZ(105,"img",112),t._uU(106),t.YNc(107,iL,1,0,"img",113),t.qZA()()(),t.TgZ(108,"div",114)(109,"label"),t._UZ(110,"span",13),t.qZA(),t.TgZ(111,"div",115),t.YNc(112,aL,3,4,"ng-container",35),t.ALo(113,"ghsRange"),t.qZA(),t.TgZ(114,"div",116),t.YNc(115,cL,4,2,"div",117),t.qZA(),t.YNc(116,lL,3,3,"div",118),t.ALo(117,"ghsFloor"),t.qZA(),t.TgZ(118,"div",119)(119,"form",120),t.NdJ("submit",function(){t.CHM(n);const i=t.MAs(123),s=t.oxw();return t.KtG(s.addCampaignSticker(i))}),t.TgZ(120,"label"),t._UZ(121,"span",13),t.qZA(),t.TgZ(122,"input",121,122),t.NdJ("keyup.enter",function(){t.CHM(n);const i=t.MAs(123),s=t.oxw();return t.KtG(s.addCampaignSticker(i))}),t.qZA(),t.TgZ(124,"img",123),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(123),s=t.oxw();return t.KtG(s.addCampaignSticker(i))}),t.qZA()(),t.TgZ(125,"div",124),t.YNc(126,hL,4,2,"div",125),t.qZA()(),t._UZ(127,"ghs-party-buildings",126),t.YNc(128,_L,5,9,"div",127),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngClass",t.VKq(76,Vr,n.summer)),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.summer"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet"),t.xp6(3),t.Q6J("ghs-label","party.campaign.manage"),t.xp6(1),t.Q6J("ngClass",t.VKq(78,Vr,!n.summer)),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.winter"),t.xp6(3),t.Q6J("ngForOf",t.xi3(15,62,t.DdM(80,ar),80)),t.xp6(2),t.Q6J("ngIf",n.party.weeks==80+80*n.calendarSheet),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.name"),t.xp6(2),t.Q6J("value",n.party.name)("ghs-label","party.campaign.sheet.name")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario),t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(3),t.Q6J("ngIf",n.characters.length>0),t.xp6(5),t.Q6J("value",n.party.loot.lumber||0),t.xp6(3),t.Q6J("value",n.party.loot.metal||0),t.xp6(3),t.Q6J("value",n.party.loot.hide||0),t.xp6(4),t.Q6J("value",n.party.loot.arrowvine||0),t.xp6(3),t.Q6J("value",n.party.loot.axenut||0),t.xp6(3),t.Q6J("value",n.party.loot.corpsecap||0),t.xp6(3),t.Q6J("value",n.party.loot.flamefruit||0),t.xp6(3),t.Q6J("value",n.party.loot.rockroot||0),t.xp6(3),t.Q6J("value",n.party.loot.snowthistle||0),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.inspiration"),t.xp6(2),t.Q6J("value",n.party.inspiration||0)("ghs-label","party.campaign.sheet.inspiration")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.totalDefense"),t.xp6(2),t.Q6J("value",(n.party.defense||0)+n.moraleDefense)("ghs-label","party.campaign.sheet.totalDefense")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.soldiers"),t.xp6(3),t.Q6J("ngForOf",t.xi3(77,65,t.DdM(81,ar),4)),t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.morale"),t.xp6(2),t.Q6J("ngForOf",t.xi3(83,68,t.DdM(82,ar),21)),t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.defense"),t.xp6(2),t.Q6J("ngClass",t.VKq(83,Vr,n.party.morale>19)),t.xp6(2),t.hij(" ",n.gameManager.campaignData().highMorale||""," "),t.xp6(1),t.Q6J("ngIf",n.party.morale>19),t.xp6(1),t.Q6J("ngClass",t.VKq(85,Vr,15==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(87,Vr,10==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(89,Vr,5==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(91,Vr,0==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(93,Vr,-5==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(95,Vr,-10==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(97,Vr,n.party.morale<1)),t.xp6(2),t.hij(" ",n.gameManager.campaignData().lowMorale||""," "),t.xp6(1),t.Q6J("ngIf",n.party.morale<1),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.townGuardPerks"),t.xp6(2),t.Q6J("ngForOf",t.xi3(113,71,t.DdM(99,ar),45)),t.xp6(3),t.Q6J("ngForOf",n.gameManager.campaignData().townGuardPerks),t.xp6(1),t.Q6J("ngIf",n.party.townGuardPerkSections.length>t.lcZ(117,74,n.party.townGuardPerks/3)),t.xp6(5),t.Q6J("ghs-label","party.campaign.sheet.campaignStickers"),t.xp6(1),t.Q6J("autocomplete",n.campaignStickers)("emptyLabel","party.campaign.sheet.campaignStickers.empty")("ghs-label","party.campaign.sheet.campaignStickers")("ghs-label-attribute","placeholder"),t.xp6(4),t.Q6J("ngForOf",n.party.campaignStickers),t.xp6(1),t.Q6J("party",n.party),t.xp6(1),t.Q6J("ngIf",n.townGuardDeck&&n.townGuardDeck.cards.length>0)}}function fL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",168),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return i.fhSheet=!i.fhSheet,t.KtG(i.update(!1))}),t._UZ(1,"span",13),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet."+(n.fhSheet?"disable":"enable"))}}function mL(o,a){if(1&o&&(t.TgZ(0,"option",211),t._UZ(1,"span",13),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("selected",n==e.partyEdition)("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function vL(o,a){1&o&&t._UZ(0,"div",220)}function CL(o,a){if(1&o&&(t.TgZ(0,"div",221)(1,"span",222),t._UZ(2,"span",13),t.qZA()()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n)}}function ML(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function OL(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function PL(o,a){if(1&o&&(t.ynx(0),t._uU(1," #"),t.YNc(2,ML,2,0,"span",20),t.YNc(3,OL,2,0,"span",20),t._uU(4),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngIf",i.maxScenario(i.scenarios[e])>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",i.maxScenario(i.scenarios[e])>1&&n.index.length<2),t.xp6(1),t.hij("",n.index," ")}}function yL(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",232),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src",e.characterIcon(n.solo),t.LSH)}}function bL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.scenario.group."+n.group)}}function xL(o,a){1&o&&t._UZ(0,"img",150)}function wL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",233),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.removeManual(i))}),t._UZ(1,"img",234)(2,"img",235),t.qZA()}2&o&&t.Q6J("ghs-label","party.campaign.scenarios.removeManual")("ghs-label-attribute","title")}function kL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",236),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.scenarioRequirements(i))}),t._UZ(1,"img",157),t.qZA()}2&o&&t.Q6J("ghs-tooltip","scenario.locked")}function TL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",237),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.scenarioRewards(i))}),t._UZ(1,"img",238),t.qZA()}2&o&&t.Q6J("ghs-tooltip","scenario.summary.rewards")}function ZL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",239),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.removeSuccess(i))}),t._UZ(2,"img",240)(3,"img",235),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.removeSuccess")("ghs-label-attribute","title"))}function AL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",241),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.removeSuccess(i,!0))}),t._UZ(2,"img",240)(3,"img",235),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.removeSuccessCasual")("ghs-label-attribute","title"))}const SL=function(o,a){return{blocked:o,locked:a}},Ew=function(o){return{disabled:o}};function EL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",223)(1,"span"),t.YNc(2,PL,5,3,"ng-container",20),t.YNc(3,yL,2,1,"ng-container",20),t.qZA(),t.TgZ(4,"span"),t.YNc(5,bL,1,1,"span",224),t.qZA(),t.TgZ(6,"span",225),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.scenarioRequirements(s))}),t.YNc(7,xL,1,0,"img",226),t._UZ(8,"span",13),t.qZA(),t.TgZ(9,"span"),t._UZ(10,"span",16),t.YNc(11,wL,3,2,"a",227),t.YNc(12,kL,2,1,"span",228),t.YNc(13,TL,2,1,"span",229),t.YNc(14,ZL,4,2,"span",35),t.ALo(15,"ghsRange"),t.YNc(16,AL,4,2,"span",35),t.ALo(17,"ghsRange"),t.TgZ(18,"a",230),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.addSuccess(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.addSuccess(s,!0))}),t._UZ(19,"img",231),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(2),t.Q6J("ngIf",!n.solo),t.xp6(1),t.Q6J("ngIf",n.solo),t.xp6(2),t.Q6J("ngIf",n.group),t.xp6(1),t.Q6J("ngClass",t.WLB(22,SL,n.isBlocked,!n.isBlocked&&n.isLocked))("ghs-tooltip",n.isBlocked?"scenario.blocked":n.isLocked?"scenario.locked":"")("toggable",!1),t.xp6(1),t.Q6J("ngIf",n.isBlocked||n.isLocked),t.xp6(1),t.Q6J("ghs-label","data.scenario."+n.name),t.xp6(3),t.Q6J("ngIf",e.isManual(n)&&e.countFinished(n)<1),t.xp6(1),t.Q6J("ngIf",n.isLocked),t.xp6(1),t.Q6J("ngIf",e.countFinished(n)),t.xp6(1),t.Q6J("ngForOf",t.xi3(15,16,t.DdM(25,ar),e.countFinished(n))),t.xp6(2),t.Q6J("ngForOf",t.xi3(17,19,t.DdM(26,ar),e.countFinished(n,!0))),t.xp6(2),t.Q6J("ghs-label",n.isBlocked?"scenario.blocked":n.isLocked?"scenario.locked":"party.campaign.scenarios.addSuccess")("ghs-label-attribute","title")("ngClass",t.VKq(27,Ew,n.isBlocked||n.isLocked))}}function DL(o,a){1&o&&t._UZ(0,"div",220)}function IL(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function NL(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function JL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.scenario.group."+n.group)}}function UL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.scenario."+n.name)}}function LL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%data.scenarioNumber:"+n.parent+"%")}}function QL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",223)(1,"span"),t._uU(2," #"),t.YNc(3,IL,2,0,"span",20),t.YNc(4,NL,2,0,"span",20),t._uU(5),t.qZA(),t.TgZ(6,"span"),t.YNc(7,JL,1,1,"span",224),t.qZA(),t.TgZ(8,"span",242),t.YNc(9,UL,1,1,"span",224),t.YNc(10,LL,1,1,"span",224),t.qZA(),t.TgZ(11,"span"),t._UZ(12,"span",16),t.TgZ(13,"span",237),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.scenarioRewards(s))}),t._UZ(14,"img",238),t.qZA(),t.TgZ(15,"a",239),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2).$implicit,m=t.oxw(2);return t.KtG(m.removeConclusion(s.index,l))}),t._UZ(16,"img",240)(17,"img",235),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(2).$implicit,i=t.oxw(2);t.xp6(3),t.Q6J("ngIf",i.maxScenario(i.conclusions[e])>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",i.maxScenario(i.conclusions[e])>1&&n.index.length<2),t.xp6(1),t.hij("",n.index," "),t.xp6(2),t.Q6J("ngIf",n.group),t.xp6(2),t.Q6J("ngIf",n.named),t.xp6(1),t.Q6J("ngIf",n.parent),t.xp6(3),t.Q6J("ghs-tooltip","scenario.summary.rewards"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.removeSuccess")("ghs-label-attribute","title")}}function RL(o,a){if(1&o&&(t.ynx(0),t.YNc(1,DL,1,0,"div",212),t.TgZ(2,"div",221)(3,"span",222),t._UZ(4,"span",13),t.qZA()(),t.YNc(5,QL,18,9,"div",214),t.BQk()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(3),t.Q6J("ghs-label","party.campaign.scenarios.conclusions"),t.xp6(1),t.Q6J("ngForOf",s.conclusions[i])}}function FL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",215),t._UZ(1,"img",238),t._uU(2," / "),t._UZ(3,"img",243),t.TgZ(4,"input",216,244),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(5);return t.KtG(i.classList.remove("error"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(5),s=t.oxw(3);return t.KtG(s.selectFinishConclusion(i))}),t.qZA(),t.TgZ(6,"a",30),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(5),s=t.oxw(3);return t.KtG(s.selectFinishConclusion(i))}),t._UZ(7,"span",13),t._uU(8,"\xa0"),t._UZ(9,"img",31),t.qZA()()}2&o&&(t.xp6(4),t.Q6J("ghs-label","party.campaign.scenarios.index")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.addConclusion")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.addConclusion"))}function qL(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,vL,1,0,"div",212),t.YNc(2,CL,3,1,"div",213),t.YNc(3,EL,20,29,"div",214),t.TgZ(4,"div",215)(5,"input",216,217),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(6),s=t.MAs(8);return i.classList.remove("error"),t.KtG(s.classList.remove("error"))})("keyup.enter",function(){const s=t.CHM(n).$implicit,l=t.MAs(6),m=t.MAs(8),O=t.oxw(2);return t.KtG(O.unlockScenario(l,m,s))}),t.qZA(),t.TgZ(7,"input",216,218),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(6),s=t.MAs(8);return i.classList.remove("error"),t.KtG(s.classList.remove("error"))})("keyup.enter",function(){const s=t.CHM(n).$implicit,l=t.MAs(6),m=t.MAs(8),O=t.oxw(2);return t.KtG(O.unlockScenario(l,m,s))}),t.qZA(),t.TgZ(9,"a",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.MAs(6),m=t.MAs(8),O=t.oxw(2);return t.KtG(O.unlockScenario(l,m,s))}),t._UZ(10,"span",13),t._uU(11,"\xa0"),t._UZ(12,"img",31),t.qZA()(),t.YNc(13,RL,6,3,"ng-container",20),t.YNc(14,FL,10,5,"div",219),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(1),t.Q6J("ngIf",i.scenarioEditions.length>1),t.xp6(1),t.Q6J("ngForOf",i.scenarios[n]),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.index")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.group")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.unlock")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.unlock"),t.xp6(3),t.Q6J("ngIf",i.conclusions[n]&&i.conclusions[n].length>0),t.xp6(1),t.Q6J("ngIf",i.fhSheet)}}function HL(o,a){1&o&&t._UZ(0,"img",245)}function jL(o,a){1&o&&(t.TgZ(0,"div",246),t._UZ(1,"span",247),t.TgZ(2,"span"),t._uU(3,":"),t.qZA()())}function BL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",251),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.setProsperity(i+1))}),t._uU(1),t.qZA()}if(2&o){const n=t.oxw().index,e=t.oxw(2);t.xp6(1),t.hij(" ",e.prosperitySteps.indexOf(n)+2," ")}}const zL=function(o){return{large:o}},GL=function(o,a){return{checked:o,highlight:a}};function VL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",248),t.YNc(1,BL,2,1,"div",249),t.TgZ(2,"div",250),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.setProsperity(s+1))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(2);t.Q6J("autoscroll",e.party.prosperity==n+1||0==e.party.prosperity&&0==n)("ngClass",t.VKq(4,zL,-1!=e.prosperitySteps.indexOf(n))),t.xp6(1),t.Q6J("ngIf",-1!=e.prosperitySteps.indexOf(n)),t.xp6(1),t.Q6J("ngClass",t.WLB(6,GL,e.party.prosperity>n,-1!=e.prosperityHighlightSteps.indexOf(n)))}}function YL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",254)(1,"div",255)(2,"div",250),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(3);return t.KtG(l.setDonations(s+1))}),t.qZA(),t._UZ(3,"img",256),t._uU(4," +10g "),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(1,i_,e.party.donations>n))}}function KL(o,a){1&o&&(t.TgZ(0,"div",252)(1,"label"),t._UZ(2,"span",13),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",182),t.YNc(5,YL,5,3,"div",253),t.ALo(6,"ghsRange"),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.donations"),t.xp6(3),t.Q6J("ngForOf",t.xi3(6,2,t.DdM(5,ar),10)))}function $L(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",n.split(":")[1],"x\xa0 ")}}function WL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t.YNc(1,$L,2,1,"span",20),t._UZ(2,"span",13)(3,"span",16),t.TgZ(4,"span",58),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(3);return t.KtG(l.removeGlobalAchievement(s))}),t._UZ(5,"img",59),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.split(":").length>0&&"1"!=n.split(":")[1]),t.xp6(1),t.Q6J("ghs-label","data.globalAchievements."+n.split(":")[0])}}function XL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",257)(1,"label"),t._UZ(2,"span",13),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",24)(5,"div",25),t.YNc(6,WL,6,2,"div",26),t.qZA(),t.TgZ(7,"div",27)(8,"input",121,258),t.NdJ("keyup.enter",function(){t.CHM(n);const i=t.MAs(9),s=t.oxw(2);return t.KtG(s.addGlobalAchievement(i))}),t.qZA(),t.TgZ(10,"a",30),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(9),s=t.oxw(2);return t.KtG(s.addGlobalAchievement(i))}),t._UZ(11,"img",31),t.qZA()()()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","party.campaign.achievements"),t.xp6(4),t.Q6J("ngForOf",n.globalAchievementsList),t.xp6(2),t.Q6J("autocomplete",n.globalAchievements)("emptyLabel","party.addGlobalAchievement.empty")("ghs-label","party.addGlobalAchievement")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.addGlobalAchievement")("ghs-label-attribute","title")}}function tQ(o,a){if(1&o&&(t.TgZ(0,"option",173),t._UZ(1,"span",13),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("value",n)("selected",n==e.itemEdition),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function eQ(o,a){if(1&o&&(t.TgZ(0,"span",270),t._uU(1,"["),t._UZ(2,"span",13),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function nQ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",260),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.openItem(i))}),t._UZ(2,"img",261),t.TgZ(3,"span",262),t._uU(4),t.qZA()(),t.TgZ(5,"span",263),t._uU(6,":"),t.qZA(),t.TgZ(7,"span",264),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.removeItem(i))}),t._UZ(8,"img",265)(9,"img",266),t.qZA(),t.TgZ(10,"span",267),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.openItem(i))}),t.qZA(),t.TgZ(11,"span",268),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(),s=i.$implicit,l=i.index,m=t.oxw(2);return t.KtG(m.incItemCount(s,m.itemIdentifier[l]))}),t._uU(12),t.qZA(),t.YNc(13,eQ,4,1,"span",269),t.BQk()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw(2);t.xp6(2),t.Q6J("src",e.slot?"./assets/images/items/slots/"+e.slot+".svg":"",t.LSH),t.xp6(2),t.Oqu(e.id),t.xp6(6),t.Q6J("ghs-label","data.items."+e.edition+"-"+e.id),t.xp6(2),t.hij(" ",s.itemIdentifier[i].count>0?s.itemIdentifier[i].count:"-"," "),t.xp6(1),t.Q6J("ngIf",!s.partyEdition||!s.itemEdition)}}const gT=function(o){return{edition:o}};function iQ(o,a){if(1&o&&(t.TgZ(0,"label",259),t.YNc(1,nQ,14,5,"ng-container",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(2,gT,!e.partyEdition||!e.itemEdition)),t.xp6(1),t.Q6J("ngIf",n)}}function oQ(o,a){if(1&o&&(t.TgZ(0,"option",173),t._UZ(1,"span",13),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("value",n)("selected",n==e.treasureEdition),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function aQ(o,a){if(1&o&&(t.TgZ(0,"span",56),t._uU(1,"["),t._UZ(2,"span",13),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function sQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",271)(1,"span",272),t._UZ(2,"img",199),t.TgZ(3,"span",262),t._uU(4),t.qZA()(),t.TgZ(5,"span",263),t._uU(6,":"),t.qZA(),t.TgZ(7,"span",264),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeTreasure(s))}),t._UZ(8,"img",265)(9,"img",266),t.qZA(),t.TgZ(10,"span",56),t._UZ(11,"ghs-treasure-label",273),t.qZA(),t._UZ(12,"span"),t.YNc(13,aQ,4,1,"span",159),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(5,gT,!e.treasureEdition)),t.xp6(4),t.Oqu(n.name),t.xp6(7),t.Q6J("edition",n.edition)("index",+n.name-1),t.xp6(2),t.Q6J("ngIf",!e.treasureEdition)}}function rQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",274)(1,"span",262),t._uU(2),t.qZA(),t.TgZ(3,"input",275),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(2);return t.KtG(m.changePlayer(i,l))}),t.qZA(),t.TgZ(4,"a",58),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.removePlayer(s))}),t._UZ(5,"img",150),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index;t.xp6(2),t.hij("#",e+1,""),t.xp6(1),t.Q6J("value",n)}}function cQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",204)(1,"div",276)(2,"a",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.battleGoalSetup())}),t._UZ(3,"span",13),t.qZA()()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","game.battleGoals.setup"))}function lQ(o,a){1&o&&(t.TgZ(0,"div",185)(1,"label"),t._UZ(2,"span",13),t._uU(3,":"),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements"))}function gQ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.retirements.masteries"))}function dQ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"img",240),t.qZA())}function hQ(o,a){if(1&o&&(t.ynx(0),t.YNc(1,dQ,2,0,"span",35),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngForOf",n.progress.masteries)}}function uQ(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,hQ,2,1,"ng-container",20),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",n.progress)}}function _Q(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",281)(1,"span"),t._uU(2," #"),t.TgZ(3,"input",282),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw(3);return t.KtG(m.setPlayerNumber(l,i))})("keyup",function(i){const l=t.CHM(n).$implicit,m=t.oxw(3);return t.KtG(m.setPlayerNumber(l,i))}),t.qZA()(),t.TgZ(4,"span"),t._uU(5),t.qZA(),t.TgZ(6,"span"),t._UZ(7,"span",13),t.qZA(),t.TgZ(8,"span"),t._uU(9),t.qZA(),t.TgZ(10,"span"),t._uU(11),t.qZA(),t.YNc(12,uQ,2,1,"span",20),t.TgZ(13,"span",283),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.reactivateCharacter(s))}),t._UZ(14,"img",284),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(3),t.Q6J("value",n.number),t.xp6(2),t.Oqu(n.title),t.xp6(2),t.Q6J("ghs-label","data.character."+n.name),t.xp6(2),t.Oqu(n.level),t.xp6(2),t.Oqu(e.characterPerks(n)||"/"),t.xp6(1),t.Q6J("ngIf",e.fhSheet),t.xp6(1),t.Q6J("ghs-label","party.campaign.retirements.reactivate")("ghs-label-attribute","title")}}function pQ(o,a){if(1&o&&(t.TgZ(0,"div",277)(1,"div",278)(2,"div",279)(3,"span"),t._UZ(4,"span",13),t.qZA(),t.TgZ(5,"span"),t._UZ(6,"span",13),t.qZA(),t.TgZ(7,"span"),t._UZ(8,"span",13),t.qZA(),t.TgZ(9,"span"),t._UZ(10,"span",13),t.qZA(),t.TgZ(11,"span"),t._UZ(12,"span",13),t.qZA(),t.YNc(13,gQ,2,1,"span",20),t._UZ(14,"span"),t.qZA(),t.YNc(15,_Q,15,8,"div",280),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(8,lT,n.fhSheet)),t.xp6(3),t.Q6J("ghs-label","party.campaign.retirements.player"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.character"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.class"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.level"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.perks"),t.xp6(1),t.Q6J("ngIf",n.fhSheet),t.xp6(2),t.Q6J("ngForOf",n.party.retirements)}}const fQ=function(o){return{fh:o}};function mQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",169)(1,"div",10)(2,"span",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.campaign=!1)}),t._UZ(3,"img",12)(4,"span",13),t.qZA(),t.TgZ(5,"label",14),t._UZ(6,"span",13),t.qZA(),t.TgZ(7,"span",170),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleCampaignMode())}),t._UZ(8,"span",171)(9,"span",13),t.qZA()(),t.TgZ(10,"div",10)(11,"label",14),t._UZ(12,"span",13),t.qZA(),t.TgZ(13,"select",172),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeEdition(i))}),t.TgZ(14,"option",173),t._UZ(15,"span",13),t.qZA(),t.YNc(16,mL,2,3,"option",174),t.qZA()(),t.TgZ(17,"div",175)(18,"div",176)(19,"span"),t._UZ(20,"span",13),t.qZA(),t.TgZ(21,"span"),t._UZ(22,"span",13),t.qZA(),t.TgZ(23,"span"),t._UZ(24,"span",13),t.qZA(),t.TgZ(25,"span"),t._UZ(26,"span",13),t.qZA()(),t.YNc(27,qL,15,12,"ng-container",35),t.qZA(),t.TgZ(28,"div",177)(29,"div",178),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setProsperity(0))}),t.TgZ(30,"div",179),t._UZ(31,"span",13),t.YNc(32,HL,1,0,"img",180),t._uU(33,":"),t.qZA(),t.YNc(34,jL,4,0,"div",181),t.qZA(),t.TgZ(35,"div",182),t.YNc(36,VL,3,9,"div",183),t.ALo(37,"ghsRange"),t.qZA()(),t.YNc(38,KL,7,6,"div",184),t.TgZ(39,"div",185),t.YNc(40,XL,12,8,"div",186),t.qZA(),t.TgZ(41,"div",185)(42,"div",187)(43,"label"),t._UZ(44,"span",13),t._uU(45,":"),t.qZA(),t.TgZ(46,"div",188)(47,"input",189,190),t.NdJ("focus",function(){t.CHM(n);const i=t.MAs(48);return t.KtG(i.select())})("keyup",function(){t.CHM(n);const i=t.MAs(48);return i.classList.remove("error"),t.KtG(i.classList.remove("warning"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(48),s=t.oxw();return t.KtG(s.addItem(i,s.itemEdition||""))}),t.qZA(),t.TgZ(49,"a",191),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(48),s=t.oxw();return t.KtG(s.addItem(i,s.itemEdition||""))}),t._UZ(50,"img",31),t.qZA(),t.TgZ(51,"select",192),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.itemEdition=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.TgZ(52,"option",193),t._UZ(53,"span",13),t.qZA(),t.YNc(54,tQ,2,3,"option",194),t.qZA()(),t.TgZ(55,"div",195),t.YNc(56,iQ,2,4,"label",196),t.qZA()()(),t.TgZ(57,"div",185)(58,"div",197)(59,"label",198),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.treasuresDialog())}),t._UZ(60,"img",199)(61,"span",13),t._uU(62,":"),t.qZA(),t.TgZ(63,"div",200)(64,"input",189,201),t.NdJ("focus",function(){t.CHM(n);const i=t.MAs(65);return t.KtG(i.select())})("keyup",function(){t.CHM(n);const i=t.MAs(65);return i.classList.remove("error"),t.KtG(i.classList.remove("warning"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(65),s=t.oxw();return t.KtG(s.addTreasure(i,s.treasureEdition))}),t.qZA(),t.TgZ(66,"a",191),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(65),s=t.oxw();return t.KtG(s.addTreasure(i,s.treasureEdition))}),t._UZ(67,"img",31),t.qZA(),t.TgZ(68,"select",192),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.treasureEdition=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.TgZ(69,"option",193),t._UZ(70,"span",13),t.qZA(),t.YNc(71,oQ,2,3,"option",194),t.qZA()(),t.TgZ(72,"div",202),t.YNc(73,sQ,14,7,"label",203),t.qZA()()(),t.TgZ(74,"div",8)(75,"div",204)(76,"div",185)(77,"label"),t._UZ(78,"span",13),t._uU(79,":"),t.qZA()(),t.TgZ(80,"div",205),t.YNc(81,rQ,6,2,"div",206),t.TgZ(82,"a",207),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.party.players[i.party.players.length]="")}),t._UZ(83,"img",31)(84,"span",13),t.qZA()()(),t.YNc(85,cQ,4,1,"div",208),t.qZA(),t.YNc(86,lQ,4,1,"div",209),t.YNc(87,pQ,16,10,"div",210),t.qZA()}if(2&o){const n=t.MAs(48),e=t.MAs(65),i=t.oxw();t.xp6(4),t.Q6J("ghs-label","party.sheet"),t.xp6(2),t.Q6J("ghs-label","party.campaign"),t.xp6(2),t.Q6J("ngClass",t.VKq(44,i_,i.party.campaignMode)),t.xp6(1),t.Q6J("ghs-label","party.campaignMode"),t.xp6(3),t.Q6J("ghs-label","party.campaign.scenarios"),t.xp6(2),t.Q6J("value",void 0)("selected",!i.partyEdition),t.xp6(1),t.Q6J("ghs-label","edition.all"),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(4),t.Q6J("ghs-label","party.campaign.scenarios.index"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.group"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.name"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.finished"),t.xp6(1),t.Q6J("ngForOf",i.scenarioEditions),t.xp6(1),t.Q6J("ngClass",t.VKq(46,fQ,i.settingsManager.settings.fhStyle)),t.xp6(3),t.Q6J("ghs-label","party.prosperity"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.fhStyle),t.xp6(2),t.Q6J("ngIf",!i.settingsManager.settings.fhStyle),t.xp6(2),t.Q6J("ngForOf",t.xi3(37,41,t.DdM(48,ar),i.prosperitySteps[i.prosperitySteps.length-1]+1)),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(4),t.Q6J("ghs-label","party.campaign.items"),t.xp6(5),t.Q6J("ngClass",t.VKq(49,Ew,!i.itemEdition||!n.value||+n.value<1||i.hasItem(n.value,i.itemEdition))),t.xp6(2),t.Q6J("ngModel",i.itemEdition),t.xp6(1),t.Q6J("selected",!i.itemEdition),t.xp6(1),t.Q6J("ghs-label","edition.all"),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(2),t.Q6J("ngForOf",i.items),t.xp6(5),t.Q6J("ghs-label","party.campaign.treasures"),t.xp6(5),t.Q6J("ngClass",t.VKq(51,Ew,!i.treasureEdition||!e.value||+e.value<1||i.hasTreasure(e.value,i.treasureEdition))),t.xp6(2),t.Q6J("ngModel",i.treasureEdition),t.xp6(1),t.Q6J("selected",!i.treasureEdition),t.xp6(1),t.Q6J("ghs-label","edition.all"),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(2),t.Q6J("ngForOf",i.treasures()),t.xp6(5),t.Q6J("ghs-label","party.campaign.players"),t.xp6(3),t.Q6J("ngForOf",i.party.players),t.xp6(3),t.Q6J("ghs-label","party.campaign.players.add"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.battleGoals),t.xp6(1),t.Q6J("ngIf",i.party.retirements&&i.party.retirements.length>0),t.xp6(1),t.Q6J("ngIf",i.party.retirements&&i.party.retirements.length>0)}}const vQ=function(o){return{denied:o}},CQ=function(o,a){return{"fh-container":o,"campaign-container":a}};let Dw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ghsInputFullScreenCheck",he.lz),(0,_.Z)(this,"party",void 0),(0,_.Z)(this,"prosperitySteps",Wu.Zd),(0,_.Z)(this,"prosperityHighlightSteps",Wu.Zd),(0,_.Z)(this,"priceModifier",0),(0,_.Z)(this,"moraleDefense",0),(0,_.Z)(this,"campaign",!1),(0,_.Z)(this,"partyEdition",""),(0,_.Z)(this,"scenarioEditions",[]),(0,_.Z)(this,"scenarios",{}),(0,_.Z)(this,"conclusions",{}),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"worldMap",!1),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"itemIdentifier",[]),(0,_.Z)(this,"itemEdition",""),(0,_.Z)(this,"treasureEdition",""),(0,_.Z)(this,"partyAchievements",[]),(0,_.Z)(this,"globalAchievements",[]),(0,_.Z)(this,"campaignStickers",[]),(0,_.Z)(this,"partyAchievementsList",[]),(0,_.Z)(this,"globalAchievementsList",[]),(0,_.Z)(this,"fhSheet",!1),(0,_.Z)(this,"csSheet",!1),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"townGuardDeck",void 0),(0,_.Z)(this,"calendarSheet",0),(0,_.Z)(this,"summer",!1),(0,_.Z)(this,"itemIndex",void 0),(0,_.Z)(this,"treasureIndex",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.data=e,this.dialogRef=i,this.dialog=s,this.campaign=e&&e.campaign,this.party=d.v.game.party,d.v.game.edition&&!this.party.edition&&(this.party.edition=d.v.game.edition),this.party.edition&&(this.partyEdition=this.party.edition),this.party.casualScenarios=this.party.casualScenarios||[],this.party.scenarios=this.party.scenarios||[],this.campaign||e&&e.partySheet||"jotl"!=this.partyEdition||(this.campaign=!0),d.v.game.conditions&&!this.party.conditions&&(this.party.conditions=d.v.game.conditions),d.v.game.battleGoalEditions&&!this.party.battleGoalEditions&&(this.party.battleGoalEditions=d.v.game.battleGoalEditions),d.v.game.filteredBattleGoals&&!this.party.filteredBattleGoals&&(this.party.filteredBattleGoals=d.v.game.filteredBattleGoals),d.v.game.unlockedCharacters&&!this.party.unlockedCharacters&&(this.party.unlockedCharacters=d.v.game.unlockedCharacters),d.v.game.lootDeckEnhancements&&!this.party.lootDeckEnhancements&&(this.party.lootDeckEnhancements=d.v.game.lootDeckEnhancements),d.v.game.lootDeckFixed&&!this.party.lootDeckFixed&&(this.party.lootDeckFixed=d.v.game.lootDeckFixed),d.v.game.lootDeckSections&&!this.party.lootDeckSections&&(this.party.lootDeckSections=d.v.game.lootDeckSections),this.itemEdition=this.partyEdition,this.treasureEdition=this.partyEdition}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.party!=d.v.game.party&&(this.party=d.v.game.party,this.update()),this.townGuardDeck&&this.party.townGuardDeck&&d.v.attackModifierManager.fromModel(this.townGuardDeck,this.party.townGuardDeck)}}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}close(){this.dialogRef.close()}toggleCampaignMode(){d.v.stateManager.before(this.party.campaignMode?"disablePartyCampaignMode":"enablePartyCampaignMode"),this.party.campaignMode=!this.party.campaignMode,d.v.stateManager.after(),this.update()}openMap(){this.dialog.open(aT,{backdropClass:"fullscreen-backdrop",panelClass:"fullscreen-panel",data:this.partyEdition}),this.close()}changePlayer(e,i){d.v.stateManager.before("setPlayer",e.target.value,""+(i+1)),this.party.players[i]=e.target.value,d.v.stateManager.after()}removePlayer(e){d.v.stateManager.before("removePlayer",this.party.players[e],""+(e+1)),this.party.players.splice(e,1),d.v.stateManager.after()}unlockScenario(e,i,s){let l=e.value,m=i.value||void 0;const O=d.v.scenarioManager.scenarioData(s,!0).find(k=>k.index==l&&k.group==m);e.classList.add("error"),i.classList.add("error"),O&&!this.scenarios[s].find(k=>k.edition==O.edition&&k.group==O.group&&k.index==O.index)&&!this.party.manualScenarios.some(k=>k.index==O.index&&k.edition==O.edition&&k.group==O.group&&!k.isCustom)&&(d.v.stateManager.before("addManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(O))),d.v.game.party.manualScenarios.push(new ei._b(O.index,O.edition,O.group,!1,"",[])),d.v.stateManager.after(),e.classList.remove("error"),e.value="",i.classList.remove("error"),i.value="",this.update())}setName(e){this.party.name!=e.target.value&&(d.v.stateManager.before("setPartyName",e.target.value),this.party.name=e.target.value,d.v.stateManager.after())}setLocation(e){this.party.location!=e.target.value&&(d.v.stateManager.before("setPartyLocation",e.target.value),this.party.location=e.target.value,d.v.stateManager.after())}setNotes(e){this.party.notes!=e.target.value&&(d.v.stateManager.before("setPartyNotes",e.target.value),this.party.notes=e.target.value,d.v.stateManager.after())}addAchievement(e){if(e.value){let i=e.value;Object.keys(R.r.label.data.partyAchievements).forEach(s=>{R.r.label.data.partyAchievements[s].toLowerCase()==i.toLowerCase()&&(i=s)}),d.v.stateManager.before("addPartyAchievement",i),this.party.achievementsList.push(i),d.v.stateManager.after(),e.value="",this.update()}}removeAchievement(e){d.v.stateManager.before("removePartyAchievement",this.party.achievementsList[e]),this.party.achievementsList.splice(this.party.achievementsList.lastIndexOf(this.party.achievementsList[e]),1),d.v.stateManager.after(),this.update()}addGlobalAchievement(e){if(e.value){let i=e.value;Object.keys(R.r.label.data.globalAchievements).forEach(s=>{R.r.label.data.globalAchievements[s].toLowerCase()==i.toLowerCase()&&(i=s)}),d.v.stateManager.before("addGlobalAchievement",i),this.party.globalAchievementsList.push(i),d.v.stateManager.after(),e.value="",this.update()}}removeGlobalAchievement(e){d.v.stateManager.before("removeGlobalAchievement",this.party.globalAchievementsList[e]),this.party.globalAchievementsList.splice(this.party.globalAchievementsList.lastIndexOf(this.party.globalAchievementsList[e]),1),d.v.stateManager.after(),this.update()}setReputation(e){this.party.reputation!=e&&(d.v.stateManager.before("setPartyReputation",""+e),e>20?e=20:e<-20&&(e=-20),this.party.reputation=e,d.v.stateManager.after(),this.update())}characterPerks(e){return e.progress&&e.progress.perks&&e.progress.perks.length>0?e.progress.perks.reduce((i,s)=>i+s):0}setPlayerNumber(e,i){!isNaN(+i.target.value)&&e.number!=+i.target.value&&+i.target.value>0&&(d.v.stateManager.before("setPlayerNumber","data.character."+e.name,i.target.value),e.number=+i.target.value,d.v.stateManager.after())}reactivateCharacter(e){d.v.stateManager.before("unsetRetired","data.character."+e.name);let i=new oe.z(d.v.getCharacterData(e.name,e.edition),e.level);i.fromModel(e),i.progress.retired=!1,d.v.game.figures.push(i),this.party.retirements.splice(this.party.retirements.indexOf(e),1),d.v.stateManager.after()}removeParty(){d.v.game.parties.length>1&&(d.v.stateManager.before("removeParty",this.party.name||"%party% "+this.party.id),d.v.game.parties.splice(d.v.game.parties.indexOf(this.party),1),this.changeParty(d.v.game.parties[0]),d.v.stateManager.after())}newParty(){let e=new Mw.f;d.v.stateManager.before("addParty",e.name||"%party% "+e.id),this.addParty(e),d.v.stateManager.after()}addParty(e){let i=0;for(;d.v.game.parties.some(s=>s.id==i);)i++;e.id=i,d.v.game.parties.push(e),this.changeParty(e)}selectParty(e){const i=d.v.game.parties.find(s=>s.id==e.target.value);i&&(d.v.stateManager.before("changeParty",i.name||"%party% "+i.id),this.changeParty(i),d.v.stateManager.after())}changeParty(e){d.v.changeParty(e),this.update()}setDonations(e){this.party.donations==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartyDonations",""+e),this.party.donations=e,d.v.stateManager.after()}setProsperity(e){this.party.prosperity==e&&e--,e>(d.v.fhRules()?132:64)?e=d.v.fhRules()?132:64:e<0&&(e=0),d.v.stateManager.before("setPartyProsperity",""+e),this.party.prosperity=e,d.v.stateManager.after()}exportParty(){const e=document.createElement("a");e.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(this.party))),e.setAttribute("download",(this.party.name?this.party.name+"_":"")+"campaign.json"),document.body.appendChild(e),e.click(),document.body.removeChild(e)}importParty(e){const i=e.target.parentElement;i.classList.remove("error");try{const s=new FileReader;s.addEventListener("load",l=>{const m=Object.assign(new Mw.f,JSON.parse(l.target.result));m?(d.v.stateManager.before("importParty"),m.id==this.party.id&&m.name&&m.name==this.party.name?d.v.game.party=m:this.addParty(m),this.party=d.v.game.party,d.v.stateManager.after()):i.classList.add("error")}),s.readAsText(e.target.files[0])}catch(s){console.warn(s),i.classList.add("error")}}countFinished(e,i=!1){return(i?this.party.casualScenarios:this.party.scenarios).filter(s=>e.index==s.index&&e.edition==s.edition&&e.group==s.group).length}isManual(e){return null!=this.party.manualScenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)}addSuccess(e,i=!1){if(!d.v.scenarioManager.isBlocked(e)&&!d.v.scenarioManager.isLocked(e)||i){const s=d.v.sectionData(e.edition).filter(l=>l.edition==e.edition&&l.parent==e.index&&l.group==e.group&&l.conclusion);0==s.length?this.addSuccessIntern(e):this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:s,parent:e}}).closed.subscribe({next:l=>{l&&this.addSuccessIntern(e,l)}})}}addSuccessIntern(e,i=void 0){d.v.stateManager.before("finishScenario.success",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),d.v.scenarioManager.finishScenario(new ei.$4(e),!0,i,!1,void 0,!1,d.v.game.party.campaignMode&&0==this.countFinished(e),!0),d.v.stateManager.after(),this.update()}removeSuccess(e,i=!1){const s=i?this.party.casualScenarios:this.party.scenarios,l=s.find(m=>m.index==e.index&&m.edition==e.edition&&m.group==e.group);l&&(d.v.stateManager.before("finishScenario.remove"+(i?"Casual":""),...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),s.splice(s.indexOf(l),1),d.v.stateManager.after()),this.update()}removeManual(e){const i=this.party.manualScenarios.find(s=>s.index==e.index&&s.edition==e.edition&&s.group==e.group);i&&(d.v.stateManager.before("removeManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),this.party.manualScenarios.splice(this.party.manualScenarios.indexOf(i),1),d.v.stateManager.after()),this.update()}scenarioRewards(e){const i=this.party.conclusions.filter(s=>s.edition==e.edition).map(s=>d.v.sectionData(e.edition).find(l=>l.index==s.index&&l.edition==s.edition&&l.group==s.group)).find(s=>s.parent==e.index&&s.group==e.group);this.dialog.open(uo,{panelClass:"dialog",data:{scenario:new ei.$4(e),conclusion:i,success:!0,rewardsOnly:!0}})}scenarioRequirements(e){d.v.scenarioManager.isLocked(e)&&this.dialog.open(oT,{panelClass:"dialog",data:{scenarioData:e,hideMenu:!0}})}maxScenario(e){return Math.max(...e.map(i=>i.index.length))}changeEdition(e){this.partyEdition="undefined"!=e.target.value&&e.target.value||"",this.itemEdition=this.partyEdition,this.treasureEdition=this.partyEdition,this.update()}update(e=!0){e&&(this.fhSheet=d.v.fhRules(),this.csSheet=!this.fhSheet&&d.v.editionRules("cs"));const i=this.partyEdition&&[this.partyEdition]||d.v.editions();this.scenarioEditions=[],i.forEach(m=>{let O=d.v.scenarioManager.scenarioData(m).filter(k=>!k.spoiler||-1!=R.r.settings.spoilers.indexOf(k.name)||k.solo&&-1!=d.v.game.unlockedCharacters.indexOf(k.solo)).map(k=>new ei.U4(k,this.countFinished(k)>0,d.v.scenarioManager.isBlocked(k),d.v.scenarioManager.isLocked(k)));O.length>0&&(this.scenarios[m]=O.sort((k,W)=>k.group&&!W.group?1:!k.group&&W.group?-1:k.group&&W.group&&k.group!=W.group?k.groupk.edition==m).map(k=>d.v.sectionData(m).find(W=>W.index==k.index&&W.edition==k.edition&&W.group==k.group)).filter(k=>!this.party.scenarios.find(W=>W.edition==k.edition&&W.group==k.group&&W.index==k.parent))}),this.priceModifier=this.party.reputation>=0?-1*Math.ceil((this.party.reputation-2)/4):-1*Math.floor((this.party.reputation+2)/4),this.moraleDefense=this.party.morale<3?-10:this.party.morale<5?-5:this.party.morale<8?0:this.party.morale<11?5:this.party.morale<14?10:15;const s=d.v.campaignData();this.townGuardDeck=d.v.attackModifierManager.buildTownGuardAttackModifierDeck(this.party,s),this.party.townGuardDeck?d.v.attackModifierManager.fromModel(this.townGuardDeck,this.party.townGuardDeck):(d.v.attackModifierManager.shuffleModifiers(this.townGuardDeck),this.townGuardDeck.active=!1,this.party.townGuardDeck=this.townGuardDeck.toModel()),this.calendarSheet=Math.floor(Math.max(this.party.weeks-1,0)/80),this.characters=d.v.game.figures.filter(m=>m instanceof oe.z&&Object.keys(m.progress.loot).some(O=>m.progress.loot[O])).map(m=>m),this.prosperitySteps=this.fhSheet?Wu.K8:Wu.Zd,R.r.settings.fhStyle?(this.prosperityHighlightSteps=[],this.prosperitySteps.forEach((m,O)=>{const k=O>0?this.prosperitySteps[O-1]+1:0;for(let W=k;Wthis.partyEdition&&m.edition==this.partyEdition);l&&(l.worldMap&&(this.worldMap=!0),l.label&&l.label[R.r.settings.locale]&&l.label[R.r.settings.locale].partyAchievements?this.partyAchievements.push(...Object.keys(l.label[R.r.settings.locale].partyAchievements).map(m=>new Wf(l.label[R.r.settings.locale].partyAchievements[m],m,-1!=this.party.achievementsList.indexOf(m)))):l.label&&l.label.en&&l.label.en.partyAchievements&&this.partyAchievements.push(...Object.keys(l.label.en.partyAchievements).map(m=>new Wf(l.label.en.partyAchievements[m],m,-1!=this.party.achievementsList.indexOf(m)))),l.label&&l.label[R.r.settings.locale]&&l.label[R.r.settings.locale].globalAchievements?this.globalAchievements.push(...Object.keys(l.label[R.r.settings.locale].globalAchievements).map(m=>new Wf(l.label[R.r.settings.locale].globalAchievements[m],m,-1!=this.party.globalAchievementsList.indexOf(m)))):l.label&&l.label.en&&l.label.en.globalAchievements&&this.globalAchievements.push(...Object.keys(l.label.en.globalAchievements).map(m=>new Wf(l.label.en.globalAchievements[m],m,-1!=this.party.globalAchievementsList.indexOf(m)))),l.campaign&&l.campaign.campaignStickers&&this.campaignStickers.push(...l.campaign.campaignStickers.map(m=>(m=m.split(":")[0],new Wf(R.r.getLabel("data.campaignSticker."+m),m,-1!=this.party.campaignStickers.indexOf(m)))))),this.partyAchievementsList=this.party.achievementsList.map((m,O,k)=>m+":"+k.filter(W=>W==m).length).filter((m,O,k)=>k.indexOf(m)==O),this.globalAchievementsList=this.party.globalAchievementsList.map((m,O,k)=>m+":"+k.filter(W=>W==m).length).filter((m,O,k)=>k.indexOf(m)==O),this.itemIdentifier=this.party.unlockedItems.filter(m=>!this.itemEdition||m.edition==this.itemEdition).sort((m,O)=>this.partyEdition||m.edition==O.edition?+m.name-+O.name:d.v.editions().indexOf(m.edition)-d.v.editions().indexOf(O.edition)),this.items=this.itemIdentifier.map(m=>d.v.itemManager.getItem(+m.name,m.edition,!0)),this.summer=Math.max(this.party.weeks-1,0)%20<10}characterIcon(e){return d.v.characterManager.characterIcon(e)}addItem(e,i){const s=e.value;if(s&&i)if(this.hasItem(s,i))e.classList.add("warning");else{e.classList.add("error");const l=d.v.itemManager.getItems(i,!0).find(m=>s==""+m.id);l&&(d.v.stateManager.before("addUnlockedItem",i,s,l.name),this.party.unlockedItems=this.party.unlockedItems||[],this.party.unlockedItems.push(new Vn.Jc(s,i)),this.itemIndex.nativeElement.value="",e.classList.remove("error"),d.v.stateManager.after(),this.update())}}hasItem(e,i){return this.party.unlockedItems&&this.party.unlockedItems.some(s=>s.name==e&&s.edition==i)}removeItem(e){const i=this.party.unlockedItems.find(s=>s.name==""+e.id&&s.edition==e.edition);i&&(d.v.stateManager.before("removeUnlockedItem",e.edition,""+e.id,e.name),this.party.unlockedItems.splice(this.party.unlockedItems.indexOf(i),1),d.v.stateManager.after(),this.update())}openItem(e){this.dialog.open(gg,{data:{item:e}})}incItemCount(e,i){d.v.stateManager.before("updateUnlockedItemCount",e.edition,""+e.id,e.name),i.count<0?i.count=1:(i.count+=1,i.count>=e.count&&(i.count=-1)),d.v.stateManager.after()}treasuresDialog(){this.dialog.open(tJ,{panelClass:"dialog",data:{party:this.party,edition:this.treasureEdition}})}treasures(){return this.party.treasures.filter(e=>!this.treasureEdition||e.edition==this.treasureEdition).sort((e,i)=>this.treasureEdition||e.edition==i.edition?+e.name-+i.name:d.v.editions().indexOf(e.edition)-d.v.editions().indexOf(i.edition))}addTreasure(e,i){const s=e.value;if(s&&!isNaN(+s)&&i)if(this.hasTreasure(s,i))e.classList.add("warning");else{e.classList.add("error");const l=d.v.editionData.find(m=>m.edition==i);if(l&&l.treasures){const m=+s-(l.treasureOffset||0);m>=0&&ms.name==e&&s.edition==i)}removeTreasure(e){d.v.stateManager.before("removeTreasure",e.edition,e.name),this.party.treasures.splice(this.party.treasures.indexOf(e),1),d.v.stateManager.after()}sectionsForWeekFixed(e){const i=d.v.campaignData();return i.weeks&&i.weeks[e+1]&&i.weeks[e+1]||[]}sectionsForWeek(e){return this.party.weekSections&&this.party.weekSections[e+1]&&this.party.weekSections[e+1]||[]}isConclusion(e){return null!=this.party.conclusions.find(i=>i.edition==d.v.game.edition&&i.index==e)}hasConclusions(e){const i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e)));return i.length>0&&i.every(s=>!d.v.game.party.conclusions.find(l=>l.edition==s.edition&&l.index==s.index&&l.group==s.group))}openConclusions(e,i=-1){let s=d.v.sectionData(d.v.game.edition).filter(l=>l.conclusion&&!l.parent&&l.parentSections&&l.parentSections.find(m=>1==m.length&&-1!=m.indexOf(e))).map(l=>l);s.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:s,parent:d.v.sectionData(d.v.game.edition).find(l=>l.index==e&&!l.group)}}).closed.subscribe({next:l=>{if(l){const m=new ei.$4(l);-1!=i?(d.v.stateManager.before("finishConclusion",...d.v.scenarioManager.scenarioUndoArgs(m)),d.v.scenarioManager.finishScenario(m,!0,m,!1,void 0,!1,d.v.game.party.campaignMode,!0),this.party.weekSections[i]=this.party.weekSections[i]||[],this.party.weekSections[i]?.push(m.index),d.v.stateManager.after(),this.dialog.open(uo,{panelClass:"dialog",data:{scenario:m,conclusionOnly:!0}})):this.finishConclusion(m.index)}}})}selectFinishConclusion(e,i=!1){let s=e.value;e.classList.add("error");const l=d.v.sectionData(this.partyEdition||d.v.currentEdition()).find(m=>m.index==s);l&&(e.classList.remove("error"),i||!this.party.conclusions.find(m=>m.edition==l.edition&&m.group==l.group&&m.index==l.index)?(e.value="",this.finishConclusion(s,i)):e.classList.add("warning"))}finishConclusion(e,i=!1){const s=d.v.sectionData(this.partyEdition||d.v.currentEdition()).find(l=>l.index==e);if(s&&(i||!this.party.conclusions.find(l=>l.edition==s.edition&&l.group==s.group&&l.index==s.index))){const l=new ei.$4(s);this.hasConclusions(l.index)?this.openConclusions(l.index):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:l,conclusionOnly:!0}}).closed.subscribe({next:()=>this.update()})}}removeConclusion(e,i){d.v.stateManager.before("removeConclusion",d.v.game.party.name,e+""),d.v.game.party.conclusions=d.v.game.party.conclusions.filter(s=>s.edition!=i||s.index!=e),d.v.stateManager.after(),this.update()}setWeek(e){this.party.weeks==e&&e--,e<0&&(e=0);let i=[];for(let s=this.party.weeks;s{this.hasConclusions(l)&&i.push(l)}),this.sectionsForWeek(s).forEach(l=>{this.hasConclusions(l)&&i.push(l)}),i.forEach(l=>{this.openConclusions(l,e)});d.v.stateManager.before("setPartyWeeks",""+e);for(let s=this.party.weeks;s{const O=d.v.sectionData(d.v.game.edition).find(k=>k.index==m&&k.conclusion);O&&!d.v.game.party.conclusions.find(k=>k.edition==O.edition&&k.index==O.index&&k.group==O.group)&&d.v.scenarioManager.finishScenario(new ei.$4(O),!0,void 0,!1,void 0,!1,d.v.game.party.campaignMode,!0)});this.party.weeks=e,d.v.stateManager.after(),this.update()}setWeekSection(e){this.dialog.open(gN,{panelClass:["dialog-invert"],data:e})}setResource(e,i){isNaN(+i.target.value)||(d.v.stateManager.before("setPartyResource",this.party.name,"game.loot."+e,i.target.value),this.party.loot[e]=+i.target.value,d.v.stateManager.after())}moveResources(e){this.dialog.open(xw,{panelClass:"dialog",data:{character:e}}).closed.subscribe({next:()=>this.update()})}openResources(){this.dialog.open(cJ,{panelClass:["dialog-invert"]})}setInspiration(e){!isNaN(+e.target.value)&&this.party.inspiration!=+e.target.value&&(d.v.stateManager.before("setPartyInspiration",this.party.name,e.target.value),this.party.inspiration=+e.target.value,d.v.stateManager.after())}setTotalDefense(e){if(!isNaN(+e.target.value)){const i=+e.target.value-this.moraleDefense;this.party.defense!=i&&(d.v.stateManager.before("setPartyTotalDefense",this.party.name,""+i),this.party.defense=i,d.v.stateManager.after())}}setSoldiers(e){this.party.soldiers==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartySoldiers",""+e),this.party.soldiers=e,d.v.stateManager.after()}setMorale(e){this.party.morale==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartyMorale",""+e),this.party.morale=e,d.v.stateManager.after(),this.update()}setTownGuardPerks(e){this.party.townGuardPerks==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartyTownGuardPerks",""+e),this.party.townGuardPerks=e,d.v.stateManager.after()}toggleTownGuardPerkSection(e,i=!1){this.party.townGuardPerkSections=this.party.townGuardPerkSections||[];const s=this.party.townGuardPerkSections.indexOf(e);if(-1!=s||this.party.townGuardPerkSections.lengthk.startsWith(i.toLowerCase().replaceAll(" ","-")+":"));O&&(s=+O.split(":")[1])}this.party.campaignStickers.filter(O=>O.toLowerCase().replaceAll(" ","-")==i.toLowerCase().replaceAll(" ","-")).lengthk==l||k.startsWith(l));O&&(m=-1!=O.indexOf(":")?+O.split(":")[1]:1)}if(1==m)return"./assets/images/fh/party/campaign-stickers/"+l+".png";if(m>1){const k=this.party.campaignStickers.map((W,ct)=>({sticker:W.toLowerCase().replaceAll(" ","-"),origIndex:ct})).filter(W=>W.sticker==l).map((W,ct)=>({sticker:W.sticker,origIndex:W.origIndex,index:ct+1})).find(W=>W.origIndex==i);if(k)return"./assets/images/fh/party/campaign-stickers/"+l+"-"+k.index+".png"}}beforeTownGuardDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"party.campaign.townGuard",...e.values)}afterTownGuardDeck(e){this.townGuardDeck=e.deck,this.party.townGuardDeck=this.townGuardDeck.toModel(),d.v.stateManager.after()}toggleTownGuardDeck(){this.townGuardDeck&&(this.beforeTownGuardDeck(new xn(this.townGuardDeck,this.townGuardDeck.active&&!d.v.game.lootDeck.active?"amDeckHide":"amDeckShow")),this.townGuardDeck.active=!this.townGuardDeck.active,this.afterTownGuardDeck(new xn(this.townGuardDeck,this.townGuardDeck.active?"amDeckShow":"amDeckHide")))}battleGoalSetup(){this.dialog.open(UO,{panelClass:["dialog"]})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-sheet-dialog"]],viewQuery:function(e,i){if(1&e&&(t.Gf(PU,5),t.Gf(yU,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.itemIndex=s.first),t.iGM(s=t.CRH())&&(i.treasureIndex=s.first)}},decls:7,vars:11,consts:[[1,"light","party-sheet-dialog"],[1,"scroll-container",3,"ngClass"],[1,"container",3,"ngClass"],["class","sheet",3,"ngClass",4,"ngIf"],["class","sheet fh-sheet",4,"ngIf"],["class","toggle-fh-sheet",3,"click",4,"ngIf"],["class","campaign",4,"ngIf"],[1,"sheet",3,"ngClass"],[1,"columns"],[1,"column","column-left"],[1,"row","title"],[1,"campaign-toggle",3,"click"],["src","./assets/images/left.svg"],[3,"ghs-label"],[1,"headline"],["class","select-party",3,"ghs-label","ghs-label-attribute","change",4,"ngIf"],[1,"spacer"],["class","map",3,"click",4,"ngIf"],[1,"row","name"],["type","text",3,"value","ghs-label","ghs-label-attribute","change"],[4,"ngIf"],[1,"row","location"],[1,"row","notes"],[1,"row","achievements"],[1,"achievements-container"],[1,"list"],["class","achievement",4,"ngFor","ngForOf"],[1,"form"],["type","text",3,"autocomplete","spoiler","emptyLabel","ghs-label","ghs-label-attribute","keyup.enter"],["partyAchievementInput",""],[1,"addScenario",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/plus.svg"],[1,"column","column-right"],[1,"column","reputation"],[1,"grid"],[4,"ngFor","ngForOf"],[1,"column","shop"],[1,"table"],["class","value",3,"ngClass",4,"ngFor","ngForOf"],[1,"import-export"],[1,"export",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/export.svg"],[1,"import",3,"ghs-label","ghs-label-attribute","click"],["type","file","accept","application/json",3,"change"],["src","./assets/images/import.svg"],[1,"select-party",3,"ghs-label","ghs-label-attribute","change"],[3,"selected","disabled","value",4,"ngFor","ngForOf"],[3,"selected","disabled","value"],[1,"map",3,"click"],["src","./assets/images/fullscreen.svg"],["class","remove-party","src","./assets/images/minus.svg",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],["src","./assets/images/plus.svg",1,"new-party",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/minus.svg",1,"remove-party",3,"ghs-label","ghs-label-attribute","click"],[1,"hint-container","new-party-hint"],["src","./assets/images/plus.svg",1,"hint-trigger","ghs-svg"],[1,"hint"],[1,"text"],[1,"achievement"],[1,"remove",3,"click"],["src","./assets/images/close.svg",1,"ghs-svg"],[1,"value",3,"ngClass","click"],[1,"key"],[1,"value",3,"ngClass"],[1,"sheet","fh-sheet"],[1,"title"],[1,"summer",3,"ngClass"],["src","./assets/images/fh/party/summer.svg"],[1,"headline",3,"click"],[1,"management"],[1,"winter",3,"ngClass"],["src","./assets/images/fh/party/winter.svg"],[1,"weeks"],["class","week","ghs-pointer-input","",3,"ghs-tooltip","ngClass","singleClick","doubleClick",4,"ngFor","ngForOf"],["class","next",3,"click",4,"ngIf"],[1,"name"],[1,"resources"],[1,"header"],[3,"click"],["class","move-resources",4,"ngIf"],[1,"resource-table"],[1,"materials"],[1,"resource","lumber"],["src","./assets/images/fh/loot/lumber.svg"],["type","number","min","0",3,"value","change"],[1,"resource","metal"],["src","./assets/images/fh/loot/metal.svg"],[1,"resource","hide"],["src","./assets/images/fh/loot/hide.svg"],[1,"herbs"],[1,"resource","arrowvine"],["src","./assets/images/fh/loot/arrowvine.svg"],[1,"resource","axenut"],["src","./assets/images/fh/loot/axenut.svg"],[1,"resource","corpsecap"],["src","./assets/images/fh/loot/corpsecap.svg"],[1,"resource","flamefruit"],["src","./assets/images/fh/loot/flamefruit.svg"],[1,"resource","rockroot"],["src","./assets/images/fh/loot/rockroot.svg"],[1,"resource","snowthistle"],["src","./assets/images/fh/loot/snowthistle.svg"],[1,"inspiration"],["type","number",3,"value","ghs-label","ghs-label-attribute","change"],[1,"total-defense"],[1,"soldiers"],[1,"soldier-table"],["class","line",4,"ngFor","ngForOf"],[1,"morale"],[1,"grid","morale-grid"],[1,"defense"],[1,"grid","defense-grid"],[1,"section",3,"ngClass"],["src","./assets/images/fh/party/section.svg"],["src","./assets/images/checkmark.svg",4,"ngIf"],[1,"town-guard-perks"],[1,"town-guard-perks-grid"],[1,"perk-list"],["class","perk",4,"ngFor","ngForOf"],["class","warning",3,"ghs-label","ghs-label-attribute",4,"ngIf"],[1,"campaign-stickers"],[1,"header",3,"submit"],["type","text",3,"autocomplete","emptyLabel","ghs-label","ghs-label-attribute","keyup.enter"],["campaignSticker",""],["src","./assets/images/plus.svg",3,"click"],[1,"stickers"],["class","sticker",4,"ngFor","ngForOf"],[3,"party"],["class","town-guard-deck-container",3,"ngClass",4,"ngIf"],["ghs-pointer-input","",1,"week",3,"ghs-tooltip","ngClass","singleClick","doubleClick"],["class","section",4,"ngFor","ngForOf"],["class","section manual",4,"ngFor","ngForOf"],[1,"section"],[3,"src"],[1,"section","manual"],[1,"next",3,"click"],["src","./assets/images/right.svg"],[1,"move-resources"],[1,"label"],["class","character",3,"click",4,"ngFor","ngForOf"],[1,"character",3,"click"],[1,"line"],[1,"soldiers-line"],["class","soldier",3,"click",4,"ngFor","ngForOf"],[1,"soldier",3,"click"],["src","./assets/images/fh/party/soldier.svg"],[1,"check",3,"ngClass"],["src","./assets/images/checkmark.svg"],["class","checkmark",4,"ngIf"],[1,"townguard-perk","checkbox",3,"ngClass","click"],[1,"checkmark"],["src","./assets/images/close.svg"],[1,"perk"],[1,"sections"],["class","section","ghs-pointer-input","",3,"ngClass","singleClick","doubleClick",4,"ngFor","ngForOf"],[3,"perk"],["ghs-pointer-input","",1,"section",3,"ngClass","singleClick","doubleClick"],[1,"warning",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/warning.svg",1,"ghs-svg"],[1,"sticker"],["class","text",4,"ngIf"],["class","image",3,"src","title",4,"ngIf"],["src","./assets/images/minus.svg",1,"remove",3,"click"],[1,"image",3,"src","title"],[1,"town-guard-deck-container",3,"ngClass"],[1,"town-guard-deck",3,"ngClass"],[3,"deck","townGuard","before","after"],[1,"active-toggle",3,"click"],[1,"numeration"],[1,"toggle-fh-sheet",3,"click"],[1,"campaign"],[1,"campaign-mode",3,"click"],[1,"checkbox",3,"ngClass"],[3,"change"],[3,"value","selected"],[3,"selected","value",4,"ngFor","ngForOf"],[1,"row","scenarios"],[1,"scenario","header","legend","seperator"],[1,"prosperity",3,"ngClass"],[1,"legend",3,"click"],[1,"level"],["src","./assets/images/fh/prosperity.svg",4,"ngIf"],["class","check",4,"ngIf"],[1,"checklist"],["class","tick",3,"autoscroll","ngClass",4,"ngFor","ngForOf"],["class","row donations",4,"ngIf"],[1,"row"],["class","achievements",4,"ngIf"],[1,"items"],[1,"item-add"],["min","1","type","number","value","",3,"focus","keyup","keyup.enter"],["itemIndex",""],[3,"ngClass","click"],[3,"ngModel","ngModelChange","change"],["value","",3,"selected"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"item-list"],["class","item",3,"ngClass",4,"ngFor","ngForOf"],[1,"treasures"],[1,"treasures-title",3,"click"],["src","./assets/images/scenario/treasure.svg",1,"icon"],[1,"treasure-add"],["treasureIndex",""],[1,"treasure-list"],["class","treasure",3,"ngClass",4,"ngFor","ngForOf"],[1,"column"],[1,"row","players"],["class","player",4,"ngFor","ngForOf"],[1,"add",3,"click"],["class","column",4,"ngIf"],["class","row",4,"ngIf"],["class","row retirements",4,"ngIf"],[3,"selected","value"],["class","scenario seperator",4,"ngIf"],["class","scenario header",4,"ngIf"],["class","scenario",4,"ngFor","ngForOf"],[1,"scenario","unlock"],[3,"ghs-label","ghs-label-attribute","keyup","keyup.enter"],["unlockScenarioIndex",""],["unlockScenarioGroup",""],["class","scenario unlock",4,"ngIf"],[1,"scenario","seperator"],[1,"scenario","header"],[1,"span"],[1,"scenario"],[3,"ghs-label",4,"ngIf"],[1,"scenario-title",3,"ngClass","ghs-tooltip","toggable","click"],["src","./assets/images/close.svg",4,"ngIf"],["class","toggle-manual",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],["class","locked",3,"ghs-tooltip","click",4,"ngIf"],["class","rewards",3,"ghs-tooltip","click",4,"ngIf"],["ghs-pointer-input","",1,"add-success",3,"ghs-label","ghs-label-attribute","ngClass","singleClick","doubleClick"],["src","./assets/images/check.svg"],[1,"ghs-svg","solo",3,"src"],[1,"toggle-manual",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/hint.svg",1,"manual"],["src","./assets/images/close.svg",1,"remove"],[1,"locked",3,"ghs-tooltip","click"],[1,"rewards",3,"ghs-tooltip","click"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"],[1,"toggle-success",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/check.svg",1,"success"],[1,"toggle-success","casual",3,"ghs-label","ghs-label-attribute","click"],[1,"scenario-title"],["src","./assets/images/fh/puzzle.svg",1,"ghs-svg"],["unlockConclusionIndex",""],["src","./assets/images/fh/prosperity.svg"],[1,"check"],[1,"checkbox","checked","disabled"],[1,"tick",3,"autoscroll","ngClass"],["class","level",3,"click",4,"ngIf"],[1,"checkbox",3,"ngClass","click"],[1,"level",3,"click"],[1,"row","donations"],["class","tick",4,"ngFor","ngForOf"],[1,"tick"],[1,"donation"],["src","./assets/images/coin.png"],[1,"achievements"],["globalAchievementInput",""],[1,"item",3,"ngClass"],[1,"item-index","open-item",3,"click"],[1,"icon",3,"src"],[1,"index"],[1,"separator"],[1,"checkbox",3,"click"],["src","./assets/images/check.svg",1,"check"],["src","./assets/images/close.svg",1,"close"],[1,"text","open-item",3,"ghs-label","click"],[1,"count",3,"click"],["class","text edition",4,"ngIf"],[1,"text","edition"],[1,"treasure",3,"ngClass"],[1,"treasure-index"],[3,"edition","index"],[1,"player"],["type","text",3,"value","change"],[1,"row","battle-goals"],[1,"row","retirements"],[1,"list",3,"ngClass"],[1,"character","header","legend","seperator"],["class","character",4,"ngFor","ngForOf"],[1,"character"],["type","number","min","1",3,"value","change","keyup"],[1,"reactivate",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/long-rest.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,LU,65,48,"div",3),t.YNc(4,pL,129,100,"div",4),t.YNc(5,fL,2,1,"span",5),t.YNc(6,mQ,88,53,"div",6),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.VKq(6,vQ,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.party)),t.xp6(1),t.Q6J("ngClass",t.WLB(8,CQ,!i.campaign&&i.fhSheet,i.campaign)),t.xp6(1),t.Q6J("ngIf",!i.campaign&&!i.fhSheet),t.xp6(1),t.Q6J("ngIf",!i.campaign&&i.fhSheet),t.xp6(1),t.Q6J("ngIf",!i.campaign),t.xp6(1),t.Q6J("ngIf",i.campaign))},dependencies:[x.mk,x.sg,x.O5,Al,wo,ko,Ca,yi,wl,Si,Dr,vU,Kf,$f,rT,ie,An,iJ,Kt,Ba,Kd,Ii,X1],styles:['.party-sheet-dialog[_ngcontent-%COMP%]{position:relative;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));justify-content:center;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{z-index:99}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));height:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] label.headline[_ngcontent-%COMP%]{width:100%;justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] img.new-party[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] img.remove-party[_ngcontent-%COMP%]{cursor:pointer;height:1.2em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] select.select-party[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:20px;-webkit-appearance:none;appearance:none;color:transparent;border:none;background:transparent url(select-arrow.ed190f6187dac3c2.svg) no-repeat right center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));box-shadow:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor)) var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:before{content:" ";position:absolute;left:50%;top:50%;width:110%;height:110%;transform:scale(0);transform-origin:top left;transition:.12s transform ease-in-out;z-index:1;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.checked[_ngcontent-%COMP%]:before{transform:scale(1) translate(-50%,-50%)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.check[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));box-shadow:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor)) var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.check[_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));background-image:url(check.9a2e06a3b28f9de1.svg);transform-origin:bottom left}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.checked.check[_ngcontent-%COMP%]:before{transform:scale(1)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.highlight[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.disabled[_ngcontent-%COMP%]{pointer-events:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{margin:0;color:var(--ghs-color-black);background-color:transparent;border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{margin:0;color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:100%;height:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{display:flex;border:none;background:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 24 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));overflow:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0;border:none;outline:none;flex-shrink:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{position:relative;display:flex;font-family:var(--ghs-font-text);align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);width:100%;min-width:0;margin:0}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-green);width:auto;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 76 * var(--ghs-dialog-factor));background-image:url(party-sheet.44d63853d27ff30a.svg);background-position:top center;background-repeat:no-repeat;background-size:contain;padding-left:calc(var(--ghs-unit) * 1.2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.column-left[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.column-right[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 17 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .location[_ngcontent-%COMP%]{display:flex;height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .notes[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 5.6 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .01 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(2,calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor)))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .key[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .key[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;justify-content:center;position:relative;font-family:var(--ghs-font-normal);height:calc(var(--ghs-unit) * 1.635 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2.1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;filter:var(--ghs-filter-red);z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:100%;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(1), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(1){height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6){height:calc(var(--ghs-unit) * 8.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(11), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(11){height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value.active[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value.active[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;height:calc(var(--ghs-unit) * 73 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));background:linear-gradient(transparent 0%,var(--ghs-color-darkgray) 100%);opacity:.2;z-index:0}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%]{display:flex;justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{width:0;height:0;margin:0;padding:0;visibility:hidden}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label.error[_ngcontent-%COMP%]{animation:shake .5s linear;color:var(--ghs-color-red)!important}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 120.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 98.5 * var(--ghs-dialog-factor));background-image:url(party-sheet.ed8405ba1054f2ed.svg)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .checkbox.checked[_ngcontent-%COMP%]:before{clip-path:none;background-color:transparent;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-top:0;display:flex;position:absolute;justify-content:space-between;top:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));left:0;width:calc(var(--ghs-unit) * 120.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-left:calc(var(--ghs-unit) * -4 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));text-transform:uppercase;flex-grow:initial}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%] .management[_ngcontent-%COMP%]{display:flex;align-items:center;font-family:var(--ghs-font-text)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%] .management[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * -1.8 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.2em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.summer[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.summer[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.summer.highlight[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.summer.highlight[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.summer.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.summer.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.winter[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.winter[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.winter.highlight[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.winter.highlight[_ngcontent-%COMP%]{color:var(--ghs-color-blue)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.winter.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.winter.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-blue)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 6.3 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 118.9 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 18.7 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(20,1fr)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%]{position:relative;cursor:pointer;width:calc(var(--ghs-unit) * 5.9 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.6 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week.checked[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:10%;left:10%;width:80%;height:80%;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week.section.checked[_ngcontent-%COMP%]:after{top:initial;bottom:0;left:20%;width:60%;height:60%;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));z-index:2;color:var(--ghs-color-darkgray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.2em;width:auto;margin-right:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section.manual[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);color:var(--ghs-color-black)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section.manual[_ngcontent-%COMP%] .manual-icon[_ngcontent-%COMP%]{height:.9em;width:auto;margin-right:0;margin-left:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;right:0;top:calc(var(--ghs-unit) * -3.5 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .next[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-left:.2em}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 26.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 59 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-top:0;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex:1 1 auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 32 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 61 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%]{display:flex;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));min-width:0;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .materials[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr;padding-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .herbs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 51 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21 * var(--ghs-dialog-factor));margin-top:0;display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center;align-self:center;font-size:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration.total-defense[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense.total-defense[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 24 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration.total-defense[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense.total-defense[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 51 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 46 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 15 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21 * var(--ghs-dialog-factor));margin-top:0;display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * -.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;flex-direction:column;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) dashed var(--ghs-color-black);border-radius:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%] .check.checked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:10%;left:10%;width:80%;height:80%;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 26.5 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 64 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 10.8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 43.2 * var(--ghs-dialog-factor));display:flex;flex-direction:column;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale.defense[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense.defense[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 75.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:relative;cursor:pointer;display:flex;justify-content:center;align-items:center;width:100%;height:calc(var(--ghs-unit) * 1.92 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * -.2 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));background-image:url(checkmark.437dd8c56b3be0e8.svg);z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;width:100%;height:calc(var(--ghs-unit) * 1.92 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:calc(var(--ghs-unit) * 5.7 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(2), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(2){height:calc(var(--ghs-unit) * 11.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(7), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(7){height:calc(var(--ghs-unit) * 3.9 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .highlight[_ngcontent-%COMP%]:after, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .highlight[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;opacity:.3;background-color:var(--ghs-color-gray);z-index:-1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 26.2 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 90 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 72 * var(--ghs-dialog-factor));flex-direction:column;display:flex;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(12,1fr);align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%] .town-guard-perk[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 54.5 * var(--ghs-dialog-factor));overflow-y:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%]{display:grid;grid-template-columns:calc(var(--ghs-unit) * 6.2 * var(--ghs-dialog-factor)) auto;margin-bottom:calc(var(--ghs-unit) * .57 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;margin-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.4 * var(--ghs-dialog-factor));background-color:var(--ghs-color-white)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:.9em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover{background-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.disabled[_ngcontent-%COMP%]{pointer-events:initial;cursor:not-allowed;border-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.disabled[_ngcontent-%COMP%]:hover{background-color:transparent}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.checked[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:10%;left:calc(var(--ghs-unit) * -1.2 * var(--ghs-dialog-factor));width:80%;height:80%;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 70.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 86.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor));flex-direction:column;display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;height:1.2em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:0;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;width:100%;height:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor));overflow-y:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%]{position:relative;height:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{height:100%;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:0;right:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.5}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%]{position:absolute;z-index:3;left:calc(var(--ghs-unit) * 115 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));height:0;transition:top .5s ease-in-out,width .5s ease-in-out,left .5s ease-in-out;overflow:visible}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%]:before{content:" ";position:sticky;display:block;top:0;left:0;width:calc(var(--ghs-unit) * 119.5 * var(--ghs-dialog-factor));height:0;background-color:var(--ghs-color-darkgray);opacity:0;transition:opacity .5s ease-in-out,height .5s ease-in-out;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container.active[_ngcontent-%COMP%]{z-index:3;top:calc(var(--ghs-unit) * 6.3 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 119.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));overflow:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container.active[_ngcontent-%COMP%]:before{height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));opacity:.5}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 37.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));transition:transform .5s ease-in-out;z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * -2.5 * var(--ghs-dialog-factor));bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);border-radius:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{position:relative;z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck.full[_ngcontent-%COMP%]{transform:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck.collapsed[_ngcontent-%COMP%]{transform:translate(123%)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]{cursor:pointer;position:absolute;left:calc(var(--ghs-unit) * -5.5 * var(--ghs-dialog-factor) * var(--ghs-barsize));top:50%;transform:translateY(-50%);width:13%;height:50%;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:hover{filter:brightness(.7) grayscale(.3)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:active, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:focus{filter:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%] .numeration[_ngcontent-%COMP%]{font-family:ghs-title;display:flex;justify-content:center;position:absolute;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor) * var(--ghs-barsize));line-height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor) * var(--ghs-barsize));width:100%;height:100%;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(icon.5a11343c46ebf913.png)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] ghs-party-buildings[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 101.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 118.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.fh-container[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 120.5 * var(--ghs-dialog-factor));overflow-x:hidden}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .toggle-fh-sheet[_ngcontent-%COMP%]{cursor:pointer;position:relative;bottom:0;left:49%;transform:translate(-50%);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;height:100%;color:var(--ghs-color-red);flex-basis:0}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip.warning[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning.warning[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip.warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning.warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%]{width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{justify-content:space-between}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .campaign-mode[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .campaign-mode[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow-y:auto;max-height:30vh}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:.3fr .7fr 2fr 1fr;text-align:left;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.header[_ngcontent-%COMP%]{font-weight:700;border-bottom:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.header.legend[_ngcontent-%COMP%]{position:sticky;top:0;background-color:var(--ghs-color-white);z-index:1;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.header.legend[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(4){justify-content:flex-start}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]:not(.header):nth-child(odd):before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-gray);opacity:.35;z-index:-1}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1/span 4;text-align:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .scenario-title[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .blocked[_ngcontent-%COMP%]{text-decoration:line-through}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .blocked[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.seperator[_ngcontent-%COMP%]{border-bottom:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] img.ghs-svg.solo[_ngcontent-%COMP%]{filter:none;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%] img.manual[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%] img.remove[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow);height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%]:hover img.remove[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%]:hover img.manual[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto;filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%] img.success[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));filter:var(--ghs-filter-green)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%] img.remove[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red) var(--ghs-filter-shadow);display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success.casual[_ngcontent-%COMP%] img.success[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success.casual[_ngcontent-%COMP%] img.remove[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%]:hover img.remove[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%]:hover img.success[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success[_ngcontent-%COMP%]{position:relative;cursor:pointer;border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none;position:absolute}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success.disabled[_ngcontent-%COMP%]{pointer-events:initial;cursor:not-allowed;border-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success.disabled[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%]{display:flex;align-items:center;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.4 * var(--ghs-dialog-factor));width:auto;margin:0 calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);outline:none;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:0;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .addScenario[_ngcontent-%COMP%]{color:var(--ghs-color-black);cursor:pointer;display:flex;justify-content:flex-end;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .addScenario[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .addScenario[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{padding-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));border-right:2px solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex-grow:1;font-size:1em;line-height:.7em;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-black);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .add[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-black);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow-y:auto;max-height:30vh}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:1fr 2fr 1.8fr 1fr 1fr .5fr;text-align:left;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.header[_ngcontent-%COMP%]{font-weight:700;border-bottom:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.header.legend[_ngcontent-%COMP%]{position:sticky;top:0;background-color:var(--ghs-color-white);z-index:1;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.header.legend[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1/span 4;text-align:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center;border:none;outline:none;min-width:0}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.seperator[_ngcontent-%COMP%]{border-bottom:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;align-items:center;padding:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:not(.separator) > span[_ngcontent-%COMP%]{border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);border-right:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:none;height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(5), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(7){justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .reactivate[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list.fh-sheet[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{grid-template-columns:1fr 2fr 1.8fr 1fr 1fr 1.4fr .5fr}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{height:auto;display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%]{height:auto;width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{width:initial}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:grid;grid-template-columns:.5fr .2fr 2fr;border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);width:100%;min-width:0;margin:0;text-align:right}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-green);width:auto;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%]{overflow-y:auto;font-size:.9em}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{display:grid;grid-template-columns:.3fr .2fr .2fr 2fr .2fr;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%]{grid-template-columns:.3fr .2fr .2fr 2fr .2fr 1fr}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:.9em;justify-self:end}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;justify-self:initial}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{cursor:crosshair;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));text-align:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{text-align:right}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:.9em;justify-self:start}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;justify-self:start;position:relative;border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{top:0;left:calc(var(--ghs-unit) * -.8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red);display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover{border:none;box-shadow:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:.9em;justify-self:start;white-space:nowrap;overflow-x:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor));height:100%;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:flex;height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]{display:flex;align-items:flex-end;height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-start}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%]:not(:first-child){margin-left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);box-shadow:none;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));font-family:var(--ghs-font-normal);position:absolute;top:0;left:0;right:0;z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick.large[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick.large[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{margin-bottom:calc(var(--ghs-unit) * -.3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .donation[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 6.2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6.2 * var(--ghs-dialog-factor));overflow:hidden}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .donation[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{position:absolute;left:0;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .donation[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor));width:100%;height:100%;z-index:-1}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * -4 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));text-transform:uppercase;flex-basis:initial}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%] *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .export[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .export[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{pointer-events:initial}']})),a})();function MQ(o,a){1&o&&t._UZ(0,"span",16),2&o&&t.Q6J("ghs-label","game.items.shop")}const Iw=function(o,a){return[o,a]};function OQ(o,a){if(1&o&&t._UZ(0,"span",17),2&o){const n=t.oxw();t.Q6J("ghs-label","game.items.shop.character")("ghs-label-args",t.WLB(2,Iw,n.character.name,n.gameManager.characterManager.characterName(n.character)))}}function PQ(o,a){if(1&o&&(t.TgZ(0,"span",32),t._UZ(1,"img",33),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.lumber," ")}}function yQ(o,a){if(1&o&&(t.TgZ(0,"span",34),t._UZ(1,"img",35),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.metal," ")}}function bQ(o,a){if(1&o&&(t.TgZ(0,"span",36),t._UZ(1,"img",37),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.hide," ")}}function xQ(o,a){if(1&o&&(t.TgZ(0,"span",38),t._UZ(1,"img",39),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.arrowvine," ")}}function wQ(o,a){if(1&o&&(t.TgZ(0,"span",40),t._UZ(1,"img",41),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.axenut," ")}}function kQ(o,a){if(1&o&&(t.TgZ(0,"span",42),t._UZ(1,"img",43),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.corpsecap," ")}}function TQ(o,a){if(1&o&&(t.TgZ(0,"span",44),t._UZ(1,"img",45),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.flamefruit," ")}}function ZQ(o,a){if(1&o&&(t.TgZ(0,"span",46),t._UZ(1,"img",47),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.rockroot," ")}}function AQ(o,a){if(1&o&&(t.TgZ(0,"span",48),t._UZ(1,"img",49),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.snowthistle," ")}}function SQ(o,a){if(1&o&&(t.TgZ(0,"div",22),t.YNc(1,PQ,3,1,"span",23),t.YNc(2,yQ,3,1,"span",24),t.YNc(3,bQ,3,1,"span",25),t.YNc(4,xQ,3,1,"span",26),t.YNc(5,wQ,3,1,"span",27),t.YNc(6,kQ,3,1,"span",28),t.YNc(7,TQ,3,1,"span",29),t.YNc(8,ZQ,3,1,"span",30),t.YNc(9,AQ,3,1,"span",31),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.lumber),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.metal),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.hide),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.arrowvine),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.axenut),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.corpsecap),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.flamefruit),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.rockroot),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.snowthistle)}}function EQ(o,a){if(1&o&&(t.TgZ(0,"div",18)(1,"span",19),t._UZ(2,"img",20),t._uU(3),t.qZA(),t.YNc(4,SQ,10,9,"div",21),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("src","./assets/images/"+(n.settingsManager.settings.fhStyle?"fh/":"")+"loot.svg",t.LSH),t.xp6(1),t.Oqu(n.character.progress.gold),t.xp6(1),t.Q6J("ngIf",n.gameManager.fhRules())}}function DQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",9),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.affordable=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update(!0))}),t.qZA(),t._UZ(2,"span",10),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.affordable),t.xp6(1),t.Q6J("ghs-label","game.items.filter.affordable")}}function IQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",9),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.sorted=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update(!0))}),t.qZA(),t._UZ(2,"span",10),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.sorted),t.xp6(1),t.Q6J("ghs-label","game.items.filter.sorted")}}const dT=function(o){return{disabled:o}};function NQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",52)(1,"input",53),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setEdition(s))}),t.qZA(),t._UZ(2,"span",10),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(3,dT,e.currentEdition==n)),t.xp6(1),t.Q6J("checked",e.currentEdition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function JQ(o,a){if(1&o&&(t.TgZ(0,"div",50),t.YNc(1,NQ,3,5,"label",51),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.editions)}}const hT=function(o){return[o]},uT=function(){return[]};function UQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.addItem(i.selected,!0))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items.add")("ghs-label-args",n.selected?t.VKq(2,hT,n.selected.name):t.DdM(4,uT))}}function LQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",60),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(!!i.selected&&(i.selected.cost?i.buyItem(i.selected):i.craftItem(i.selected)))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(3,dT,!n.selected||!n.gameManager.itemManager.canBuy(n.selected,n.character)&&!n.gameManager.itemManager.canCraft(n.selected,n.character)))("ghs-label","game.items."+(n.selected?n.selected.cost?"buy":"craft":"choose"))("ghs-label-args",n.selected?t.WLB(5,Iw,n.selected.name,""+(n.selected.cost+n.gameManager.itemManager.pricerModifier())):t.DdM(8,uT))}}function QQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.removeItem(i.selected))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items.remove")("ghs-label-args",t.VKq(2,hT,n.selected.name))}}function RQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",61),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.sellItem(i.selected))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items.sell")("ghs-label-args",t.WLB(2,Iw,n.selected.name,""+n.gameManager.itemManager.itemSellValue(n.selected)))}}function FQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",54)(1,"a",55),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t.qZA(),t.YNc(2,UQ,1,5,"a",56),t.YNc(3,LQ,1,9,"a",57),t.YNc(4,QQ,1,4,"a",56),t.YNc(5,RQ,1,5,"a",58),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngIf",n.selected&&!n.gameManager.itemManager.owned(n.selected,n.character)),t.xp6(1),t.Q6J("ngIf",!n.selected||!n.gameManager.itemManager.owned(n.selected,n.character)),t.xp6(1),t.Q6J("ngIf",n.selected&&n.gameManager.itemManager.owned(n.selected,n.character)),t.xp6(1),t.Q6J("ngIf",n.selected&&n.gameManager.itemManager.owned(n.selected,n.character))}}function qQ(o,a){1&o&&(t.TgZ(0,"div",14)(1,"div",62),t._UZ(2,"span",10),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","game.items.empty"))}const HQ=function(o,a,n,e,i){return{selected:o,disabled:a,filtered:n,unavailable:e,owned:i}};function jQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",68),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.select(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.select(i,!0))}),t.qZA()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.Q6J("item",e)("flipped",!0)("count",s.character?s.itemsMeta[i].countAvailable<1?"-":s.itemsMeta[i].assigned+1:1)("editionLabel",s.currentEdition)("ngClass",t.qbA(5,HQ,e==s.selected,!s.character,!s.itemsMeta[i].canAdd,!s.itemsMeta[i].canBuy&&!s.itemsMeta[i].canCraft,s.itemsMeta[i].owned))}}function BQ(o,a){if(1&o&&t._UZ(0,"ghs-item",69),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.Q6J("item",e)("flipped",!0)("count",s.character?s.itemsMeta[i].countAvailable<1?"-":s.itemsMeta[i].assigned+1:1)("editionLabel",s.currentEdition)}}function zQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",70),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.removeUnlocked(i))}),t._UZ(1,"img",71),t.qZA()}}const GQ=function(o){return{equipped:o}};function VQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",72),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEquippedItem(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEquippedItem(i,!0))}),t._UZ(1,"img",73),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(1,GQ,e.gameManager.itemManager.isEquipped(n,e.character)))}}function YQ(o,a){if(1&o&&(t.TgZ(0,"div",63),t.YNc(1,jQ,1,11,"ghs-item",64),t.YNc(2,BQ,1,4,"ghs-item",65),t.YNc(3,zQ,2,0,"a",66),t.YNc(4,VQ,2,3,"a",67),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.character),t.xp6(1),t.Q6J("ngIf",!e.character||!e.select),t.xp6(1),t.Q6J("ngIf",!e.all&&e.unlocked(n)),t.xp6(1),t.Q6J("ngIf",e.character&&e.gameManager.itemManager.owned(n,e.character))}}function KQ(o,a){1&o&&t._UZ(0,"span",76),2&o&&t.Q6J("ghs-label","game.items.unlock")}function $Q(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",70),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.removeUnlocked(i))}),t._UZ(1,"img",71),t.qZA()}}function WQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",63)(1,"ghs-item",74),t.NdJ("revealed",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.unlockItemReveal(l,i))}),t.qZA(),t.YNc(2,KQ,1,1,"span",75),t.YNc(3,$Q,2,0,"a",66),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("item",n)("reveal",!0)("flipped",e.unlocked(n))("editionLabel",e.currentEdition),t.xp6(1),t.Q6J("ngIf",!e.unlocked(n)),t.xp6(1),t.Q6J("ngIf",!e.all&&e.unlocked(n))}}const XQ=function(o,a){return{fh:o,modern:a}};let tm=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"currentEdition",void 0),(0,_.Z)(this,"editions",void 0),(0,_.Z)(this,"editionItems",[]),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"itemsMeta",[]),(0,_.Z)(this,"selected",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"filter",""),(0,_.Z)(this,"all",!1),(0,_.Z)(this,"affordable",!1),(0,_.Z)(this,"sorted",!1),(0,_.Z)(this,"unlocks",[]),(0,_.Z)(this,"campaignMode",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.data=e,this.dialogRef=i,this.selected=void 0,this.character=e.select,this.sorted=null!=this.character&&this.character.progress.items.length>0,this.edition=e.edition,this.affordable=e.affordable||!1,this.campaignMode=this.edition&&d.v.game.party.campaignMode||!1,this.editions=this.edition?d.v.itemManager.itemEditions(this.edition):d.v.itemManager.itemEditions(),this.all=null==this.edition,this.currentEdition=this.edition||this.editions[0]}ngOnInit(){this.updateEditionItems(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}setEdition(e){this.currentEdition=e,this.updateEditionItems()}updateEditionItems(){this.editions=this.all?d.v.itemManager.itemEditions():this.edition&&!this.campaignMode?d.v.itemManager.itemEditions(this.edition):[],-1==this.editions.indexOf(this.currentEdition)&&(this.currentEdition=this.edition||this.editions[0]),this.editionItems=this.edition&&this.campaignMode&&!this.all?d.v.itemManager.getItems(this.edition):d.v.itemManager.getItems(this.currentEdition,this.all).filter(e=>e.edition==this.currentEdition),this.all&&(this.sorted=!1),this.update()}update(e=!1){this.unlocks=[],this.selected=void 0,this.items=this.editionItems.filter(i=>!this.affordable||d.v.itemManager.assigned(i)!this.affordable||this.character&&d.v.itemManager.canAdd(i,this.character)&&(d.v.itemManager.canBuy(i,this.character)||d.v.itemManager.canCraft(i,this.character))),this.character&&this.edition&&this.campaignMode&&!this.all&&!this.affordable&&this.character.progress.items.forEach(i=>{if(i.edition==this.edition&&!this.items.find(s=>s.id==+i.name&&s.edition==i.edition)){const s=d.v.itemManager.getItem(+i.name,i.edition,!0);s&&this.items.push(s)}}),this.items=this.items.filter(i=>!this.filter||(0,he.eL)(i.name,this.filter)||(0,he.eL)((i.id<100?"0":"")+(i.id<10?"0":"")+i.id,this.filter)),this.campaignMode&&this.edition&&!this.all&&!this.affordable&&(this.unlocks=d.v.itemManager.getItems(this.edition,!0).filter(i=>(""+i.id==this.filter||"0"+i.id==this.filter||"00"+i.id==this.filter)&&!this.items.find(s=>s.id==i.id&&s.edition==i.edition))),!e&&this.affordable&&0==this.items.length?(this.affordable=!1,this.sorted=null!=this.character&&this.character.progress.items.length>0,this.update()):this.items.sort((i,s)=>{if(this.sorted){if(this.character){if(d.v.itemManager.owned(i,this.character)&&!d.v.itemManager.owned(s,this.character))return-1;if(d.v.itemManager.owned(s,this.character)&&!d.v.itemManager.owned(i,this.character))return 1;if((d.v.itemManager.canBuy(i,this.character)||d.v.itemManager.canCraft(i,this.character))&&!d.v.itemManager.canBuy(s,this.character)&&!d.v.itemManager.canCraft(s,this.character))return-1;if((d.v.itemManager.canBuy(s,this.character)||d.v.itemManager.canCraft(s,this.character))&&!d.v.itemManager.canBuy(i,this.character)&&!d.v.itemManager.canCraft(i,this.character))return 1;if(d.v.itemManager.canAdd(i,this.character)&&!d.v.itemManager.canAdd(s,this.character))return-1;if(d.v.itemManager.canAdd(s,this.character)&&!d.v.itemManager.canAdd(i,this.character))return 1;if(i.slot&&!s.slot)return-1;if(s.slot&&!i.slot)return 1}return i.slot&&s.slot?Object.values(Ni.SE).indexOf(i.slot)-Object.values(Ni.SE).indexOf(s.slot):0}return i.edition!=s.edition?i.edition==this.currentEdition?-1:1:i.id-s.id}),this.character&&(this.itemsMeta=[],this.items.forEach(i=>{this.character&&this.itemsMeta.push({canAdd:d.v.itemManager.canAdd(i,this.character),canBuy:d.v.itemManager.canBuy(i,this.character),canCraft:d.v.itemManager.canCraft(i,this.character),owned:d.v.itemManager.owned(i,this.character),assigned:d.v.itemManager.assigned(i),countAvailable:d.v.itemManager.countAvailable(i)})}))}select(e,i=!1){this.data.select&&(this.selected=this.selected!=e&&(i||this.character&&(d.v.itemManager.owned(e,this.character)||d.v.itemManager.canAdd(e,this.character)&&(d.v.itemManager.canBuy(e,this.character)||d.v.itemManager.canCraft(e,this.character))))?e:void 0)}unlocked(e){return d.v.game.party.unlockedItems&&null!=d.v.game.party.unlockedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}unlockItemReveal(e,i){-1!=this.unlocks.indexOf(e)&&i&&(d.v.game.party.unlockedItems=d.v.game.party.unlockedItems||[],this.unlocked(e)||(d.v.stateManager.before("addUnlockedItem",e.edition,""+e.id,e.name),d.v.game.party.unlockedItems.push(new Vn.Jc(""+e.id,e.edition)),d.v.stateManager.after(),this.updateEditionItems()))}removeUnlocked(e){this.unlocked(e)&&(d.v.stateManager.before("removeUnlockedItem",e.edition,""+e.id,e.name),d.v.game.party.unlockedItems=d.v.game.party.unlockedItems||[],d.v.game.party.unlockedItems=d.v.game.party.unlockedItems.filter(i=>i.name!=""+e.id||i.edition!=e.edition),d.v.stateManager.after(),this.updateEditionItems())}addItem(e,i=!1){this.character&&(d.v.itemManager.canAdd(e,this.character)||i)&&(d.v.stateManager.before("addItem","data.character."+this.character.name,e.id+"",e.edition),d.v.itemManager.addItem(e,this.character),d.v.stateManager.after(),this.update())}buyItem(e){this.character&&d.v.itemManager.canBuy(e,this.character)&&(d.v.stateManager.before("buyItem","data.character."+this.character.name,e.id+"",e.edition),d.v.itemManager.buyItem(e,this.character),d.v.stateManager.after(),this.update())}craftItem(e){this.character&&d.v.itemManager.canCraft(e,this.character)&&(d.v.stateManager.before("craftItem","data.character."+this.character.name,e.id+"",e.edition),d.v.itemManager.craftItem(e,this.character),d.v.stateManager.after(),this.update())}removeItem(e){const i=this.character&&this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(i&&this.character){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("removeItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),d.v.itemManager.removeItem(e,this.character),d.v.stateManager.after(),this.update()}}sellItem(e){const i=this.character&&this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(this.character&&i&&d.v.itemManager.itemSellValue(e)){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("sellItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),d.v.itemManager.sellItem(e,this.character),d.v.stateManager.after(),this.update()}}toggleEquippedItem(e,i=!1){if(this.character&&(!(d.v.game.state!=ge.D2.draw||d.v.game.round>0)||i)){const m=this.character.progress.equippedItems.map(O=>this.items.find(k=>O.name==""+k.id&&k.edition==O.edition)).filter(O=>O).map(O=>O).indexOf(e);d.v.stateManager.before(-1!=m?"unequipItem":"equipItem","data.character."+this.character.name,e.name,e.edition),d.v.itemManager.toggleEquippedItem(e,this.character,i),d.v.stateManager.after()}}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-items-dialog"]],decls:21,vars:19,consts:[[1,"items-dialog",3,"ngClass"],[1,"scroll-container"],[1,"header"],["class","title",3,"ghs-label",4,"ngIf"],["class","title",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","resources",4,"ngIf"],[1,"filter"],["type","text",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","keyup"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange","change"],[3,"ghs-label"],["class","editions",4,"ngIf"],["class","menu",4,"ngIf"],["class","item-list",4,"ngIf"],[1,"item-list"],["class","item",4,"ngFor","ngForOf"],[1,"title",3,"ghs-label"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"resources"],[1,"resource","gold"],[3,"src"],["class","resource-grid",4,"ngIf"],[1,"resource-grid"],["class","resource lumber",4,"ngIf"],["class","resource metal",4,"ngIf"],["class","resource hide",4,"ngIf"],["class","resource arrowvine",4,"ngIf"],["class","resource axenut",4,"ngIf"],["class","resource corpsecap",4,"ngIf"],["class","resource flamefruit",4,"ngIf"],["class","resource rockroot",4,"ngIf"],["class","resource snowthistle",4,"ngIf"],[1,"resource","lumber"],["src","./assets/images/fh/loot/lumber.svg"],[1,"resource","metal"],["src","./assets/images/fh/loot/metal.svg"],[1,"resource","hide"],["src","./assets/images/fh/loot/hide.svg"],[1,"resource","arrowvine"],["src","./assets/images/fh/loot/arrowvine.svg"],[1,"resource","axenut"],["src","./assets/images/fh/loot/axenut.svg"],[1,"resource","corpsecap"],["src","./assets/images/fh/loot/corpsecap.svg"],[1,"resource","flamefruit"],["src","./assets/images/fh/loot/flamefruit.svg"],[1,"resource","rockroot"],["src","./assets/images/fh/loot/rockroot.svg"],[1,"resource","snowthistle"],["src","./assets/images/fh/loot/snowthistle.svg"],[1,"editions"],["class","edition",3,"ngClass",4,"ngFor","ngForOf"],[1,"edition",3,"ngClass"],["type","checkbox",3,"checked","change"],[1,"menu"],[1,"cancel",3,"ghs-label","click"],["class","secondary",3,"ghs-label","ghs-label-args","click",4,"ngIf"],["class","primary",3,"ngClass","ghs-label","ghs-label-args","click",4,"ngIf"],["class","primary",3,"ghs-label","ghs-label-args","click",4,"ngIf"],[1,"secondary",3,"ghs-label","ghs-label-args","click"],[1,"primary",3,"ngClass","ghs-label","ghs-label-args","click"],[1,"primary",3,"ghs-label","ghs-label-args","click"],[1,"empty"],[1,"item"],["ghs-pointer-input","",3,"item","flipped","count","editionLabel","ngClass","singleClick","doubleClick",4,"ngIf"],[3,"item","flipped","count","editionLabel",4,"ngIf"],["class","button-remove",3,"click",4,"ngIf"],["class","button-equip","ghs-pointer-input","",3,"ngClass","singleClick","doubleClick",4,"ngIf"],["ghs-pointer-input","",3,"item","flipped","count","editionLabel","ngClass","singleClick","doubleClick"],[3,"item","flipped","count","editionLabel"],[1,"button-remove",3,"click"],["src","./assets/images/minus.svg",1,"ghs-svg"],["ghs-pointer-input","",1,"button-equip",3,"ngClass","singleClick","doubleClick"],["src","./assets/images/check.svg",1,"ghs-svg"],[3,"item","reveal","flipped","editionLabel","revealed"],["class","overlay-text",3,"ghs-label",4,"ngIf"],[1,"overlay-text",3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,MQ,1,1,"span",3),t.YNc(4,OQ,1,5,"span",4),t.YNc(5,EQ,5,3,"div",5),t.TgZ(6,"div",6)(7,"input",7),t.NdJ("ngModelChange",function(l){return i.filter=l})("keyup",function(){return i.update()}),t.qZA(),t.YNc(8,DQ,3,2,"label",8),t.YNc(9,IQ,3,2,"label",8),t.TgZ(10,"label")(11,"input",9),t.NdJ("ngModelChange",function(l){return i.all=l})("change",function(){return i.updateEditionItems()}),t.qZA(),t._uU(12," <"),t._UZ(13,"span",10),t._uU(14,"(!)> "),t.qZA()(),t.YNc(15,JQ,2,1,"div",11),t.qZA(),t.YNc(16,FQ,6,5,"div",12),t.YNc(17,qQ,3,1,"div",13),t.TgZ(18,"div",14),t.YNc(19,YQ,5,4,"div",15),t.YNc(20,WQ,4,6,"div",15),t.qZA()()()),2&e&&(t.Q6J("ngClass",t.WLB(16,XQ,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ngIf",!i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(2),t.Q6J("ngModel",i.filter)("ghs-label","game.items.filter")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(2),t.Q6J("ngModel",i.all),t.xp6(2),t.Q6J("ghs-label","game.items.filter.all"),t.xp6(2),t.Q6J("ngIf",i.editions&&i.editions.length>1),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",0==i.items.length&&0==i.unlocks.length),t.xp6(2),t.Q6J("ngForOf",i.items),t.xp6(1),t.Q6J("ngForOf",i.unlocks))},dependencies:[x.mk,x.sg,x.O5,Ho,va,yi,Si,Xd,ie,An],styles:[".items-dialog[_ngcontent-%COMP%]{position:relative}.items-dialog[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{overflow-x:hidden;max-height:calc(90vh - var(--ghs-unit) * 6)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-white);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:.25em;height:1.2em;width:auto;filter:var(--ghs-filter-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource.gold[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center;z-index:1}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{max-width:100%;min-width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-white);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{position:sticky;top:0;left:0;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));max-width:100%;display:flex;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:10}.items-dialog[_ngcontent-%COMP%] .menu.small[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)) 0;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center;margin:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.primary[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.secondary[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}@media (max-width: 600px),(orientation: portrait){.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{flex-direction:column-reverse;height:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{min-width:initial}}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{position:relative;display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;border:calc(var(--ghs-unit) * .35 * var(--ghs-dialog-factor)) solid transparent;border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));overflow:hidden;cursor:pointer}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.disabled[_ngcontent-%COMP%]{cursor:initial;opacity:.5}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.unavailable[_ngcontent-%COMP%]{cursor:not-allowed;border-color:var(--ghs-color-red)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.filtered[_ngcontent-%COMP%]{cursor:initial;border-color:var(--ghs-color-darkgray);filter:grayscale(.3)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.owned[_ngcontent-%COMP%]{border-color:var(--ghs-color-blue)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.selected[_ngcontent-%COMP%]{border-color:var(--ghs-color-green)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .overlay-text[_ngcontent-%COMP%]{cursor:pointer;z-index:1;position:absolute;display:flex;justify-content:center;align-items:center;top:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:100%;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-darkgray)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;bottom:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 11.8 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));opacity:.6}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:100%;height:auto;filter:var(--ghs-filter-white)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip.equipped[_ngcontent-%COMP%]{opacity:1}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip.equipped[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]:hover{opacity:.6}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]:hover.equipped .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}@media (max-width: 600px),(orientation: portrait){.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.items-dialog.fh[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.items-dialog.modern[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}"]})),a})();const qO=function(o){return{disabled:o}};function tR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"label",17)(2,"input",2),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setEdition(s))}),t.qZA(),t._UZ(3,"span",3),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(3,qO,e.gameManager.game.edition==n)),t.xp6(1),t.Q6J("checked",e.gameManager.game.edition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function eR(o,a){1&o&&(t.TgZ(0,"div",10)(1,"label"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","campaign"))}function nR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openPartySheet())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.party"))}function iR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openCampaignSheet())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.sheet"))}function oR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openMap())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.map"))}function aR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openItems())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.items"))}function sR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openBattleGoalsSetup())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.battleGoals"))}function rR(o,a){1&o&&(t.TgZ(0,"div",10)(1,"label"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","campaign.character"))}function cR(o,a){if(1&o&&(t.TgZ(0,"span",22),t._uU(1,"\xa0 "),t.TgZ(2,"span"),t._uU(3,"["),t.qZA(),t._UZ(4,"span",3),t.TgZ(5,"span"),t._uU(6,"]"),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(4),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function lR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"a",19),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.openCharacterSheet(s))}),t._UZ(2,"img",20),t.TgZ(3,"span"),t._uU(4),t.qZA(),t.YNc(5,cR,7,1,"span",21),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Oqu(e.gameManager.characterManager.characterName(n,!0)),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function gR(o,a){if(1&o&&(t.ynx(0),t.YNc(1,lR,6,3,"div",4),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.characters)}}const _T=function(o,a){return{disabled:o,active:a}};function dR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",23)(1,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s.name))}),t._UZ(2,"img",25),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.WLB(7,_T,-1!=e.editionConditions.indexOf(n.name),-1==e.editionConditions.indexOf(n.name)&&-1!=e.gameManager.game.conditions.indexOf(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH)}}function hR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",23)(1,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s.name))}),t._UZ(2,"img",25),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.WLB(7,_T,-1!=e.editionConditions.indexOf(n.name),-1==e.editionConditions.indexOf(n.name)&&-1!=e.gameManager.game.conditions.indexOf(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH)}}function uR(o,a){1&o&&(t.ynx(0),t._UZ(1,"img",26),t.TgZ(2,"span",27),t._UZ(3,"span",28),t.qZA(),t.BQk()),2&o&&(t.xp6(3),t.Q6J("ghs-label","campaign.campaignManagement.hint"))}function _R(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(n.name)}}function pR(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",3),t._uU(2),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ghs-label","party.campaign"),t.xp6(1),t.hij("\xa0",n.id,"")}}function fR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",17)(1,"input",2),t.NdJ("change",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.changeParty(i))}),t.qZA(),t.YNc(2,_R,2,1,"span",9),t.YNc(3,pR,3,2,"span",9),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(4,qO,1==e.gameManager.game.parties.length||e.gameManager.game.scenario)),t.xp6(1),t.Q6J("checked",e.gameManager.game.party==n),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(1),t.Q6J("ngIf",!n.name)}}const mR=function(o){return[o]};function vR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label"),t._UZ(1,"input",32),t.TgZ(2,"input",33),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setName(i))}),t.qZA()()}if(2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("value",n.name)("ghs-label","campaign.campaignManagement.name")("ghs-label-args",t.VKq(4,mR,""+n.id))("ghs-label-attribute","placeholder")}}const CR=function(o,a){return{disabled:o,confirm:a}};function MR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11),t.YNc(1,fR,4,6,"label",29),t.YNc(2,vR,3,6,"label",9),t._UZ(3,"span",30),t.TgZ(4,"a",31),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeParty(s))})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelRemoveParty())}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.gameManager.game.party!=n),t.xp6(1),t.Q6J("ngIf",e.gameManager.game.party==n),t.xp6(2),t.Q6J("ngClass",t.WLB(3,CR,1==e.gameManager.game.parties.length||e.gameManager.game.scenario,e.confirmPartyDelete==n.id))}}let OR=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"close",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"conditions",[]),(0,_.Z)(this,"amConditions",[]),(0,_.Z)(this,"editionConditions",[]),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"confirmPartyDelete",-1),(0,_.Z)(this,"worldMap",!1),this.dialog=e}ngOnInit(){this.update()}update(){this.characters=d.v.game.figures.filter(i=>i instanceof oe.z).map(i=>i).sort((i,s)=>{const l=i.title.toLowerCase()||R.r.getLabel("data.character."+i.name).toLowerCase(),m=s.title.toLowerCase()||R.r.getLabel("data.character."+s.name).toLowerCase();return l>m?1:lnew re.gP(i)).filter(i=>-1==i.types.indexOf(re.CP.hidden)),this.amConditions=Object.values(re.fT).map(i=>new re.gP(i)).filter(i=>-1!=i.types.indexOf(re.CP.amDeck)),this.editionConditions=d.v.conditions(d.v.game.edition,!0).map(i=>i.name);const e=d.v.editionData.find(i=>i.edition==d.v.game.edition);e&&e.worldMap&&(this.worldMap=!0)}setEdition(e=void 0){d.v.stateManager.before("setEdition","data.edition."+e),R.r.settings.automaticTheme&&R.r.setFhStyle("fh"==e),d.v.game.edition=e,d.v.game.party.edition=e,this.editionConditions=d.v.conditions(d.v.game.edition,!0).map(i=>i.name),d.v.stateManager.after()}toggleCampaignMode(){d.v.stateManager.before(d.v.game.party.campaignMode?"disablePartyCampaignMode":"enablePartyCampaignMode"),d.v.game.party.campaignMode=!d.v.game.party.campaignMode,d.v.stateManager.after()}toggleCondition(e){-1==this.editionConditions.indexOf(e)&&(d.v.stateManager.before(-1==d.v.game.conditions.indexOf(e)?"addGameCondition":"removeGameCondition",e),-1==d.v.game.conditions.indexOf(e)?d.v.game.conditions.push(e):d.v.game.conditions=d.v.game.conditions.filter(i=>e!=i),d.v.stateManager.after())}openCharacterSheet(e){this.dialog.open(IO,{panelClass:["dialog-invert"],data:e}),this.close.emit()}openPartySheet(){this.dialog.open(Dw,{panelClass:["dialog-invert"],data:{partySheet:!0}}),this.close.emit()}openCampaignSheet(){this.dialog.open(Dw,{panelClass:["dialog-invert"],data:{campaign:!0}}),this.close.emit()}openMap(){this.dialog.open(aT,{backdropClass:"fullscreen-backdrop",panelClass:"fullscreen-panel",data:d.v.game.edition}),this.close.emit()}openBattleGoalsSetup(){this.dialog.open(UO,{panelClass:["dialog"]}),this.close.emit()}openItems(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition}}),this.close.emit()}addParty(){let e=new Mw.f,i=0;for(;d.v.game.parties.some(s=>s.id==i);)i++;e.id=i,d.v.stateManager.before("addParty",e.name||"%party% "+e.id),d.v.game.parties.push(e),d.v.changeParty(e),this.update(),d.v.stateManager.after()}changeParty(e){d.v.stateManager.before("changeParty",e.name||"%party% "+e.id),d.v.changeParty(e),this.update(),d.v.stateManager.after()}removeParty(e){d.v.game.parties.length>1&&(this.confirmPartyDelete!=e.id?this.confirmPartyDelete=e.id:(d.v.stateManager.before("removeParty",e.name||"%party% "+e.id),d.v.game.parties.splice(d.v.game.parties.indexOf(e),1),d.v.game.party.id==e.id&&d.v.changeParty(d.v.game.parties[0]),this.update(),d.v.stateManager.after(),this.cancelRemoveParty()))}cancelRemoveParty(){this.confirmPartyDelete=-1}setName(e){d.v.game.party.name!=e.target.value&&(d.v.stateManager.before("setPartyName",e.target.value),d.v.game.party.name=e.target.value,d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-campaign-menu"]],outputs:{close:"close"},decls:37,vars:26,consts:[[1,"menu-container","two-column","sheets"],[1,"line","span",3,"ngClass"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","line",4,"ngFor","ngForOf"],[1,"line","separator"],["class","line title span",4,"ngIf"],["class","line span",4,"ngIf"],["class","line",4,"ngIf"],[4,"ngIf"],[1,"line","title","span"],[1,"line"],[1,"conditions"],["class","item",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"line","span"],[3,"ghs-label","ngClass","click"],[3,"ngClass"],[3,"ghs-label","click"],[3,"click"],[1,"icon",3,"src"],["class","edition",4,"ngIf"],[1,"edition"],[1,"item"],[1,"condition",3,"ghs-tooltip","originX","overlayX","originY","overlayY","ngClass","click"],[3,"src"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg"],[1,"hint"],[1,"text",3,"ghs-label"],[3,"ngClass",4,"ngIf"],[1,"spacer"],[1,"remove",3,"ngClass","click","mouseleave"],["type","checkbox","checked","true","disabled","disabled"],["type","text",3,"value","ghs-label","ghs-label-args","ghs-label-attribute","change"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"label")(3,"input",2),t.NdJ("change",function(){return i.setEdition()}),t.qZA(),t._uU(4," <"),t._UZ(5,"span",3),t._uU(6,"> "),t.qZA()(),t.YNc(7,tR,4,5,"div",4),t.TgZ(8,"div",5)(9,"label")(10,"input",2),t.NdJ("change",function(){return i.toggleCampaignMode()}),t.qZA(),t._UZ(11,"span",3),t.qZA()(),t.YNc(12,eR,3,1,"div",6),t.YNc(13,nR,2,1,"div",7),t.YNc(14,iR,2,1,"div",7),t.YNc(15,oR,2,1,"div",8),t.YNc(16,aR,2,1,"div",7),t.YNc(17,sR,2,1,"div",8),t.YNc(18,rR,3,1,"div",6),t.YNc(19,gR,2,1,"ng-container",9),t.TgZ(20,"div",10)(21,"label"),t._UZ(22,"span",3),t.qZA()(),t.TgZ(23,"div",11)(24,"div",12),t.YNc(25,dR,3,10,"span",13),t.qZA()(),t.TgZ(26,"div",11)(27,"div",12),t.YNc(28,hR,3,10,"span",13),t.qZA()(),t.TgZ(29,"div",10)(30,"div",14)(31,"label"),t._UZ(32,"span",3),t.qZA(),t.YNc(33,uR,4,1,"ng-container",9),t.qZA()(),t.YNc(34,MR,5,6,"div",4),t.TgZ(35,"div",15)(36,"a",16),t.NdJ("click",function(){return i.addParty()}),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.VKq(22,qO,!i.gameManager.game.edition)),t.xp6(2),t.Q6J("checked",!i.gameManager.game.edition),t.xp6(2),t.Q6J("ghs-label","edition.all"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(3),t.Q6J("checked",i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ghs-label","party.campaignMode"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.partySheet||i.settingsManager.settings.characterSheet||i.settingsManager.settings.characterItems),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.partySheet),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.partySheet),t.xp6(1),t.Q6J("ngIf",i.worldMap),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterSheet||i.settingsManager.settings.characterItems),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.battleGoals),t.xp6(1),t.Q6J("ngIf",i.characters.length>0&&i.settingsManager.settings.characterSheet),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterSheet),t.xp6(3),t.Q6J("ghs-label","edition.conditions"),t.xp6(3),t.Q6J("ngForOf",i.conditions),t.xp6(3),t.Q6J("ngForOf",i.amConditions),t.xp6(4),t.Q6J("ghs-label","campaign.campaignManagement"),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.parties),t.xp6(2),t.Q6J("ghs-label","campaign.campaignManagement.add")("ngClass",t.VKq(24,qO,i.gameManager.game.scenario)))},dependencies:[x.mk,x.sg,x.O5,ie,Ba],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}','.conditions[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{cursor:initial;position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{cursor:pointer;display:flex;position:relative;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:after{pointer-events:none;content:" ";height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);position:absolute;bottom:0;left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));transform:translate(-50%)}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value.stack[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor))}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]:after{border:calc(var(--ghs-unit) / 4) var(--ghs-color-darkgray) solid;border-radius:100%}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-green) solid;border-radius:100%}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-green) solid;border-radius:100%}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-red) solid}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]{pointer-events:initial;cursor:initial}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{opacity:.7}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 4) var(--ghs-color-darkgray) solid}.remove[_ngcontent-%COMP%]{cursor:pointer!important;display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.remove[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 80%,30% 50%,0 20%,20% 0,50% 30%,80% 0,100% 20%,70% 50%,100% 80%,80% 100%,50% 70%,20% 100%);background-color:var(--ghs-color-gray)}.remove[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.remove.confirm[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-red)}.remove.disabled[_ngcontent-%COMP%]{pointer-events:none}.remove.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-darkgray)!important}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}.conditions[_ngcontent-%COMP%]{grid-template-columns:repeat(4,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)))}}']})),a})();var pT=E(3329);const PR=["inputEditionDataUrl"],yR=["inputSpoiler"],bR=["inputUnlock"];function xR(o,a){1&o&&t._UZ(0,"img",27)}const em=function(o){return{hidden:o}};function wR(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",3)(2,"div",28)(3,"label",29),t._UZ(4,"span",5),t.TgZ(5,"input",30,31),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(6),s=t.oxw();return t.KtG(s.settingsManager.setAutoBackup(+i.value))}),t.qZA()(),t._UZ(7,"img",32),t.TgZ(8,"div",33)(9,"div",34),t._UZ(10,"div",5),t.qZA()()()(),t.TgZ(11,"div",3)(12,"label")(13,"input",11),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAutoBackupFinish(!i.settingsManager.settings.autoBackupFinish))}),t.qZA(),t._UZ(14,"span",5),t.qZA()(),t.TgZ(15,"div",3)(16,"div",35)(17,"label",29),t._UZ(18,"span",5),t.qZA(),t.TgZ(19,"input",36,37),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(21,"img",32),t.TgZ(22,"div",33)(23,"div",34),t._UZ(24,"div",5),t.qZA()()()(),t.TgZ(25,"div",9)(26,"div",35)(27,"label",29),t._UZ(28,"span",5),t.qZA(),t.TgZ(29,"select",38,39),t.NdJ("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.TgZ(31,"option",40),t._UZ(32,"span",5),t.qZA(),t.TgZ(33,"option",41),t._UZ(34,"span",5),t.qZA(),t.TgZ(35,"option",42),t._UZ(36,"span",5),t.qZA()(),t._UZ(37,"img",32),t.TgZ(38,"div",33)(39,"div",34),t._UZ(40,"div",5),t.qZA()()()(),t.TgZ(41,"div",9)(42,"div",35)(43,"label",29)(44,"input",11,43),t.NdJ("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(46,"span",5),t.qZA(),t._UZ(47,"img",32),t.TgZ(48,"div",33)(49,"div",34),t._UZ(50,"div",5),t.qZA()()()(),t.TgZ(51,"div",9)(52,"div",35)(53,"label",29),t._UZ(54,"span",5),t.qZA(),t.TgZ(55,"input",36,44),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(57,"img",32),t.TgZ(58,"div",33)(59,"div",34),t._UZ(60,"div",5),t.qZA()()()(),t.TgZ(61,"div",9)(62,"div",35)(63,"label",29),t._UZ(64,"span",5),t.qZA(),t.TgZ(65,"input",36,45),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(67,"img",32),t.TgZ(68,"div",33)(69,"div",34),t._UZ(70,"div",5),t.qZA()()()(),t.TgZ(71,"div",9)(72,"div",35)(73,"label",29),t._UZ(74,"span",5),t.qZA(),t.TgZ(75,"input",36,46),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(77,"img",32),t.TgZ(78,"div",33)(79,"div",34),t._UZ(80,"div",5),t.qZA()()()(),t.BQk()}if(2&o){const n=t.MAs(6),e=t.MAs(20),i=t.oxw();t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.count"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.autoBackup)("size",n.value.length)("ghs-label","datamanagement.backup.auto.count")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.countHint"),t.xp6(3),t.Q6J("checked",i.settingsManager.settings.autoBackupFinish),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.auto.onFinish"),t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.url)("ghs-label","datamanagement.backup.auto.uploadUrl")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(42,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.method),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.post"),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.put"),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.get"),t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(44,em,!e.value)),t.xp6(3),t.Q6J("checked",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.fileUpload),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlFileUpload"),t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlFileUpload.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(46,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlAuthorization"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.authorization)("ghs-label","datamanagement.backup.auto.uploadUrlAuthorization")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlAuthorization.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(48,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlUsername"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.username)("ghs-label","datamanagement.backup.auto.uploadUrlUsername")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlUsername.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(50,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlPassword"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.password)("ghs-label","datamanagement.backup.auto.uploadUrlPassword")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlPassword.hint")}}function kR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",47),t._uU(1),t._UZ(2,"span",21),t.TgZ(3,"span",48),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeUnlock(s))}),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",n," "),t.xp6(2),t.Q6J("ghs-label","datamanagement.removeUnlock")("ghs-label-attribute","title")}}function TR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllUnlocks())}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","datamanagement.removeAllUnlocks"))}function ZR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",47),t._uU(1),t._UZ(2,"span",21),t.TgZ(3,"span",48),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeSpoiler(s))}),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",n," "),t.xp6(2),t.Q6J("ghs-label","datamanagement.removeSpoiler")("ghs-label-attribute","title")}}function AR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.removeAllSpoilers())}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","datamanagement.removeAllSpoilers"))}function SR(o,a){if(1&o&&(t.TgZ(0,"span",53),t._UZ(1,"img",54),t.TgZ(2,"span",55),t._uU(3),t.qZA()()),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","datamanagement.editionDataUrls.custom")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.url)}}function ER(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",50)(1,"label",51)(2,"input",11),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEdition(s))}),t.qZA(),t._UZ(3,"span",5),t.qZA(),t.YNc(4,SR,4,3,"span",52),t._UZ(5,"span",21),t.TgZ(6,"span",48),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeEditionDataUrl(s.url))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-label",-1!=e.settingsManager.settings.editions.indexOf(n.edition)?"datamanagement.editionDataUrls.disable":"datamanagement.editionDataUrls.enable")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("checked",-1!=e.settingsManager.settings.editions.indexOf(n.edition)),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.Q6J("ngIf",-1==e.settingsManager.defaultEditionDataUrls.indexOf(n.url)),t.xp6(2),t.Q6J("ghs-label","datamanagement.editionDataUrls.remove")("ghs-label-attribute","title")}}function DR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.restoreDefaultEditionDataUrls())}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","datamanagement.restoreEditionDataUrls"))}const IR=function(o){return[o]};function NR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.exportAllBackups())}),t._UZ(2,"span",58),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.all")("ghs-label-args",t.VKq(2,IR,""+n.backups))}}const eh=function(o){return{"confirm-delete":o}};function JR(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",56)(2,"label"),t._UZ(3,"span",5),t.qZA()(),t.TgZ(4,"div",3)(5,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.exportLatestBackup())}),t._UZ(6,"span",5),t.qZA()(),t.YNc(7,NR,3,4,"div",57),t.TgZ(8,"div",3)(9,"a",8),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deleteBackups())})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelConfirm())}),t._uU(10,"<"),t._UZ(11,"span",5),t._uU(12,"(!)>"),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label","datamanagement.backup"),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.latest"),t.xp6(1),t.Q6J("ngIf",n.backups>1),t.xp6(2),t.Q6J("ngClass",t.VKq(5,eh,"deleteBackups"==n.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.delete")}}const nh=function(o){return{disabled:o}},Nw=function(o,a){return{fh:o,modern:a}};let UR=(()=>{var o;class a{constructor(){(0,_.Z)(this,"editionDataUrlElement",void 0),(0,_.Z)(this,"spoilerElement",void 0),(0,_.Z)(this,"unlockElement",void 0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"backups",0),(0,_.Z)(this,"ghsInputFullScreenCheck",he.lz),(0,_.Z)(this,"confirm",""),(0,_.Z)(this,"working","")}ngOnInit(){var e=this;return(0,J.Z)(function*(){try{const i=yield Pt.j.readAll("game-backup");i&&i.length>0&&(e.backups=i.length)}catch{e.backups=0}})()}addEditionDataUrl(){var e=this;return(0,J.Z)(function*(){e.editionDataUrlElement.nativeElement.value&&(e.editionDataUrlElement.nativeElement.classList.remove("error"),e.editionDataUrlElement.nativeElement.disabled=!0,(yield R.r.addEditionDataUrl(e.editionDataUrlElement.nativeElement.value))?(e.editionDataUrlElement.nativeElement.value="",e.editionDataUrlElement.nativeElement.disabled=!1):(e.editionDataUrlElement.nativeElement.classList.add("error"),e.editionDataUrlElement.nativeElement.disabled=!1))})()}removeEditionDataUrl(e){e&&R.r.removeEditionDataUrl(e)}toggleEdition(e){var i=this;return(0,J.Z)(function*(){-1!=i.settingsManager.settings.editions.indexOf(e.edition)?i.settingsManager.removeEdition(e.edition):(i.settingsManager.addEdition(e.edition),yield i.settingsManager.loadEditionData(e.url,!0),d.v.uiChange.emit())})()}drop(e){Fn(R.r.settings.editionDataUrls,e.previousIndex,e.currentIndex),Fn(d.v.editionData,e.previousIndex,e.currentIndex),R.r.storeSettings()}hasDefaultEditionData(){return this.settingsManager.defaultEditionDataUrls.every(e=>-1!=R.r.settings.editionDataUrls.indexOf(e))}addSpoiler(){this.spoilerElement.nativeElement.value&&(R.r.addSpoiler(this.spoilerElement.nativeElement.value),this.spoilerElement.nativeElement.value="")}removeSpoiler(e){e&&R.r.removeSpoiler(e)}addUnlock(){const e=this.unlockElement.nativeElement.value;e&&(-1==d.v.game.unlockedCharacters.indexOf(e)&&d.v.charactersData(void 0).find(i=>i.spoiler&&i.name==e)&&(d.v.stateManager.before("unlockChar","data.character."+e),d.v.game.unlockedCharacters.push(e),d.v.stateManager.after()),this.unlockElement.nativeElement.value="")}removeUnlock(e){e&&-1!=d.v.game.unlockedCharacters.indexOf(e)&&(d.v.stateManager.before("unlockChar","data.character."+e),d.v.game.unlockedCharacters.splice(d.v.game.unlockedCharacters.indexOf(e),1),d.v.stateManager.after())}removeAllUnlocks(){d.v.stateManager.before("removeAllUnlocks"),d.v.game.unlockedCharacters=[],d.v.stateManager.after()}cancelConfirm(){this.confirm=""}exportGame(){return(0,J.Z)(function*(){try{const e=yield Pt.j.readGameModel();if(e){const i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-game"+(e.party.name?"_"+e.party.name:"")+".json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}}catch{console.warn("No game found")}})()}exportLatestBackup(){return(0,J.Z)(function*(){try{const e=yield Pt.j.readAll("game-backup");if(e&&e.length>0){const i=e[e.length-1],s=document.createElement("a");s.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(i))),s.setAttribute("download","ghs-game"+(i.party.name?"_"+i.party.name:"")+"-rev"+i.revision+".json"),document.body.appendChild(s),s.click(),document.body.removeChild(s)}}catch{console.warn("No backup found")}})()}exportAllBackups(){return(0,J.Z)(function*(){try{const e=yield Pt.j.readAll("game-backup");e&&e.length>0&&e.forEach(i=>{const s=document.createElement("a");s.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(i))),s.setAttribute("download","ghs-game"+(i.party.name?"_"+i.party.name:"")+"-rev"+i.revision+".json"),document.body.appendChild(s),s.click(),document.body.removeChild(s)})}catch{console.warn("No backups found")}})()}deleteBackups(){"deleteBackups"!=this.confirm?this.confirm="deleteBackups":(Pt.j.clear("game-backup"),this.backups=0)}importGameCheck(){"importGame"!=this.confirm?setTimeout(()=>{this.confirm="importGame"},100):(0,he.lz)()}importGame(e){e.target.parentElement.classList.remove("error");try{const i=new FileReader;i.addEventListener("load",s=>{d.v.stateManager.before("loadGameFromFile");const l=Object.assign(new ge.i4,JSON.parse(s.target.result));l.revision0&&(i.readAsText(e.target.files[0]),e.target.value="")}catch(i){console.warn(i),e.target.parentElement.classList.add("error")}}resetGame(){"resetGame"!=this.confirm?this.confirm="resetGame":(d.v.stateManager.reset(),d.v.stateManager.after(),window.location.reload())}exportSettings(){return(0,J.Z)(function*(){try{const e=yield Pt.j.read("settings","default");if(e){const i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-settings.json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}}catch{console.warn("No settings found")}})()}importSettingsCheck(){"importSettings"!=this.confirm?setTimeout(()=>{this.confirm="importSettings"},100):(0,he.lz)()}importSettings(e){e.target.parentElement.classList.remove("error");try{const i=new FileReader;i.addEventListener("load",function(){var s=(0,J.Z)(function*(l){const m=Object.assign(new pT.Z,JSON.parse(l.target.result));R.r.settings=m,yield Pt.j.write("settings","default",R.r.settings)});return function(l){return s.apply(this,arguments)}}()),i.readAsText(e.target.files[0])}catch(i){console.warn(i),e.target.parentElement.classList.add("error")}}resetSettings(){"resetSettings"!=this.confirm?this.confirm="resetSettings":(R.r.reset(),window.location.reload())}exportDataDump(){return(0,J.Z)(function*(){yield d.v.stateManager.autoBackup("ghs-data-dump.json",!0)})()}importDataDumpCheck(){"importDataDump"!=this.confirm?setTimeout(()=>{this.confirm="importDataDump"},100):(0,he.lz)()}importDataDump(e){var i=this;e.target.parentElement.classList.remove("error");try{this.working="importDataDump";const s=new FileReader;s.addEventListener("load",function(){var l=(0,J.Z)(function*(m){const O=JSON.parse(m.target.result);d.v.stateManager.errorLog=O.errorLog||[];let k=!1;const W=Object.keys(O);for(let ct=0;ct "),t.qZA()(),t.TgZ(12,"div",3)(13,"a",8),t.NdJ("click",function(){return i.resetGame()})("mouseleave",function(){return i.cancelConfirm()}),t._uU(14,"<"),t._UZ(15,"span",5),t._uU(16,"(!)>"),t.qZA()()(),t.TgZ(17,"div",2)(18,"div",3)(19,"a",4),t.NdJ("click",function(){return i.exportSettings()}),t._UZ(20,"span",5),t.qZA()(),t.TgZ(21,"div",3)(22,"label",6),t.NdJ("click",function(){return i.importSettingsCheck()})("mouseleave",function(){return i.cancelConfirm()}),t.TgZ(23,"input",7),t.NdJ("change",function(m){return i.importSettings(m)}),t.qZA(),t._uU(24," <"),t._UZ(25,"span",5),t._uU(26,"(!)> "),t.qZA()(),t.TgZ(27,"div",3)(28,"a",8),t.NdJ("click",function(){return i.resetSettings()})("mouseleave",function(){return i.cancelConfirm()}),t._uU(29,"<"),t._UZ(30,"span",5),t._uU(31,"(!)>"),t.qZA()()(),t.TgZ(32,"div",2)(33,"div",3)(34,"a",4),t.NdJ("click",function(){return i.exportDataDump()}),t._UZ(35,"span",5),t.qZA()(),t.TgZ(36,"div",9)(37,"label",6),t.NdJ("click",function(){return i.importDataDumpCheck()})("mouseleave",function(){return i.cancelConfirm()}),t.TgZ(38,"input",7),t.NdJ("change",function(m){return i.importDataDump(m)}),t.qZA(),t._uU(39," <"),t._UZ(40,"span",5),t._uU(41,"(!)> "),t.YNc(42,xR,1,0,"img",10),t.qZA()(),t.TgZ(43,"div",3)(44,"a",8),t.NdJ("click",function(){return i.clearAllData()})("mouseleave",function(){return i.cancelConfirm()}),t._uU(45,"<"),t._UZ(46,"span",5),t._uU(47,"(!)>"),t.qZA()(),t.TgZ(48,"div",3)(49,"label")(50,"input",11),t.NdJ("change",function(){return i.settingsManager.settings.autoBackup=-1==i.settingsManager.settings.autoBackup?25:-1}),t.qZA(),t._UZ(51,"span",5),t.qZA()(),t.YNc(52,wR,81,52,"ng-container",12),t.qZA()(),t._UZ(53,"div",13),t.TgZ(54,"div",1)(55,"div",2)(56,"div",14)(57,"label"),t._UZ(58,"span",5),t.qZA()(),t.TgZ(59,"div",3)(60,"span",15)(61,"input",16,17),t.NdJ("keyup.enter",function(){return i.addUnlock()})("keyup",function(){return 0}),t.qZA(),t.TgZ(63,"span",18),t.NdJ("click",function(){return i.addUnlock()}),t.qZA()()(),t.TgZ(64,"div",19),t.YNc(65,kR,4,3,"a",20),t.qZA(),t._UZ(66,"div",21),t.YNc(67,TR,3,1,"div",22),t.TgZ(68,"div",14)(69,"label"),t._UZ(70,"span",5),t.qZA()(),t.TgZ(71,"div",3)(72,"span",15)(73,"input",16,23),t.NdJ("keyup.enter",function(){return i.addSpoiler()})("keyup",function(){return 0}),t.qZA(),t.TgZ(75,"span",18),t.NdJ("click",function(){return i.addSpoiler()}),t.qZA()()(),t.TgZ(76,"div",19),t.YNc(77,ZR,4,3,"a",20),t.qZA(),t._UZ(78,"div",21),t.YNc(79,AR,3,1,"div",22),t.qZA(),t.TgZ(80,"div",2)(81,"div",14)(82,"label"),t._UZ(83,"span",5),t.qZA()(),t.TgZ(84,"div",3)(85,"span",15)(86,"input",16,24),t.NdJ("keyup.enter",function(){return i.addEditionDataUrl()})("keyup",function(){t.CHM(s);const m=t.MAs(87);return t.KtG(m.classList.remove("error"))}),t.qZA(),t.TgZ(88,"span",18),t.NdJ("click",function(){return i.addEditionDataUrl()}),t.qZA()()(),t.TgZ(89,"div",25),t.NdJ("cdkDropListDropped",function(m){return i.drop(m)}),t.YNc(90,ER,7,7,"a",26),t.qZA(),t._UZ(91,"div",21),t.YNc(92,DR,3,1,"div",22),t.qZA(),t.TgZ(93,"div",2),t.YNc(94,JR,13,7,"ng-container",12),t.qZA()()()}if(2&e){const s=t.MAs(62),l=t.MAs(74),m=t.MAs(87);t.xp6(5),t.Q6J("ghs-label","datamanagement.exportGame"),t.xp6(2),t.Q6J("ngClass",t.VKq(48,eh,"importGame"==i.confirm)),t.xp6(1),t.Q6J("ngClass",t.VKq(50,nh,"importGame"!=i.confirm))("disabled","importGame"!=i.confirm),t.xp6(2),t.Q6J("ghs-label","datamanagement.importGame"),t.xp6(3),t.Q6J("ngClass",t.VKq(52,eh,"resetGame"==i.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.resetGame"),t.xp6(5),t.Q6J("ghs-label","datamanagement.exportSettings"),t.xp6(2),t.Q6J("ngClass",t.VKq(54,eh,"importSettings"==i.confirm)),t.xp6(1),t.Q6J("ngClass",t.VKq(56,nh,"importSettings"!=i.confirm))("disabled","importSettings"!=i.confirm),t.xp6(2),t.Q6J("ghs-label","datamanagement.importSettings"),t.xp6(3),t.Q6J("ngClass",t.VKq(58,eh,"resetSettings"==i.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.resetSettings"),t.xp6(5),t.Q6J("ghs-label","datamanagement.exportDataDump"),t.xp6(1),t.Q6J("ngClass",t.VKq(60,nh,i.working)),t.xp6(1),t.Q6J("ngClass",t.VKq(62,eh,"importDataDump"==i.confirm)),t.xp6(1),t.Q6J("ngClass",t.VKq(64,nh,"importDataDump"!=i.confirm))("disabled","importDataDump"!=i.confirm),t.xp6(2),t.Q6J("ghs-label","datamanagement.importDataDump"),t.xp6(2),t.Q6J("ngIf","importDataDump"==i.working),t.xp6(2),t.Q6J("ngClass",t.VKq(66,eh,"clearAllData"==i.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.clearAll"),t.xp6(4),t.Q6J("checked",-1!=i.settingsManager.settings.autoBackup),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.auto"),t.xp6(1),t.Q6J("ngIf",-1!=i.settingsManager.settings.autoBackup),t.xp6(4),t.Q6J("ngClass",t.WLB(68,Nw,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","datamanagement.unlocks"),t.xp6(3),t.Q6J("ghs-label","datamanagement.addUnlock")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(71,nh,!s.value)),t.xp6(2),t.Q6J("ngForOf",i.gameManager.game.unlockedCharacters),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.unlockedCharacters.length>0),t.xp6(1),t.Q6J("ngClass",t.WLB(73,Nw,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","datamanagement.spoilers"),t.xp6(3),t.Q6J("ghs-label","datamanagement.addSpoiler")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(76,nh,!l.value)),t.xp6(2),t.Q6J("ngForOf",i.settingsManager.settings.spoilers),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.spoilers.length>0),t.xp6(2),t.Q6J("ngClass",t.WLB(78,Nw,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","datamanagement.editionDataUrls"),t.xp6(3),t.Q6J("ghs-label","datamanagement.addEditionDataUrl")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(81,nh,!m.value)),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editionData),t.xp6(2),t.Q6J("ngIf",!i.hasDefaultEditionData()),t.xp6(2),t.Q6J("ngIf",i.backups>0)}},dependencies:[x.mk,x.sg,x.O5,wo,ko,Bs,Ms,ie],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}','.editions[_ngcontent-%COMP%], .spoilers[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start!important;justify-content:center!important}.edition[_ngcontent-%COMP%], .spoiler-item[_ngcontent-%COMP%]{display:flex;align-items:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0}.edition[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%], .spoiler-item[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer!important;display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.edition[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%]:after, .spoiler-item[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 80%,30% 50%,0 20%,20% 0,50% 30%,80% 0,100% 20%,70% 50%,100% 80%,80% 100%,50% 70%,20% 100%);background-color:var(--ghs-color-white)}.spoiler-item[_ngcontent-%COMP%]{cursor:initial!important}.working[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray);animation:ghs-spinning 1.5s linear infinite;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.edition[_ngcontent-%COMP%]{cursor:grab!important;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0}.edition[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%]{display:flex;align-items:center;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.edition[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{display:none;font-family:var(--ghs-font-normal);align-self:flex-end;font-size:.8em;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));flex:1 1 auto;text-shadow:none}.edition[_ngcontent-%COMP%]:hover .custom[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{display:inline-block}.line[_ngcontent-%COMP%] .input-file[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{width:0;height:0;margin:0;padding:0;visibility:hidden}.line[_ngcontent-%COMP%] .input-file[_ngcontent-%COMP%] input[type=file].disabled[_ngcontent-%COMP%]{pointer-events:none}.line[_ngcontent-%COMP%] .input-file.error[_ngcontent-%COMP%]{animation:shake .5s linear;color:var(--ghs-color-red)!important}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}}']})),a})();class fT{constructor(a){(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"spoiler",!0),this.name=a}}function LR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"input",16),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.customScenarioName(i))}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("value",n.gameManager.game.scenario.name)("ghs-label","scenario.title")("ghs-label-attribute","placeholder")}}function QR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",17)(1,"div",15)(2,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.resetScenario())}),t._uU(3,"<"),t._UZ(4,"span",5),t._uU(5,"!>"),t.qZA()()()}2&o&&(t.xp6(4),t.Q6J("ghs-label","scenario.reset"))}function RR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",19),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.edition=s)}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("value",n)("checked",e.edition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function FR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",4),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setShowOnlyUnfinishedScenarios(!i.settingsManager.settings.showOnlyUnfinishedScenarios))}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.settingsManager.settings.showOnlyUnfinishedScenarios),t.xp6(1),t.Q6J("ghs-label","scenario.filterSuccess")}}function qR(o,a){if(1&o&&(t.TgZ(0,"div",23)(1,"label"),t._UZ(2,"span",5),t.qZA()()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.scenario.group."+n)}}function HR(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function jR(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function BR(o,a){if(1&o&&(t.ynx(0),t.YNc(1,HR,2,0,"span",14),t.YNc(2,jR,2,0,"span",14),t.TgZ(3,"span",29),t._uU(4),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngIf",i.maxScenario(e)>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",i.maxScenario(e)>1&&n.index.length<2),t.xp6(2),t.Oqu(n.index)}}function zR(o,a){1&o&&t._UZ(0,"img",33)}function GR(o,a){1&o&&t._UZ(0,"img",34)}const mT=function(){return[]};function VR(o,a){if(1&o&&(t.TgZ(0,"span",30),t.YNc(1,zR,1,0,"img",31),t.ALo(2,"ghsRange"),t.YNc(3,GR,1,0,"img",32),t.ALo(4,"ghsRange"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,2,t.DdM(8,mT),n.complexity)),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,5,t.DdM(9,mT),3-n.complexity))}}function YR(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",35),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",e.gameManager.characterManager.characterIcon(n.solo),t.LSH)}}function KR(o,a){1&o&&(t.TgZ(0,"span",36),t._UZ(1,"img",37),t.qZA())}function $R(o,a){1&o&&(t.TgZ(0,"span",38),t._UZ(1,"img",39),t.qZA())}function WR(o,a){1&o&&(t.TgZ(0,"span",40),t._UZ(1,"img",39),t.qZA())}const XR=function(o,a,n){return{current:o,blocked:a,locked:n}},tF=function(o){return[o]};function eF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setScenario(s))}),t.YNc(1,BR,5,3,"ng-container",14),t.YNc(2,VR,5,10,"span",25),t.YNc(3,YR,2,1,"ng-container",14),t.YNc(4,KR,2,0,"span",26),t.YNc(5,$R,2,0,"span",27),t.YNc(6,WR,2,0,"span",28),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.kEZ(9,XR,e.hasScenario(n),n.isBlocked,n.isLocked))("ghs-tooltip","scenario.tooltip"+(n.isBlocked?".blocked":n.isLocked?".locked":""))("ghs-label-args",t.VKq(13,tF,"data.scenario."+n.name)),t.xp6(1),t.Q6J("ngIf",!n.solo),t.xp6(1),t.Q6J("ngIf",n.complexity),t.xp6(1),t.Q6J("ngIf",n.solo),t.xp6(1),t.Q6J("ngIf",e.scenarioSuccess(n)),t.xp6(1),t.Q6J("ngIf",n.isBlocked),t.xp6(1),t.Q6J("ngIf",!n.isBlocked&&n.isLocked)}}function nF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.settingsManager.addSpoilers(s.notSpoiled(i)))}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","spoiler.all"))}const iF=function(o){return{disabled:o}};function oF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",23)(2,"label"),t._UZ(3,"span",5),t.qZA()(),t.TgZ(4,"div",15)(5,"span",41)(6,"input",42,43),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(7);return t.KtG(i.classList.remove("error"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(7),s=t.oxw().$implicit,l=t.oxw();return t.KtG(l.manualScenario(i,s))}),t.qZA(),t.TgZ(8,"span",44),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(7),s=t.oxw().$implicit,l=t.oxw();return t.KtG(l.manualScenario(i,s))}),t.qZA()()(),t.BQk()}if(2&o){const n=t.MAs(7);t.xp6(3),t.Q6J("ghs-label","scenario.manual.add"),t.xp6(3),t.Q6J("ghs-label","scenario.manual.index")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","scenario.manual.add")("ghs-label-attribute","title")("ngClass",t.VKq(6,iF,!n.value||n.classList.contains("error")))}}function aF(o,a){if(1&o&&(t.ynx(0),t.YNc(1,qR,3,1,"div",20),t.TgZ(2,"div",21),t.YNc(3,eF,7,15,"span",22),t.ALo(4,"ghsScenarioSearch"),t.qZA(),t.YNc(5,nF,3,1,"div",6),t.YNc(6,oF,9,8,"ng-container",14),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(),i=t.MAs(15);t.xp6(1),t.Q6J("ngIf",n),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,4,e.scenarios(n,e.settingsManager.settings.showOnlyUnfinishedScenarios),i.value)),t.xp6(2),t.Q6J("ngIf",e.hasSpoilers(n)),t.xp6(1),t.Q6J("ngIf",e.gameManager.game.party.campaignMode&&e.scenarios(n).length{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"close",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"scenarioCache",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.edition=d.v.game.scenario&&!d.v.game.scenario.custom&&d.v.game.scenario.edition||!d.v.game.edition&&(!d.v.game.scenario||!d.v.game.scenario.custom)&&d.v.game.party.scenarios.length>0&&d.v.game.party.scenarios[d.v.game.party.scenarios.length-1].edition||d.v.currentEdition(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.scenarioCache=[]}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}editions(){return d.v.game.edition?[d.v.game.edition,...d.v.editionExtensions(d.v.game.edition)]:d.v.editionData.filter(e=>e.scenarios&&e.scenarios.filter(i=>i.edition==e.edition&&-1!=R.r.settings.editions.indexOf(i.edition)).length>0).map(e=>e.edition)}setEdition(e){this.edition=e}groups(){if(!this.edition)return[];let e=d.v.scenarioManager.scenarioData(this.edition).map(i=>i.group).filter((i,s,l)=>i&&l.indexOf(i)===s).sort((i,s)=>i&&s&&(i.toLowerCase()O.edition==this.edition&&O.group==e&&O.filterSuccess==i&&O.includeSpoiler==s&&O.all==l);return m||(m={edition:this.edition,group:e,filterSuccess:i,includeSpoiler:s,all:l,scenarios:[]},m.scenarios=d.v.scenarioManager.scenarioData(this.edition,l).filter(O=>O.group==e&&(s||!O.spoiler||-1!=d.v.game.unlockedCharacters.indexOf(O.name)||O.solo&&-1!=d.v.game.unlockedCharacters.indexOf(O.solo))&&(!i||!this.scenarioSuccess(O)&&!d.v.scenarioManager.isBlocked(O))).sort(d.v.scenarioManager.sortScenarios).map(O=>new ei.U4(O,this.scenarioSuccess(O),d.v.scenarioManager.isBlocked(O),d.v.scenarioManager.isLocked(O))),this.scenarioCache.push(m)),m.scenarios}scenarioSuccess(e){return d.v.game.party.scenarios&&null!=d.v.game.party.scenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)}maxScenario(e){return Math.max(...this.scenarios(e).map(i=>i.index.length))}hasScenario(e){return null!=d.v.game.scenario&&d.v.game.scenario.edition==e.edition&&d.v.game.scenario.index==e.index&&d.v.game.scenario.group==e.group&&d.v.game.scenario.solo==e.solo}setScenario(e){this.hasScenario(e)||(d.v.scenarioManager.isLocked(e)?this.dialog.open(oT,{panelClass:"dialog",data:{scenarioData:e}}):(d.v.stateManager.before("setScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),d.v.scenarioManager.setScenario(e),d.v.stateManager.after()),this.close.emit())}resetScenario(){d.v.game.scenario&&(d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.scenarioManager.setScenario(d.v.game.scenario),this.close.emit(),d.v.stateManager.after())}customScenario(){d.v.game.scenario&&d.v.game.scenario.custom?(d.v.stateManager.before("unsetCustomScenario"),d.v.scenarioManager.setScenario(void 0),this.edition=d.v.game.edition||d.v.editions()[0],d.v.stateManager.after()):(d.v.stateManager.before("setCustomScenario"),d.v.scenarioManager.setScenario(d.v.scenarioManager.createScenario()),d.v.stateManager.after())}customScenarioName(e){d.v.game.scenario&&d.v.game.scenario.custom&&(d.v.stateManager.before("changeCustomScenario",e.target.value),d.v.game.scenario.name=e.target.value,d.v.stateManager.after())}manualScenario(e,i){const s=d.v.editionData.find(l=>l.edition==this.edition);if(e.classList.add("error"),s){let l=e.value.split(",");l.forEach(m=>m.trim()),e.value.split(",").forEach(m=>{const O=s.scenarios.find(k=>k.index==m.trim()&&k.group==i);O?(this.scenarios(i).find(k=>k.edition==O.edition&&k.group==O.group&&k.index==O.index)||(d.v.stateManager.before("addManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(O))),d.v.game.party.manualScenarios.push(new ei._b(O.index,O.edition,O.group,!1,"",[])),d.v.stateManager.after()),l=l.filter(k=>k.trim()!=m)):s.scenarios.find(k=>k.index.substring(0,k.index.length-1)==m.trim()&&k.index.substring(k.index.length-1).match(/[A-B]/)&&k.group==i)&&(s.scenarios.filter(k=>k.index.substring(0,k.index.length-1)==m.trim()&&k.index.substring(k.index.length-1).match(/[A-B]/)&&k.group==i).forEach(k=>{this.scenarios(i).find(W=>W.edition==k.edition&&W.group==k.group&&W.index==k.index)||(d.v.stateManager.before("addManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(k))),d.v.game.party.manualScenarios.push(new ei._b(k.index,k.edition,k.group,!1,"",[])),d.v.stateManager.after())}),l=l.filter(k=>k.trim()!=m))}),0==l.length?(e.classList.remove("error"),e.value=""):e.value=l.join(","),this.scenarioCache=[]}}hasSpoilers(e){return this.scenarios(e,!0).some(i=>i.spoiler&&(!i.solo&&-1==d.v.game.unlockedCharacters.indexOf(i.name)||i.solo&&-1==d.v.game.unlockedCharacters.indexOf(i.solo)))}notSpoiled(e){return this.scenarios(e,!0).filter(i=>i.spoiler&&(-1==d.v.game.unlockedCharacters.indexOf(i.name)||i.solo&&-1==d.v.game.unlockedCharacters.indexOf(i.solo))).map(i=>i.solo&&new fT(i.solo)||new fT(i.name))}toggleCampaignMode(){d.v.stateManager.before(d.v.game.party.campaignMode?"disablePartyCampaignMode":"enablePartyCampaignMode"),d.v.game.party.campaignMode=!d.v.game.party.campaignMode,this.scenarioCache=[],d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-menu"]],outputs:{close:"close"},decls:22,vars:11,consts:[[1,"menu-container","scenario"],[1,"columns"],[1,"column","custom-container"],[1,"line","custom-check"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","line",4,"ngIf"],["class","column",4,"ngIf"],[1,"line","editions"],[4,"ngFor","ngForOf"],[1,"line","search"],["type","text",3,"ghs-label","ghs-label-attribute"],["search",""],[1,"line","campaign"],[4,"ngIf"],[1,"line"],["type","text",3,"value","ghs-label","ghs-label-attribute","change"],[1,"column"],[3,"click"],["type","radio","name","radio",3,"value","checked","change"],["class","line title",4,"ngIf"],[1,"line","scenarios"],["class","scenario",3,"ngClass","ghs-tooltip","ghs-label-args","click",4,"ngFor","ngForOf"],[1,"line","title"],[1,"scenario",3,"ngClass","ghs-tooltip","ghs-label-args","click"],["class","complexity",4,"ngIf"],["class","state success",4,"ngIf"],["class","state blocked",4,"ngIf"],["class","state locked",4,"ngIf"],[1,"index"],[1,"complexity"],["src","./assets/images/scenario/complexity-full.svg",4,"ngFor","ngForOf"],["src","./assets/images/scenario/complexity.svg",4,"ngFor","ngForOf"],["src","./assets/images/scenario/complexity-full.svg"],["src","./assets/images/scenario/complexity.svg"],[1,"ghs-svg","solo",3,"src"],[1,"state","success"],["src","./assets/images/check.svg"],[1,"state","blocked"],["src","./assets/images/close.svg"],[1,"state","locked"],[1,"input-button"],["type","text",3,"ghs-label","ghs-label-attribute","keyup","keyup.enter"],["manualScenarioIndex",""],[1,"add-button",3,"ghs-label","ghs-label-attribute","ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"label")(5,"input",4),t.NdJ("change",function(){return i.customScenario()}),t.qZA(),t._uU(6," <"),t._UZ(7,"span",5),t._uU(8,"> "),t.qZA()(),t.YNc(9,LR,2,3,"div",6),t.qZA(),t.YNc(10,QR,6,1,"div",7),t.qZA(),t.TgZ(11,"div",8),t.YNc(12,RR,3,3,"label",9),t.qZA(),t.TgZ(13,"div",10),t._UZ(14,"input",11,12),t.qZA(),t.TgZ(16,"div",13),t.YNc(17,FR,3,2,"label",14),t.TgZ(18,"label")(19,"input",4),t.NdJ("change",function(){return i.toggleCampaignMode()}),t.qZA(),t._UZ(20,"span",5),t.qZA()(),t.YNc(21,aF,7,7,"ng-container",9),t.qZA()),2&e&&(t.xp6(5),t.Q6J("checked",i.gameManager.game.scenario&&i.gameManager.game.scenario.custom),t.xp6(2),t.Q6J("ghs-label","scenario.custom"),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.scenario&&i.gameManager.game.scenario.custom),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario&&!i.gameManager.game.scenario.custom),t.xp6(2),t.Q6J("ngForOf",i.editions()),t.xp6(2),t.Q6J("ghs-label","scenario.filter")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ngIf",i.gameManager.game.party.campaignMode),t.xp6(2),t.Q6J("checked",i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ghs-label","party.campaignMode"),t.xp6(1),t.Q6J("ngForOf",i.groups()))},dependencies:[x.mk,x.sg,x.O5,ie,Ba,Ii,Ax],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".custom-container[_ngcontent-%COMP%]{display:flex}.custom-container[_ngcontent-%COMP%] .custom-check[_ngcontent-%COMP%]{flex-basis:0}.editions[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:1fr 1fr}.line.campaign[_ngcontent-%COMP%]{display:flex}.line.campaign[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.scenarios[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:repeat(6,1fr);column-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);border-radius:100%;border:calc(var(--ghs-unit) / 5) transparent solid}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;color:var(--ghs-color-white)}.scenarios[_ngcontent-%COMP%] .scenario.current[_ngcontent-%COMP%]{cursor:initial;border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;color:var(--ghs-color-disabled)}.scenarios[_ngcontent-%COMP%] .scenario.blocked[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.scenarios[_ngcontent-%COMP%] .scenario.blocked[_ngcontent-%COMP%]:hover{border-color:var(--ghs-color-darkred)}.scenarios[_ngcontent-%COMP%] .scenario.locked[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.scenarios[_ngcontent-%COMP%] .scenario.locked[_ngcontent-%COMP%]:hover{border-color:var(--ghs-color-yellow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] img.solo[_ngcontent-%COMP%]{filter:none}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;position:absolute;top:50%;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:translateY(-50%)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state.success[_ngcontent-%COMP%]{left:0;filter:var(--ghs-filter-green) var(--ghs-filter-shadow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state.blocked[_ngcontent-%COMP%]{right:0;filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state.locked[_ngcontent-%COMP%]{right:0;filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .complexity[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;bottom:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor))}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .complexity[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray)}.input-button[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.editions[_ngcontent-%COMP%]{grid-template-columns:1fr}.scenarios[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}"]})),a})();var HO=E(7484),Jw=E(4004);function rF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connected"))}function cF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connecting"))}function lF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.closing"))}function gF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.closed"))}function dF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.disconnected"))}function hF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.undefined"))}function uF(o,a){if(1&o&&(t.TgZ(0,"option",37),t._uU(1),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("value",e)("selected",i.selectedServerIndex==e),t.xp6(1),t.AsE(" ",n.url,":",n.port," ")}}function _F(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",34)(1,"select",35),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.selectServer(i))}),t.TgZ(2,"option"),t._UZ(3,"span",6),t.qZA(),t.YNc(4,uF,2,4,"option",36),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label","server.list."+(-1==n.selectedServerIndex?"select":"deselect")),t.xp6(1),t.Q6J("ngForOf",n.publicServer)}}function pF(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"span",6),t.qZA(),t.TgZ(3,"p")(4,"a",40),t._uU(5),t.qZA()(),t.BQk()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ghs-label","server.info."+n.key),t.xp6(2),t.Q6J("href",n.value,t.LSH),t.xp6(1),t.Oqu(n.value.replace("http://","").replace("https://",""))}}function fF(o,a){if(1&o&&(t.TgZ(0,"div",38),t.YNc(1,pF,6,3,"ng-container",39),t.ALo(2,"keyvalue"),t.TgZ(3,"label"),t._UZ(4,"span",6),t.qZA(),t.TgZ(5,"p"),t._uU(6),t.qZA(),t.TgZ(7,"label"),t._UZ(8,"span",6),t.qZA(),t.TgZ(9,"p"),t._uU(10),t.qZA()()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,5,n.publicServer[n.selectedServerIndex].urls)),t.xp6(3),t.Q6J("ghs-label","server.info.description"),t.xp6(2),t.Oqu(n.publicServer[n.selectedServerIndex].description),t.xp6(2),t.Q6J("ghs-label","server.info.location"),t.xp6(2),t.Oqu(n.publicServer[n.selectedServerIndex].location)}}function mF(o,a){1&o&&(t.TgZ(0,"div",4)(1,"a",41),t._UZ(2,"span",6),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","server.how-to-run"))}function vF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.createUUID())}),t._UZ(1,"span",6),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","server.password.uuid"))}function CF(o,a){if(1&o&&(t.TgZ(0,"div",1)(1,"div",4)(2,"a",40),t._UZ(3,"span",6),t.qZA()()()),2&o){const n=t.oxw(),e=t.MAs(30),i=t.MAs(35);t.xp6(2),t.Q6J("href",n.gameManager.stateManager.buildWsUrl("https://",e.value,i.value),t.LSH),t.xp6(1),t.Q6J("ghs-label","server.wss.accept")}}function MF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",1)(1,"div",4)(2,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.disconnect())}),t._UZ(3,"span",6),t.qZA()()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","server.disconnect"))}function OF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",43)(2,"label"),t._UZ(3,"span",6),t.qZA()(),t.TgZ(4,"div",4)(5,"p"),t._UZ(6,"span",6),t.qZA()(),t.TgZ(7,"div",4)(8,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.createPermissions=!i.createPermissions)}),t._UZ(9,"span",6),t.qZA()(),t.BQk()}2&o&&(t.xp6(3),t.Q6J("ghs-label","permissions"),t.xp6(3),t.Q6J("ghs-label","permissions.hasAll"),t.xp6(3),t.Q6J("ghs-label","permissions.create"))}function PF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",4)(2,"div",7)(3,"label")(4,"input",5),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.permissionsAll(i))}),t.qZA(),t._UZ(5,"span",6),t.qZA(),t._UZ(6,"img",8),t.TgZ(7,"span",9)(8,"span",44),t._UZ(9,"span",6),t.qZA()()()(),t.TgZ(10,"div",4)(11,"div",7)(12,"label")(13,"input",5),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.permissionsCustom(i))}),t.qZA(),t._UZ(14,"span",6),t.qZA(),t._UZ(15,"img",8),t.TgZ(16,"span",9)(17,"span",44),t._UZ(18,"span",6),t.qZA()()()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(4),t.Q6J("checked",!n.permissions),t.xp6(1),t.Q6J("ghs-label","permissions.all"),t.xp6(4),t.Q6J("ghs-label","permissions.all.hint"),t.xp6(4),t.Q6J("checked",n.permissions),t.xp6(1),t.Q6J("ghs-label","permissions.custom"),t.xp6(4),t.Q6J("ghs-label","permissions.custom.hint")}}function yF(o,a){if(1&o&&(t.TgZ(0,"span",50),t._uU(1,"\xa0["),t._UZ(2,"span",6),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.xp6(2),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}const za=function(o){return{disabled:o}};function bF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label",45)(2,"input",5),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.toggleCharacter(s))}),t.qZA(),t._uU(3),t.YNc(4,yF,4,1,"span",49),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(4);t.xp6(1),t.Q6J("ngClass",t.VKq(4,za,e.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",e.hasCharacter(n)),t.xp6(1),t.hij(" ",e.gameManager.characterManager.characterName(n,!0)," "),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function xF(o,a){if(1&o&&(t.TgZ(0,"div",48),t.YNc(1,bF,5,6,"ng-container",39),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.characters())}}function wF(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function kF(o,a){1&o&&(t.TgZ(0,"span",55),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function TF(o,a){if(1&o&&(t.TgZ(0,"span",50),t._uU(1,"\xa0["),t._UZ(2,"span",6),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.xp6(2),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function ZF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label",45)(2,"input",5),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.toggleMonster(s))}),t.qZA(),t._UZ(3,"span",6),t.YNc(4,wF,2,1,"span",52),t.YNc(5,kF,2,1,"span",53),t.YNc(6,TF,4,1,"span",49),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(4);t.xp6(1),t.Q6J("ngClass",t.VKq(6,za,e.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",e.hasMonster(n)),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",n.isAlly),t.xp6(1),t.Q6J("ngIf",n.isAllied),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function AF(o,a){if(1&o&&(t.TgZ(0,"div",51),t.YNc(1,ZF,7,8,"ng-container",39),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.monsters())}}const vT=function(o){return{separator:o}};function SF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",21)(2,"div",7)(3,"label",45)(4,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.characters=!i.permissions.characters)}),t.qZA(),t._UZ(5,"span",6),t.qZA(),t._UZ(6,"img",8),t.TgZ(7,"span",9)(8,"span",44),t._UZ(9,"span",6),t.qZA()()()(),t.YNc(10,xF,2,1,"div",46),t.TgZ(11,"div",4)(12,"div",7)(13,"label",45)(14,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.monsters=!i.permissions.monsters)}),t.qZA(),t._UZ(15,"span",6),t.qZA(),t._UZ(16,"img",8),t.TgZ(17,"span",9)(18,"span",44),t._UZ(19,"span",6),t.qZA()()()(),t.YNc(20,AF,2,1,"div",47),t.TgZ(21,"div",4)(22,"div",7)(23,"label",45)(24,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.scenario=!i.permissions.scenario)}),t.qZA(),t._UZ(25,"span",6),t.qZA(),t._UZ(26,"img",8),t.TgZ(27,"span",9)(28,"span",44),t._UZ(29,"span",6),t.qZA()()()(),t.TgZ(30,"div",4)(31,"div",7)(32,"label",45)(33,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.party=!i.permissions.party)}),t.qZA(),t._UZ(34,"span",6),t.qZA(),t._UZ(35,"img",8),t.TgZ(36,"span",9)(37,"span",44),t._UZ(38,"span",6),t.qZA()()()(),t.TgZ(39,"div",4)(40,"div",7)(41,"label",45)(42,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.elements=!i.permissions.elements)}),t.qZA(),t._UZ(43,"span",6),t.qZA(),t._UZ(44,"img",8),t.TgZ(45,"span",9)(46,"span",44),t._UZ(47,"span",6),t.qZA()()()(),t.TgZ(48,"div",4)(49,"div",7)(50,"label",45)(51,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.round=!i.permissions.round)}),t.qZA(),t._UZ(52,"span",6),t.qZA(),t._UZ(53,"img",8),t.TgZ(54,"span",9)(55,"span",44),t._UZ(56,"span",6),t.qZA()()()(),t.TgZ(57,"div",4)(58,"div",7)(59,"label",45)(60,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.level=!i.permissions.level)}),t.qZA(),t._UZ(61,"span",6),t.qZA(),t._UZ(62,"img",8),t.TgZ(63,"span",9)(64,"span",44),t._UZ(65,"span",6),t.qZA()()()(),t.TgZ(66,"div",4)(67,"div",7)(68,"label",45)(69,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.attackModifiers=!i.permissions.attackModifiers)}),t.qZA(),t._UZ(70,"span",6),t.qZA(),t._UZ(71,"img",8),t.TgZ(72,"span",9)(73,"span",44),t._UZ(74,"span",6),t.qZA()()()(),t.TgZ(75,"div",4)(76,"div",7)(77,"label",45)(78,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.lootDeck=!i.permissions.lootDeck)}),t.qZA(),t._UZ(79,"span",6),t.qZA(),t._UZ(80,"img",8),t.TgZ(81,"span",9)(82,"span",44),t._UZ(83,"span",6),t.qZA()()()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(39,vT,!n.gameManager.stateManager.permissions)),t.xp6(2),t.Q6J("ngClass",t.VKq(41,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.characters),t.xp6(1),t.Q6J("ghs-label","permissions.characters"),t.xp6(4),t.Q6J("ghs-label","permissions.characters.hint"),t.xp6(1),t.Q6J("ngIf",!n.permissions.characters),t.xp6(3),t.Q6J("ngClass",t.VKq(43,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.monsters),t.xp6(1),t.Q6J("ghs-label","permissions.monsters"),t.xp6(4),t.Q6J("ghs-label","permissions.monsters.hint"),t.xp6(1),t.Q6J("ngIf",!n.permissions.monsters),t.xp6(3),t.Q6J("ngClass",t.VKq(45,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.scenario),t.xp6(1),t.Q6J("ghs-label","permissions.scenario"),t.xp6(4),t.Q6J("ghs-label","permissions.scenario.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(47,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.party),t.xp6(1),t.Q6J("ghs-label","permissions.party"),t.xp6(4),t.Q6J("ghs-label","permissions.party.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(49,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.elements),t.xp6(1),t.Q6J("ghs-label","permissions.elements"),t.xp6(4),t.Q6J("ghs-label","permissions.elements.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(51,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.round),t.xp6(1),t.Q6J("ghs-label","permissions.round"),t.xp6(4),t.Q6J("ghs-label","permissions.round.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(53,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.level),t.xp6(1),t.Q6J("ghs-label","permissions.level"),t.xp6(4),t.Q6J("ghs-label","permissions.level.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(55,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.attackModifiers),t.xp6(1),t.Q6J("ghs-label","permissions.attackModifiers"),t.xp6(4),t.Q6J("ghs-label","permissions.attackModifiers.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(57,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.lootDeck),t.xp6(1),t.Q6J("ghs-label","permissions.lootDeck"),t.xp6(4),t.Q6J("ghs-label","permissions.lootDeck.hint")}}function EF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",4)(2,"label",18),t._UZ(3,"span",6),t.qZA(),t.TgZ(4,"input",19),t.NdJ("keyup",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setPermissionsPassword(i))})("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setPermissionsPassword(i))}),t.qZA()(),t.TgZ(5,"div",4)(6,"a",32),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.savePermissions())}),t._UZ(7,"span",6),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(3),t.Q6J("ghs-label","permissions.password"),t.xp6(1),t.Q6J("value",n.password)("ghs-label","permissions.password")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(6,za,!n.password)),t.xp6(1),t.Q6J("ghs-label","permissions.save")}}function DF(o,a){if(1&o&&(t.TgZ(0,"div",1)(1,"div",43)(2,"label"),t._UZ(3,"span",6),t.qZA()(),t.YNc(4,PF,19,6,"ng-container",33),t.YNc(5,SF,84,59,"ng-container",33),t.YNc(6,EF,8,8,"ng-container",33),t.qZA()),2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label",n.gameManager.stateManager.permissions?"permissions":"permissions.create"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.stateManager.permissions),t.xp6(1),t.Q6J("ngIf",n.getPermissions()&&n.permissions),t.xp6(1),t.Q6J("ngIf",!n.gameManager.stateManager.permissions)}}const Uw=function(o){return{hidden:o}};let IF=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"tryConnect",!1),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"permissions",new HO.P),(0,_.Z)(this,"publicServer",[]),(0,_.Z)(this,"selectedServerIndex",-1),(0,_.Z)(this,"password",""),(0,_.Z)(this,"createPermissions",!1)}ngOnInit(){var e=this;return(0,J.Z)(function*(){try{yield fetch("./assets/server.json").then(i=>{if(!i.ok)throw Error();return i.json()}).then(i=>{e.publicServer=i})}catch{e.publicServer=[]}e.updateServer()})()}connect(e,i,s){e&&!isNaN(+i)&&s&&(R.r.setServer(e,+i,s),d.v.stateManager.connect(),this.tryConnect=!0)}getPermissions(){return d.v.stateManager.permissions&&(this.permissions=d.v.stateManager.permissions),this.permissions}createUUID(){R.r.settings.serverPassword=(0,Jw.Z)()}disconnect(){d.v.stateManager.disconnect(),this.permissions=d.v.stateManager.permissions}reconnect(){this.disconnect(),d.v.stateManager.connect(),this.tryConnect=!0}selectServer(e){if(this.selectedServerIndex=-1,!isNaN(+e.target.value)&&(this.selectedServerIndex=+e.target.value,this.selectedServerIndex>-1&&this.selectedServerIndex{R.r.settings.serverUrl!=e.url||R.r.settings.serverPort!=e.port||R.r.settings.serverWss!=e.secure||(this.selectedServerIndex=i)})}setServerUrl(e){this.tryConnect=!1,R.r.settings.serverUrl=e.target.value,R.r.storeSettings(),this.updateServer()}setServerPort(e){this.tryConnect=!1,R.r.settings.serverPort=e.target.value,R.r.storeSettings(),this.updateServer()}setServerPassword(e){this.tryConnect=!1,R.r.settings.serverPassword=e.target.value,R.r.storeSettings(),this.updateServer()}permissionsAll(e){this.permissions=e.target.checked?void 0:new HO.P}permissionsCustom(e){this.permissions=e.target.checked?new HO.P:void 0}characters(){return d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e)}hasCharacter(e){return null!=this.permissions&&this.permissions.character.some(i=>i.name==e.name&&i.edition==e.edition)}toggleCharacter(e){if(this.permissions){const i=this.permissions.character.find(s=>s.name==e.name&&s.edition==e.edition);i?this.permissions.character.splice(this.permissions.character.indexOf(i,1)):this.permissions.character.push(new Vn.xb(e.name,e.edition))}}monsters(){return d.v.game.figures.filter(e=>e instanceof Ze.Q).map(e=>e)}hasMonster(e){return null!=this.permissions&&this.permissions.monster.some(i=>i.name==e.name&&i.edition==e.edition)}toggleMonster(e){if(this.permissions){const i=this.permissions.monster.find(s=>s.name==e.name&&s.edition==e.edition);i?this.permissions.monster.splice(this.permissions.monster.indexOf(i,1)):this.permissions.monster.push(new Vn.xb(e.name,e.edition))}}setPermissionsPassword(e){this.password=e.target.value}savePermissions(){d.v.stateManager.savePermissions(this.password,this.permissions),this.password="",this.permissions=new HO.P}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-server-menu"]],decls:64,vars:50,consts:[[1,"menu-container","two-column","server"],[1,"column"],[3,"ngSubmit"],["serverFrom",""],[1,"line"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],[1,"hint-container"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg"],[1,"hint"],[1,"text",3,"ghs-label"],[1,"line",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","line separator",4,"ngIf"],["class","server-info",4,"ngIf"],["class","line",4,"ngIf"],[1,"line","separator",3,"ngClass"],[1,"label"],["type","text",3,"value","ghs-label","ghs-label-attribute","keyup","change"],["serverUrl",""],[1,"line",3,"ngClass"],["type","number",3,"value","ghs-label","ghs-label-attribute","keyup","change"],["serverPort",""],[1,"password-container"],[1,"spacer"],[3,"click",4,"ngIf"],["type","text",3,"value","ghs-label","ghs-label-attribute","keyup","keydown.enter","change"],["serverPassword",""],[1,"columns",3,"ngClass"],["class","column",4,"ngIf"],[1,"columns"],[3,"ngClass","click"],[4,"ngIf"],[1,"line","separator"],[3,"change"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"value","selected"],[1,"server-info"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["href","https://github.com/Lurkars/ghs-server#how-to-run","target","_blank",1,"server-run"],[3,"click"],[1,"line","title"],[1,"text"],[3,"ngClass"],["class","line characters",4,"ngIf"],["class","line monsters",4,"ngIf"],[1,"line","characters"],["class","edition",4,"ngIf"],[1,"edition"],[1,"line","monsters"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],[1,"ally"],[1,"allied"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1)(2,"form",2,3),t.NdJ("ngSubmit",function(){t.CHM(s);const m=t.MAs(30),O=t.MAs(35),k=t.MAs(45);return t.KtG(i.connect(m.value,O.value,k.value))}),t.TgZ(4,"div",4)(5,"label")(6,"input",5),t.NdJ("change",function(){return i.settingsManager.setServerAutoconnect(!i.settingsManager.settings.serverAutoconnect)}),t.qZA(),t._UZ(7,"span",6),t.qZA()(),t.TgZ(8,"div",4)(9,"label")(10,"div",7)(11,"input",5),t.NdJ("change",function(){return i.settingsManager.setServerSettings(!i.settingsManager.settings.serverSettings)}),t.qZA(),t._UZ(12,"span",6)(13,"img",8),t.TgZ(14,"span",9),t._UZ(15,"span",10),t.qZA()()()(),t.TgZ(16,"div",11),t.YNc(17,rF,2,1,"p",12),t.YNc(18,cF,2,1,"p",12),t.YNc(19,lF,2,1,"p",12),t.YNc(20,gF,2,1,"p",12),t.YNc(21,dF,2,1,"p",12),t.YNc(22,hF,2,1,"p",13),t.qZA(),t.YNc(23,_F,5,2,"div",14),t.YNc(24,fF,11,7,"div",15),t.YNc(25,mF,3,1,"div",16),t.TgZ(26,"div",17)(27,"label",18),t._UZ(28,"span",6),t.qZA(),t.TgZ(29,"input",19,20),t.NdJ("keyup",function(){return 0})("change",function(m){return i.setServerUrl(m)}),t.qZA()(),t.TgZ(31,"div",21)(32,"label",18),t._UZ(33,"span",6),t.qZA(),t.TgZ(34,"input",22,23),t.NdJ("keyup",function(){return 0})("change",function(m){return i.setServerPort(m)}),t.qZA()(),t.TgZ(36,"div",21)(37,"div",24)(38,"label",18),t._UZ(39,"span",6),t.qZA(),t._UZ(40,"span",25),t.YNc(41,vF,2,1,"a",26),t.qZA()(),t.TgZ(42,"div",4)(43,"div",7)(44,"input",27,28),t.NdJ("keyup",function(){return 0})("keydown.enter",function(){t.CHM(s);const m=t.MAs(3);return t.KtG(m.submit())})("change",function(m){return i.setServerPassword(m)}),t.qZA(),t._UZ(46,"img",8),t.TgZ(47,"span",9),t._UZ(48,"span",10),t.qZA()()(),t.TgZ(49,"div",29)(50,"div",1)(51,"div",4)(52,"label")(53,"input",5),t.NdJ("change",function(){return i.settingsManager.setServerWss(!i.settingsManager.settings.serverWss),i.updateServer()}),t.qZA(),t._UZ(54,"span",6),t.qZA()()(),t.YNc(55,CF,4,2,"div",30),t.qZA(),t.TgZ(56,"div",31)(57,"div",1)(58,"div",4)(59,"a",32),t.NdJ("click",function(){return i.reconnect()}),t._UZ(60,"span",6),t.qZA()()(),t.YNc(61,MF,4,1,"div",30),t.qZA()(),t.YNc(62,OF,10,3,"ng-container",33),t.qZA(),t.YNc(63,DF,7,4,"div",30),t.qZA()}if(2&e){const s=t.MAs(30),l=t.MAs(35),m=t.MAs(45);t.xp6(6),t.Q6J("checked",i.settingsManager.settings.serverAutoconnect),t.xp6(1),t.Q6J("ghs-label","server.autoconnect"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.serverSettings),t.xp6(1),t.Q6J("ghs-label","server.settings"),t.xp6(3),t.Q6J("ghs-label","server.settings.hint"),t.xp6(1),t.Q6J("ngSwitch",i.gameManager.stateManager.wsState()),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.OPEN),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.CONNECTING),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.CLOSING),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.CLOSED),t.xp6(1),t.Q6J("ngSwitchCase",-1),t.xp6(2),t.Q6J("ngIf",i.publicServer),t.xp6(1),t.Q6J("ngIf",-1!=i.selectedServerIndex),t.xp6(1),t.Q6J("ngIf",-1!=i.selectedServerIndex||i.gameManager.stateManager.wsState()!=i.WebSocket.OPEN&&i.gameManager.stateManager.wsState()==i.WebSocket.CONNECTING),t.xp6(1),t.Q6J("ngClass",t.VKq(40,Uw,-1!=i.selectedServerIndex)),t.xp6(2),t.Q6J("ghs-label","server.url"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.serverUrl||"")("ghs-label","server.url")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(42,Uw,-1!=i.selectedServerIndex)),t.xp6(2),t.Q6J("ghs-label","server.port"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.serverPort||"")("ghs-label","server.port")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(44,vT,-1!=i.selectedServerIndex)),t.xp6(3),t.Q6J("ghs-label","server.password"),t.xp6(2),t.Q6J("ngIf",!i.settingsManager.settings.serverPassword),t.xp6(3),t.Q6J("value",i.settingsManager.settings.serverPassword||"")("ghs-label","server.password")("ghs-label-attribute","placeholder"),t.xp6(4),t.Q6J("ghs-label","server.password.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(46,Uw,-1!=i.selectedServerIndex)),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.serverWss),t.xp6(1),t.Q6J("ghs-label","server.wss"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.serverWss&&s.value&&l.value&&m.value&&i.tryConnect&&i.gameManager.stateManager.wsState()!=i.WebSocket.OPEN),t.xp6(4),t.Q6J("ngClass",t.VKq(48,za,!s.value||!l.value||!m.value)),t.xp6(1),t.Q6J("ghs-label",i.gameManager.stateManager.wsState()==i.WebSocket.OPEN?"server.reconnect":"server.connect"),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.wsState()==i.WebSocket.OPEN),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.wsState()==i.WebSocket.OPEN&&!i.gameManager.stateManager.permissions),t.xp6(1),t.Q6J("ngIf",i.createPermissions||i.gameManager.stateManager.permissions)}},dependencies:[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,Al,wo,ko,wl,Dr,ie,x.Nd],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;row-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled);align-self:center;padding:0;margin:0}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--ghs-color-gray);align-self:center;padding:0;margin:0}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:underline;color:var(--ghs-color-gray);align-self:center;justify-self:center;padding:0;margin:0}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.server[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)!important;pointer-events:none}.server[_ngcontent-%COMP%] .line.characters[_ngcontent-%COMP%], .server[_ngcontent-%COMP%] .line.monsters[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));flex-direction:column;align-items:flex-start}.server[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .server-run[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.server[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .password-container[_ngcontent-%COMP%]{display:flex;width:100%}.server[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{display:none!important}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}}"]})),a})();function NF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",7),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.edition=s)}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("value",n)("checked",e.edition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function JF(o,a){if(1&o&&(t.TgZ(0,"div",10),t._UZ(1,"label",5),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","data.scenario.group."+n)}}function UF(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function LF(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}const QF=function(o,a){return{disabled:o,available:a}},CT=function(o){return[o]};function RF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",13),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.addSection(s))}),t.YNc(1,UF,2,0,"span",14),t.YNc(2,LF,2,0,"span",14),t._uU(3),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.WLB(6,QF,n.isLocked,e.settingsManager.settings.showAllSections&&n.parent&&e.gameManager.game.scenario&&n.parent==e.gameManager.game.scenario.index&&n.group==e.gameManager.game.scenario.group&&n.edition==e.gameManager.game.scenario.edition))("ghs-tooltip","scenario.tooltip")("ghs-label-args",t.VKq(9,CT,"data.section."+n.name)),t.xp6(1),t.Q6J("ngIf",e.maxSection()>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",e.maxSection()>1&&n.index.length<2),t.xp6(1),t.hij(" ",n.index," ")}}function FF(o,a){if(1&o&&(t.TgZ(0,"div",11),t.YNc(1,RF,4,11,"span",12),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.sections(n))}}function qF(o,a){if(1&o&&(t.ynx(0),t.YNc(1,JF,2,1,"div",8),t.YNc(2,FF,2,1,"div",9),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",n&&e.sections(n).length>0),t.xp6(1),t.Q6J("ngIf",e.sections(n).length>0)}}function HF(o,a){1&o&&(t.TgZ(0,"div",15)(1,"label"),t._UZ(2,"span",5),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","monster.filter.noResult"))}let jF=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"sectionCache",[]),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.edition=d.v.game.scenario&&!d.v.game.scenario.custom&&d.v.game.scenario.edition||!d.v.game.edition&&(!d.v.game.scenario||!d.v.game.scenario.custom)&&d.v.game.party.scenarios.length>0&&d.v.game.party.scenarios[d.v.game.party.scenarios.length-1].edition||d.v.currentEdition(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.sectionCache=[]}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}editions(){return d.v.editionData.filter(e=>e.sections&&e.sections.filter(i=>i.edition==e.edition&&-1!=R.r.settings.editions.indexOf(i.edition)).length>0).map(e=>e.edition)}groups(){return this.edition?d.v.sectionData().filter(e=>e.edition==this.edition).map(e=>e.group).filter((e,i,s)=>s.indexOf(e)===i):[]}sections(e=void 0){if(!this.edition)return[];let i=this.sectionCache.find(s=>s.edition==this.edition&&s.group==e&&s.all==R.r.settings.showAllSections);return i||(i={edition:this.edition,group:e,all:R.r.settings.showAllSections,sections:[]},i.sections=d.v.sectionData().filter(s=>(R.r.settings.showAllSections||!s.parent&&(!d.v.game.scenario||d.v.game.scenario.custom)||d.v.game.scenario&&-1!=d.v.scenarioManager.availableSections(!1,!0).indexOf(s))&&s.edition==this.edition&&s.group==e&&!s.conclusion).sort(d.v.scenarioManager.sortScenarios).map(s=>new ei.U4(s,!1,!1,this.hasSection(s))),this.sectionCache.push(i)),i.sections}noResults(){return this.sectionCache.filter(e=>e.edition==this.edition).every(e=>0==e.sections.length)}maxSection(){return Math.max(...this.sections().map(e=>e.index.length))}hasSection(e){return d.v.game.sections&&d.v.game.sections.some(i=>i.edition==e.edition&&i.index==e.index&&i.group==e.group)}addSection(e){d.v.stateManager.before("addSection",e.index,"data.scenario."+e.name,"data.edition."+e.edition),d.v.scenarioManager.addSection(e),d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-section-menu"]],decls:9,vars:7,consts:[[1,"menu-container","scenario"],[1,"line","editions"],[4,"ngFor","ngForOf"],[1,"line"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","line disabled",4,"ngIf"],["type","radio","name","radio",3,"value","checked","change"],["class","line title",4,"ngIf"],["class","line sections",4,"ngIf"],[1,"line","title"],[1,"line","sections"],["class","section",3,"ngClass","ghs-tooltip","ghs-label-args","click",4,"ngFor","ngForOf"],[1,"section",3,"ngClass","ghs-tooltip","ghs-label-args","click"],[4,"ngIf"],[1,"line","disabled"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,NF,3,3,"label",2),t.qZA(),t.TgZ(3,"div",3)(4,"label")(5,"input",4),t.NdJ("change",function(){return i.settingsManager.setShowAllSections(!i.settingsManager.settings.showAllSections)}),t.qZA(),t._UZ(6,"span",5),t.qZA()(),t.YNc(7,qF,3,2,"ng-container",2),t.YNc(8,HF,3,1,"div",6),t.qZA()),2&e&&(t.xp6(2),t.Q6J("ngForOf",i.gameManager.game.edition?t.VKq(5,CT,i.gameManager.game.edition):i.editions()),t.xp6(3),t.Q6J("checked",i.settingsManager.settings.showAllSections),t.xp6(1),t.Q6J("ghs-label","scenario.showAllSections"),t.xp6(1),t.Q6J("ngForOf",i.groups()),t.xp6(1),t.Q6J("ngIf",i.noResults()))},dependencies:[x.mk,x.sg,x.O5,ie,Ba],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".custom-container[_ngcontent-%COMP%]{display:flex}.custom-container[_ngcontent-%COMP%] .custom-check[_ngcontent-%COMP%]{flex-basis:0}.editions[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:1fr 1fr}.sections[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:repeat(6,1fr);column-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);border-radius:100%}.sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;color:var(--ghs-color-white)}.sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-disabled) solid}.sections[_ngcontent-%COMP%] .section.disabled[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;color:var(--ghs-color-disabled)}@media (max-width: 600px),(orientation: portrait){.editions[_ngcontent-%COMP%]{grid-template-columns:1fr}.sections[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}"]})),a})();function BF(o,a){1&o&&(t.TgZ(0,"div",22),t._UZ(1,"span",4),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.eventEffects.hint"))}function zF(o,a){1&o&&t._UZ(0,"img",26)}const GF=function(o){return{inactive:o}};function VF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCharacter(s))}),t._UZ(1,"img",24),t.YNc(2,zF,1,0,"img",25),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(3,GF,-1==e.activeCharacters.indexOf(n))),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",n.absent)}}const o_=function(o,a){return{"negative-value":o,"positive-value":a}};function YF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"span",13)(2,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeHealth(-1))}),t._UZ(3,"img",15),t.qZA()(),t.TgZ(4,"span",16),t._UZ(5,"img",27),t.TgZ(6,"span",18),t._uU(7),t.ALo(8,"ghsValueSign"),t.qZA()(),t.TgZ(9,"span",13)(10,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeHealth(1))}),t._UZ(11,"img",19),t.qZA()(),t.TgZ(12,"span",13)(13,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(-1))}),t._UZ(14,"img",15),t.qZA()(),t.TgZ(15,"span",16),t._UZ(16,"img",28),t.TgZ(17,"span",18),t._uU(18),t.ALo(19,"ghsValueSign"),t.qZA()(),t.TgZ(20,"span",13)(21,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(1))}),t._UZ(22,"img",19),t.qZA()(),t.TgZ(23,"span",13)(24,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(-1))}),t._UZ(25,"img",15),t.qZA()(),t.TgZ(26,"span",16),t._UZ(27,"img",29),t.TgZ(28,"span",18),t._uU(29),t.ALo(30,"ghsValueSign"),t.qZA()(),t.TgZ(31,"span",13)(32,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(1))}),t._UZ(33,"img",19),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(24,o_,n.minHealth()<0,n.maxHealth()>0)),t.xp6(1),t.Oqu(t.lcZ(8,18,n.minHealth()<0?n.minHealth():n.maxHealth())),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.bless")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(27,o_,n.bless<0,n.bless>0)),t.xp6(1),t.Oqu(t.lcZ(19,20,n.bless)),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.curse")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(30,o_,n.curse<0,n.curse>0)),t.xp6(1),t.Oqu(t.lcZ(30,22,n.curse)),t.xp6(3),t.Q6J("repeat",!0)}}function KF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-conditions",30),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeConditions(i))}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("entities",n.activeCharacters)("entityConditions",n.entityConditions)("immunities",n.newImmunities)("type","character")}}let Lw=(()=>{var o;class a{constructor(e=!1,i){(0,_.Z)(this,"menu",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"activeCharacters",[]),(0,_.Z)(this,"entityConditions",[]),(0,_.Z)(this,"immunities",[]),(0,_.Z)(this,"newImmunities",[]),(0,_.Z)(this,"health",[]),(0,_.Z)(this,"experience",[]),(0,_.Z)(this,"gold",[]),(0,_.Z)(this,"battleGoals",[]),(0,_.Z)(this,"bless",0),(0,_.Z)(this,"curse",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.menu=e,this.dialogRef=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.close(),this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.characters=d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e),this.activeCharacters=this.characters.filter(e=>!e.absent&&!e.exhausted),this.activeCharacters.forEach((e,i,s)=>{e.entityConditions.forEach(l=>{!this.entityConditions.find(m=>m.name==l.name)&&s.every(m=>m.entityConditions.find(O=>O.name==l.name&&O.state==l.state))&&this.entityConditions.push(JSON.parse(JSON.stringify(l)))}),e.immunities.forEach(l=>{!this.immunities.find(m=>m==l)&&s.every(m=>m.immunities.find(O=>O==l))&&(this.immunities.push(l),this.newImmunities.push(l))})})}toggleCharacter(e){-1==this.activeCharacters.indexOf(e)?this.activeCharacters.push(e):this.activeCharacters.splice(this.activeCharacters.indexOf(e),1)}changeHealth(e){this.activeCharacters.forEach((i,s)=>{this.health[s]=this.health[s]||0,this.health[s]+=e,i.health+this.health[s]>i.maxHealth?this.health[s]=(0,ae.j9)(i.maxHealth)-i.health:i.health+this.health[s]<0&&(this.health[s]=-i.health)})}minHealth(){return 0==this.health.length&&(this.health[0]=0),this.health.reduce((e,i)=>Math.min(e,i))}maxHealth(){return 0==this.health.length&&(this.health[0]=0),this.health.reduce((e,i)=>Math.max(e,i))}changeExperience(e){this.activeCharacters.forEach((i,s)=>{this.experience[s]=this.experience[s]||0,this.experience[s]+=e,i.progress.experience+this.experience[s]<0&&(this.experience[s]=-i.progress.experience)})}minExperience(){return 0==this.experience.length&&(this.experience[0]=0),this.experience.reduce((e,i)=>Math.min(e,i))}maxExperience(){return 0==this.experience.length&&(this.experience[0]=0),this.experience.reduce((e,i)=>Math.max(e,i))}changeGold(e){this.activeCharacters.forEach((i,s)=>{this.gold[s]=this.gold[s]||0,this.gold[s]+=e,i.progress.gold+this.gold[s]<0&&(this.gold[s]=-i.progress.gold)})}minGold(){return 0==this.gold.length&&(this.gold[0]=0),this.gold.reduce((e,i)=>Math.min(e,i))}maxGold(){return 0==this.gold.length&&(this.gold[0]=0),this.gold.reduce((e,i)=>Math.max(e,i))}changeBattleGoals(e){this.activeCharacters.forEach((i,s)=>{this.battleGoals[s]=this.battleGoals[s]||0,this.battleGoals[s]+=e,i.progress.battleGoals+this.battleGoals[s]<0&&(this.battleGoals[s]=-i.progress.battleGoals),this.battleGoals[s]<-i.progress.battleGoals%3&&(this.battleGoals[s]=-i.progress.battleGoals%3)})}minBattleGoals(){return 0==this.battleGoals.length&&(this.battleGoals[0]=0),this.battleGoals.reduce((e,i)=>Math.min(e,i))}maxBattleGoals(){return 0==this.battleGoals.length&&(this.battleGoals[0]=0),this.battleGoals.reduce((e,i)=>Math.max(e,i))}changeBless(e){this.bless+=e;const i=d.v.attackModifierManager.countUpcomingBlesses();i+this.bless<0?this.bless=-i:i+this.bless>10&&(this.bless=10-i)}changeCurse(e){this.curse+=e;const i=d.v.attackModifierManager.countUpcomingCurses(!1);i+this.curse<0?this.curse=-i:i+this.curse>10&&(this.curse=10-i)}changeConditions(e){this.entityConditions=e}close(){if(this.entityConditions.filter(e=>e.state==re.tT.new||e.state==re.tT.removed).forEach(e=>{d.v.stateManager.before(e.state==re.tT.removed?"removeCondition":"addCondition",e.name,"allCharacters"),this.activeCharacters.find(i=>{e.state==re.tT.removed?d.v.entityManager.removeCondition(i,e,e.permanent):d.v.entityManager.addCondition(i,e,i.active,i.off,e.permanent)}),d.v.stateManager.after()}),this.entityConditions.forEach(e=>{this.activeCharacters.find(i=>i.entityConditions.find(s=>s.name==e.name&&!s.expired&&s.value!=e.value))&&(d.v.stateManager.before("setConditionValue",e.name,""+e.value,"allCharacters"),this.activeCharacters.find(i=>{const s=i.entityConditions.find(l=>l.name==e.name&&!l.expired);s&&s.value!=e.value&&(s.value=e.value)}),d.v.stateManager.after())}),this.immunities.forEach(e=>{-1==this.newImmunities.indexOf(e)&&(d.v.stateManager.before("removeImmunity",e,"allCharacters"),this.activeCharacters.find(i=>{i.immunities=i.immunities.filter(s=>s!=e)}),d.v.stateManager.after())}),this.newImmunities.forEach(e=>{-1==this.immunities.indexOf(e)&&(d.v.stateManager.before("addImmunity",e,"allCharacters"),this.activeCharacters.find(i=>{i.immunities.push(e)}),d.v.stateManager.after())}),(0!=this.minHealth()||0!=this.maxHealth())&&(d.v.stateManager.before("changeCharacterHP",(0,he.uZ)(0!=this.minHealth()?this.minHealth():this.maxHealth())),this.activeCharacters.forEach((e,i)=>{this.health[i]&&0!=this.health[i]&&(d.v.entityManager.changeHealth(e,e,this.health[i]),this.health[i]=0),(e.maxHealth>0&&e.health<=0||e.exhausted)&&(e.exhausted=!0)}),d.v.stateManager.after()),(0!=this.minExperience()||0!=this.maxExperience())&&(d.v.stateManager.before("changeCharacterXP",(0,he.uZ)(0!=this.minExperience()?this.minExperience():this.maxExperience())),this.activeCharacters.forEach((e,i)=>{this.experience[i]&&0!=this.experience[i]&&(e.progress.experience+=this.experience[i],this.experience[i]=0)}),d.v.stateManager.after()),(0!=this.minGold()||0!=this.maxGold())&&(d.v.stateManager.before("changeCharacterGold",(0,he.uZ)(0!=this.minGold()?this.minGold():this.maxGold())),this.activeCharacters.forEach((e,i)=>{this.gold[i]&&0!=this.gold[i]&&(e.progress.gold+=this.gold[i],this.gold[i]=0)}),d.v.stateManager.after()),(0!=this.minBattleGoals()||0!=this.maxBattleGoals())&&(d.v.stateManager.before("changeCharacterBattleGoals",(0,he.uZ)(0!=this.minBattleGoals()?this.minBattleGoals():this.maxBattleGoals())),this.activeCharacters.forEach((e,i)=>{this.battleGoals[i]&&0!=this.battleGoals[i]&&(e.progress.battleGoals+=this.battleGoals[i],this.battleGoals[i]=0)}),d.v.stateManager.after()),0!=this.bless){d.v.stateManager.before("changeCharacterBless",(0,he.uZ)(this.bless));let e=Math.abs(this.bless),i=0;for(;e>0;){const s=this.activeCharacters[i%this.activeCharacters.length];if(this.bless<0){let l=s.attackModifierDeck.cards.find((m,O)=>m.type==Lt.kl.bless&&O>s.attackModifierDeck.current);l&&(s.attackModifierDeck.cards.splice(s.attackModifierDeck.cards.indexOf(l),1),e--)}else d.v.attackModifierManager.addModifier(s.attackModifierDeck,new Lt.YY(Lt.kl.bless)),e--;i++}d.v.stateManager.after()}if(0!=this.curse){d.v.stateManager.before("changeCharacterCurse",(0,he.uZ)(this.curse));let e=Math.abs(this.curse),i=0;for(;e>0;){const s=this.activeCharacters[i%this.activeCharacters.length];if(this.curse<0){let l=s.attackModifierDeck.cards.find((m,O)=>m.type==Lt.kl.curse&&O>s.attackModifierDeck.current);l&&(s.attackModifierDeck.cards.splice(s.attackModifierDeck.cards.indexOf(l),1),e--)}else d.v.attackModifierManager.addModifier(s.attackModifierDeck,new Lt.YY(Lt.kl.curse)),e--;i++}d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-effects"]],decls:47,vars:40,consts:[[1,"event-effects-dialog"],[1,"header"],[1,"name"],[1,"ghs-svg",3,"src"],[3,"ghs-label"],["class","text",4,"ngIf"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"scroll-container","container"],["class","entity-container",4,"ngIf"],[3,"entities","entityConditions","immunities","type","change",4,"ngIf"],[1,"entity-container"],[1,"progress"],[1,"item"],[1,"button",3,"repeat","singleClick"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/experience.svg"],[1,"badge",3,"ngClass"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/loot.svg",1,"gold"],["type","checkbox","disabled","true","checked","true"],[1,"text"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],["class","absent","src","./assets/images/status/absent.svg",4,"ngIf"],["src","./assets/images/status/absent.svg",1,"absent"],["src","./assets/images/status/health.svg"],["src","./assets/images/status/bless.svg"],["src","./assets/images/status/curse.svg"],[3,"entities","entityConditions","immunities","type","change"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"img",3)(4,"span",4),t.qZA(),t.YNc(5,BF,2,1,"div",5),t.TgZ(6,"div",6),t.YNc(7,VF,3,5,"a",7),t.qZA()(),t.TgZ(8,"div",8),t.YNc(9,YF,34,33,"div",9),t.YNc(10,KF,1,4,"ghs-conditions",10),t.TgZ(11,"div",11)(12,"span",12),t._UZ(13,"span",4),t.qZA(),t.TgZ(14,"span",13)(15,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeExperience(-1)}),t._UZ(16,"img",15),t.qZA()(),t.TgZ(17,"span",16),t._UZ(18,"img",17),t.TgZ(19,"span",18),t._uU(20),t.ALo(21,"ghsValueSign"),t.qZA()(),t.TgZ(22,"span",13)(23,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeExperience(1)}),t._UZ(24,"img",19),t.qZA()(),t.TgZ(25,"span",13)(26,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeGold(-1)}),t._UZ(27,"img",15),t.qZA()(),t.TgZ(28,"span",16),t._UZ(29,"img",20),t.TgZ(30,"span",18),t._uU(31),t.ALo(32,"ghsValueSign"),t.qZA()(),t.TgZ(33,"span",13)(34,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeGold(1)}),t._UZ(35,"img",19),t.qZA()(),t.TgZ(36,"span",13)(37,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeBattleGoals(-1)}),t._UZ(38,"img",15),t.qZA()(),t.TgZ(39,"span",16),t._UZ(40,"input",21),t.TgZ(41,"span",18),t._uU(42),t.ALo(43,"ghsValueSign"),t.qZA()(),t.TgZ(44,"span",13)(45,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeBattleGoals(1)}),t._UZ(46,"img",19),t.qZA()()()()()),2&e&&(t.xp6(3),t.Q6J("src","./assets/images/event"+(i.menu?"-effects":"")+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","scenario.eventEffects"+(i.menu?".hint":"")),t.xp6(1),t.Q6J("ngIf",!i.menu),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(3),t.Q6J("ghs-label","scenario.eventEffects.progress"),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.experience")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(31,o_,i.minExperience()<0,i.maxExperience()>0)),t.xp6(1),t.Oqu(t.lcZ(21,25,i.minExperience()<0?i.minExperience():i.maxExperience())),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.character.progress.gold")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(34,o_,i.minGold()<0,i.maxGold()>0)),t.xp6(1),t.Oqu(t.lcZ(32,27,i.minGold()<0?i.minGold():i.maxGold())),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.character.progress.battleGoals")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(37,o_,i.minBattleGoals()<0,i.maxBattleGoals()>0)),t.xp6(1),t.Oqu(t.lcZ(43,29,i.minBattleGoals()<0?i.minBattleGoals():i.maxBattleGoals())),t.xp6(3),t.Q6J("repeat",!0))},dependencies:[x.mk,x.sg,x.O5,zu,ie,An,Kd],styles:[".event-effects-dialog[_ngcontent-%COMP%]{position:relative}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor)) 0}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{position:relative;cursor:pointer;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-radius:100%}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .absent[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto;filter:var(--ghs-filter-white)}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.inactive[_ngcontent-%COMP%]{filter:grayscale(.7);border-color:transparent}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{filter:none;opacity:.7;border-color:var(--ghs-color-gray)}.event-effects-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));align-content:start;margin:0 auto}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%] img.gold[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%]:hover, .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]:hover{opacity:.4}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline);text-align:center}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{display:flex;justify-content:center;grid-column:span 3;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}"]})),a})();const $F=function(o,a,n,e,i,s){return{new:o,full:a,half:n,inert:e,always:i,consumed:s}};let MT=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"sanitizer",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"ElementState",Gn.fq),(0,_.Z)(this,"svg",""),this.sanitizer=e}ngOnInit(){this.type&&!this.element&&(this.element=new Gn.G3(this.type),this.element.state=Gn.fq.strong),fetch("./assets/images/element/"+this.element.type+".svg").then(e=>e.text()).then(e=>{this.svg=this.sanitizer.bypassSecurityTrustHtml(e)}).catch(e=>{console.error("Invalid src: ./assets/images/element/"+this.element.type+".svg")})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(sr))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-element-icon"]],inputs:{type:"type",element:"element"},decls:1,vars:13,consts:[[1,"element-svg",3,"innerHTML","ghs-label","ghs-label-attribute","ngClass"]],template:function(e,i){1&e&&t._UZ(0,"span",0),2&e&&(t.Tol(i.element.type),t.Q6J("innerHTML",i.svg,t.oJD)("ghs-label","game.element."+i.element.type)("ghs-label-attribute","title")("ngClass",t.HTZ(6,$F,i.element.state==i.ElementState.new,i.element.state==i.ElementState.strong,i.element.state==i.ElementState.waning,i.element.state==i.ElementState.inert,i.element.state==i.ElementState.always,i.element.state==i.ElementState.consumed)))},dependencies:[x.mk,ie],styles:[".element-svg{width:100%;height:100%}.element-svg svg{width:100%;height:100%}.element-svg #bg{transition:clip-path 1s}.element-svg.inert #bg{clip-path:inset(100% 0px 0px 0px)}.element-svg.full #bg,.element-svg.always #bg,.element-svg.new #bg{clip-path:inset(0% 0px 0px 0px)}.element-svg.new{opacity:.7}.element-svg.consumed #bg{opacity:.3!important}.element-svg.half #bg{clip-path:inset(50% 0px 0px 0px)}\n"],encapsulation:2})),a})();const WF=function(o,a){return{consume:o,fh:a}};let XF=(()=>{var o;class a{constructor(){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ElementState",Gn.fq)}toggleElement(e=!1){const i=d.v.nextElementState(this.element,e);d.v.stateManager.before("updateElement","game.element."+this.element.type,"game.element.state."+i),this.element.state=i,d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-element"]],inputs:{element:"element"},decls:3,vars:5,consts:[[1,"element",3,"ngClass"],[3,"element"],[3,"singleClick","doubleClick"]],template:function(e,i){1&e&&(t.TgZ(0,"span",0),t._UZ(1,"ghs-element-icon",1),t.TgZ(2,"ghs-pointer-input",2),t.NdJ("singleClick",function(){return i.toggleElement()})("doubleClick",function(){return i.toggleElement(!0)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.WLB(2,WF,i.element.state==i.ElementState.consumed,i.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("element",i.element))},dependencies:[x.mk,MT,An],styles:["ghs-element .element{display:block;position:relative;width:calc(var(--ghs-unit) * 6.4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 6.4 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * .75)}ghs-element .element:hover{width:calc(var(--ghs-unit) * 7.4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 7.4 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * .25)}ghs-element .element ghs-pointer-input{position:absolute;top:0;left:0;width:100%;height:100%}ghs-element .element ghs-element-icon{position:absolute;top:0;left:0;width:100%;height:100%}ghs-element .element .element-svg #outline{display:none}ghs-element .element .element-svg #outline path,ghs-element .element .element-svg #symbol path{fill:var(--ghs-color-gray)!important}ghs-element .element .element-svg.dark #bg{fill:#203184!important}ghs-element .element:hover .element-svg #outline,ghs-element .element:hover .element-svg #symbol,ghs-element .element .element-svg.new #outline,ghs-element .element .element-svg.new #symbol,ghs-element .element .element-svg.full #outline,ghs-element .element .element-svg.full #symbol,ghs-element .element .element-svg.always #outline,ghs-element .element .element-svg.always #symbol,ghs-element .element .element-svg.half #outline,ghs-element .element .element-svg.half #symbol{display:inherit}ghs-element .element:hover .element-svg #outline path,ghs-element .element:hover .element-svg #symbol path,ghs-element .element .element-svg.new #outline path,ghs-element .element .element-svg.new #symbol path,ghs-element .element .element-svg.full #outline path,ghs-element .element .element-svg.full #symbol path,ghs-element .element .element-svg.always #outline path,ghs-element .element .element-svg.always #symbol path,ghs-element .element .element-svg.half #outline path,ghs-element .element .element-svg.half #symbol path{fill:var(--ghs-color-white)!important}ghs-element .element:hover .element-svg.new #outline,ghs-element .element .element-svg.new.new #outline,ghs-element .element .element-svg.full.new #outline,ghs-element .element .element-svg.always.new #outline,ghs-element .element .element-svg.half.new #outline{display:none}ghs-element .element:hover .element-svg{opacity:1!important}ghs-element .element:hover .element-svg #bg{opacity:1!important}ghs-element .element.consume:before{opacity:.3}ghs-element .element.consume.fh:before{left:55%;top:55%;width:50%;height:50%}\n"],encapsulation:2})),a})(),tq=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),this.dialog=e}open(){this.dialog.open(Dw,{panelClass:["dialog-invert"]})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-sheet"]],decls:2,vars:3,consts:[[1,"button",3,"ghs-label","ghs-label-attribute","click"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"a",0),t.NdJ("click",function(){return i.open()}),t._UZ(1,"span",1),t.qZA()),2&e&&(t.Q6J("ghs-label","party.sheet")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label",i.gameManager.game.party.name||"party.sheet"))},dependencies:[ie],styles:[".button[_ngcontent-%COMP%]{cursor:pointer;height:100%;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-small-text-factor) * var(--ghs-barsize));text-shadow:var(--ghs-outline)}.button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}"]})),a})();const eq=["mainMenuButton"];function nq(o,a){1&o&&t._UZ(0,"img",18),2&o&&t.Q6J("ghs-label","server.error")("ghs-label-attribute","title")}function iq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openMenu(i,s.SubMenu.server))}),t._UZ(1,"img",20),t.qZA()}2&o&&(t.Q6J("ghs-label","server.connected")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.connected")("ghs-label-attribute","title"))}function oq(o,a){1&o&&t._UZ(0,"img",21),2&o&&t.Q6J("ghs-label","server.connecting")("ghs-label-attribute","title")}function aq(o,a){1&o&&t._UZ(0,"img",22),2&o&&t.Q6J("ghs-label","server.closing")("ghs-label-attribute","title")}function sq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.settingsManager.settings.serverAutoconnect?s.gameManager.stateManager.connect():s.openMenu(i,s.SubMenu.server))}),t._UZ(1,"img",18)(2,"img",23),t.qZA()}2&o&&(t.Q6J("ghs-label","server.reconnected")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.closed")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.closed")("ghs-label-attribute","title"))}function rq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.settingsManager.settings.serverAutoconnect?s.gameManager.stateManager.connect():s.openMenu(i,s.SubMenu.server))}),t._UZ(1,"img",24),t.qZA()}2&o&&(t.Q6J("ghs-label","server.reconnected")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.disconnected")("ghs-label-attribute","title"))}function cq(o,a){1&o&&t._UZ(0,"img",25)}function lq(o,a){1&o&&(t.TgZ(0,"span",26),t._uU(1,"\xb0"),t.qZA())}const nm=function(o){return{denied:o}};function gq(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",30),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.character_add))}),t._UZ(2,"span",31),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(2,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters))("ghs-label","hints.addCharacters")}}function dq(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",32)(2,"span",33),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.scenario))}),t.qZA()(),t._UZ(3,"span",34),t.TgZ(4,"a",32)(5,"span",33),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.monster_add))}),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(5,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.scenario)),t.xp6(1),t.Q6J("ghs-label","hints.setScenario"),t.xp6(1),t.Q6J("ghs-label","or"),t.xp6(1),t.Q6J("ngClass",t.VKq(7,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters)),t.xp6(1),t.Q6J("ghs-label","hints.addMonsters")}}function hq(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",30),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.monster_add))}),t._UZ(2,"span",31),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(2,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters))("ghs-label","hints.addMonsters")}}function uq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",34),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","hints."+n.hintState)}}const _q=function(o){return{visible:o}};function pq(o,a){if(1&o&&(t.TgZ(0,"div",27),t.ynx(1,7),t.YNc(2,gq,3,4,"ng-container",28),t.YNc(3,dq,6,9,"ng-container",28),t.YNc(4,hq,3,4,"ng-container",28),t.YNc(5,uq,2,1,"ng-container",29),t.BQk(),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(5,_q,n.init)),t.xp6(1),t.Q6J("ngSwitch",n.hintState),t.xp6(1),t.Q6J("ngSwitchCase","characters"),t.xp6(1),t.Q6J("ngSwitchCase","scenario"),t.xp6(1),t.Q6J("ngSwitchCase","monsters")}}function fq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",35),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openEventEffects())}),t._UZ(1,"img",36),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/event"+(n.gameManager.game.round>0||n.gameManager.game.state==n.GameState.next?"-effects":"")+".svg",t.LSH)}}function mq(o,a){1&o&&t._UZ(0,"ghs-party-sheet")}function vq(o,a){1&o&&t._UZ(0,"ghs-element",37),2&o&&t.Q6J("element",a.$implicit)}function Cq(o,a){if(1&o&&(t.ynx(0),t.YNc(1,nq,1,2,"img",6),t.ynx(2,7),t.YNc(3,iq,2,4,"a",8),t.YNc(4,oq,1,2,"img",9),t.YNc(5,aq,1,2,"img",10),t.YNc(6,sq,3,6,"a",8),t.YNc(7,rq,2,4,"a",8),t.BQk(),t.YNc(8,cq,1,0,"img",11),t.YNc(9,lq,2,0,"span",12),t.YNc(10,pq,6,7,"div",13),t._UZ(11,"span",14),t.YNc(12,fq,2,1,"div",15),t.YNc(13,mq,1,0,"ghs-party-sheet",5),t._UZ(14,"span",14),t.TgZ(15,"div",16),t.YNc(16,vq,1,1,"ghs-element",17),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.serverError),t.xp6(1),t.Q6J("ngSwitch",n.gameManager.stateManager.wsState()),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.OPEN),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CONNECTING),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CLOSING),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CLOSED),t.xp6(1),t.Q6J("ngSwitchCase",-1),t.xp6(1),t.Q6J("ngIf",n.syncing()),t.xp6(1),t.Q6J("ngIf",!n.syncing()&&-99!=n.gameManager.stateManager.wsState()&&n.gameManager.game.server),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.hints),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.scenario&&n.gameManager.characterManager.characterCount()>0),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.partySheet),t.xp6(2),t.Q6J("ngClass",t.VKq(14,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.elements)),t.xp6(1),t.Q6J("ngForOf",n.gameManager.game.elementBoard)}}let Yr=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"mainMenuButton",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"menuState",cg.main),(0,_.Z)(this,"elements",[Gn.W_.fire,Gn.W_.ice,Gn.W_.air,Gn.W_.earth,Gn.W_.light,Gn.W_.dark]),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"hintState",""),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){setTimeout(()=>{this.init=!0},R.r.settings.disableAnimations?0:1500),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.hintStateValue()!=this.hintState&&(this.init=!1,setTimeout(()=>{this.hintState=this.hintStateValue(),this.init=!0},R.r.settings.disableAnimations?0:500))}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}syncing(){return window.document.body.classList.contains("server-sync")}hintStateValue(){return d.v.game.playerCount<1&&d.v.game.figures.every(e=>!(e instanceof oe.z||e instanceof Ze.Q))?"characters":!d.v.game.scenario&&d.v.game.figures.every(e=>!(e instanceof Ze.Q))?"scenario":d.v.game.figures.every(e=>!(e instanceof Ze.Q))?"monsters":d.v.game.figures.every(e=>!(e instanceof Ze.Q)||0==e.entities.length)?"addMonsterEntities":d.v.game.figures.some(e=>e.active)?d.v.game.round<3?"active-full":"active":d.v.game.state==ge.D2.draw?d.v.game.figures.some(e=>e instanceof oe.z&&!e.absent&&d.v.entityManager.isAlive(e)&&R.r.settings.initiativeRequired&&e.initiative<=0)?d.v.game.round<3?"draw-full":"draw-short":"draw":d.v.game.state==ge.D2.next?"next":""}openMenu(e,i=void 0){this.dialog.open(z6,{panelClass:"dialog",data:{subMenu:null!=i&&i|cg.main,standalone:this.standalone},maxWidth:"90vw",positionStrategy:this.overlay.position().flexibleConnectedTo(this.mainMenuButton).withPositions([new ti.tR({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"})]).withDefaultOffsetX(10)})}openEventEffects(){this.dialog.open(Lw,{panelClass:"dialog",data:d.v.game.round>0||d.v.game.state==ge.D2.next})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-header"]],viewQuery:function(e,i){if(1&e&&t.Gf(eq,5),2&e){let s;t.iGM(s=t.CRH())&&(i.mainMenuButton=s.first)}},inputs:{standalone:"standalone"},decls:6,vars:4,consts:[[3,"ngClass"],[1,"main-menu"],[1,"menu-button","active-outline",3,"ghs-label","ghs-label-attribute","click"],["mainMenuButton",""],["src","./assets/images/menu.svg",1,"ghs-svg"],[4,"ngIf"],["src","./assets/images/warning.svg","class","ghs-svg server-connection closed",3,"ghs-label","ghs-label-attribute",4,"ngIf"],[3,"ngSwitch"],["class","server-connection-status",3,"ghs-label","ghs-label-attribute","click",4,"ngSwitchCase"],["src","./assets/images/server-connection.svg","class","ghs-svg server-connection connecting",3,"ghs-label","ghs-label-attribute",4,"ngSwitchCase"],["src","./assets/images/server-connection.svg","class","ghs-svg server-connection closing",3,"ghs-label","ghs-label-attribute",4,"ngSwitchCase"],["src","./assets/images/shuffle.svg","class","server-connection syncing",4,"ngIf"],["class","game-server",4,"ngIf"],["class","hints",3,"ngClass",4,"ngIf"],[1,"spacer"],["class","event-effects",3,"click",4,"ngIf"],[1,"elements",3,"ngClass"],[3,"element",4,"ngFor","ngForOf"],["src","./assets/images/warning.svg",1,"ghs-svg","server-connection","closed",3,"ghs-label","ghs-label-attribute"],[1,"server-connection-status",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","connected",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","connecting",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","closing",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","closed",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","disconnected",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/shuffle.svg",1,"server-connection","syncing"],[1,"game-server"],[1,"hints",3,"ngClass"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"menu-hint",3,"click"],[3,"ngClass","ghs-label"],[1,"menu-hint",3,"ngClass"],[3,"ghs-label","click"],[3,"ghs-label"],[1,"event-effects",3,"click"],[1,"ghs-svg",3,"src"],[3,"element"]],template:function(e,i){1&e&&(t.TgZ(0,"header",0)(1,"div",1)(2,"a",2,3),t.NdJ("click",function(l){return i.openMenu(l)}),t._UZ(4,"img",4),t.qZA()(),t.YNc(5,Cq,17,16,"ng-container",5),t.qZA()),2&e&&(t.Q6J("ngClass",i.settingsManager.settings.theme),t.xp6(2),t.Q6J("ghs-label","menu.main")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ngIf",!i.standalone))},dependencies:[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,XF,tq,ie],styles:['header[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;position:relative;overflow:hidden}header[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-image:url(bar.e331a4ef847b1c19.jpg);background-size:100% 105%;background-position:bottom left;background-repeat:no-repeat;z-index:-1}header.fh[_ngcontent-%COMP%]:before{background-image:url(bar.56898105bfacea25.jpg)}header.modern[_ngcontent-%COMP%]:before{background-image:url(dialog_background_modern.c233015926c13e5e.png)}header.modern[_ngcontent-%COMP%]:after{content:" ";position:absolute;bottom:0;left:0;width:100%;height:4%;background:linear-gradient(90deg,var(--ghs-color-darkgray) 0%,var(--ghs-color-white) 35%,var(--ghs-color-white) 65%,var(--ghs-color-darkgray) 100%);opacity:.2}header[_ngcontent-%COMP%] .menu-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;position:relative;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor) * var(--ghs-barsize));text-shadow:var(--ghs-outline);color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));margin:calc(var(--ghs-unit) * 2.2 * var(--ghs-text-factor) * var(--ghs-barsize));cursor:pointer}header[_ngcontent-%COMP%] .menu-button[_ngcontent-%COMP%]:hover, header[_ngcontent-%COMP%] .menu-button.active-button[_ngcontent-%COMP%]{color:var(--ghs-color-white);filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] a.server-connection-status[_ngcontent-%COMP%]{display:flex;cursor:pointer}header[_ngcontent-%COMP%] .game-server[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));align-self:center;margin-top:calc(var(--ghs-unit) * -.75 * var(--ghs-text-factor) * var(--ghs-barsize));margin-left:calc(var(--ghs-unit) * -1.2 * var(--ghs-text-factor) * var(--ghs-barsize));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor) * var(--ghs-barsize))}header[_ngcontent-%COMP%] .server-connection[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));margin-right:calc(var(--ghs-unit) * 1);align-self:center}header[_ngcontent-%COMP%] .server-connection.connected[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.connecting[_ngcontent-%COMP%]{filter:var(--ghs-filter-blue) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.closing[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.closed[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.disconnected[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.syncing[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);animation:ghs-spinning 1.5s linear infinite}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-small-text-factor) * var(--ghs-barsize));opacity:0;transition:opacity .5s ease-in-out}header[_ngcontent-%COMP%] .hints.visible[_ngcontent-%COMP%]{opacity:1}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize))}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%] .menu-hint[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-small-text-factor) * var(--ghs-barsize));text-shadow:var(--ghs-outline)}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%] .menu-hint[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}@media (max-width: 600px),(orientation: portrait){header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%]{flex-direction:column;justify-content:center}}header[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:100%;margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize))}header[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray);height:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));width:auto}header[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center}header[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));cursor:pointer}header[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:100%;width:100%}']})),a})();function Mq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.empty"))}function Oq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.missingInitiative"))}function Pq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.active"))}function yq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirm"))}function bq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.next())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmTurns"))}function xq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.finish"))}function wq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.finishScenario(!0))}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmFinish"))}function kq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.failed"))}function Tq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.finishScenario(!1))}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmFailed"))}function Zq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.resetScenario())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmReset"))}function Aq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",5),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label",n.gameManager.game.state==n.GameState.next?"round.hint.continueNext":"round.hint.continueDraw")}}function Sq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.battleGoals"))}function Eq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirm"))}let Dq=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"GameState",ge.D2),this.dialogRef=e,this.dialog=i}confirm(){d.v.game.figures.find(i=>i.active)&&(d.v.stateManager.before("endAllTurns"),d.v.game.figures.forEach(i=>d.v.roundManager.afterTurn(i)),d.v.stateManager.after()),this.next()}next(){this.dialogRef.close(!0)}finishScenario(e){if(d.v.game.scenario){const i=d.v.sectionData(d.v.game.scenario.edition).filter(s=>!!d.v.game.scenario&&s.edition==d.v.game.scenario.edition&&s.parent==d.v.game.scenario.index&&s.group==d.v.game.scenario.group&&s.conclusion);0!=i.length&&e?this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.game.scenario}}).closed.subscribe({next:s=>{s&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,conclusion:s,success:e}})}}):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:e}})}}resetScenario(){d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.stateManager.after(1e3)}empty(){return 0==d.v.game.figures.length}missingInitiative(){return d.v.game.figures.some(e=>R.r.settings.initiativeRequired&&(e instanceof oe.z&&d.v.entityManager.isAlive(e)&&!e.absent||e instanceof Nn.k)&&e.getInitiative()<1)}active(){return null!=d.v.game.figures.find(e=>e.active&&!e.off)}battleGoals(){return!this.missingInitiative()&&R.r.settings.battleGoals&&R.r.settings.battleGoalsReminder&&null!=d.v.game.scenario&&d.v.roundManager.firstRound&&!d.v.game.figures.every(e=>!(e instanceof oe.z)||e.battleGoal||e.absent)}finish(){return!1}failed(){return!this.active()&&!this.empty()&&d.v.game.figures.some(e=>e instanceof oe.z)&&d.v.game.figures.every(e=>!(e instanceof oe.z)||e instanceof oe.z&&(!d.v.entityManager.isAlive(e)||e.absent))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-hint-dialog"]],decls:15,vars:13,consts:[[1,"hint-dialog"],[1,"hint"],[4,"ngIf"],[3,"click",4,"ngIf"],["class","small",3,"click",4,"ngIf"],[3,"ghs-label"],[3,"click"],[1,"small",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,Mq,2,1,"p",2),t.YNc(3,Oq,2,1,"p",2),t.YNc(4,Pq,2,1,"p",2),t.YNc(5,yq,2,1,"a",3),t.YNc(6,bq,2,1,"a",4),t.YNc(7,xq,2,1,"p",2),t.YNc(8,wq,2,1,"a",3),t.YNc(9,kq,2,1,"p",2),t.YNc(10,Tq,2,1,"a",3),t.YNc(11,Zq,2,1,"a",3),t.YNc(12,Aq,2,1,"a",3),t.YNc(13,Sq,2,1,"p",2),t.YNc(14,Eq,2,1,"a",3),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngIf",i.empty()),t.xp6(1),t.Q6J("ngIf",i.missingInitiative()),t.xp6(1),t.Q6J("ngIf",i.active()),t.xp6(1),t.Q6J("ngIf",i.active()),t.xp6(1),t.Q6J("ngIf",i.active()),t.xp6(1),t.Q6J("ngIf",i.finish()),t.xp6(1),t.Q6J("ngIf",i.finish()),t.xp6(1),t.Q6J("ngIf",i.failed()),t.xp6(1),t.Q6J("ngIf",i.failed()),t.xp6(1),t.Q6J("ngIf",i.failed()),t.xp6(1),t.Q6J("ngIf",i.finish()||i.failed()),t.xp6(1),t.Q6J("ngIf",i.battleGoals()),t.xp6(1),t.Q6J("ngIf",i.battleGoals()))},dependencies:[x.O5,ie],styles:[".hint-dialog[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);text-align:center}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;min-height:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor))}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor))}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] a.small[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));font-style:italic}"]})),a})();const Iq=function(o){return{selected:o}};function Nq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",6),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleSelect(s.name))}),t._UZ(1,"img",7),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(3,Iq,n.name==e.selected)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Oqu(e.gameManager.characterManager.characterName(n,!0))}}const Jq=function(o,a){return{disabled:o,remove:a}},Uq=function(o){return[o]};function Lq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",8),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(1,"span",0),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,Jq,!(n.selected||n.edit&&n.data.selected),n.edit&&!n.selected&&n.data.selected)),t.xp6(1),t.Q6J("ghs-label",n.edit&&!n.selected&&n.data.selected?"game.loot.remove":n.edit&&n.data.selected&&n.selected==n.data.selected?"game.loot.keep":"game.loot.apply")("ghs-label-args",t.VKq(6,Uq,n.selected||n.data.selected||""))}}function Qq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",9),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(1,"span",10),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","cancel"))}const Rq=function(o,a){return[o,a]};let OT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"selected",void 0),(0,_.Z)(this,"loot",void 0),(0,_.Z)(this,"edit",!1),this.data=e,this.dialogRef=i,this.loot=e.loot,this.selected=e.selected||"",this.edit=e.edit||!1,this.characters=d.v.game.figures.filter(s=>s instanceof oe.z&&!s.absent&&d.v.entityManager.isAlive(s)).map(s=>s)}toggleSelect(e){this.selected=this.selected==e?"":e}close(){this.dialogRef.close(this.selected)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-apply-dialog"]],decls:7,vars:8,consts:[[3,"ghs-label","ghs-label-args"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"menu"],[3,"ngClass","click",4,"ngIf"],["class","cancel",3,"click",4,"ngIf"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[3,"ngClass","click"],[1,"cancel",3,"click"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"p"),t._UZ(1,"span",0),t.qZA(),t.TgZ(2,"div",1),t.YNc(3,Nq,4,5,"div",2),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,Lq,2,8,"a",4),t.YNc(6,Qq,2,1,"a",5),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ghs-label","game.loot.chooseCharacter")("ghs-label-args",t.WLB(5,Rq,""+i.gameManager.lootManager.getValue(i.loot),"game.loot."+i.loot.type)),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngIf",i.selected||i.data.selected),t.xp6(1),t.Q6J("ngIf",!i.selected&&!i.data.selected))},dependencies:[x.mk,x.sg,x.O5,ie],styles:["p[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-align:center}.characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:.25em;padding:.25em;border:1px solid transparent}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.menu[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;color:var(--ghs-color-green)}.menu[_ngcontent-%COMP%] a.remove[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray)}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5;color:var(--ghs-color-gray)}"]})),a})();const Fq=function(o,a){return{fh:o,modern:a}},qq=function(o,a){return[o,a]},Hq=function(o){return{autosell:o}};let Qw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"loot",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"autoSell",!1),this.data=e,this.dialogRef=i,this.dialog=s,this.item=e.item,this.loot=e.loot,this.character=e.character,this.autoSell=null!=this.character.progress.items.find(l=>l.name==""+this.item.id&&l.edition==this.item.edition)}close(){this.dialogRef.close()}openDialog(){this.dialog.open(gg,{data:{item:this.item}})}apply(){this.dialogRef.close(this.item)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-random-item-dialog"]],decls:10,vars:17,consts:[[1,"random-item-dialog",3,"ngClass"],[1,"scroll-container"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"item",3,"ngClass"],[3,"item","flipped","editionLabel","click"],[1,"menu"],[1,"cancel",3,"click"],[3,"ghs-label"],[1,"apply",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"div",3)(4,"ghs-item",4),t.NdJ("click",function(){return i.openDialog()}),t.qZA()(),t.TgZ(5,"div",5)(6,"a",6),t.NdJ("click",function(){return i.close()}),t._UZ(7,"span",7),t.qZA(),t.TgZ(8,"a",8),t.NdJ("click",function(){return i.apply()}),t._UZ(9,"span",7),t.qZA()()()()),2&e&&(t.Q6J("ngClass",t.WLB(9,Fq,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","game.loot.random_item.draw")("ghs-label-args",t.WLB(12,qq,i.character.name,i.gameManager.characterManager.characterName(i.character))),t.xp6(1),t.Q6J("ngClass",t.VKq(15,Hq,i.autoSell)),t.xp6(1),t.Q6J("item",i.item)("flipped",!0)("editionLabel",i.gameManager.currentEdition()),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(2),t.Q6J("ghs-label","game.loot.random_item.apply"))},dependencies:[x.mk,Xd,ie],styles:[".random-item-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:block;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.random-item-dialog.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.random-item-dialog.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.random-item-dialog[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%}.random-item-dialog[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{display:block;width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:auto}.random-item-dialog[_ngcontent-%COMP%] .item.autosell[_ngcontent-%COMP%]{cursor:not-allowed;border-color:var(--ghs-color-darkgray);filter:grayscale(.7)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();function jq(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.loot.value4P>0?""+n.loot.value4P:"")}}const ih=function(o,a){return{value:o,"value-highlight":a}};function Bq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",15),t._uU(2,"/ "),t._UZ(3,"span",15),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(4,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()>2))("ghs-label","%game.loot.player.3-4% +"+n.loot.value4P),t.xp6(2),t.Q6J("ngClass",t.WLB(7,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()<=2))("ghs-label","%game.loot.player.2% +"+n.loot.value2P)}}function zq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",15),t._uU(2,"/ "),t._UZ(3,"span",15),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(4,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()>=4))("ghs-label","%game.loot.player.4% +"+n.loot.value4P),t.xp6(2),t.Q6J("ngClass",t.WLB(7,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()<=3))("ghs-label","%game.loot.player.2-3% +"+n.loot.value2P)}}function Gq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",15),t._uU(2,"/ "),t._UZ(3,"span",15),t._uU(4,"/ "),t._UZ(5,"span",15),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(6,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()>3))("ghs-label","%game.loot.player.4% +"+n.loot.value4P),t.xp6(2),t.Q6J("ngClass",t.WLB(9,ih,n.highlight,n.highlight&&3==n.gameManager.characterManager.characterCount()))("ghs-label","%game.loot.player.3% +"+n.loot.value3P),t.xp6(2),t.Q6J("ngClass",t.WLB(12,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()<3))("ghs-label","%game.loot.player.2% +"+n.loot.value2P)}}function Vq(o,a){if(1&o&&(t.TgZ(0,"span",13),t.YNc(1,jq,2,1,"span",14),t.YNc(2,Bq,4,10,"ng-container",14),t.YNc(3,zq,4,10,"ng-container",14),t.YNc(4,Gq,6,15,"ng-container",14),t._uU(5," \xa0"),t._UZ(6,"span",4),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.loot.value2P==n.loot.value3P&&n.loot.value3P==n.loot.value4P),t.xp6(1),t.Q6J("ngIf",n.loot.value4P==n.loot.value3P&&n.loot.value3P!=n.loot.value2P),t.xp6(1),t.Q6J("ngIf",n.loot.value4P!=n.loot.value3P&&n.loot.value3P==n.loot.value2P),t.xp6(1),t.Q6J("ngIf",n.loot.value4P!=n.loot.value3P&&n.loot.value3P!=n.loot.value2P),t.xp6(2),t.Q6J("ghs-label","game.loot."+n.loot.type)}}function Yq(o,a){if(1&o&&t._UZ(0,"img",19),2&o){const n=t.oxw(2);t.Q6J("src",n.gameManager.characterManager.characterIcon(n.character),t.LSH)}}function Kq(o,a){1&o&&t._UZ(0,"img",20)}const $q=function(o,a){return{"with-header":o,edit:a}};function Wq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",16),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeCharacter(i))}),t.YNc(1,Yq,1,1,"img",17),t.YNc(2,Kq,1,0,"img",18),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,$q,n.loot.type!=n.LootType.money&&n.loot.type!=n.LootType.special1&&n.loot.type!=n.LootType.special2,n.edit&&n.settingsManager.settings.applyLoot)),t.xp6(1),t.Q6J("ngIf",n.character),t.xp6(1),t.Q6J("ngIf",!n.character&&n.settingsManager.settings.applyLoot&&n.apply)}}function Xq(o,a){1&o&&t._UZ(0,"img",21)}const t7=function(o,a){return{flipped:o,"no-animations":a}},e7=function(){return[]};let jO=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"loot",void 0),(0,_.Z)(this,"index",-1),(0,_.Z)(this,"disableFlip",!1),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"looted",!1),(0,_.Z)(this,"highlight",!0),(0,_.Z)(this,"apply",!0),(0,_.Z)(this,"character",""),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"revealed",!1),(0,_.Z)(this,"animate",!1),this.dialog=e}ngOnInit(){this.animate=!this.disableFlip}onChange(e){this.revealed=e}ngOnChanges(e){const i=e.flipped;i&&!this.disableFlip&&i.currentValue&&i.currentValue!=i.previousValue&&(this.animate=!0)}changeCharacter(e){R.r.settings.applyLoot&&(this.edit||!this.character)&&(e.preventDefault(),e.stopPropagation(),this.dialog.open(OT,{panelClass:"dialog",data:{loot:this.loot,selected:this.character,edit:this.edit}}).closed.subscribe({next:s=>{if("string"==typeof s){const l=d.v.game.figures.find(O=>O instanceof oe.z&&O.name==this.character);let m;if(l instanceof oe.z&&l.name!=s&&(this.loot.type==le.CG.random_item&&s?m=l.progress.equippedItems.find(O=>"loot-random-item"==O.marker):(d.v.stateManager.before("removeLootCard","data.character."+l.name,"game.loot."+this.loot.type,d.v.lootManager.getValue(this.loot)+""),l.lootCards=l.lootCards.filter(O=>O!=this.index),(this.loot.type==le.CG.money||this.loot.type==le.CG.special1||this.loot.type==le.CG.special2)&&(l.loot-=d.v.lootManager.getValue(this.loot)),this.loot.type==le.CG.random_item&&(m=l.progress.equippedItems.find(O=>"loot-random-item"==O.marker),m&&(l.progress.items=l.progress.items.filter(O=>m&&(O.edition!=m.edition||O.name!=m.name)),l.progress.equippedItems=l.progress.equippedItems.filter(O=>m&&(O.edition!=m.edition||O.name!=m.name)))),d.v.stateManager.after())),s&&(!l||l.name!=s)){const O=d.v.game.figures.find(k=>k instanceof oe.z&&k.name==s);if(O instanceof oe.z)if(this.loot.type!=le.CG.random_item)d.v.stateManager.before("addLootCard","data.character."+O.name,"game.loot."+this.loot.type,d.v.lootManager.getValue(this.loot)+""),d.v.lootManager.applyLoot(this.loot,O,this.index),d.v.stateManager.after();else{let k=m?d.v.itemManager.getItem(+m.name,m.edition,!0):void 0;k||(k=d.v.lootManager.applyLoot(this.loot,O,this.index)),k&&this.dialog.open(Qw,{panelClass:"dialog",data:{item:k,loot:this.loot,index:this.index,character:O}}).closed.subscribe({next:W=>{if(W){const ct=W;d.v.stateManager.before("selectRandomItemLoot");let Ct=new Vn.xb(""+ct.id,ct.edition);d.v.itemManager.addItemCount(ct),-1==O.lootCards.indexOf(this.index)&&(O.lootCards.push(this.index),O.lootCards.sort((Ot,xt)=>Ot-xt)),null!=O.progress.items.find(Ot=>Ot.name==""+ct.id&&Ot.edition==ct.edition)?O.progress.gold+=d.v.itemManager.itemSellValue(ct):(O.progress.items.push(Ct),O.progress.equippedItems.push(new Vn.VY(Ct.name,Ct.edition,void 0,"loot-random-item"))),m&&l instanceof oe.z&&(l.lootCards=l.lootCards.filter(Ot=>Ot!=this.index),l.progress.items=l.progress.items.filter(Ot=>m&&(Ot.edition!=m.edition||Ot.name!=m.name)),l.progress.equippedItems=l.progress.equippedItems.filter(Ot=>"loot-random-item"!=Ot.marker)),d.v.stateManager.after()}else O.lootCards=O.lootCards.filter(ct=>ct!=this.index)}})}}}}}))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot"]],inputs:{loot:"loot",index:"index",disableFlip:"disableFlip",flipped:"flipped",reveal:"reveal",edit:"edit",looted:"looted",highlight:"highlight",apply:"apply",character:"character"},features:[t.TTD],decls:16,vars:23,consts:[["card-reveal","",1,"card",3,"ngClass","disabled","change"],["card",""],[1,"card-back","back"],[1,"revealed"],[3,"ghs-label"],[1,"card-front","front"],["class","header",4,"ngIf"],["class","character",3,"ngClass","click",4,"ngIf"],[1,"enhancements"],["class","icon","src","./assets/images/fh/loot/plus1.svg",4,"ngFor","ngForOf"],[1,"card-id"],[1,"footer"],[1,"icon"],[1,"header"],[4,"ngIf"],[3,"ngClass","ghs-label"],[1,"character",3,"ngClass","click"],[3,"src",4,"ngIf"],["class","warning","src","./assets/images/warning.svg",4,"ngIf"],[3,"src"],["src","./assets/images/warning.svg",1,"warning"],["src","./assets/images/fh/loot/plus1.svg",1,"icon"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div")(1,"div",0,1),t.NdJ("change",function(l){return i.onChange(l)}),t.TgZ(3,"div",2)(4,"span",3),t._UZ(5,"span",4),t.qZA()(),t.TgZ(6,"div",5),t.YNc(7,Vq,7,5,"span",6),t.YNc(8,Wq,3,6,"span",7),t.TgZ(9,"span",8),t.YNc(10,Xq,1,0,"img",9),t.ALo(11,"ghsRange"),t.qZA(),t.TgZ(12,"span",10),t._uU(13),t.qZA(),t.TgZ(14,"span",11),t._UZ(15,"span",12),t.qZA()()()()),2&e){const s=t.MAs(2);t.Gre("loot ",i.loot.type,""),t.xp6(1),t.Udp("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.WLB(19,t7,i.flipped||i.revealed,!i.animate))("disabled",!i.reveal),t.xp6(4),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(1),t.Udp("background-image","url(./assets/images/fh/loot/loot-"+i.loot.type+(i.loot.type==i.LootType.money?i.gameManager.lootManager.getValue(i.loot,!1):"")+".png)"),t.xp6(1),t.Q6J("ngIf",i.loot.type!=i.LootType.money&&i.loot.type!=i.LootType.special1&&i.loot.type!=i.LootType.special2),t.xp6(1),t.Q6J("ngIf",i.looted||i.character),t.xp6(2),t.Q6J("ngForOf",t.xi3(11,16,t.DdM(22,e7),i.loot.enhancements)),t.xp6(3),t.hij(" ",i.loot.cardId," * "),t.xp6(2),t.Udp("background-image","url(./assets/images/fh/loot/"+(i.loot.type==i.LootType.special1||i.loot.type==i.LootType.special2?i.LootType.money:i.loot.type)+".svg)")}},dependencies:[x.mk,x.sg,x.O5,Yf,ie,Ii],styles:[".loot[_ngcontent-%COMP%]{position:absolute;inset:0;display:block}.loot[_ngcontent-%COMP%] .back[_ngcontent-%COMP%]{background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(loot-back.b3962872f80142fe.png);border-radius:5%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%]{display:flex;position:relative;top:0;left:0;width:100%;height:100%;border-radius:5%;background-position:center;background-size:100% auto;background-repeat:no-repeat}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:10%;font-size:1.3em;text-align:center;white-space:nowrap}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:.7em;opacity:.7}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .value.value-highlight[_ngcontent-%COMP%]{opacity:1;font-size:1.1em}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:20%;display:flex;justify-content:center;align-items:center;z-index:2}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character.with-header[_ngcontent-%COMP%]{top:10%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character.edit[_ngcontent-%COMP%]{cursor:pointer}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto;filter:var(--ghs-filter-outline)}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img.warning[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-outline);height:60%;margin-left:5%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%]{position:absolute;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;top:50%;left:50%;height:50%;width:100%;transform:translate(-50%,-50%);z-index:1}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:20%;height:auto;margin:5%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;font-size:.8em;width:20%;height:5%;display:flex;justify-content:center;align-content:center}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;bottom:0%;left:50%;height:12%;width:20%;transform:translate(-50%);border-top-left-radius:25%;border-top-right-radius:25%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:80%;height:80%;background-size:contain;background-position:center center;background-repeat:no-repeat}.loot[_ngcontent-%COMP%] .confirm[_ngcontent-%COMP%] .revealed[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:1.3em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black))}"]})),a})();const n7=["menu"];function i7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return i.configuration=!i.configuration,t.KtG(i.enhancements=!1)}),t._UZ(1,"img",15)(2,"span",7),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","game.loot.config."+(n.configuration?"hide":"show"))}}function o7(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.reveal=(i.reveal+1)%3)}),t._UZ(2,"span",7),t.qZA(),t.TgZ(3,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.shuffle())}),t._UZ(4,"span",7),t.qZA(),t.TgZ(5,"label")(6,"input",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleEdit())}),t.qZA(),t._UZ(7,"span",7),t.qZA(),t.YNc(8,i7,3,1,"a",13),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label",2==n.reveal?"game.cards.coverAll":0==n.reveal?"game.cards.revealAll":"game.cards.revealAllConfirm"),t.xp6(2),t.Q6J("ghs-label","game.cards.shuffle"),t.xp6(2),t.Q6J("checked",n.edit),t.xp6(1),t.Q6J("ghs-label","game.cards.edit"),t.xp6(1),t.Q6J("ngIf",n.edit)}}const Rw=function(o){return{disabled:o}};function a7(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"img",6)(3,"span",7),t.qZA(),t.TgZ(4,"a",22),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.changeType(s,-1))}),t._UZ(5,"img",23),t.qZA(),t.TgZ(6,"span",24),t._uU(7),t.qZA(),t.TgZ(8,"a",22),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.changeType(s,1))}),t._UZ(9,"img",25),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/fh/loot/"+(n==e.LootType.special1||n==e.LootType.special2?e.LootType.money:n)+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","game.loot."+n),t.xp6(1),t.Q6J("ngClass",t.VKq(7,Rw,!e.lootDeckConfig[n]||n==e.LootType.random_item&&e.gameManager.lootManager.randomItemLooted())),t.xp6(2),t.Q6J("ghs-label","game.loot."+n)("ghs-label-attribute","title"),t.xp6(1),t.hij(" ",e.lootDeckConfig[n]&&"x"+e.lootDeckConfig[n]||"-"," "),t.xp6(1),t.Q6J("ngClass",t.VKq(9,Rw,e.lootDeckConfig[n]==e.maxValue(n)||n==e.LootType.random_item&&e.gameManager.lootManager.randomItemLooted()))}}function s7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.currentConfig())}),t._UZ(1,"span",7),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.loot.config.discard"))}function r7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._UZ(2,"span",7),t.qZA(),t.TgZ(3,"div",18),t.YNc(4,a7,10,11,"ng-container",19),t.qZA(),t.TgZ(5,"div",20),t.YNc(6,s7,2,1,"a",21),t.TgZ(7,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.applyConfig())}),t._UZ(8,"span",7),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","game.loot.config"),t.xp6(2),t.Q6J("ngForOf",n.types),t.xp6(2),t.Q6J("ngIf",n.deck.cards.length>0),t.xp6(2),t.Q6J("ghs-label","game.loot.config."+(0==n.deck.cards.length?"create":"apply"))}}function c7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",35),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw(2);return t.KtG(s.unenhanceCard(i))}),t.qZA()}2&o&&t.Q6J("ghs-label","game.loot.enhancements.remove")("ghs-label-attribute","title")}const l7=function(){return[]};function g7(o,a){if(1&o&&(t.TgZ(0,"div",33),t.YNc(1,c7,1,2,"img",34),t.ALo(2,"ghsRange"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,l7),n.enhancements))}}function d7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",28),t._UZ(1,"ghs-loot",29),t.TgZ(2,"a",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.enhanceCard(s))}),t._UZ(3,"img",31),t.qZA(),t.YNc(4,g7,3,5,"div",32),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("loot",n)("flipped",!0)("highlight",!1)("apply",e.apply),t.xp6(1),t.Q6J("ghs-label","game.loot.enhancements.add")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngIf",n.enhancements>0)}}function h7(o,a){if(1&o&&(t.TgZ(0,"div",26),t.YNc(1,d7,5,7,"div",27),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.enhancementDeck)}}function u7(o,a){1&o&&t._UZ(0,"div",43)}function _7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.remove(i+s.deck.current+1))}),t._UZ(1,"img",23),t.qZA()}}function p7(o,a){1&o&&t._UZ(0,"div",49)}function f7(o,a){if(1&o&&(t.TgZ(0,"div",44),t._UZ(1,"ghs-loot",45),t.YNc(2,_7,2,0,"a",46),t.YNc(3,p7,1,0,"div",47),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("loot",n)("reveal",!0)("flipped",2==i.reveal)("index",i.deck.current+e+1)("character",i.getCharacter(i.deck.current+e+1))("apply",i.apply),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit)}}function m7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.remove(s.deck.current-i))}),t._UZ(1,"img",23),t.qZA()}}function v7(o,a){1&o&&t._UZ(0,"div",49)}function C7(o,a){if(1&o&&(t.TgZ(0,"div",44),t._UZ(1,"ghs-loot",50),t.YNc(2,m7,2,0,"a",46),t.YNc(3,v7,1,0,"div",47),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("loot",n)("flipped",!0)("index",i.deck.current-e)("character",i.getCharacter(i.deck.current-e))("edit",i.edit)("looted",!0)("apply",i.apply),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit)}}function M7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",36)(1,"div",37,38),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dropUpcoming(i))}),t.YNc(3,u7,1,0,"div",39),t.YNc(4,f7,4,8,"div",40),t.qZA(),t.TgZ(5,"div",41,42),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dropDisgarded(i))}),t._UZ(7,"div",43),t.YNc(8,C7,4,9,"div",40),t.qZA()()}if(2&o){const n=t.MAs(2),e=t.MAs(6),i=t.oxw();t.Udp("max-height",i.maxHeight),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",e)("cdkDropListAutoScrollStep",20),t.xp6(2),t.Q6J("ngIf",0==i.upcomingCards().length),t.xp6(1),t.Q6J("ngForOf",i.upcomingCards()),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",n)("cdkDropListAutoScrollStep",20),t.xp6(3),t.Q6J("ngForOf",i.disgardedCards())}}let PT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"apply",!0),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),(0,_.Z)(this,"types",Object.values(le.CG)),(0,_.Z)(this,"lootDeckConfig",{}),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"type",le.CG.money),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"configuration",!1),(0,_.Z)(this,"enhancements",!1),(0,_.Z)(this,"characters",!0),(0,_.Z)(this,"enhancementDeck",[]),this.data=e,this.dialogRef=i,this.deck=e.deck,this.characters=e.characters,this.before=e.before,this.after=e.after,this.apply=e.apply}ngOnInit(){this.currentConfig(),setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},R.r.settings.disableAnimations?0:250),0==this.deck.cards.length&&(this.edit=!0,this.configuration=!0),d.v.game.scenario||(this.enhancements=!0,this.configuration=!1),this.dialogRef.closed.subscribe({next:()=>{const e=0==this.deck.cards.length;let i=new le._8;d.v.lootManager.apply(i,this.lootDeckConfig),e&&i.cards.length>0&&this.applyConfig()}}),this.enhancementDeck=d.v.lootManager.fullLootDeck().filter(e=>-1!=le.Qq.indexOf(e.type)).sort((e,i)=>e.cardId-i.cardId)}enhanceCard(e){this.before.emit(new _o(this.deck,"lootDeckAddEnhancement",e.type,d.v.lootManager.valueLabel(e))),e.enhancements++,d.v.game.lootDeckEnhancements=this.enhancementDeck.filter(i=>i.enhancements>0),this.after.emit(new _o(this.deck,"lootDeckAddEnhancement",e.type,d.v.lootManager.valueLabel(e)))}unenhanceCard(e){e.enhancements>0&&(this.before.emit(new _o(this.deck,"lootDeckRemoveEnhancement",e.type,d.v.lootManager.valueLabel(e))),e.enhancements--,d.v.game.lootDeckEnhancements=this.enhancementDeck.filter(i=>i.enhancements>0),this.after.emit(new _o(this.deck,"lootDeckRemoveEnhancement",e.type,d.v.lootManager.valueLabel(e))))}toggleEdit(){this.edit=!this.edit,this.edit||(this.configuration=!1,this.enhancements=!1),setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}toggleEnhancements(){this.enhancements=!this.enhancements,this.edit=!1,this.configuration=!1,!this.enhancements&&0==this.deck.cards.length&&(this.edit=!0,this.configuration=!0)}maxValue(e){return d.v.lootManager.fullLootDeck().filter(i=>i.type==e).length}currentConfig(){this.types.forEach(e=>{const i=this.deck.cards.filter(s=>s.type==e).length;this.lootDeckConfig[e]=i>0?i:void 0})}applyConfig(){const e=0==this.deck.cards.length;(Object.values(this.lootDeckConfig).reduce((i,s)=>(i||0)+(s||0))>0||!e)&&(this.before.emit(new _o(this.deck,"lootDeckChangeConfig")),d.v.lootManager.apply(this.deck,this.lootDeckConfig),d.v.lootManager.shuffleDeck(this.deck),this.types.forEach(i=>{0==this.lootDeckConfig[i]&&(this.lootDeckConfig[i]=void 0)}),this.after.emit(new _o(this.deck,"lootDeckChangeConfig")),this.deck.cards.length>0&&(e?this.dialogRef.close():this.toggleEdit()))}changeType(e,i){this.lootDeckConfig[e]=(this.lootDeckConfig[e]||0)+i,0==this.lootDeckConfig[e]&&(this.lootDeckConfig[e]=void 0)}upcomingCards(){return this.deck.cards.filter((e,i)=>i>this.deck.current)}disgardedCards(){return this.deck.cards.filter((e,i)=>i<=this.deck.current).reverse()}shuffle(){this.before.emit(new _o(this.deck,"lootDeckShuffle")),d.v.lootManager.shuffleDeck(this.deck),d.v.game.figures.forEach(e=>{e instanceof oe.z&&(e.lootCards=[])}),this.after.emit(new _o(this.deck,"lootDeckShuffle"))}dropUpcoming(e){this.before.emit(new _o(this.deck,"lootDeckReorder"));let i=0,s=0,l=0;e.container==e.previousContainer?(i=this.deck.current+1,s=e.previousIndex+i,l=e.currentIndex+i,Fn(this.deck.cards,s,l)):(i=this.deck.current,s=i-e.previousIndex,l=e.currentIndex+i,Fn(this.deck.cards,s,l),this.deck.current=this.deck.current-1),d.v.game.figures.forEach(m=>{m instanceof oe.z&&m.lootCards&&(m.lootCards=m.lootCards.map(O=>(ss&&O<=l?O--:s>l&&O>=l&&OO-k))}),d.v.game.figures.forEach(m=>{m instanceof oe.z&&(m.lootCards=m.lootCards.filter(O=>O<=this.deck.current))}),this.after.emit(new _o(this.deck,"lootDeckReorder"))}dropDisgarded(e){this.before.emit(new _o(this.deck,"lootDeckReorder"));let i=0,s=0,l=0;e.container==e.previousContainer?(i=this.deck.current,s=i-e.previousIndex,l=i-e.currentIndex,Fn(this.deck.cards,s,l)):(this.deck.current=this.deck.current+1,i=this.deck.current,s=i+e.previousIndex,l=i-e.currentIndex,Fn(this.deck.cards,s,l)),d.v.game.figures.forEach(m=>{m instanceof oe.z&&m.lootCards&&(m.lootCards=m.lootCards.map(O=>(ss&&O<=l?O--:s>l&&O>=l&&OO-k))}),this.after.emit(new _o(this.deck,"lootDeckReorder"))}remove(e){this.before.emit(new _o(this.deck,"lootDeckRemoveCard",""+e)),e<=this.deck.current&&(this.deck.current--,this.current=this.deck.current),this.deck.cards.splice(e,1),this.after.emit(new _o(this.deck,"lootDeckRemoveCard",""+e))}countLoot(e){return this.deck.cards.filter(i=>i.type==e).length}countDrawnLoot(e){return this.deck.cards.filter((i,s)=>i.type==e&&s<=this.deck.current).length}countUpcomingLoot(e){return this.deck.cards.filter((i,s)=>i.type==e&&s>this.deck.current).length}getCharacter(e){if(this.characters){const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.lootCards&&-1!=s.lootCards.indexOf(e));if(i)return i.name}return""}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(n7,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},decls:11,vars:9,consts:[[1,"loot-deck-dialog"],[1,"scroll-container"],[1,"menu"],["menu",""],[4,"ngIf"],[1,"toggle-enhancements",3,"ngClass","click"],[1,"ghs-svg",3,"src"],[3,"ghs-label"],["class","config",4,"ngIf"],["class","enhancements",4,"ngIf"],["class","loot-deck-container",3,"maxHeight",4,"ngIf"],[3,"click"],["type","checkbox",3,"checked","click"],["class","toggle-config",3,"click",4,"ngIf"],[1,"toggle-config",3,"click"],["src","./assets/images/settings.svg",1,"ghs-svg"],[1,"config"],[1,"title"],[1,"values"],[4,"ngFor","ngForOf"],[1,"config-menu"],[3,"click",4,"ngIf"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"value",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"enhancements"],["class","loot-container",4,"ngFor","ngForOf"],[1,"loot-container"],[1,"drag-hidden",3,"loot","flipped","highlight","apply"],[1,"button-enhance",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/fh/loot/plus1.svg",1,"ghs-svg"],["class","remove-enhancements",4,"ngIf"],[1,"remove-enhancements"],["class","ghs-svg","src","./assets/images/fh/loot/plus1.svg",3,"ghs-label","ghs-label-attribute","click",4,"ngFor","ngForOf"],["src","./assets/images/fh/loot/plus1.svg",1,"ghs-svg",3,"ghs-label","ghs-label-attribute","click"],[1,"loot-deck-container"],["cdkDropList","",1,"upcoming","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["upcomingList","cdkDropList"],["class","empty",4,"ngIf"],["class","loot-container","cdkDrag","",4,"ngFor","ngForOf"],["cdkDropList","",1,"disgarded","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["disgardedList","cdkDropList"],[1,"empty"],["cdkDrag","",1,"loot-container"],[1,"drag-hidden",3,"loot","reveal","flipped","index","character","apply"],["class","button-remove",3,"click",4,"ngIf"],["cdkDragHandle","","class","drag-handle",4,"ngIf"],[1,"button-remove",3,"click"],["cdkDragHandle","",1,"drag-handle"],[1,"drag-hidden",3,"loot","flipped","index","character","edit","looted","apply"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3),t.YNc(4,o7,9,5,"ng-container",4),t.TgZ(5,"a",5),t.NdJ("click",function(){return i.toggleEnhancements()}),t._UZ(6,"img",6)(7,"span",7),t.qZA()(),t.YNc(8,r7,9,4,"div",8),t.YNc(9,h7,2,1,"div",9),t.YNc(10,M7,9,11,"div",10),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("ngIf",i.deck.cards.length>0),t.xp6(1),t.Q6J("ngClass",t.VKq(7,Rw,!i.gameManager.game.scenario)),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+(i.enhancements?"money":"plus1")+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","game.loot."+(i.enhancements&&i.gameManager.game.scenario?"deck":"enhancements")),t.xp6(1),t.Q6J("ngIf",i.configuration),t.xp6(1),t.Q6J("ngIf",i.enhancements),t.xp6(1),t.Q6J("ngIf",!i.configuration&&!i.enhancements))},dependencies:[x.mk,x.sg,x.O5,Bs,Ms,Zr,jO,ie,Ii],styles:['.loot-deck-dialog[_ngcontent-%COMP%]{position:relative}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap;max-width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%]{pointer-events:none}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.loot-deck-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%]{margin-bottom:5%;padding:2em;min-height:500px}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto auto auto;font-size:2em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:flex-start;align-items:center;white-space:nowrap}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);margin-right:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .config-menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .config-menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-evenly;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 57 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 38.25 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%;z-index:1}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .button-enhance[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:2}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .button-enhance[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));height:auto}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .button-enhance[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-gray) brightness(1.5)}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .remove-enhancements[_ngcontent-%COMP%]{position:absolute;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;top:50%;left:50%;height:50%;width:100%;transform:translate(-50%,-50%);z-index:2}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .remove-enhancements[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{cursor:pointer;width:20%;height:auto;margin:5%;transition:all .1s ease-in-out;filter:none}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .remove-enhancements[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-red);opacity:.6}.loot-deck-dialog[_ngcontent-%COMP%] .drop-list[_ngcontent-%COMP%]{position:relative}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor));overflow:auto}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 30 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 38.25 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .7 * var(--ghs-dialog-factor));display:block;border-style:dashed;border-width:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));border-color:var(--ghs-color-white);width:calc(var(--ghs-unit) * 25.1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 37 * var(--ghs-dialog-factor));border-radius:5%}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:100%;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;left:50%;top:65%;width:60%;height:70%;transform:translate(-50%,-50%)}.cdk-drag-preview[_ngcontent-%COMP%]{opacity:0;cursor:grabbing;z-index:999}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.5;cursor:grabbing}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}']})),a})();const O7=function(o){return{vertical:o}};let yT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"configuration",!1),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),this.data=e,this.dialogRef=i,this.deck=e.deck,this.before=e.before,this.after=e.after}ngOnInit(){0==this.deck.cards.length&&(this.configuration=!0)}vertical(){return window.innerWidth<800}beforeLootDeck(e){this.before.emit(e)}afterLootDeck(e){this.after.emit(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck-fullscreen"]],decls:4,vars:6,consts:[[1,"loot-deck-fullscreen",3,"ngClass"],[3,"deck","fullscreen","vertical","before","after"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"ghs-loot-deck",1),t.NdJ("before",function(l){return i.beforeLootDeck(l)})("after",function(l){return i.afterLootDeck(l)}),t.qZA(),t.TgZ(2,"div",2),t.NdJ("click",function(){return i.dialogRef&&i.dialogRef.close()}),t.qZA()(),t.TgZ(3,"div",2),t.NdJ("click",function(){return i.dialogRef&&i.dialogRef.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(4,O7,i.vertical())),t.xp6(1),t.Q6J("deck",i.deck)("fullscreen",!1)("vertical",i.vertical()))},styles:[".loot-deck-fullscreen[_ngcontent-%COMP%]{width:100vw;height:100vh;overflow-x:auto;overflow-y:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:3}.loot-deck-fullscreen[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:600px;height:100vw;max-height:420px;z-index:4;margin-top:2em;margin-left:1%}.loot-deck-fullscreen.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden}.loot-deck-fullscreen.vertical[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:132vw;max-height:800px;transform:none}.loot-deck-fullscreen[_ngcontent-%COMP%] .close-container[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;display:flex;width:100%;height:100%;z-index:2;top:0;left:0}"]})),a})();const P7=function(o,a){return{vertical:o,minimize:a}};function y7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",8),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openFullscreen(i))}),t._UZ(1,"img",9),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.fullscreen")("ghs-label-attribute","title")("ngClass",t.WLB(3,P7,n.vertical,!n.deck.active))}}const b7=function(o,a,n){return{vertical:o,"without-fullscreen":a,minimize:n}};function x7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",10),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.open(i))}),t._UZ(1,"img",11),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.openDialog")("ghs-label-attribute","title")("ngClass",t.kEZ(3,b7,n.vertical,!n.fullscreen,!n.deck.active))}}const w7=function(o,a,n,e){return{disgarded:o,current:a,last:n,bottom:e}},bT=function(o){return{disabled:o}};function k7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",13),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw();return t.KtG(l.clickCard(s,i))}),t._UZ(1,"ghs-loot",14),t.qZA()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw();t.Udp("z-index",e>s.current?s.deck.cards.length-e:s.deck.cards.length+e+1),t.Q6J("ngClass",t.l5B(11,w7,ee.current-3)}}const Z7=function(o,a,n){return{disabled:o,vertical:a,denied:n}};class _o{constructor(a,n,...e){(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"values",void 0),this.deck=a,this.type=n,this.values=e}}let Fw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"bottom",!1),(0,_.Z)(this,"characters",!0),(0,_.Z)(this,"fullscreen",!0),(0,_.Z)(this,"vertical",!1),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"before",new t.vpe),(0,_.Z)(this,"after",new t.vpe),(0,_.Z)(this,"initTimeout",1500),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"lootManager",d.v.lootManager),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"internalDraw",-99),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"drawTimeout",null),(0,_.Z)(this,"queue",0),(0,_.Z)(this,"queueTimeout",null),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"initServer",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.element.nativeElement.addEventListener("click",s=>{let l=document.elementsFromPoint(s.clientX,s.clientY);l[0].classList.contains("deck")&&l.length>2&&l[2].click()})}ngOnInit(){this.current=this.deck.current,this.internalDraw=-99,this.compact=this.deck.cards.length>0&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400),this.disabled=!this.standalone&&d.v.game.state==ge.D2.draw,this.init||(this.drawTimeout=setTimeout(()=>{this.current=this.deck.current,this.drawTimeout=null,this.init=!0},R.r.settings.disableAnimations?0:this.initTimeout)),this.uiChangeSubscription=d.v.uiChange.subscribe({next:e=>{this.update(e)}}),window.addEventListener("resize",e=>{this.compact=this.deck.cards.length>0&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)}),window.addEventListener("fullscreenchange",e=>{this.compact=this.deck.cards.length>0&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){e.deck&&this.update()}update(e=!1){this.disabled=!this.standalone&&d.v.game.state==ge.D2.draw,this.initServer&&d.v.stateManager.wsState()!=WebSocket.OPEN&&(this.initServer=!1),this.deck.active?!this.init||e&&!this.initServer?(this.current=this.deck.current,e&&!this.initServer&&(this.initServer=!0)):this.current{this.drawing=!1,this.queueTimeout=null;const i=this.current,s=this.deck.cards[i];this.queue>0?(this.queue--,this.current++,this.drawQueue(e)):(this.element.nativeElement.getElementsByClassName("deck")[0].classList.remove("drawing"),this.queue<0&&(this.queue=0)),!e&&s&&null!=le.k.indexOf(s.type)&&R.r.settings.applyLoot&&!this.standalone&&d.v.game.figures.find(l=>l instanceof oe.z&&d.v.gameplayFigure(l))&&(!d.v.game.figures.find(l=>l instanceof oe.z&&l.active)||R.r.settings.alwaysLootApplyDialog)&&this.dialog.open(OT,{panelClass:"dialog",data:{loot:s}}).closed.subscribe({next:m=>{if(m){const O=d.v.game.figures.find(k=>k instanceof oe.z&&k.name==m);if(O instanceof oe.z){d.v.stateManager.before(s.type==le.CG.random_item?"lootRandomItem":"addResource","data.character."+O.name,"game.loot."+s.type,this.lootManager.getValue(s)+"");const k=d.v.lootManager.applyLoot(s,O,i);d.v.stateManager.after(),k&&this.dialog.open(Qw,{panelClass:"dialog",data:{item:k,loot:this.deck.cards[i],index:i,character:O}}).closed.subscribe({next:W=>{if(W){const ct=W;d.v.stateManager.before("selectRandomItemLoot");let Ct=new Vn.xb(""+ct.id,ct.edition);d.v.itemManager.addItemCount(ct),-1==O.lootCards.indexOf(i)&&(O.lootCards.push(i),O.lootCards.sort((Ot,xt)=>Ot-xt)),null!=O.progress.items.find(Ot=>Ot.name==""+ct.id&&Ot.edition==ct.edition)?O.progress.gold+=d.v.itemManager.itemSellValue(ct):(O.progress.items.push(Ct),O.progress.equippedItems.push(new Vn.VY(Ct.name,Ct.edition,void 0,"loot-random-item"))),d.v.stateManager.after()}else O.lootCards=O.lootCards.filter(ct=>ct!=i)}})}}}})},R.r.settings.disableAnimations?0:this.vertical?1050:1850)}draw(e){if(this.compact&&this.fullscreen)this.openFullscreen(e);else if(!this.disabled&&this.deck.cards.length>0){if(!this.drawTimeout&&this.deck.currents instanceof oe.z&&s.active);this.drawTimeout=setTimeout(()=>{if(this.before.emit(new _o(this.deck,"lootDeckDraw")),!R.r.settings.alwaysLootApplyDialog&&i instanceof oe.z){const s=d.v.lootManager.drawCard(this.deck,i);s&&setTimeout(()=>{this.dialog.open(Qw,{panelClass:"dialog",data:{item:s,loot:this.deck.cards[this.current],index:this.current,character:i}}).closed.subscribe({next:l=>{if(l){const m=l;d.v.stateManager.before("selectRandomItemLoot");let O=new Vn.xb(""+m.id,m.edition);d.v.itemManager.addItemCount(m),-1==i.lootCards.indexOf(this.current)&&(i.lootCards.push(this.current),i.lootCards.sort((k,W)=>k-W)),null!=i.progress.items.find(k=>k.name==""+m.id&&k.edition==m.edition)?i.progress.gold+=d.v.itemManager.itemSellValue(m):(i.progress.items.push(O),i.progress.equippedItems.push(new Vn.VY(O.name,O.edition,void 0,"loot-random-item"))),d.v.stateManager.after()}else i.lootCards=i.lootCards.filter(m=>m!=this.current)}})},R.r.settings.disableAnimations?0:this.vertical?1050:1850)}else d.v.lootManager.drawCard(this.deck,void 0);this.after.emit(new _o(this.deck,"lootDeckDraw")),this.drawTimeout=null},R.r.settings.disableAnimations?0:150)}}else this.dialog.open(PT,{panelClass:"dialog",data:{deck:this.deck,characters:this.characters,before:this.before,after:this.after,apply:!this.standalone}})}openFullscreen(e){this.fullscreen&&(this.dialog.open(yT,{backdropClass:"fullscreen-backdrop",data:{deck:this.deck,before:this.before,after:this.after}}),e.preventDefault(),e.stopPropagation())}clickCard(e,i){(!this.drawing||e>this.current)&&this.open(i)}getCharacter(e){if(this.characters){const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.lootCards&&-1!=s.lootCards.indexOf(e));if(i)return i.name}return""}open(e){this.deck.cards.length>0&&d.v.game.state==ge.D2.next&&this.fullscreen&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)?this.openFullscreen(e):this.dialog.open(PT,{panelClass:"dialog",data:{deck:this.deck,characters:this.characters,before:this.before,after:this.after,apply:!this.standalone}}),e.preventDefault(),e.stopPropagation()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck"]],inputs:{deck:"deck",bottom:"bottom",characters:"characters",fullscreen:"fullscreen",vertical:"vertical",standalone:"standalone",initTimeout:"initTimeout"},outputs:{before:"before",after:"after"},features:[t.TTD],decls:9,vars:16,consts:[[1,"deck",3,"ngClass"],[1,"loot-container","draw"],[1,"loot-card",3,"ngClass","click"],["card",""],[1,"number"],["class","fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],["class","settings",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/fullscreen.svg"],[1,"settings",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/settings.svg",1,"ghs-svg"],["class","loot-container",3,"z-index","ngClass","click",4,"ngIf"],[1,"loot-container",3,"ngClass","click"],[1,"loot-card",3,"loot","flipped","looted","index","disableFlip","character","apply","ngClass"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3),t.NdJ("click",function(l){return i.draw(l)}),t.TgZ(4,"span",4),t._uU(5),t.qZA()(),t.YNc(6,y7,2,6,"span",5),t.YNc(7,x7,2,7,"span",6),t.qZA(),t.YNc(8,T7,2,1,"ng-container",7),t.qZA()),2&e){const s=t.MAs(3);t.Q6J("ngClass",t.kEZ(10,Z7,!i.standalone&&i.gameManager.game.state==i.GameState.draw,i.vertical,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.lootDeck)),t.xp6(1),t.Udp("z-index",i.deck.cards.length+1),t.xp6(1),t.Udp("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.VKq(14,bT,i.disabled)),t.xp6(3),t.Oqu(i.deck.current0),t.xp6(1),t.Q6J("ghs-label","scenario.rules.spawn"+(n.marker?"Marker":""))("ghs-label-args",t.l5B(4,D7,n.monster.name,s.spawnType(n.monster)||"",n.count?s.spawnCount(i.rule,n)+" ":"",n.marker)),t.xp6(1),t.Q6J("ngIf",n.manual)}}function N7(o,a){if(1&o&&(t.TgZ(0,"div",18),t.YNc(1,I7,4,9,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.spawns(n.rule))}}function J7(o,a){1&o&&t._UZ(0,"span",22),2&o&&t.Q6J("ghs-label","and")}function U7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",26),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit;return t.KtG(s.count=i)}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("ngModel",n.count)("min",n.manualMin||0)("max",n.manualMax||"")("value",e.EntityValueFunction(n.count||1))}}const qw=function(o,a,n){return[o,a,n]};function L7(o,a){if(1&o&&(t.ynx(0),t.YNc(1,J7,1,1,"span",19),t._UZ(2,"span",20),t.YNc(3,U7,1,4,"input",25),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(1),t.Q6J("ghs-label","scenario.rules.spawnObjective"+(i.EntityValueFunction(n.count||1)>1?"s":"")+(n.objective.escort?"Escort":"")+(n.marker?"Marker":""))("ghs-label-args",t.kEZ(4,qw,n.objective.name?"data.objective."+n.objective.name:"",i.EntityValueFunction(n.count||1)+" ",n.marker)),t.xp6(1),t.Q6J("ngIf",n.manual)}}function Q7(o,a){if(1&o&&(t.TgZ(0,"div",24),t.YNc(1,L7,4,8,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngForOf",n.rule.objectiveSpawns)}}function R7(o,a){1&o&&(t.TgZ(0,"span",31),t._uU(1,","),t.qZA())}function F7(o,a){if(1&o&&(t.ynx(0),t.YNc(1,R7,2,0,"span",28),t.TgZ(2,"span",29),t._UZ(3,"ghs-element-icon",30),t.TgZ(4,"span"),t._UZ(5,"span",6),t.qZA(),t.TgZ(6,"span"),t._UZ(7,"span",6),t.qZA()(),t.BQk()),2&o){const n=a.$implicit,e=a.index;t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(2),t.Q6J("element",n),t.xp6(2),t.Q6J("ghs-label","game.element."+n.type),t.xp6(2),t.Q6J("ghs-label","game.element.state."+n.state)}}function q7(o,a){if(1&o&&(t.TgZ(0,"div",27),t.YNc(1,F7,8,4,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngForOf",n.rule.elements)}}const H7=function(o){return[o]};function j7(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._UZ(2,"img",34)(3,"span",35),t.qZA(),t.BQk()),2&o){const n=a.$implicit;t.xp6(3),t.Q6J("ghs-label",n.marker?"scenario.rules.openRoomMarker":"scenario.rules.openRoom")("ghs-label-args",t.VKq(2,H7,n.marker||""))}}function B7(o,a){if(1&o&&(t.TgZ(0,"div",32),t.YNc(1,j7,4,4,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).index,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.rooms(n))}}function z7(o,a){1&o&&(t.TgZ(0,"span",31),t._uU(1,","),t.qZA())}function G7(o,a){if(1&o&&t._UZ(0,"span",35),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label",(n.marker?"scenario.rules.addSectionMarker":"scenario.rules.addSection")+(n.hideIndex?"":"Index"))("ghs-label-args",t.kEZ(2,qw,n.index,"data.section."+n.name,n.marker||""))}}function V7(o,a){if(1&o&&t._UZ(0,"span",35),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","scenario.rules.finishWithConclusion")("ghs-label-args",t.kEZ(2,qw,n.index,"data.section."+n.name,n.marker||""))}}function Y7(o,a){if(1&o&&(t.ynx(0),t.YNc(1,z7,2,0,"span",28),t.TgZ(2,"span",37),t._UZ(3,"img",38),t.YNc(4,G7,1,6,"span",39),t.YNc(5,V7,1,6,"span",39),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=a.index;t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(3),t.Q6J("ngIf",!n.conclusion),t.xp6(1),t.Q6J("ngIf",n.conclusion)}}function K7(o,a){if(1&o&&(t.TgZ(0,"div",36),t.YNc(1,Y7,6,3,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).index,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.sections(n))}}function $7(o,a){1&o&&(t.TgZ(0,"span",43),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.rules.figures.scenarioEffect"))}const W7=function(o,a,n,e,i){return[o,a,n,e,i]};function X7(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",41),t._UZ(2,"span",35),t.YNc(3,$7,2,1,"span",42),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.rules.figures."+n.type)("ghs-label-args",t.qbA(3,W7,i.figureNames(n,e.rule),n.value||"",i.settingsManager.settings.calculate&&("damage"==n.type&&n.value&&-1==n.value.indexOf("H")||("setHp"==n.type||"heal"==n.type)&&n.value&&-1==n.value.indexOf("H"))?""+i.EntityValueFunction(n.value||""):n.value||"","amAdd"==n.type||"amRemove"==n.type?n.value.split(":")[0]:"","amAdd"==n.type||"amRemove"==n.type||"transfer"==n.type&&n.value&&n.value.split(":").length>1?n.value.split(":")[1]:"")),t.xp6(1),t.Q6J("ngIf",n.scenarioEffect)}}function t8(o,a){if(1&o&&(t.TgZ(0,"div",40),t.YNc(1,X7,4,9,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.figureRules(n.rule))}}function e8(o,a){if(1&o&&t._UZ(0,"p",17),2&o){const n=t.oxw(2).$implicit;t.Q6J("ghs-label","scenario.rules."+n.rule.finish)}}function n8(o,a){if(1&o&&t._UZ(0,"p",17),2&o){const n=t.oxw(2).$implicit;t.Q6J("ghs-label",n.rule.note)}}function i8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",44)(1,"a",45),t.NdJ("click",function(){t.CHM(n),t.oxw();const i=t.MAs(1),s=t.oxw().index,l=t.oxw();return t.KtG(l.applyRule(i,s))}),t._UZ(2,"span",6)(3,"img",46),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.rules.apply"))}function o8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3,4)(2,"div",5),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(1),s=t.oxw().index,l=t.oxw();return t.KtG(l.hideRule(i,s))}),t._UZ(3,"span",6)(4,"img",7),t.qZA(),t.YNc(5,A7,1,1,"p",8),t.YNc(6,N7,2,1,"div",9),t.YNc(7,Q7,2,1,"div",10),t.YNc(8,q7,2,1,"div",11),t.YNc(9,B7,2,1,"div",12),t.YNc(10,K7,2,1,"div",13),t.YNc(11,t8,2,1,"div",14),t.YNc(12,e8,1,1,"p",8),t.YNc(13,n8,1,1,"p",8),t.YNc(14,i8,4,1,"div",15),t.TgZ(15,"div",16),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(1),s=t.oxw().index,l=t.oxw();return t.KtG(l.close(i,s))}),t.qZA()()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.xp6(3),t.Q6J("ghs-label","scenario.rules.hide"),t.xp6(2),t.Q6J("ngIf",e.rule.noteTop),t.xp6(1),t.Q6J("ngIf",s.spawns(e.rule).length>0),t.xp6(1),t.Q6J("ngIf",e.rule.objectiveSpawns&&e.rule.objectiveSpawns.length>0),t.xp6(1),t.Q6J("ngIf",e.rule.elements&&e.rule.elements.length>0),t.xp6(1),t.Q6J("ngIf",s.rooms(i).length>0),t.xp6(1),t.Q6J("ngIf",s.sections(i).length>0),t.xp6(1),t.Q6J("ngIf",s.figureRules(e.rule).length>0),t.xp6(1),t.Q6J("ngIf",e.rule.finish),t.xp6(1),t.Q6J("ngIf",e.rule.note),t.xp6(1),t.Q6J("ngIf",s.apply(e.rule)),t.xp6(1),t.Q6J("ghs-label","scenario.rules.dismiss")("ghs-label-attribute","title")}}function a8(o,a){if(1&o&&(t.ynx(0),t.YNc(1,o8,16,13,"div",2),t.BQk()),2&o){const n=a.index,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.visible(n))}}const s8=function(o){return{denied:o}};let r8=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"EntityValueFunction",ae.j9),this.dialog=e}spawns(e){return e.spawns&&e.spawns.filter(i=>this.spawnType(i.monster))||[]}spawnType(e){let i=e.type;if(!i){const s=Math.max(2,d.v.characterManager.characterCount());i=s<3?e.player2:3==s?e.player3:e.player4}return i}spawnCount(e,i){let s=i.count,l=0;if(s&&e.figures){const m=e.figures.find(O=>"present"==O.type||"dead"==O.type);if(m){const O=d.v.scenarioRulesManager.entitiesByFigureRule(m,e).filter(W=>d.v.entityManager.isAlive(W)&&(!(W instanceof In.g)||!m.identifier?.marker||W instanceof In.g&&W.marker==m.identifier?.marker)),k=m.value&&m.value.split(":").length>1?(0,ae.j9)(m.value.split(":")[1]):0;l="present"==m.type?O.length:Math.max(0,k-O.length)}}for(;"string"==typeof s&&-1!=s.indexOf("F");)s=s.replace("F",""+l);return(0,ae.j9)(s||(i.manual?0:1))}prevent(e){e.preventDefault(),e.stopPropagation()}sections(e){if(d.v.game.scenarioRules[e]){const i=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[e].identifier).scenario;if(i){const s=d.v.game.scenarioRules[e].rule;if(s&&s.sections)return d.v.sectionData(i.edition).filter(l=>!d.v.game.sections.find(m=>m.edition==l.edition&&m.group==l.group&&m.index==l.index)&&-1!=s.sections.indexOf(l.index))}}return[]}rooms(e){let i=[];if(d.v.game.scenarioRules[e]){const s=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[e].identifier).scenario;if(s){const l=d.v.game.scenarioRules[e].rule;l&&l.rooms&&l.rooms.forEach(m=>{const O=s.rooms.find(k=>k.roomNumber==m);O&&d.v.game.scenario&&-1==d.v.game.scenario.revealedRooms.indexOf(m)&&i.push(O)})}}return i}figureRules(e){return e.figures&&e.figures.filter(i=>{if("present"==i.type||"dead"==i.type||"killed"==i.type)return!1;const s=d.v.scenarioRulesManager.figuresByFigureRule(i,e);return 0!=s.length&&("gainCondition"==i.type||"permanentCondition"==i.type||"loseCondition"==i.type?s.some(l=>{if("gainCondition"==i.type){let m=d.v.entityManager.entities(l),O=new re.gP(i.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O)))return!1}else if("permanentCondition"==i.type){let m=d.v.entityManager.entities(l),O=new re.gP(i.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O,!0)))return!1}else if("loseCondition"==i.type){let m=d.v.entityManager.entities(l),O=new re.gP(i.value);if(m.every(k=>!d.v.entityManager.hasCondition(k,O)))return!1}return!0}):"toggleOn"!=i.type&&"toggleOff"!=i.type||s.some(l=>l.off==("toggleOn"==i.type)))})||[]}figureNames(e,i){let s="";return e.identifier&&(s="all"==e.identifier.type?R.r.getLabel("scenario.rules.figures.all"):d.v.scenarioRulesManager.figuresByFigureRule(e,i).filter(l=>{if("gainCondition"==e.type){let m=d.v.entityManager.entities(l),O=new re.gP(e.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O)))return!1}else if("permanentCondition"==e.type){let m=d.v.entityManager.entities(l),O=new re.gP(e.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O,!0)))return!1}else if("loseCondition"==e.type){let m=d.v.entityManager.entities(l),O=new re.gP(e.value);if(m.every(k=>!d.v.entityManager.hasCondition(k,O)))return!1}else if("toggleOn"==e.type||"toggleOff"==e.type)return l.off==("toggleOn"==e.type);return!0}).map(l=>l instanceof oe.z?R.r.getLabel("%game.characterIconColored."+l.name+"%")+d.v.characterManager.characterName(l):l instanceof qe.CH||l instanceof Nn.k?(l.title||R.r.getLabel("data.objective."+l.name))+(l.marker?" %game.mapMarker."+l.marker+"%":""):l instanceof Ze.Q?"removeEntity"==e.type?R.r.getLabel("data.monster."+l.name)+" ["+d.v.scenarioRulesManager.entitiesByFigureRule(e,i).filter(m=>m instanceof In.g&&-1!=l.entities.indexOf(m)).map(m=>""+m.number).join(", ")+"]":R.r.getLabel("data.monster."+l.name):l.name).join(", ")),s}visible(e){if(d.v.game.scenarioRules[e]){const i=d.v.game.scenarioRules[e].rule;if(i.disablingRules&&i.disablingRules.length>0&&i.disablingRules.some(s=>d.v.game.scenarioRules.find((l,m)=>e!=m&&s.edition==l.identifier.edition&&s.group==l.identifier.group&&(s.index==l.identifier.index||-1==s.index)&&s.scenario==l.identifier.scenario&&s.section==l.identifier.section&&this.visible(m))))return!1;if(this.spawns(i).length>0||i.objectiveSpawns&&i.objectiveSpawns.length>0||i.elements&&i.elements.length>0&&i.elements.some(s=>d.v.game.elementBoard.find(l=>l.type==s.type)?.state!=s.state)||this.sections(e).length>0||this.rooms(e).length>0||this.figureRules(i).length>0||i.note||i.finish)return!0}return!1}apply(e){return this.spawns(e).length>0||e.objectiveSpawns&&e.objectiveSpawns.length>0||e.elements&&e.elements.length>0||e.finish||R.r.settings.scenarioRooms&&e.rooms&&e.rooms.length>0||e.sections&&e.sections.length>0||e.figures&&e.figures.length>0&&e.figures.some(i=>"present"!=i.type&&"dead"!=i.type&&"killed"!=i.type)}applyRule(e,i){if(d.v.game.scenarioRules[i]){const s=d.v.game.scenarioRules[i].rule,l=d.v.game.scenarioRules[i].identifier,m=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[i].identifier).scenario,O=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[i].identifier).section;if(m){if(d.v.stateManager.before("applyScenarioRule"),s.figures&&s.figures.filter(k=>"remove"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{ct instanceof qe.CH?d.v.characterManager.removeObjective(ct):ct instanceof Nn.k?d.v.objectiveManager.removeObjective(ct):ct instanceof Ze.Q&&d.v.monsterManager.removeMonster(ct)})}),s.spawns){let k=[];s.spawns.forEach(W=>{const ct=this.spawnType(W.monster);if(ct&&m){const Ct=d.v.monsterManager.addMonsterByName(W.monster.name,m.edition);if(Ct)for(let Ot=0;Ot0)&&d.v.addEntityCount(Ct,xt))}}})}s.objectiveSpawns&&s.objectiveSpawns.forEach(k=>{const W={edition:m.edition,scenario:m.index,group:m.group,section:O,index:k.objective.index-1},ct=d.v.objectiveDataByScenarioObjectiveIdentifier(W);if(ct&&0!=k.count){const Ct=(0,ae.j9)(k.count||1)-1;let Ot=d.v.objectiveManager.addObjective(ct,ct.name,W);Ot&&k.objective.marker&&(Ot.marker=k.objective.marker);for(let xt=0;xt0)&&d.v.addEntityCount(Ot)}}}),s.elements&&s.elements.forEach(k=>{d.v.game.elementBoard.forEach(W=>{k&&W.type==k.type&&(W.state=k.state)})}),s.rooms&&this.rooms(i).forEach(k=>{d.v.scenarioManager.openRoom(k,m,d.v.game.scenarioRules[i].identifier.section)}),s.sections&&this.sections(i).forEach(k=>{k.conclusion?this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:!0,conclusion:k}}):d.v.scenarioManager.addSection(k)}),s.figures&&(s.figures.filter(k=>"gainCondition"==k.type||"permanentCondition"==k.type||"loseCondition"==k.type||"damage"==k.type||"heal"==k.type||"setHp"==k.type||"dormant"==k.type||"activate"==k.type||"removeEntity"==k.type).forEach(k=>{let W=d.v.scenarioRulesManager.figuresByFigureRule(k,s),ct=d.v.scenarioRulesManager.entitiesByFigureRule(k,s);W.forEach(Ct=>{d.v.entityManager.entities(Ct).filter(xt=>-1!=ct.indexOf(xt)).forEach(xt=>{switch(k.type){case"gainCondition":let Gt=new re.gP(k.value);d.v.entityManager.hasCondition(xt,Gt)||d.v.entityManager.addCondition(xt,Gt,Ct.active,Ct.off);break;case"permanentCondition":let se=new re.gP(k.value);d.v.entityManager.hasCondition(xt,se,!0)||d.v.entityManager.addCondition(xt,se,Ct.active,Ct.off,!0);break;case"loseCondition":let De=new re.gP(k.value);d.v.entityManager.hasCondition(xt,De)&&d.v.entityManager.removeCondition(xt,De);break;case"damage":let un=0;un=isNaN(+k.value)&&-1!=k.value.indexOf("H")?+(0,ae.j9)(k.value.replaceAll("HP",""+xt.health).replaceAll("H",""+(0,ae.j9)(xt.maxHealth))):+(0,ae.j9)(k.value),un<0?un=0:un>(0,ae.j9)(xt.maxHealth)&&(un=(0,ae.j9)(xt.maxHealth)),d.v.entityManager.changeHealth(xt,Ct,-un);break;case"heal":let vn=0;vn=isNaN(+k.value)&&-1!=k.value.indexOf("H")?+(0,ae.j9)(k.value.replaceAll("HP",""+xt.health).replaceAll("H",""+(0,ae.j9)(xt.maxHealth))):+(0,ae.j9)(k.value),vn<0&&(vn=0),xt.health+=vn,d.v.entityManager.addCondition(xt,new re.gP(re.fT.heal,vn),Ct.active,Ct.off),d.v.entityManager.applyCondition(xt,Ct,re.fT.heal,!0);break;case"setHp":let Rn=0;Rn=isNaN(+k.value)&&-1!=k.value.indexOf("H")?+(0,ae.j9)(k.value.replaceAll("HP",""+xt.health).replaceAll("H",""+(0,ae.j9)(xt.maxHealth))):+(0,ae.j9)(k.value),Rn<0?Rn=0:Rn>(0,ae.j9)(xt.maxHealth)&&(Rn=(0,ae.j9)(xt.maxHealth)),xt.health=Rn;break;case"dormant":xt instanceof In.g&&(xt.dormant=!0,xt.revealed=!1);break;case"activate":xt instanceof In.g&&(xt.dormant=!1);break;case"removeEntity":xt.tags.push("ignore-kill"),xt instanceof oe.z?d.v.characterManager.removeCharacter(xt):Ct instanceof Ze.Q&&xt instanceof In.g?d.v.monsterManager.removeMonsterEntity(Ct,xt):xt instanceof qe.CH&&d.v.characterManager.removeObjective(xt),k.identifier&&d.v.entityCounters(k.identifier).forEach(_g=>{_g.total-=1})}})})}),s.figures.filter(k=>"toggleOff"==k.type||"toggleOn"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{ct.off="toggleOff"==k.type,ct instanceof Ze.Q&&ct.entities.forEach(Ct=>{Ct.dormant="toggleOff"==k.type})})}),s.figures.filter(k=>"transfer"==k.type).forEach(k=>{const W=d.v.scenarioRulesManager.figuresByFigureRule(k,s);if(1==W.length&&W[0]instanceof Ze.Q){const ct=W[0],Ct=d.v.monsterManager.addMonsterByName(k.value,m.edition);Ct&&(-1==k.value.indexOf(":")&&(Ct.level=ct.level),Ct.off=ct.off,Ct.active=ct.active,Ct.drawExtra=ct.drawExtra,Ct.lastDraw=ct.lastDraw,Ct.ability=ct.ability,Ct.isAlly=ct.isAlly,Ct.isAllied=ct.isAllied,Ct.entities=ct.entities,Ct.entities.forEach(Ot=>{const xt=ct.stats.find(se=>se.level==ct.level&&se.type==Ot.type),Gt=Ct.stats.find(se=>se.level==Ct.level&&se.type==Ot.type);Gt?(Ot.stat=Gt,xt&&Ot.maxHealth==(0,ae.j9)(xt.health)&&(Ot.maxHealth=(0,ae.j9)(Gt.health))):(Ct.errors=Ct.errors||[],!Ct.errors.find(se=>se.type==ug.r.unknown)&&!Ct.errors.find(se=>se.type==ug.r.stat)&&(console.error("Could not find '"+Ot.type+"' stats for monster: "+Ct.name+" level: "+Ct.level),Ct.errors.push(new ug.o(ug.r.stat,"monster",Ct.name,Ct.edition,Ot.type,""+Ct.level)))),(Ot.health>Ot.maxHealth||0==Ot.maxHealth&&Ot.health>0)&&(Ot.health=Ot.maxHealth)}),Ct!=ct&&d.v.monsterManager.removeMonster(ct),d.v.sortFigures(Ct))}else if(1==W.length&&W[0]instanceof qe.CH){const ct=W[0],Ot=d.v.characterManager.addObjective(m.objectives[+k.value-1],void 0,{edition:m.edition,scenario:m.index,group:m.group,section:O,index:+k.value-1});Ot.id=ct.id,Ot.marker=ct.marker,Ot.title=ct.title,Ot.exhausted=ct.exhausted,Ot.off=ct.off,Ot.active=ct.active,Ot.health=ct.health,Ot.health>(0,ae.j9)(Ot.maxHealth)&&(Ot.health=(0,ae.j9)(Ot.maxHealth)),Ot.entityConditions=ct.entityConditions,d.v.characterManager.removeObjective(ct)}else if(1==W.length&&W[0]instanceof Nn.k){const ct=W[0],Ot=m.objectives[+k.value-1];let xt=d.v.objectiveManager.addObjective(Ot,void 0,{edition:m.edition,scenario:m.index,group:m.group,section:O,index:+k.value-1});xt.entities=ct.entities,xt.entities.forEach(Gt=>{Gt.maxHealth=(0,ae.j9)(ct.health),Gt.health>Gt.maxHealth&&(Gt.health=Gt.maxHealth),Ot&&(Ot.tags&&(Gt.tags=Ot.tags),Ot.marker&&(Gt.marker=Ot.marker))}),d.v.objectiveManager.removeObjective(ct)}}),s.figures.filter(k=>"amAdd"==k.type||"amRemove"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{const Ct=d.v.attackModifierManager.byFigure(ct),Ot=k.value.split(":")[0];let xt=+k.value.split(":")[1];if("amAdd"==k.type)for(let Gt=0;Gt=10)return;if(Ot==Lt.kl.curse&&d.v.attackModifierManager.countUpcomingCurses(ct instanceof Ze.Q&&!ct.isAlly&&!ct.isAllied)>=10)return;if(Ot==Lt.kl.minus1&&d.v.attackModifierManager.countExtraMinus1()>=15)return;d.v.attackModifierManager.addModifier(Ct,new Lt.YY(Ot))}else{let Gt=Ct.cards.find((se,De)=>se.type==Ot&&De>Ct.current);for(;Gt&&xt>0;)Ct.cards.splice(Ct.cards.indexOf(Gt),1),Gt=Ct.cards.find((se,De)=>se.type==Ot&&De>Ct.current),xt--;if(xt>0){let se=Ct.cards.find(De=>De.type==Ot);for(;se&&xt<0;)Ct.cards.splice(Ct.cards.indexOf(se),1),se=Ct.cards.find(De=>De.type==Ot),xt--}}})}),s.figures.filter(k=>"setAbility"==k.type||"drawAbility"==k.type||"discardAbilityToBottom"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{if(ct instanceof Ze.Q)if("setAbility"==k.type){const Ct=d.v.abilities(ct).find(Ot=>isNaN(+k.value)?Ot.name==k.value:Ot.cardId==+k.value);if(Ct){const Ot=d.v.abilities(ct).indexOf(Ct);-1!=Ot&&(ct.abilities=ct.abilities.filter(xt=>xt!=Ot),ct.abilities.unshift(Ot),ct.ability=d.v.game.state==ge.D2.draw?-1:0)}}else"drawAbility"==k.type?d.v.monsterManager.drawAbility(ct):"discardAbilityToBottom"==k.type&&Fn(ct.abilities,ct.ability,0)})})),s.finish&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:m,success:"won"==s.finish}}),e.classList.add("closed"),setTimeout(()=>{s.once&&d.v.game.disgardedScenarioRules.push(l),d.v.game.scenarioRules.splice(i,1),d.v.stateManager.after()},R.r.settings.disableAnimations?0:100)}}}hideRule(e,i){e.classList.add("closed"),setTimeout(()=>{d.v.stateManager.before("hideScenarioRule");const s=d.v.game.scenarioRules.splice(i,1)[0];d.v.game.disgardedScenarioRules.push(s.identifier),d.v.stateManager.after()},R.r.settings.disableAnimations?0:100)}close(e,i){e.classList.add("closed"),setTimeout(()=>{d.v.stateManager.before("removeScenarioRule");const s=d.v.game.scenarioRules.splice(i,1)[0];s.rule.once&&d.v.game.disgardedScenarioRules.push(s.identifier),d.v.stateManager.after()},R.r.settings.disableAnimations?0:100)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-rules"]],decls:2,vars:4,consts:[[1,"rules-dialog",3,"ngClass"],[4,"ngFor","ngForOf"],["class","rule dialog",4,"ngIf"],[1,"rule","dialog"],["ruleElement",""],[1,"hide",3,"click"],[3,"ghs-label"],["src","./assets/images/close.svg"],["class","text-white",3,"ghs-label",4,"ngIf"],["class","spawns",4,"ngIf"],["class","objective-spawns",4,"ngIf"],["class","elements",4,"ngIf"],["class","sections rooms",4,"ngIf"],["class","sections",4,"ngIf"],["class","figures",4,"ngIf"],["class","menu",4,"ngIf"],[1,"close",3,"ghs-label","ghs-label-attribute","click"],[1,"text-white",3,"ghs-label"],[1,"spawns"],["class","and",3,"ghs-label",4,"ngIf"],[1,"text-white","text",3,"ghs-label","ghs-label-args"],["type","number",3,"ngModel","min","max","ngModelChange",4,"ngIf"],[1,"and",3,"ghs-label"],["type","number",3,"ngModel","min","max","ngModelChange"],[1,"objective-spawns"],["type","number",3,"ngModel","min","max","value","ngModelChange",4,"ngIf"],["type","number",3,"ngModel","min","max","value","ngModelChange"],[1,"elements"],["class","and",4,"ngIf"],[1,"element"],[3,"element"],[1,"and"],[1,"sections","rooms"],[1,"section","room"],["src","./assets/images/scenario/door.svg",1,"ghs-svg"],[1,"text-white",3,"ghs-label","ghs-label-args"],[1,"sections"],[1,"section"],["src","./assets/images/scenario/lock.svg",1,"ghs-svg"],["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"figures"],[1,"figure"],["class","text-white",4,"ngIf"],[1,"text-white"],[1,"menu"],[1,"apply",3,"click"],["src","./assets/images/check.svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,a8,2,1,"ng-container",1),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(2,s8,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.scenario)),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.scenarioRules))},dependencies:[x.mk,x.sg,x.O5,Ho,Ir,yi,Jc,id,Si,MT,ie],styles:[".rules-dialog[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));color:var(--ghs-color-gray);font-family:var(--ghs-font-text);text-align:center}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-darkgray);cursor:pointer;display:flex;justify-content:flex-end;align-items:center;z-index:1;margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .2em;filter:var(--ghs-filter-darkgray)}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;min-height:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));transition:all .1s ease-in-out;overflow:hidden;width:100%}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .and[_ngcontent-%COMP%]{margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .spawns[_ngcontent-%COMP%], .rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .objective-spawns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;padding:.5em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .spawns[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .objective-spawns[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:nowrap}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .spawns[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .objective-spawns[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));font-family:var(--ghs-font-text);width:2em;background-color:transparent;z-index:1;margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] > .element[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] > .element[_ngcontent-%COMP%] ghs-element-icon[_ngcontent-%COMP%]{width:2em;height:2em;margin-right:.15em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] > .element[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:inline-flex}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-left:calc(var(--ghs-unit) * .1 * var(--ghs-barsize)) solid var(--ghs-color-white)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .figures[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 .1em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor))}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;z-index:1;flex-grow:1}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));height:auto;margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:0;cursor:zoom-out}.rules-dialog[_ngcontent-%COMP%] .rule.closed[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;height:0;min-height:initial;width:100%}"]})),a})();function c8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",11),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setLevelCalculation(!i.gameManager.game.levelCalculation))}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.gameManager.game.levelCalculation),t.xp6(1),t.Q6J("ghs-label","settings.levelCalculation")}}function l8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label"),t._UZ(1,"span",3),t.TgZ(2,"input",4,26),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(3),s=t.oxw();return t.KtG(s.setLevelAdjustment(+i.value))}),t.qZA()()}if(2&o){const n=t.MAs(3),e=t.oxw();t.xp6(1),t.Q6J("ghs-label","settings.levelAdjustment"),t.xp6(1),t.Q6J("value",e.gameManager.game.levelAdjustment)("size",n.value.length)("ghs-label","settings.levelAdjustment")("ghs-label-attribute","placeholder")}}function g8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",11),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setGe5Player(!i.gameManager.game.ge5Player))}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.gameManager.game.ge5Player),t.xp6(1),t.Q6J("ghs-label","settings.ge5Player")}}const d8=function(o,a){return{active:o,scenariolevel:a}};function h8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",7)(1,"a",27),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s))}),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(2,d8,n==e.gameManager.game.level,e.gameManager.game.playerCount<1&&n==e.gameManager.levelManager.scenarioLevel())),t.xp6(1),t.Oqu(n)}}function u8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",28,29),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(1),s=t.oxw();return t.KtG(s.setPlayerCount(+i.value))}),t.qZA()}if(2&o){const n=t.MAs(1),e=t.oxw();t.Q6J("value",e.gameManager.game.playerCount)("size",n.value.length)("ghs-label","settings.playerCount")("ghs-label-attribute","placeholder")}}const _8=function(o){return{denied:o}},p8=function(o){return{disabled:o}};let f8=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"trap",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"hazardousTerrain",0),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.calculateValues()}}),this.calculateValues()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}setLevelCalculation(e){d.v.stateManager.before(e?"enableAutomaticLevel":"disabledAutomaticLevel"),d.v.game.levelCalculation=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setLevelAdjustment(e){d.v.stateManager.before("updateLevelAdjustment",(0,he.uZ)(e)),d.v.game.levelAdjustment=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setBonusAdjustment(e){d.v.stateManager.before("updateBonusAdjustment",(0,he.uZ)(e)),d.v.game.bonusAdjustment=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setGe5Player(e){d.v.stateManager.before(e?"enabledGe5Player":"disabledGe5Player"),d.v.game.ge5Player=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}ge5Player(){return d.v.game.playerCount<1&&d.v.characterManager.characterCount()>4}togglePlayerCount(e){d.v.stateManager.before(e.target.checked?"enabledManualPlayerCount":"disabledManualPlayerCount"),d.v.game.playerCount=e.target.checked?2:-1,e.target.checked?d.v.game.levelCalculation=!1:d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setPlayerCount(e){d.v.stateManager.before("updateManualPlayerCount",""+e),d.v.game.playerCount=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setLevel(e){d.v.stateManager.before("setScenarioLevel",""+e),d.v.levelManager.setLevel(e),d.v.game.levelCalculation=!1,d.v.stateManager.after()}setSolo(e){d.v.stateManager.before(e?"enableSolo":"disableSolo"),d.v.game.solo=e,d.v.stateManager.after()}calculateValues(){this.trap=d.v.levelManager.trap(),this.experience=d.v.levelManager.experience(),this.loot=d.v.levelManager.loot(),this.hazardousTerrain=d.v.levelManager.terrain()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-level-dialog"]],decls:54,vars:29,consts:[[1,"level-dialog",3,"ngClass"],[1,"menu"],[4,"ngIf"],[3,"ghs-label"],["type","number","min","-6","max","6",3,"value","size","ghs-label","ghs-label-attribute","keyup","change"],["bonusAdjustment",""],[1,"level-container",3,"ngClass"],[1,"item"],["src","./assets/images/level.svg"],["class","item",4,"ngFor","ngForOf"],[1,"solo"],["type","checkbox",3,"checked","change"],[1,"values"],[1,"loot"],[1,"icon"],[1,"ghs-svg",3,"src"],[1,"value"],[1,"hint"],[1,"trap"],["src","./assets/images/trap.svg",1,"ghs-svg"],[1,"experience"],["src","./assets/images/experience.svg",1,"ghs-svg"],[1,"terrain"],["src","./assets/images/terrain.svg",1,"ghs-svg"],[1,"player-count"],["type","number","min","1",3,"value","size","ghs-label","ghs-label-attribute","keyup","change",4,"ngIf"],["levelAdjustment",""],[1,"level",3,"ngClass","click"],["type","number","min","1",3,"value","size","ghs-label","ghs-label-attribute","keyup","change"],["playerCount",""]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,c8,3,2,"label",2),t.YNc(3,l8,4,5,"label",2),t.TgZ(4,"label"),t._UZ(5,"span",3),t.TgZ(6,"input",4,5),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(s);const m=t.MAs(7);return t.KtG(i.setBonusAdjustment(+m.value))}),t.qZA()(),t.YNc(8,g8,3,2,"label",2),t.qZA(),t.TgZ(9,"div",6)(10,"span",7),t._UZ(11,"img",8),t.qZA(),t.YNc(12,h8,3,5,"span",9),t.TgZ(13,"div",10)(14,"label")(15,"input",11),t.NdJ("change",function(){return i.setSolo(!i.gameManager.game.solo)}),t.qZA(),t._UZ(16,"span",3),t.qZA()()(),t.TgZ(17,"div",12)(18,"div",13)(19,"span",14),t._UZ(20,"img",15),t._uU(21,":"),t.qZA(),t.TgZ(22,"span",16),t._uU(23),t.qZA(),t.TgZ(24,"span",17),t._UZ(25,"span",3),t.qZA()(),t.TgZ(26,"div",18)(27,"span",14),t._UZ(28,"img",19),t._uU(29,":"),t.qZA(),t.TgZ(30,"span",16),t._uU(31),t.qZA(),t.TgZ(32,"span",17),t._UZ(33,"span",3),t.qZA()(),t.TgZ(34,"div",20)(35,"span",14),t._UZ(36,"img",21),t._uU(37,":"),t.qZA(),t.TgZ(38,"span",16),t._uU(39),t.qZA(),t.TgZ(40,"span",17),t._UZ(41,"span",3),t.qZA()(),t.TgZ(42,"div",22)(43,"span",14),t._UZ(44,"img",23),t._uU(45,":"),t.qZA(),t.TgZ(46,"span",16),t._uU(47),t.qZA(),t.TgZ(48,"span",17),t._UZ(49,"span",3),t.qZA()()(),t.TgZ(50,"label",24)(51,"input",11),t.NdJ("change",function(m){return i.togglePlayerCount(m)}),t.qZA(),t._UZ(52,"span",3),t.YNc(53,u8,2,4,"input",25),t.qZA()()}if(2&e){const s=t.MAs(7);t.Q6J("ngClass",t.VKq(25,_8,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.level)),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.playerCount<1),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.levelCalculation),t.xp6(2),t.Q6J("ghs-label","settings.bonusAdjustment"),t.xp6(1),t.Q6J("value",i.gameManager.game.bonusAdjustment)("size",s.value.length)("ghs-label","settings.bonusAdjustment")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngIf",i.ge5Player()),t.xp6(1),t.Q6J("ngClass",t.VKq(27,p8,i.gameManager.game.levelCalculation)),t.xp6(3),t.Q6J("ngForOf",i.levels),t.xp6(3),t.Q6J("checked",i.gameManager.game.solo),t.xp6(1),t.Q6J("ghs-label","game.solo"),t.xp6(4),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/loot.svg",t.LSH),t.xp6(3),t.hij("x",i.loot,""),t.xp6(2),t.Q6J("ghs-label","game.level.loot"),t.xp6(6),t.Oqu(i.trap),t.xp6(2),t.Q6J("ghs-label","game.level.trap"),t.xp6(6),t.hij("+",i.experience,""),t.xp6(2),t.Q6J("ghs-label","game.level.experience"),t.xp6(6),t.Oqu(i.hazardousTerrain),t.xp6(2),t.Q6J("ghs-label","game.level.hazardousTerrain"),t.xp6(2),t.Q6J("checked",i.gameManager.game.playerCount>0),t.xp6(1),t.Q6J("ghs-label","settings.playerCount"),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.playerCount>0)}},dependencies:[x.mk,x.sg,x.O5,ie],styles:['.level-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column}.level-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{width:2em}.level-dialog[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.level-dialog[_ngcontent-%COMP%] label.player-count[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.scenariolevel[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-darkgray) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container.disabled[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.level-dialog[_ngcontent-%COMP%] .level-container.disabled[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{pointer-events:none}.level-dialog[_ngcontent-%COMP%] .level-container.disabled[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:not(.active){color:var(--ghs-color-darkgray)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--ghs-color-gray);font-size:1.6em;font-family:var(--ghs-font-normal)}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;grid-template-columns:.2fr .2fr 1fr;align-items:center;justify-content:center;margin-bottom:.2em}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{text-align:center}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{text-align:left}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:1.3em;height:auto;filter:var(--ghs-filter-gray)}']})),a})();const m8=["levelButton"];let v8=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"levelButton",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"trap",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"hazardousTerrain",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.calculateValues()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}open(e){const i=[new ti.tR({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),new ti.tR({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),new ti.tR({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"})];this.dialog.open(f8,{panelClass:"dialog",positionStrategy:this.overlay.position().flexibleConnectedTo(this.levelButton).withPositions(i).withDefaultOffsetY(-10)})}calculateValues(){this.trap=d.v.levelManager.trap(),this.experience=d.v.levelManager.experience(),this.loot=d.v.levelManager.loot(),this.hazardousTerrain=d.v.levelManager.terrain()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-level"]],viewQuery:function(e,i){if(1&e&&t.Gf(m8,5),2&e){let s;t.iGM(s=t.CRH())&&(i.levelButton=s.first)}},decls:19,vars:16,consts:[[1,"level-status"],["levelButton",""],[1,"values",3,"click"],[1,"level",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/level.svg",1,"ghs-svg"],[1,"loot",3,"ghs-label","ghs-label-attribute"],[1,"ghs-svg",3,"src"],[1,"trap",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/trap.svg",1,"ghs-svg"],[1,"experience",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/experience.svg",1,"ghs-svg"],[1,"terrain",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/terrain.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0,1)(2,"div",2),t.NdJ("click",function(l){return i.open(l)}),t.TgZ(3,"span",3),t._UZ(4,"img",4),t._uU(5),t.qZA(),t.TgZ(6,"span",5),t._UZ(7,"img",6),t._uU(8),t.qZA(),t.TgZ(9,"span",7),t._UZ(10,"img",8),t._uU(11),t.qZA(),t.TgZ(12,"span",9),t._UZ(13,"img",10),t._uU(14),t.qZA(),t.TgZ(15,"span",11),t._UZ(16,"img",12),t.TgZ(17,"span"),t._uU(18),t.qZA()()()()),2&e&&(t.xp6(3),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",i.gameManager.game.level,""),t.xp6(1),t.Q6J("ghs-label","game.level.loot")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/loot.svg",t.LSH),t.xp6(1),t.hij(" x",i.loot,""),t.xp6(1),t.Q6J("ghs-label","game.level.trap")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",i.trap,""),t.xp6(1),t.Q6J("ghs-label","game.level.experience")("ghs-label-attribute","title"),t.xp6(2),t.hij(" +",i.experience,""),t.xp6(1),t.Q6J("ghs-label","game.level.hazardousTerrain")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(i.hazardousTerrain))},dependencies:[ie],styles:[".level-status[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;align-items:center;flex-direction:column;justify-content:space-evenly;text-align:center}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;width:100%;justify-content:center}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-barsize));color:var(--ghs-color-gray);margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-barsize));text-shadow:var(--ghs-outline-thin)}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] span[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-barsize));width:calc(var(--ghs-unit) * 3 * var(--ghs-barsize));height:auto;display:inline-block;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}"]})),a})();const C8=function(o,a){return[o,a]};function M8(o,a){if(1&o&&t._UZ(0,"p",7),2&o){const n=t.oxw();t.Q6J("ghs-label",(n.sectionData.marker?"scenario.section.addMarker":"scenario.section.add")+(n.sectionData.hideIndex?"":"Index"))("ghs-label-args",t.WLB(2,C8,n.sectionData.index,n.sectionData.marker||""))}}const O8=function(o){return[o]};function P8(o,a){if(1&o&&t._UZ(0,"p",7),2&o){const n=t.oxw();t.Q6J("ghs-label","scenario.section.conclusion")("ghs-label-args",t.VKq(2,O8,n.sectionData.name?"data.section."+n.sectionData.name:"%scenario.section% #"+n.sectionData.index))}}let xT=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"sectionData",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),this.sectionData=e,this.dialog=i,this.dialogRef=s}addSection(){this.sectionData.conclusion?(this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:!0,conclusion:this.sectionData}}),this.dialogRef.close(!0)):(d.v.stateManager.before("addSection",this.sectionData.index,"data.section."+this.sectionData.name,"data.edition."+this.sectionData.edition),d.v.scenarioManager.addSection(this.sectionData),d.v.stateManager.after(),this.dialogRef.close(!0))}cancel(){this.dialogRef.close(!1)}confirm(e){"Enter"===e.key&&(this.addSection(),e.preventDefault(),e.stopPropagation())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(Te),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-section-dialog"]],hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(l){return i.confirm(l)},!1,t.evT)},decls:9,vars:4,consts:[[1,"section-popup"],[3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"buttons"],[1,"cancel",3,"click"],[3,"ghs-label"],[1,"spacer"],[1,"add",3,"click"],[3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,M8,1,5,"p",1),t.YNc(2,P8,1,4,"p",1),t.TgZ(3,"div",2)(4,"a",3),t.NdJ("click",function(){return i.cancel()}),t._UZ(5,"span",4),t.qZA(),t._UZ(6,"span",5),t.TgZ(7,"a",6),t.NdJ("click",function(){return i.addSection()}),t._UZ(8,"span",4),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("ngIf",!i.sectionData.conclusion),t.xp6(1),t.Q6J("ngIf",i.sectionData.conclusion),t.xp6(3),t.Q6J("ghs-label","scenario.section.cancel"),t.xp6(3),t.Q6J("ghs-label","scenario.section.confirm"))},dependencies:[x.O5,ie],styles:[".section-popup[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{color:var(--ghs-color-green)}"]})),a})();function y8(o,a){if(1&o&&(t.TgZ(0,"span",11),t._UZ(1,"span",6),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.monster."+n.monster.name)}}function b8(o,a){if(1&o&&(t.TgZ(0,"span",11),t._UZ(1,"span",6),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.character."+n.character.name)}}function x8(o,a){if(1&o&&(t.TgZ(0,"span",12),t._UZ(1,"img",13),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH)}}function w8(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function k8(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",22)(2,"span",23),t._uU(3),t.qZA()(),t.TgZ(4,"div",24),t._UZ(5,"ghs-actions",16),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(3),t.Oqu(n.ability.level||0),t.xp6(2),t.Q6J("actions",n.ability.bottomActions)("monster",n.monster)("hint",n.ability.hint)("statsCalculation",n.statsCalculation)("relative",n.relative)("highlightElements",n.highlightElements)}}function T8(o,a){1&o&&(t.TgZ(0,"div",25),t._UZ(1,"img",26),t.qZA())}function Z8(o,a){1&o&&(t.TgZ(0,"div",27),t._UZ(1,"img",26),t.qZA())}function A8(o,a){if(1&o&&(t.TgZ(0,"span",28),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("[",n.abilityIndex+1,"]")}}function S8(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function E8(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function D8(o,a){if(1&o&&(t.TgZ(0,"span",28),t.YNc(1,S8,2,0,"span",10),t.YNc(2,E8,2,0,"span",10),t.TgZ(3,"span"),t._uU(4),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.character&&n.ability.cardId<100),t.xp6(1),t.Q6J("ngIf",n.character&&n.ability.cardId<10),t.xp6(2),t.Oqu(n.ability.cardId)}}function I8(o,a){if(1&o&&(t.TgZ(0,"span",12),t._UZ(1,"img",13),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH)}}function N8(o,a){1&o&&(t.TgZ(0,"span",29),t._UZ(1,"img",30)(2,"img",31),t.qZA())}function J8(o,a){1&o&&(t.TgZ(0,"span",32),t._UZ(1,"img",30)(2,"img",31),t.qZA())}function U8(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",14),t.YNc(2,w8,2,0,"span",10),t._uU(3),t.qZA(),t.TgZ(4,"span",11),t._uU(5),t.qZA(),t.TgZ(6,"div",15),t._UZ(7,"ghs-actions",16),t.qZA(),t.YNc(8,k8,6,7,"ng-container",10),t.YNc(9,T8,2,0,"div",17),t.YNc(10,Z8,2,0,"div",18),t.YNc(11,A8,2,1,"span",19),t.YNc(12,D8,5,3,"span",19),t.YNc(13,I8,2,1,"span",8),t.YNc(14,N8,3,0,"span",20),t.YNc(15,J8,3,0,"span",21),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.ability.initiative<10),t.xp6(1),t.Oqu(n.ability.initiative),t.xp6(2),t.Oqu(n.abilityLabel),t.xp6(2),t.Q6J("actions",n.ability.actions)("monster",n.monster)("hint",n.ability.hint)("statsCalculation",n.statsCalculation)("relative",n.relative)("highlightElements",n.highlightElements),t.xp6(1),t.Q6J("ngIf",n.ability.bottomActions&&n.ability.bottomActions.length>0||n.character),t.xp6(1),t.Q6J("ngIf",n.ability.shuffle),t.xp6(1),t.Q6J("ngIf",n.ability.bottomShuffle),t.xp6(1),t.Q6J("ngIf",!n.ability.cardId&&n.settingsManager.settings.abilityNumbers),t.xp6(1),t.Q6J("ngIf",n.ability.cardId&&n.settingsManager.settings.abilityNumbers),t.xp6(1),t.Q6J("ngIf",n.character),t.xp6(1),t.Q6J("ngIf",n.ability.lost),t.xp6(1),t.Q6J("ngIf",n.ability.bottomLost)}}const L8=function(o,a){return{fh:o,expand:a}},Q8=function(o){return{flipped:o}},wT=function(o,a){return{"bottom-actions":o,"character-actions":a}};let a_=(()=>{var o;class a{constructor(){(0,_.Z)(this,"ability",void 0),(0,_.Z)(this,"abilities",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"highlightElements",!1),(0,_.Z)(this,"statsCalculation",!0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"abilityIndex",-1),(0,_.Z)(this,"abilityLabel",""),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){this.update()}update(){this.abilityIndex=-1,this.abilityLabel="",this.ability&&(this.abilityIndex=this.getAbilityIndex(this.ability),this.abilityLabel=this.getAbilityLabel(this.ability))}getAbilityIndex(e){return this.abilities&&this.abilities.length>0?this.abilities.indexOf(e):this.monster?d.v.abilities(this.monster).indexOf(e):-1}getAbilityLabel(e){let i=e.name||"";return i?i="data.ability."+i:this.monster&&this.monster.deck&&this.monster.deck!=this.monster.name?(i="data.deck."+this.monster.deck,i.split(".")[i.split(".").length-1]===ja(R.r.getLabel(i))&&this.monster.deck&&(i="data.monster."+this.monster.deck)):this.monster&&(i="data.monster."+this.monster.name),ja(R.r.getLabel(i))}onChange(e){this.ability&&(this.ability.revealed=e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-ability"]],inputs:{ability:"ability",abilities:"abilities",monster:"monster",character:"character",flipped:"flipped",reveal:"reveal",relative:"relative",highlightElements:"highlightElements",statsCalculation:"statsCalculation"},features:[t.TTD],decls:12,vars:25,consts:[[1,"card-container","ability",3,"ngClass"],["card-reveal","",1,"card",3,"ngClass","disabled","change"],["card",""],[1,"card-back","ability-back",3,"ngClass"],[1,"touch"],[1,"revealed"],[3,"ghs-label"],["class","name",4,"ngIf"],["class","logo",4,"ngIf"],[1,"card-front","ability-front",3,"ngClass"],[4,"ngIf"],[1,"name"],[1,"logo"],[3,"src"],[1,"initiative"],[1,"ability-actions"],[3,"actions","monster","hint","statsCalculation","relative","highlightElements"],["class","shuffle",4,"ngIf"],["class","bottom-shuffle",4,"ngIf"],["class","index",4,"ngIf"],["class","lost",4,"ngIf"],["class","lost bottom",4,"ngIf"],[1,"level"],[1,"text"],[1,"ability-actions","ability-bottom-actions"],[1,"shuffle"],["src","./assets/images/shuffle.svg"],[1,"bottom-shuffle"],[1,"index"],[1,"lost"],["src","./assets/images/action/card/lost.svg"],["src","./assets/images/action/card/overlay/lost.svg",1,"overlay"],[1,"lost","bottom"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1,2),t.NdJ("change",function(l){return i.onChange(l)}),t.TgZ(3,"div",3),t._UZ(4,"div",4),t.TgZ(5,"span",5),t._UZ(6,"span",6),t.qZA(),t.YNc(7,y8,2,1,"span",7),t.YNc(8,b8,2,1,"span",7),t.YNc(9,x8,2,1,"span",8),t.qZA(),t.TgZ(10,"div",9),t.YNc(11,U8,16,17,"ng-container",10),t.qZA()()()),2&e){const s=t.MAs(2);t.Udp("--ghs-ability-color",i.character&&i.character.color),t.Q6J("ngClass",t.WLB(14,L8,i.settingsManager.settings.fhStyle,i.flipped||i.ability&&i.ability.revealed)),t.xp6(1),t.Udp("font-size",.04*s.offsetWidth+"px"),t.Q6J("ngClass",t.VKq(17,Q8,i.flipped||i.ability&&i.ability.revealed))("disabled",!i.reveal||!i.ability),t.xp6(2),t.Q6J("ngClass",t.WLB(19,wT,i.ability&&i.ability.bottomActions&&i.ability.bottomActions.length>0&&!i.character,i.character)),t.xp6(3),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(1),t.Q6J("ngIf",i.monster),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngClass",t.WLB(22,wT,i.ability&&i.ability.bottomActions&&i.ability.bottomActions.length>0&&!i.character,i.character)),t.xp6(1),t.Q6J("ngIf",i.ability)}},dependencies:[x.mk,x.O5,ag,Yf,ie],styles:['.ability[_ngcontent-%COMP%]{width:100%;height:100%;color:var(--ghs-color-white);--ghs-ability-color: var(--ghs-color-red)}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]{min-height:16em;display:flex;flex-direction:column;justify-content:center;text-align:center;border-radius:3.5%}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]{position:relative;z-index:1}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:before{content:" ";position:absolute;width:100%;height:100%;background-image:url(monster-ability-front.6630d6e4791f6c50.png);background-position:0em -.9em;background-size:100% auto;background-repeat:no-repeat;z-index:0}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:after{content:" ";position:absolute;width:100%;height:100%;background-image:url(monster-ability-front-repeat.90ec2bf17a27d884.png);background-position:0em -2.9em;background-size:100% auto;background-repeat:repeat-y;z-index:-1}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%]{position:relative;margin-top:2em;padding-bottom:.4em;width:100%;min-height:7.4em;font-size:1.7em;z-index:1;display:flex;align-items:center;overflow:auto}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]{font-size:calc(1em * var(--ghs-fontsize));position:relative;width:100%;height:100%}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block;position:absolute;top:.2em;left:0;width:100%;font-family:var(--ghs-font-title);font-size:1.7em;filter:var(--ghs-filter-shadow);text-align:center}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{position:absolute;font-family:var(--ghs-font-title);font-size:2.4em;filter:var(--ghs-filter-shadow);top:1em;left:.5em;text-align:center;width:1em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]{position:absolute;bottom:1em;right:.5em;z-index:0;filter:var(--ghs-filter-white) var(--ghs-filter-shadow);width:2em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{position:absolute;font-size:1em;filter:var(--ghs-filter-shadow-thin);bottom:.5em;left:.5em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%]{position:absolute;bottom:16.5em;right:3.3em;height:2em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;top:0;left:0;height:100%;width:auto}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1){filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2){position:absolute}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost.bottom[_ngcontent-%COMP%]{right:4.6em;bottom:3em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%]{background-position:top;background-attachment:local;height:100%;overflow-x:unset;overflow-y:auto}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.bottom-actions[_ngcontent-%COMP%]:before, .ability[_ngcontent-%COMP%] .ability-front.character-actions.bottom-actions[_ngcontent-%COMP%]:before{background-position:top;background-image:url(monster-ability-front-bottom.43963667f697d866.png)}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.character-actions[_ngcontent-%COMP%]:before, .ability[_ngcontent-%COMP%] .ability-front.character-actions.character-actions[_ngcontent-%COMP%]:before{background-position:top;background-color:var(--ghs-ability-color);background-image:url(character-ability-front.78d3032ed2ab477f.png),url(character-ability-front-blend.7ab7f92ad3df07cf.png);background-blend-mode:screen,luminosity}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{position:absolute;bottom:1.2em;left:50%;width:1.8em;height:auto;transform:translate(-50%);z-index:1}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;filter:drop-shadow(.5em .5em .5em var(--ghs-color-black))}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:.8em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{top:7em;left:5.2em;transform:translate(-50%)}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{position:absolute;top:3.1em;left:9.4em;width:2.1em;height:1.6em;font-size:1.2em;font-family:var(--ghs-font-title);display:flex;justify-content:center;align-items:center;background-color:var(--ghs-ability-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-size:115% 170%;-webkit-mask-size:115% 170%;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:60% 66%;-webkit-mask-position:60% 66%}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{background:inherit;-webkit-background-clip:text;background-clip:text;color:transparent;filter:invert(1) grayscale(1) contrast(100)}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%]{top:15.5em;right:3.5em;bottom:initial}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]{bottom:2.3em;right:4.8em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{left:14.7em;bottom:2.2em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%]{left:1.6em;width:11.5em;min-height:6.4em;max-height:6.4em;margin-top:1.8em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .ability-actions.ability-bottom-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .ability-actions.ability-bottom-actions[_ngcontent-%COMP%]{top:1.5em;margin-top:0;margin-bottom:2.2em;padding-top:.2em;padding-bottom:0}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%]{background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(monster-ability-back.1b996f6c655437aa.png);z-index:1}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%] .touch[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1;overflow:auto}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{position:absolute;top:50%;left:0;width:100%;font-family:var(--ghs-font-title);font-size:1.4em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));text-align:center;transform:translateY(2.9em)}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:50%;height:auto;transform:translate(-50%,-50%);z-index:1}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;filter:drop-shadow(.5em .5em .5em var(--ghs-color-black))}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.bottom-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.bottom-actions[_ngcontent-%COMP%]{background-image:url(monster-ability-back-botton.5146fd83ee4567f9.png)}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:57.5%}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.character-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.character-actions[_ngcontent-%COMP%]{background-color:var(--ghs-ability-color);background-image:url(character-ability-back.2421cfa27a5519f7.png),url(character-ability-back-blend.deb865dbb87b8a00.png);background-blend-mode:screen,luminosity}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.character-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.character-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:3%;bottom:initial;font-size:2em}.ability[_ngcontent-%COMP%] .confirm[_ngcontent-%COMP%] .revealed[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:2.3em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));z-index:2}.ability.fh[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:before{background-image:url(monster-ability-front.bae377edfe8630cc.png)}.ability.fh[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:after{background-image:url(monster-ability-front-repeat.21d351b34ecd76d1.png)}.ability.fh[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%]:before{background-image:url(monster-ability-front-bottom.43963667f697d866.png)}.ability.fh[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{bottom:.5em;left:.5em}.ability.fh[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%]{background-image:url(monster-ability-back.7df0db1b0ed7e94a.png)}.ability.fh[_ngcontent-%COMP%] .ability-back.bottom-actions[_ngcontent-%COMP%]{background-image:url(monster-ability-back-botton.5146fd83ee4567f9.png)}']})),a})();const R8=function(o,a){return{closed:o,opened:a}},F8=function(o){return{"bottom-actions":o}};let kT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"ability",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"relative",void 0),(0,_.Z)(this,"opened",!1),(0,_.Z)(this,"gameManager",d.v),this.dialogRef=i,this.ability=e.ability,this.monster=e.monster,this.relative=e.relative}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},1e3)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-ability-dialog"]],decls:4,vars:11,consts:[[1,"ability-dialog",3,"ngClass","click"],[1,"ability-container",3,"ngClass"],[3,"ability","monster","flipped","relative"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(){return i.close()}),t.TgZ(1,"div",1),t._UZ(2,"ghs-ability",2),t.qZA()(),t.TgZ(3,"div",3),t.NdJ("click",function(){return i.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.WLB(6,R8,!i.opened,i.opened)),t.xp6(1),t.Q6J("ngClass",t.VKq(9,F8,i.ability&&i.ability.bottomActions&&i.ability.bottomActions.length>0||!1)),t.xp6(1),t.Q6J("ability",i.ability)("monster",i.monster)("flipped",i.opened)("relative",i.relative))},dependencies:[x.mk,a_],styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.ability-dialog[_ngcontent-%COMP%]{position:relative;width:100vw;height:100vh;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0);z-index:2;overflow:auto;display:flex;justify-content:center;align-items:center;-ms-overflow-style:none;scrollbar-width:none}.ability-dialog[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.ability-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.ability-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.8s}.ability-dialog[_ngcontent-%COMP%] .ability-container[_ngcontent-%COMP%]{overflow:visible;width:100vw;max-width:600px;max-height:100vh}.ability-dialog[_ngcontent-%COMP%] .ability-container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{display:block;margin:1vh 0}.ability-dialog[_ngcontent-%COMP%] .ability-container.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:135vw;max-height:810px}.close-container[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1}"]})),a})();function q8(o,a){if(1&o&&t._UZ(0,"img",16),2&o){const n=t.oxw();t.Q6J("src",n.gameManager.monsterManager.monsterThumbnail(n.monster),t.LSH)}}function H8(o,a){1&o&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA())}function j8(o,a){1&o&&(t.TgZ(0,"span",19),t._uU(1,"*"),t.qZA())}const B8=function(o){return{"bottom-actions":o}};function z8(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",20),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.dialogRef.close())})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.openAbility(s))}),t._UZ(2,"ghs-ability",21),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(7,B8,e.gameManager.hasBottomAbility(n))),t.xp6(1),t.Q6J("ability",n)("monster",e.monster)("flipped",!0)("reveal",!0)("relative",!0)("statsCalculation",!1)}}const G8=function(o,a){return{fh:o,modern:a}};let V8=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),this.monster=e,this.dialogRef=i,this.dialog=s}openAbility(e){this.dialog.open(kT,{panelClass:"fullscreen-panel",data:{ability:e,monster:this.monster,relative:!0}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-stats-list"]],decls:16,vars:11,consts:[[1,"stats-dialog"],[1,"scroll-container"],[1,"header",3,"ngClass"],[1,"image"],[1,"outer-border"],[1,"inner-border"],[1,"image-container"],[3,"src",4,"ngIf"],["class","boss",4,"ngIf"],["class","custom",4,"ngIf"],[1,"name"],[3,"ghs-label"],[1,"container"],[1,"stats"],[3,"monster","forceStats"],[4,"ngFor","ngForOf"],[3,"src"],[1,"boss"],["src","./assets/images/monster/enemy.png"],[1,"custom"],["ghs-pointer-input","",1,"ability",3,"ngClass","singleClick","doubleClick"],[3,"ability","monster","flipped","reveal","relative","statsCalculation"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),t.YNc(7,q8,1,1,"img",7),t.qZA()()(),t.YNc(8,H8,2,0,"span",8),t.YNc(9,j8,2,0,"span",9),t.qZA(),t.TgZ(10,"div",10),t._UZ(11,"span",11),t.qZA()(),t.TgZ(12,"div",12)(13,"div",13),t._UZ(14,"ghs-monster-stats",14),t.qZA(),t.YNc(15,z8,3,9,"ng-container",15),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngClass",t.WLB(8,G8,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(5),t.Q6J("ngIf",!i.monster.noThumbnail&&!i.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ngIf",i.monster.boss||-1!=i.monster.tags.indexOf("boss")),t.xp6(1),t.Q6J("ngIf",i.monster.standeeShare),t.xp6(2),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(3),t.Q6J("monster",i.monster)("forceStats",!0),t.xp6(1),t.Q6J("ngForOf",i.gameManager.abilities(i.monster)))},dependencies:[x.mk,x.sg,x.O5,T,a_,ie,An],styles:[".stats-dialog[_ngcontent-%COMP%]{position:relative}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{position:sticky;top:0;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;z-index:999;background-image:url(dialog_background.fa4ff388462f6a00.png)}.stats-dialog[_ngcontent-%COMP%] .header.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.stats-dialog[_ngcontent-%COMP%] .header.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 11 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 11 * var(--ghs-dialog-factor));background-color:var(--ghs-color-white);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 10.3 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 10.3 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));height:auto}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));background-color:var(--ghs-color-darkred);border:2px solid var(--ghs-color-gray);border-radius:100%}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor));height:auto}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%]{display:flex;justify-content:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));font-family:ghs-title;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border:2px solid var(--ghs-color-gray);border-radius:100%}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:calc(var(--ghs-unit) * 42 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:top left}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%]{cursor:pointer!important;position:relative;width:calc(var(--ghs-unit) * 33.55 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));flex-shrink:0;flex-grow:0}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 49.95 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{pointer-events:none;width:100%;height:100%}"]})),a})();function Y8(o,a){if(1&o&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("#",n.scenario.index,"")}}function K8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openTreasures(i))}),t._UZ(1,"img",25),t.qZA()}}function $8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",28)(1,"input",35),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.spoiler=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.updateMonster())}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngModel",n.spoiler),t.xp6(1),t.Q6J("ghs-label","scenario.setup.spoiler")}}function W8(o,a){if(1&o&&(t.TgZ(0,"div",39),t._UZ(1,"img",40),t.TgZ(2,"span",41),t._uU(3,"x"),t.qZA(),t._uU(4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n.type+".svg",t.LSH),t.xp6(3),t.hij("",n.value," ")}}function X8(o,a){if(1&o&&(t.TgZ(0,"div",36),t._UZ(1,"div",37),t.YNc(2,W8,5,2,"div",38),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.loot"),t.xp6(1),t.Q6J("ngForOf",n.lootConfig)}}function tH(o,a){if(1&o&&t._UZ(0,"img",51),2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.Q6J("src",e.gameManager.monsterManager.monsterThumbnail(n),t.LSH)}}function eH(o,a){1&o&&(t.TgZ(0,"span",52),t._UZ(1,"img",53),t.qZA())}function nH(o,a){1&o&&(t.TgZ(0,"span",54),t._uU(1,"*"),t.qZA())}function iH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.openStats(s))}),t.TgZ(1,"div",44)(2,"div",45)(3,"div",46)(4,"div",47),t.YNc(5,tH,1,1,"img",48),t.qZA()()(),t.YNc(6,eH,2,0,"span",49),t.YNc(7,nH,2,0,"span",50),t.qZA(),t.TgZ(8,"div",4),t._UZ(9,"span",5),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(5),t.Q6J("ngIf",!n.noThumbnail||e.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ngIf",n.boss||-1!=n.tags.indexOf("boss")),t.xp6(1),t.Q6J("ngIf",n.standeeShare),t.xp6(2),t.Q6J("ghs-label","data.monster."+n.name)}}function oH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,iH,10,4,"div",42),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.monsters)}}function aH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.openStats(s))}),t._UZ(1,"ghs-monster-stats",55),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("monster",e.toMonster(n))("forceStats",!0)("noClick",!0)("disablePoup",!0)}}function sH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,aH,2,4,"div",42),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.monsters)}}const rH=function(o){return{detailed:o}};function cH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",26)(1,"span",2)(2,"span"),t._UZ(3,"span",5),t.qZA()(),t.TgZ(4,"div",27)(5,"label",28)(6,"input",29),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.detailed=i)}),t.qZA(),t._UZ(7,"span",5),t.qZA(),t.YNc(8,$8,3,2,"label",30),t.qZA(),t.TgZ(9,"div",31),t.YNc(10,X8,3,2,"div",32),t.TgZ(11,"div",33),t.YNc(12,oH,2,1,"ng-container",34),t.YNc(13,sH,2,1,"ng-container",34),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label","scenario.setup"),t.xp6(3),t.Q6J("ngModel",n.detailed),t.xp6(1),t.Q6J("ghs-label","scenario.setup.detailed"),t.xp6(1),t.Q6J("ngIf",n.hasSpoiler||n.spoiler),t.xp6(1),t.Q6J("ngClass",t.VKq(8,rH,n.detailed)),t.xp6(1),t.Q6J("ngIf",n.lootConfig.length>0),t.xp6(2),t.Q6J("ngIf",!n.detailed),t.xp6(1),t.Q6J("ngIf",n.detailed)}}function lH(o,a){if(1&o&&t._UZ(0,"span",59),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function gH(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t._uU(2),t.YNc(3,lH,1,1,"span",58),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.hij(" ",n.ref," "),t.xp6(1),t.Q6J("ngIf",n.marker)}}function dH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," \xa0"),t._UZ(2,"span",5),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function hH(o,a){if(1&o&&t._UZ(0,"span",59),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function uH(o,a){if(1&o&&(t.TgZ(0,"span",60),t._uU(1),t.YNc(2,dH,3,1,"span",34),t.YNc(3,hH,1,1,"span",58),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.hij(" #",n.index," "),t.xp6(1),t.Q6J("ngIf",!e.scenario||n.name!=e.scenario.name),t.xp6(1),t.Q6J("ngIf",n.marker)}}const _H=function(o,a){return[o,a]};function pH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",61),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.openRoom(s))}),t._UZ(1,"img",62)(2,"span",63),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ghs-label",n.marker?"scenario.openRoomMarker":"scenario.openRoom")("ghs-label-args",t.WLB(2,_H,n.ref,n.marker||""))}}function fH(o,a){1&o&&t._UZ(0,"img",68)}function mH(o,a){1&o&&t._UZ(0,"img",69)}function vH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("#",n.index,"")}}function CH(o,a){if(1&o&&t._UZ(0,"span",59),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function MH(o,a){if(1&o&&(t.TgZ(0,"span",4),t._uU(1," \xa0"),t._UZ(2,"span",5),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function OH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",64),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addSection(s))}),t.YNc(1,fH,1,0,"img",65),t.YNc(2,mH,1,0,"img",66),t.YNc(3,vH,2,1,"span",34),t.YNc(4,CH,1,1,"span",58),t.YNc(5,MH,3,1,"span",67),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.conclusion),t.xp6(1),t.Q6J("ngIf",n.conclusion),t.xp6(1),t.Q6J("ngIf",!n.conclusion||!n.name),t.xp6(1),t.Q6J("ngIf",n.marker),t.xp6(1),t.Q6J("ngIf",n.conclusion&&n.name)}}function PH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",70)(1,"input",35),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setup=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.updateMonster())}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.setup),t.xp6(1),t.Q6J("ghs-label","scenario.setup")}}function yH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",71)(1,"a",21),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEventEffects(i))}),t._UZ(2,"img",72)(3,"span",5),t.qZA()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","scenario.eventEffects"))}const bH=function(o){return{denied:o}};let xH=(()=>{var o;class a{constructor(e,i,s){if((0,_.Z)(this,"scenario",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"monsters",[]),(0,_.Z)(this,"lootConfig",[]),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"hasSpoiler",!1),(0,_.Z)(this,"spoiler",!1),(0,_.Z)(this,"detailed",!1),this.scenario=e,this.dialogRef=i,this.dialog=s,this.updateMonster(),e.lootDeckConfig)for(let l in le.CG)e.lootDeckConfig[l]&&this.lootConfig.push({type:l,value:e.lootDeckConfig[l]||0})}updateMonster(){this.monsters=[],this.hasSpoiler=!1,d.v.scenarioManager.getMonsters(this.scenario).forEach(e=>{if(this.spoiler||!e.standeeShare||d.v.scenarioManager.openRooms().find(i=>i.initial&&i.monster.find(s=>s.name.split(":")[0]==e.name))||d.v.game.figures.some(i=>i instanceof Ze.Q&&i.name==e.name&&i.edition==e.edition))-1==this.monsters.indexOf(e)&&(e.tags=[],this.monsters.push(e));else{const i=d.v.monstersData().find(s=>s.name==e.standeeShare&&s.edition==(e.standeeShareEdition||e.edition));if(i){const s=JSON.parse(JSON.stringify(i));s.tags=s.tags||[],d.v.editionRules("cs")&&e.boss&&s.tags.push("boss");const l=this.monsters.find(m=>m.name==s.name&&m.edition==s.edition);l?!this.spoiler&&d.v.editionRules("cs")&&(l.tags=l.tags||[],e.boss&&(this.hasSpoiler=!0,l.tags.push("boss"))):(this.hasSpoiler=!0,this.monsters.push(s))}}}),this.monsters=this.monsters.filter((e,i,s)=>!s.find(l=>e.standeeShare==l.edition&&e.standeeShareEdition==l.name)).sort((e,i)=>R.r.getLabel("data.monster."+e.name).toLowerCase()s.edition==this.scenario.edition&&s.parent==this.scenario.index&&s.group==this.scenario.group&&s.conclusion);i.length<2||!e?this.dialog.open(uo,{panelClass:"dialog",data:{scenario:this.scenario,conclusion:1==i.length?i[0]:void 0,success:e}}):this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:this.scenario}}).closed.subscribe({next:s=>{s&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:this.scenario,conclusion:s,success:e}})}})}resetScenario(){this.dialogRef.close(),d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.scenarioManager.setScenario(this.scenario),d.v.stateManager.after()}cancelScenario(){this.dialogRef.close(),d.v.stateManager.before("cancelScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.scenarioManager.setScenario(void 0),d.v.stateManager.after(1e3)}openTreasures(e){this.dialog.open(Aw,{panelClass:"dialog"})}openEventEffects(e){this.dialog.open(Lw,{panelClass:"dialog"}),this.dialogRef.close()}openRoom(e){d.v.editionData.find(s=>s.edition==this.scenario.edition)?(d.v.stateManager.before(e.marker?"openRoomMarker":"openRoom",this.scenario.index,"data.scenario."+this.scenario.name,""+e.ref,e.marker||""),d.v.scenarioManager.openRoom(e,this.scenario,!1),d.v.stateManager.after(),this.updateMonster()):console.error("Could not find edition data!")}addSection(e){this.dialog.open(xT,{panelClass:"dialog",data:e}).closed.subscribe({next:i=>{i&&this.dialogRef.close()}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-dialog"]],decls:30,vars:18,consts:[[1,"scenario-popup",3,"ngClass"],[1,"scroll-container"],[1,"title"],["class","index",4,"ngIf"],[1,"name"],[3,"ghs-label"],["class","treasures",3,"click",4,"ngIf"],["class","setup",4,"ngIf"],[1,"sections"],["class","section room",4,"ngFor","ngForOf"],["class","section",4,"ngFor","ngForOf"],[1,"open-sections"],["class","section room available",3,"click",4,"ngFor","ngForOf"],["class","section available",3,"click",4,"ngFor","ngForOf"],["class","setup-checkbox",4,"ngIf"],[1,"menu"],[1,"buttons"],[1,"failure",3,"click"],[1,"spacer"],[1,"success",3,"click"],[1,"cancel"],[3,"click"],["class","event-effects",4,"ngIf"],[1,"index"],[1,"treasures",3,"click"],["src","./assets/images/scenario/treasure.svg",1,"ghs-svg"],[1,"setup"],[1,"setup-container"],[1,"checkbox"],["type","checkbox",3,"ngModel","ngModelChange"],["class","checkbox",4,"ngIf"],[1,"setup-container",3,"ngClass"],["class","loot-config",4,"ngIf"],[1,"monsters"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"loot-config"],[1,"title",3,"ghs-label"],["class","loot",4,"ngFor","ngForOf"],[1,"loot"],[1,"ghs-svg",3,"src"],[1,"sign"],["class","monster",3,"click",4,"ngFor","ngForOf"],[1,"monster",3,"click"],[1,"image"],[1,"outer-border"],[1,"inner-border"],[1,"image-container"],[3,"src",4,"ngIf"],["class","boss",4,"ngIf"],["class","custom",4,"ngIf"],[3,"src"],[1,"boss"],["src","./assets/images/monster/enemy.png"],[1,"custom"],[3,"monster","forceStats","noClick","disablePoup"],[1,"section","room"],["src","./assets/images/scenario/door-open.svg",1,"ghs-svg"],["class","marker",3,"ghs-label",4,"ngIf"],[1,"marker",3,"ghs-label"],[1,"section"],[1,"section","room","available",3,"click"],["src","./assets/images/scenario/door.svg",1,"ghs-svg"],[3,"ghs-label","ghs-label-args"],[1,"section","available",3,"click"],["class","ghs-svg","src","./assets/images/scenario/lock.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/scenario/conclusion.svg",4,"ngIf"],["class","name",4,"ngIf"],["src","./assets/images/scenario/lock.svg",1,"ghs-svg"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"],[1,"setup-checkbox"],[1,"event-effects"],["src","./assets/images/event.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,Y8,2,1,"span",3),t.TgZ(4,"span",4),t._UZ(5,"span",5),t.qZA(),t.YNc(6,K8,2,0,"span",6),t.qZA(),t.YNc(7,cH,14,10,"div",7),t.TgZ(8,"div",8),t.YNc(9,gH,4,2,"span",9),t.YNc(10,uH,4,3,"span",10),t.qZA(),t.TgZ(11,"div",11),t.YNc(12,pH,3,5,"span",12),t.YNc(13,OH,6,5,"span",13),t.qZA(),t.YNc(14,PH,3,2,"label",14),t.TgZ(15,"div",15)(16,"label"),t._UZ(17,"span",5),t.qZA(),t.TgZ(18,"div",16)(19,"a",17),t.NdJ("click",function(){return i.finishScenario(!1)}),t._UZ(20,"span",5),t.qZA(),t._UZ(21,"span",18),t.TgZ(22,"a",19),t.NdJ("click",function(){return i.finishScenario(!0)}),t._UZ(23,"span",5),t.qZA()(),t.TgZ(24,"div",20)(25,"a",21),t.NdJ("click",function(){return i.cancelScenario()}),t._UZ(26,"span",5),t.qZA(),t.TgZ(27,"a",21),t.NdJ("click",function(){return i.resetScenario()}),t._UZ(28,"span",5),t.qZA()()(),t.YNc(29,yH,4,1,"div",22),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(16,bH,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.scenario)),t.xp6(3),t.Q6J("ngIf",i.scenario.index),t.xp6(2),t.Q6J("ghs-label",i.scenario.name?"data.scenario."+i.scenario.name:i.scenario.custom?"scenario.custom":"scenario"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.scenarioRooms&&i.settingsManager.settings.treasures&&i.gameManager.scenarioManager.getTreasures(i.scenario,i.gameManager.game.sections).length>0),t.xp6(1),t.Q6J("ngIf",i.setup||i.gameManager.game.round<1),t.xp6(2),t.Q6J("ngForOf",i.gameManager.scenarioManager.openRooms()),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.sections),t.xp6(2),t.Q6J("ngForOf",i.gameManager.scenarioManager.closedRooms()),t.xp6(1),t.Q6J("ngForOf",i.gameManager.scenarioManager.availableSections()),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.round>0),t.xp6(3),t.Q6J("ghs-label","scenario.finish"),t.xp6(3),t.Q6J("ghs-label","scenario.finish.failure"),t.xp6(3),t.Q6J("ghs-label","scenario.finish.success"),t.xp6(3),t.Q6J("ghs-label","scenario.cancel"),t.xp6(2),t.Q6J("ghs-label","scenario.reset"),t.xp6(1),t.Q6J("ngIf",i.setup||i.gameManager.game.round<1))},dependencies:[x.mk,x.sg,x.O5,va,yi,Si,T,ie],styles:[".scenario-popup[_ngcontent-%COMP%]{position:relative;text-align:center;color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;height:1em;width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-barsize))}.scenario-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow);height:.8em;width:auto}.scenario-popup[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;display:flex;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:var(--ghs-color-gray);margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));border-top-left-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));border-top-right-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));border-bottom-left-radius:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));border-bottom-right-radius:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));padding-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;color:var(--ghs-color-white);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);padding:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));border-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) solid var(--ghs-color-black);border-top-left-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));border-top-right-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-black);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] .sign[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.3em;width:auto;filter:var(--ghs-filter-black);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start;flex-wrap:wrap;height:100%}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 13 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]:hover{opacity:.7}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 11 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 11 * var(--ghs-dialog-factor));background-color:var(--ghs-color-white);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 10.3 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 10.3 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));height:auto}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));background-color:var(--ghs-color-darkred);border:2px solid var(--ghs-color-gray);border-radius:100%}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor));height:auto}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%]{display:flex;justify-content:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));font-family:ghs-title;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border:2px solid var(--ghs-color-gray);border-radius:100%}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .setup-container[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));display:flex;align-items:center}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .setup-container.detailed[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .setup-container.detailed[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.scenario-popup[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.scenario-popup[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));display:flex;justify-content:center;flex-wrap:wrap}.scenario-popup[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-left:calc(var(--ghs-unit) * .1 * var(--ghs-barsize)) solid var(--ghs-color-white)}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover{cursor:pointer;color:var(--ghs-color-white);text-shadow:var(--ghs-outline-thin)}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover .marker[_ngcontent-%COMP%]{filter:grayscale(.3)}.scenario-popup[_ngcontent-%COMP%] .setup-checkbox[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.25 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .2 * var(--ghs-barsize)) solid var(--ghs-color-white);margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .failure[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:not(:first-child){margin-left:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-barsize));padding-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-barsize));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-barsize)) solid var(--ghs-color-white)}.scenario-popup[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.scenario-popup[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}"]})),a})();function wH(o,a){if(1&o&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("#",n.gameManager.game.scenario.index,"")}}function kH(o,a){if(1&o&&(t.TgZ(0,"span",13),t._UZ(1,"span",14),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",n.gameManager.game.scenario.name?"data.scenario."+n.gameManager.game.scenario.name:n.gameManager.game.scenario.custom?"scenario.custom":"scenario.set")}}const TH=function(o){return{unlooted:o}};function ZH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",15),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openTreasures(i))}),t._UZ(1,"img",16),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(1,TH,n.gameManager.scenarioManager.getTreasures(n.gameManager.game.scenario,n.gameManager.game.sections,!0).length>0))}}function AH(o,a){if(1&o&&(t.TgZ(0,"div",8),t.YNc(1,wH,2,1,"span",9),t.YNc(2,kH,2,1,"span",10),t.YNc(3,ZH,2,3,"span",11),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario.index),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.scenarioRooms&&n.settingsManager.settings.treasures&&n.gameManager.scenarioManager.getTreasures(n.gameManager.game.scenario,n.gameManager.game.sections).length>0)}}function SH(o,a){1&o&&(t.TgZ(0,"div",17),t._UZ(1,"img",18)(2,"span",14),t.qZA()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.eventEffects"))}function EH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function DH(o,a){if(1&o&&(t.TgZ(0,"span",20),t._UZ(1,"img",21),t._uU(2),t.YNc(3,EH,1,1,"span",22),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.hij(" ",n.ref," "),t.xp6(1),t.Q6J("ngIf",n.marker)}}function IH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,DH,4,2,"span",19),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.gameManager.scenarioManager.openRooms())}}function NH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("#",n.index,"")}}function JH(o,a){if(1&o&&(t.TgZ(0,"span",13),t._uU(1," \xa0"),t._UZ(2,"span",14),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function UH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function LH(o,a){if(1&o&&(t.TgZ(0,"span",24),t._UZ(1,"img",25),t.YNc(2,NH,2,1,"span",5),t.YNc(3,JH,3,1,"span",10),t.YNc(4,UH,1,1,"span",22),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Q6J("ngIf",!n.hideIndex),t.xp6(1),t.Q6J("ngIf",!e.gameManager.game.scenario||n.name!=e.gameManager.game.scenario.name),t.xp6(1),t.Q6J("ngIf",n.marker)}}function QH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}const RH=function(o,a){return[o,a]};function FH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",27),t.NdJ("click",function(i){const l=t.CHM(n).$implicit,m=t.oxw(2);return t.KtG(m.openRoom(l,i))}),t._UZ(1,"img",28),t.TgZ(2,"span",29),t._uU(3),t.qZA(),t.YNc(4,QH,1,1,"span",22),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-tooltip",(n.marker?"scenario.openRoomMarker":"scenario.openRoom")+(n.ref?"Ref":""))("ghs-label-args",t.WLB(8,RH,n.ref||"",n.marker||""))("originX","center")("overlayY","center")("originY","top")("overlayY","bottom"),t.xp6(3),t.Oqu(n.ref),t.xp6(1),t.Q6J("ngIf",n.marker)}}function qH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,FH,5,11,"span",26),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.gameManager.scenarioManager.closedRooms())}}function HH(o,a){1&o&&t._UZ(0,"img",33)}function jH(o,a){1&o&&t._UZ(0,"img",34)}function BH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("#",n.index,"")}}function zH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function GH(o,a){if(1&o&&(t.TgZ(0,"span",13),t._uU(1," \xa0"),t._UZ(2,"span",14),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function VH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",30),t.NdJ("click",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.addSection(l,i))}),t.YNc(1,HH,1,0,"img",31),t.YNc(2,jH,1,0,"img",32),t.YNc(3,BH,2,1,"span",5),t.YNc(4,zH,1,1,"span",22),t.YNc(5,GH,3,1,"span",10),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.conclusion),t.xp6(1),t.Q6J("ngIf",n.conclusion),t.xp6(1),t.Q6J("ngIf",!(n.conclusion&&n.name||n.hideIndex)),t.xp6(1),t.Q6J("ngIf",n.marker),t.xp6(1),t.Q6J("ngIf",(n.conclusion||n.named)&&n.name)}}const YH=function(o){return{setup:o}},KH=function(o){return{denied:o}};let $H=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{if(d.v.game.scenario&&d.v.game.finish&&!d.v.stateManager.scenarioSummary){const e=d.v.game.finish.conclusion?d.v.sectionData(d.v.game.finish.conclusion.edition).find(i=>d.v.game.finish&&d.v.game.finish.conclusion&&i.index==d.v.game.finish.conclusion.index&&i.group==d.v.game.finish.conclusion.group&&i.conclusion):void 0;this.dialog.open(uo,{panelClass:"dialog",disableClose:!0,data:{scenario:d.v.game.scenario,conclusion:e,success:d.v.game.finish.success}})}}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}open(e){d.v.game.scenario?this.dialog.open(xH,{data:d.v.game.scenario,panelClass:"dialog"}):this.dialog.open(Lw,{panelClass:"dialog"})}openTreasures(e){e.preventDefault(),e.stopPropagation(),d.v.game.scenario&&this.dialog.open(Aw,{panelClass:"dialog"})}availableSections(){return d.v.scenarioManager.availableSections().sort((e,i)=>e.marker&&i.marker&&!e.marker.startsWith("element")&&!i.marker.startsWith("element")?e.markerd.v.game.scenario&&m.edition==d.v.game.scenario.edition))return void console.error("Could not find edition data!");d.v.stateManager.before(e.marker?"openRoomMarker":"openRoom",s.index,"data.scenario."+s.name,""+e.ref,e.marker||""),d.v.scenarioManager.openRoom(e,s,!1),d.v.stateManager.after()}}addSection(e,i){i.preventDefault(),i.stopPropagation(),d.v.roundManager.firstRound?this.open(i):this.dialog.open(xT,{panelClass:"dialog",data:e})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario"]],decls:9,vars:12,consts:[[1,"scenario-container",3,"ngClass"],[1,"button",3,"click"],["class","scenario",4,"ngIf"],["class","event-effects",4,"ngIf"],[1,"sections","rooms",3,"ngClass","click"],[4,"ngIf"],["class","section",4,"ngFor","ngForOf"],["class","section available",3,"click",4,"ngFor","ngForOf"],[1,"scenario"],["class","index",4,"ngIf"],["class","name",4,"ngIf"],["class","treasures",3,"ngClass","click",4,"ngIf"],[1,"index"],[1,"name"],[3,"ghs-label"],[1,"treasures",3,"ngClass","click"],["src","./assets/images/scenario/treasure.svg",1,"ghs-svg"],[1,"event-effects"],["src","./assets/images/event.svg",1,"ghs-svg"],["class","section room",4,"ngFor","ngForOf"],[1,"section","room"],["src","./assets/images/scenario/door-open.svg",1,"ghs-svg"],["class","marker",3,"ghs-label",4,"ngIf"],[1,"marker",3,"ghs-label"],[1,"section"],["src","./assets/images/scenario/lock-open.svg",1,"ghs-svg"],["class","section room available",3,"ghs-tooltip","ghs-label-args","originX","overlayY","originY","click",4,"ngFor","ngForOf"],[1,"section","room","available",3,"ghs-tooltip","ghs-label-args","originX","overlayY","originY","click"],["src","./assets/images/scenario/door.svg",1,"ghs-svg"],[1,"ref"],[1,"section","available",3,"click"],["class","ghs-svg","src","./assets/images/scenario/lock.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/scenario/conclusion.svg",4,"ngIf"],["src","./assets/images/scenario/lock.svg",1,"ghs-svg"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.NdJ("click",function(l){return i.open(l)}),t.YNc(2,AH,4,3,"div",2),t.YNc(3,SH,3,1,"div",3),t.qZA(),t.TgZ(4,"div",4),t.NdJ("click",function(l){return i.open(l)}),t.YNc(5,IH,2,1,"ng-container",5),t.YNc(6,LH,5,3,"span",6),t.YNc(7,qH,2,1,"ng-container",5),t.YNc(8,VH,6,5,"span",7),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(8,YH,i.gameManager.game.round<1)),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",!i.gameManager.game.scenario&&i.gameManager.characterManager.characterCount()>0),t.xp6(1),t.Q6J("ngClass",t.VKq(10,KH,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.scenario)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.sections),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ngForOf",i.availableSections()))},dependencies:[x.mk,x.sg,x.O5,ie,Ba],styles:[".scenario-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-barsize));margin-bottom:calc(var(--ghs-unit) * -1 * var(--ghs-barsize));color:var(--ghs-color-gray)}.scenario-container[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.8 * var(--ghs-barsize) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 2.3 * var(--ghs-barsize) * var(--ghs-text-factor));text-shadow:var(--ghs-outline-thin)}.scenario-container[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;height:1em;width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray);height:.8em;width:auto}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .treasures.unlooted[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.scenario-container[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.scenario-container[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-barsize) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 2.2 * var(--ghs-barsize) * var(--ghs-text-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline-thin);max-height:calc(var(--ghs-unit) * 3 * var(--ghs-barsize) * var(--ghs-text-factor));overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-left:calc(var(--ghs-unit) * .1 * var(--ghs-barsize)) solid var(--ghs-color-gray)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(.available) .marker[_ngcontent-%COMP%]{filter:grayscale(.9);opacity:.8}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);text-shadow:var(--ghs-outline-thin)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]:hover .marker[_ngcontent-%COMP%]{filter:grayscale(.3)}@media (max-width: 791px){.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{max-height:calc(var(--ghs-unit) * 7 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:none}}"]})),a})();const WH=["nextButton"],XH=["footer"],tj=["monsterDeck"];function ej(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.round())}}function nj(o,a){if(1&o&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("\xa0(",n.totalRounds(),")")}}function ij(o,a){if(1&o&&(t.TgZ(0,"span",21),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.currentTime)}}function oj(o,a){1&o&&t._UZ(0,"ghs-scenario-rules")}const Hw=function(o,a,n,e){return{collapsed:o,initial:a,partial:n,full:e}},jw=function(o){return{inactive:o}};function aj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",22)(1,"ghs-attackmodifier-deck",23),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.beforeAllyAttackModifierDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.afterAllyAttackModifierDeck(i))}),t.qZA(),t.TgZ(2,"div",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleActiveAllyAttackModifierDeck())}),t.TgZ(3,"span",18),t._uU(4,"A"),t.qZA()()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.l5B(5,Hw,!n.gameManager.game.allyAttackModifierDeck.active||n.compact&&n.gameManager.game.lootDeck.active,n.gameManager.game.allyAttackModifierDeck.active&&n.gameManager.game.allyAttackModifierDeck.current<0,n.gameManager.game.allyAttackModifierDeck.active&&0==n.gameManager.game.allyAttackModifierDeck.current,n.gameManager.game.allyAttackModifierDeck.active&&n.gameManager.game.allyAttackModifierDeck.current>0)),t.xp6(1),t.Q6J("deck",n.gameManager.game.allyAttackModifierDeck)("ally",!0)("bottom",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(10,jw,!n.gameManager.game.allyAttackModifierDeck.active))}}function sj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",24)(1,"ghs-loot-deck",25),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.beforeLootDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.afterLootDeck(i))}),t.qZA(),t.TgZ(2,"div",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleLootDeck())}),t.TgZ(3,"span",18),t._UZ(4,"img",26),t.qZA()()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.l5B(4,Hw,!n.gameManager.game.lootDeck.active,n.gameManager.game.lootDeck.active&&n.gameManager.game.lootDeck.current<0,n.gameManager.game.lootDeck.active&&0==n.gameManager.game.lootDeck.current,n.gameManager.game.lootDeck.active&&n.gameManager.game.lootDeck.current>0)),t.xp6(1),t.Q6J("deck",n.gameManager.game.lootDeck)("bottom",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(9,jw,!n.gameManager.game.lootDeck.active))}}const rj=function(o){return{compact:o}},cj=function(o){return{denied:o}},lj=function(o){return{disabled:o}};let gj=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"nextButton",void 0),(0,_.Z)(this,"footer",void 0),(0,_.Z)(this,"monsterDeck",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"currentTime",""),(0,_.Z)(this,"hasAllyAttackModifierDeck",!1),(0,_.Z)(this,"lootDeck",!1),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"nextHint",!1),this.dialog=e,this.overlay=i}ngOnInit(){this.hasAllyAttackModifierDeck=R.r.settings.allyAttackModifierDeck&&(R.r.settings.alwaysAllyAttackModifierDeck||d.v.fhRules()&&d.v.game.figures.some(e=>e instanceof Ze.Q&&(e.isAlly||e.isAllied)||(e instanceof qe.CH||e instanceof Nn.k)&&e.objectiveId&&d.v.objectiveDataByScenarioObjectiveIdentifier(e.objectiveId)?.allyDeck)||d.v.game.scenario&&d.v.game.scenario.allyDeck)||!1,this.lootDeck=R.r.settings.lootDeck&&Object.keys(d.v.game.lootDeck.cards).length>0,d.v.uiChange.subscribe({next:()=>{this.hasAllyAttackModifierDeck=R.r.settings.allyAttackModifierDeck&&(R.r.settings.alwaysAllyAttackModifierDeck||d.v.fhRules()&&d.v.game.figures.some(e=>e instanceof Ze.Q&&(e.isAlly||e.isAllied)||(e instanceof qe.CH||e instanceof Nn.k)&&e.objectiveId&&d.v.objectiveDataByScenarioObjectiveIdentifier(e.objectiveId)?.allyDeck)||d.v.game.scenario&&d.v.game.scenario.allyDeck)||!1,this.lootDeck=R.r.settings.lootDeck&&Object.keys(d.v.game.lootDeck.cards).length>0}}),setInterval(()=>{d.v.game.playSeconds++;let e=d.v.game.playSeconds;this.currentTime="",e/3600>=1&&(this.currentTime+=Math.floor(e/3600)+"h ",e%=3600),e/60>=1&&(this.currentTime+=(this.currentTime&&this.currentTime&&Math.floor(e/60)<10?"0":"")+Math.floor(e/60)+"m ",e%=60),this.currentTime+=(this.currentTime&&e<10?"0":"")+Math.floor(e)+"s",(new Date).getTime()/1e3-d.v.stateManager.lastSaveTimestamp/1e3>30&&d.v.stateManager.saveLocal()},1e3),setTimeout(()=>{this.compact=this.monsterDeck.nativeElement.clientWidth>.3*this.footer.nativeElement.clientWidth},100),window.addEventListener("resize",e=>{this.compact=this.monsterDeck.nativeElement.clientWidth>.3*this.footer.nativeElement.clientWidth})}next(e=!1){!e&&this.disabled()?(this.nextHint=!0,this.dialog.open(Dq,{panelClass:"dialog",positionStrategy:this.overlay.position().flexibleConnectedTo(this.nextButton).withPositions([new ti.tR({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"})]).withDefaultOffsetX(10).withDefaultOffsetY(-10)}).closed.subscribe({next:s=>{this.nextHint=!1,s&&this.nextState()}})):this.nextState()}nextState(){var e=this;return(0,J.Z)(function*(){if(d.v.stateManager.before(d.v.game.state==ge.D2.next?"nextRound":"draw"),d.v.game.state==ge.D2.next)if(R.r.settings.disabledTurnConfirmation){let i=d.v.game.figures.find(s=>d.v.gameplayFigure(s)&&!s.off);for(;i;)d.v.roundManager.toggleFigure(i),i=d.v.game.figures.find(s=>d.v.gameplayFigure(s)&&!s.off)}else{const i=d.v.game.figures.find(s=>s.active&&!s.off);!e.activeHint()&&i&&d.v.roundManager.afterTurn(i)}d.v.roundManager.nextGameState(),d.v.stateManager.after(1e3)})()}beforeMonsterAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"monster",...e.values)}afterMonsterAttackModifierDeck(e){d.v.game.monsterAttackModifierDeck=e.deck,d.v.stateManager.after()}beforeAllyAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"ally",...e.values)}afterAllyAttackModifierDeck(e){d.v.game.allyAttackModifierDeck=e.deck,d.v.stateManager.after()}beforeLootDeck(e){d.v.stateManager.before(e.type,...e.values)}afterLootDeck(e){d.v.game.lootDeck=e.deck,d.v.stateManager.after()}confirmTurns(){d.v.game.figures.forEach(e=>d.v.roundManager.afterTurn(e)),this.next(!0)}finishScenario(e){if(d.v.game.scenario){const i=d.v.sectionData(d.v.game.scenario.edition).filter(s=>!!d.v.game.scenario&&s.edition==d.v.game.scenario.edition&&s.parent==d.v.game.scenario.index&&s.group==d.v.game.scenario.group&&s.conclusion);0!=i.length&&e?this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.game.scenario}}).closed.subscribe({next:s=>{s&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,conclusion:s,success:e}})}}):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:e}})}}resetScenario(){d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.stateManager.after(1e3)}empty(){return 0==d.v.game.figures.length}round(){const e=(d.v.game.round>0||d.v.game.roundResets.length>0||d.v.game.roundResetsHidden.length>0)&&d.v.game.state==ge.D2.draw?1:0;return 0==d.v.game.roundResetsHidden.length?d.v.game.round+e:d.v.game.round+e+d.v.game.roundResetsHidden.reduce((i,s)=>(i||0)+(s||0))}totalRounds(){return 0==d.v.game.roundResets.length?0:d.v.game.roundResets.reduce((e,i)=>(e||0)+(i||0))+this.round()}missingInitiative(){return d.v.game.figures.some(e=>R.r.settings.initiativeRequired&&(e instanceof oe.z&&d.v.entityManager.isAlive(e)&&!e.absent||e instanceof Nn.k)&&e.getInitiative()<1)}active(){return null!=d.v.game.figures.find(e=>e.active&&!e.off&&(!(e instanceof oe.z)||!e.absent))}battleGoals(){return!this.missingInitiative()&&R.r.settings.battleGoals&&R.r.settings.battleGoalsReminder&&null!=d.v.game.scenario&&d.v.roundManager.firstRound&&!d.v.game.figures.every(e=>!(e instanceof oe.z)||e.battleGoal||e.absent)}activeHint(){return this.active()&&!R.r.settings.disabledTurnConfirmation&&(R.r.settings.expireConditions||R.r.settings.applyConditions)}finish(){return!1}failed(){return!this.active()&&!this.empty()&&d.v.game.figures.some(e=>e instanceof oe.z)&&d.v.game.figures.every(e=>!(e instanceof oe.z)||e instanceof oe.z&&(e.exhausted||e.health<=0||e.absent))}disabled(){return d.v.game.state==ge.D2.draw&&this.drawDisabled()||d.v.game.state==ge.D2.next&&this.nextDisabled()}drawDisabled(){return this.empty()||this.missingInitiative()||this.battleGoals()||this.finish()||this.failed()}nextDisabled(){return this.activeHint()||this.finish()||this.failed()}toggleActiveAllyAttackModifierDeck(){this.beforeAllyAttackModifierDeck(new xn(d.v.game.allyAttackModifierDeck,!d.v.game.allyAttackModifierDeck.active||this.compact&&d.v.game.lootDeck.active?"amDeckShow":"amDeckHide")),this.compact&&d.v.game.lootDeck.active?(d.v.game.lootDeck.active=!1,d.v.game.allyAttackModifierDeck.active=!0):d.v.game.allyAttackModifierDeck.active=!d.v.game.allyAttackModifierDeck.active,this.afterAllyAttackModifierDeck(new xn(d.v.game.allyAttackModifierDeck,d.v.game.allyAttackModifierDeck.active?"amDeckShow":"amDeckHide"))}toggleActiveMonsterAttackModifierDeck(){this.beforeMonsterAttackModifierDeck(new xn(d.v.game.monsterAttackModifierDeck,!d.v.game.monsterAttackModifierDeck.active||this.compact&&d.v.game.lootDeck.active?"amDeckShow":"amDeckHide")),this.compact&&d.v.game.lootDeck.active?(d.v.game.lootDeck.active=!1,d.v.game.monsterAttackModifierDeck.active=!0):d.v.game.monsterAttackModifierDeck.active=!d.v.game.monsterAttackModifierDeck.active,this.afterMonsterAttackModifierDeck(new xn(d.v.game.monsterAttackModifierDeck,d.v.game.monsterAttackModifierDeck.active?"amDeckShow":"amDeckHide"))}toggleLootDeck(){this.beforeLootDeck(new _o(d.v.game.lootDeck,d.v.game.lootDeck.active?"lootDeckHide":"lootDeckShow")),d.v.game.lootDeck.active=!d.v.game.lootDeck.active,this.afterLootDeck(new _o(d.v.game.lootDeck,d.v.game.lootDeck.active?"lootDeckShow":"lootDeckHide"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-footer"]],viewQuery:function(e,i){if(1&e&&(t.Gf(WH,5),t.Gf(XH,5),t.Gf(tj,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.nextButton=s.first),t.iGM(s=t.CRH())&&(i.footer=s.first),t.iGM(s=t.CRH())&&(i.monsterDeck=s.first)}},decls:28,vars:30,consts:[[3,"ngClass"],["footer",""],[1,"round-container",3,"ngClass","click"],["nextButton",""],[3,"ghs-label"],[1,"round"],[4,"ngIf"],["class","total-rounds",4,"ngIf"],["class","time",4,"ngIf"],["button",""],[1,"flex-shrink"],[1,"level-container"],[1,"attack-modifier-spacer"],["class","deck am-deck ally-deck",3,"ngClass",4,"ngIf"],[1,"deck","am-deck","monster-deck",3,"ngClass"],["monsterDeck",""],["numeration","m",3,"deck","bottom","before","after"],[1,"active-toggle",3,"ngClass","click"],[1,"numeration"],["class","deck loot-deck",3,"ngClass",4,"ngIf"],[1,"total-rounds"],[1,"time"],[1,"deck","am-deck","ally-deck",3,"ngClass"],["numeration","A",3,"deck","ally","bottom","before","after"],[1,"deck","loot-deck",3,"ngClass"],[3,"deck","bottom","before","after"],["src","./assets/images/fh/loot-token.png"]],template:function(e,i){1&e&&(t.TgZ(0,"footer",0,1)(2,"div",0)(3,"div",2,3),t.NdJ("click",function(){return i.next()}),t.TgZ(5,"a"),t._UZ(6,"span",4),t.qZA(),t.TgZ(7,"span",5),t.YNc(8,ej,2,1,"span",6),t.YNc(9,nj,2,1,"span",7),t.qZA(),t.YNc(10,ij,2,1,"span",8),t._UZ(11,"span",null,9),t.qZA()(),t._UZ(13,"div",10),t.TgZ(14,"div",11),t._UZ(15,"ghs-scenario")(16,"ghs-level"),t.qZA(),t.YNc(17,oj,1,0,"ghs-scenario-rules",6),t._UZ(18,"div",10)(19,"div",12),t.YNc(20,aj,5,12,"div",13),t.TgZ(21,"div",14,15)(23,"ghs-attackmodifier-deck",16),t.NdJ("before",function(l){return i.beforeMonsterAttackModifierDeck(l)})("after",function(l){return i.afterMonsterAttackModifierDeck(l)}),t.qZA(),t.TgZ(24,"div",17),t.NdJ("click",function(){return i.toggleActiveMonsterAttackModifierDeck()}),t.TgZ(25,"span",18),t._uU(26,"m"),t.qZA()()(),t.YNc(27,sj,5,11,"div",19),t.qZA()),2&e&&(t.Tol(i.settingsManager.settings.theme),t.Q6J("ngClass",t.VKq(17,rj,i.compact)),t.xp6(2),t.Q6J("ngClass",t.VKq(19,cj,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("ngClass",t.VKq(21,lj,i.disabled())),t.xp6(3),t.Q6J("ghs-label",i.gameManager.game.state==i.GameState.next?"round.next":"round.draw"),t.xp6(2),t.Q6J("ngIf",i.round()>0),t.xp6(1),t.Q6J("ngIf",i.totalRounds()>0),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(7),t.Q6J("ngIf",i.settingsManager.settings.scenarioRules),t.xp6(3),t.Q6J("ngIf",i.hasAllyAttackModifierDeck),t.xp6(1),t.Q6J("ngClass",t.l5B(23,Hw,!i.gameManager.game.monsterAttackModifierDeck.active||i.compact&&i.gameManager.game.lootDeck.active,i.gameManager.game.monsterAttackModifierDeck.active&&i.gameManager.game.monsterAttackModifierDeck.current<0,i.gameManager.game.monsterAttackModifierDeck.active&&0==i.gameManager.game.monsterAttackModifierDeck.current,i.gameManager.game.monsterAttackModifierDeck.active&&i.gameManager.game.monsterAttackModifierDeck.current>0)),t.xp6(2),t.Q6J("deck",i.gameManager.game.monsterAttackModifierDeck)("bottom",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(28,jw,!i.gameManager.game.monsterAttackModifierDeck.active)),t.xp6(3),t.Q6J("ngIf",i.settingsManager.settings.lootDeck&&(i.lootDeck||i.settingsManager.settings.alwaysLootDeck||i.gameManager.fhRules())))},dependencies:[x.mk,x.O5,Fw,r8,Kf,v8,$H,ie],styles:['footer[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;position:relative}footer[_ngcontent-%COMP%] .flex-shrink[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:1}footer[_ngcontent-%COMP%] .attack-modifier-spacer[_ngcontent-%COMP%]{height:100%;width:calc(var(--ghs-unit) * 38 * var(--ghs-text-factor) * var(--ghs-barsize));flex-shrink:0}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%]{transition:transform .5s ease-in-out}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize));left:calc(var(--ghs-unit) * -2.5 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize));right:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize));border:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor) * var(--ghs-barsize)) solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);border-radius:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .deck.initial[_ngcontent-%COMP%]{transform:translate(59%)}footer[_ngcontent-%COMP%] .deck.partial[_ngcontent-%COMP%]{transform:translate(17%)}footer[_ngcontent-%COMP%] .deck.full[_ngcontent-%COMP%]{transform:none}footer[_ngcontent-%COMP%] .deck.collapsed[_ngcontent-%COMP%]{transform:translate(100%)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]{cursor:pointer;position:absolute;left:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize));top:50%;width:13%;height:50%;z-index:1;transition:transform .5s ease-in-out;transform:translateY(-50%) scale(1)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle.inactive[_ngcontent-%COMP%]{transform:translateY(-50%) scale(1.3)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:hover{filter:brightness(.7) grayscale(.3)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:active, footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:focus{filter:none}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%] .numeration[_ngcontent-%COMP%]{font-family:ghs-title;display:flex;justify-content:center;position:absolute;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor) * var(--ghs-barsize));line-height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor) * var(--ghs-barsize));width:100%;height:100%;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-character-icon.83c1ab396221d56b.png)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%] .numeration[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:60%;width:auto;align-self:center}footer[_ngcontent-%COMP%] .ally-deck[_ngcontent-%COMP%]{position:fixed;right:0;width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:1}footer[_ngcontent-%COMP%] .monster-deck[_ngcontent-%COMP%]{position:fixed;right:0;width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:2}footer[_ngcontent-%COMP%] .loot-deck[_ngcontent-%COMP%]{position:fixed;left:0;width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 12.5 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:2}footer[_ngcontent-%COMP%] .loot-deck[_ngcontent-%COMP%]:before{right:calc(var(--ghs-unit) * -2.5 * var(--ghs-text-factor) * var(--ghs-barsize));left:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .loot-deck.initial[_ngcontent-%COMP%]{transform:translate(-59%)}footer[_ngcontent-%COMP%] .loot-deck.partial[_ngcontent-%COMP%]{transform:translate(-17%)}footer[_ngcontent-%COMP%] .loot-deck.fully[_ngcontent-%COMP%]{transform:none}footer[_ngcontent-%COMP%] .loot-deck.collapsed[_ngcontent-%COMP%]{transform:translate(-100%)}footer[_ngcontent-%COMP%] .loot-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]{left:initial;right:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], footer[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{position:relative;z-index:2}footer[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-image:url(bar.e331a4ef847b1c19.jpg);background-size:100% 105%;background-position:bottom right;background-repeat:no-repeat;transform:scale(-1);z-index:-1}footer.fh[_ngcontent-%COMP%]:before{background-image:url(bar.56898105bfacea25.jpg)}footer.modern[_ngcontent-%COMP%]:before{background-image:url(dialog_background_modern.c233015926c13e5e.png)}footer.modern[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:0;left:0;width:100%;height:4%;background:linear-gradient(90deg,var(--ghs-color-darkgray) 0%,var(--ghs-color-white) 35%,var(--ghs-color-white) 65%,var(--ghs-color-darkgray) 100%);opacity:.2}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor) * var(--ghs-barsize));word-wrap:break-word;text-align:center}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));line-height:calc(var(--ghs-unit) * 3.4 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));width:calc(var(--ghs-unit) * 12 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);position:absolute;font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize));left:50%;transform:translate(-50%);bottom:calc(var(--ghs-unit) * .2 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);position:absolute;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));left:calc(var(--ghs-unit) * 12 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:0}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] .round[_ngcontent-%COMP%] .total-rounds[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%]:hover a[_ngcontent-%COMP%], footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%]:hover .round[_ngcontent-%COMP%]{color:var(--ghs-color-white)}footer[_ngcontent-%COMP%] .round-container.disabled[_ngcontent-%COMP%]{cursor:help}footer[_ngcontent-%COMP%] ghs-scenario-rules[_ngcontent-%COMP%]{position:absolute;left:50%;bottom:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));transform:translate(-50%);z-index:3}footer[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-shrink:0;max-width:calc(100% - var(--ghs-unit) * 15 * var(--ghs-text-factor) * var(--ghs-barsize) - var(--ghs-unit) * 38 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] ghs-scenario[_ngcontent-%COMP%]{height:100%}footer[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] ghs-level[_ngcontent-%COMP%]{height:100%;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] .attack-modifier-spacer[_ngcontent-%COMP%]{display:none}footer.compact[_ngcontent-%COMP%] .monster-deck[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * 12.5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] .ally-deck[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * 26 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] ghs-scenario-rules[_ngcontent-%COMP%]{width:100%}footer.compact[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{--ghs-text-factor: 1.6;max-width:initial;flex-grow:1;max-width:calc(100% - var(--ghs-unit) * 12.5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] .flex-shrink[_ngcontent-%COMP%]{flex-basis:0}']})),a})();const dj=function(o){return{"random-item":o}};function hj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.randomItem(s)&&l.randomItemDialog(s))}),t._UZ(1,"ghs-loot",9),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(4,dj,e.randomItem(n))),t.xp6(1),t.Q6J("loot",n)("flipped",!0)("disableFlip",!0)}}function uj(o,a){if(1&o&&(t.TgZ(0,"div",6),t.YNc(1,hj,2,6,"div",7),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.lootCards)}}let _j=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"lootCards",[]),(0,_.Z)(this,"sorted",!1),this.character=e,this.dialogRef=i,this.dialog=s,this.character.lootCards&&this.character.lootCards.forEach(l=>this.lootCards.push(d.v.game.lootDeck.cards[l]))}sort(){this.sorted?(this.sorted=!1,this.lootCards=[],this.character.lootCards&&this.character.lootCards.forEach(e=>this.lootCards.push(d.v.game.lootDeck.cards[e]))):(this.sorted=!0,this.lootCards.sort((e,i)=>e.cardId-i.cardId))}randomItem(e){if(e.type==le.CG.random_item){const i=this.character.progress.equippedItems.find(s=>"loot-random-item"==s.marker);if(i)return d.v.itemManager.getItem(+i.name,i.edition,!0)}}randomItemDialog(e){const i=this.randomItem(e);i&&this.dialog.open(gg,{data:{item:i}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-loot-cards"]],decls:6,vars:2,consts:[[1,"loot-cards-dialog"],[1,"scroll-container"],[1,"menu"],[3,"click"],[3,"ghs-label"],["class","loot-cards",4,"ngIf"],[1,"loot-cards"],["class","loot-container",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"loot-container",3,"ngClass","click"],[3,"loot","flipped","disableFlip"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"a",3),t.NdJ("click",function(){return i.sort()}),t._UZ(4,"span",4),t.qZA()(),t.YNc(5,uj,2,1,"div",5),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("ghs-label",i.sorted?"character.lootCards.drawn":"character.lootCards.sort"),t.xp6(1),t.Q6J("ngIf",i.character.lootCards))},dependencies:[x.mk,x.sg,x.O5,jO,ie],styles:[".loot-cards-dialog[_ngcontent-%COMP%]{position:relative}.loot-cards-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap;max-width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor))}.loot-cards-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.loot-cards-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-evenly;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 57 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 38.25 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-container.random-item[_ngcontent-%COMP%]{cursor:pointer}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%;z-index:1}"]})),a})();const pj=function(o){return{active:o}};function fj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.selectColor(s))}),t.TgZ(1,"span",13),t._UZ(2,"img",14),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(2,pj,n==e.summonColor)),t.xp6(2),t.MGl("src","./assets/images/summons/",n,".png",t.LSH)}}function mj(o,a){if(1&o&&(t.ynx(0),t.YNc(1,fj,3,4,"span",11),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.summonColors)}}const BO=function(o){return{disabled:o}};function vj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",15),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.pickNumber(s+1))}),t.TgZ(1,"span",16),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(2,BO,e.summonNumber==n+1)),t.xp6(2),t.Oqu(n+1)}}function Cj(o,a){1&o&&t._UZ(0,"img",22)}function Mj(o,a){if(1&o&&t._UZ(0,"img",14),2&o){const n=t.oxw(2);t.MGl("src","./assets/images/summons/",n.summonColor,".png",t.LSH)}}function Oj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"("),t._UZ(2,"span",3),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","character.summon.level"),t.xp6(1),t.hij(" ",n.level,")")}}function Pj(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",23),t.TgZ(2,"span",24),t._UZ(3,"img",14),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.Q6J("src",n.thumbnailUrl?n.thumbnailUrl:"./assets/images/summons/thumbnail/"+n.edition+"-"+n.name+".png",t.LSH)}}function yj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",17),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addSummon(s))}),t.TgZ(1,"span",18)(2,"span",13),t.YNc(3,Cj,1,0,"img",19),t.YNc(4,Mj,1,1,"img",20),t.TgZ(5,"span",21),t._uU(6),t.qZA()()(),t.TgZ(7,"label"),t._UZ(8,"span",3),t.YNc(9,Oj,4,2,"span",6),t.qZA(),t.YNc(10,Pj,4,1,"ng-container",6),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(7,BO,!e.available(n))),t.xp6(3),t.Q6J("ngIf",n.special),t.xp6(1),t.Q6J("ngIf",!n.special),t.xp6(2),t.Oqu(e.summonNumber),t.xp6(2),t.Q6J("ghs-label","data.summon."+n.name),t.xp6(1),t.Q6J("ngIf",e.showLevel(n)),t.xp6(1),t.Q6J("ngIf",n.thumbnail&&!n.noThumbnail||n.thumbnailUrl)}}function bj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",25)(1,"span",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addCustomSummon())}),t.TgZ(2,"span",13),t._UZ(3,"img",14),t.TgZ(4,"span",21),t._uU(5),t.qZA()()(),t.TgZ(6,"input",26),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setSummonName(i))})("keyup",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setSummonName(i))}),t.qZA(),t.TgZ(7,"span",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addCustomSummon())}),t._UZ(8,"img",28),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(7,BO,n.customDisabled())),t.xp6(2),t.MGl("src","./assets/images/summons/",n.summonColor,".png",t.LSH),t.xp6(2),t.Oqu(n.summonNumber),t.xp6(1),t.Q6J("value",n.summonName)("ghs-label","summon.name")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngClass",t.VKq(9,BO,n.customDisabled()))}}const xj=function(){return[]};let wj=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"summonColors",Object.values(Ee.mp).filter(s=>s!=Ee.mp.custom&&s!=Ee.mp.fh)),(0,_.Z)(this,"summonColor",Ee.mp.blue),(0,_.Z)(this,"summonNumber",1),(0,_.Z)(this,"summonName",""),(0,_.Z)(this,"summonFilter",void 0),(0,_.Z)(this,"fhSummon",!1),this.character=e,this.dialogRef=i,this.summonFilter="";for(let s=2;s<9;s++)this.summonData().filter(l=>this.available(l,s))>this.summonData().filter(l=>this.available(l,s-1))&&(this.summonNumber=s);this.fhSummon="fh"===this.character.edition||-1!=d.v.editionExtensions(this.character.edition).indexOf("fh"),this.fhSummon=!1,this.fhSummon&&(this.summonColor=Ee.mp.fh)}pickNumber(e){this.summonNumber=e}selectColor(e){this.summonColor=e}available(e,i=this.summonNumber){return this.summonColor!=Ee.mp.custom&&0!=i&&this.character.summons.every(s=>s.dead||s.name!=e.name||(e.special?0!=s.number:s.number!=i)||(e.special?s.color!=Ee.mp.custom:s.color!=this.summonColor))&&(e.count||1)>this.character.summons.filter(s=>s.name==e.name&&s.cardId==e.cardId&&d.v.entityManager.isAlive(s)).length}customDisabled(){return this.character.summons.some(e=>d.v.entityManager.isAlive(e)&&e.name==this.summonName&&e.number==this.summonNumber&&e.color==this.summonColor)}showLevel(e){return this.summonData().some(i=>i.name==e.name&&i.cardId!=e.cardId)}summonData(){let e=[];if(e.push(...this.character.availableSummons.filter(i=>!i.level||i.level<=this.character.level)),this.character.progress&&this.character.progress.items)for(let i of this.character.progress.items){const s=d.v.itemManager.getItem(+i.name,i.edition,!0);s&&s.summon&&(s.summon.name||(s.summon.name=s.name),s.summon.count||(s.summon.count=1),e.push(s.summon))}return e.filter(i=>!this.summonFilter||i.cardId==this.summonFilter)}setSummonName(e){this.summonName=e.target.value}addCustomSummon(){d.v.stateManager.before("addCustomSummon","data.character."+this.character.name,""+this.summonNumber,this.summonColor);let e=new Ee.eU((0,Jw.Z)(),this.summonName,"",this.character.level,this.summonNumber,this.summonColor);e.state=Ee.HY.new,d.v.characterManager.addSummon(this.character,e),this.dialogRef.close(),d.v.stateManager.after()}addSummon(e){if(-1!=this.summonData().indexOf(e)){d.v.stateManager.before("addSummon","data.character."+this.character.name,"data.summon."+e.name);let i=new Ee.eU((0,Jw.Z)(),e.name,e.cardId,this.character.level,e.special?0:this.summonNumber,e.special?Ee.mp.custom:this.summonColor,e);i.state=e.special?Ee.HY.true:Ee.HY.new,i.init=!1,d.v.characterManager.addSummon(this.character,i),e.count&&this.character.summons.filter(s=>s.name==e.name&&s.cardId==e.cardId).length!=e.count?(this.summonFilter=e.cardId,this.summonNumber++,this.summonNumber>4&&(this.summonNumber=1)):this.dialogRef.close(),d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-summondialog"]],decls:14,vars:11,consts:[[1,"summon-dialog"],[1,"title"],[1,"icon",3,"src"],[3,"ghs-label"],[1,"container"],[1,"color-container"],[4,"ngIf"],["class","number-button",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"scroll-container","summons"],["class","summon",3,"ngClass","click",4,"ngFor","ngForOf"],["class","summon",4,"ngIf"],["class","summon-button",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"summon-button",3,"ngClass","click"],[1,"image"],[3,"src"],[1,"number-button",3,"ngClass","click"],[1,"number"],[1,"summon",3,"ngClass","click"],[1,"summon-button"],["src","./assets/images/summons/custom.png",4,"ngIf"],[3,"src",4,"ngIf"],[1,"summon-number"],["src","./assets/images/summons/custom.png"],[1,"spacer"],[1,"thumbnail"],[1,"summon"],["type","text",3,"value","ghs-label","ghs-label-attribute","change","keyup"],[1,"add-summon-button",3,"ngClass","click"],["src","./assets/images/plus.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"small"),t._UZ(3,"img",2),t._uU(4),t.qZA(),t._UZ(5,"span",3),t.qZA(),t.TgZ(6,"div",4)(7,"div",5),t.YNc(8,mj,2,1,"ng-container",6),t.YNc(9,vj,3,4,"span",7),t.ALo(10,"ghsRange"),t.qZA(),t.TgZ(11,"div",8),t.YNc(12,yj,11,9,"span",9),t.YNc(13,bj,9,11,"span",10),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",i.gameManager.characterManager.characterName(i.character)," "),t.xp6(1),t.Q6J("ghs-label","summon"),t.xp6(3),t.Q6J("ngIf",!i.fhSummon),t.xp6(1),t.Q6J("ngForOf",t.xi3(10,7,t.DdM(10,xj),8)),t.xp6(3),t.Q6J("ngForOf",i.summonData()),t.xp6(1),t.Q6J("ngIf",!i.summonFilter))},dependencies:[x.mk,x.sg,x.O5,ie,Ii],styles:[".title[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:0;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.title[_ngcontent-%COMP%] small[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summon-button.add-summon-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.add-summon-button[_ngcontent-%COMP%]{position:relative;border:none!important}.container[_ngcontent-%COMP%] .summon-button.add-summon-button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.add-summon-button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.container[_ngcontent-%COMP%] .summon-button.add-summon-button[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.add-summon-button[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));border-bottom-left-radius:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));z-index:1;opacity:.9}.container[_ngcontent-%COMP%] .summon-button.active[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.container[_ngcontent-%COMP%] .summon-button.disabled[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}.container[_ngcontent-%COMP%] .summon-button.disabled[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .add-summon-button.disabled[_ngcontent-%COMP%]:hover{border:none}.container[_ngcontent-%COMP%] .thumbnail[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .thumbnail[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));height:auto}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,calc(var(--ghs-unit) * 7.5 * var(--ghs-dialog-factor)));row-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]:hover{border:none}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:calc(var(--ghs-unit) * 50 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover .summon-button[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover .summon-button.disabled[_ngcontent-%COMP%]{pointer-events:none!important;border:none}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover label[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{margin:0;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);background-color:transparent;border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * 1);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon.disabled[_ngcontent-%COMP%]{pointer-events:none!important}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon.disabled[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]{opacity:.5}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon.disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray)}"]})),a})();function kj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0("),t._UZ(2,"span",3),t._uU(3,")"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.character."+n.character.name)}}function Tj(o,a){if(1&o&&(t.TgZ(0,"span",10),t._UZ(1,"img",11),t._uU(2),t.YNc(3,kj,4,1,"span",12),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",n.gameManager.characterManager.characterName(n.character)," "),t.xp6(1),t.Q6J("ngIf",n.character.title)}}function Zj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.objective.title,"")}}function Aj(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function Sj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t._UZ(2,"span",3),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label",n.objective.escort?"escort":"objective")}}function Ej(o,a){if(1&o&&(t.TgZ(0,"span",10),t._UZ(1,"img",11),t.YNc(2,Zj,2,1,"span",12),t.YNc(3,Aj,1,1,"span",13),t.YNc(4,Sj,3,1,"span",12),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.objective.title),t.xp6(1),t.Q6J("ngIf",!n.objective.title),t.xp6(1),t.Q6J("ngIf",n.objective.title)}}function Dj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",7),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.pickNumber(s))}),t.TgZ(1,"span",8),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(2),t.Oqu(n)}}const Ij=function(o){return{active:o}};function Nj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.longRest())}),t._UZ(1,"img",15)(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,Ij,n.character.longRest)),t.xp6(2),t.Q6J("ghs-label","game.figure.longRest"+(n.character.longRest?"Off":""))}}const Jj=function(){return[1,2,3,4,5,6,7,8,9]};let zO=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"value","__"),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"objective",void 0),this.figure=e,this.dialogRef=i,this.figure instanceof oe.z?this.character=this.figure:(this.figure instanceof qe.CH||this.figure instanceof Nn.k)&&(this.objective=this.figure),i.closed.subscribe({next:()=>{-1!=this.value.indexOf("_")&&!isNaN(+this.value.replace("_",""))&&this.updateInitiative(+this.value.replace("_",""))}})}onKeyPress(e){e.key in["0","1","2","3","4","5","6","7","8","9"]&&(this.pickNumber(+e.key),e.preventDefault(),e.stopPropagation())}pickNumber(e){this.value=(this.value+""+e).substring(1,3),-1==this.value.indexOf("_")&&(this.updateInitiative(+this.value),this.dialogRef.close())}updateInitiative(e){this.figure.initiative!=e&&(d.v.stateManager.before("setInitiative",(this.character?"data.character.":"data.objective.")+this.figure.name,""+(e>0&&e<100?e:0)),e>0&&e<100?this.setInitiative(e):d.v.game.state==ge.D2.draw&&(this.figure.initiative=0),d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after())}setInitiative(e){((d.v.game.state==ge.D2.draw||!R.r.settings.initiativeRequired)&&e>=0||e>0)&&e<100&&e!=this.figure.initiative&&(this.figure.initiative=e,this.character&&(this.character.initiativeVisible=!0))}longRest(){this.character&&(this.character.longRest&&99==this.character.initiative?(d.v.stateManager.before("setInitiative","data.character."+this.figure.name,"99"),this.character.longRest=!1,d.v.stateManager.after()):(d.v.stateManager.before("characterLongRest","data.character."+this.character.name),99==this.character.initiative?this.character.longRest=!0:(this.setInitiative(99),this.character.longRest=!0,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character)),d.v.stateManager.after()),this.dialogRef.close())}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-initiative-dialog"]],hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(l){return i.onKeyPress(l)},!1,t.evT)},decls:17,vars:7,consts:[[1,"initiative-dialog"],[1,"title"],["class","character",4,"ngIf"],[3,"ghs-label"],[1,"number-container"],[1,"value"],["class","number-button",3,"click",4,"ngFor","ngForOf"],[1,"number-button",3,"click"],[1,"number"],["class","long-rest-button",3,"ngClass","click",4,"ngIf"],[1,"character"],[1,"icon",3,"src"],[4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"long-rest-button",3,"ngClass","click"],["src","./assets/images/long-rest.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,Tj,4,3,"span",2),t.YNc(3,Ej,5,4,"span",2),t._UZ(4,"span",3),t.qZA(),t.TgZ(5,"div",4),t._UZ(6,"span"),t.TgZ(7,"span",5),t._uU(8),t.qZA(),t._UZ(9,"span"),t.YNc(10,Dj,3,1,"span",6),t._UZ(11,"span"),t.TgZ(12,"span",7),t.NdJ("click",function(){return i.pickNumber(0)}),t.TgZ(13,"span",8),t._uU(14,"0"),t.qZA()(),t._UZ(15,"span"),t.qZA(),t.YNc(16,Nj,3,4,"span",9),t.qZA()),2&e&&(t.xp6(2),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.objective),t.xp6(1),t.Q6J("ghs-label","game.figure.setInitiative"),t.xp6(4),t.Oqu(i.value),t.xp6(2),t.Q6J("ngForOf",t.DdM(6,Jj)),t.xp6(6),t.Q6J("ngIf",i.character))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".initiative-dialog[_ngcontent-%COMP%]{position:relative}.initiative-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.initiative-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)))}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}"]})),a})();function Uj(o,a){1&o&&(t.TgZ(0,"div",6)(1,"div",7),t._UZ(2,"span",8),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","game.items.empty"))}const Lj=function(o){return{spent:o}};function Qj(o,a){if(1&o&&t._UZ(0,"ghs-character-item",10),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("character",e.character)("item",n)("setup",e.setup)("ngClass",t.VKq(4,Lj,!e.setup&&e.countFlag(n,e.ItemFlags.spent)))}}function Rj(o,a){if(1&o&&(t.TgZ(0,"div",6),t.YNc(1,Qj,1,6,"ghs-character-item",9),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.items)}}const Fj=function(o,a){return{fh:o,modern:a}},qj=function(o,a){return[o,a]};let Hj=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"items",void 0),(0,_.Z)(this,"ItemFlags",Ni.CT),(0,_.Z)(this,"GameState",ge.D2),this.character=e,this.dialogRef=i,this.dialog=s,this.setup=d.v.game.state==ge.D2.draw&&d.v.roundManager.firstRound,this.items=this.character.progress.items.map(l=>d.v.itemManager.getItem(+l.name,l.edition,!0)).filter(l=>l).map(l=>l).sort((l,m)=>{if(!this.setup){if(this.equipped(l)&&!this.equipped(m))return-1;if(this.equipped(m)&&!this.equipped(l))return 1}return l.slot&&!m.slot?-1:m.slot&&!l.slot?1:l.slot&&m.slot?Object.values(Ni.SE).indexOf(l.slot)-Object.values(Ni.SE).indexOf(m.slot):0})}equipped(e){return this.character.progress.equippedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}countFlag(e,i){const s=this.equipped(e);return s&&s.tags&&s.tags.filter(l=>l==i).length||0}openShop(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character,affordable:!0}}),this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-items-character-dialog"]],decls:7,vars:12,consts:[[1,"items-dialog",3,"ngClass"],[1,"scroll-container"],[1,"header"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"shop",3,"ghs-label","click"],["class","item-list",4,"ngIf"],[1,"item-list"],[1,"empty"],[3,"ghs-label"],[3,"character","item","setup","ngClass",4,"ngFor","ngForOf"],[3,"character","item","setup","ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"span",3),t.TgZ(4,"a",4),t.NdJ("click",function(){return i.openShop()}),t.qZA()(),t.YNc(5,Uj,3,1,"div",5),t.YNc(6,Rj,2,1,"div",5),t.qZA()()),2&e&&(t.Q6J("ngClass",t.WLB(6,Fj,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ghs-label","game.items.character")("ghs-label-args",t.WLB(9,qj,i.character.name,i.gameManager.characterManager.characterName(i.character))),t.xp6(1),t.Q6J("ghs-label","game.items.character.shop"),t.xp6(1),t.Q6J("ngIf",0==i.items.length),t.xp6(1),t.Q6J("ngIf",i.items.length>0))},dependencies:[x.mk,x.sg,x.O5,kw,ie],styles:[".items-dialog[_ngcontent-%COMP%]{position:relative}.items-dialog[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{overflow-x:hidden;max-height:calc(90vh - var(--ghs-unit) * 6)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%]:hover{opacity:.7}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] ghs-character-item[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor));transition:all .5s ease-in-out}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] ghs-character-item.spent[_ngcontent-%COMP%]{transform:rotate(90deg);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 7.25 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.items-dialog.fh[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.items-dialog.modern[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}"]})),a})();function jj(o,a){if(1&o&&t._UZ(0,"img",24),2&o){const n=t.oxw(2);t.Q6J("src",n.gameManager.monsterManager.monsterThumbnail(n.monster),t.LSH)}}function Bj(o,a){1&o&&(t.TgZ(0,"span",25),t._UZ(1,"span",20),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function zj(o,a){1&o&&(t.TgZ(0,"span",26),t._UZ(1,"span",20),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function Gj(o,a){if(1&o&&t._UZ(0,"span",27),2&o){const n=t.oxw(2);t.Q6J("ghs-label","(%game.monsterType."+n.data.type+"%)")}}function Vj(o,a){if(1&o&&(t.TgZ(0,"div",18),t.YNc(1,jj,1,1,"img",19),t._UZ(2,"span",20),t._uU(3,"\xa0 "),t.YNc(4,Bj,3,1,"span",21),t.YNc(5,zj,3,1,"span",22),t.YNc(6,Gj,1,1,"span",23),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",!n.monster.noThumbnail&&!n.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.monster.name),t.xp6(2),t.Q6J("ngIf",n.monster.isAlly),t.xp6(1),t.Q6J("ngIf",n.monster.isAllied),t.xp6(1),t.Q6J("ngIf",n.data.type)}}function Yj(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",28),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(2),t.Oqu(n.gameManager.characterManager.characterName(n.character,!0))}}const TT=function(o){return{inactive:o}};function Kj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEntity(i))}),t._uU(1),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Gre("entity ",e.gameManager.toMonsterEntity(n).type,""),t.Q6J("ngClass",t.VKq(5,TT,-1==e.entities.indexOf(n))),t.xp6(1),t.Oqu(n.number)}}function $j(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Wj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Oqu(e.gameManager.toSummon(n).number)}}const Xj=function(o,a,n){return{active:o,new:a,center:n}};function t9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",32),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEntity(i))}),t.TgZ(1,"span",33),t._UZ(2,"img",34),t.TgZ(3,"span",35),t.YNc(4,$j,2,0,"span",36),t.YNc(5,Wj,2,1,"span",36),t.qZA()()()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(5,TT,-1==e.entities.indexOf(n))),t.xp6(1),t.Q6J("ngClass",t.kEZ(7,Xj,e.gameManager.toSummon(n).state==e.SummonState.true,e.gameManager.toSummon(n).state==e.SummonState.new,e.gameManager.toSummon(n).entityConditions.length%2==0)),t.xp6(1),t.MGl("src","./assets/images/summons/",e.gameManager.toSummon(n).color,".png",t.LSH),t.xp6(2),t.Q6J("ngIf",0==e.gameManager.toSummon(n).number),t.xp6(1),t.Q6J("ngIf",e.gameManager.toSummon(n).number>0)}}function e9(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Kj,2,7,"div",29),t.YNc(2,t9,6,11,"div",30),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.monster),t.xp6(1),t.Q6J("ngIf",n.character)}}function n9(o,a){if(1&o&&t._UZ(0,"ghs-conditions",37),2&o){const n=t.oxw();t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entities",n.entities)("figure",n.monster)("type","monster")("columns",4)}}function i9(o,a){if(1&o&&t._UZ(0,"ghs-conditions",37),2&o){const n=t.oxw();t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entities",n.entities)("figure",n.character)("type","monster")("columns",4)}}function o9(o,a){if(1&o&&t._UZ(0,"ghs-conditions",37),2&o){const n=t.oxw();t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entities",n.entities)("figure",n.objective)("type","character")("columns",4)}}function a9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",38),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleType())}),t._UZ(1,"span",20)(2,"img",39)(3,"span",20),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.monsterType.normal%"),t.xp6(2),t.Q6J("ghs-label","%game.monsterType.elite%"))}const ZT=function(o,a){return{"negative-value":o,"positive-value":a}};let Bw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"health",0),(0,_.Z)(this,"maxHealth",0),(0,_.Z)(this,"ConditionName",re.fT),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"entities",void 0),(0,_.Z)(this,"allEntities",[]),(0,_.Z)(this,"entityConditions",[]),(0,_.Z)(this,"initialImmunities",[]),(0,_.Z)(this,"entityImmunities",[]),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"EntityValueFunction",ae.j9),this.data=e,this.dialogRef=i,this.data.monster?(this.monster=this.data.monster,this.allEntities=this.monster.entities.filter(s=>!e.type||s.type==e.type)):this.data.character?(this.character=this.data.character,this.allEntities=this.character.summons):this.data.objective&&(this.objective=this.data.objective,this.allEntities=this.objective.entities),this.dialogRef.closed.subscribe({next:s=>{s||this.close()}}),this.entities=[],this.allEntities.forEach(s=>this.entities.push(s)),this.update()}update(){this.entityConditions=[],this.entities.forEach((e,i,s)=>{e.entityConditions.forEach(l=>{!this.entityConditions.find(m=>m.name==l.name)&&s.every(m=>m.entityConditions.find(O=>O.name==l.name&&O.state==l.state))&&this.entityConditions.push(JSON.parse(JSON.stringify(l)))}),e.immunities.forEach(l=>{!this.entityImmunities.find(m=>m==l)&&s.every(m=>m.immunities.find(O=>O==l))&&(this.entityImmunities.push(l),this.initialImmunities.push(l))})})}toggleEntity(e){-1==this.entities.indexOf(e)?this.entities.push(e):this.entities.splice(this.entities.indexOf(e),1),this.update()}changeHealth(e){this.health+=e}changeMaxHealth(e){this.maxHealth+=e}toggleType(){if(this.monster){const e=this.monster.stats.find(s=>this.monster&&s.level==this.monster.level&&s.type==ee.M.normal),i=this.monster.stats.find(s=>this.monster&&s.level==this.monster.level&&s.type==ee.M.elite);e&&i?(d.v.stateManager.before("toggleTypeAll","monster."+this.monster.name),this.entities.forEach(s=>{this.monster&&d.v.entityManager.isAlive(s)&&s instanceof In.g&&(s.type=s.type==ee.M.elite?ee.M.normal:ee.M.elite,s.maxHealth=(0,ae.j9)(s.type==ee.M.normal?e.health:i.health,this.monster.level),(s.health>s.maxHealth||s.health{e.dead=!0}),setTimeout(()=>{this.entities.forEach(e=>{(d.v.game.state==ge.D2.draw||0==e.entityConditions.length||e.entityConditions.every(i=>-1==i.types.indexOf(re.CP.turn)&&-1==i.types.indexOf(re.CP.apply)))&&(this.monster&&e instanceof In.g?d.v.monsterManager.removeMonsterEntity(this.monster,e):this.character&&e instanceof Ee.eU?d.v.characterManager.removeSummon(this.character,e):this.objective&&e instanceof oa.W&&d.v.objectiveManager.removeObjectiveEntity(this.objective,e))}),this.entities.every(e=>!d.v.entityManager.isAlive(e))&&this.monster&&this.monster.active&&d.v.roundManager.toggleFigure(this.monster),d.v.stateManager.after(),d.v.uiChange.emit()},R.r.settings.disableAnimations?0:1500),this.dialogRef.close(!0)}close(){if(this.entityConditions.filter(e=>e.state==re.tT.new||e.state==re.tT.removed).forEach(e=>{this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,e.state==re.tT.removed?"removeCondition":"addCondition"),e.name,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,e.state==re.tT.removed?"removeConditionSummons":"addConditionSummons"),e.name):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,e.state==re.tT.removed?"removeConditionObjectives":"addConditionObjectives"),e.name),this.entities.forEach(i=>{e.expired=e.state==re.tT.new,e.state==re.tT.removed?d.v.entityManager.removeCondition(i,e,e.permanent):this.monster&&!d.v.entityManager.isImmune(i,this.monster,e.name)?d.v.entityManager.addCondition(i,e,this.monster.active,this.monster.off,e.permanent):this.character?d.v.entityManager.addCondition(i,e,i.active,this.character.off,e.permanent):this.objective&&d.v.entityManager.addCondition(i,e,i.active,this.objective.off,e.permanent)}),d.v.stateManager.after()}),this.entityConditions.forEach(e=>{this.entities.find(i=>i.entityConditions.find(s=>s.name==e.name&&!s.expired&&s.value!=e.value))&&(this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,"setConditionValue"),e.name,""+e.value,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,"setConditionValueSummons"),e.name,""+e.value):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,"setConditionValueObjectives"),e.name,""+e.value),this.entities.forEach(i=>{const s=i.entityConditions.find(l=>l.name==e.name&&!l.expired);s&&s.value!=e.value&&(s.value=e.value)}),d.v.stateManager.after())}),this.initialImmunities.forEach(e=>{-1==this.entityImmunities.indexOf(e)&&(this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,"removeImmunity"),e,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,"removeImmunitySummon"),e):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,"removeImmunityObjectives"),e),this.entities.forEach(i=>{i.immunities=i.immunities.filter(s=>s!=e)}),d.v.stateManager.after())}),this.entityImmunities.forEach(e=>{-1==this.initialImmunities.indexOf(e)&&(this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,"setImmunity"),e,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,"setImmunitySummon"),e):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,"setImmunityObjectives"),e),this.entities.forEach(i=>{i.immunities.push(e)}),d.v.stateManager.after())}),0!=this.health){this.monster?d.v.stateManager.before("changeMonsterHP","monster."+this.monster.name,(0,he.uZ)(this.health),this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before("changeSummonsHP","character."+this.character.name,(0,he.uZ)(this.health)):this.objective&&d.v.stateManager.before("changeObjectivesHP",this.objective.title||"data.objective."+this.objective.name,(0,he.uZ)(this.health));let e=[];this.entities.forEach(i=>{0!=this.health&&(this.monster?d.v.entityManager.changeHealth(i,this.monster,this.health):this.character?d.v.entityManager.changeHealth(i,this.character,this.health):this.objective&&d.v.entityManager.changeHealth(i,this.objective,this.health)),(i.maxHealth>0&&i.health<=0||i.dead)&&(i.dead=0==i.entityConditions.length||i.entityConditions.every(s=>!s.highlight||-1==s.types.indexOf(re.CP.turn)&&-1==s.types.indexOf(re.CP.apply)),e.push(i))}),this.health=0,e.length>0?setTimeout(()=>{e.forEach(i=>{i.dead&&(this.monster&&i instanceof In.g?d.v.monsterManager.removeMonsterEntity(this.monster,i):this.character&&i instanceof Ee.eU?d.v.characterManager.removeSummon(this.character,i):this.objective&&i instanceof oa.W&&d.v.objectiveManager.removeObjectiveEntity(this.objective,i))}),this.entities.every(i=>!d.v.entityManager.isAlive(i))&&(this.monster&&this.monster.active&&d.v.roundManager.toggleFigure(this.monster),this.objective&&d.v.objectiveManager.removeObjective(this.objective)),this.objective&&0==this.objective.entities.length&&d.v.objectiveManager.removeObjective(this.objective),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500):d.v.stateManager.after()}0!=this.maxHealth&&(this.monster?d.v.stateManager.before("changeMonsterMaxHP","monster."+this.monster.name,(0,he.uZ)(this.health),this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before("changeSummonsMaxHP","character."+this.character.name,(0,he.uZ)(this.health)):this.objective&&(d.v.stateManager.before("changeObjectivesMaxHP",this.objective.title||"data.objective."+this.objective.name,(0,he.uZ)(this.health)),this.objective.health=(0,he.uZ)(this.health)),this.entities.forEach(e=>{e.health==e.maxHealth&&(e.health+=this.maxHealth),e.maxHealth+=this.maxHealth,e.health>e.maxHealth&&(e.health=e.maxHealth)}),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-entities-menu-dialog"]],decls:34,vars:31,consts:[[1,"entity-menu-dialog"],["class","name",4,"ngIf"],[1,"entities"],[4,"ngFor","ngForOf"],[1,"entity-container"],[1,"item"],[1,"button",3,"repeat","singleClick"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/health.svg"],[1,"badge","health-count",3,"ngClass"],["src","./assets/images/plus.svg",1,"ghs-svg"],[3,"entityConditions","immunities","entities","figure","type","columns",4,"ngIf"],[1,"button",3,"click"],["src","./assets/images/status/dead.svg"],[1,"item","max-health-container"],["src","./assets/images/status/health.svg",3,"ghs-label","ghs-label-attribute"],["class","toggle-type",3,"click",4,"ngIf"],[1,"name"],["class","standee",3,"src",4,"ngIf"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","monster-type",3,"ghs-label",4,"ngIf"],[1,"standee",3,"src"],[1,"ally"],[1,"allied"],[1,"monster-type",3,"ghs-label"],[1,"icon","character-icon",3,"src"],[3,"class","ngClass","click",4,"ngIf"],["class","entity",3,"ngClass","click",4,"ngIf"],[3,"ngClass","click"],[1,"entity",3,"ngClass","click"],[1,"summon-image",3,"ngClass"],[3,"src"],[1,"summon-number"],[4,"ngIf"],[3,"entityConditions","immunities","entities","figure","type","columns"],[1,"toggle-type",3,"click"],["src","./assets/images/switch.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Vj,7,5,"div",1),t.YNc(2,Yj,4,2,"span",1),t.TgZ(3,"div",2),t.YNc(4,e9,3,2,"ng-container",3),t.qZA(),t.TgZ(5,"div",4)(6,"span",5)(7,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeHealth(-1)}),t._UZ(8,"img",7),t.qZA()(),t.TgZ(9,"span",8),t._UZ(10,"img",9),t.TgZ(11,"span",10),t._uU(12),t.ALo(13,"ghsValueSign"),t.qZA()(),t.TgZ(14,"span",5)(15,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeHealth(1)}),t._UZ(16,"img",11),t.qZA()()(),t.YNc(17,n9,1,6,"ghs-conditions",12),t.YNc(18,i9,1,6,"ghs-conditions",12),t.YNc(19,o9,1,6,"ghs-conditions",12),t.TgZ(20,"div",4)(21,"span",8)(22,"a",13),t.NdJ("click",function(){return i.toggleDead()}),t._UZ(23,"img",14),t.qZA()(),t.TgZ(24,"span",15)(25,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeMaxHealth(-1)}),t._UZ(26,"img",7),t.qZA(),t._UZ(27,"img",16),t.TgZ(28,"span",10),t._uU(29),t.ALo(30,"ghsValueSign"),t.qZA(),t.TgZ(31,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeMaxHealth(1)}),t._UZ(32,"img",11),t.qZA()()(),t.YNc(33,a9,4,2,"span",17),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.monster),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(2),t.Q6J("ngForOf",i.allEntities),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(25,ZT,i.health<0,i.health>0)),t.xp6(1),t.Oqu(t.lcZ(13,21,i.health)),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngIf",i.monster),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.objective&&i.objective.escort),t.xp6(2),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"),t.xp6(4),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.maxHealth")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngClass",t.WLB(28,ZT,i.maxHealth<0,i.maxHealth>0)),t.xp6(1),t.Oqu(t.lcZ(30,23,i.maxHealth)),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngIf",i.monster))},dependencies:[x.mk,x.sg,x.O5,zu,ie,An,Kd],styles:['.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.standee[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top-left-radius:30%;border-top-right-radius:30%;height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor)) auto;max-width:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]{position:relative;cursor:pointer;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-radius:100%;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.normal[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.inactive[_ngcontent-%COMP%]{filter:none;opacity:.7;border-color:transparent}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]:hover{filter:none;opacity:.7;border-color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);transition:top .5s ease-out,left .5s ease-out}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image.new[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);background-image:url(minus.97c98a810771fceb.svg);background-size:cover;z-index:2}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:calc(var(--ghs-unit) * -.1);height:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 2);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4);border-bottom-left-radius:calc(var(--ghs-unit) * 4);z-index:3;opacity:.9}.entity-menu-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));align-content:space-between}.entity-menu-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-evenly;grid-column:2 span;width:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.entity-menu-dialog[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%]:hover, .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]:hover{opacity:.4}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.entity-menu-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline);text-align:center}.toggle-type[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}']})),a})();const s9=["drawCard"];function r9(o,a){if(1&o&&(t.TgZ(0,"div",3),t._UZ(1,"ghs-attackmodifier",4),t.qZA()),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.xp6(1),t.Q6J("attackModifier",e)("numeration",s.numeration)("characterIcon",s.characterIcon)("flipped",i==s.current)("newStyle",s.newStyle)}}function c9(o,a){if(1&o&&(t.ynx(0),t.YNc(1,r9,2,5,"div",2),t.BQk()),2&o){const n=a.index,e=t.oxw();t.xp6(1),t.Q6J("ngIf",n==e.current)}}const l9=function(o){return{character:o}};let g9=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"drawingEmitter",new t.vpe),(0,_.Z)(this,"initTimeout",1500),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"characterIcon",""),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"drawTimeout",null),(0,_.Z)(this,"queue",0),(0,_.Z)(this,"queueTimeout",null),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"drawCard",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.element.nativeElement.addEventListener("click",i=>{let s=document.elementsFromPoint(i.clientX,i.clientY);s[0].classList.contains("attack-modifiers")&&s.length>2&&s[2].click()})}ngOnInit(){this.character&&(this.deck=this.character.attackModifierDeck,this.characterIcon=this.character.iconUrl,this.numeration=""+this.character.number,this.newStyle=d.v.newAmStyle(this.character.edition)),R.r.settings.fhStyle&&(this.newStyle=!0),this.current=this.deck.current,this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){e.deck&&this.update()}update(){this.character&&this.deck!=this.character.attackModifierDeck&&(this.deck=this.character.attackModifierDeck),this.current{this.drawing=!1,this.drawingEmitter.emit(!1),this.queueTimeout=null,this.queue>0?(this.queue--,this.current++,this.drawQueue()):(this.element.nativeElement.getElementsByClassName("attack-modifier-draw")[0].classList.remove("drawing"),this.queue<0&&(this.queue=0))},R.r.settings.disableAnimations?0:2500)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-draw"]],viewQuery:function(e,i){if(1&e&&t.Gf(s9,5),2&e){let s;t.iGM(s=t.CRH())&&(i.drawCard=s.first)}},inputs:{character:"character",initTimeout:"initTimeout"},outputs:{drawingEmitter:"drawing"},features:[t.TTD],decls:2,vars:4,consts:[[1,"attack-modifier-draw",3,"ngClass"],[4,"ngFor","ngForOf"],["class","am-container",4,"ngIf"],[1,"am-container"],[1,"am",3,"attackModifier","numeration","characterIcon","flipped","newStyle"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,c9,2,1,"ng-container",1),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(2,l9,i.character)),t.xp6(1),t.Q6J("ngForOf",i.deck.cards))},dependencies:[x.mk,x.sg,x.O5,JO],styles:[".attack-modifier-draw[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;overflow:visible}.attack-modifier-draw[_ngcontent-%COMP%] .am-container[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;left:0;transition:filter 1s ease-in-out;transform:scale(0)}.attack-modifier-draw[_ngcontent-%COMP%] .am-container[_ngcontent-%COMP%] .am[_ngcontent-%COMP%]{display:block;position:absolute;inset:0}@keyframes _ngcontent-%COMP%_attackmodifier-draw{0%{transform:scale(0) translate(-152%,-16.5%)}35%,70%{transform:scale(1) translate(-50%,-50%)}to{transform:scale(0) translate(0)}}.attack-modifier-draw.drawing[_ngcontent-%COMP%] .am-container[_ngcontent-%COMP%]{cursor:wait!important;animation:_ngcontent-%COMP%_attackmodifier-draw 2.5s ease-in-out;animation-iteration-count:1;transform-origin:top left}"]})),a})();function d9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",10),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.declineApplyCondition(s.name,i))}),t._UZ(1,"img",11),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("conditionHighlight",n)}}function h9(o,a){if(1&o&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.value)}}function u9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",13),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.applyCondition(s.name,i,!0))}),t._UZ(1,"img",6),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("conditionHighlight",n),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/attackmodifier/icons/double.png",t.LSH)}}function _9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",14),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.applyCondition(s.name,i))}),t._UZ(1,"img",15),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("conditionHighlight",n)}}const p9=function(o,a){return{apply:o,double:a}};function f9(o,a){if(1&o&&(t.TgZ(0,"span",3),t.YNc(1,d9,2,1,"a",4),t.TgZ(2,"span",5),t._UZ(3,"img",6),t.YNc(4,h9,2,1,"span",7),t.qZA(),t.YNc(5,u9,2,2,"a",8),t.YNc(6,_9,2,1,"a",9),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("conditionHighlight",n)("ngClass",t.WLB(7,p9,e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply),-1!=n.types.indexOf(e.ConditionType.double))),t.xp6(1),t.Q6J("ngIf",e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply)),t.xp6(2),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(e.ConditionType.value)),t.xp6(1),t.Q6J("ngIf",e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply)&&-1!=n.types.indexOf(e.ConditionType.double)),t.xp6(1),t.Q6J("ngIf",e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply))}}function m9(o,a){if(1&o&&(t.TgZ(0,"div",1),t.YNc(1,f9,7,10,"span",2),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.gameManager.entityManager.highlightedConditions(n.entity))}}let s_=(()=>{var o;class a{constructor(){(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ConditionType",re.CP)}applyCondition(e,i,s=!1){i.stopPropagation(),d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.figure,"applyCondition"),e),d.v.entityManager.applyCondition(this.entity,this.figure,e),s&&d.v.entityManager.applyCondition(this.entity,this.figure,e),this.after()}declineApplyCondition(e,i){i.stopPropagation(),d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.figure,"declineApplyCondition"),e),d.v.entityManager.declineApplyCondition(this.entity,this.figure,e),this.after()}after(){d.v.entityManager.checkHealth(this.entity,this.figure),this.figure instanceof Ze.Q&&this.entity instanceof In.g&&this.entity.dead&&(0==this.entity.entityConditions.length||this.entity.entityConditions.every(e=>!e.highlight||-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))?setTimeout(()=>{this.figure instanceof Ze.Q&&this.entity instanceof In.g&&(d.v.monsterManager.removeMonsterEntity(this.figure,this.entity),this.figure.entities.every(e=>!d.v.entityManager.isAlive(e))&&this.figure.active&&d.v.roundManager.toggleFigure(this.figure)),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500):d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-highlight-conditions"]],inputs:{entity:"entity",figure:"figure"},decls:1,vars:1,consts:[["class","highlight-conditions",4,"ngIf"],[1,"highlight-conditions"],["class","condition",3,"conditionHighlight","ngClass",4,"ngFor","ngForOf"],[1,"condition",3,"conditionHighlight","ngClass"],["class","close","ghs-pointer-input","",3,"conditionHighlight","singleClick",4,"ngIf"],[1,"condition-image"],[3,"src"],["class","value",4,"ngIf"],["class","double","ghs-pointer-input","",3,"conditionHighlight","singleClick",4,"ngIf"],["class","check","ghs-pointer-input","",3,"conditionHighlight","singleClick",4,"ngIf"],["ghs-pointer-input","",1,"close",3,"conditionHighlight","singleClick"],["src","./assets/images/close_dialog.svg",1,"ghs-svg"],[1,"value"],["ghs-pointer-input","",1,"double",3,"conditionHighlight","singleClick"],["ghs-pointer-input","",1,"check",3,"conditionHighlight","singleClick"],["src","./assets/images/check.svg",1,"ghs-svg"]],template:function(e,i){1&e&&t.YNc(0,m9,2,1,"div",0),2&e&&t.Q6J("ngIf",i.gameManager.entityManager.highlightedConditions(i.entity).length>0)},dependencies:function(){return[x.mk,x.sg,x.O5,v9,An]},styles:['.highlight-conditions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;transform:scale(0);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}@keyframes _ngcontent-%COMP%_condition-highlight{0%{transform:scale(0) translateY(0)}25%,60%{transform:scale(1) translateY(-70%)}to{transform:scale(0) translateY(0)}}.highlight-conditions[_ngcontent-%COMP%] .condition.animation[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_condition-highlight 1s ease-in-out}.highlight-conditions[_ngcontent-%COMP%] .condition.apply[_ngcontent-%COMP%]{transform:scale(1)}.highlight-conditions[_ngcontent-%COMP%] .condition.apply[_ngcontent-%COMP%]:not(.animation):before{content:" ";position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));bottom:0;left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:30%;opacity:.5}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{position:relative;z-index:1}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));width:auto}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:none;transform:translate(-50%)}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:auto;z-index:2;margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close.animation[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check.animation[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double.animation[_ngcontent-%COMP%]{animation:hide-animation .95s ease-in-out}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover, .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]:hover, .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%]:hover{transition:all .1s;transform:scale(1.2)}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -7 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 4.7 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow);margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-shadow);margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition.double[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition.double[_ngcontent-%COMP%]:not(.animation):before{top:calc(var(--ghs-unit) * -5.5 * var(--ghs-text-factor))}']})),a})(),v9=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"condition",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.condition.highlight&&(!R.r.settings.applyConditions||!R.r.settings.activeApplyConditions||-1!=R.r.settings.activeApplyConditionsExcludes.indexOf(this.condition.name))&&this.playAnimation()}}),this.playAnimation()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}playAnimation(){this.el.nativeElement.classList.add("animation"),setTimeout(()=>{this.el.nativeElement.classList.remove("animation"),(-1!=this.condition.types.indexOf(re.CP.turn)||!R.r.settings.applyConditions||!R.r.settings.activeApplyConditions||-1!=R.r.settings.activeApplyConditionsExcludes.indexOf(this.condition.name))&&(this.condition.highlight=!1,d.v.stateManager.saveLocal())},R.r.settings.disableAnimations?0:1100)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","conditionHighlight",""]],inputs:{condition:["conditionHighlight","condition"]}})),a})();const C9=function(o){return{critical:o}};let GO=(()=>{var o;class a{constructor(){(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"diff",0)}maxHealth(){return(0,ae.j9)(this.entity.maxHealth)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-healthbar"]],inputs:{entity:"entity",diff:"diff"},decls:2,vars:5,consts:[[1,"health-bar",3,"ngClass"],[1,"health-bar-value"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"div",1),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(3,C9,(i.entity.health+i.diff)/i.maxHealth()<.35)),t.xp6(1),t.Udp("width",(i.entity.health+i.diff)/i.maxHealth()*100+"%"))},dependencies:[x.mk],styles:[".health-bar[_ngcontent-%COMP%]{width:100%;height:100%;border:none;background-color:transparent}.health-bar[_ngcontent-%COMP%] .health-bar-value[_ngcontent-%COMP%]{height:100%;max-width:1000%;transition:width .5s;background-color:var(--ghs-color-lightgreen)}.health-bar.critical[_ngcontent-%COMP%] .health-bar-value[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}"]})),a})();const M9=function(o,a,n,e,i){return{"active-border":o,disabled:a,off:n,"no-artwork":e,modern:i}};let AT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-image"]],inputs:{character:"character"},decls:3,vars:13,consts:[[1,"image-container",3,"ngClass","ghs-label","ghs-label-attribute"],[1,"image",3,"src"],[3,"entity"]],template:function(e,i){1&e&&(t.TgZ(0,"a",0),t._UZ(1,"img",1)(2,"ghs-healthbar",2),t.qZA()),2&e&&(t.Udp("--ghs-character-color",i.character.color),t.Q6J("ngClass",t.qbA(7,M9,i.character.active,i.character.absent,i.character.off||i.character.exhausted||i.character.health<=0,i.character.noThumbnail||i.settingsManager.settings.disableArtwork,"modern"==i.settingsManager.settings.theme))("ghs-label",i.gameManager.game.state==i.GameState.next?i.character.active?"game.figure.endTurn":"game.figure.startTurn":"game.figure.setInitiative")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",i.character.noThumbnail||i.settingsManager.settings.disableArtwork?i.character.iconUrl:i.characterManager.characterThumbnail(i.character),t.LSH),t.xp6(1),t.Q6J("entity",i.character))},dependencies:[x.mk,GO,ie],styles:[".image-container[_ngcontent-%COMP%]{position:relative;display:block;width:100%;height:100%;cursor:pointer;border-radius:calc(var(--ghs-unit) * 1);overflow:hidden;transition:box-shadow .1s ease-in-out}.image-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.image-container[_ngcontent-%COMP%]:not(.active-border){border:calc(var(--ghs-unit) * .01) solid transparent;box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.image-container.no-artwork[_ngcontent-%COMP%]{background-color:var(--ghs-color-darkgray);border-color:var(--ghs-character-color)}.image-container[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{width:auto;height:100%}.image-container[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;height:5%;left:0}.image-container.off[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{filter:grayscale(.7)}.image-container.modern[_ngcontent-%COMP%]{border-radius:0;-webkit-mask:url(char-image-mask.be960a101527d144.png);mask:url(char-image-mask.be960a101527d144.png);-webkit-mask-size:100% 100%;mask-size:100% 100%}.image-container.modern.active-border[_ngcontent-%COMP%]{border:none!important;box-shadow:none}.number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 8))}.number-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 7);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 7);cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}"]})),a})();const O9=["initativeInput"];function P9(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"??"),t.qZA())}function y9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",6),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.longRestOff(i))}),t.qZA()}2&o&&t.Q6J("ghs-label","game.figure.longRestOff")("ghs-label-attribute","title")}const b9=function(o){return{empty:o}},x9=function(o){return{hidden:o}};let VO=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"initiativeInput",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"objectiveContainer",void 0),this.dialog=e,this.overlay=i,this.elementRef=s}ngOnInit(){this.figure instanceof oe.z?this.character=this.figure:this.figure instanceof qe.CH?this.objective=this.figure:this.figure instanceof Nn.k&&(this.objectiveContainer=this.figure)}ngAfterViewInit(){this.initiativeInput&&this.initiativeInput.nativeElement.addEventListener("keydown",e=>{if("Tab"===e.key&&d.v.game.state==ge.D2.draw){const i=this.tabindex();let s=e.shiftKey?i-1:i+1,l=document.getElementById("initiative-input-"+s);if(!l&&i>0)l=document.getElementById("initiative-input-0");else if(!l&&s<0)for(s=d.v.game.figures.filter(m=>m instanceof oe.z&&!m.absent).length-1,l=document.getElementById("initiative-input-"+s);!l&&s>0;)s--,l=document.getElementById("initiative-input-"+s);l&&l.focus(),e.preventDefault(),e.stopPropagation()}})}initiativeHidden(){return d.v.game.state==ge.D2.draw&&this.figure instanceof oe.z&&!this.figure.initiativeVisible}updateInitiative(e){const i=isNaN(+e.target.value)?0:+e.target.value;((d.v.game.state==ge.D2.draw||!R.r.settings.initiativeRequired)&&i>=0||i>0)&&i<100?this.setInitiative(i):e.target.value=(this.figure.initiative<10?"0":"")+this.figure.initiative}setInitiative(e){((d.v.game.state==ge.D2.draw||!R.r.settings.initiativeRequired)&&e>=0||e>0)&&e<100&&e!=this.figure.initiative&&(this.character?(d.v.stateManager.before("setInitiative","data.character."+this.figure.name,""+e),this.character.initiativeVisible=!0,this.character.longRest=!1,99==e&&(this.character.longRest=!0)):this.objective&&d.v.stateManager.before("setInitiative","data.objective."+this.figure.name,""+e),this.figure.initiative=e,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after())}longRestOff(e){this.character&&this.character.longRest&&(d.v.stateManager.before("characterLongRestOff","data.character."+this.character.name),this.character.longRest=!1,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after(),e.preventDefault())}open(e){this.dialog.open(zO,{panelClass:"dialog",data:this.figure,positionStrategy:this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions((0,he.sm)())})}tabindex(){return d.v.game.figures.filter(e=>e instanceof oe.z&&!e.absent).indexOf(this.figure)}focusNext(e){}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV),t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-initiative"]],viewQuery:function(e,i){if(1&e&&t.Gf(O9,5),2&e){let s;t.iGM(s=t.CRH())&&(i.initiativeInput=s.first)}},inputs:{figure:"figure"},decls:6,vars:13,consts:[[1,"initiative",3,"ngClass","ghs-label","ghs-label-attribute"],["src","./assets/images/initiative.svg",1,"ghs-svg",3,"click"],["type","number","max","99","maxlength","2",3,"ngClass","value","min","id","change","focus"],["initativeInput",""],[4,"ngIf"],["class","ghs-svg long-rest","src","./assets/images/long-rest.svg",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],["src","./assets/images/long-rest.svg",1,"ghs-svg","long-rest",3,"ghs-label","ghs-label-attribute","click"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"img",1),t.NdJ("click",function(m){return i.open(m)}),t.qZA(),t.TgZ(2,"input",2,3),t.NdJ("change",function(m){return i.updateInitiative(m)})("focus",function(){t.CHM(s);const m=t.MAs(3);return t.KtG(m.select())}),t.qZA(),t.YNc(4,P9,2,0,"span",4),t.YNc(5,y9,1,2,"img",5),t.qZA()}2&e&&(t.Q6J("ngClass",t.VKq(9,b9,i.figure.initiative<=0&&(!i.settingsManager.settings.initiativeRequired||i.character&&i.character.exhausted||i.objective&&i.objective.exhausted)))("ghs-label","game.figure.setInitiative")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.VKq(11,x9,i.figure.initiative>0&&i.initiativeHidden()))("value",i.figure.initiative>0&&(i.figure.initiative<10&&i.figure.initiative>0?"0"+i.figure.initiative:i.figure.initiative)||"")("min",i.gameManager.game.state==i.GameState.draw?0:1)("id","initiative-input-"+i.tabindex()),t.xp6(2),t.Q6J("ngIf",i.figure.initiative>0&&i.initiativeHidden()),t.xp6(1),t.Q6J("ngIf",i.character&&!i.initiativeHidden()&&i.character.longRest))},dependencies:[x.mk,x.O5,ie],styles:[".initiative[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);transition:width .5s ease-in-out;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.initiative[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.initiative[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.initiative[_ngcontent-%COMP%] img.long-rest[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));position:absolute;bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer;text-align:center;border:none;background:none;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * -.7 * var(--ghs-text-factor));padding:0;font-family:var(--ghs-font-title);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));-moz-appearance:textfield}.initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:active, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:hover{border:none;outline:none!important}.initiative[_ngcontent-%COMP%] input.hidden[_ngcontent-%COMP%]{display:none}.initiative.empty[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.initiative.empty[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .initiative.empty[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden;opacity:0;transition:opacity .5s ease-in-out}.initiative.empty[_ngcontent-%COMP%]:hover{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.initiative.empty[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%], .initiative.empty[_ngcontent-%COMP%]:hover input[_ngcontent-%COMP%]{visibility:visible;opacity:1}"]})),a})();function w9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openShop())}),t._UZ(1,"img",11)(2,"span",12),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/items/item-back-fh.png":"./assets/images/items/item-back.png",t.LSH),t.xp6(1),t.Q6J("ghs-label","game.items.character.empty")}}const k9=function(o){return{spent:o}};function T9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",13),t._UZ(1,"ghs-character-item",14),t.TgZ(2,"a",15),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.openItemDialog(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(4,k9,!e.setup&&e.countFlag(n,e.ItemFlags.spent))),t.xp6(1),t.Q6J("character",e.character)("item",n)("setup",e.setup)}}const Z9=function(o,a){return{active:o,disabled:a}},A9=function(o){return{active:o}},ST=function(o){return{disabled:o}};let S9=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"ItemFlags",Ni.CT),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.setup=d.v.game.state==ge.D2.draw&&d.v.roundManager.firstRound,this.items=this.character.progress.items.map(e=>d.v.itemManager.getItem(+e.name,e.edition,!0)).filter(e=>e&&(this.setup||!R.r.settings.characterItemsPermanentEquipped||this.equipped(e))).map(e=>e).sort((e,i)=>{if(!R.r.settings.characterItemsPermanentSorted)return 0;if(!this.setup){if(this.equipped(e)&&!this.equipped(i))return-1;if(this.equipped(i)&&!this.equipped(e)||this.countFlag(e,Ni.CT.consumed)&&!this.countFlag(i,Ni.CT.consumed))return 1;if(this.countFlag(i,Ni.CT.consumed)&&!this.countFlag(e,Ni.CT.consumed))return-1}return e.slot&&!i.slot?-1:i.slot&&!e.slot?1:e.slot&&i.slot?Object.values(Ni.SE).indexOf(e.slot)-Object.values(Ni.SE).indexOf(i.slot):0})}equipped(e){return this.character.progress.equippedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}countFlag(e,i){const s=this.equipped(e);return s&&s.tags&&s.tags.filter(l=>l==i).length||0}toggleEquipped(){R.r.settings.characterItemsPermanentEquipped=!R.r.settings.characterItemsPermanentEquipped,R.r.storeSettings()}toggleSorted(){R.r.settings.characterItemsPermanentSorted=!R.r.settings.characterItemsPermanentSorted,R.r.storeSettings()}zoom(e){R.r.settings.characterItemsPermanentZoom+=e,R.r.settings.characterItemsPermanentZoom<.5?R.r.settings.characterItemsPermanentZoom=.5:R.r.settings.characterItemsPermanentZoom>1.5&&(R.r.settings.characterItemsPermanentZoom=1.5),R.r.storeSettings(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500)}resetZoom(){R.r.settings.characterItemsPermanentZoom=1,R.r.storeSettings(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500)}openShop(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character,affordable:!0}})}openItemDialog(e){this.dialog.open(gg,{panelClass:["fullscreen-panel"],data:{item:e,character:this.character,setup:this.setup}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-item-list"]],inputs:{character:"character"},decls:12,vars:23,consts:[[1,"item-list"],["class","empty",3,"click",4,"ngIf"],["class","item-container",3,"ngClass",4,"ngFor","ngForOf"],[1,"menu"],[3,"ngClass","ghs-tooltip","overlayX","overlayY","click"],["src","./assets/images/check.svg",1,"toggle","ghs-svg"],["src","./assets/images/sort.svg",1,"toggle","ghs-svg"],["ghs-pointer-input","",3,"ngClass","singleClick","doubleClick"],["src","./assets/images/zoom-in.svg",1,"ghs-svg"],["src","./assets/images/zoom-out.svg",1,"ghs-svg"],[1,"empty",3,"click"],[3,"src"],[1,"text",3,"ghs-label"],[1,"item-container",3,"ngClass"],[3,"character","item","setup"],[1,"open-dialog",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,w9,3,2,"div",1),t.YNc(2,T9,3,6,"div",2),t.TgZ(3,"div",3)(4,"a",4),t.NdJ("click",function(){return i.toggleEquipped()}),t._UZ(5,"img",5),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return i.toggleSorted()}),t._UZ(7,"img",6),t.qZA(),t.TgZ(8,"a",7),t.NdJ("singleClick",function(){return i.zoom(.075)})("doubleClick",function(){return i.resetZoom()}),t._UZ(9,"img",8),t.qZA(),t.TgZ(10,"a",7),t.NdJ("singleClick",function(){return i.zoom(-.075)})("doubleClick",function(){return i.resetZoom()}),t._UZ(11,"img",9),t.qZA()()()),2&e&&(t.Udp("--ghs-item-list-zoom",i.settingsManager.settings.characterItemsPermanentZoom),t.xp6(1),t.Q6J("ngIf",0==i.items.length),t.xp6(1),t.Q6J("ngForOf",i.items),t.xp6(2),t.Q6J("ngClass",t.WLB(14,Z9,i.settingsManager.settings.characterItemsPermanentEquipped,i.setup))("ghs-tooltip","game.items.character.toggleEquipped")("overlayX","end")("overlayY","bottom"),t.xp6(2),t.Q6J("ngClass",t.VKq(17,A9,i.settingsManager.settings.characterItemsPermanentSorted))("ghs-tooltip","game.items.character.toggleSorted")("overlayX","end")("overlayY","bottom"),t.xp6(2),t.Q6J("ngClass",t.VKq(19,ST,i.settingsManager.settings.characterItemsPermanentZoom>=1.5)),t.xp6(2),t.Q6J("ngClass",t.VKq(21,ST,i.settingsManager.settings.characterItemsPermanentZoom<=.5)))},dependencies:[x.mk,x.sg,x.O5,kw,ie,An,Ba],styles:[".item-list[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;flex-wrap:wrap;padding-right:calc(var(--ghs-unit) * 4.5);--ghs-item-list-zoom: 1;min-height:calc(var(--ghs-unit) * 18 * var(--ghs-item-list-zoom))}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;margin:calc(var(--ghs-unit) * .5);margin-bottom:0;width:calc(var(--ghs-unit) * 12 * var(--ghs-item-list-zoom));height:calc(var(--ghs-unit) * 18 * var(--ghs-item-list-zoom));border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-item-list-zoom));overflow:hidden}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;filter:grayscale(.7)}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center;font-size:calc(var(--ghs-unit) * 2.6 * var(--ghs-item-list-zoom));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]:hover{opacity:.7}.item-list[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5);margin-bottom:0;width:calc(var(--ghs-unit) * 12 * var(--ghs-item-list-zoom));height:calc(var(--ghs-unit) * 18 * var(--ghs-item-list-zoom));transition:all .5s ease-in-out}.item-list[_ngcontent-%COMP%] .item-container.spent[_ngcontent-%COMP%]{transform:rotate(90deg);transform-origin:center center;margin:0 calc(var(--ghs-unit) * 3 * var(--ghs-item-list-zoom));margin-bottom:0}.item-list[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] ghs-character-item[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.item-list[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .open-dialog[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 12 * var(--ghs-item-list-zoom));height:calc(var(--ghs-unit) * 8 * var(--ghs-item-list-zoom))}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:0;z-index:2;display:flex;flex-direction:column;flex-wrap:wrap-reverse;justify-content:flex-start;align-items:flex-end;margin-top:calc(var(--ghs-unit) * 1)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;margin:0 calc(var(--ghs-unit) * 1);color:var(--ghs-color-darkgray)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5);height:calc(var(--ghs-unit) * 2.5);filter:var(--ghs-filter-darkgray)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg.toggle[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-outline)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-outline)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.7}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.item-list[_ngcontent-%COMP%] .zoom-bar[_ngcontent-%COMP%]{z-index:1;position:absolute;display:block;height:calc(var(--ghs-unit) * 8 * var(--ghs-item-list-zoom));top:0;left:0;right:0}"]})),a})();function E9(o,a){if(1&o&&(t.TgZ(0,"span",19),t._UZ(1,"span",20),t._uU(2,"\xa0"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.action.summon")}}const ET=function(o){return{"text-white":o}};function D9(o,a){if(1&o&&(t.TgZ(0,"span",21),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,ET,!n.right)),t.xp6(1),t.Oqu(n.summon.title)}}function I9(o,a){if(1&o&&t._UZ(0,"span",22),2&o){const n=t.oxw(2);t.Akn(n.style),t.Q6J("ghs-label","data.summon."+n.summon.name)("ngClass",t.VKq(4,ET,!n.right))}}function N9(o,a){if(1&o&&(t.TgZ(0,"span",23),t._UZ(1,"img",24),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)}}function J9(o,a){if(1&o&&t._UZ(0,"ghs-action",25),2&o){const n=t.oxw(2);t.Q6J("action",n.summon.action)}}function U9(o,a){if(1&o&&t._UZ(0,"span",20),2&o){const n=t.oxw(2);t.Akn(n.style),t.Q6J("ghs-label",""+n.summon.attack)}}function L9(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Q9(o,a){if(1&o&&(t.TgZ(0,"span",26),t._UZ(1,"ghs-action",25),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("action",n.summon.additionalAction)}}const R9=function(o,a,n,e){return{action:o,additional:a,item:n,fh:e}};function F9(o,a){if(1&o&&(t.TgZ(0,"div",1)(1,"span",2),t.YNc(2,E9,3,3,"span",3),t.YNc(3,D9,2,4,"span",4),t.YNc(4,I9,1,6,"span",5),t.YNc(5,N9,2,1,"span",6),t.qZA(),t.TgZ(6,"div",7)(7,"span",8),t._UZ(8,"img",9),t.TgZ(9,"span"),t._uU(10,":"),t.qZA(),t._UZ(11,"span",10),t.qZA(),t.TgZ(12,"span",11),t._UZ(13,"img",9),t.TgZ(14,"span"),t._uU(15,":"),t.qZA(),t._UZ(16,"span",10),t.qZA(),t.TgZ(17,"span",12),t.YNc(18,J9,1,1,"ghs-action",13),t.qZA(),t.TgZ(19,"span",14),t._UZ(20,"img",9),t.TgZ(21,"span"),t._uU(22,":"),t.qZA(),t.YNc(23,U9,1,3,"span",15),t.YNc(24,L9,2,0,"span",16),t.qZA(),t.TgZ(25,"span",17),t._UZ(26,"img",9),t.TgZ(27,"span"),t._uU(28,":"),t.qZA(),t._UZ(29,"span",10),t.qZA(),t.YNc(30,Q9,2,1,"span",18),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.l5B(19,R9,n.summon.action,n.summon.additionalAction||n.additional,n.item,n.fhStyle)),t.xp6(2),t.Q6J("ngIf",n.action),t.xp6(1),t.Q6J("ngIf",n.summon.title),t.xp6(1),t.Q6J("ngIf",!n.summon.title),t.xp6(1),t.Q6J("ngIf",n.summon.flying),t.xp6(3),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/heal.svg",t.LSH),t.xp6(3),t.Q6J("value-calc",n.summon.maxHealth)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/move.svg",t.LSH),t.xp6(3),t.Q6J("value-calc",n.summon.movement)("empty",!0),t.xp6(2),t.Q6J("ngIf",n.summon.action),t.xp6(2),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/attack.svg",t.LSH),t.xp6(3),t.Q6J("ngIf",0!=n.summon.attack),t.xp6(1),t.Q6J("ngIf",0==n.summon.attack),t.xp6(2),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/range.svg",t.LSH),t.xp6(3),t.Q6J("value-calc",n.summon.range)("empty",!0),t.xp6(1),t.Q6J("ngIf",n.summon.additionalAction)}}let DT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"summon",void 0),(0,_.Z)(this,"action",!1),(0,_.Z)(this,"additional",!1),(0,_.Z)(this,"item",!1),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.fhStyle=R.r.settings.fhStyle&&!this.style||"fh"==this.style,this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.fhStyle=R.r.settings.fhStyle&&!this.style||"fh"==this.style}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-summon-sheet"]],inputs:{summon:"summon",action:"action",additional:"additional",item:"item",right:"right",style:"style"},decls:1,vars:1,consts:[["class","summon-container",3,"ngClass",4,"ngIf"],[1,"summon-container",3,"ngClass"],[1,"name"],["class","summon-label",4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"ghs-label","style","ngClass",4,"ngIf"],["class","flying",4,"ngIf"],[1,"grid"],[1,"item","health"],[1,"ghs-svg",3,"src"],[3,"value-calc","empty"],[1,"item","move"],[1,"action"],[3,"action",4,"ngIf"],[1,"item","attack"],[3,"ghs-label","style",4,"ngIf"],[4,"ngIf"],[1,"item","range"],["class","additionalAction",4,"ngIf"],[1,"summon-label"],[3,"ghs-label"],[3,"ngClass"],[3,"ghs-label","ngClass"],[1,"flying"],[3,"src"],[3,"action"],[1,"additionalAction"]],template:function(e,i){1&e&&t.YNc(0,F9,31,24,"div",0),2&e&&t.Q6J("ngIf",i.summon)},dependencies:[x.mk,x.O5,Gr,ie,ng],styles:[".summon-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-top:38%;background-image:url(character-ability-summon1.6652de7b772cb310.png);background-size:contain;background-repeat:no-repeat;text-shadow:none}.summon-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:1.3em;position:absolute;top:0;left:10%;width:90%;height:34%;display:flex;justify-content:center;align-items:center}.summon-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:auto;margin-left:calc(var(--ghs-unit) * .5)}.summon-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.summon-container[_ngcontent-%COMP%] .summon-label[_ngcontent-%COMP%]{font-family:var(--ghs-font-text)}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:45% 25% 30%;grid-template-rows:50% 50%;position:absolute;top:34%;left:0;width:100%;height:60%}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr .5fr 1.5fr;justify-content:flex-start;align-items:center}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(1){justify-self:end}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(2){justify-self:center}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(3){justify-self:start}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .health[_ngcontent-%COMP%], .summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .attack[_ngcontent-%COMP%]{padding-left:3em}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%], .summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .additionalAction[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{grid-row:2 span}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:.9em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.summon-container.additional[_ngcontent-%COMP%]{background-image:url(character-ability-summon2.01e34f17184b79db.png)}.summon-container.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{grid-row:1 span}.summon-container.item[_ngcontent-%COMP%]{background-image:url(summon-item.1142452805cc7730.png)}.summon-container.item[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:1em}.summon-container.item[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{grid-template-columns:65% 25% 0%}.summon-container.item[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{grid-row:1 span}.summon-container.fh[_ngcontent-%COMP%]{background-image:url(character-ability-summon1.087db978155a9f1c.png)}.summon-container.fh[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{top:38%;grid-template-columns:60% 40% 0%}.summon-container.fh[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .health[_ngcontent-%COMP%], .summon-container.fh[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .attack[_ngcontent-%COMP%]{padding-left:5em}.summon-container.fh.action[_ngcontent-%COMP%]{background-image:url(character-ability-summon2.52aae50ce5366dbc.png)}.summon-container.fh.action[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{grid-template-columns:55% 20% 25%}.summon-container.fh.additional[_ngcontent-%COMP%]{background-image:url(character-ability-summon3.137fcec726831188.png)}.summon-container.fh.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{grid-template-columns:45% 20% 35%}.summon-container.fh.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .health[_ngcontent-%COMP%], .summon-container.fh.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .attack[_ngcontent-%COMP%]{padding-left:4.5em}"]})),a})(),im=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"entityAnimation",void 0),this.el=e}ngOnChanges(e){if(e&&e.entityAnimation){const i=e.entityAnimation;i.currentValue!=i.previousValue&&(i.currentValue?(this.el.nativeElement.classList.add("entity-dead"),setTimeout(()=>{this.el.nativeElement.classList.remove("entity-dead")},R.r.settings.disableAnimations?0:1500)):i.currentValue||(this.el.nativeElement.classList.add("entity-alive"),setTimeout(()=>{this.el.nativeElement.classList.remove("entity-alive")},R.r.settings.disableAnimations?0:1500)))}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","entityAnimation",""]],inputs:{entityAnimation:"entityAnimation"},features:[t.TTD]})),a})();const q9=["standee"];function H9(o,a){if(1&o&&t._UZ(0,"ghs-summon-sheet",20),2&o){const n=t.oxw();t.Q6J("summon",n.summon)}}function j9(o,a){if(1&o&&(t.TgZ(0,"div",21),t._UZ(1,"div",22),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Udp("background-image",n.summon.thumbnailUrl?"url("+n.summon.thumbnailUrl+")":"url(./assets/images/summons/thumbnail/"+n.summon.thumbnail+".png)")}}function B9(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function z9(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.summon.number)}}function G9(o,a){if(1&o&&(t.TgZ(0,"span",23),t._UZ(1,"img",8),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function V9(o,a){if(1&o&&t._UZ(0,"img",30),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw();t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const Y9=function(){return[]};function K9(o,a){if(1&o&&(t.ynx(0),t.YNc(1,V9,1,3,"img",29),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,Y9),n.value-1))}}function $9(o,a){if(1&o&&(t.TgZ(0,"span",31),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function W9(o,a){if(1&o&&t._UZ(0,"span",32),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function X9(o,a){if(1&o&&t._UZ(0,"span",33),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}const tB=function(o,a){return{expired:o,center:a}};function eB(o,a){if(1&o&&(t.TgZ(0,"span",24)(1,"span",25),t._UZ(2,"img",8),t.YNc(3,K9,3,5,"ng-container",10),t.YNc(4,$9,2,3,"span",26),t.YNc(5,W9,1,2,"span",27),t.YNc(6,X9,1,2,"span",28),t.qZA()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.WLB(8,tB,n.expired,i.activeConditions.length%2==1&&i.activeConditions.length==e+1)),t.xp6(2),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.summon.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}const nB=function(o,a,n,e){return{dead:o,off:a,active:n,fh:e}},iB=function(o,a,n){return{active:o,new:a,center:n}};let IT=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"standee",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"summon",void 0),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"health",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"attack",0),(0,_.Z)(this,"movement",0),(0,_.Z)(this,"range",0),(0,_.Z)(this,"levelDialog",!1),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.overlay=s}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.summon.init&&setTimeout(()=>{this.open()},R.r.settings.disableAnimations?0:500),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.activeConditions=d.v.entityManager.activeConditions(this.summon,!0),this.summon.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))})}dragHpMove(e){this.health=e,this.summon.health+this.health>this.summon.maxHealth&&(this.health=(0,ae.j9)(this.summon.maxHealth)-this.summon.health)}dragHpEnd(e){0!=this.health&&(d.v.stateManager.before("changeSummonHp","data.character."+this.character.name,"data.summon."+this.summon.name,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.summon,this.character,this.health),(this.summon.health<=0||this.summon.dead&&this.health>=0&&this.summon.health>0)&&this.dead(),this.health=0,d.v.stateManager.after())}dragHpCancel(e){this.health=0}dead(){d.v.stateManager.before("summonDead","data.character."+this.character.name,"data.summon."+this.summon.name),this.summon.dead=!0,(d.v.game.state==ge.D2.draw||0==this.summon.entityConditions.length||this.summon.entityConditions.every(e=>-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))&&setTimeout(()=>{d.v.characterManager.removeSummon(this.character,this.summon),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500),d.v.stateManager.after()}singleClick(){this.summon.active?this.toggleActive():this.open()}doubleClick(){this.summon.active?this.open():this.toggleActive()}open(){this.dialog.open($c,{panelClass:"dialog",data:{entity:this.summon,figure:this.character},positionStrategy:this.overlay.position().flexibleConnectedTo(this.standee).withPositions((0,he.sm)())}).closed.subscribe({next:()=>{this.summon.dead&&(this.summon.active&&R.r.settings.activeSummons&&this.toggleActive(),this.element.nativeElement.classList.add("dead"))}})}toggleActive(){if(this.summon.active)d.v.stateManager.before("summonInactive","data.character."+this.character.name,"data.summon."+this.summon.name),R.r.settings.activeSummons&&this.character.active?d.v.roundManager.toggleFigure(this.character):this.summon.active=!1,d.v.stateManager.after();else{d.v.stateManager.before("summonActive","data.character."+this.character.name,"data.summon."+this.summon.name);const e=this.character.summons.find(i=>i.active);if(R.r.settings.activeSummons&&this.character.active&&d.v.entityManager.isAlive(this.summon,!0)&&(!e||this.character.summons.indexOf(e)i.active=!1),this.summon.active=!0;d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-summon-entity"]],viewQuery:function(e,i){if(1&e&&t.Gf(q9,5),2&e){let s;t.iGM(s=t.CRH())&&(i.standee=s.first)}},inputs:{character:"character",summon:"summon"},decls:23,vars:31,consts:[[1,"summon-border",3,"ngClass","entityAnimation"],[1,"summon"],[1,"standee"],["standee",""],[1,"sheet"],[3,"summon",4,"ngIf"],["class","background-image-container",4,"ngIf"],[1,"image",3,"ngClass"],[3,"src"],[1,"summon-number"],[4,"ngIf"],[1,"health"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"markers"],["class","marker",4,"ngFor","ngForOf"],[3,"entity","figure"],[1,"conditions"],["class","condition-container",3,"ngClass",4,"ngFor","ngForOf"],[3,"entity","diff"],[1,"drag-hp",3,"relative","screenWidth","singleClick","doubleClick","dragMove","dragEnd","dragCancel"],[3,"summon"],[1,"background-image-container"],[1,"background-image"],[1,"marker"],[1,"condition-container",3,"ngClass"],[1,"condition"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"div",4),t.YNc(5,H9,1,1,"ghs-summon-sheet",5),t.YNc(6,j9,2,2,"div",6),t.qZA(),t.TgZ(7,"span",7),t._UZ(8,"img",8),t.TgZ(9,"span",9),t.YNc(10,B9,2,0,"span",10),t.YNc(11,z9,2,1,"span",10),t.qZA()(),t.TgZ(12,"span",11),t._uU(13),t.ALo(14,"ghsMinZero"),t._UZ(15,"span",12),t.qZA()(),t.TgZ(16,"div",13),t.YNc(17,G9,2,1,"span",14),t.qZA(),t._UZ(18,"ghs-highlight-conditions",15),t.TgZ(19,"div",16),t.YNc(20,eB,7,11,"span",17),t.qZA(),t._UZ(21,"ghs-healthbar",18),t.qZA(),t.TgZ(22,"ghs-pointer-input",19),t.NdJ("singleClick",function(){return i.open()})("doubleClick",function(){return i.toggleActive()})("dragMove",function(l){return i.dragHpMove(l)})("dragEnd",function(l){return i.dragHpEnd(l)})("dragCancel",function(l){return i.dragHpCancel(l)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.l5B(22,nB,i.summon.dead,i.character.off,i.summon.active,i.settingsManager.settings.fhStyle))("entityAnimation",i.summon.dead),t.xp6(5),t.Q6J("ngIf",i.summon.active),t.xp6(1),t.Q6J("ngIf",!i.settingsManager.settings.disableArtwork&&(i.summon.thumbnail&&!i.summon.noThumbnail||i.summon.thumbnailUrl)),t.xp6(1),t.Q6J("ngClass",t.kEZ(27,iB,i.summon.state==i.SummonState.true,i.summon.state==i.SummonState.new,i.summon.entityConditions.length%2==0)),t.xp6(1),t.MGl("src","./assets/images/summons/",i.summon.color,".png",t.LSH),t.xp6(2),t.Q6J("ngIf",0==i.summon.number),t.xp6(1),t.Q6J("ngIf",i.summon.number>0),t.xp6(2),t.hij("",t.lcZ(14,20,i.summon.health+i.health)," "),t.xp6(2),t.Q6J("value-sign",i.health)("hideEmpty",!0)("container",!0),t.xp6(2),t.Q6J("ngForOf",i.summon.markers),t.xp6(1),t.Q6J("entity",i.summon)("figure",i.character),t.xp6(2),t.Q6J("ngForOf",i.activeConditions),t.xp6(1),t.Q6J("entity",i.summon)("diff",i.health),t.xp6(1),t.Q6J("relative",!0)("screenWidth",!0))},dependencies:[x.mk,x.sg,x.O5,s_,GO,DT,im,An,aa,Ii,sg],styles:['.summon-border[_ngcontent-%COMP%]{position:relative;height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:calc(var(--ghs-unit) * 1.4 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * 1.8 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * .7)}.summon-border[_ngcontent-%COMP%]:not(.dead){opacity:1;transform:translate(0)}.summon-border.dead[_ngcontent-%COMP%]{opacity:0;max-width:0;transform:translateY(100%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{position:relative;display:flex;cursor:pointer;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor));text-align:center;color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:100%;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));transition:height .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) solid var(--ghs-color-black);border-bottom-width:calc(var(--ghs-unit) * .35 * var(--ghs-text-factor));border-top-left-radius:25%;border-top-right-radius:25%;filter:var(--ghs-filter-outline);transition:width .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;border-top-left-radius:25%;border-top-right-radius:25%;overflow:hidden;z-index:0;transition:height .5s ease-out,width .5s ease-out,top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -1.3 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * -.8 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor));height:150%;background-size:100% AUTO;background-repeat:no-repeat;filter:brightness(70%);transition:height .5s ease-out,width .5s ease-out,top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:calc(var(--ghs-unit) * 5.5 * var(--ghs-text-factor));transition:height .5s ease-out,width .5s ease-out;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));justify-content:center;align-items:center;font-family:ghs-normal;flex-shrink:0;z-index:1}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * .5);left:0;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);transition:top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image.new[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);background-image:url(minus.97c98a810771fceb.svg);background-size:cover;z-index:2}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:calc(var(--ghs-unit) * -.1);height:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 2);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4);border-bottom-left-radius:calc(var(--ghs-unit) * 4);z-index:3;opacity:.9}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));position:absolute;top:calc(var(--ghs-unit) * 1.2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));transition:top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]:before{content:" ";position:absolute;left:50%;top:calc(var(--ghs-unit) * -.9 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));background-image:url(health.8d6a842a197d29d3.svg);background-size:contain;background-repeat:no-repeat;transform:translate(-50%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));bottom:calc(var(--ghs-unit) * -3 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));z-index:1000}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;bottom:0;width:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.expired[_ngcontent-%COMP%]{opacity:.6}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));overflow:visible}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:0}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.2 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:48%;left:calc(var(--ghs-unit) * 1.3 * var(--ghs-text-factor));text-shadow:none;transform:translate(-50%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform-origin:center center;z-index:999}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .condition[_ngcontent-%COMP%]:hover, .summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(-25%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .condition[_ngcontent-%COMP%]:hover, .summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(25%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%]{grid-row:span 2}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{transform:scale(2)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * .2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * .4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 8.2 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * .75 * var(--ghs-text-factor));z-index:0;border-radius:15%;overflow:hidden;transition:width .5s ease-out}.summon-border[_ngcontent-%COMP%] ghs-pointer-input.drag-hp[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor));height:100%;z-index:4}.summon-border.active[_ngcontent-%COMP%]{z-index:15}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 12 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{top:5%;left:0;height:75%;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{top:8%;left:-35%;width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] ghs-summon-sheet[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * -1);left:calc(var(--ghs-unit) * -2)}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 1)}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{left:100%;bottom:calc(var(--ghs-unit) * .6);z-index:1000}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * .4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 29.2 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] ghs-pointer-input.drag-hp[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor))}.summon-border.active.fh[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{top:25%;height:85%;width:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor))}.summon-border.active.fh[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{top:0;left:-10%;width:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor))}.summon-border.active.fh[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 2)}.summon-border.off[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{opacity:.7}']})),a})();function oB(o,a){1&o&&(t.TgZ(0,"a"),t._UZ(1,"img",2),t.qZA())}function aB(o,a){if(1&o&&(t.TgZ(0,"div",3)(1,"span",4),t._UZ(2,"span",5),t.qZA(),t._UZ(3,"span",6),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ghs-label","game.figure.error."+n.type),t.xp6(1),t.Q6J("ghs-label","game.figure.error."+n.type+".hint")("ghs-label-args",n.args)("ghs-label-args-replace",!1)}}const sB=function(){return[]};let NT=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"figure",void 0),this.dialog=e}ngOnInit(){this.figure.errors||(this.figure.errors=[])}open(e){this.dialog.open(rB,{panelClass:"dialog",data:this.figure})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-figure-errors"]],inputs:{figure:"figure"},decls:2,vars:3,consts:[[1,"button",3,"click"],[4,"ngIf"],["src","./assets/images/warning.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(l){return i.open(l)}),t.YNc(1,oB,2,0,"a",1),t.qZA()),2&e&&(t.Udp("display",i.figure.errors&&i.figure.errors.length>0?"":"none"),t.xp6(1),t.Q6J("ngIf",i.figure.errors&&i.figure.errors.length>0))},dependencies:[x.O5],styles:[".button[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}.button[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}"]})),a})(),rB=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"figure",void 0),this.figure=e}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-figure-errors-dialog"]],decls:3,vars:2,consts:[[1,"figure-errors-dialog"],[1,"figure-errors"],["class","figure-error",4,"ngFor","ngForOf"],[1,"figure-error"],[1,"error"],[3,"ghs-label"],[1,"hint",3,"ghs-label","ghs-label-args","ghs-label-args-replace"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,aB,4,4,"div",2),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngForOf",i.figure.errors||t.DdM(1,sB)))},dependencies:[x.sg,ie],styles:[".figure-errors[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center}.figure-errors[_ngcontent-%COMP%] .figure-error[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0}.figure-errors[_ngcontent-%COMP%] .figure-error[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-red)}.figure-errors[_ngcontent-%COMP%] .figure-error[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}"]})),a})();const cB=["charactertitle"],lB=["characterName"],gB=["summonButton"];function dB(o,a){if(1&o&&t._UZ(0,"ghs-summon-entity",22),2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("character",e.character)("summon",n)}}function hB(o,a){if(1&o&&(t.TgZ(0,"div",20),t.YNc(1,dB,1,2,"ghs-summon-entity",21),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.character.summons)}}const uB=function(o,a){return{empty:o,off:a}},_B=function(o,a){return{empty:o,disabled:a}};function pB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15),t._UZ(1,"span",6),t.TgZ(2,"span",16),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntitiesMenu(i))}),t._UZ(3,"img",17)(4,"img",18),t.qZA(),t.YNc(5,hB,2,1,"div",19),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(5,uB,0==n.summonCount,n.character.off||n.character.exhausted||n.character.health<=0)),t.xp6(2),t.Q6J("ngClass",t.WLB(8,_B,0==n.summonCount,n.summonCount<2))("entityAnimation",0==n.summonCount),t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(2),t.Q6J("ngIf",n.summonCount)}}const JT=function(o){return{active:o}};function fB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",28)(1,"div",29)(2,"ghs-attackmodifier-deck",30),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.beforeAttackModifierDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.afterAttackModifierDeck(i))}),t.qZA()(),t.TgZ(3,"div",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleAttackModifierDeckVisible())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,JT,n.character.attackModifierDeckVisible)),t.xp6(2),t.Q6J("character",n.character)}}function mB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",36),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.openLootDeckDialog())}),t._UZ(1,"ghs-loot",37),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("loot",e.gameManager.game.lootDeck.cards[n])("flipped",!0)("disableFlip",!0)}}function vB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",32)(1,"div",29)(2,"div",33),t.YNc(3,mB,2,3,"div",34),t.qZA()(),t.TgZ(4,"div",35),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleLootCardsVisible())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",n.character.lootCards)}}const CB=function(o){return{"outer-denied":o}};function MB(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"ghs-pointer-input",23),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.gameManager.stateManager.characterPermissions[s.character.name+"|"+s.character.edition]&&s.dragInitiativeMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.gameManager.stateManager.characterPermissions[s.character.name+"|"+s.character.edition]&&s.dragInitiativeEnd(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.toggleFigure(i))})("doubleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.gameManager.stateManager.characterPermissions[s.character.name+"|"+s.character.edition]&&s.initiativeDoubleClick(i))}),t.qZA(),t._UZ(2,"ghs-character-initiative",24)(3,"ghs-highlight-conditions",25),t.YNc(4,fB,4,4,"div",26),t.YNc(5,vB,5,1,"div",27),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(6,CB,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.round&&!n.gameManager.stateManager.characterPermissions[n.character.name+"|"+n.character.edition])),t.xp6(1),t.Q6J("figure",n.character),t.xp6(1),t.Q6J("entity",n.character)("figure",n.character),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterAttackModifierDeck&&!n.settingsManager.settings.characterAttackModifierDeckPermanent),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.lootDeck&&n.character.lootCardsVisible)}}function OB(o,a){if(1&o&&t._UZ(0,"ghs-character-initiative",12),2&o){const n=t.oxw(2);t.Q6J("figure",n.character)}}function PB(o,a){1&o&&t._UZ(0,"img",60)}function yB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",61),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragTokenMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragTokenEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.nextIdentity(i))}),t._uU(1,">"),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","%data.characterToken."+n.character.name+"%")("relative",!0)("screenWidth",!0)}}function bB(o,a){if(1&o&&(t.TgZ(0,"span",62)(1,"span"),t._uU(2),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.hij("x",n.character.token+(n.character.primaryToken<0?n.token:0),"")}}function xB(o,a){if(1&o&&t._UZ(0,"span",64),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("ghs-label","%data.characterToken."+e.character.name+"."+n+"%")}}function wB(o,a){if(1&o&&(t.TgZ(0,"span",62)(1,"span"),t._uU(2),t.qZA()()),2&o){const n=t.oxw().index,e=t.oxw(2);t.xp6(2),t.hij("x",e.character.tokenValues[n]+(e.character.primaryToken==n?e.token:0),"")}}function kB(o,a){if(1&o&&(t.ynx(0),t.YNc(1,xB,1,1,"span",63),t.YNc(2,wB,3,1,"span",50),t.BQk()),2&o){const n=a.index,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.character.tokenValues[n]+(e.character.primaryToken==n?e.token:0)>0),t.xp6(1),t.Q6J("ngIf",e.character.tokenValues[n]+(e.character.primaryToken==n?e.token:0)>1)}}function TB(o,a){if(1&o&&(t.TgZ(0,"span",65),t._UZ(1,"img",8),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function ZB(o,a){if(1&o&&t._UZ(0,"img",71),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw(2);t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const AB=function(){return[]};function SB(o,a){if(1&o&&(t.ynx(0),t.YNc(1,ZB,1,3,"img",70),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,AB),n.value-1))}}function EB(o,a){if(1&o&&(t.TgZ(0,"span",72),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function DB(o,a){if(1&o&&t._UZ(0,"span",73),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function IB(o,a){if(1&o&&t._UZ(0,"span",74),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}function NB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",66),t.NdJ("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeCondition(s))}),t._UZ(1,"img",8),t.YNc(2,SB,3,5,"ng-container",4),t.YNc(3,EB,2,3,"span",67),t.YNc(4,DB,1,2,"span",68),t.YNc(5,IB,1,2,"span",69),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.character.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}const JB=function(o){return{identities:o}};function UB(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(2,"div",39)(3,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(4,"span",40)(5,"span",41,42)(7,"span",43),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragTokenMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragTokenEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.nextIdentity(i))}),t._UZ(8,"img",44),t.qZA(),t.YNc(9,OB,1,1,"ghs-character-initiative",45),t.TgZ(10,"span",46),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t._uU(11),t.YNc(12,PB,1,0,"img",47),t.qZA()(),t.TgZ(13,"span",48),t.YNc(14,yB,2,3,"span",49),t.YNc(15,bB,3,1,"span",50),t.YNc(16,kB,3,2,"ng-container",51),t.qZA()(),t.TgZ(17,"div",52)(18,"div",53),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t._UZ(19,"img",54),t._uU(20),t.ALo(21,"ghsMinZero"),t._UZ(22,"span",55),t.qZA(),t.TgZ(23,"div",56),t.YNc(24,TB,2,1,"span",57),t.qZA(),t.TgZ(25,"div",58),t.YNc(26,NB,6,7,"span",59),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(7),t.Q6J("relative",!0)("screenWidth",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(23,JB,n.settingsManager.settings.characterIdentities&&n.character.identities&&n.character.identities.length>1))("src",0!=n.character.identities.length&&n.settingsManager.settings.characterIdentities?n.gameManager.characterManager.characterIdentityIcon(n.character.name,n.character.identity):n.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",n.compact),t.xp6(2),t.hij(" ",n.characterTitle," "),t.xp6(1),t.Q6J("ngIf",n.character.exhausted),t.xp6(2),t.Q6J("ngIf",n.character.token+(n.character.primaryToken<0?n.token:0)>0),t.xp6(1),t.Q6J("ngIf",n.character.token+(n.character.primaryToken<0?n.token:0)>1),t.xp6(1),t.Q6J("ngForOf",n.character.tokens),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title")("relative",!0)("screenWidth",!0),t.xp6(2),t.AsE(" ",t.lcZ(21,21,n.character.health+n.health),"/",n.character.maxHealth," "),t.xp6(2),t.Q6J("value-sign",n.health)("hideEmpty",!0)("container",!0),t.xp6(2),t.Q6J("ngForOf",n.character.markers),t.xp6(2),t.Q6J("ngForOf",n.activeConditions)}}function LB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",78),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA()}}function QB(o,a){1&o&&t._UZ(0,"img",60)}function RB(o,a){if(1&o&&(t.ynx(0),t.YNc(1,LB,1,0,"div",75),t.TgZ(2,"div",76,42)(4,"span",77),t._UZ(5,"img",8),t.qZA(),t._uU(6),t.YNc(7,QB,1,0,"img",47),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.character.absent),t.xp6(4),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",n.gameManager.characterManager.characterName(n.character,n.character.absent)," "),t.xp6(1),t.Q6J("ngIf",n.character.exhausted)}}const FB=function(o){return{disabled:o}};function qB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",93),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleLootCardsVisible())}),t._UZ(1,"img",94),t.TgZ(2,"span",95),t._uU(3),t.qZA()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,FB,n.character.lootCardsVisible)),t.xp6(3),t.Oqu(n.character.lootCards.length)}}function HB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",96),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleAttackModifierDeckVisible())}),t._UZ(1,"img",97),t.qZA()}2&o&&t.Q6J("ghs-label","game.attackModifiers")("ghs-label-attribute","title")}const jB=function(o){return{drawing:o}};function BB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",98)(1,"ghs-attackmodifier-draw",99),t.NdJ("drawing",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.amAnimationDrawing=i)}),t.qZA()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,jB,n.amAnimationDrawing)),t.xp6(1),t.Q6J("character",n.character)}}function zB(o,a){1&o&&t._UZ(0,"img",102)}function GB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",100),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openBattleGoals())}),t._UZ(1,"img",8),t.YNc(2,zB,1,0,"img",101),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.battleGoals")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/battlegoals/battle-goal-back-fh.png":"./assets/images/battlegoals/battle-goal-back.png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.character.battleGoal&&n.character.battleGoals.length>0)}}function VB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",103),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openItems())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openItems(!0))}),t._UZ(1,"img",8),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/items/item-back-fh.png":"./assets/images/items/item-back.png",t.LSH)}}function YB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",104),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragLootMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragLootEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.compact&&i.openCharacterSheet())}),t._uU(1),t._UZ(2,"img",105)(3,"span",55),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.loot")("ghs-label-attribute","title")("relative",!0)("screenWidth",!0),t.xp6(1),t.hij(" ",n.character.loot+n.loot," "),t.xp6(2),t.Q6J("value-sign",n.loot)("hideEmpty",!0)("container",!0)}}function KB(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",79),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.YNc(2,qB,4,4,"div",80),t.YNc(3,HB,2,2,"span",81),t.YNc(4,BB,2,4,"span",82),t.YNc(5,GB,3,4,"div",83),t.YNc(6,VB,2,3,"div",84),t.TgZ(7,"div",85)(8,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(9,"a",86,87),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openSummonDialog(i))}),t._UZ(11,"img",88),t.qZA()(),t.TgZ(12,"div",89)(13,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(14,"span",90),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragXpMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragXpEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t._uU(15),t._UZ(16,"img",91)(17,"span",55),t.qZA(),t.YNc(18,YB,4,8,"span",92),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.settingsManager.settings.lootDeck&&n.character.lootCards&&n.character.lootCards.length>0),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterAttackModifierDeck),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterAttackModifierDeck&&n.settingsManager.settings.characterAttackModifierAnimate&&!n.character.attackModifierDeckVisible&&(!n.settingsManager.settings.characterAttackModifierDeckPermanentActive||!n.character.active)),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario&&n.settingsManager.settings.battleGoals&&(n.gameManager.roundManager.firstRound||n.settingsManager.settings.battleGoalsCharacter||!n.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterItems),t.xp6(3),t.Q6J("ghs-label","summon")("ghs-label-attribute","title"),t.xp6(5),t.Q6J("ghs-label","game.experience")("ghs-label-attribute","title")("relative",!0)("screenWidth",!0),t.xp6(1),t.hij(" ",n.character.experience+n.experience," "),t.xp6(2),t.Q6J("value-sign",n.experience)("hideEmpty",!0)("container",!0),t.xp6(1),t.Q6J("ngIf",!n.settingsManager.settings.lootDeck||!n.settingsManager.settings.alwaysLootDeck&&!n.gameManager.fhRules())}}function $B(o,a){if(1&o&&(t.TgZ(0,"div",106),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij(" ",n.character.handSize," ")}}function WB(o,a){if(1&o&&(t.TgZ(0,"div",107),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij(" ",n.character.level," ")}}function XB(o,a){1&o&&t._UZ(0,"span",112)}function tz(o,a){1&o&&(t.TgZ(0,"span",112),t._uU(1,"|"),t.qZA())}function ez(o,a){1&o&&t._UZ(0,"span",112)}function nz(o,a){if(1&o&&(t.ynx(0),t.YNc(1,XB,1,0,"span",110),t._UZ(2,"span",111),t.YNc(3,tz,2,0,"span",110),t.YNc(4,ez,1,0,"span",110),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(1),t.Q6J("ghs-label","data.character.traits."+n),t.xp6(1),t.Q6J("ngIf",e{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"characterName",void 0),(0,_.Z)(this,"summonButton",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"levelDialog",!1),(0,_.Z)(this,"characterTitle",""),(0,_.Z)(this,"initiative",-1),(0,_.Z)(this,"health",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"token",0),(0,_.Z)(this,"amAnimationDrawing",!1),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"summonCount",0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.characterTitle=d.v.characterManager.characterName(this.character),this.summonCount=this.character.summons.filter(e=>d.v.entityManager.isAlive(e)).length,this.activeConditions=d.v.entityManager.activeConditions(this.character),this.character.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))}),R.r.settings.characterAttackModifierDeckPermanent&&R.r.settings.characterAttackModifierDeckPermanentActive&&d.v.game.state==ge.D2.next&&this.character.active&&(this.character.attackModifierDeck.active=!0),this.compact=R.r.settings.characterCompact&&"modern"!=R.r.settings.theme}beforeAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"data.character."+this.character.name,...e.values)}afterAttackModifierDeck(e){this.character.attackModifierDeck=e.deck,d.v.stateManager.after()}exhausted(){this.character.exhausted=!this.character.exhausted,this.character.exhausted?(this.character.off=!0,this.character.active=!1):this.character.off=!1,d.v.sortFigures(this.character)}dragInitiativeMove(e){e>99?e=99:e<0&&(e=0),d.v.game.state==ge.D2.next&&0==e&&R.r.settings.initiativeRequired&&(e=1),-1==this.initiative&&(this.initiative=this.character.initiative),this.character.initiative=e,this.character.initiativeVisible=!0,this.character.longRest=!1,99==e&&(this.character.longRest=!0)}dragInitiativeEnd(e){e>99?e=99:e<0&&(e=0),d.v.game.state==ge.D2.next&&0==e&&R.r.settings.initiativeRequired&&(e=1),this.character.initiative!=this.initiative&&(this.character.initiative=this.initiative,d.v.stateManager.before("setInitiative","data.character."+this.character.name,""+e),this.character.initiative=e,this.character.longRest=!1,99==e&&(this.character.longRest=!0),this.initiative=-1,this.character instanceof oe.z&&(this.character.initiativeVisible=!0),d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after())}toggleFigure(e){if(!this.character.absent)if(d.v.game.state!=ge.D2.next||this.character.exhausted||R.r.settings.initiativeRequired&&!(this.character.initiative>0))(R.r.settings.initiativeRequired&&this.character.initiative<=0||d.v.game.state==ge.D2.draw)&&this.openInitiativeDialog(e);else{const i=this.character.summons.find(s=>s.active);R.r.settings.activeSummons&&this.character.active&&i?d.v.stateManager.before("summonInactive","data.character."+this.character.name,"data.summon."+i.name):d.v.stateManager.before(this.character.active?"unsetActive":"setActive","data.character."+this.character.name),d.v.roundManager.toggleFigure(this.character),d.v.stateManager.after()}}nextIdentity(e){R.r.settings.characterIdentities&&this.character.identities&&this.character.identities.length>1?(d.v.stateManager.before("nextIdentity","data.character."+this.character.name),this.character.identity++,this.character.identity>=this.character.identities.length&&(this.character.identity=0),d.v.stateManager.after(),e.preventDefault()):this.openEntityMenu(e)}openInitiativeDialog(e){this.dialog.open(zO,{panelClass:"dialog",data:this.character,positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}initiativeDoubleClick(e){this.character.active&&this.character.summons.filter(i=>d.v.entityManager.isAlive(i)&&i.state!=Ee.HY.new).find((i,s,l)=>i.active&&si.active=!1):this.openInitiativeDialog(e)}dragHpMove(e){this.health=e,this.character.health+this.health>this.character.maxHealth&&(this.health=this.character.maxHealth-this.character.health)}dragHpEnd(e){0!=this.health&&(d.v.stateManager.before("changeHP","data.character."+this.character.name,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.character,this.character,this.health),this.health=0,d.v.stateManager.after())}dragXpMove(e){this.experience=e,this.character.experience+this.experience<0&&(this.experience=-this.character.experience)}dragXpEnd(e){0!=this.experience&&(d.v.stateManager.before("changeXP","data.character."+this.character.name,(0,he.uZ)(this.experience)),this.character.experience+=this.experience,this.experience=0,d.v.stateManager.after())}dragTokenMove(e){this.token=e,this.character.primaryToken<0&&this.character.token+this.token<0?this.token=-this.character.token:this.character.primaryToken>=0&&this.character.tokenValues[this.character.primaryToken]+this.token<0&&(this.token=-this.character.tokenValues[this.character.primaryToken])}dragTokenEnd(e){0!=this.token&&(this.character.primaryToken<0?(d.v.stateManager.before("setCharacterToken","data.character."+this.character.name,""+(this.character.token+this.token)),this.character.token+=this.token,this.token=0,d.v.stateManager.after()):(d.v.stateManager.before("setCharacterTokenValue","data.character."+this.character.name,this.character.tokens[this.character.primaryToken],""+(this.character.token+this.token)),this.character.tokenValues[this.character.primaryToken]+=this.token,this.token=0,d.v.stateManager.after()))}dragLootMove(e){this.loot=e,this.character.loot+this.loot<0&&(this.loot=-this.character.loot)}dragLootEnd(e){0!=this.loot&&(d.v.stateManager.before("changeLoot","data.character."+this.character.name,(0,he.uZ)(this.loot)),this.character.loot+=this.loot,this.loot=0,d.v.stateManager.after())}dragCancel(e){this.health=0,this.experience=0,this.loot=0,this.token=0}openEntityMenu(e){this.dialog.open($c,{panelClass:"dialog",data:{entity:this.character,figure:this.character},positionStrategy:this.overlay.position().flexibleConnectedTo(this.characterName).withPositions((0,he.sm)())})}openEntitiesMenu(e){this.dialog.open(Bw,{panelClass:"dialog",data:{character:this.character},positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}openSummonDialog(e){this.dialog.open(wj,{panelClass:"dialog",data:this.character,positionStrategy:this.overlay.position().flexibleConnectedTo(this.summonButton).withPositions((0,he.sm)("left"))})}openCharacterSheet(){this.dialog.open(IO,{panelClass:["dialog-invert"],data:this.character})}removeCondition(e){d.v.stateManager.before(...d.v.entityManager.undoInfos(this.character,this.character,"removeCondition"),e.name),d.v.entityManager.removeCondition(this.character,e,e.permanent),d.v.stateManager.after()}openBattleGoals(){this.dialog.open(bw,{panelClass:["dialog"],data:{character:this.character,draw:!this.character.battleGoals||0==this.character.battleGoals.length}})}openItems(e=!1){R.r.settings.characterItemsPermanent&&!e?(this.character.itemsVisible=!this.character.itemsVisible,d.v.stateManager.saveLocal(),d.v.uiChange.emit()):0==this.character.progress.items.length?this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character,affordable:!0}}):this.dialog.open(Hj,{panelClass:["dialog"],data:this.character})}characterFullView(){d.v.game.figures.forEach(e=>{e instanceof oe.z&&(e.fullview=!1)}),this.character.fullview=!0,d.v.stateManager.saveLocal(),d.v.uiChange.emit()}toggleAttackModifierDeckVisible(){if(!this.character.attackModifierDeckVisible||R.r.settings.characterAttackModifierDeckPermanent&&R.r.settings.characterAttackModifierDeckPermanentActive&&this.character.active)if(R.r.settings.characterAttackModifierDeckPermanent)this.character.attackModifierDeck.active=!0,this.character.attackModifierDeckVisible=!0,this.character.lootCardsVisible=!1;else if(R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)){this.character.lootCardsVisible=!1;const e=new t.vpe,i=new t.vpe;e.subscribe({next:l=>this.beforeAttackModifierDeck(l)}),i.subscribe({next:l=>this.afterAttackModifierDeck(l)}),this.dialog.open(Pw,{backdropClass:"fullscreen-backdrop",data:{deck:this.character.attackModifierDeck,character:this.character,ally:!1,numeration:""+this.character.number,before:e,after:i}}).closed.subscribe({next:()=>{e.unsubscribe(),i.unsubscribe()}})}else this.character.attackModifierDeck.active=!0,this.character.attackModifierDeckVisible=!0,this.character.lootCardsVisible=!1;else this.character.attackModifierDeck.active=!1,this.character.attackModifierDeckVisible=!1;d.v.stateManager.saveLocal(),d.v.uiChange.emit()}toggleLootCardsVisible(){this.character.lootCardsVisible?this.character.lootCardsVisible=!1:R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)?(this.character.lootCardsVisible=!1,this.openLootDeckDialog()):(this.character.lootCardsVisible=!0,this.character.attackModifierDeck.active=!1,this.character.attackModifierDeckVisible=!1),d.v.stateManager.saveLocal()}openLootDeckDialog(){this.dialog.open(_j,{panelClass:"dialog",data:this.character})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character"]],viewQuery:function(e,i){if(1&e&&(t.Gf(cB,5),t.Gf(lB,5),t.Gf(gB,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first),t.iGM(s=t.CRH())&&(i.characterName=s.first),t.iGM(s=t.CRH())&&(i.summonButton=s.first)}},inputs:{character:"character"},decls:18,vars:31,consts:[["class","summons-container",3,"ngClass",4,"ngIf"],[1,"character",3,"ngClass"],[3,"entity"],[3,"character"],[4,"ngIf"],[1,"stats"],[1,"spacer"],["ghs-pointer-input","",1,"character-sheet-button",3,"ghs-label","ghs-label-attribute","ngClass","singleClick","doubleClick"],[3,"src"],["class","hand-size",4,"ngIf"],["class","character-level",4,"ngIf"],["class","character-traits","ghs-pointer-input","",3,"singleClick","doubleClick",4,"ngIf"],[3,"figure"],["class","items-container-permanent",4,"ngIf"],["class","attack-modifierdeck-container permanent",3,"ngClass",4,"ngIf"],[1,"summons-container",3,"ngClass"],[1,"entities-menu",3,"ngClass","entityAnimation","click"],[1,"icon",3,"src"],["src","./assets/images/up.svg",1,"menu"],["class","summons",4,"ngIf"],[1,"summons"],[3,"character","summon",4,"ngFor","ngForOf"],[3,"character","summon"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[1,"initiative",3,"figure"],[3,"entity","figure"],["class","attack-modifierdeck-container",3,"ngClass",4,"ngIf"],["class","loot-cards-container",4,"ngIf"],[1,"attack-modifierdeck-container",3,"ngClass"],[1,"scroll-container"],[3,"character","before","after"],[1,"attack-modifierdeck-close",3,"click"],[1,"loot-cards-container"],[1,"loot-cards"],["class","loot-card",3,"click",4,"ngFor","ngForOf"],[1,"loot-cards-close",3,"click"],[1,"loot-card",3,"click"],[3,"loot","flipped","disableFlip"],["ghs-pointer-input","",1,"entity-menu-container",3,"singleClick","doubleClick"],[1,"column","col-1"],[1,"title-bar"],[1,"title"],["characterName",""],["ghs-pointer-input","",1,"icon",3,"relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick"],[3,"ngClass","src"],[3,"figure",4,"ngIf"],["ghs-pointer-input","",1,"name",3,"singleClick","doubleClick"],["class","ghs-svg exhausted","src","./assets/images/status/exhausted.svg",4,"ngIf"],[1,"token-container"],["class","token","ghs-pointer-input","",3,"ghs-label","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick",4,"ngIf"],["class","token value",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"status-bar"],["ghs-pointer-input","",1,"health",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],["src","./assets/images/status/health.svg"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"markers"],["class","marker",4,"ngFor","ngForOf"],[1,"conditions"],["class","condition","ghs-pointer-input","",3,"doubleClick",4,"ngFor","ngForOf"],["src","./assets/images/status/exhausted.svg",1,"ghs-svg","exhausted"],["ghs-pointer-input","",1,"token",3,"ghs-label","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick"],[1,"token","value"],["class","token",3,"ghs-label",4,"ngIf"],[1,"token",3,"ghs-label"],[1,"marker"],["ghs-pointer-input","",1,"condition",3,"doubleClick"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],["class","absent-menu","ghs-pointer-input","",3,"singleClick","doubleClick",4,"ngIf"],[1,"title","absent"],[1,"icon"],["ghs-pointer-input","",1,"absent-menu",3,"singleClick","doubleClick"],["ghs-pointer-input","",1,"spacer",3,"singleClick","doubleClick"],["class","loot-cards-button","ghs-pointer-input","",3,"ngClass","singleClick",4,"ngIf"],["class","attack-modifier-button","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","singleClick",4,"ngIf"],["class","attack-modifier-draw",3,"ngClass",4,"ngIf"],["class","battlegoals-button","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","singleClick",4,"ngIf"],["class","items-button","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","singleClick","doubleClick",4,"ngIf"],[1,"summon-dialog"],["ghs-pointer-input","",1,"summon-dialog-button",3,"ghs-label","ghs-label-attribute","singleClick"],["summonButton",""],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"column","col-2"],["ghs-pointer-input","",1,"experience",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],["src","./assets/images/status/experience.svg"],["class","loot","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick",4,"ngIf"],["ghs-pointer-input","",1,"loot-cards-button",3,"ngClass","singleClick"],["src","./assets/images/fh/loot-token.png"],[1,"badge"],["ghs-pointer-input","",1,"attack-modifier-button",3,"ghs-label","ghs-label-attribute","singleClick"],["src","./assets/images/attackmodifier/icon.png"],[1,"attack-modifier-draw",3,"ngClass"],[3,"character","drawing"],["ghs-pointer-input","",1,"battlegoals-button",3,"ghs-label","ghs-label-attribute","singleClick"],["class","check","src","./assets/images/check.svg",4,"ngIf"],["src","./assets/images/check.svg",1,"check"],["ghs-pointer-input","",1,"items-button",3,"ghs-label","ghs-label-attribute","singleClick","doubleClick"],["ghs-pointer-input","",1,"loot",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],["src","./assets/images/status/loot.svg"],[1,"hand-size"],[1,"character-level"],["ghs-pointer-input","",1,"character-traits",3,"singleClick","doubleClick"],["src","./assets/images/fh/character/traits/trait.svg",1,"ghs-svg"],["class","divider",4,"ngIf"],[1,"trait",3,"ghs-label"],[1,"divider"],[1,"items-container-permanent"],[1,"attack-modifierdeck-container","permanent",3,"ngClass"]],template:function(e,i){1&e&&(t.YNc(0,pB,6,11,"div",0),t.TgZ(1,"div",1),t._UZ(2,"ghs-entity-index-key",2)(3,"ghs-character-image",3),t.YNc(4,MB,6,8,"ng-container",4),t.TgZ(5,"div",5),t.YNc(6,UB,27,25,"ng-container",4),t.YNc(7,RB,8,4,"ng-container",4),t._UZ(8,"span",6),t.YNc(9,KB,19,16,"ng-container",4),t.TgZ(10,"a",7),t.NdJ("singleClick",function(l){return i.settingsManager.settings.characterSheet?i.openCharacterSheet():i.openEntityMenu(l)})("doubleClick",function(){return i.characterFullView()}),t._UZ(11,"img",8),t.qZA(),t.YNc(12,$B,2,1,"div",9),t.YNc(13,WB,2,1,"div",10),t.YNc(14,iz,4,1,"div",11),t.qZA(),t._UZ(15,"ghs-figure-errors",12),t.qZA(),t.YNc(16,oz,2,1,"div",13),t.YNc(17,az,3,4,"div",14)),2&e&&(t.Q6J("ngIf",!i.character.absent),t.xp6(1),t.Udp("--ghs-character-color",i.character.color),t.Q6J("ngClass",t.qlk(20,sz,i.character.off||i.character.exhausted||i.character.health<=0||i.character.absent,!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition],i.character.absent,i.settingsManager.settings.characterAttackModifierDeck&&i.character.attackModifierDeckVisible&&!i.settingsManager.settings.characterAttackModifierDeckPermanent||i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot&&i.character.lootCardsVisible,i.compact,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme,i.character.active&&("modern"==i.settingsManager.settings.theme||i.compact))),t.xp6(1),t.Q6J("entity",i.character),t.xp6(1),t.Q6J("character",i.character),t.xp6(1),t.Q6J("ngIf",!i.character.absent),t.xp6(2),t.Q6J("ngIf",!i.character.absent),t.xp6(1),t.Q6J("ngIf",i.character.absent),t.xp6(2),t.Q6J("ngIf",!i.character.absent),t.xp6(1),t.Q6J("ghs-label","character.progress")("ghs-label-attribute","title")("ngClass",t.VKq(29,rz,i.settingsManager.settings.characterHandSize)),t.xp6(1),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterHandSize&&!i.character.absent),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterHandSize&&!i.character.absent),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterTraits&&!i.character.absent&&i.character.traits.length>0),t.xp6(1),t.Q6J("figure",i.character),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterItems&&i.settingsManager.settings.characterItemsPermanent&&(i.character.itemsVisible||i.settingsManager.settings.characterItemsPermanentActive&&i.character.active&&i.character.progress.items.length>0)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierDeckPermanent))},dependencies:[x.mk,x.sg,x.O5,jO,Kf,g9,s_,AT,VO,S9,IT,NT,Gu,im,ie,An,aa,Ii,sg],styles:['.attack-modifierdeck-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:5;width:0;height:0;visibility:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;overflow-x:auto;overflow-y:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * 1.5 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));z-index:5}.attack-modifierdeck-container.active[_ngcontent-%COMP%], .attack-modifierdeck-container.loot-cards-container[_ngcontent-%COMP%], .loot-cards-container.active[_ngcontent-%COMP%], .loot-cards-container.loot-cards-container[_ngcontent-%COMP%]{visibility:visible;width:100%;height:100%}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor))}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 17 * var(--ghs-text-factor));-ms-overflow-style:none;scrollbar-width:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar, .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 17)}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);z-index:3}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 8.6666666667 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;inset:0;display:block}.attack-modifierdeck-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%]{display:inline-block;position:relative;cursor:zoom-out;top:0;left:0;z-index:2;width:100%;height:100%}.summons-container[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;align-items:center;transition:max-height 2s ease-out;max-height:100%;min-width:calc(var(--ghs-unit) * 7);max-width:calc(var(--ghs-unit) * 96)}.summons-container.empty[_ngcontent-%COMP%]{max-height:0}.summons-container[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:none;width:calc(var(--ghs-unit) * 10.5);height:100%}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:block;width:auto;height:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:100%;width:auto;filter:var(--ghs-filter-shadow)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{position:absolute;top:50%;left:calc(var(--ghs-unit) * -4);transform:translateY(-50%);width:calc(var(--ghs-unit) * 3.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-darkgray);opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:not(.empty){opacity:1;transform:translate(0)}.summons-container[_ngcontent-%COMP%] .entities-menu.empty[_ngcontent-%COMP%]{opacity:0;max-width:0;height:0;transform:translateY(100%)}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%]{cursor:initial;pointer-events:none}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{display:none}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.icon[_ngcontent-%COMP%]{opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.menu[_ngcontent-%COMP%]{opacity:1}.summons-container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;max-width:calc(var(--ghs-unit) * 77.5)}.summons-container.off[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:grayscale(100%)}.character[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-character-color);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;--ghs-character-color: #000;border-radius:calc(var(--ghs-unit) * .5);filter:var(--ghs-filter-outline);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.character.dimmed[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.dimmed[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{filter:grayscale(.15);opacity:.5}.character[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 5);left:calc(var(--ghs-unit) * 3.2);z-index:6}.character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);left:calc(var(--ghs-unit) * 2.4)}.character[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{z-index:2}.character[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.1);left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);z-index:4}.character[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0!important;width:100%!important}.character[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5);z-index:5}.character[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer;margin-left:calc(var(--ghs-unit) * 1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{max-width:calc(var(--ghs-unit) * 10);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center;white-space:nowrap}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:calc(var(--ghs-unit) * 5.5);margin-left:calc(var(--ghs-unit) * -1.1);margin-right:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.exhausted[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1);height:calc(var(--ghs-unit) * 4);width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-white);font-family:var(--ghs-font-text);margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7);margin:0 calc(var(--ghs-unit) * .1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token.placeholder[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));z-index:1000}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%]{position:relative;z-index:999;width:0;height:0;top:50%;left:calc(var(--ghs-unit) * -3);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{position:absolute;width:0;height:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw.drawing[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18);height:calc(var(--ghs-unit) * 12)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;align-self:center;z-index:1}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor) * var(--ghs-text-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]:hover{opacity:.7}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.disabled[_ngcontent-%COMP%]{pointer-events:none}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * -1.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));color:var(--ghs-color-white)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));border-radius:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-70%,-50%);width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-green) var(--ghs-filter-outline)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.experience[_ngcontent-%COMP%]{color:var(--ghs-color-blue);margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.loot[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.absent[_ngcontent-%COMP%]{cursor:initial;opacity:.6}.character.absent[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:initial}.character[_ngcontent-%COMP%] .absent-menu[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 82);height:calc(var(--ghs-unit) * 14);cursor:pointer;z-index:2}.character[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));cursor:pointer;font-size:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 1.5)}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);filter:var(--ghs-filter-white)}.character[_ngcontent-%COMP%] ghs-figure-errors[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 14.5);top:50%;transform:translateY(-50%);z-index:99}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{position:relative;cursor:pointer;height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.character[_ngcontent-%COMP%] .character-sheet-button.hand-size-margin[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto;filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 14);top:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(hand-size-mask.5857c02745e3d418.svg);mask-image:url(hand-size-mask.5857c02745e3d418.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.6);z-index:-1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 13.3);top:calc(var(--ghs-unit) * 10);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:0;left:calc(var(--ghs-unit) * -.5);bottom:0;right:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:-1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 24.5);top:calc(var(--ghs-unit) * .5);width:calc(var(--ghs-unit) * 33);height:calc(var(--ghs-unit) * 2.64);display:flex;justify-content:space-evenly;align-items:center}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(outer-mask.f0af43cfab648186.svg);mask-image:url(outer-mask.f0af43cfab648186.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:0}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(inner-mask.f2d18d4a7559b09e.svg);mask-image:url(inner-mask.f2d18d4a7559b09e.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(.5);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .trait[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5);color:var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.8);height:calc(var(--ghs-unit) * 1.8);left:0;top:50%;transform:translateY(-45%) rotate(45deg);border:calc(var(--ghs-unit) * .2) solid var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:110%;width:auto;filter:var(--ghs-filter-white);transform:rotate(-45deg);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);z-index:0;filter:brightness(.5)}.character[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%]:before{transition:filter .15s ease-in-out}.character.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%]:before{filter:grayscale(1)!important}.character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] *[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}.character.fh[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10.25);background-image:url(char-mat_compact.b0d0dd33f05dffe7.png)}.character.compact[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3.1)}.character.compact[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.compact[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{display:none}.character.compact[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.5);left:calc(var(--ghs-unit) * 6.5);width:calc(var(--ghs-unit) * 5);height:calc(var(--ghs-unit) * 5)}.character.compact[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 1 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 13);width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 8)}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{flex-direction:row;justify-content:flex-start;align-items:center}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);margin-left:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12);margin-right:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%]{margin-bottom:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{margin-top:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 13.5);height:calc(var(--ghs-unit) * 9)}.character.compact[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2.7);right:calc(var(--ghs-unit) * 1.2)}.character.compact[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.3);right:calc(var(--ghs-unit) * 1)}.character.compact[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 11)}.character.compact[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{display:none}.character.modern[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 16);border-top-left-radius:calc(var(--ghs-unit) * 13);border-top-right-radius:calc(var(--ghs-unit) * 12);border-bottom-right-radius:calc(var(--ghs-unit) * 12);background-image:url(char-mat_modern.2238b82519930f08.png);background-blend-mode:hard-light;filter:none;overflow:hidden}.character.modern.dimmed[_ngcontent-%COMP%]{background-image:url(char-mat_modern.2238b82519930f08.png)}.character.modern[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 13.7)}.character.modern[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{top:0;left:0;width:calc(var(--ghs-unit) * 16);height:calc(var(--ghs-unit) * 16);margin:0}.character.modern[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:grayscale(1) brightness(.3)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 2.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -2.7 / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5);filter:grayscale(1) brightness(.3);margin-left:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 3.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 5.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 13.9);top:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 18);top:initial;bottom:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor))}']})),a})();const om=function(o){return[o]};function cz(o,a){if(1&o&&t._UZ(0,"div",15),2&o){const n=t.oxw();t.Q6J("ghs-label","character.progress.retirement.events")("ghs-label-args",t.VKq(2,om,n.character.retireEvent))}}function lz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",16)(1,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openConclusion())}),t._UZ(2,"span",18),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.conclusion")("ghs-label-args",t.VKq(2,om,n.conclusion.index))}}function gz(o,a){if(1&o&&t._UZ(0,"div",18),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.unlockCharacter")("ghs-label-args",t.VKq(2,om,n.personalQuest.unlockCharacter))}}function dz(o,a){if(1&o&&t._UZ(0,"div",18),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.openEnvelope")("ghs-label-args",t.VKq(2,om,n.personalQuest.openEnvelope))}}function hz(o,a){if(1&o&&(t.TgZ(0,"div",19),t.YNc(1,gz,1,4,"div",20),t.YNc(2,dz,1,4,"div",20),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.personalQuest.unlockCharacter),t.xp6(1),t.Q6J("ngIf",n.personalQuest.openEnvelope)}}function uz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",21)(1,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moveResources())}),t._UZ(2,"span",2),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.moveSupply"))}let _z=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"conclusion",void 0),(0,_.Z)(this,"personalQuest",void 0),this.character=e,this.dialogRef=i,this.dialog=s,this.conclusion=d.v.sectionData(this.character.edition).find(l=>l.retirement==this.character.name&&l.conclusion),this.character.progress.personalQuest&&(this.personalQuest=d.v.characterManager.personalQuestByCard(d.v.currentEdition(),this.character.progress.personalQuest))}openConclusion(){this.conclusion&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:this.conclusion,conclusionOnly:!0,rewardsOnly:null!=d.v.game.party.conclusions.find(e=>this.conclusion&&e.edition==this.conclusion.edition&&e.group==this.conclusion.group&&e.index==this.conclusion.index)}})}moveResources(){this.dialog.open(xw,{panelClass:"dialog",data:{character:this.character,all:!0}})}apply(){this.dialogRef.close(!0),this.personalQuest&&this.personalQuest.unlockCharacter&&R.r.settings.automaticUnlocking&&-1==d.v.game.unlockedCharacters.indexOf(this.personalQuest.unlockCharacter)&&d.v.game.unlockedCharacters.push(this.personalQuest.unlockCharacter),this.conclusion&&!d.v.game.party.conclusions.find(e=>this.conclusion&&e.edition==this.conclusion.edition&&e.group==this.conclusion.group&&e.index==this.conclusion.index)&&this.openConclusion()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-retirement-dialog"]],decls:18,vars:13,consts:[[1,"retirement-dialog"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"icon","character-icon",3,"src"],[1,"character-title"],[1,"rewards"],[3,"ghs-label","ghs-label-args"],["class","event text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","conclusion",4,"ngIf"],["class","personal-quest",4,"ngIf"],["class","additional",4,"ngIf"],[1,"menu"],[1,"cancel",3,"click"],[1,"apply",3,"click"],[1,"event","text-white",3,"ghs-label","ghs-label-args"],[1,"conclusion"],[3,"click"],[1,"text-white",3,"ghs-label","ghs-label-args"],[1,"personal-quest"],["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"additional"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"img",4),t.TgZ(5,"span",5),t._uU(6),t.qZA()()(),t.TgZ(7,"div",6),t._UZ(8,"span",7),t.qZA(),t.YNc(9,cz,1,4,"div",8),t.YNc(10,lz,3,4,"div",9),t.YNc(11,hz,3,2,"div",10),t.YNc(12,uz,3,1,"div",11),t.TgZ(13,"div",12)(14,"a",13),t.NdJ("click",function(){return i.close()}),t._UZ(15,"span",2),t.qZA(),t.TgZ(16,"a",14),t.NdJ("click",function(){return i.apply()}),t._UZ(17,"span",2),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","character.progress.retirement"),t.xp6(2),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(2),t.Oqu(i.gameManager.characterManager.characterName(i.character,!0)),t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.prosperity")("ghs-label-args",t.VKq(11,om,i.gameManager.fhRules()?"2":"1")),t.xp6(1),t.Q6J("ngIf",i.character.retireEvent),t.xp6(1),t.Q6J("ngIf",i.conclusion),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.gameManager.fhRules()),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.apply"))},dependencies:[x.O5,ie],styles:[".retirement-dialog[_ngcontent-%COMP%]{padding:.5em;color:var(--ghs-color-white)}.retirement-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 44 * var(--ghs-dialog-factor))}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title[_ngcontent-%COMP%]{display:flex;align-items:center}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title.absent[_ngcontent-%COMP%]{text-decoration:line-through}.retirement-dialog[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.retirement-dialog[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{cursor:pointer}.retirement-dialog[_ngcontent-%COMP%] .event[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:1.5em}.retirement-dialog[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;flex-direction:column;justify-content:center;align-items:center}.retirement-dialog[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:1.5em;padding:.2em}.retirement-dialog[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.retirement-dialog[_ngcontent-%COMP%] .personal-quest[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.retirement-dialog[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.retirement-dialog[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:1.5em;padding:.2em}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();function pz(o,a){if(1&o&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.hij("",n+1,".")}}const zw=function(o,a,n){return{active:o,disabled:a,spent:n}};function fz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleHerb(i,2))}),t._UZ(1,"img",22),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.kEZ(2,zw,e.receipe.length>2&&e.receipe[2]==n,e.receipe[2]!=n&&0==(e.character.progress.loot[n]||0)&&0==(e.gameManager.game.party.loot[n]||0),e.receipe[2]!=n&&((e.characterSpent[n]||0)>0||(e.fhSupportSpent[n]||0)>0)&&(e.character.progress.loot[n]||0)<=(e.characterSpent[n]||0)&&(e.gameManager.game.party.loot[n]||0)<=(e.fhSupportSpent[n]||0))),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH)}}function mz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.moveHerb(i,s.characterSpent,s.fhSupportSpent))}),t._UZ(1,"img",28),t.qZA()}}function vz(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",25),t._uU(2),t.qZA(),t.YNc(3,mz,2,0,"a",26),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",e.characterSpent[n]||"-"," / ",e.character.progress.loot[n]||0," "),t.xp6(1),t.Q6J("ngIf",e.characterSpent[n]&&(e.gameManager.game.party.loot[n]||0)>(e.fhSupportSpent[n]||0))}}function Cz(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Mz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.moveHerb(i,s.fhSupportSpent,s.characterSpent))}),t._UZ(1,"img",29),t.qZA()}}function Oz(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Mz,2,0,"a",26),t.TgZ(2,"span",25),t._uU(3),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.fhSupportSpent[n]&&(e.character.progress.loot[n]||0)>(e.characterSpent[n]||0)),t.xp6(1),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",e.fhSupportSpent[n]||"-"," / ",e.gameManager.game.party.loot[n]||0," ")}}function Pz(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function yz(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",21),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleHerb(s,0))}),t._UZ(2,"img",22),t.qZA(),t.TgZ(3,"span",21),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleHerb(s,1))}),t._UZ(4,"img",22),t.qZA(),t.YNc(5,fz,2,6,"span",23),t.TgZ(6,"span",24),t.YNc(7,vz,4,5,"ng-container",11),t.YNc(8,Cz,2,0,"span",11),t.qZA(),t.TgZ(9,"span",24),t.YNc(10,Oz,4,5,"ng-container",11),t.YNc(11,Pz,2,0,"span",11),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.kEZ(9,zw,e.receipe.length>0&&e.receipe[0]==n,e.receipe[0]!=n&&0==(e.character.progress.loot[n]||0)&&0==(e.gameManager.game.party.loot[n]||0),e.receipe[0]!=n&&((e.characterSpent[n]||0)>0||(e.fhSupportSpent[n]||0)>0)&&(e.character.progress.loot[n]||0)<=(e.characterSpent[n]||0)&&(e.gameManager.game.party.loot[n]||0)<=(e.fhSupportSpent[n]||0))),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.kEZ(13,zw,e.receipe.length>1&&e.receipe[1]==n,e.receipe[1]!=n&&0==(e.character.progress.loot[n]||0)&&0==(e.gameManager.game.party.loot[n]||0),e.receipe[1]!=n&&((e.characterSpent[n]||0)>0||(e.fhSupportSpent[n]||0)>0)&&(e.character.progress.loot[n]||0)<=(e.characterSpent[n]||0)&&(e.gameManager.game.party.loot[n]||0)<=(e.fhSupportSpent[n]||0))),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",3==e.brewing),t.xp6(2),t.Q6J("ngIf",e.character.progress.loot[n]),t.xp6(1),t.Q6J("ngIf",!e.character.progress.loot[n]),t.xp6(2),t.Q6J("ngIf",e.gameManager.game.party.loot[n]),t.xp6(1),t.Q6J("ngIf",!e.gameManager.game.party.loot[n])}}function bz(o,a){if(1&o&&t._UZ(0,"img",22),2&o){const n=t.oxw().$implicit;t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH)}}function xz(o,a){1&o&&t._UZ(0,"img",33)}function wz(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"+"),t.qZA())}function kz(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeHerb(s,!1))}),t.YNc(2,bz,1,1,"img",31),t.YNc(3,xz,1,0,"img",32),t.YNc(4,wz,2,0,"span",11),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(2),t.Q6J("ngIf",n),t.xp6(1),t.Q6J("ngIf",!n),t.xp6(1),t.Q6J("ngIf",e{var o;class a{constructor(e,i,s){if((0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"herbs",[le.CG.arrowvine,le.CG.axenut,le.CG.corpsecap,le.CG.flamefruit,le.CG.rockroot,le.CG.snowthistle]),(0,_.Z)(this,"brewing",void 0),(0,_.Z)(this,"characterSpent",{}),(0,_.Z)(this,"fhSupportSpent",{}),(0,_.Z)(this,"receipe",[void 0,void 0]),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"brewed",void 0),(0,_.Z)(this,"otherCharacters",[]),(0,_.Z)(this,"otherCharacter",void 0),(0,_.Z)(this,"noChar",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.character=e,this.dialogRef=i,this.dialog=s,this.brewing=0,d.v.fhRules()&&d.v.game.party.campaignMode&&d.v.game.party.buildings){const l=d.v.game.party.buildings.find(m=>"alchemist"==m.name&&"wrecked"!=m.state);l&&l.level&&(this.brewing=l.level<3?2:3)}}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.updateItem()}),this.updateItem()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}updateItem(){const e=this.getItem();this.item=e&&d.v.game.party.unlockedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)&&e,this.brewed=void 0,this.otherCharacters=[],this.otherCharacter=void 0,this.noChar=!1}addHerb(e,i,s=-1){e&&(i||(this.character.progress.loot[e]&&(this.character.progress.loot[e]||0)>(this.characterSpent[e]||0)?i=this.characterSpent:d.v.game.party.loot[e]&&(d.v.game.party.loot[e]||0)>(this.fhSupportSpent[e]||0)&&(i=this.fhSupportSpent)),i&&(i[e]=(i[e]||0)+1,this.receipe[s>-1?s:this.receipe.length]=e)),this.updateItem()}removeHerb(e,i,s=-1){this.receipe[s>-1?s:this.receipe.indexOf(e)]=void 0,2==s&&this.receipe.splice(2,1),e&&(i||(i=this.fhSupportSpent[e]?this.fhSupportSpent:this.characterSpent),i[e]=(i[e]||1)-1),this.updateItem()}toggleHerb(e,i){const s=this.receipe[i]!=e;this.receipe[i]&&this.removeHerb(this.receipe[i],!1,i),s&&((this.character.progress.loot[e]||0)<=(this.characterSpent[e]||0)&&(d.v.game.party.loot[e]||0)<=(this.fhSupportSpent[e]||0)&&this.removeHerb(e,!1),this.addHerb(e,!1,i))}moveHerb(e,i,s){i[e]=(i[e]||1)-1,s[e]=(s[e]||0)+1}brew(){this.brewed=this.getItem(),this.brewed&&(this.otherCharacter?this.brewInternal(this.otherCharacter,this.brewed):this.character.progress.items.find(e=>this.brewed&&e.name==""+this.brewed.id&&e.edition==this.brewed.edition)?(this.otherCharacters=d.v.game.figures.filter(e=>e instanceof oe.z&&e!=this.character&&!e.progress.items.find(i=>this.brewed&&i.name==""+this.brewed.id&&i.edition==this.brewed.edition)).map(e=>e),this.noChar=0==this.otherCharacters.length,1==this.otherCharacters.length&&(this.otherCharacter=this.otherCharacters[0])):(this.brewInternal(this.character,this.brewed),this.otherCharacters=[],this.otherCharacter=void 0,this.noChar=!1))}brewInternal(e,i){this.otherCharacter=e!=this.character?e:void 0,d.v.stateManager.before(this.otherCharacter?"brewPotionOther":"brewPotion",this.character.name,""+i.id,i.name,e.name),this.herbs.forEach(s=>{this.fhSupportSpent[s]&&(d.v.game.party.loot[s]=(d.v.game.party.loot[s]||0)-(this.fhSupportSpent[s]||0)),this.characterSpent[s]&&(this.character.progress.loot[s]=(this.character.progress.loot[s]||0)-(this.characterSpent[s]||0))}),d.v.game.party.unlockedItems.find(s=>s.name==""+i.id&&s.edition==i.edition)||d.v.game.party.unlockedItems.push(new Vn.Jc(""+i.id,i.edition)),e.progress.items.push(new Vn.xb(""+i.id,i.edition)),d.v.stateManager.after(),this.brewed=i,this.otherCharacter=e!=this.character?e:void 0}getItem(){if(this.receipe[0]&&this.receipe[1])return this.receipe.filter((e,i,s)=>e&&s.indexOf(e)==i).length!=this.receipe.filter(e=>e).length?d.v.itemManager.getItems(d.v.currentEdition(),!0).find(e=>!(e.requiredItems&&e.requiredItems.length||"alchemist"!=e.requiredBuilding||!(this.receipe[2]?e.requiredBuildingLevel>=3:e.requiredBuildingLevel<3)||e.resources)):d.v.itemManager.getItems(d.v.currentEdition(),!0).find(e=>(!e.requiredItems||!e.requiredItems.length)&&"alchemist"==e.requiredBuilding&&(this.receipe[2]?e.requiredBuildingLevel>=3:e.requiredBuildingLevel<3)&&e.resources&&this.herbs.every(i=>e.resources&&this.receipe.filter(s=>s==i).length==(e.resources[i]||0)))}openItemDialog(){this.dialog.open(gg,{data:{item:this.brewed||this.item}})}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-items-brew"]],decls:29,vars:36,consts:[[1,"items-brew-dialog",3,"ngClass"],[1,"scroll-container"],[1,"title"],[3,"ghs-label"],[1,"table"],["class","head-col first",4,"ngFor","ngForOf"],[1,"first"],[1,"icon","character-icon",3,"src"],[1,"name",3,"ngClass"],[4,"ngFor","ngForOf"],[1,"receipe"],[4,"ngIf"],["class","placeholder text-white item",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","herb",4,"ngIf"],["class","receipe",4,"ngIf"],["class","brewed",4,"ngIf"],[1,"menu"],[1,"cancel",3,"click"],[1,"apply",3,"ngClass","click"],[3,"ghs-label","ghs-label-args"],[1,"head-col","first"],[1,"head-col","calc-col","toggle",3,"ngClass","click"],[1,"ghs-svg",3,"src"],["class","head-col calc-col toggle",3,"ngClass","click",4,"ngIf"],[1,"calc-col"],[1,"value",3,"ghs-label","ghs-label-attribute"],["class","button",3,"click",4,"ngIf"],[1,"button",3,"click"],["src","./assets/images/right.svg",1,"ghs-svg"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"herb",3,"click"],["class","ghs-svg",3,"src",4,"ngIf"],["class","ghs-svg","src","./assets/images/fh/loot/unknown.svg",4,"ngIf"],["src","./assets/images/fh/loot/unknown.svg",1,"ghs-svg"],[1,"placeholder","text-white","item",3,"ghs-label","ghs-label-args"],[1,"herb"],[1,"placeholder","text-white","item",3,"ghs-label"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[1,"name"],[1,"placeholder","item","already",3,"ghs-label"],[1,"brewed"],[3,"item","flipped","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"label",2),t._UZ(3,"span",3),t.qZA(),t.TgZ(4,"div",4),t.YNc(5,pz,2,1,"span",5),t.ALo(6,"ghsRange"),t.TgZ(7,"span",6),t._UZ(8,"img",7),t.TgZ(9,"span",8),t._uU(10),t.qZA()(),t.TgZ(11,"span",6),t._UZ(12,"span",3),t.qZA(),t.YNc(13,yz,12,17,"ng-container",9),t.qZA(),t.TgZ(14,"div",10),t.YNc(15,kz,5,3,"ng-container",9),t.YNc(16,Tz,2,0,"span",11),t.YNc(17,Zz,1,5,"span",12),t.YNc(18,Az,1,5,"span",12),t.YNc(19,Sz,2,0,"span",13),t.qZA(),t.YNc(20,Dz,2,7,"div",14),t.YNc(21,Jz,5,2,"ng-container",11),t.YNc(22,Uz,2,1,"div",14),t.YNc(23,Lz,2,2,"div",15),t.TgZ(24,"div",16)(25,"a",17),t.NdJ("click",function(){return i.close()}),t._UZ(26,"span",3),t.qZA(),t.TgZ(27,"a",18),t.NdJ("click",function(){return i.brew()}),t._UZ(28,"span",19),t.qZA()()()()),2&e&&(t.Q6J("ngClass",t.WLB(26,Qz,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ghs-label","game.items.brewing"),t.xp6(1),t.Udp("--ghs-summary-columns",2+i.brewing),t.xp6(1),t.Q6J("ngForOf",t.xi3(6,23,t.DdM(29,Rz),i.brewing)),t.xp6(3),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(30,Fz,i.character.absent)),t.xp6(1),t.hij(" ",i.gameManager.characterManager.characterName(i.character)," "),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(1),t.Q6J("ngForOf",i.herbs),t.xp6(2),t.Q6J("ngForOf",i.receipe),t.xp6(1),t.Q6J("ngIf",!i.brewed||i.otherCharacters.length>0||i.noChar),t.xp6(1),t.Q6J("ngIf",i.item&&(!i.brewed||i.noChar)),t.xp6(1),t.Q6J("ngIf",i.brewed&&i.otherCharacters.length>0),t.xp6(1),t.Q6J("ngIf",!i.item&&!i.brewed),t.xp6(1),t.Q6J("ngIf",i.brewed&&0==i.otherCharacters.length&&!i.noChar),t.xp6(1),t.Q6J("ngIf",i.brewed&&i.otherCharacters.length>0),t.xp6(1),t.Q6J("ngIf",i.noChar),t.xp6(1),t.Q6J("ngIf",i.brewed||i.item),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngClass",t.VKq(32,qz,i.noChar||i.brewed&&(0==i.otherCharacters.length||!i.otherCharacter)||i.receipe.length<2||!i.receipe[0]||!i.receipe[1])),t.xp6(1),t.Q6J("ghs-label","game.items.brewing.brew"+(i.otherCharacter?"For":""))("ghs-label-args",t.VKq(34,Hz,i.otherCharacter?i.gameManager.characterManager.characterName(i.otherCharacter,!0):"")))},dependencies:[x.mk,x.sg,x.O5,Xd,ie,Ii],styles:[".items-brew-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em}.items-brew-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.items-brew-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-summary-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-summary-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white);overflow:auto}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white)}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-image:url(dialog_background.fa4ff388462f6a00.png);position:sticky;left:0;z-index:1}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{cursor:pointer}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray);opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.active[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.spent[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow);opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.disabled[_ngcontent-%COMP%]{pointer-events:none}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);opacity:.4}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:0 .15em;white-space:nowrap}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:0 .15em}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto}.items-brew-dialog.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.items-brew-dialog.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white)}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .herb[_ngcontent-%COMP%]{display:flex;align-items:center}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .herb[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));filter:var(--ghs-filter-white)}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{margin-left:.5em}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .already[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100%}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin:.25em;padding:.25em;border:1px solid transparent}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.items-brew-dialog[_ngcontent-%COMP%] .brewed[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%}.items-brew-dialog[_ngcontent-%COMP%] .brewed[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}"]})),a})();function Bz(o,a){if(1&o&&t._UZ(0,"img",23),2&o){const n=t.oxw().$implicit;t.Q6J("src","./assets/images/items/slots/"+n.slot+".svg",t.LSH)}}function zz(o,a){if(1&o&&t._UZ(0,"span",24),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.itemFh."+n.id+"%")}}function Gz(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0("),t._UZ(2,"span",1),t._uU(3,")"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function Vz(o,a){1&o&&(t.TgZ(0,"span",25),t._UZ(1,"img",26),t.qZA())}function Yz(o,a){1&o&&(t.TgZ(0,"div",27),t._UZ(1,"img",28),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-tooltip","game.items.effect")("hint",!0))}const Kz=function(o){return{ignore:o}};function $z(o,a){if(1&o&&(t.TgZ(0,"span",29),t._UZ(1,"img",30),t._uU(2),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(2,Kz,e.gameManager.characterManager.ignoreNegativeItemEffects(e.character))),t.xp6(2),t.hij(" x",n.minusOne," ")}}const Wz=function(o){return{disabled:o}};function Xz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"span",9),t.YNc(2,Bz,1,1,"img",10),t.YNc(3,zz,1,1,"span",11),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.qZA(),t.TgZ(6,"span",13),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEquippedItem(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEquippedItem(s,!0))}),t.TgZ(7,"span"),t._uU(8),t.qZA(),t.YNc(9,Gz,4,1,"span",14),t.qZA(),t._UZ(10,"span",15),t.YNc(11,Vz,2,0,"span",16),t.YNc(12,Yz,2,2,"div",17),t.YNc(13,$z,3,4,"span",18),t.TgZ(14,"a",19),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.sellItem(s))}),t._UZ(15,"img",20),t._uU(16),t.qZA(),t.TgZ(17,"a",21),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeItem(s))}),t._UZ(18,"img",22),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Q6J("ngIf",n.slot),t.xp6(1),t.Q6J("ngIf",!n.slot),t.xp6(2),t.hij("",n.id,"."),t.xp6(1),t.Q6J("ngClass",t.VKq(10,Wz,e.gameManager.game.state!=e.GameState.draw||e.gameManager.game.round>0)),t.xp6(2),t.Oqu(n.name),t.xp6(1),t.Q6J("ngIf",n.edition!=e.itemEdition),t.xp6(2),t.Q6J("ngIf",e.isEquipped(n)),t.xp6(1),t.Q6J("ngIf",e.gameManager.characterManager.itemEffect(n)),t.xp6(1),t.Q6J("ngIf",e.isEquipped(n)&&n.minusOne),t.xp6(3),t.hij(" ",e.gameManager.itemManager.itemSellValue(n)," ")}}function tG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.brewDialog())}),t._UZ(1,"img",32)(2,"span",1),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","game.items.brewing"))}let eG=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"itemIndex",1),(0,_.Z)(this,"itemEdition",""),(0,_.Z)(this,"brewing",0),(0,_.Z)(this,"herbs",[le.CG.rockroot,le.CG.snowthistle,le.CG.axenut,le.CG.flamefruit,le.CG.corpsecap,le.CG.arrowvine]),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.updateItems(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.updateItems()}}),this.itemEdition||(this.itemEdition=d.v.currentEdition(this.character.edition)),this.editionChange()}ngOnDestroy(){this.itemEdition&&(this.itemEdition=d.v.currentEdition(this.character.edition)),this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}updateItems(){if(this.items=[],this.character.progress.items&&(this.character.progress.items.forEach(e=>{const i=d.v.itemManager.getItem(+e.name,e.edition,!0);i?this.items.push(i):console.warn("Unknown Item for edition '"+e.edition+"': "+e.name)}),this.items.sort((e,i)=>e.id-i.id)),this.brewing=0,d.v.fhRules()&&d.v.game.party.campaignMode&&d.v.game.party.buildings){const e=d.v.game.party.buildings.find(i=>"alchemist"==i.name&&"wrecked"!=i.state);e&&e.level&&(this.brewing=e.level<3?2:3)}}brewDialog(){this.dialog.open(jz,{panelClass:["dialog"],data:this.character})}itemDialog(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character}})}itemChange(e=0){setTimeout(()=>{if(0!=e){const i=d.v.itemManager.maxItemIndex(this.itemEdition||this.character.edition);for(this.itemIndex+=e,this.itemIndex<1&&(this.itemIndex=i),this.item=d.v.itemManager.getItem(this.itemIndex,this.itemEdition&&this.itemEdition||this.character.edition,!1);!this.item&&this.itemIndex>0&&this.itemIndexi&&(this.itemIndex=1,this.item=d.v.itemManager.getItem(this.itemIndex,this.itemEdition||this.character.edition,!1))}else this.item=d.v.itemManager.getItem(this.itemIndex,this.itemEdition||this.character.edition,!1)})}editionChange(){if(this.itemIndex=1,this.itemEdition){const e=d.v.editionData.find(i=>i.edition==this.itemEdition);e&&e.items&&(this.itemIndex=Math.min(...e.items.map(i=>i.id)))}this.itemChange()}canAdd(e){if(e){const i=this.assigned(e);if(e.count&&ie&&s.name==""+e.id&&s.edition==e.edition))return!0}return!1}assigned(e){return d.v.game.figures.filter(i=>i instanceof oe.z&&i.progress&&i.progress.items).map(i=>i).map(i=>i.progress&&i.progress.items).reduce((i,s)=>i&&s&&i.concat(s)).filter(i=>e&&i.name==""+e.id&&i.edition==e.edition).length}canBuy(e,i=0){return e&&e.cost&&e.cost+d.v.itemManager.pricerModifier()+i<=this.character.progress.gold&&this.canAdd(e)||!1}canCraft(e,i={}){if(e){let s=!0;return e.resources&&Object.keys(e.resources).forEach(l=>{const m=l,O=(e.resources[m]||0)+(i[m]||0);s=(0,le.tH)(m)==le.XA.herb_resources?s&&((this.character.progress.loot[m]||0)>=O||(d.v.game.party.loot[m]||0)>=O):s&&(this.character.progress.loot[m]||0)>=O}),e.requiredItems&&e.requiredItems.forEach(l=>{if(l!=e.id){const m=d.v.itemManager.getItem(l,e.edition,!0);m?this.items.find(O=>O.id==m.id&&O.edition==m.edition)||(s=s&&(this.canCraft(m,e.resources||{})||this.canBuy(m,e.cost))):console.error("Missing required item '"+l+"' for item '"+e.id+"' ("+e.name+")")}}),s}return!1}addItem(e,i=!1){e&&(this.canAdd(e)||i)&&(d.v.stateManager.before("addItem","data.character."+this.character.name,e.id+"",e.edition),this.character.progress.items.push(new Vn.xb(e.id+"",e.edition)),this.items.push(e),this.items.sort((s,l)=>s.id-l.id),d.v.stateManager.after(),this.itemChange())}buyItem(e){e&&this.canBuy(e)&&(d.v.stateManager.before("buyItem","data.character."+this.character.name,e.id+"",e.edition),this.character.progress.gold-=e.cost+d.v.itemManager.pricerModifier(),this.character.progress.items.push(new Vn.xb(e.id+"",e.edition)),this.items.push(e),this.items.sort((i,s)=>i.id-s.id),d.v.stateManager.after(),this.itemChange())}craftItemResources(e){this.canCraft(e)&&(e.resources&&Object.keys(e.resources).forEach(i=>{const s=i,l=e.resources[s]||0;(0,le.tH)(s)==le.XA.herb_resources?(this.character.progress.loot[s]||0)>=l?this.character.progress.loot[s]=(this.character.progress.loot[s]||0)-l:d.v.game.party.loot[s]=(d.v.game.party.loot[s]||0)-l:this.character.progress.loot[s]=(this.character.progress.loot[s]||0)-l}),e.requiredItems&&e.requiredItems.forEach(i=>{if(i!=e.id){const s=d.v.itemManager.getItem(i,e.edition,!0);if(s)if(this.items.find(l=>l.id==s.id&&l.edition==s.edition)){const l=this.character.progress.items.find(m=>m.name==""+s.id&&m.edition==s.edition);if(l){const m=this.character.progress.items.indexOf(l);this.character.progress.items.splice(m,1),this.character.progress.equippedItems=this.character.progress.equippedItems.filter(O=>O.name!=""+s.id||O.edition!=s.edition),this.items.splice(m,1)}}else this.canBuy(s)?this.character.progress.gold-=e.cost+d.v.itemManager.pricerModifier():this.craftItemResources(s);else console.error("Missing required item '"+i+"' for item '"+e.id+"' ("+e.name+")")}}))}craftItem(e){e&&this.canCraft(e)&&(d.v.stateManager.before("craftItem","data.character."+this.character.name,e.id+"",e.edition),this.craftItemResources(e),this.character.progress.items.push(new Vn.xb(e.id+"",e.edition)),this.items.push(e),this.items.sort((i,s)=>i.id-s.id),d.v.stateManager.after(),this.itemChange())}removeItem(e){const i=this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(i){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("removeItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),this.character.progress.items.splice(s,1),this.character.progress.equippedItems=this.character.progress.equippedItems.filter(l=>l.name!=""+e.id||l.edition!=e.edition),this.items.splice(s,1),d.v.stateManager.after(),this.itemChange()}}sellItem(e){const i=this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(i&&d.v.itemManager.itemSellValue(e)){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("sellItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),this.character.progress.gold+=d.v.itemManager.itemSellValue(e),this.character.progress.items.splice(s,1),this.character.progress.equippedItems=this.character.progress.equippedItems.filter(l=>l.name!=""+e.id||l.edition!=e.edition),this.items.splice(s,1),d.v.stateManager.after(),this.itemChange()}}isEquipped(e){return this.character.progress.equippedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}toggleEquippedItem(e,i=!1){(!(d.v.game.state!=ge.D2.draw||d.v.game.round>0)||i)&&null!=this.character.progress.items.find(l=>l.name==""+e.id&&l.edition==e.edition)&&(d.v.stateManager.before(d.v.itemManager.isEquipped(e,this.character)?"unequipItem":"equipItem","data.character."+this.character.name,""+e.id,e.edition),d.v.itemManager.toggleEquippedItem(e,this.character,i),d.v.stateManager.after())}setItemNotes(e){this.character.progress.itemNotes!=e.target.value&&(d.v.stateManager.before("setItems","data.character."+this.character.name,e.target.value),this.character.progress.itemNotes=e.target.value,d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-items"]],inputs:{character:"character"},decls:11,vars:4,consts:[[1,"items"],[3,"ghs-label"],[1,"item-list"],["class","item-entry",4,"ngFor","ngForOf"],[1,"item-form"],[1,"shop",3,"click"],["src","./assets/images/items/item.svg"],[3,"click",4,"ngIf"],[1,"item-entry"],[1,"icon"],[3,"src",4,"ngIf"],["class","item placeholder",3,"ghs-label",4,"ngIf"],[1,"id"],["ghs-pointer-input","",1,"name",3,"ngClass","singleClick","doubleClick"],[4,"ngIf"],[1,"spacer"],["class","equipped",4,"ngIf"],["class","effect hint-container",4,"ngIf"],["class","minus-one",3,"ngClass",4,"ngIf"],[1,"button","loot",3,"click"],["src","./assets/images/loot.svg"],[1,"button","remove",3,"click"],["src","./assets/images/close.svg"],[3,"src"],[1,"item","placeholder",3,"ghs-label"],[1,"equipped"],["src","./assets/images/check.svg"],[1,"effect","hint-container"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg",3,"ghs-tooltip","hint"],[1,"minus-one",3,"ngClass"],["src","./assets/images/action/card/minus1.svg"],[3,"click"],["src","./assets/images/fh/brewing.svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label"),t._UZ(2,"span",1),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",2),t.YNc(5,Xz,19,12,"div",3),t.qZA(),t.TgZ(6,"div",4)(7,"a",5),t.NdJ("click",function(){return i.itemDialog()}),t._UZ(8,"img",6)(9,"span",1),t.qZA(),t.YNc(10,tG,3,1,"a",7),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","game.items"),t.xp6(3),t.Q6J("ngForOf",i.items),t.xp6(4),t.Q6J("ghs-label","game.items.character.shop"),t.xp6(1),t.Q6J("ngIf",i.brewing))},dependencies:[x.mk,x.sg,x.O5,ie,An,Ba],styles:[".items{display:flex;flex-direction:column}.items img{width:auto;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .button{cursor:pointer;display:flex;align-items:center}.items .button.add img{filter:var(--ghs-filter-green)}.items .button.remove img{filter:var(--ghs-filter-red)}.items .button.loot{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.items .button.loot img{filter:var(--ghs-filter-yellow);width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .button.craft{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));color:var(--ghs-color-black)}.items .button.craft .resource{display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .button.craft .resource img{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .button.craft .item{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .button.disabled{color:var(--ghs-color-darkgray)!important}.items .button.disabled img{filter:var(--ghs-filter-darkgray)!important}.items .button.disabled .item,.items .button.disabled .resource img{opacity:.6}.items .button:hover{opacity:.8}.items .item-list{font-family:var(--ghs-font-text);display:flex;flex-direction:column;overflow:visible}.items .item-list .item-entry{display:flex;align-items:center;margin:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor))}.items .item-list .item-entry .icon{display:flex;justify-content:center;align-items:center;position:relative;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .id{text-align:right;margin-right:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .id{display:flex;justify-content:flex-end;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .item-list .item-entry .name{cursor:pointer;display:inline-block;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .item-list .item-entry .name.disabled{cursor:initial}.items .item-list .item-entry .edition{font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .action-icon{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center}.items .item-list .item-entry .action-icon img{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.items .item-list .item-entry .loot{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .equipped{display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .equipped img{filter:var(--ghs-filter-green);height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:auto}.items .item-list .item-entry .effect.hint-container .hint-trigger.ghs-svg{filter:var(--ghs-filter-gray)}.items .item-list .item-entry .effect.hint-container .hint{left:initial;right:0}.items .item-list .item-entry .minus-one{font-family:var(--ghs-font-title);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .minus-one img{margin-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.items .item-list .item-entry .minus-one.ignore{opacity:.5}.items .item-form{display:flex;justify-content:space-evenly;align-items:center;max-width:calc(var(--ghs-unit) * 33 * var(--ghs-dialog-factor))}.items .item-form a{cursor:pointer;color:var(--ghs-color-black);display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.items .item-form a img{height:1em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}\n"],encapsulation:2})),a})();const nG=["charactertitle"];function iG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"input",63,64),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.titleChange())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("value",n.character.title)}}function oG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t._UZ(1,"img",5),t.TgZ(2,"input",63),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw(2);return t.KtG(m.setTitle(i,l))}),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",e.gameManager.characterManager.characterIdentityIcon(e.character.name,n),t.LSH),t.xp6(1),t.Q6J("value",e.titles[n])}}const r_=function(){return[]};function aG(o,a){if(1&o&&(t.ynx(0),t.YNc(1,oG,3,2,"ng-container",19),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,r_),n.character.identities.length))}}const c_=function(o){return{checked:o}};function sG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",65),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s+1))}),t._uU(2),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,c_,e.character.level>n)),t.xp6(1),t.Oqu(n+1)}}function rG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",66),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s+1))}),t._uU(2),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,c_,e.character.progress.experience>=e.gameManager.characterManager.xpMap[n])),t.xp6(1),t.hij(" ",e.gameManager.characterManager.xpMap[n]," ")}}function cG(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",12),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.notes"))}function lG(o,a){1&o&&(t.TgZ(0,"label"),t._UZ(1,"span",12),t._uU(2,":"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.gold-notes"))}function gG(o,a){1&o&&(t.TgZ(0,"label"),t._UZ(1,"span",12)(2,"img",67),t._uU(3,":"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.gold"))}const Gw=function(o){return[o]};function dG(o,a){if(1&o&&(t.TgZ(0,"span",68),t._UZ(1,"span",8),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","character.progress.donations")("ghs-label-args",t.VKq(2,Gw,""+n.character.progress.donations))}}const QT=function(o){return{disabled:o}};function hG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",69),t._UZ(1,"span",12),t._uU(2,": "),t.TgZ(3,"a",70),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.donate())}),t.TgZ(4,"span",71),t._UZ(5,"img",72),t._uU(6),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","character.progress.donate"),t.xp6(2),t.Q6J("ngClass",t.VKq(3,QT,n.character.progress.gold<(n.fhSheet?5:10)||n.gameManager.game.round>0)),t.xp6(3),t.Oqu(n.fhSheet?5:10)}}function uG(o,a){1&o&&t._UZ(0,"hr",28)}function _G(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",73)(1,"label"),t._UZ(2,"span",12),t._uU(3,":"),t.qZA(),t.TgZ(4,"a",74),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moveResources())}),t._UZ(5,"span",12),t.qZA(),t.TgZ(6,"div",75)(7,"div",76)(8,"div",77),t._UZ(9,"img",78),t.TgZ(10,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.lumber,i))}),t.qZA()(),t.TgZ(11,"div",79),t._UZ(12,"img",80),t.TgZ(13,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.metal,i))}),t.qZA()(),t.TgZ(14,"div",81),t._UZ(15,"img",82),t.TgZ(16,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.hide,i))}),t.qZA()()(),t.TgZ(17,"div",83)(18,"div",84),t._UZ(19,"img",85),t.TgZ(20,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.arrowvine,i))}),t.qZA()(),t.TgZ(21,"div",86),t._UZ(22,"img",87),t.TgZ(23,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.axenut,i))}),t.qZA()(),t.TgZ(24,"div",88),t._UZ(25,"img",89),t.TgZ(26,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.corpsecap,i))}),t.qZA()(),t.TgZ(27,"div",90),t._UZ(28,"img",91),t.TgZ(29,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.flamefruit,i))}),t.qZA()(),t.TgZ(30,"div",92),t._UZ(31,"img",93),t.TgZ(32,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.rockroot,i))}),t.qZA()(),t.TgZ(33,"div",94),t._UZ(34,"img",95),t.TgZ(35,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.snowthistle,i))}),t.qZA()()()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","character.progress.resources"),t.xp6(3),t.Q6J("ghs-label","character.progress.resources.move"),t.xp6(5),t.Q6J("value",n.character.progress.loot.lumber),t.xp6(3),t.Q6J("value",n.character.progress.loot.metal),t.xp6(3),t.Q6J("value",n.character.progress.loot.hide),t.xp6(4),t.Q6J("value",n.character.progress.loot.arrowvine),t.xp6(3),t.Q6J("value",n.character.progress.loot.axenut),t.xp6(3),t.Q6J("value",n.character.progress.loot.corpsecap),t.xp6(3),t.Q6J("value",n.character.progress.loot.flamefruit),t.xp6(3),t.Q6J("value",n.character.progress.loot.rockroot),t.xp6(3),t.Q6J("value",n.character.progress.loot.snowthistle)}}function pG(o,a){1&o&&(t.TgZ(0,"span",104),t._uU(1,"-"),t.qZA())}function fG(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",102),t.YNc(2,pG,2,0,"span",103),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","data.character.traits."+n),t.xp6(1),t.Q6J("ngIf",e0),t.xp6(1),t.Q6J("value",n.character.progress.notes)("ghs-label","character.progress.notes")("ghs-label-attribute","placeholder")}}function CG(o,a){if(1&o&&t._UZ(0,"ghs-character-items",105),2&o){const n=t.oxw();t.Q6J("character",n.character)}}function MG(o,a){1&o&&t._UZ(0,"hr",28)}function OG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",109)(1,"span",110),t._UZ(2,"img",111),t._uU(3,":"),t.qZA(),t.TgZ(4,"span",112),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.toggleMastery(s))}),t.qZA(),t._UZ(5,"span",113),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(4),t.Q6J("ngClass",t.VKq(2,c_,-1!=i.character.progress.masteries.indexOf(e))),t.xp6(1),t.Q6J("ghs-label",n)}}function PG(o,a){if(1&o&&(t.TgZ(0,"div",106)(1,"label"),t._UZ(2,"span",12),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",107),t.YNc(5,OG,6,4,"div",108),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","character.progress.masteries"),t.xp6(3),t.Q6J("ngForOf",n.character.masteries)}}function yG(o,a){1&o&&t._UZ(0,"hr",28)}function bG(o,a){1&o&&(t.TgZ(0,"label",114),t._UZ(1,"span",12),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.attackModifiers.perks"))}const xG=function(o,a){return{checked:o,disabled:a}};function wG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",119),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw().index,m=t.oxw();return t.KtG(m.addPerk(l,s+1))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw().index,m=t.oxw();return t.KtG(m.addPerk(l,s+1,!0))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw().index,i=t.oxw();t.Q6J("ngClass",t.WLB(1,xG,i.character.progress.perks[e]&&i.character.progress.perks[e]>n,i.gameManager.game.state!=i.GameState.draw||i.gameManager.game.round>0||i.character.progress.perks[e]<=n&&i.availablePerks=n+1))}}function NG(o,a){1&o&&t._UZ(0,"hr",28)}function JG(o,a){1&o&&(t.TgZ(0,"label",114),t._UZ(1,"span",12),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.notes"))}function UG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"textarea",98),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setNotes(i))}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("value",n.character.progress.notes)("ghs-label","character.progress.notes")("ghs-label-attribute","placeholder")}}function LG(o,a){if(1&o&&t._UZ(0,"ghs-character-items",125),2&o){const n=t.oxw();t.Q6J("character",n.character)}}function QG(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function RG(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.gameManager.game.party.players[n.character.number-1])}}function FG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",126),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleRetired())}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(3,c_,n.retired))("ghs-label","character.progress.retired")("ghs-label-attribute","title")}}function qG(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("\xa0(",n.personalQuest.altId,")")}}function HG(o,a){if(1&o&&(t.TgZ(0,"span",127),t._UZ(1,"span",12),t.YNc(2,qG,2,1,"span",13),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.personalQuest."+n.personalQuest.cardId),t.xp6(1),t.Q6J("ngIf",n.personalQuest.altId)}}function jG(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.xp6(1),t.AsE("\xa0",s.character.progress.personalQuestProgress[e]||0,"/",s.EntityValueFunction(i.counter),"")}}function BG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",135),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2).index,m=t.oxw(2);return t.KtG(m.setPersonalQuestProgress(l,s+1))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2).index,i=t.oxw(2);t.Q6J("ngClass",t.VKq(3,c_,i.character.progress.personalQuestProgress[e]>n))("ghs-label","character.progress.personalQuest.counter")("ghs-label-attribute","title")}}function zG(o,a){if(1&o&&(t.ynx(0),t.YNc(1,BG,1,5,"span",134),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,r_),e.EntityValueFunction(n.counter)))}}function GG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",136),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw(2);return t.KtG(l.setPersonalQuestProgress(s,i))}),t.qZA()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Q6J("value",s.character.progress.personalQuestProgress[e])("max",s.EntityValueFunction(i.counter))}}function VG(o,a){if(1&o&&(t.TgZ(0,"div",130)(1,"span",131),t._UZ(2,"span",12),t._uU(3,":"),t.YNc(4,jG,2,2,"span",13),t.qZA(),t.TgZ(5,"span",132),t.YNc(6,zG,3,5,"ng-container",13),t.YNc(7,GG,1,2,"input",133),t.qZA()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("ngClass",t.VKq(5,QT,n.requires&&n.requires.length>0&&!i.personalQuestRequirementUnlocked(e))),t.xp6(2),t.Q6J("ghs-label",n.name),t.xp6(2),t.Q6J("ngIf",i.EntityValueFunction(n.counter)>1),t.xp6(2),t.Q6J("ngIf",i.EntityValueFunction(n.counter)<11),t.xp6(1),t.Q6J("ngIf",i.EntityValueFunction(n.counter)>10)}}function YG(o,a){if(1&o&&(t.TgZ(0,"div",128),t.YNc(1,VG,8,7,"div",129),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.personalQuest.requirements)}}function KG(o,a){if(1&o&&t._UZ(0,"div",139),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.unlockCharacter")("ghs-label-args",t.VKq(2,Gw,n.personalQuest.unlockCharacter))}}function $G(o,a){if(1&o&&t._UZ(0,"div",139),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.openEnvelope")("ghs-label-args",t.VKq(2,Gw,n.personalQuest.openEnvelope))}}function WG(o,a){if(1&o&&(t.TgZ(0,"div",137),t.YNc(1,KG,1,4,"div",138),t.YNc(2,$G,1,4,"div",138),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.personalQuest.unlockCharacter),t.xp6(1),t.Q6J("ngIf",n.personalQuest.openEnvelope)}}const XG=function(o,a,n){return{"cs-sheet":o,"fh-sheet":a,compact:n}},tV=function(o){return{denied:o}},eV=function(o){return{absent:o}},nV=function(o,a){return[o,a]};let RT=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ghsInputFullScreenCheck",he.lz),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"PerkType",n_.Ib),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"availablePerks",0),(0,_.Z)(this,"perksWip",!0),(0,_.Z)(this,"retired",!1),(0,_.Z)(this,"personalQuest",void 0),(0,_.Z)(this,"goldTimeout",null),(0,_.Z)(this,"xpTimeout",null),(0,_.Z)(this,"fhSheet",!1),(0,_.Z)(this,"csSheet",!1),(0,_.Z)(this,"donations",!0),(0,_.Z)(this,"titles",[]),this.dialog=e}ngOnInit(){if(this.retired=this.character.progress.retired,this.character.identities&&this.character.identities.length>1&&R.r.settings.characterIdentities){if(this.titles=this.character.title.split("|"),this.titles.length"temple"==e.name&&e.level>0&&"wrecked"!=e.state)&&(this.donations=!0)}this.character.progress.experience0?this.character.progress.perks.reduce((e,i)=>e+i):0)-1+this.character.progress.extraPerks+this.character.progress.retirements+this.character.progress.masteries.length,this.perksWip=0==this.character.perks.length||this.character.perks.map(e=>e.count).reduce((e,i)=>e+i)!=("fh"==this.character.edition?18:15),this.character.progress.personalQuest&&(this.personalQuest=d.v.characterManager.personalQuestByCard(d.v.currentEdition(),this.character.progress.personalQuest),this.character.progress.personalQuestProgress||(this.character.progress.personalQuestProgress=[])),d.v.uiChange.subscribe({next:()=>{this.availablePerks=this.character.level+Math.floor(this.character.progress.battleGoals/3)-(this.character.progress.perks&&this.character.progress.perks.length>0?this.character.progress.perks.reduce((e,i)=>e+i):0)-1+this.character.progress.extraPerks+this.character.progress.retirements+this.character.progress.masteries.length;for(let e=0;e<15;e++)this.character.progress.perks[e]||(this.character.progress.perks[e]=0);this.personalQuest&&(this.retired=this.personalQuest.requirements.every((e,i)=>this.character.progress.personalQuestProgress[i]>=(0,ae.j9)(e.counter)))}})}applyValues(){let e="";if(this.titleInput&&(e=this.titleInput.nativeElement.value),this.titles.length>0){for(let i=0;i{i&&(d.v.stateManager.before("setRetired","data.character."+this.character.name),this.character.progress.retired=this.retired,d.v.game.party.retirements.push(this.character.toModel()),d.v.characterManager.removeCharacter(this.character,!0),d.v.stateManager.after())}}):(d.v.stateManager.before(this.character.progress.retired?"setRetired":"unsetRetired","data.character."+this.character.name),this.character.progress.retired=this.retired,this.retired&&d.v.game.party.campaignMode&&(d.v.game.party.retirements.push(this.character.toModel()),d.v.characterManager.removeCharacter(this.character)),d.v.stateManager.after()))}titleChange(){this.standalone&&this.applyValues()}toggleRetired(){this.retired=!this.retired,this.standalone&&this.applyValues()}ngAfterViewInit(){this.titleInput&&(this.titleInput.nativeElement.value=this.character.title||R.r.getLabel("data.character."+this.character.name.toLowerCase()))}toggleCharacterAbsent(){(this.character.absent||d.v.characterManager.characterCount()>1)&&(d.v.stateManager.before(this.character.absent?"unsetAbsent":"setAbsent","data.character."+this.character.name),this.character.absent=!this.character.absent,this.character.absent&&this.character.active&&d.v.roundManager.toggleFigure(this.character),d.v.stateManager.after())}setTitle(e,i){this.titles[i]=e.target.value,this.titleChange()}setLevel(e){this.character.level==e&&e--,e<1?e=1:e>9&&(e=9),d.v.stateManager.before("setLevel","data.character."+this.character.name,""+e),d.v.characterManager.setLevel(this.character,e),d.v.stateManager.after()}setXP(e){!isNaN(+e.target.value)&&this.character.progress.experience!=+e.target.value&&(this.xpTimeout&&(clearTimeout(this.xpTimeout),this.xpTimeout=null),this.xpTimeout=setTimeout(()=>{d.v.stateManager.before("setXP","data.character."+this.character.name,(0,he.uZ)(+e.target.value-this.character.progress.experience)),d.v.characterManager.addXP(this.character,e.target.value-this.character.progress.experience,!d.v.game.scenario&&d.v.roundManager.firstRound),d.v.stateManager.after(),this.xpTimeout=null},500))}setGold(e){!isNaN(+e.target.value)&&this.character.progress.gold!=+e.target.value&&(this.goldTimeout&&(clearTimeout(this.goldTimeout),this.goldTimeout=null),this.goldTimeout=setTimeout(()=>{d.v.stateManager.before("setGold","data.character."+this.character.name,e.target.value),this.character.progress.gold=+e.target.value,d.v.stateManager.after(),this.goldTimeout=null},500))}setResource(e,i){isNaN(+i.target.value)||(d.v.stateManager.before("setResource","data.character."+this.character.name,"game.loot."+e,i.target.value),this.character.progress.loot[e]=+i.target.value,d.v.stateManager.after())}donate(){d.v.game.round<1&&this.character.progress.gold>9&&(d.v.stateManager.before("donate","data.character."+this.character.name),this.character.progress.donations+=1,this.character.donations+=1,d.v.game.party.donations+=1,this.character.progress.gold-=this.fhSheet?5:10,d.v.stateManager.after())}setPersonalQuest(e){this.character.progress.personalQuest!=e.target.value&&(d.v.stateManager.before("setPQ","data.character."+this.character.name,e.target.value),this.character.progress.personalQuest=e.target.value,this.character.progress.personalQuestProgress=[],this.personalQuest=d.v.characterManager.personalQuestByCard(d.v.currentEdition(),this.character.progress.personalQuest),this.personalQuest&&this.character.progress.personalQuest!=this.personalQuest.cardId&&(this.character.progress.personalQuest=this.personalQuest.cardId),d.v.stateManager.after())}setPersonalQuestProgress(e,i){this.character.progress.personalQuestProgress[e]||(this.character.progress.personalQuestProgress[e]=0);let s=0;s="number"==typeof i?i:+i.target.value,this.character.progress.personalQuestProgress[e]==s&&s--,d.v.stateManager.before("setPQProgress","data.character."+this.character.name,""+(e+1),""+s),this.character.progress.personalQuestProgress[e]=s,d.v.stateManager.after()}personalQuestRequirementUnlocked(e){return null!=this.personalQuest&&null!=this.personalQuest.requirements[e]&&this.personalQuest.requirements[e].requires&&this.personalQuest.requirements[e].requires.every(i=>this.personalQuest&&this.character.progress.personalQuestProgress[i-1]>=(0,ae.j9)(this.personalQuest.requirements[i-1].counter))}setExtraPerks(e){!isNaN(+e.target.value)&&this.character.progress.extraPerks!=+e.target.value&&(d.v.stateManager.before("setExtraPerks","data.character."+this.character.name,e.target.value),this.character.progress.extraPerks=+e.target.value,d.v.stateManager.after())}setRetirements(e){!isNaN(+e.target.value)&&this.character.progress.retirements!=+e.target.value&&(d.v.stateManager.before("setRetirements","data.character."+this.character.name,e.target.value),this.character.progress.retirements=+e.target.value,d.v.stateManager.after())}setPlayerNumber(e){if(!isNaN(+e.target.value)&&this.character.number!=+e.target.value&&+e.target.value>0){d.v.stateManager.before("setPlayerNumber","data.character."+this.character.name,e.target.value);const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.number==+e.target.value);i&&(i.number=this.character.number),this.character.number=+e.target.value,d.v.stateManager.after()}}setBattleGoals(e){this.character.progress.battleGoals==e&&e--,e<0?e=0:e>18&&(e=18),this.character.progress.battleGoals!=e&&(d.v.stateManager.before("setBG","data.character."+this.character.name,""+e),this.character.progress.battleGoals=e,d.v.stateManager.after())}setNotes(e){this.character.progress.notes!=e.target.value&&(d.v.stateManager.before("setNotes","data.character."+this.character.name,e.target.value),this.character.progress.notes=e.target.value,d.v.stateManager.after())}toggleMastery(e){this.character.progress.masteries||(this.character.progress.masteries=[]),-1==this.character.progress.masteries.indexOf(e)?(d.v.stateManager.before("addMastery","data.character."+this.character.name,""+e),this.character.progress.masteries.push(e)):(d.v.stateManager.before("removeMastery","data.character."+this.character.name,""+e),this.character.progress.masteries.splice(this.character.progress.masteries.indexOf(e),1)),d.v.stateManager.after()}addPerk(e,i,s=!1){(!(d.v.game.state!=ge.D2.draw||d.v.game.round>0||this.character.progress.perks[e]{const m=Object.assign(new oe.z(this.character,this.character.level).toModel(),JSON.parse(l.target.result));m.name!=this.character.name||m.edition!=this.character.edition?i.classList.add("error"):(d.v.stateManager.before("importCharacter","data.character."+this.character.name),this.character.fromModel(m),d.v.stateManager.after())}),s.readAsText(e.target.files[0])}catch(s){console.warn(s),i.classList.add("error")}}toggleFhSheet(){this.fhSheet=!this.fhSheet,this.csSheet=!this.fhSheet&&("cs"==this.character.edition||-1!=d.v.editionExtensions(this.character.edition).indexOf("cs"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-sheet"]],viewQuery:function(e,i){if(1&e&&t.Gf(nG,5),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first)}},inputs:{character:"character",standalone:"standalone"},decls:117,vars:88,consts:[[1,"light","character-sheet",3,"ngClass"],[1,"container",3,"ngClass"],[1,"columns"],[1,"column","column-left"],[1,"row","title"],[3,"src"],[1,"headline",3,"ngClass","ghs-label","ghs-label-attribute","click"],[1,"character-title"],[3,"ghs-label","ghs-label-args"],[1,"absent",3,"src","ghs-label","ghs-label-attribute"],[1,"row","base"],[1,"name"],[3,"ghs-label"],[4,"ngIf"],[1,"level"],[1,"column"],["src","./assets/images/level.svg"],["src","./assets/images/experience.svg"],[1,"level-grid"],[4,"ngFor","ngForOf"],[1,"xp-gold-container"],[1,"row","xp-notes"],["type","number","min","0",3,"value","change"],[1,"row","gold-notes"],["class","donations",4,"ngIf"],["class","donate",4,"ngIf"],["class","compact-separator",4,"ngIf"],["class","row resources",4,"ngIf"],[1,"compact-separator"],["class","row notes",4,"ngIf"],["class","row",3,"character",4,"ngIf"],["class","row masteries",4,"ngIf"],[1,"column","column-right"],[1,"row","perks"],["class","headline",4,"ngIf"],[1,"list"],["class","perk",4,"ngFor","ngForOf"],["class","warning",3,"ghs-label","ghs-label-attribute",4,"ngIf"],["class","wip",3,"ghs-label","ghs-label-attribute",4,"ngIf"],[1,"row","battlegoals"],[1,"battlegoals-grid"],[1,"additional"],[3,"value","ghs-label","ghs-label-attribute","change",4,"ngIf"],[3,"character",4,"ngIf"],[1,"player-number"],["type","number","min","1",3,"value","change","keyup"],[1,"personal-quest"],[1,"personal-quest-card"],["type","text",1,"card-id",3,"value","change"],["class","retired checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click",4,"ngIf"],["class","personal-quest-name",4,"ngIf"],["class","requirements",4,"ngIf"],["class","rewards",4,"ngIf"],[1,"retirements"],["type","number","min","0",3,"value","change","keyup"],[1,"extra-perks"],[1,"import-export"],[1,"export",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/export.svg"],[1,"import",3,"ghs-label","ghs-label-attribute","click"],["type","file","accept","application/json",3,"change"],["src","./assets/images/import.svg"],[1,"toggle-fh-sheet",3,"click"],["type","text",3,"value","change"],["charactertitle",""],[1,"checkbox","level-item",3,"ngClass","click"],[1,"xp-item",3,"ngClass","click"],["src","./assets/images/fh/loot.svg"],[1,"donations"],[1,"donate"],[3,"ngClass","click"],[1,"price"],["src","./assets/images/loot.svg"],[1,"row","resources"],[1,"move",3,"click"],[1,"resource-table"],[1,"materials"],[1,"resource","lumber"],["src","./assets/images/fh/loot/lumber.svg"],[1,"resource","metal"],["src","./assets/images/fh/loot/metal.svg"],[1,"resource","hide"],["src","./assets/images/fh/loot/hide.svg"],[1,"herbs"],[1,"resource","arrowvine"],["src","./assets/images/fh/loot/arrowvine.svg"],[1,"resource","axenut"],["src","./assets/images/fh/loot/axenut.svg"],[1,"resource","corpsecap"],["src","./assets/images/fh/loot/corpsecap.svg"],[1,"resource","flamefruit"],["src","./assets/images/fh/loot/flamefruit.svg"],[1,"resource","rockroot"],["src","./assets/images/fh/loot/rockroot.svg"],[1,"resource","snowthistle"],["src","./assets/images/fh/loot/snowthistle.svg"],[1,"row","notes"],["class","traits",4,"ngIf"],[3,"value","ghs-label","ghs-label-attribute","change"],[1,"traits"],[1,"icon"],["src","./assets/images/fh/character/traits/trait.svg",1,"ghs-svg"],[1,"trait",3,"ghs-label"],["class","divider",4,"ngIf"],[1,"divider"],[1,"row",3,"character"],[1,"row","masteries"],[1,"masteries-list"],["class","mastery",4,"ngFor","ngForOf"],[1,"mastery"],[1,"checkmark"],["src","./assets/images/check.svg"],[1,"mastery-check","checkbox",3,"ngClass","click"],[1,"placeholder","text",3,"ghs-label"],[1,"headline"],[1,"perk"],[1,"checkboxes",3,"ngClass"],["class","checkbox","ghs-pointer-input","",3,"ngClass","singleClick","doubleClick",4,"ngFor","ngForOf"],[3,"perk"],["ghs-pointer-input","",1,"checkbox",3,"ngClass","singleClick","doubleClick"],[1,"warning",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/warning.svg",1,"ghs-svg"],[1,"wip",3,"ghs-label","ghs-label-attribute"],["class","checkmark",4,"ngIf"],[1,"battlegoal","checkbox",3,"ngClass","click"],[3,"character"],[1,"retired","checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click"],[1,"personal-quest-name"],[1,"requirements"],["class","requirement",3,"ngClass",4,"ngFor","ngForOf"],[1,"requirement",3,"ngClass"],[1,"requirement-name"],[1,"counter"],["type","number","min","0",3,"value","max","change",4,"ngIf"],["class","checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click",4,"ngFor","ngForOf"],[1,"checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click"],["type","number","min","0",3,"value","max","change"],[1,"rewards"],["class","reward",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"reward",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"img",5),t.TgZ(6,"label",6),t.NdJ("click",function(){return i.toggleCharacterAbsent()}),t.TgZ(7,"div",7),t._UZ(8,"span",8),t.qZA(),t._UZ(9,"img",9),t.qZA()(),t.TgZ(10,"div",10)(11,"div",11)(12,"label"),t._UZ(13,"span",12),t._uU(14,":"),t.qZA(),t.YNc(15,iG,3,1,"ng-container",13),t.YNc(16,aG,3,5,"ng-container",13),t.qZA(),t.TgZ(17,"div",14)(18,"div",2)(19,"div",15)(20,"label"),t._UZ(21,"span",12)(22,"img",16),t._uU(23,":"),t.qZA(),t.TgZ(24,"label"),t._UZ(25,"span",12)(26,"img",17),t._uU(27,":"),t.qZA()(),t.TgZ(28,"div",15)(29,"div",18),t.YNc(30,sG,3,4,"ng-container",19),t.ALo(31,"ghsRange"),t.YNc(32,rG,3,4,"ng-container",19),t.ALo(33,"ghsRange"),t.qZA()()()()(),t.TgZ(34,"div",20)(35,"div",21)(36,"label"),t._UZ(37,"span",12)(38,"img",17),t.YNc(39,cG,2,1,"span",13),t._uU(40,":"),t.qZA(),t.TgZ(41,"input",22),t.NdJ("change",function(l){return i.setXP(l)}),t.qZA()(),t.TgZ(42,"div",23),t.YNc(43,lG,3,1,"label",13),t.YNc(44,gG,4,1,"label",13),t.TgZ(45,"input",22),t.NdJ("change",function(l){return i.setGold(l)}),t.qZA(),t.YNc(46,dG,2,4,"span",24),t.YNc(47,hG,7,5,"span",25),t.qZA()(),t.YNc(48,uG,1,0,"hr",26),t.YNc(49,_G,36,11,"div",27),t._UZ(50,"hr",28),t.YNc(51,vG,6,5,"div",29),t.YNc(52,CG,1,1,"ghs-character-items",30),t.YNc(53,MG,1,0,"hr",26),t.YNc(54,PG,6,2,"div",31),t.qZA(),t.TgZ(55,"div",32),t.YNc(56,yG,1,0,"hr",26),t.TgZ(57,"div",33),t.YNc(58,bG,2,1,"label",34),t.TgZ(59,"div",35),t.YNc(60,TG,5,9,"div",36),t.qZA(),t.YNc(61,ZG,3,3,"div",37),t.YNc(62,AG,3,3,"div",38),t.qZA(),t.TgZ(63,"div",39),t.YNc(64,SG,2,1,"label",34),t.YNc(65,EG,2,1,"label",34),t.TgZ(66,"div",40),t.YNc(67,IG,3,4,"ng-container",19),t.ALo(68,"ghsRange"),t.qZA()(),t.YNc(69,NG,1,0,"hr",26),t.qZA()(),t.TgZ(70,"div",41),t._UZ(71,"hr",28),t.YNc(72,JG,2,1,"label",34),t.TgZ(73,"div",2)(74,"div",3),t.YNc(75,UG,1,3,"textarea",42),t.YNc(76,LG,1,1,"ghs-character-items",43),t.qZA(),t.TgZ(77,"div",32)(78,"div",11),t.YNc(79,QG,2,0,"span",13),t.YNc(80,RG,2,1,"span",13),t.qZA(),t.TgZ(81,"div",44)(82,"label"),t._UZ(83,"span",12),t._uU(84,":"),t.qZA(),t.TgZ(85,"input",45),t.NdJ("change",function(l){return i.setPlayerNumber(l)})("keyup",function(l){return i.setPlayerNumber(l)}),t.qZA()(),t.TgZ(86,"div",46)(87,"label"),t._UZ(88,"span",12),t._uU(89,":"),t.qZA(),t.TgZ(90,"div",47)(91,"input",48),t.NdJ("change",function(l){return i.setPersonalQuest(l)}),t.qZA(),t.YNc(92,FG,1,5,"span",49),t.YNc(93,HG,3,2,"span",50),t.qZA(),t.YNc(94,YG,2,1,"div",51),t.YNc(95,WG,3,2,"div",52),t.qZA(),t.TgZ(96,"div",53)(97,"label"),t._UZ(98,"span",12),t._uU(99,":"),t.qZA(),t.TgZ(100,"input",54),t.NdJ("change",function(l){return i.setRetirements(l)})("keyup",function(l){return i.setRetirements(l)}),t.qZA()(),t.TgZ(101,"div",55)(102,"label"),t._UZ(103,"span",12),t._uU(104,":"),t.qZA(),t.TgZ(105,"input",54),t.NdJ("change",function(l){return i.setExtraPerks(l)})("keyup",function(l){return i.setExtraPerks(l)}),t.qZA()(),t._UZ(106,"hr",28),t.TgZ(107,"div",56)(108,"label",57),t.NdJ("click",function(){return i.exportCharacter()}),t._UZ(109,"img",58)(110,"span",12),t.qZA(),t.TgZ(111,"label",59),t.NdJ("click",function(){return i.ghsInputFullScreenCheck()}),t.TgZ(112,"input",60),t.NdJ("change",function(l){return i.importCharacter(l)}),t.qZA(),t._UZ(113,"img",61)(114,"span",12),t.qZA()(),t.TgZ(115,"span",62),t.NdJ("click",function(){return i.toggleFhSheet()}),t._UZ(116,"span",12),t.qZA()()()()()()),2&e&&(t.Q6J("ngClass",t.kEZ(74,XG,i.csSheet,i.fhSheet,i.settingsManager.settings.characterSheetCompact)),t.xp6(1),t.Q6J("ngClass",t.VKq(78,tV,!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition])),t.xp6(4),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(80,eV,i.character.absent))("ghs-label",i.character.absent?"character.absent":"character.present")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ghs-label","character.progress.title")("ghs-label-args",t.WLB(82,nV,"data.character."+i.character.name,i.character.characterClass?"character.class."+(i.character.gender?i.character.gender+".":"")+i.character.characterClass:"")),t.xp6(1),t.Q6J("src","./assets/images/status/"+(i.character.absent?"absent":"present")+".svg",t.LSH)("ghs-label",i.character.absent?"character.present":"character.absent")("ghs-label-attribute","title"),t.xp6(4),t.Q6J("ghs-label","character.progress.name"),t.xp6(2),t.Q6J("ngIf",0==i.titles.length||!i.settingsManager.settings.characterIdentities),t.xp6(1),t.Q6J("ngIf",i.titles.length>0&&i.settingsManager.settings.characterIdentities),t.xp6(5),t.Q6J("ghs-label","character.progress.level"),t.xp6(4),t.Q6J("ghs-label","character.progress.xp"),t.xp6(5),t.Q6J("ngForOf",t.xi3(31,65,t.DdM(85,r_),9)),t.xp6(2),t.Q6J("ngForOf",t.xi3(33,68,t.DdM(86,r_),9)),t.xp6(5),t.Q6J("ghs-label","character.progress.xp"),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("value",i.character.progress.experience),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("value",i.character.progress.gold),t.xp6(1),t.Q6J("ngIf",i.donations),t.xp6(1),t.Q6J("ngIf",i.donations),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(2),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("ngIf",!i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("ngForOf",i.character.perks),t.xp6(1),t.Q6J("ngIf",i.availablePerks<0),t.xp6(1),t.Q6J("ngIf",i.perksWip),t.xp6(2),t.Q6J("ngIf",!i.fhSheet&&!i.csSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(2),t.Q6J("ngForOf",t.xi3(68,71,t.DdM(87,r_),18)),t.xp6(2),t.Q6J("ngIf",i.fhSheet),t.xp6(3),t.Q6J("ngIf",!i.settingsManager.settings.characterSheetCompact||!i.fhSheet),t.xp6(3),t.Q6J("ngIf",!i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(3),t.Q6J("ngIf",0==i.character.number||i.character.number>i.gameManager.game.party.players.length||!i.gameManager.game.party.players[i.character.number-1]),t.xp6(1),t.Q6J("ngIf",i.character.number>0&&i.character.number<=i.gameManager.game.party.players.length&&i.gameManager.game.party.players[i.character.number-1]),t.xp6(3),t.Q6J("ghs-label","character.playerNumber"),t.xp6(2),t.Q6J("value",i.character.number),t.xp6(3),t.Q6J("ghs-label","character.progress.personalQuest"),t.xp6(3),t.Q6J("value",i.character.progress.personalQuest),t.xp6(1),t.Q6J("ngIf",!i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(3),t.Q6J("ghs-label","character.progress.retirements"),t.xp6(2),t.Q6J("value",i.character.progress.retirements),t.xp6(3),t.Q6J("ghs-label","character.progress.perks.extra"),t.xp6(2),t.Q6J("value",i.character.progress.extraPerks),t.xp6(3),t.Q6J("ghs-label","character.progress.export")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ghs-label","character.progress.export"),t.xp6(1),t.Q6J("ghs-label","character.progress.import")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","character.progress.import"),t.xp6(2),t.Q6J("ghs-label","character.progress.fh."+(i.fhSheet?"disable":"enable")))},dependencies:[x.mk,x.sg,x.O5,rT,eG,ie,An,Ii],styles:['.character-sheet{position:relative;background-color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet .container{width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));height:100%;background-image:url(character-sheet.70b336945f4b7a49.svg);background-position:top center;background-repeat:no-repeat;background-size:contain;padding-left:calc(var(--ghs-unit) * 1.2 * var(--ghs-dialog-factor))}.character-sheet .container .compact-separator{display:none}.character-sheet .container .columns{display:flex}.character-sheet .container .columns .column{display:flex;flex-direction:column}.character-sheet .container .columns .column.column-left{width:calc(var(--ghs-unit) * 32 * var(--ghs-dialog-factor))}.character-sheet .container .columns .column.column-right{margin-left:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor))}.character-sheet .container .columns .column .row{display:flex}.character-sheet .container label{display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));white-space:nowrap}.character-sheet .container label img{width:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));height:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.character-sheet .container label.headline{width:100%;justify-content:center}.character-sheet .container label.headline.absent{text-decoration:line-through}.character-sheet .container .title{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.character-sheet .container .title img{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto}.character-sheet .container .title label{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));padding-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));overflow:hidden}.character-sheet .container .title label .character-title{display:table;align-self:center;cursor:pointer}.character-sheet .container .title label .absent{cursor:pointer}.character-sheet .container .base{flex-direction:column;height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.character-sheet .container .base .level-grid{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(9,1fr)}.character-sheet .container .base .level-grid .level-item{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));z-index:2}.character-sheet .container .base .level-grid .level-item.checked:before{opacity:.8}.character-sheet .container .base .level-grid .xp-item{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:flex-end;width:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));border-right:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);margin-top:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor))}.character-sheet .container .base .level-grid .xp-item:last-child{border-right:none}.character-sheet .container .base .level-grid .xp-item:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));background-image:url(initiative.a7663b57012bb669.svg);background-position:center;background-repeat:no-repeat;background-size:contain}.character-sheet .container .base .level-grid .xp-item.checked:after{content:" ";position:absolute;top:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));clip-path:polygon(10% 100%,25% 100%,85% 0,70% 0);background-color:var(--ghs-color-black)}.character-sheet .container .xp-gold-container{display:flex;flex-direction:column}.character-sheet .container .xp-notes,.character-sheet .container .gold-notes{flex-direction:column;height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donations{display:flex;align-items:center;line-height:.5em;margin-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donate{display:flex;align-items:center}.character-sheet .container .gold-notes .donate a{display:flex;align-items:center;cursor:pointer;color:var(--ghs-color-darkgray);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donate a:hover{color:var(--ghs-color-black)}.character-sheet .container .gold-notes .donate a.disabled{pointer-events:none;color:var(--ghs-color-gray)}.character-sheet .container .gold-notes .donate a .price{display:flex;align-items:center;color:var(--ghs-color-yellow);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donate a .price img{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));filter:var(--ghs-filter-yellow);width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet .container .notes,.character-sheet .container ghs-character-items{height:calc(var(--ghs-unit) * 34 * var(--ghs-dialog-factor));width:100%;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container .notes .items,.character-sheet .container ghs-character-items .items{width:100%}.character-sheet .container .notes .item-list,.character-sheet .container ghs-character-items .item-list{height:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));max-height:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));overflow:auto}.character-sheet .container .perks{flex-direction:column;height:calc(var(--ghs-unit) * 67 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .perks .list{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 63.5 * var(--ghs-dialog-factor));overflow-y:auto}.character-sheet .container .perks .list .perk{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 1.9 * var(--ghs-dialog-factor) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));display:flex}.character-sheet .container .perks .list .perk .checkboxes{display:flex}.character-sheet .container .perks .list .perk .checkboxes .checkbox{margin-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor) * var(--ghs-text-factor))}.character-sheet .container .perks .list .perk .checkboxes .checkbox.disabled{pointer-events:initial;cursor:not-allowed}.character-sheet .container .perks .list .perk .checkboxes.combined{flex-direction:column;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .perks .list .perk .checkboxes.combined .checkbox{border-top-style:dashed;border-bottom-style:dashed;margin:0}.character-sheet .container .perks .list .perk .checkboxes.combined .checkbox:nth-child(1){border-top-style:solid}.character-sheet .container .perks .list .perk .checkboxes.combined .checkbox:nth-last-child(1){border-bottom-style:solid}.character-sheet .container .perks .wip,.character-sheet .container .perks .warning{flex-basis:0}.character-sheet .container .battlegoals{flex-direction:column;height:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor))}.character-sheet .container .battlegoals .battlegoals-grid{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(12,1fr);align-items:center}.character-sheet .container .battlegoals .battlegoals-grid img{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.character-sheet .container .battlegoals .battlegoals-grid .battlegoal{width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.character-sheet .container .battlegoals .battlegoals-grid .checkmark{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;align-items:center}.character-sheet .container .personal-quest .personal-quest-card{display:flex;align-items:center}.character-sheet .container .personal-quest .personal-quest-card .card-id{text-align:right;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor) * var(--ghs-text-factor));min-width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet .container .personal-quest .personal-quest-card .personal-quest-name{font-family:var(--ghs-font-title)}.character-sheet .container .personal-quest .requirements{display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container .personal-quest .requirements .requirement{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.character-sheet .container .personal-quest .requirements .requirement.disabled{pointer-events:none;opacity:.7}.character-sheet .container .personal-quest .requirements .requirement .counter{display:flex;align-items:center;flex-grow:1}.character-sheet .container .personal-quest .requirements .requirement .counter .checkbox{margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .personal-quest .requirements .requirement .counter input[type=number]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));min-width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));flex-grow:1;text-align:right;border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray)}.character-sheet .container .personal-quest .rewards{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black)}.character-sheet .container .notes{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 15 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.character-sheet .container .notes .columns{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));flex-grow:1}.character-sheet .container .notes .column-right{justify-content:space-between}.character-sheet .container .notes .personal-quest,.character-sheet .container .notes .extra-perks,.character-sheet .container .notes .retirements,.character-sheet .container .notes .player-number{margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));display:flex;align-items:center}.character-sheet .container .notes .personal-quest label,.character-sheet .container .notes .extra-perks label,.character-sheet .container .notes .retirements label,.character-sheet .container .notes .player-number label{flex-shrink:0;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet .container .notes .personal-quest input[type=number],.character-sheet .container .notes .extra-perks input[type=number],.character-sheet .container .notes .retirements input[type=number],.character-sheet .container .notes .player-number input[type=number]{flex-grow:1;flex-basis:0;min-width:auto}.character-sheet .container .notes .personal-quest .checkbox,.character-sheet .container .notes .extra-perks .checkbox,.character-sheet .container .notes .retirements .checkbox,.character-sheet .container .notes .player-number .checkbox{flex-shrink:0;margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor))}.character-sheet .container .import-export{display:flex;justify-content:space-around}.character-sheet .container .import-export label{cursor:pointer}.character-sheet .container .import-export label input[type=file]{width:0;height:0;margin:0;padding:0;visibility:hidden}.character-sheet .container .wip,.character-sheet .container .warning{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;color:var(--ghs-color-red)}.character-sheet .container .wip.warning,.character-sheet .container .warning.warning{color:var(--ghs-color-yellow)}.character-sheet .container .wip img,.character-sheet .container .warning img{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red)}.character-sheet .container .wip.warning img,.character-sheet .container .warning.warning img{filter:var(--ghs-filter-yellow)}.character-sheet .container .checkbox{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));box-shadow:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor)) var(--ghs-color-gray);z-index:2}.character-sheet .container .checkbox:before{content:" ";position:absolute;left:50%;top:50%;width:115%;height:115%;transform:scale(0);transform-origin:top left;transition:.12s transform ease-in-out;z-index:1;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;filter:var(--ghs-filter-darkgray)}.character-sheet .container .checkbox.checked:before{transform:scale(1) translate(-50%,-50%)}.character-sheet .container .checkbox.checked.check:before{transform:scale(1)}.character-sheet .container .checkbox.disabled{top:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));pointer-events:none;border-color:var(--ghs-color-gray);box-shadow:none}.character-sheet .container input[type=text]{margin:0;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-black);background-color:transparent;border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container input[type=number]{margin:0;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.character-sheet .container textarea{color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:100%;height:100%}.character-sheet .container .name{display:flex;align-items:center}.character-sheet .container .name img{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.character-sheet .container .name input[type=text]{min-width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet.cs-sheet .container{background-image:url(character-sheet.00b73de5eb36d58f.svg)}.character-sheet.cs-sheet .columns .column.column-right .perks{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 70 * var(--ghs-dialog-factor))}.character-sheet.cs-sheet .columns .column.column-right .perks .list{height:calc(var(--ghs-unit) * 69.5 * var(--ghs-dialog-factor))}.character-sheet .additional{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .additional .headline{margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .container{background-image:url(character-sheet.546b1024f4246598.svg)}.character-sheet.fh-sheet .xp-gold-container{display:grid;grid-template-columns:1fr 1fr;column-gap:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .xp-gold-container .xp-notes,.character-sheet.fh-sheet .xp-gold-container .gold-notes{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes{position:relative;height:calc(var(--ghs-unit) * 11 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes .traits{position:relative;display:flex;justify-content:space-evenly;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));flex-grow:1}.character-sheet.fh-sheet .notes .traits .icon{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes .traits .icon .ghs-svg{height:100%;width:auto}.character-sheet.fh-sheet ghs-character-items{margin-top:0;height:auto}.character-sheet.fh-sheet ghs-character-items .item-list{height:auto!important}.character-sheet.fh-sheet .resources{position:relative;height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));flex-direction:column}.character-sheet.fh-sheet .resources .move{cursor:pointer;position:absolute;top:0;right:0;color:var(--ghs-color-black)}.character-sheet.fh-sheet .resources .move:hover{opacity:.5}.character-sheet.fh-sheet .resources .resource-table{display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .resources .resource-table .resource{display:flex;padding:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .resources .resource-table .resource img{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:auto}.character-sheet.fh-sheet .resources .resource-table .resource input{min-width:0;flex-grow:1}.character-sheet.fh-sheet .resources .resource-table .materials{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 11.1 * var(--ghs-dialog-factor)))}.character-sheet.fh-sheet .resources .resource-table .materials .resource{flex-direction:column;height:calc(var(--ghs-unit) * 5.5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .resources .resource-table .materials .resource input{width:100%;margin-left:0}.character-sheet.fh-sheet .resources .resource-table .herbs{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 11.1 * var(--ghs-dialog-factor)))}.character-sheet.fh-sheet .resources .resource-table .herbs .resource{height:calc(var(--ghs-unit) * 4.7 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .masteries{height:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.character-sheet.fh-sheet .masteries .mastery{display:flex;align-items:center}.character-sheet.fh-sheet .masteries .mastery .mastery-check{flex-shrink:0;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .masteries .mastery .checkmark{flex-shrink:0;height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;align-items:center}.character-sheet.fh-sheet .masteries .mastery .checkmark img{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.character-sheet.fh-sheet .masteries .mastery .text{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 1.9 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .columns .column.column-right{flex-direction:column-reverse}.character-sheet.fh-sheet .columns .column.column-right .battlegoals{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .columns .column.column-right .perks{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 65 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .columns .column.column-right .perks .list{height:calc(var(--ghs-unit) * 65 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes,.character-sheet.fh-sheet .additional{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes .columns .column.column-right,.character-sheet.fh-sheet .additional .columns .column.column-right{flex-direction:column;justify-content:flex-start}.character-sheet.compact .container{background-image:none;width:initial;max-width:calc(var(--ghs-unit) * 50 * var(--ghs-dialog-factor))}.character-sheet.compact .container .compact-separator{display:block;width:100%;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor)) 0}.character-sheet.compact .container label.headline{justify-content:flex-start}.character-sheet.compact .container .checkbox{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))!important;height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))!important}.character-sheet.compact .container input[type=number],.character-sheet.compact .container input[type=text]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .container .columns{flex-direction:column}.character-sheet.compact .container .columns .column{width:auto!important;justify-content:center}.character-sheet.compact .container .columns .column.column-right{margin-left:0!important}.character-sheet.compact .container .columns .column .xp-gold-container{display:flex;flex-direction:column}.character-sheet.compact .container .columns .column .xp-gold-container .row{flex-direction:row}.character-sheet.compact .container .columns .column .xp-gold-container .row .donate{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.compact .container .columns .column .row{height:auto!important;margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))!important}.character-sheet.compact .container .columns .column .row.perks .list{height:auto!important;overflow-y:initial}.character-sheet.compact .container .columns .column .row.perks .list .perk{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .container .columns .column .row label.headline{width:auto!important}.character-sheet.compact .container .columns .column .row .resource-table .materials,.character-sheet.compact .container .columns .column .row .resource-table .herbs{grid-template-columns:repeat(3,1fr)}.character-sheet.compact .container .columns .column .row .resource-table .materials .resource,.character-sheet.compact .container .columns .column .row .resource-table .herbs .resource{display:grid;grid-template-columns:.3fr 1fr;align-items:center}.character-sheet.compact .container .columns .column .row .resource-table .materials .resource input,.character-sheet.compact .container .columns .column .row .resource-table .herbs .resource input{width:100%;margin-left:0}.character-sheet.compact .container .columns .column ghs-character-items .item-list{height:auto!important}.character-sheet.compact .level .columns{flex-direction:row}.character-sheet.compact .level .columns .column{width:auto!important}.character-sheet.compact .level .columns .column .level-item{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor) * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .level .columns .column .xp-item{width:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor) * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));border-right-width:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor) * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor) / var(--ghs-text-factor))}.character-sheet.compact .level .columns .column .xp-item:before{top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .level .columns .column .xp-item.checked:after{top:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .battlegoals .battlegoals-grid{grid-template-columns:repeat(12,calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor)))}.character-sheet.compact .masteries .mastery .text{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet .scroll-container.denied .export,.character-sheet .scroll-container.denied .export *{pointer-events:initial}.character-sheet .toggle-fh-sheet{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));cursor:pointer;display:flex;justify-content:flex-end;width:100%;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}\n'],encapsulation:2})),a})();function iV(o,a){if(1&o&&t._UZ(0,"ghs-summon-entity",21),2&o){const n=a.$implicit,e=t.oxw();t.Q6J("character",e.character)("summon",n)}}function oV(o,a){if(1&o&&t._UZ(0,"img",26),2&o){const n=a.$implicit,e=t.oxw(2).$implicit,i=t.oxw();t.Udp("z-index",e.value-n-1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+e.name+".svg",t.LSH)}}const aV=function(){return[]};function sV(o,a){if(1&o&&(t.ynx(0),t.YNc(1,oV,1,3,"img",25),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,aV),n.value-1))}}function rV(o,a){if(1&o&&(t.TgZ(0,"span",27),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.value)}}function cV(o,a){if(1&o&&(t.TgZ(0,"span",22),t._UZ(1,"img",4),t.YNc(2,sV,3,5,"ng-container",23),t.YNc(3,rV,2,1,"span",24),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Udp("z-index",n.value),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(e.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(e.ConditionType.value))}}const lV=function(o,a){return{empty:o,off:a}},gV=function(o){return{empty:o}},dV=function(o){return{denied:o}},hV=function(o){return{"outer-denied":o}};let uV=(()=>{var o;class a extends UT{cancel(){this.character.fullview=!1,d.v.stateManager.saveLocal(),d.v.uiChange.emit()}}return o=a,(0,_.Z)(a,"\u0275fac",function(){let n;return function(i){return(n||(n=t.n5z(o)))(i||o)}}()),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-fullview"]],features:[t.qOj],decls:26,vars:30,consts:[[1,"container"],[1,"summons-container",3,"ngClass"],[1,"spacer"],[1,"icon",3,"ngClass","entityAnimation"],[3,"src"],[1,"summons"],[3,"character","summon",4,"ngFor","ngForOf"],[1,"fullview"],[1,"row"],[3,"character","ngClass"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[3,"figure"],[3,"entity","figure"],[1,"conditions"],["class","condition",4,"ngFor","ngForOf"],["type","character",1,"dialog",3,"entity","figure","entityConditions","immunities","columns"],[1,"row","sheet"],[3,"character","standalone"],[1,"wip",3,"click"],["src","./assets/images/warning.svg",1,"ghs-svg"],[3,"ghs-label"],[3,"character","summon"],[1,"condition"],[4,"ngIf"],["class","value",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"img",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,iV,1,2,"ghs-summon-entity",6),t.qZA()(),t.TgZ(7,"div",7)(8,"div",8),t._UZ(9,"ghs-character-image",9),t.TgZ(10,"ghs-pointer-input",10),t.NdJ("dragMove",function(l){return i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]&&i.dragInitiativeMove(l)})("dragEnd",function(l){return i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]&&i.dragInitiativeEnd(l)})("singleClick",function(l){return i.toggleFigure(l)})("doubleClick",function(l){return i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]&&i.initiativeDoubleClick(l)}),t.qZA(),t._UZ(11,"ghs-character-initiative",11)(12,"ghs-highlight-conditions",12),t.qZA(),t.TgZ(13,"div",8)(14,"div",13),t.YNc(15,cV,4,5,"span",14),t.qZA()(),t.TgZ(16,"div",8),t._UZ(17,"ghs-conditions",15),t.qZA(),t.TgZ(18,"div",16),t._UZ(19,"ghs-character-sheet",17),t.qZA()(),t.TgZ(20,"a",18),t.NdJ("click",function(){return i.cancel()}),t._UZ(21,"img",19)(22,"span",20),t._uU(23,"!\xa0"),t._UZ(24,"span",20),t._uU(25,"! "),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.WLB(21,lV,0==i.summonCount,i.character.off||i.character.exhausted||i.character.health<=0)),t.xp6(2),t.Q6J("ngClass",t.VKq(24,gV,0==i.summonCount))("entityAnimation",0==i.summonCount),t.xp6(1),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(2),t.Q6J("ngForOf",i.character.summons),t.xp6(3),t.Q6J("character",i.character)("ngClass",t.VKq(26,dV,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("ngClass",t.VKq(28,hV,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round&&!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition])),t.xp6(1),t.Q6J("figure",i.character),t.xp6(1),t.Q6J("entity",i.character)("figure",i.character),t.xp6(3),t.Q6J("ngForOf",i.activeConditions),t.xp6(2),t.Q6J("entity",i.character)("figure",i.character)("entityConditions",i.character.entityConditions)("immunities",i.character.immunities)("columns",6),t.xp6(2),t.Q6J("character",i.character)("standalone",!0),t.xp6(3),t.Q6J("ghs-label","wip"),t.xp6(2),t.Q6J("ghs-label","cancel"))},dependencies:[x.mk,x.sg,x.O5,zu,s_,AT,VO,RT,IT,im,ie,An,Ii],styles:['.attack-modifierdeck-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:5;width:0;height:0;visibility:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;overflow-x:auto;overflow-y:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * 1.5 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));z-index:5}.attack-modifierdeck-container.active[_ngcontent-%COMP%], .attack-modifierdeck-container.loot-cards-container[_ngcontent-%COMP%], .loot-cards-container.active[_ngcontent-%COMP%], .loot-cards-container.loot-cards-container[_ngcontent-%COMP%]{visibility:visible;width:100%;height:100%}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor))}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 17 * var(--ghs-text-factor));-ms-overflow-style:none;scrollbar-width:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar, .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 17)}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);z-index:3}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 8.6666666667 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;inset:0;display:block}.attack-modifierdeck-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%]{display:inline-block;position:relative;cursor:zoom-out;top:0;left:0;z-index:2;width:100%;height:100%}.summons-container[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;align-items:center;transition:max-height 2s ease-out;max-height:100%;min-width:calc(var(--ghs-unit) * 7);max-width:calc(var(--ghs-unit) * 96)}.summons-container.empty[_ngcontent-%COMP%]{max-height:0}.summons-container[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:none;width:calc(var(--ghs-unit) * 10.5);height:100%}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:block;width:auto;height:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:100%;width:auto;filter:var(--ghs-filter-shadow)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{position:absolute;top:50%;left:calc(var(--ghs-unit) * -4);transform:translateY(-50%);width:calc(var(--ghs-unit) * 3.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-darkgray);opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:not(.empty){opacity:1;transform:translate(0)}.summons-container[_ngcontent-%COMP%] .entities-menu.empty[_ngcontent-%COMP%]{opacity:0;max-width:0;height:0;transform:translateY(100%)}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%]{cursor:initial;pointer-events:none}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{display:none}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.icon[_ngcontent-%COMP%]{opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.menu[_ngcontent-%COMP%]{opacity:1}.summons-container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;max-width:calc(var(--ghs-unit) * 77.5)}.summons-container.off[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:grayscale(100%)}.character[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-character-color);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;--ghs-character-color: #000;border-radius:calc(var(--ghs-unit) * .5);filter:var(--ghs-filter-outline);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.character.dimmed[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.dimmed[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{filter:grayscale(.15);opacity:.5}.character[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 5);left:calc(var(--ghs-unit) * 3.2);z-index:6}.character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);left:calc(var(--ghs-unit) * 2.4)}.character[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{z-index:2}.character[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.1);left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);z-index:4}.character[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0!important;width:100%!important}.character[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5);z-index:5}.character[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer;margin-left:calc(var(--ghs-unit) * 1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{max-width:calc(var(--ghs-unit) * 10);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center;white-space:nowrap}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:calc(var(--ghs-unit) * 5.5);margin-left:calc(var(--ghs-unit) * -1.1);margin-right:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.exhausted[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1);height:calc(var(--ghs-unit) * 4);width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-white);font-family:var(--ghs-font-text);margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7);margin:0 calc(var(--ghs-unit) * .1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token.placeholder[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));z-index:1000}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%]{position:relative;z-index:999;width:0;height:0;top:50%;left:calc(var(--ghs-unit) * -3);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{position:absolute;width:0;height:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw.drawing[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18);height:calc(var(--ghs-unit) * 12)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;align-self:center;z-index:1}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor) * var(--ghs-text-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]:hover{opacity:.7}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.disabled[_ngcontent-%COMP%]{pointer-events:none}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * -1.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));color:var(--ghs-color-white)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));border-radius:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-70%,-50%);width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-green) var(--ghs-filter-outline)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.experience[_ngcontent-%COMP%]{color:var(--ghs-color-blue);margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.loot[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.absent[_ngcontent-%COMP%]{cursor:initial;opacity:.6}.character.absent[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:initial}.character[_ngcontent-%COMP%] .absent-menu[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 82);height:calc(var(--ghs-unit) * 14);cursor:pointer;z-index:2}.character[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));cursor:pointer;font-size:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 1.5)}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);filter:var(--ghs-filter-white)}.character[_ngcontent-%COMP%] ghs-figure-errors[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 14.5);top:50%;transform:translateY(-50%);z-index:99}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{position:relative;cursor:pointer;height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.character[_ngcontent-%COMP%] .character-sheet-button.hand-size-margin[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto;filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 14);top:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(hand-size-mask.5857c02745e3d418.svg);mask-image:url(hand-size-mask.5857c02745e3d418.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.6);z-index:-1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 13.3);top:calc(var(--ghs-unit) * 10);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:0;left:calc(var(--ghs-unit) * -.5);bottom:0;right:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:-1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 24.5);top:calc(var(--ghs-unit) * .5);width:calc(var(--ghs-unit) * 33);height:calc(var(--ghs-unit) * 2.64);display:flex;justify-content:space-evenly;align-items:center}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(outer-mask.f0af43cfab648186.svg);mask-image:url(outer-mask.f0af43cfab648186.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:0}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(inner-mask.f2d18d4a7559b09e.svg);mask-image:url(inner-mask.f2d18d4a7559b09e.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(.5);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .trait[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5);color:var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.8);height:calc(var(--ghs-unit) * 1.8);left:0;top:50%;transform:translateY(-45%) rotate(45deg);border:calc(var(--ghs-unit) * .2) solid var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:110%;width:auto;filter:var(--ghs-filter-white);transform:rotate(-45deg);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);z-index:0;filter:brightness(.5)}.character[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%]:before{transition:filter .15s ease-in-out}.character.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%]:before{filter:grayscale(1)!important}.character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] *[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}.character.fh[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10.25);background-image:url(char-mat_compact.b0d0dd33f05dffe7.png)}.character.compact[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3.1)}.character.compact[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.compact[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{display:none}.character.compact[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.5);left:calc(var(--ghs-unit) * 6.5);width:calc(var(--ghs-unit) * 5);height:calc(var(--ghs-unit) * 5)}.character.compact[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 1 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 13);width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 8)}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{flex-direction:row;justify-content:flex-start;align-items:center}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);margin-left:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12);margin-right:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%]{margin-bottom:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{margin-top:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 13.5);height:calc(var(--ghs-unit) * 9)}.character.compact[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2.7);right:calc(var(--ghs-unit) * 1.2)}.character.compact[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.3);right:calc(var(--ghs-unit) * 1)}.character.compact[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 11)}.character.compact[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{display:none}.character.modern[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 16);border-top-left-radius:calc(var(--ghs-unit) * 13);border-top-right-radius:calc(var(--ghs-unit) * 12);border-bottom-right-radius:calc(var(--ghs-unit) * 12);background-image:url(char-mat_modern.2238b82519930f08.png);background-blend-mode:hard-light;filter:none;overflow:hidden}.character.modern.dimmed[_ngcontent-%COMP%]{background-image:url(char-mat_modern.2238b82519930f08.png)}.character.modern[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 13.7)}.character.modern[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{top:0;left:0;width:calc(var(--ghs-unit) * 16);height:calc(var(--ghs-unit) * 16);margin:0}.character.modern[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:grayscale(1) brightness(.3)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 2.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -2.7 / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5);filter:grayscale(1) brightness(.3);margin-left:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 3.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 5.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 13.9);top:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 18);top:initial;bottom:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor))}',"[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;overflow:auto}.container[_ngcontent-%COMP%]{height:100%}.fullview[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center}.fullview[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1);position:relative;display:flex}.fullview[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 15);height:calc(var(--ghs-unit) * 15);border-radius:calc(var(--ghs-unit) * 2)}.fullview[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{position:absolute;left:0;top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 15);z-index:5}.fullview[_ngcontent-%COMP%] ghs-pointer-input.drag-initiative[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 15);height:100%;z-index:4}.fullview[_ngcontent-%COMP%] ghs-pointer-input.drag-initiative.dragging[_ngcontent-%COMP%]{left:0;width:100%}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin:0}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -3 * var(--ghs-text-factor))}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ghs-title;font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));text-shadow:none;transform:translate(-50%)}.fullview[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));background-color:var(--ghs-color-white)}.wip[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-red);font-size:calc(var(--ghs-unit) * 4)}.wip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow);width:calc(var(--ghs-unit) * 4);height:auto;margin-right:calc(var(--ghs-unit) * 1)}.wip[_ngcontent-%COMP%]:hover{color:var(--ghs-color-black)}"]})),a})();const _V=["objectiveTitle"],pV=["objectiveName"];function fV(o,a){if(1&o&&t._UZ(0,"span",29),2&o){const n=t.oxw();t.Q6J("ghs-label","%game.mapMarker."+n.objective.marker+"%")}}function mV(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij(" ",n.objective.title,"")}}function vV(o,a){if(1&o&&t._UZ(0,"span",30),2&o){const n=t.oxw();t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function CV(o,a){1&o&&t._UZ(0,"img",31)}function MV(o,a){if(1&o&&(t.TgZ(0,"span",32),t._UZ(1,"img",28),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function OV(o,a){if(1&o&&(t.ynx(0),t._uU(1),t.ALo(2,"ghsMinZero"),t._UZ(3,"span",33),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.AsE(" ",t.lcZ(2,5,n.objective.health+n.health),"/",n.maxHealth()," "),t.xp6(2),t.Q6J("value-sign",n.health)("hideEmpty",!0)("container",!0)}}function PV(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function yV(o,a){if(1&o&&t._UZ(0,"img",39),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw();t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const bV=function(){return[]};function xV(o,a){if(1&o&&(t.ynx(0),t.YNc(1,yV,1,3,"img",38),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,bV),n.value-1))}}function wV(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function kV(o,a){if(1&o&&t._UZ(0,"span",41),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function TV(o,a){if(1&o&&t._UZ(0,"span",42),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}function ZV(o,a){if(1&o&&(t.TgZ(0,"span",34),t._UZ(1,"img",28),t.YNc(2,xV,3,5,"ng-container",15),t.YNc(3,wV,2,3,"span",35),t.YNc(4,kV,1,2,"span",36),t.YNc(5,TV,1,2,"span",37),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.objective.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}function AV(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t._UZ(1,"ghs-actions",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("actions",n.objectiveData.actions)("objective",n.objective)}}const SV=function(o,a,n){return{off:o,escort:a,denied:n}},EV=function(o){return{"active-border":o}},DV=function(o){return{"outer-denied":o}};let IV=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"objectiveName",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"health",0),(0,_.Z)(this,"objectiveData",void 0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"initiative",-1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.objective&&this.objective.objectiveId&&(this.objectiveData=d.v.objectiveDataByScenarioObjectiveIdentifier(this.objective.objectiveId)),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.activeConditions=d.v.entityManager.activeConditions(this.objective),this.objective.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))})}exhausted(){d.v.stateManager.before(this.objective.exhausted?"unsetObjectiveExhausted":"setObjectiveExhausted",this.objective.title||this.objective.name),this.objective.exhausted=!this.objective.exhausted,this.objective.exhausted?(this.objective.off=!0,this.objective.active=!1):this.objective.off=!1,d.v.sortFigures(this.objective),d.v.stateManager.after()}maxHealth(){return(0,ae.j9)(this.objective.maxHealth)}toggleFigure(e){(d.v.game.state==ge.D2.draw||R.r.settings.initiativeRequired&&this.objective.initiative<=0)&&!this.objective.exhausted&&this.objective.health>0?this.openInitiativeDialog(e):(d.v.stateManager.before(this.objective.active?"unsetActive":"setActive",this.objective.title||this.objective.name),d.v.roundManager.toggleFigure(this.objective),d.v.stateManager.after())}openInitiativeDialog(e){this.dialog.open(zO,{panelClass:"dialog",data:this.objective,positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}dragInitiativeMove(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),-1==this.initiative&&(this.initiative=this.objective.initiative),this.objective.initiative=e}dragInitiativeEnd(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),this.objective.initiative!=this.initiative&&(this.objective.initiative=this.initiative,d.v.stateManager.before("setObjectiveInitiative",this.objective.title||this.objective.name,""+e),this.objective.initiative=e,this.initiative=-1,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.objective),d.v.stateManager.after())}dragHpMove(e){this.health=e,this.objective.health+this.health>(0,ae.j9)(this.objective.maxHealth)&&(this.health=(0,ae.j9)(this.objective.maxHealth)-this.objective.health)}dragHpEnd(e){0!=this.health&&(d.v.stateManager.before("changeObjectiveHP",this.objective.title||this.objective.name,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.objective,this.objective,this.health),(this.objective.health<=0||this.objective.exhausted&&this.health>=0&&this.objective.health>0)&&(this.objective.escort?this.exhausted():d.v.characterManager.removeObjective(this.objective)),this.health=0,d.v.stateManager.after())}dragHpCancel(e){this.health=0}openEntityMenu(e){this.dialog.open($c,{panelClass:"dialog",data:{entity:this.objective,figure:this.objective},positionStrategy:this.overlay.position().flexibleConnectedTo(this.objectiveName).withPositions((0,he.sm)())})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-objective"]],viewQuery:function(e,i){if(1&e&&(t.Gf(_V,5),t.Gf(pV,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first),t.iGM(s=t.CRH())&&(i.objectiveName=s.first)}},inputs:{objective:"objective"},decls:34,vars:28,consts:[[1,"objective",3,"ngClass"],[1,"image-container"],[1,"objective-marker",3,"ngClass"],["class","placeholder placeholder-marker",3,"ghs-label",4,"ngIf"],[3,"entity"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[3,"figure"],["initiativeElement",""],[1,"stats"],["ghs-pointer-input","",1,"entity-menu-container",3,"singleClick"],[1,"column","col-1"],["ghs-pointer-input","",1,"title-container",3,"singleClick"],[1,"title"],["objectiveName",""],[1,"icon",3,"src"],[4,"ngIf"],[3,"ghs-label",4,"ngIf"],["class","ghs-svg exhausted","src","./assets/images/status/exhausted.svg",4,"ngIf"],[1,"markers"],["class","marker",4,"ngFor","ngForOf"],[1,"status-bar"],["ghs-pointer-input","",1,"health",3,"relative","screenWidth","singleClick","dragMove","dragEnd","dragCancel"],["src","./assets/images/status/health.svg"],[1,"conditions"],["class","condition",4,"ngFor","ngForOf"],["class","actions",3,"click",4,"ngIf"],[1,"spacer",3,"click"],[1,"icon-container",3,"click"],[3,"src"],[1,"placeholder","placeholder-marker",3,"ghs-label"],[3,"ghs-label"],["src","./assets/images/status/exhausted.svg",1,"ghs-svg","exhausted"],[1,"marker"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"condition"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],[1,"actions",3,"click"],[3,"actions","objective"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"a",1)(2,"span",2),t._uU(3),t.qZA(),t.YNc(4,fV,1,1,"span",3),t._UZ(5,"ghs-healthbar",4),t.qZA(),t.TgZ(6,"ghs-pointer-input",5),t.NdJ("dragMove",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeMove(l)})("dragEnd",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeEnd(l)})("singleClick",function(l){return i.toggleFigure(l)})("doubleClick",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.openInitiativeDialog(l)}),t.qZA(),t._UZ(7,"ghs-character-initiative",6,7)(9,"ghs-highlight-conditions",4),t.TgZ(10,"div",8)(11,"div",9),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(12,"div",10)(13,"div",9),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(14,"div",11),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)}),t.TgZ(15,"div",12,13),t._UZ(17,"img",14),t.YNc(18,mV,2,1,"span",15),t.YNc(19,vV,1,1,"span",16),t.YNc(20,CV,1,0,"img",17),t.qZA(),t.TgZ(21,"div",18),t.YNc(22,MV,2,1,"span",19),t.qZA()(),t.TgZ(23,"div",20)(24,"div",21),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)})("dragMove",function(l){return i.dragHpMove(l)})("dragEnd",function(l){return i.dragHpEnd(l)})("dragCancel",function(l){return i.dragHpCancel(l)}),t._UZ(25,"img",22),t.YNc(26,OV,4,7,"ng-container",15),t.YNc(27,PV,2,0,"span",15),t.qZA(),t.TgZ(28,"div",23),t.YNc(29,ZV,6,7,"span",24),t.qZA()()(),t.YNc(30,AV,2,2,"div",25),t.TgZ(31,"span",26),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(32,"div",27),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t._UZ(33,"img",28),t.qZA()()()),2&e&&(t.Q6J("ngClass",t.kEZ(20,SV,i.objective.off||i.objective.exhausted||i.objective.health<=0&&i.maxHealth()>0,i.objective.escort,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ngClass",t.VKq(24,EV,i.objective.active)),t.xp6(1),t.hij(" ",i.objective.id+1," "),t.xp6(1),t.Q6J("ngIf",i.objective.marker),t.xp6(1),t.Q6J("entity",i.objective),t.xp6(1),t.Q6J("ngClass",t.VKq(26,DV,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("figure",i.objective),t.xp6(2),t.Q6J("entity",i.objective),t.xp6(8),t.Q6J("src","./assets/images/objective/"+(i.objective.escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.objective.title),t.xp6(1),t.Q6J("ngIf",!i.objective.title),t.xp6(1),t.Q6J("ngIf",i.objective.exhausted),t.xp6(2),t.Q6J("ngForOf",i.objective.markers),t.xp6(2),t.Q6J("relative",!0)("screenWidth",!0),t.xp6(2),t.Q6J("ngIf",i.maxHealth()>0),t.xp6(1),t.Q6J("ngIf",0==i.maxHealth()),t.xp6(2),t.Q6J("ngForOf",i.activeConditions),t.xp6(1),t.Q6J("ngIf",i.objectiveData&&i.objectiveData.actions),t.xp6(3),t.Q6J("src","./assets/images/objective/"+(i.objective.escort?"escort":"objective")+".svg",t.LSH))},dependencies:[x.mk,x.sg,x.O5,s_,GO,VO,ag,ie,An,aa,Ii,sg],styles:[".objective[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-color-green);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;border-radius:calc(var(--ghs-unit) * .5);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.objective.escort[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}.objective[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{transition:filter .15s ease-in-out}.objective.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.objective.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{filter:grayscale(100%)}.objective[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1)}.objective[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5)}.objective[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.objective[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:0;left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:100%;z-index:4}.objective[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0;width:100%}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 28)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8);justify-content:space-evenly}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{pointer-events:none;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 5);width:auto;margin-left:calc(var(--ghs-unit) * -1);margin-right:calc(var(--ghs-unit) * .5)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.exhausted[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1);height:calc(var(--ghs-unit) * 4);width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{z-index:1000}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto}.objective[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 30);height:calc(var(--ghs-unit) * 11);margin:calc(var(--ghs-unit) * 1.5) 0;margin-left:calc(var(--ghs-unit) * 1);display:flex;font-size:calc(var(--ghs-unit) * 2.5);overflow:auto}.objective[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.objective[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);margin-left:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1);cursor:pointer;border-radius:calc(var(--ghs-unit) * 1);flex-shrink:0}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 3.8)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]:not(.active-border){box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-black)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .placeholder-marker[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -1);right:calc(var(--ghs-unit) * -1);font-size:calc(var(--ghs-unit) * 3.5)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:0;width:calc(var(--ghs-unit) * 9);left:0}.objective.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}"]})),a})();const NV=["standee"];function JV(o,a){if(1&o&&(t.TgZ(0,"span",25),t._UZ(1,"img",23),t.TgZ(2,"span",7),t._uU(3),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"action/range.svg",t.LSH),t.xp6(2),t.Oqu(n.range)}}const FT=function(o){return{center:o}};function UV(o,a){if(1&o&&(t.TgZ(0,"span",21)(1,"span",22),t._UZ(2,"img",23),t.TgZ(3,"span",7),t._uU(4),t.qZA(),t.YNc(5,JV,4,2,"span",24),t.qZA()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(4,FT,i.actionHints.length%2==1&&e==i.actionHints.length-1)),t.xp6(2),t.Q6J("src","./assets/images/"+(i.settingsManager.settings.fhStyle?"fh/":"")+"action/"+n.type+".svg",t.LSH),t.xp6(2),t.Oqu(n.value),t.xp6(1),t.Q6J("ngIf",n.range)}}function LV(o,a){if(1&o&&t._UZ(0,"span",26),2&o){const n=t.oxw();t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function QV(o,a){if(1&o&&(t.TgZ(0,"span",27),t._UZ(1,"img",23),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function RV(o,a){if(1&o&&t._UZ(0,"img",34),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw();t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const FV=function(){return[]};function qV(o,a){if(1&o&&(t.ynx(0),t.YNc(1,RV,1,3,"img",33),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,FV),n.value-1))}}function HV(o,a){if(1&o&&(t.TgZ(0,"span",7),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function jV(o,a){if(1&o&&t._UZ(0,"span",35),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function BV(o,a){if(1&o&&t._UZ(0,"span",36),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}const zV=function(o,a){return{center:o,expired:a}};function GV(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",21)(1,"span",28),t.NdJ("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeCondition(s))}),t._UZ(2,"img",23),t.YNc(3,qV,3,5,"ng-container",29),t.YNc(4,HV,2,3,"span",30),t.YNc(5,jV,1,2,"span",31),t.YNc(6,BV,1,2,"span",32),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.WLB(8,zV,i.entity.summon==i.SummonState.false&&i.activeConditions.length%2==1&&i.activeConditions.length==e+1,n.expired)),t.xp6(2),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.entity.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}const VV=function(o,a){return{active:o,new:a}};function YV(o,a){if(1&o&&(t.TgZ(0,"span",37)(1,"span",38),t._UZ(2,"img",23),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(3,FT,n.entity.entityConditions.length%2==0)),t.xp6(1),t.Q6J("ngClass",t.WLB(5,VV,n.entity.summon==n.SummonState.true,n.entity.summon==n.SummonState.new)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.figure.summonColor,".png",t.LSH)}}const KV=function(o,a,n,e,i,s,l,m,O,k){return{dead:o,off:a,dormant:n,revealed:e,active:i,"active-focus":s,denied:l,"action-hint-border":m,fh:O,modern:k}},$V=function(o){return{highlight:o}};let qT=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"standee",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"Conditions",re.gP),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"ConditionName",re.fT),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"health",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"actionHints",[]),(0,_.Z)(this,"activeIndex",-1),(0,_.Z)(this,"marker",""),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.overlay=s}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}additionalType(){return this.entity instanceof In.g?this.entity.type:this.entity instanceof Ee.eU?this.entity.name:""}update(){if(this.activeConditions=d.v.entityManager.activeConditions(this.entity,!0),this.entity.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))}),this.actionHints=[],R.r.settings.standeeStats&&this.figure instanceof Ze.Q&&this.entity instanceof In.g&&(this.actionHints=d.v.monsterManager.calcActionHints(this.figure,this.entity)),this.entity.revealed){const e=d.v.game.figures.find(i=>i.active);if(e){const i=d.v.game.figures.indexOf(e);-1!=i&&(-1==this.activeIndex?this.activeIndex=i:this.activeIndex!=i&&this.entity.number>0&&(this.entity.revealed=!1))}}this.marker=this.entity.marker,this.figure instanceof Nn.k&&this.figure.entities.flatMap(e=>e.marker).every((e,i,s)=>0==s.indexOf(e))&&(this.marker="")}dragHpMove(e){(0,ae.j9)(this.entity.maxHealth)>0&&(!(this.figure instanceof Ze.Q)||!this.figure.immortal)&&(this.health=e,this.entity.health+this.health>(0,ae.j9)(this.entity.maxHealth)&&(this.health=(0,ae.j9)(this.entity.maxHealth)-this.entity.health))}dragHpEnd(e){if(0!=this.health&&(0,ae.j9)(this.entity.maxHealth)>0&&(!(this.figure instanceof Ze.Q)||!this.figure.immortal)){let i=this.figure.name;!i&&this.figure instanceof Nn.k&&(i=this.figure.title,i||(i=this.figure.escort?"%escort%":"%objective%")),d.v.stateManager.before(this.figure.type+"ChangeEntityHp",i,""+this.entity.number,""+this.health,this.additionalType()),d.v.entityManager.changeHealth(this.entity,this.figure,this.health),this.figure instanceof Ze.Q&&this.figure.entities.every(s=>s.dead)&&this.figure.active&&d.v.roundManager.toggleFigure(this.figure),d.v.stateManager.after()}this.health=0}dragHpCancel(e){this.health=0}removeCondition(e){d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.figure,"removeCondition"),e.name,this.entity instanceof In.g?"monster."+this.entity.type+" ":""),d.v.entityManager.removeCondition(this.entity,e,e.permanent),d.v.stateManager.after()}doubleClick(e){this.entity.revealed?this.entity.revealed=!1:R.r.settings.activeStandees&&(d.v.stateManager.before(this.figure.type+(this.entity.active?"UnsetEntityActive":"SetEntityActive"),this.figure.name,""+this.entity.number,this.additionalType()),d.v.entityManager.toggleActive(this.figure,this.entity),d.v.stateManager.after())}openEntityMenu(e){if(this.entity.number<0&&this.figure instanceof Ze.Q&&this.entity instanceof In.g){const i=d.v.monsterManager.monsterStandeeMax(this.figure);if(R.r.settings.randomStandees){let s=Math.floor(Math.random()*i)+1;for(;d.v.monsterManager.monsterStandeeUsed(this.figure,s);)s=Math.floor(Math.random()*i)+1;d.v.stateManager.before("addRandomStandee","data.monster."+this.figure.name,"monster."+this.entity.type,""+s),this.entity.number=s,d.v.stateManager.after()}else this.dialog.open(Gd,{panelClass:"dialog",data:{monster:this.figure,type:this.entity.type,range:[],entity:this.entity,entities:this.figure.entities},positionStrategy:this.overlay.position().flexibleConnectedTo(this.standee).withPositions((0,he.sm)())})}else this.dialog.open($c,{panelClass:"dialog",data:{entity:this.entity,figure:this.figure,positionElement:this.standee},positionStrategy:this.overlay.position().flexibleConnectedTo(this.standee).withPositions((0,he.sm)())}).closed.subscribe({next:()=>{(this.entity instanceof In.g||this.entity instanceof oa.W)&&this.entity.dead&&this.element.nativeElement.classList.add("dead")}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-standee"]],viewQuery:function(e,i){if(1&e&&t.Gf(NV,5),2&e){let s;t.iGM(s=t.CRH())&&(i.standee=s.first)}},inputs:{figure:"figure",entity:"entity"},decls:25,vars:40,consts:[[1,"entity-border",3,"ngClass","entityAnimation"],[1,"entity",3,"ngClass"],[1,"standee"],["standee",""],[1,"background-image-container"],[1,"background-image"],[1,"number",3,"ngClass"],[1,"value"],[1,"health",3,"ghs-label","ghs-label-attribute"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"conditions","actions"],["class","condition-container",3,"ngClass",4,"ngFor","ngForOf"],[1,"markers"],["class","placeholder placeholder-marker",3,"ghs-label",4,"ngIf"],["class","marker",4,"ngFor","ngForOf"],[3,"entity","figure"],[1,"conditions"],["class","summon-container",3,"ngClass",4,"ngIf"],[3,"entity","diff"],[3,"entity"],[1,"drag-hp",3,"relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],[1,"condition-container",3,"ngClass"],[1,"condition"],[3,"src"],["class","range",4,"ngIf"],[1,"range"],[1,"placeholder","placeholder-marker",3,"ghs-label"],[1,"marker"],["ghs-pointer-input","",1,"condition",3,"doubleClick"],[4,"ngIf"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],[1,"summon-container",3,"ngClass"],[1,"summon",3,"ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"div",4),t._UZ(5,"div",5),t.qZA(),t.TgZ(6,"span",6)(7,"span",7),t._uU(8),t.qZA()(),t.TgZ(9,"span",8),t._uU(10),t.ALo(11,"ghsMinZero"),t._UZ(12,"span",9),t.qZA()(),t.TgZ(13,"div",10),t.YNc(14,UV,6,6,"span",11),t.qZA(),t.TgZ(15,"div",12),t.YNc(16,LV,1,1,"span",13),t.YNc(17,QV,2,1,"span",14),t.qZA(),t._UZ(18,"ghs-highlight-conditions",15),t.TgZ(19,"div",16),t.YNc(20,GV,7,11,"span",11),t.YNc(21,YV,3,8,"span",17),t.qZA(),t._UZ(22,"ghs-healthbar",18)(23,"ghs-entity-index-key",19),t.qZA(),t.TgZ(24,"ghs-pointer-input",20),t.NdJ("dragMove",function(l){return i.dragHpMove(l)})("dragEnd",function(l){return i.dragHpEnd(l)})("dragCancel",function(l){return i.dragHpCancel(l)})("singleClick",function(l){return i.openEntityMenu(l)})("doubleClick",function(l){return i.doubleClick(l)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.rFY(27,KV,[i.entity.dead,!i.entity.dormant&&i.entity.off,i.entity.dormant,!i.entity.dormant&&i.entity.revealed&&i.settingsManager.settings.scenarioRooms,!i.entity.dormant&&i.entity.active&&i.settingsManager.settings.activeStandees,!i.entity.dormant&&i.entity.active&&i.settingsManager.settings.activeStandees&&!i.figure.active,i.gameManager.isMonster(i.figure)&&!i.gameManager.stateManager.monsterPermissions[i.figure.name+"|"+i.figure.edition]||(i.gameManager.isObjective(i.figure)||i.gameManager.isObjectiveContainer(i.figure))&&i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters||i.gameManager.isCharacter(i.figure)&&!i.gameManager.stateManager.characterPermissions[i.figure.name+"|"+i.figure.edition],i.actionHints.length>0&&i.actionHints.length%2==1&&0==i.activeConditions.length&&i.entity.summon==i.SummonState.false,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme]))("entityAnimation",i.entity.dead),t.xp6(1),t.Q6J("ngClass",i.entity.type),t.xp6(4),t.Udp("background-image",i.figure.noThumbnail||i.settingsManager.settings.disableArtwork?"":"url("+i.gameManager.monsterManager.monsterThumbnail(i.figure)+")"),t.xp6(1),t.Q6J("ngClass",t.VKq(38,$V,i.entity.number<1&&!i.settingsManager.settings.disableAnimations)),t.xp6(2),t.Oqu(i.entity.number<0?"?":i.entity.number),t.xp6(1),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(1),t.hij("",i.EntityValueFunction(i.entity.maxHealth)>0?t.lcZ(11,25,i.entity.health+i.health):"-"," "),t.xp6(2),t.Q6J("value-sign",i.health)("hideEmpty",!0)("container",!0),t.xp6(2),t.Q6J("ngForOf",i.actionHints),t.xp6(2),t.Q6J("ngIf",i.marker),t.xp6(1),t.Q6J("ngForOf",i.entity.markers),t.xp6(1),t.Q6J("entity",i.entity)("figure",i.figure),t.xp6(2),t.Q6J("ngForOf",i.activeConditions),t.xp6(1),t.Q6J("ngIf",i.entity.summon&&i.entity.summon!=i.SummonState.false),t.xp6(1),t.Q6J("entity",i.entity)("diff",i.health),t.xp6(1),t.Q6J("entity",i.entity),t.xp6(1),t.Q6J("relative",!0)("screenWidth",!0))},dependencies:[x.mk,x.sg,x.O5,s_,GO,Gu,im,ie,An,aa,Ii,sg],styles:['.entity-border[_ngcontent-%COMP%]{position:relative}.entity-border[_ngcontent-%COMP%]:hover{z-index:999}.entity-border[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:calc(var(--ghs-unit) * 1.6 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));bottom:calc(var(--ghs-unit) * 1.1 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * .7)}.entity-border.action-hint-border[_ngcontent-%COMP%]:before{right:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%]:not(.dead){opacity:1;transform:translate(0)}.entity-border.dead[_ngcontent-%COMP%]{opacity:0;max-width:0;transform:translateY(100%)}@keyframes _ngcontent-%COMP%_monster-entity-active-focus{0%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-red)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .6) var(--ghs-color-red)}to{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-red)}}.entity-border.active.active-focus[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-active-focus 1s ease-in-out infinite}.entity-border.active[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .5) var(--ghs-color-red)}@keyframes _ngcontent-%COMP%_monster-entity-revealed{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-white)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-white)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-white)}}@keyframes _ngcontent-%COMP%_monster-entity-revealed-elite{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-yellow)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-yellow)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-yellow)}}@keyframes _ngcontent-%COMP%_monster-entity-revealed-boss{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-red)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-red)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-red)}}.entity-border.revealed[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-white);animation:_ngcontent-%COMP%_monster-entity-revealed 1s ease-in-out infinite}.entity-border.revealed[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-yellow);animation:_ngcontent-%COMP%_monster-entity-revealed-elite 1s ease-in-out infinite}.entity-border.revealed[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-red);animation:_ngcontent-%COMP%_monster-entity-revealed-boss 1s ease-in-out infinite}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]{position:relative;display:flex;cursor:pointer;height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));text-align:center;color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:100%;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .25 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));border:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) solid var(--ghs-color-black);border-bottom-width:calc(var(--ghs-unit) * .35 * var(--ghs-text-factor));border-top-left-radius:25%;border-top-right-radius:25%;background-color:var(--ghs-color-black);filter:var(--ghs-filter-outline)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;border-top-left-radius:25%;border-top-right-radius:25%;overflow:hidden;z-index:0}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{position:absolute;top:-7%;left:0;width:100%;height:150%;background-color:var(--ghs-color-darkgray);background-size:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor)) AUTO;background-repeat:no-repeat;filter:brightness(70%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .number[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));justify-content:center;align-items:center;font-family:ghs-normal;flex-shrink:0;z-index:1}@keyframes _ngcontent-%COMP%_number-pulse{0%{transform:scale(.9)}50%{transform:scale(1.1)}to{transform:scale(.9)}}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);background-color:var(--ghs-color-white);border-bottom-right-radius:50%;border-top-left-radius:35%;height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));text-shadow:none}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .number.highlight[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_number-pulse 2s ease-in-out infinite}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));position:relative;top:calc(var(--ghs-unit) * 1.2 * var(--ghs-text-factor));left:0;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]:before{content:" ";position:absolute;left:50%;top:calc(var(--ghs-unit) * -.9 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));background-image:url(health.8d6a842a197d29d3.svg);background-size:contain;background-repeat:no-repeat;transform:translate(-50%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * -4.5 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));z-index:1000}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .placeholder-marker[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1.3 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 3.2 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] ghs-element-icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * 1.4 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;bottom:0;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;height:calc(var(--ghs-unit) * 7.5 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.expired[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.expired[_ngcontent-%COMP%]{opacity:.6}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon.condition-overlay[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{transform-origin:center center;z-index:999}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(2n) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(2n) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(-25%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(odd) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(odd) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(25%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.center[_ngcontent-%COMP%]{grid-row:span 2}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.center[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.center[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{transform:scale(2)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:100%;transform:none;color:var(--ghs-color-white);font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));text-shadow:var(--ghs-outline-thin);filter:invert(1)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-outline)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .range[_ngcontent-%COMP%]{position:relative;top:20%}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .range[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.3 * var(--ghs-text-factor));height:auto}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .range[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.3 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * -.3 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));background-image:url(minus.97c98a810771fceb.svg);background-size:cover}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * .2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * .4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 8.2 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * .75 * var(--ghs-text-factor));z-index:0;border-radius:15%;overflow:hidden}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * -3.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity.normal[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{background-color:var(--ghs-color-white)}.entity-border[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{background-color:var(--ghs-color-yellow)}.entity-border[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}.entity-border.dormant[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]{filter:grayscale(.4)}.entity-border.dormant[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%], .entity-border.dormant[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{filter:grayscale(.8)}.entity-border[_ngcontent-%COMP%] .drag-hp[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));height:100%;z-index:4}@keyframes _ngcontent-%COMP%_monster-entity-active-focus-fh{0%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-blue)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .6) var(--ghs-color-blue)}to{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-blue)}}.entity-border.fh.active.active-focus[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-active-focus-fh 1s ease-in-out infinite}.entity-border.fh.active[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .5) var(--ghs-color-blue)}@keyframes _ngcontent-%COMP%_monster-entity-revealed-fh{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-darkgray)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}}.entity-border.fh.revealed[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-darkgray);animation:_ngcontent-%COMP%_monster-entity-revealed-fh 1s ease-in-out infinite}.entity-border.fh.revealed[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-revealed-elite 1s ease-in-out infinite}.entity-border.fh.revealed[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-revealed-boss 1s ease-in-out infinite}.entity-border.modern[_ngcontent-%COMP%]:not(.active) .standee[_ngcontent-%COMP%]{box-shadow:none;filter:none}']})),a})();const WV=["objectiveTitle"],XV=["objectiveName"],Vw=function(o){return{"active-border":o}};function tY(o,a){if(1&o&&(t.TgZ(0,"span",22),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,Vw,n.objective.active)),t.xp6(1),t.Oqu(n.entity.marker)}}function eY(o,a){if(1&o&&(t.ynx(0),t.YNc(1,tY,2,4,"span",3),t.TgZ(2,"span",21),t._uU(3),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.entity.marker),t.xp6(2),t.hij(" ",n.entity.number," ")}}function nY(o,a){if(1&o&&(t.TgZ(0,"span",22),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,Vw,n.objective.active)),t.xp6(1),t.Oqu(n.marker)}}function iY(o,a){if(1&o&&(t.TgZ(0,"span",23),t._UZ(1,"img",15),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,Vw,n.objective.active)),t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH)}}function oY(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-highlight-conditions",24),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("entity",n.entity)}}function aY(o,a){if(1&o&&t._UZ(0,"img",37),2&o){const n=t.oxw(2);t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH)}}function sY(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.objective.title,"")}}function rY(o,a){if(1&o&&t._UZ(0,"span",38),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function cY(o,a){if(1&o&&(t.ynx(0),t._uU(1),t.ALo(2,"ghsMinZero"),t._UZ(3,"span",39),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.AsE(" ",t.lcZ(2,5,n.entity.health+n.health),"/",n.entity.maxHealth," "),t.xp6(2),t.Q6J("value-sign",n.health)("hideEmpty",!0)("container",!0)}}function lY(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function gY(o,a){if(1&o&&t._UZ(0,"img",45),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw(2);t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const dY=function(){return[]};function hY(o,a){if(1&o&&(t.ynx(0),t.YNc(1,gY,1,3,"img",44),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,dY),n.value-1))}}function uY(o,a){if(1&o&&(t.TgZ(0,"span",46),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function _Y(o,a){if(1&o&&t._UZ(0,"span",47),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function pY(o,a){if(1&o&&t._UZ(0,"span",48),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}function fY(o,a){if(1&o&&(t.TgZ(0,"span",40),t._UZ(1,"img",15),t.YNc(2,hY,3,5,"ng-container",2),t.YNc(3,uY,2,3,"span",41),t.YNc(4,_Y,1,2,"span",42),t.YNc(5,pY,1,2,"span",43),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.entity.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}function mY(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",25),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.qZA(),t.TgZ(2,"div",26)(3,"div",25),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.qZA(),t.TgZ(4,"div",27),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.TgZ(5,"div",28,29),t.YNc(7,aY,1,1,"img",30),t.YNc(8,sY,2,1,"span",2),t.YNc(9,rY,1,1,"span",31),t._UZ(10,"ghs-entity-index-key",24),t.qZA()(),t.TgZ(11,"div",32)(12,"div",33),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpCancel(i))}),t._UZ(13,"img",34),t.YNc(14,cY,4,7,"ng-container",2),t.YNc(15,lY,2,0,"span",2),t.qZA(),t.TgZ(16,"div",35),t.YNc(17,fY,6,7,"span",36),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(7),t.Q6J("ngIf",n.entity.marker),t.xp6(1),t.Q6J("ngIf",n.objective.title),t.xp6(1),t.Q6J("ngIf",!n.objective.title),t.xp6(1),t.Q6J("entity",n.entity),t.xp6(2),t.Q6J("relative",!0)("screenWidth",!0),t.xp6(2),t.Q6J("ngIf",n.entity.maxHealth>0),t.xp6(1),t.Q6J("ngIf",0==n.entity.maxHealth),t.xp6(2),t.Q6J("ngForOf",n.activeConditions)}}function vY(o,a){if(1&o&&t._UZ(0,"img",37),2&o){const n=t.oxw(2);t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH)}}function CY(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.objective.title,"")}}function MY(o,a){if(1&o&&t._UZ(0,"span",38),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function OY(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",26)(2,"div",49)(3,"div",28,29),t.YNc(5,vY,1,1,"img",30),t.YNc(6,CY,2,1,"span",2),t.YNc(7,MY,1,1,"span",31),t.qZA()()(),t.BQk()),2&o){const n=t.oxw();t.xp6(5),t.Q6J("ngIf",n.objective.marker),t.xp6(1),t.Q6J("ngIf",n.objective.title),t.xp6(1),t.Q6J("ngIf",!n.objective.title)}}function PY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t._UZ(1,"ghs-actions",51),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("actions",n.objectiveData.actions)}}function yY(o,a){if(1&o&&t._UZ(0,"ghs-standee",54),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("figure",e.objective)("entity",n)}}function bY(o,a){if(1&o&&(t.TgZ(0,"div",52),t.YNc(1,yY,1,2,"ghs-standee",53),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.objective.entities)}}const xY=function(o,a,n){return{off:o,escort:a,denied:n}},wY=function(o){return{entity:o}},kY=function(o){return{"outer-denied":o}},TY=function(o){return{empty:o}},ZY=function(o,a){return{empty:o,disabled:a}};let AY=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"objectiveName",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"objectiveData",void 0),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"initiative",-1),(0,_.Z)(this,"health",0),(0,_.Z)(this,"marker",""),(0,_.Z)(this,"nonDead",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.objective&&this.objective.objectiveId&&(this.objectiveData=d.v.objectiveDataByScenarioObjectiveIdentifier(this.objective.objectiveId)),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.nonDead=this.objective.entities.filter(e=>d.v.entityManager.isAlive(e)).length,this.activeConditions=[],this.entity=void 0,this.marker="",1==this.nonDead?(this.entity=this.objective.entities.find(e=>d.v.entityManager.isAlive(e)),this.entity&&(this.activeConditions=d.v.entityManager.activeConditions(this.entity),this.entity.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))}))):this.objective.entities.flatMap(e=>e.marker).every((e,i,s)=>0==s.indexOf(e))&&(this.marker=this.objective.entities.flatMap(e=>e.marker)[0])}toggleFigure(e){d.v.game.state==ge.D2.draw||R.r.settings.initiativeRequired&&this.objective.initiative<=0?this.openInitiativeDialog(e):(d.v.stateManager.before(this.objective.active?"unsetActive":"setActive",this.objective.title||this.objective.name),d.v.roundManager.toggleFigure(this.objective),d.v.stateManager.after())}openInitiativeDialog(e){this.dialog.open(zO,{panelClass:"dialog",data:this.objective,positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}dragInitiativeMove(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),-1==this.initiative&&(this.initiative=this.objective.initiative),this.objective.initiative=e}dragInitiativeEnd(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),this.objective.initiative!=this.initiative&&(this.objective.initiative=this.initiative,d.v.stateManager.before("setObjectiveInitiative",this.objective.title||this.objective.name,""+e),this.objective.initiative=e,this.initiative=-1,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.objective),d.v.stateManager.after())}dragHpMove(e){this.health=e,this.entity&&this.entity.health+this.health>(0,ae.j9)(this.entity.maxHealth)&&(this.health=(0,ae.j9)(this.entity.maxHealth)-this.entity.health)}dragHpEnd(e){0!=this.health&&this.entity&&(d.v.stateManager.before("changeObjectiveEntityHP",this.objective.title||this.objective.name,(0,he.uZ)(this.health),""+this.entity.number),d.v.entityManager.changeHealth(this.entity,this.objective,this.health),this.entity.health<=0&&this.entity.maxHealth>0&&d.v.objectiveManager.removeObjective(this.objective),this.health=0,d.v.stateManager.after())}dragHpCancel(e){this.health=0}openEntityMenu(e){this.entity&&this.dialog.open($c,{panelClass:"dialog",data:{entity:this.entity,figure:this.objective},positionStrategy:this.overlay.position().flexibleConnectedTo(this.objectiveName).withPositions((0,he.sm)())})}openEntitiesMenu(e){this.dialog.open(Bw,{panelClass:"dialog",data:{objective:this.objective},positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}addEntity(){const e=this.objective.entities.filter(l=>d.v.entityManager.isAlive(l)).length;let i=e%12;if(this.objective.entities.find(l=>l.number==i)&&(i=e%12,e<12))for(;this.objective.entities.find(l=>l.number-1==i);)i++;let s=this.objective.name;s||(s=this.objective.title,s||(s=this.objective.escort?"%escort%":"%objective%")),d.v.stateManager.before("addObjective.entity",""+(i+1),s),d.v.objectiveManager.addObjectiveEntity(this.objective,i),d.v.stateManager.after()}removeCondition(e){this.entity&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.objective,"removeCondition"),e.name),d.v.entityManager.removeCondition(this.entity,e,e.permanent),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-objective-container"]],viewQuery:function(e,i){if(1&e&&(t.Gf(WV,5),t.Gf(XV,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first),t.iGM(s=t.CRH())&&(i.objectiveName=s.first)}},inputs:{objective:"objective"},decls:24,vars:31,consts:[[1,"objective",3,"ngClass"],[1,"image-container",3,"ngClass"],[4,"ngIf"],["class","map-marker",3,"ngClass",4,"ngIf"],["class","objective-icon",3,"ngClass",4,"ngIf"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[3,"figure"],["initiativeElement",""],[1,"stats"],["class","actions",3,"click",4,"ngIf"],[1,"spacer",3,"click"],[1,"add-entity"],["ghs-pointer-input","",1,"add-entity-button",3,"ghs-label","ghs-label-attribute","singleClick"],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"icon-container",3,"click"],[3,"src"],[1,"entities-container",3,"ngClass"],[1,"spacer"],[1,"entities-menu",3,"ngClass","entityAnimation","click"],["src","./assets/images/up.svg",1,"menu"],["class","entities",4,"ngIf"],[1,"objective-marker"],[1,"map-marker",3,"ngClass"],[1,"objective-icon",3,"ngClass"],[3,"entity"],["ghs-pointer-input","",1,"entity-menu-container",3,"singleClick"],[1,"column","col-1"],["ghs-pointer-input","",1,"title-container",3,"singleClick"],[1,"title"],["objectiveName",""],["class","icon",3,"src",4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"status-bar"],["ghs-pointer-input","",1,"health",3,"relative","screenWidth","singleClick","dragMove","dragEnd","dragCancel"],["src","./assets/images/status/health.svg"],[1,"conditions"],["class","condition",4,"ngFor","ngForOf"],[1,"icon",3,"src"],[3,"ghs-label"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"condition"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],[1,"title-container"],[1,"actions",3,"click"],[3,"actions"],[1,"entities"],[3,"figure","entity",4,"ngFor","ngForOf"],[3,"figure","entity"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"a",1),t.YNc(2,eY,4,2,"ng-container",2),t.YNc(3,nY,2,4,"span",3),t.YNc(4,iY,2,4,"span",4),t.qZA(),t.TgZ(5,"ghs-pointer-input",5),t.NdJ("dragMove",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeMove(l)})("dragEnd",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeEnd(l)})("singleClick",function(l){return i.toggleFigure(l)})("doubleClick",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.openInitiativeDialog(l)}),t.qZA(),t._UZ(6,"ghs-character-initiative",6,7),t.YNc(8,oY,2,1,"ng-container",2),t.TgZ(9,"div",8),t.YNc(10,mY,18,9,"ng-container",2),t.YNc(11,OY,8,3,"ng-container",2),t.YNc(12,PY,2,1,"div",9),t.TgZ(13,"span",10),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(14,"div",11)(15,"a",12),t.NdJ("singleClick",function(){return i.addEntity()}),t._UZ(16,"img",13),t.qZA()(),t.TgZ(17,"div",14),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t._UZ(18,"img",15),t.qZA()()(),t.TgZ(19,"div",16),t._UZ(20,"span",17),t.TgZ(21,"span",18),t.NdJ("click",function(l){return i.openEntitiesMenu(l)}),t._UZ(22,"img",19),t.qZA(),t.YNc(23,bY,2,1,"div",20),t.qZA()),2&e&&(t.Q6J("ngClass",t.kEZ(18,xY,i.objective.off,i.objective.escort,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters)),t.xp6(1),t.Q6J("ngClass",t.VKq(22,wY,i.entity)),t.xp6(1),t.Q6J("ngIf",i.entity),t.xp6(1),t.Q6J("ngIf",i.marker),t.xp6(1),t.Q6J("ngIf",!(i.marker||i.entity&&i.entity.marker)),t.xp6(1),t.Q6J("ngClass",t.VKq(24,kY,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("figure",i.objective),t.xp6(2),t.Q6J("ngIf",i.entity),t.xp6(2),t.Q6J("ngIf",i.entity),t.xp6(1),t.Q6J("ngIf",!i.entity),t.xp6(1),t.Q6J("ngIf",i.objectiveData&&i.objectiveData.actions),t.xp6(3),t.Q6J("ghs-label","objective.addEntity")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("src","./assets/images/objective/"+(i.objective.escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(26,TY,i.nonDead<2)),t.xp6(2),t.Q6J("ngClass",t.WLB(28,ZY,0==i.nonDead,i.nonDead<2))("entityAnimation",0==i.nonDead),t.xp6(2),t.Q6J("ngIf",i.nonDead>1))},dependencies:[x.mk,x.sg,x.O5,s_,VO,qT,ag,Gu,im,ie,An,aa,Ii,sg],styles:[".objective[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-color-green);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;border-radius:calc(var(--ghs-unit) * .5);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.objective.escort[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}.objective[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{transition:filter .15s ease-in-out}.objective.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.objective.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{filter:grayscale(100%)}.objective[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1)}.objective[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5)}.objective[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.objective[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:0;left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:100%;z-index:4}.objective[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0;width:100%}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 24);overflow:visible}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8);justify-content:space-evenly}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:visible}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{pointer-events:none;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center;white-space:nowrap}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 5);width:auto;margin-left:calc(var(--ghs-unit) * -1);margin-right:calc(var(--ghs-unit) * .5)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{z-index:1000}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto}.objective[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 28);height:calc(var(--ghs-unit) * 11);margin:calc(var(--ghs-unit) * 1.5) 0;margin-left:calc(var(--ghs-unit) * 1);display:flex;justify-content:center;font-size:calc(var(--ghs-unit) * 2.5);overflow:auto}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);margin-left:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1);cursor:pointer;border-radius:calc(var(--ghs-unit) * 1);flex-shrink:0}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);border-radius:100%}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .map-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 6.5)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * -1);right:calc(var(--ghs-unit) * -1);font-size:calc(var(--ghs-unit) * 2.1);z-index:1}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.objective[_ngcontent-%COMP%] .add-entity[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .add-entity-button[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));cursor:pointer;font-size:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 1.5)}.objective[_ngcontent-%COMP%] .add-entity-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);filter:var(--ghs-filter-white)}.objective.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}.entities-container[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;transition:max-height 1s ease-out;max-height:100%;max-width:calc(var(--ghs-unit) * 96);margin-top:calc(var(--ghs-unit) * .25 * var(--ghs-text-factor))}.entities-container.empty[_ngcontent-%COMP%]{max-height:0}.entities-container[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:none;width:calc(var(--ghs-unit) * 17.5);min-height:100%}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:block;width:auto;height:calc(var(--ghs-unit) * 8.5);margin-right:calc(var(--ghs-unit) * 1)}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{position:absolute;top:50%;left:calc(var(--ghs-unit) * -4);transform:translateY(-50%);width:calc(var(--ghs-unit) * 3.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-darkgray);opacity:.5}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:not(.empty){opacity:1;transform:translate(0)}.entities-container[_ngcontent-%COMP%] .entities-menu.empty[_ngcontent-%COMP%]{opacity:0;height:0;max-width:0;transform:translateY(100%)}.entities-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%]{cursor:initial;pointer-events:none}.entities-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{display:none}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.icon[_ngcontent-%COMP%]{opacity:.5}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.menu[_ngcontent-%COMP%]{opacity:1}.entities-container[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;max-width:calc(var(--ghs-unit) * 77.5)}.entities-container[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] ghs-standee[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);transition:all 1s ease-out}"]})),a})();const SY=function(o){return{"active-border":o}};function EY(o,a){if(1&o&&t._UZ(0,"img",3),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,SY,n.monster.active))("src",n.gameManager.monsterManager.monsterThumbnail(n.monster),t.LSH)}}function DY(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Oqu(n[0])}}const IY=function(o,a){return{"active-border":o,off:a}};function NY(o,a){if(1&o&&(t.TgZ(0,"span",4)(1,"span",5),t.YNc(2,DY,2,1,"span",6),t.qZA(),t.TgZ(3,"span",7),t._UZ(4,"span",8),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,IY,n.monster.active,n.monster.off)),t.xp6(2),t.Q6J("ngForOf",n.settingsManager.getLabel("data.monster."+n.monster.name).split(" ")),t.xp6(2),t.Q6J("ghs-label","data.monster."+n.monster.name)}}const JY=function(o,a,n){return{disabled:o,"full-ability":a,modern:n}},UY=function(o,a){return{closed:o,opened:a}};let LY=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),this.dialog=e}toggleFigure(){d.v.game.state==ge.D2.next&&d.v.monsterManager.monsterEntityCount(this.monster)?(d.v.stateManager.before(this.monster.active?"unsetActive":"setActive","data.monster."+this.monster.name),d.v.roundManager.toggleFigure(this.monster),d.v.stateManager.after()):this.imageDialog()}imageDialog(){R.r.settings.disableArtwork||this.dialog.open(QY,{data:this.monster})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-image"]],inputs:{monster:"monster"},decls:3,vars:10,consts:[["ghs-pointer-input","",1,"image",3,"onRelease","ngClass","ghs-label","ghs-label-attribute","singleClick","doubleClick"],[3,"ngClass","src",4,"ngIf"],["class","no-artwork",3,"ngClass",4,"ngIf"],[3,"ngClass","src"],[1,"no-artwork",3,"ngClass"],[1,"letter"],[4,"ngFor","ngForOf"],[1,"name"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("singleClick",function(){return i.toggleFigure()})("doubleClick",function(){return i.imageDialog()}),t.YNc(1,EY,1,4,"img",1),t.YNc(2,NY,5,6,"span",2),t.qZA()),2&e&&(t.Q6J("onRelease",!0)("ngClass",t.kEZ(6,JY,i.gameManager.game.state==i.GameState.draw||0==i.monster.entities.length,i.settingsManager.settings.showFullAbilityCard,"modern"==i.settingsManager.settings.theme))("ghs-label",i.gameManager.game.state==i.GameState.next?i.monster.active?"game.figure.endTurn":"game.figure.startTurn":"")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngIf",!i.monster.noThumbnail&&!i.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ngIf",i.monster.noThumbnail||i.settingsManager.settings.disableArtwork))},dependencies:[x.mk,x.sg,x.O5,ie,An],styles:[".image[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 16);height:calc(var(--ghs-unit) * 16);flex-direction:column;justify-content:center;align-items:center;text-align:center;cursor:pointer}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;border-radius:100%;transition:box-shadow .1s ease-in-out}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:not(.active-border){box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;font-family:var(--ghs-font-title);width:100%;height:100%;border-radius:100%;transition:box-shadow .1s ease-in-out;color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-color:var(--ghs-character-color)}.image[_ngcontent-%COMP%] .no-artwork.off[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%]:not(.active-border){box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%] .letter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 6)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -1);font-size:calc(var(--ghs-unit) * 2)}.image.disabled[_ngcontent-%COMP%]{cursor:initial}.image.full-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 17.5);height:calc(var(--ghs-unit) * 17.5)}.image.modern[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:not(.active-border){box-shadow:none}"]})),a})(),QY=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"opened",!1),this.monster=e,this.dialogRef=i}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},400)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-image-dialog"]],decls:3,vars:5,consts:[[1,"monster-image-dialog",3,"ngClass"],[3,"src"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"img",1),t.qZA(),t.TgZ(2,"div",2),t.NdJ("click",function(){return i.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.WLB(2,UY,!i.opened,i.opened)),t.xp6(1),t.Q6J("src",i.gameManager.monsterManager.monsterArtwork(i.monster),t.LSH))},dependencies:[x.mk],styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.monster-image-dialog[_ngcontent-%COMP%]{width:100vw;max-width:600px;height:100vw;max-height:600px;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0);display:flex;justify-content:center;align-items:center}.monster-image-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:80%;height:auto;border-radius:2%;filter:var(--ghs-filter-shadow)}.monster-image-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.monster-image-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.1s}.close-container[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;inset:0}"]})),a})();const RY=["menu"];function FY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",3),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.draw())}),t._UZ(1,"span",4),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.drawAnother"))}function qY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",3),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.restoreDefault())}),t._UZ(1,"span",4),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.restore"))}function HY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",3),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.defaultSort())}),t._UZ(1,"span",4),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.defaultSort"))}function jY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",5),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleDrawExtra())}),t.qZA(),t._UZ(2,"span",4),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.monster.drawExtra),t.xp6(1),t.Q6J("ghs-label","game.cards.drawExtra")}}function BY(o,a){1&o&&t._UZ(0,"div",17)}function zY(o,a){1&o&&t._UZ(0,"div",22)}function GY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(i))}),t._UZ(1,"img",24),t.qZA()}}const HT=function(o,a){return{"expanded-ability":o,"bottom-actions":a}};function VY(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",18),t._UZ(2,"ghs-ability",19),t.YNc(3,zY,1,0,"div",20),t.YNc(4,GY,2,0,"a",21),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(7,HT,e.settingsManager.settings.showExpandedAbilityCard&&(2==e.reveal||n.revealed),e.gameManager.hasBottomAbility(n))),t.xp6(1),t.Q6J("ability",n)("monster",e.monster)("flipped",2==e.reveal)("reveal",!0),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}function YY(o,a){1&o&&t._UZ(0,"div",22)}function KY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(i))}),t._UZ(1,"img",24),t.qZA()}}function $Y(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",18),t._UZ(2,"ghs-ability",25),t.YNc(3,YY,1,0,"div",20),t.YNc(4,KY,2,0,"a",21),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(6,HT,e.settingsManager.settings.showExpandedAbilityCard,e.gameManager.hasBottomAbility(n))),t.xp6(1),t.Q6J("ability",n)("monster",e.monster)("flipped",!0),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}const WY=function(o){return{edit:o}},XY=function(o){return{denied:o}};let tK=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"bottomActions",!1),this.monster=e,this.dialogRef=i}ngOnInit(){setTimeout(()=>{this.menuElement&&(this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)")},R.r.settings.disableAnimations?0:250),this.bottomActions=d.v.monsterManager.hasBottomActions(this.monster)}toggleEdit(){this.edit=!this.edit,setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}upcomingCards(){let e=this.monster.ability;return e>=0&&this.bottomActions&&e++,this.monster.abilities.filter((i,s)=>s>e).map(i=>d.v.abilities(this.monster)[i])}disgardedCards(){let e=this.monster.ability;return e>=0&&this.bottomActions&&e++,[...this.monster.abilities.filter((i,s)=>s<=e).map(i=>d.v.abilities(this.monster)[i]).reverse(),...this.monster.abilities.filter((i,s)=>s>e&&sd.v.abilities(this.monster)[i])]}abilityIndex(e){return d.v.abilities(this.monster).indexOf(e)}shuffle(){d.v.stateManager.before("shuffleAbilityDeck","data.monster."+this.monster.name),d.v.monsterManager.shuffleAbilities(this.monster),d.v.stateManager.after()}draw(){d.v.stateManager.before("drawAbility","data.monster."+this.monster.name),d.v.monsterManager.drawAbility(this.monster),d.v.stateManager.after()}toggleDrawExtra(){this.monster.drawExtra?(d.v.stateManager.before("unsetDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!1,d.v.monsterManager.applySameDeck(this.monster),d.v.stateManager.after()):d.v.monsterManager.applySameDeck(this.monster)&&(d.v.stateManager.before("setDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!0,d.v.game.state==ge.D2.next&&d.v.monsterManager.drawExtra(this.monster),d.v.stateManager.after())}dropUpcoming(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer){const s=this.monster.ability+1;Fn(this.monster.abilities,e.previousIndex+s,e.currentIndex+s)}else{const s=this.monster.ability;Fn(this.monster.abilities,s-e.previousIndex,e.currentIndex+s),this.monster.ability=this.monster.ability-1}const i=d.v.monsterManager.getSameDeckMonster(this.monster);i&&d.v.monsterManager.applySameDeck(i),d.v.stateManager.after()}dropDisgarded(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer)Fn(this.monster.abilities,this.monster.ability-e.previousIndex,this.monster.ability-e.currentIndex);else{this.monster.ability=this.monster.ability+1;const s=this.monster.ability;Fn(this.monster.abilities,e.previousIndex+s,s-e.currentIndex)}const i=d.v.monsterManager.getSameDeckMonster(this.monster);i&&d.v.monsterManager.applySameDeck(i),d.v.stateManager.after()}restoreDefault(){d.v.stateManager.before("restoreDefaultAbilities","data.monster."+this.monster.name);const e=d.v.abilities(this.monster);this.monster.abilities=e.filter(i=>!i.level||isNaN(+i.level)||(0,ae.j9)(i.level)<=this.monster.level).map((i,s)=>s),this.monster.ability=-1,d.v.stateManager.after()}remove(e){const i=d.v.abilities(this.monster)[this.monster.abilities[e+this.monster.ability+1]];d.v.stateManager.before("removeAbility","data.monster."+this.monster.name,this.abilityLabel(i)),this.monster.abilities.splice(e+this.monster.ability+1,1),d.v.stateManager.after()}abilityLabel(e){let i="data.monster."+this.monster.name;return e?.name?i="data.ability."+e.name:this.monster.deck!=this.monster.name&&(i="data.deck."+this.monster.deck,i.split(".")[i.split(".").length-1]===ja(R.r.getLabel(i))&&this.monster.deck&&(i="data.monster."+this.monster.deck)),ja(R.r.getLabel(i))}defaultSort(){this.monster.abilities=this.monster.abilities.sort((e,i)=>e-i)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-abilities-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(RY,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},decls:25,vars:25,consts:[[1,"abilities-dialog",3,"ngClass"],[1,"menu",3,"ngClass"],["menu",""],[3,"click"],[3,"ghs-label"],["type","checkbox",3,"checked","click"],[1,"insert-menu"],[3,"click",4,"ngIf"],[4,"ngIf"],[1,"scroll-container"],[1,"abilities-container"],["cdkDropList","",1,"upcoming","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["upcomingList","cdkDropList"],["class","empty",4,"ngIf"],[4,"ngFor","ngForOf"],["cdkDropList","",1,"disgarded","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["disgardedList","cdkDropList"],[1,"empty"],["cdkDrag","",1,"container","drag-hidden",3,"ngClass"],[3,"ability","monster","flipped","reveal"],["cdkDragHandle","","class","drag-handle",4,"ngIf"],["class","button-remove",3,"click",4,"ngIf"],["cdkDragHandle","",1,"drag-handle"],[1,"button-remove",3,"click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[3,"ability","monster","flipped"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1,2)(3,"a",3),t.NdJ("click",function(){return i.reveal=(i.reveal+1)%3}),t._UZ(4,"span",4),t.qZA(),t.TgZ(5,"a",3),t.NdJ("click",function(){return i.shuffle()}),t._UZ(6,"span",4),t.qZA(),t.TgZ(7,"label")(8,"input",5),t.NdJ("click",function(){return i.toggleEdit()}),t.qZA(),t._UZ(9,"span",4),t.qZA(),t.TgZ(10,"div",6),t.YNc(11,FY,2,1,"a",7),t.YNc(12,qY,2,1,"a",7),t.YNc(13,HY,2,1,"a",7),t.YNc(14,jY,3,2,"label",8),t.qZA()(),t.TgZ(15,"div",9)(16,"div",10)(17,"div",11,12),t.NdJ("cdkDropListDropped",function(l){return i.dropUpcoming(l)}),t.YNc(19,BY,1,0,"div",13),t.YNc(20,VY,5,10,"ng-container",14),t.qZA(),t.TgZ(21,"div",15,16),t.NdJ("cdkDropListDropped",function(l){return i.dropDisgarded(l)}),t._UZ(23,"div",17),t.YNc(24,$Y,5,9,"ng-container",14),t.qZA()()()()),2&e){const s=t.MAs(18),l=t.MAs(22);t.Q6J("ngClass",t.VKq(21,WY,i.edit)),t.xp6(1),t.Q6J("ngClass",t.VKq(23,XY,i.monster&&i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.monsterPermissions[i.monster.name+"|"+i.monster.edition])),t.xp6(3),t.Q6J("ghs-label",2==i.reveal?"game.cards.coverAll":0==i.reveal?"game.cards.revealAll":"game.cards.revealAllConfirm"),t.xp6(2),t.Q6J("ghs-label","game.cards.shuffle"),t.xp6(2),t.Q6J("checked",i.edit),t.xp6(1),t.Q6J("ghs-label","game.cards.edit"),t.xp6(2),t.Q6J("ngIf",i.edit||i.bottomActions),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.gameManager.monsterManager.getSameDeckMonster(i.monster)),t.xp6(2),t.Udp("max-height",i.maxHeight),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",l)("cdkDropListAutoScrollStep",20),t.xp6(2),t.Q6J("ngIf",0==i.upcomingCards().length),t.xp6(1),t.Q6J("ngForOf",i.upcomingCards()),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",s)("cdkDropListAutoScrollStep",20),t.xp6(3),t.Q6J("ngForOf",i.disgardedCards())}},dependencies:[x.mk,x.sg,x.O5,Bs,Ms,Zr,a_,ie],styles:['.abilities-dialog[_ngcontent-%COMP%]{position:relative}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));color:var(--ghs-color-gray)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-evenly;flex-basis:100%;flex-shrink:0}.abilities-dialog[_ngcontent-%COMP%] .drop-list[_ngcontent-%COMP%]{position:relative}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%]{display:flex;margin:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 80 * var(--ghs-text-factor));max-height:80vh}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;padding:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 40 * var(--ghs-text-factor))}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 37 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 23.7 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));flex-shrink:0;flex-grow:0}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container.expanded-ability[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container.expanded-ability[_ngcontent-%COMP%]{height:auto;min-height:calc(var(--ghs-unit) * 23.7 * var(--ghs-text-factor))}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container.bottom-actions[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container.bottom-actions[_ngcontent-%COMP%]{min-height:initial;height:calc(var(--ghs-unit) * 49.95 * var(--ghs-text-factor))}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{width:100%;height:100%}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;left:50%;top:50%;width:50%;height:70%;transform:translate(-50%,-50%)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .9 * var(--ghs-text-factor));display:block;margin:calc(var(--ghs-unit) * .7 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 36.6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 23.3 * var(--ghs-text-factor));border-radius:calc(var(--ghs-unit) * 1);border-style:dashed;border-width:calc(var(--ghs-unit) * .2);border-color:var(--ghs-color-white)}.abilities-dialog[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.5}.abilities-dialog[_ngcontent-%COMP%] .cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.abilities-dialog[_ngcontent-%COMP%] .cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}']})),a})();const eK=["menu"];function nK(o,a){1&o&&t._UZ(0,"div",6)}function iK(o,a){1&o&&t._UZ(0,"div",7)}function oK(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"ghs-ability",3),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openAbilities(i))})("doubleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openAbility(i,!0))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ability",n.secondAbility)("monster",n.monster)("flipped",n.flipped)("highlightElements",n.settingsManager.settings.interactiveAbilities)}}function aK(o,a){if(1&o&&(t.TgZ(0,"span",8),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.AsE(" ",n.monster.abilities.length-n.gameManager.monsterManager.drawnAbilities(n.monster)-(n.secondAbility?1:0),"/",n.monster.abilities.length,"\n")}}const sK=function(o,a,n,e,i,s,l){return{flipped:o,"full-ability":a,"expanded-ability":n,"bottom-actions":e,"second-ability":i,disabled:s,denied:l}};let rK=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"index",-1),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"ability",void 0),(0,_.Z)(this,"secondAbility",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"cardPopup",!1),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.flipped=this.calcFlipped()}calcFlipped(){if(!R.r.settings.abilities||(this.ability=-1==this.index?d.v.monsterManager.getAbility(this.monster):d.v.abilities(this.monster)[this.index],!this.ability&&d.v.monsterManager.hasBottomActions(this.monster)&&(this.ability=d.v.abilities(this.monster)[0],this.secondAbility=d.v.abilities(this.monster)[1]),!this.ability))return!1;d.v.hasBottomAbility(this.ability)&&(this.secondAbility=d.v.abilities(this.monster)[this.monster.abilities[this.monster.ability+(this.monster.abilitys.active&&l>m.indexOf(this.monster))||d.v.game.figures.every(s=>!s.active));return d.v.game.state==ge.D2.next&&i&&(e=e||d.v.game.state==ge.D2.next&&this.monster.lastDraw==d.v.game.round),e&&i}toggleEdit(){this.edit=!this.edit,setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}upcomingCards(){return this.monster.abilities.filter((e,i)=>i>this.monster.ability).map(e=>d.v.abilities(this.monster)[e])}disgardedCards(){return this.monster.abilities.filter((e,i)=>i<=this.monster.ability).map(e=>d.v.abilities(this.monster)[e]).reverse()}abilityIndex(e){return d.v.abilities(this.monster).indexOf(e)}shuffle(){d.v.stateManager.before("shuffleAbilityDeck","data.monster."+this.monster.name),d.v.monsterManager.shuffleAbilities(this.monster),d.v.stateManager.after()}draw(){d.v.stateManager.before("drawAbility","data.monster."+this.monster.name),d.v.monsterManager.drawAbility(this.monster),d.v.stateManager.after()}toggleDrawExtra(){this.monster.drawExtra?(d.v.stateManager.before("unsetDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!1,d.v.monsterManager.applySameDeck(this.monster),d.v.stateManager.after()):d.v.monsterManager.applySameDeck(this.monster)&&(d.v.stateManager.before("setDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!0,d.v.game.state==ge.D2.next&&d.v.monsterManager.drawExtra(this.monster),d.v.stateManager.after())}dropUpcoming(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer){const i=this.monster.ability+1;Fn(this.monster.abilities,e.previousIndex+i,e.currentIndex+i)}else{const i=this.monster.ability;Fn(this.monster.abilities,i-e.previousIndex,e.currentIndex+i),this.monster.ability=this.monster.ability-1}d.v.stateManager.after()}dropDisgarded(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer)Fn(this.monster.abilities,this.monster.ability-e.previousIndex,this.monster.ability-e.currentIndex);else{this.monster.ability=this.monster.ability+1;const i=this.monster.ability;Fn(this.monster.abilities,e.previousIndex+i,i-e.currentIndex)}d.v.stateManager.after()}restoreDefault(){d.v.stateManager.before("restoreDefaultAbilities","data.monster."+this.monster.name);const e=d.v.abilities(this.monster);this.monster.abilities=e.filter(i=>!i.level||isNaN(+i.level)||"number"==typeof i.level&&i.level<=this.monster.level).map((i,s)=>s),this.monster.ability=-1,d.v.stateManager.after()}remove(e){const i=d.v.abilities(this.monster)[this.monster.abilities[e+this.monster.ability+1]];d.v.stateManager.before("removeAbility","data.monster."+this.monster.name,this.abilityLabel(i)),this.monster.abilities.splice(e+this.monster.ability+1,1),d.v.stateManager.after()}abilityLabel(e){let i="data.monster."+this.monster.name;return e?.name?i="data.ability."+e.name:this.monster.deck!=this.monster.name&&(i="data.deck."+this.monster.deck,i.split(".")[i.split(".").length-1]===ja(R.r.getLabel(i))&&this.monster.deck&&(i="data.monster."+this.monster.deck)),ja(R.r.getLabel(i))}defaultSort(){this.monster.abilities=this.monster.abilities.sort((e,i)=>e-i)}openAbilities(e){R.r.settings.abilities&&(!e.srcEvent||!e.srcEvent.defaultPrevented)&&this.dialog.open(tK,{panelClass:"dialog",data:this.monster})}openAbility(e,i=!1){R.r.settings.abilities&&(this.flipped?this.dialog.open(kT,{panelClass:"fullscreen-panel",data:{ability:i?this.secondAbility:this.ability,monster:this.monster}}):this.openAbilities(e))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-ability-card"]],viewQuery:function(e,i){if(1&e&&t.Gf(eK,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},inputs:{monster:"monster",index:"index"},decls:6,vars:17,consts:[[1,"container",3,"ngClass"],["class","hover-effect initiative",4,"ngIf"],["class","hover-effect title",4,"ngIf"],["ghs-pointer-input","",3,"ability","monster","flipped","highlightElements","singleClick","doubleClick"],[4,"ngIf"],["class","left-abilities",4,"ngIf"],[1,"hover-effect","initiative"],[1,"hover-effect","title"],[1,"left-abilities"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,nK,1,0,"div",1),t.YNc(2,iK,1,0,"div",2),t.TgZ(3,"ghs-ability",3),t.NdJ("singleClick",function(l){return i.openAbilities(l)})("doubleClick",function(l){return i.openAbility(l)}),t.qZA(),t.YNc(4,oK,2,4,"ng-container",4),t.qZA(),t.YNc(5,aK,2,2,"span",5)),2&e&&(t.Q6J("ngClass",t.Hh0(9,sK,i.flipped,i.settingsManager.settings.showFullAbilityCard||i.settingsManager.settings.showExpandedAbilityCard,i.settingsManager.settings.showExpandedAbilityCard&&i.flipped,i.gameManager.monsterManager.hasBottomActions(i.monster),i.secondAbility,!i.settingsManager.settings.abilities,i.monster&&i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.monsterPermissions[i.monster.name+"|"+i.monster.edition])),t.xp6(1),t.Q6J("ngIf",!i.secondAbility&&!i.settingsManager.settings.showFullAbilityCard&&!i.settingsManager.settings.showExpandedAbilityCard),t.xp6(1),t.Q6J("ngIf",!i.secondAbility&&!i.settingsManager.settings.showFullAbilityCard&&!i.settingsManager.settings.showExpandedAbilityCard),t.xp6(1),t.Q6J("ability",i.ability)("monster",i.monster)("flipped",i.flipped)("highlightElements",i.settingsManager.settings.interactiveAbilities),t.xp6(1),t.Q6J("ngIf",i.secondAbility),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.abilities))},dependencies:[x.mk,x.O5,a_,An],styles:['[_nghost-%COMP%]{position:relative}.container[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 21.5);overflow:hidden;border-radius:calc(var(--ghs-unit) * 1);cursor:help}.container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{display:inline-block;position:relative;top:calc(var(--ghs-unit) * -3);left:0;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 25.5);transition:top .25s ease-in-out;z-index:3}.container[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:2}.container.disabled[_ngcontent-%COMP%]{pointer-events:none}.container.flipped[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * -4)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]{content:" ";display:block;position:absolute;top:0;left:0;z-index:4}.container.flipped[_ngcontent-%COMP%] .hover-effect.initiative[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8.5);height:calc(var(--ghs-unit) * 5)}.container.flipped[_ngcontent-%COMP%] .hover-effect.title[_ngcontent-%COMP%]{width:100%;height:calc(var(--ghs-unit) * 1.5)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]:hover.initiative{height:calc(var(--ghs-unit) * 9)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]:hover.title{height:calc(var(--ghs-unit) * 4)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]:hover ~ ghs-ability[_ngcontent-%COMP%]{top:0}.container.second-ability[_ngcontent-%COMP%]{display:flex}.container.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;width:calc(var(--ghs-unit) * 20);height:calc(var(--ghs-unit) * 10.75)}.container.second-ability[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{position:absolute;inset:0 50% 0 0}.container.second-ability[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]:nth-of-type(2){left:50%;right:0}.container.bottom-actions[_ngcontent-%COMP%]{overflow-y:auto}.container.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;height:calc(var(--ghs-unit) * 54)}.container.bottom-actions.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 27)}.container.full-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 37);height:calc(var(--ghs-unit) * 24)}.container.full-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;width:calc(var(--ghs-unit) * 37);height:calc(var(--ghs-unit) * 24)}.container.full-ability.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18.5);height:calc(var(--ghs-unit) * 12)}.container.full-ability.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 38.2)}.container.full-ability.bottom-actions.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 25)}.container.expanded-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 37);height:auto;min-height:calc(var(--ghs-unit) * 24)}.container.expanded-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;width:calc(var(--ghs-unit) * 37);height:auto;min-height:calc(var(--ghs-unit) * 24)}.container.expanded-ability.bottom-actions[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 38.2)}.container.expanded-ability.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 38.2)}.container.expanded-ability.bottom-actions.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 25)}.container.expanded-ability.second-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 25)}.container.expanded-ability.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18.5);height:calc(var(--ghs-unit) * 12);min-height:initial}.left-abilities[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2);position:absolute;color:var(--ghs-color-gray);right:calc(var(--ghs-unit) * .5);bottom:calc(var(--ghs-unit) * 0);z-index:4}']})),a})();function cK(o,a){1&o&&t._UZ(0,"img",4)}function lK(o,a){1&o&&t._UZ(0,"img",5)}const gK=function(o){return{disabled:o}};let dK=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"range",[]),(0,_.Z)(this,"nonDead",0),(0,_.Z)(this,"count",0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"maxStandees",0),(0,_.Z)(this,"usedStandees",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.elementRef=e,this.dialog=i,this.overlay=s}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.maxStandees=d.v.monsterManager.monsterStandeeMax(this.monster),this.usedStandees=d.v.monsterManager.monsterStandeeCount(this.monster)}hasEntity(){return this.monster.entities.filter(e=>d.v.entityManager.isAlive(e)&&(!R.r.settings.hideStats||e.type==this.type)).length>0}open(){if(R.r.settings.disableStandees)this.hasEntity()?this.monster.entities=this.monster.entities.filter(e=>R.r.settings.hideStats&&e.type!=this.type):(this.monster.entities=this.monster.entities.filter(e=>R.r.settings.hideStats&&e.type!=this.type),R.r.settings.randomStandees?this.randomStandee():this.nextStandee());else if(!(this.nonDead>=this.count))if(this.maxStandees==this.count&&this.nonDead==this.count-1&&this.monster.entities.every(e=>e.number>0))for(let e=0;ed.v.entityManager.isAlive(i)&&i.number==e+1)||this.pickNumber(e+1);else R.r.settings.randomStandees?this.randomStandee():this.dialog.open(Gd,{panelClass:"dialog",data:{monster:this.monster,type:this.type,range:this.range},positionStrategy:this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions((0,he.sm)(this.type==ee.M.elite?"left":"right"))})}randomStandee(){let e=Math.floor(Math.random()*this.maxStandees)+1;for(;d.v.monsterManager.monsterStandeeUsed(this.monster,e);)e=Math.floor(Math.random()*this.maxStandees)+1;this.pickNumber(e,!0,!1)}nextStandee(){let e=1;for(;this.monster.entities.some(i=>i.number==e);)e+=1;this.pickNumber(e,!0,!0)}pickNumber(e,i=!1,s=!1){if(!d.v.monsterManager.monsterStandeeUsed(this.monster,e)&&this.type){let l="addStandee";i&&!s?l="addRandomStandee":i&&(l="addNextStandee"),d.v.stateManager.before(l,"data.monster."+this.monster.name,"monster."+this.type,""+e);const m=this.monster.entities.find(k=>k.number==e);m&&d.v.monsterManager.removeMonsterEntity(this.monster,m);const O=d.v.monsterManager.addMonsterEntity(this.monster,e,this.type,!1);d.v.game.state==ge.D2.next&&O&&(this.monster.active=!d.v.game.figures.some(k=>k.active),this.monster.active&&(d.v.sortFigures(this.monster),O.active=!0)),d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-numberpicker"]],inputs:{monster:"monster",type:"type",range:"range",nonDead:"nonDead",count:"count"},decls:4,vars:10,consts:[["ghs-pointer-input","",3,"ngClass","ghs-label","ghs-label-attribute","singleClick"],["button",""],["class","ghs-svg","src","./assets/images/plus.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/minus.svg",4,"ngIf"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/minus.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"a",0,1),t.NdJ("singleClick",function(){return i.open()}),t.YNc(2,cK,1,0,"img",2),t.YNc(3,lK,1,0,"img",3),t.qZA()),2&e&&(t.Gre("button active-outline ",i.type,""),t.Q6J("ngClass",t.VKq(8,gK,!i.settingsManager.settings.disableStandees&&(i.nonDead>=i.count||i.usedStandees>=i.maxStandees)))("ghs-label","monster.addEntity."+i.type)("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngIf",!i.settingsManager.settings.disableStandees||!i.hasEntity()),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.hasEntity()))},dependencies:[x.mk,x.O5,ie,An],styles:[".button[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;cursor:pointer;font-size:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);text-shadow:var(--ghs-outline);font-weight:700;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));text-align:center;stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 2)}.button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:100%;height:auto}.button.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}.button.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red);filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.button[_ngcontent-%COMP%]:hover, .button.active-button[_ngcontent-%COMP%]{color:var(--ghs-color-white);filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray);filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);opacity:.5}.number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)))}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.number-container[_ngcontent-%COMP%] .number-button.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] img.summon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .summon-button.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;border-radius:100%}"]})),a})();const Yw=function(o,a){return{disabled:o,denied:a}};function hK(o,a){if(1&o&&t._UZ(0,"ghs-monster-numberpicker",8),2&o){const n=t.oxw();t.Q6J("monster",n.monster)("type",n.MonsterType.normal)("nonDead",n.nonDead)("count",n.count)("ngClass",t.WLB(5,Yw,!n.settingsManager.settings.disableStandees&&n.nonDead>=n.count,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition]))}}function uK(o,a){if(1&o&&t._UZ(0,"ghs-monster-numberpicker",9),2&o){const n=t.oxw();t.Q6J("monster",n.monster)("type",n.MonsterType.elite)("nonDead",n.nonDead)("count",n.count)("ngClass",t.WLB(5,Yw,!n.settingsManager.settings.disableStandees&&n.nonDead>=n.count,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition]))}}function _K(o,a){if(1&o&&t._UZ(0,"ghs-monster-numberpicker",10),2&o){const n=t.oxw();t.Q6J("monster",n.monster)("type",n.MonsterType.boss)("nonDead",n.nonDead)("count",n.count)("ngClass",t.WLB(5,Yw,!n.settingsManager.settings.disableStandees&&n.nonDead>=n.count,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition]))}}function pK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",20),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entitiesMenu(i,s.MonsterType.boss))}),t._UZ(1,"img",14),t.qZA()}2&o&&t.Q6J("ghs-label","game.monster.selectStandees.boss")("ghs-label-attribute","title")}function fK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",21),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entitiesMenu(i,s.MonsterType.elite))}),t._UZ(1,"img",14),t.qZA()}2&o&&t.Q6J("ghs-label","game.monster.selectStandees.elite")("ghs-label-attribute","title")}function mK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",22),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entitiesMenu(i,s.MonsterType.normal))}),t._UZ(1,"img",14),t.qZA()}2&o&&t.Q6J("ghs-label","game.monster.selectStandees.normal")("ghs-label-attribute","title")}function vK(o,a){if(1&o&&t._UZ(0,"ghs-standee",23),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("figure",e.monster)("entity",n)}}const CK=function(o,a,n){return{empty:o,"full-ability":a,denied:n}},MK=function(o){return{disabled:o}};function OK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"div",12)(2,"a",13),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.entitiesMenu(i))}),t._UZ(3,"img",14),t.qZA(),t.YNc(4,pK,2,2,"a",15),t.YNc(5,fK,2,2,"a",16),t.YNc(6,mK,2,2,"a",17),t.qZA(),t.TgZ(7,"div",18),t.YNc(8,vK,1,2,"ghs-standee",19),t.qZA()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.kEZ(8,CK,0==n.nonDead,n.settingsManager.settings.showFullAbilityCard||n.settingsManager.settings.showExpandedAbilityCard,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition])),t.xp6(1),t.Q6J("ngClass",t.VKq(12,MK,n.nonDead<2)),t.xp6(1),t.Q6J("ghs-label","game.monster.selectStandees.all")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngIf",n.entityTypeCount(n.MonsterType.boss)),t.xp6(1),t.Q6J("ngIf",n.entityTypeCount(n.MonsterType.elite)),t.xp6(1),t.Q6J("ngIf",n.entityTypeCount(n.MonsterType.normal)),t.xp6(2),t.Q6J("ngForOf",n.sortedEntites)}}const PK=function(o,a,n){return{off:o,"full-ability":a,modern:n}},yK=function(o){return{denied:o}},bK=function(o){return{"full-ability":o}};let xK=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"nonDead",0),(0,_.Z)(this,"count",0),(0,_.Z)(this,"sortedEntites",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.nonDead=d.v.monsterManager.monsterEntityCount(this.monster),this.count=(0,ae.j9)(this.monster.count,this.monster.level),this.sortedEntites=this.monster.entities.sort((e,i)=>{if(R.r.settings.eliteFirst){if(e.type==ee.M.elite&&i.type==ee.M.normal)return-1;if(e.type==ee.M.normal&&i.type==ee.M.elite)return 1}return e.summon==Ee.HY.new&&i.summon!=Ee.HY.new?1:e.summon!=Ee.HY.new&&i.summon==Ee.HY.new?-1:e.summon==Ee.HY.new&&i.summon==Ee.HY.new?0:e.number<0&&i.number>=0?1:i.number<0&&e.number>=0||e.numbere.type==ee.M.normal||e.type==ee.M.elite)}getEntities(e){return this.monster.entities.filter(i=>i.type==e).sort((i,s)=>i.number-s.number)}getEdition(){return d.v.getEdition(this.monster)}entityTypeCount(e){const i=this.monster.entities.filter(s=>s.type==e).length;return i>1&&i{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"footer",void 0),(0,_.Z)(this,"allowed",["undo","zoom"]),(0,_.Z)(this,"scrollTimeout",null),(0,_.Z)(this,"zoomInterval",null),(0,_.Z)(this,"currentZoom",0),(0,_.Z)(this,"dialogOpen",!1),(0,_.Z)(this,"keydown",void 0),(0,_.Z)(this,"keyup",void 0),(0,_.Z)(this,"timeout",void 0),this.dialog=e,this.dialog.afterOpened.subscribe({next:()=>this.dialogOpen=!0}),this.dialog.afterAllClosed.subscribe({next:()=>this.dialogOpen=!1})}applySelect(){const e=d.v.entityManager.getIndexedEntities();d.v.stateManager.keyboardSelect>0&&d.v.stateManager.keyboardSelect<=e.length&&(this.dialog.open($c,{panelClass:"dialog",data:{entity:e[d.v.stateManager.keyboardSelect-1].entity,figure:e[d.v.stateManager.keyboardSelect-1].figure,entityIndexKey:!0}}),d.v.stateManager.keyboardSelecting=!1),d.v.stateManager.keyboardSelect=-1}ngOnInit(){this.currentZoom=R.r.settings.zoom,d.v.uiChange.subscribe({next:()=>this.currentZoom=R.r.settings.zoom}),this.keydown=window.addEventListener("keydown",e=>{if(!e.altKey&&!e.metaKey&&(!window.document.activeElement||"INPUT"!=window.document.activeElement.tagName&&"SELECT"!=window.document.activeElement.tagName&&"TEXTAREA"!=window.document.activeElement.tagName))if(d.v.stateManager.keyboardSelecting){if("Escape"===e.key||"s"===e.key)d.v.stateManager.keyboardSelect=-1,d.v.stateManager.keyboardSelecting=!1;else if("Enter"===e.key)this.applySelect();else if(e.key in["0","1","2","3","4","5","6","7","8","9"]){const i=d.v.entityManager.getIndexedEntities(),s=+e.key;this.timeout?(clearTimeout(this.timeout),this.timeout=void 0,d.v.stateManager.keyboardSelect=10*d.v.stateManager.keyboardSelect+s,this.applySelect()):10*s{this.applySelect()},1e3)):(d.v.stateManager.keyboardSelect=s,this.applySelect())}e.preventDefault(),e.stopPropagation()}else if(this.dialogOpen&&-1==this.allowed.indexOf("undo")||!e.ctrlKey||e.shiftKey||"z"!==e.key.toLowerCase())if((!this.dialogOpen||-1!=this.allowed.indexOf("undo"))&&e.ctrlKey&&!e.shiftKey&&"y"===e.key||e.ctrlKey&&e.shiftKey&&"z"===e.key.toLowerCase())d.v.stateManager.redo(),e.preventDefault();else if(this.dialogOpen&&-1==this.allowed.indexOf("zoom")||e.ctrlKey||e.shiftKey||this.zoomInterval||"ArrowUp"!==e.key&&"+"!==e.key)if(this.dialogOpen&&-1==this.allowed.indexOf("zoom")||e.ctrlKey||e.shiftKey||this.zoomInterval||"ArrowDown"!==e.key&&"-"!==e.key)if(this.dialogOpen&&-1==this.allowed.indexOf("zoom")||!e.ctrlKey||e.shiftKey||this.zoomInterval||"r"!==e.key.toLowerCase())if(this.dialogOpen&&-1==this.allowed.indexOf("round")||!this.footer||e.ctrlKey||e.shiftKey||this.zoomInterval||"n"!==e.key.toLowerCase())if(this.dialogOpen&&-1==this.allowed.indexOf("am")||d.v.game.state!=ge.D2.next||e.ctrlKey||e.shiftKey||this.zoomInterval||"m"!==e.key.toLowerCase())if(!(this.dialogOpen&&-1==this.allowed.indexOf("loot")||d.v.game.state!=ge.D2.next||e.ctrlKey||e.shiftKey||this.zoomInterval||"l"!==e.key.toLowerCase())&&R.r.settings.lootDeck&&d.v.game.lootDeck.cards.length>0){d.v.stateManager.before("lootDeckDraw"),d.v.game.lootDeck.active=!0;const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.active);d.v.lootManager.drawCard(d.v.game.lootDeck,!R.r.settings.alwaysLootApplyDialog&&i instanceof oe.z?i:void 0),d.v.stateManager.after(),e.preventDefault()}else if(this.dialogOpen&&-1==this.allowed.indexOf("active")||e.ctrlKey||d.v.game.state!=ge.D2.next||"Tab"!==e.key)if(this.dialogOpen&&-1==this.allowed.indexOf("element")||e.ctrlKey||e.shiftKey||-1==["1","2","3","4","5","6"].indexOf(e.key))this.dialogOpen&&-1==this.allowed.indexOf("absent")||e.ctrlKey||e.shiftKey||"h"!==e.key?this.dialogOpen&&-1==this.allowed.indexOf("select")||e.ctrlKey||e.shiftKey||"s"!==e.key||(d.v.stateManager.keyboardSelecting=!0):(R.r.setHideAbsent(!R.r.settings.hideAbsent),e.preventDefault());else{const s=d.v.game.elementBoard[+e.key-1],l=d.v.nextElementState(s,!1,!0);d.v.stateManager.before("updateElement","game.element."+s.type,"game.element.state."+l),s.state=l,d.v.stateManager.after(),e.preventDefault()}else this.toggleEntity(e.shiftKey),e.preventDefault();else{const i=d.v.game.figures.find(l=>l.active);let s;!i||i instanceof Ze.Q&&(!i.isAlly&&!i.isAllied||!d.v.fhRules()&&!R.r.settings.alwaysAllyAttackModifierDeck||!R.r.settings.allyAttackModifierDeck)?(d.v.stateManager.before("updateAttackModifierDeck.draw","monster"),s=d.v.game.monsterAttackModifierDeck):i instanceof Ze.Q?(d.v.stateManager.before("updateAttackModifierDeck.draw","ally"),s=d.v.game.allyAttackModifierDeck):i instanceof oe.z&&(R.r.settings.characterAttackModifierDeck?i.attackModifierDeckVisible?(d.v.stateManager.before("updateAttackModifierDeck.draw","data.character."+i.name),s=i.attackModifierDeck):i.attackModifierDeckVisible=!0:(d.v.stateManager.before("updateAttackModifierDeck.draw","monster"),s=d.v.game.monsterAttackModifierDeck)),s&&(s.active=!0,d.v.attackModifierManager.drawModifier(s),d.v.stateManager.after()),e.preventDefault()}else this.footer.disabled()||this.footer.next();else this.currentZoom=100,R.r.setZoom(this.currentZoom),document.body.style.setProperty("--ghs-factor",this.currentZoom+""),e.preventDefault();else this.zoom(1),this.zoomInterval=setInterval(()=>{this.zoom(1)},30),e.preventDefault();else this.zoom(-1),this.zoomInterval=setInterval(()=>{this.zoom(-1)},30),e.preventDefault();else d.v.stateManager.undo(),e.preventDefault()}),this.keyup=window.addEventListener("keyup",e=>{this.zoomInterval&&("ArrowUp"===e.key||"+"===e.key||"ArrowDown"===e.key||"-"===e.key)&&(clearInterval(this.zoomInterval),this.zoomInterval=null,R.r.settings.zoom!=this.currentZoom&&R.r.setZoom(this.currentZoom),e.preventDefault())})}ngOnDestroy(){window.removeEventListener("keydown",this.keydown),window.removeEventListener("keyup",this.keyup)}zoom(e){this.currentZoom+=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+"");const i=+window.getComputedStyle(document.body).getPropertyValue("min-width").replace("px","");e<0&&i>=window.innerWidth&&(this.currentZoom-=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+""))}toggleEntity(e){const i=d.v.game.figures.filter(l=>d.v.gameplayFigure(l));let s=i.find(l=>l.active);if(!s&&e)s=i[i.length-1];else if(s&&e&&i.indexOf(s)>0)if(s instanceof oe.z){const l=s.summons.filter(O=>d.v.entityManager.isAlive(O)&&O.state!=Ee.HY.new);let m=l.find(O=>O.active);(!m||m&&0==l.indexOf(m))&&(s.summons.forEach(O=>O.active=!1),s=i[i.indexOf(s)-1])}else s=i[i.indexOf(s)-1];if(s)if(s instanceof oe.z){const l=s.summons.find(m=>m.active);R.r.settings.activeSummons&&s.active&&l?d.v.stateManager.before("summonInactive","data.character."+s.name,"data.summon."+l.name):d.v.stateManager.before(s.active?"unsetActive":"setActive","data.character."+s.name),d.v.roundManager.toggleFigure(s),d.v.stateManager.after()}else if(s instanceof Ze.Q){let l=!0;const m=s.entities.filter(O=>d.v.entityManager.isAlive(O)&&O.summon!=Ee.HY.new);if(R.r.settings.activeStandees){let O=m.find(k=>k.active);!O&&m.length>0&&e&&s.active?(O=m[m.length-1],d.v.stateManager.before(O?"unsetEntityActive":"setEntityActive","data.monster."+s.name,"monster."+O.type,""+O.number),d.v.monsterManager.toggleActive(s,O),O.active=!0,l=!1,d.v.stateManager.after()):O&&!e&&(d.v.stateManager.before(O?"unsetEntityActive":"setEntityActive","data.monster."+s.name,"monster."+O.type,""+O.number),d.v.monsterManager.toggleActive(s,O),m.indexOf(O){d.v.entityManager.isAlive(O)&&(O.active=!0,O.off=!1)}),d.v.roundManager.toggleFigure(s),d.v.stateManager.after())}else(s instanceof qe.CH||s instanceof Nn.k)&&(d.v.stateManager.before(s.active?"unsetActive":"setActive",s.title||s.name),d.v.roundManager.toggleFigure(s),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","ghs-keyboard-shortcuts",""]],inputs:{footer:"footer",allowed:"allowed"}})),a})();const wK=["footer"],jT=function(o){return[o]};function kK(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","server.connectionTries")("ghs-label-args",t.VKq(2,jT,""+n.gameManager.stateManager.connectionTries))}}function TK(o,a){1&o&&(t.TgZ(0,"span",19),t._UZ(1,"span",10),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connectionTries.hint"))}function ZK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",9),t._UZ(1,"span",10),t.TgZ(2,"div",11)(3,"a",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.forceUpdateState())}),t._UZ(4,"span",10),t.TgZ(5,"span",13),t._UZ(6,"span",10),t.qZA()(),t.TgZ(7,"a",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.connect())}),t._UZ(8,"span",10),t.YNc(9,kK,2,4,"span",15),t.YNc(10,TK,2,1,"span",16),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","server.blocked"),t.xp6(3),t.Q6J("ghs-label","server.force"),t.xp6(2),t.Q6J("ghs-label","server.forceHint"),t.xp6(2),t.Q6J("ghs-label","server.connect"),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.connectionTries>0),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.connectionTries>4)}}function AK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",26),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.gameManager.stateManager.install())}),t._UZ(1,"img",27)(2,"span",10),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","app.install"))}function SK(o,a){if(1&o&&t._UZ(0,"img",34),2&o){const n=t.oxw().$implicit;t.Q6J("src",n.logoUrl,t.LSH)("ghs-label","data.edition."+n.edition)("ghs-label-attribute","title")}}function EK(o,a){if(1&o&&(t.TgZ(0,"span",35),t._UZ(1,"span",10),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition)}}function DK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",31),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.startCampaign(s.edition))}),t.YNc(1,SK,1,3,"img",32),t.YNc(2,EK,2,1,"span",33),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.logoUrl),t.xp6(1),t.Q6J("ngIf",!n.logoUrl)}}function IK(o,a){if(1&o&&(t.TgZ(0,"div",28)(1,"p"),t._UZ(2,"span",10),t.qZA(),t.TgZ(3,"div",29),t.YNc(4,DK,3,2,"div",30),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","welcome.chooseEdition"),t.xp6(2),t.Q6J("ngForOf",n.gameManager.editionsData())}}function NK(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",10),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","welcome.orChooseCharacters"))}function JK(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",10),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","welcome.chooseCharacters"))}function UK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",39),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.loading=!1)}),t._UZ(1,"span",10),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","app.loading.cancel"))}function LK(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span"),t._UZ(2,"span",10),t.qZA(),t.TgZ(3,"div",36),t._UZ(4,"div",37),t.qZA(),t.YNc(5,UK,2,1,"a",38),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","app.loading"),t.xp6(3),t.Q6J("ngIf",n.cancelLoading)}}const QK=function(o,a){return{fh:o,modern:a}};function RK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",20),t._UZ(1,"img",21),t.YNc(2,AK,3,1,"a",22),t.TgZ(3,"h2"),t._UZ(4,"span",10),t.qZA(),t.YNc(5,IK,5,2,"div",23),t.YNc(6,NK,2,1,"p",24),t.YNc(7,JK,2,1,"p",24),t.TgZ(8,"div",25),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(),l=t.MAs(1);return t.KtG(l.openMenu(i,s.SubMenu.character_add))}),t._UZ(9,"span",10),t.qZA(),t.YNc(10,LK,6,2,"ng-container",24),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(8,QK,"fh"==n.settingsManager.settings.theme,"modern"==n.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ngIf",n.gameManager.stateManager.installPrompt),t.xp6(2),t.Q6J("ghs-label","welcome"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.edition),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.edition),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.edition),t.xp6(2),t.Q6J("ghs-label","hints.addCharacters"),t.xp6(1),t.Q6J("ngIf",n.loading)}}const FK=function(o,a,n,e,i,s,l){return{character:o,monster:a,objective:n,"objective-container":e,"monster-full":i,"permanent-am":s,compact:l}};function qK(o,a){if(1&o&&t._UZ(0,"div",49),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("ngClass",t.Hh0(2,FK,e.gameManager.isCharacter(n),e.gameManager.isMonster(n),e.gameManager.isObjective(n),e.gameManager.isObjectiveContainer(n),e.settingsManager.settings.showFullAbilityCard,e.gameManager.isCharacter(n)&&e.gameManager.toCharacter(n).attackModifierDeckVisible&&e.settingsManager.settings.characterAttackModifierDeckPermanent,e.gameManager.isCharacter(n)&&e.settingsManager.settings.characterCompact))("clickBehind",!0)}}function HK(o,a){if(1&o&&t._UZ(0,"ghs-character",50),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("character",e.gameManager.toCharacter(n))}}function jK(o,a){if(1&o&&t._UZ(0,"ghs-monster",51),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("monster",e.gameManager.toMonster(n))}}function BK(o,a){if(1&o&&t._UZ(0,"ghs-objective",52),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("objective",e.gameManager.toObjective(n))}}function zK(o,a){if(1&o&&t._UZ(0,"ghs-objective-container",52),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("objective",e.gameManager.toObjectiveContainer(n))}}const GK=function(o,a,n,e,i,s){return{character:o,monster:a,objective:n,"monster-full":e,"permanent-am":i,compact:s}};function VK(o,a){if(1&o&&t._UZ(0,"div",53),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("ngClass",t.HTZ(2,GK,e.gameManager.isCharacter(n),e.gameManager.isMonster(n),e.gameManager.isObjective(n),e.settingsManager.settings.showFullAbilityCard,e.gameManager.isCharacter(n)&&e.gameManager.toCharacter(n).attackModifierDeckVisible&&e.settingsManager.settings.characterAttackModifierDeckPermanent,e.gameManager.isCharacter(n)&&e.settingsManager.settings.characterCompact))("clickBehind",!0)}}const YK=function(o,a,n,e){return{column:o,"column-left":a,"column-right":n,last:e}},KK=function(o){return{enabled:o}};function $K(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",42),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.drop(i))})("cdkDropListEntered",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entered(i))})("cdkDropListExited",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.exited(i))}),t.TgZ(1,"div",43,44),t.NdJ("cdkDragStarted",function(i){t.CHM(n);const s=t.MAs(2),l=t.oxw(2);return t.KtG(l.startedDrag(i,s))})("cdkDragReleased",function(i){t.CHM(n);const s=t.MAs(2),l=t.oxw(2);return t.KtG(l.releasedDrag(i,s))}),t.YNc(3,qK,1,10,"div",45),t.YNc(4,HK,1,1,"ghs-character",7),t.YNc(5,jK,1,1,"ghs-monster",46),t.YNc(6,BK,1,1,"ghs-objective",47),t.YNc(7,zK,1,1,"ghs-objective-container",47),t.YNc(8,VK,1,9,"div",48),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("figure-autoscroll",n)("block",e==i.lastScroll||e==i.lastScrollColumn?"end":"center")("cdkDropListData",e)("cdkDropListDisabled",i.settingsManager.settings.disableDragFigures||i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters&&!i.gameManager.stateManager.permissions.monsters)("ngClass",t.l5B(13,YK,i.columns>1,i.columns>1&&e1&&e>=i.columnSize,e==i.columnSize-1||e==i.figures.length-1)),t.xp6(1),t.Q6J("cdkDragStartDelay",i.isTouch?450:0)("ngClass",t.VKq(18,KK,i.draggingEnabled)),t.xp6(2),t.Q6J("ngIf",!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters||i.gameManager.stateManager.permissions.monsters),t.xp6(1),t.Q6J("ngIf",i.gameManager.isCharacter(n)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isMonster(n)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjective(n)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjectiveContainer(n)),t.xp6(1),t.Q6J("ngIf",!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters||i.gameManager.stateManager.permissions.monsters)}}const WK=function(o,a,n,e){return{"loot-deck":o,"ally-deck":a,"drag-disabled":n,"backup-hint-spacer":e}};function XK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",40),t.NdJ("scroll",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.onFigureScroll(i))}),t.YNc(1,$K,9,20,"div",41),t.qZA()}if(2&o){const n=t.oxw(),e=t.MAs(10);t.Q6J("ngClass",t.l5B(2,WK,e.lootDeck||n.settingsManager.settings.alwaysLootDeck&&n.gameManager.game.lootDeck.active,e.hasAllyAttackModifierDeck,n.settingsManager.settings.disableDragFigures,n.showBackupHint)),t.xp6(1),t.Q6J("ngForOf",n.figures)}}function t$(o,a){if(1&o&&t._UZ(0,"p",18),2&o){const n=t.oxw(2);t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.error.status")("ghs-label-args",t.VKq(2,jT,""+n.gameManager.stateManager.backupError))}}function e$(o,a){1&o&&t._UZ(0,"p",10),2&o&&t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.error.unknown")}function n$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.backupError=0)}),t._UZ(1,"h2",10),t.YNc(2,t$,1,4,"p",55),t.YNc(3,e$,1,1,"p",56),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.error"),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.backupError>0),t.xp6(1),t.Q6J("ngIf",-1==n.gameManager.stateManager.backupError)}}function i$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t._UZ(1,"h2",10)(2,"p",58),t.TgZ(3,"a",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.exportDataDump())}),t._UZ(4,"img",60)(5,"span",10),t.qZA(),t.TgZ(6,"label")(7,"input",61),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAutoBackupFinish(!i.settingsManager.settings.autoBackupFinish))}),t.qZA(),t._UZ(8,"span",10),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","datamanagement.backup"),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.download.hint")("ghs-tooltip","datamanagement.backup.download.hint.text")("originY","top")("overlayY","bottom"),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.download"),t.xp6(2),t.Q6J("checked",n.settingsManager.settings.autoBackupFinish),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.download.onFinish")}}function o$(o,a){if(1&o&&t._UZ(0,"ghs-character-fullview",50),2&o){const n=t.oxw();t.Q6J("character",n.fullviewChar)}}const a$=function(o,a){return{compact:o,modern:a}};let s$=(()=>{var o;class a{constructor(e,i,s,l){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"swUpdate",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"pointerInputService",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"figures",[]),(0,_.Z)(this,"columnSize",3),(0,_.Z)(this,"columns",2),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"initialized",!1),(0,_.Z)(this,"loading",!0),(0,_.Z)(this,"cancelLoading",!1),(0,_.Z)(this,"welcome",!1),(0,_.Z)(this,"fullviewChar",void 0),(0,_.Z)(this,"showBackupHint",!1),(0,_.Z)(this,"draggingEnabled",!1),(0,_.Z)(this,"draggingeTimeout",null),(0,_.Z)(this,"isTouch",!1),(0,_.Z)(this,"lastScroll",-1),(0,_.Z)(this,"lastScrollColumn",-1),(0,_.Z)(this,"currentZoom",0),(0,_.Z)(this,"zoomDiff",-1),(0,_.Z)(this,"standeeDialog",void 0),(0,_.Z)(this,"standeeDialogSubscription",void 0),(0,_.Z)(this,"footer",void 0),this.element=e,this.swUpdate=i,this.dialog=s,this.pointerInputService=l,d.v.uiChange.subscribe({next:()=>{if(this.figures=d.v.game.figures.filter(m=>(R.r.settings.monsters||!(m instanceof Ze.Q))&&(!(m instanceof oe.z)||!m.absent||!R.r.settings.hideAbsent)),this.initialized){const m=d.v.game.figures.find(O=>O instanceof oe.z&&O.fullview);m?(this.fullviewChar=m,this.welcome=!1):0==d.v.game.figures.length?this.welcome=!0:(this.fullviewChar=void 0,this.welcome=!1,this.calcColumns(),R.r.settings.automaticStandeesDialog&&R.r.settings.automaticStandees&&!R.r.settings.disableStandees&&!R.r.settings.randomStandees&&R.r.settings.scenarioRooms&&(this.standeeDialog&&"undo"==d.v.stateManager.lastAction&&this.standeeDialog.close(),0==this.dialog.openDialogs.length?this.automaticStandeeDialogs():this.standeeDialogSubscription||(this.standeeDialogSubscription=this.dialog.afterAllClosed.subscribe({next:()=>{this.automaticStandeeDialogs()}}))),this.showBackupHint=R.r.settings.backupHint&&!this.loading&&!d.v.game.scenario&&(d.v.game.party.scenarios.length>0||d.v.game.party.casualScenarios.length>0||d.v.game.parties.some(O=>O.casualScenarios.length>0)))}}}),this.swUpdate.versionUpdates.subscribe(m=>{this.loading=!1,"VERSION_READY"==m.type?d.v.stateManager.hasUpdate=!0:"VERSION_INSTALLATION_FAILED"==m.type&&console.error(`Failed to install version '${m.version.hash}': ${m.error}`)}),this.swUpdate.unrecoverable.subscribe(m=>{this.loading=!1}),this.swUpdate.isEnabled?(this.swUpdate.checkForUpdate(),setInterval(()=>{this.swUpdate.checkForUpdate()},3e4)):this.loading=!1,setInterval(()=>{this.cancelLoading=!0},1e4),window.addEventListener("beforeinstallprompt",m=>{m.preventDefault(),d.v.stateManager.installPrompt=m}),window.addEventListener("appinstalled",()=>{d.v.stateManager.installPrompt=null}),s.afterOpened.subscribe({next:m=>{m.overlayRef.backdropElement&&s.openDialogs.length>1&&(m.overlayRef.backdropElement.style.opacity="0");let O=document.createElement("img");O.src="./assets/images/close_dialog.svg";let k=document.createElement("a");k.classList.add("dialog-close-button"),k.appendChild(O),k.addEventListener("click",()=>m.close()),k.title=R.r.getLabel("close"),m.overlayRef.hostElement.appendChild(k)}})}onFigureScroll(e){this.pointerInputService.cancel()}ngOnInit(){var e=this;return(0,J.Z)(function*(){e.isTouch=window.matchMedia("(pointer: coarse)").matches,document.body.classList.add("no-select");try{yield Pt.j.init()}catch{}yield R.r.init(!1),e.initialized=!0,yield d.v.stateManager.init(),e.currentZoom=R.r.settings.zoom,document.body.style.setProperty("--ghs-factor",R.r.settings.zoom+""),document.body.style.setProperty("--ghs-barsize",R.r.settings.barsize+""),document.body.style.setProperty("--ghs-fontsize",R.r.settings.fontsize+""),document.body.style.setProperty("--ghs-global-fontsize",R.r.settings.globalFontsize+"");const i=e.figures.find(s=>s instanceof oe.z&&s.fullview);i?e.fullviewChar=i:(e.fullviewChar=void 0,e.calcColumns()),e.swUpdate.isEnabled&&document.body.addEventListener("click",s=>{R.r.settings.fullscreen&&e.swUpdate.isEnabled&&document.body.requestFullscreen()}),window.addEventListener("resize",s=>{e.fullviewChar||e.calcColumns()}),window.addEventListener("fullscreenchange",s=>{e.fullviewChar||e.calcColumns()}),window.addEventListener("focus",s=>{R.r.settings.serverAutoconnect&&d.v.stateManager.wsState()!=WebSocket.OPEN&&d.v.stateManager.connect()}),!R.r.settings.disableWakeLock&&"wakeLock"in navigator&&(d.v.stateManager.wakeLock=yield navigator.wakeLock.request("screen"),document.addEventListener("visibilitychange",(0,J.Z)(function*(){null!==d.v.stateManager.wakeLock&&"visible"===document.visibilityState&&(d.v.stateManager.wakeLock=yield navigator.wakeLock.request("screen"))})))})()}zoom(e){this.currentZoom+=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+"")}touchmove(e){if(!R.r.settings.disablePinchZoom&&2===e.touches.length){const i=Math.abs(e.touches[0].clientX-e.touches[1].clientX);this.zoomDiff>0&&(i>this.zoomDiff&&this.zoom(-1),i-1&&(this.zoomDiff=-1,R.r.setZoom(this.currentZoom))}startCampaign(e){d.v.stateManager.before("startCampaign","data.edition."+e),d.v.game.edition=e,R.r.settings.automaticTheme&&R.r.setFhStyle("fh"==e),d.v.game.party.campaignMode=!0,d.v.stateManager.after()}calcColumns(e=void 0,i=!1){R.r.settings.disableColumns?(this.columns=1,this.columnSize=99,setTimeout(()=>{this.element.nativeElement.getElementsByClassName("figures")[0]&&this.translate(e,i)},1)):setTimeout(()=>{const s=this.element.nativeElement.getElementsByClassName("figures")[0];if(s){const l=Array.from(s.getElementsByClassName("figure")),m=this.figures;let O=s.clientWidth;if(l.length>0&&(O=l[0].firstChild.clientWidth),Os.clientHeight&&(W--,k-=l[W].clientHeight),Wct&&W--;let Ct=this.activeFigureSize(0,W,l),Ot=this.activeFigureSize(W,m.length,l),xt=this.activeFigureSize(0,W-1,l),Gt=this.activeFigureSize(W-1,m.length,l),se=this.activeFigureSize(0,W+1,l),De=this.activeFigureSize(W+1,m.length,l),un=Ct>Ot?Ct-Ot:Ot-Ct,vn=xt>Gt?xt-Gt:Gt-xt,Rn=se>De?se-De:De-se;for(;un>vn;)W--,Ct=this.activeFigureSize(0,W,l),Ot=this.activeFigureSize(W,m.length,l),xt=this.activeFigureSize(0,W-1,l),Gt=this.activeFigureSize(W-1,m.length,l),se=this.activeFigureSize(0,W+1,l),De=this.activeFigureSize(W+1,m.length,l),un=Ct>Ot?Ct-Ot:Ot-Ct,vn=xt>Gt?xt-Gt:Gt-xt,Rn=se>De?se-De:De-se;for(;un>Rn;)W++,Ct=this.activeFigureSize(0,W,l),Ot=this.activeFigureSize(W,m.length,l),xt=this.activeFigureSize(0,W-1,l),Gt=this.activeFigureSize(W-1,m.length,l),se=this.activeFigureSize(0,W+1,l),De=this.activeFigureSize(W+1,m.length,l),un=Ct>Ot?Ct-Ot:Ot-Ct,vn=xt>Gt?xt-Gt:Gt-xt,Rn=se>De?se-De:De-se;this.columnSize=W}else this.columns=1,this.columnSize=99}else this.columns=1,this.columnSize=99;this.lastScroll=this.lastActive(),this.lastScrollColumn=this.columns>1?this.columnSize-1:-1,this.translate(e,i)}},1)}figureSize(e,i,s){return s.slice(e,i).map(l=>l.firstChild.clientHeight).reduce((l,m)=>l+m,0)}activeFigureSize(e,i,s){let l=this.lastActive(e,i);return s.slice(e,i).filter((m,O)=>O<=l).map(m=>m.firstChild.clientHeight).reduce((m,O)=>m+O,0)}lastActive(e=void 0,i=void 0){let s=-1;return this.figures.slice(e,i).forEach((l,m)=>{m>s&&d.v.gameplayFigure(l)&&(s=m)}),s}translate(e=void 0,i=!1){setTimeout(()=>{const s=this.element.nativeElement.getElementsByClassName("figures")[0];if(s){i&&s.classList.add("no-animations");const l=s.getElementsByClassName("figure");for(let m=0;m1&&(m{e.scrollIntoView({behavior:R.r.settings.disableAnimations?"auto":"smooth",block:m==this.lastScroll||m==this.lastScrollColumn?"end":"center",inline:"center"}),i&&s.classList.remove("no-animations")},R.r.settings.disableAnimations||i?0:250):i&&setTimeout(()=>{s.classList.remove("no-animations")},R.r.settings.disableAnimations?0:250)}}},1)}startedDrag(e,i){this.pointerInputService.cancel(),this.draggingEnabled=!0,i.classList.add("dragging"),e.source.getPlaceholderElement().classList.add("dragging"),window.document.body.classList.add("dragging"),this.draggingeTimeout&&clearTimeout(this.draggingeTimeout)}releasedDrag(e,i){this.draggingEnabled=!1,i.classList.remove("dragging"),window.document.body.classList.remove("dragging"),e.source.getPlaceholderElement().classList.remove("dragging"),this.draggingeTimeout&&clearTimeout(this.draggingeTimeout)}drop(e){if(e.previousContainer!=e.container&&(0==e.currentIndex&&e.container.data!=e.previousContainer.data+1||0!=e.currentIndex&&e.container.data!=e.previousContainer.data-e.currentIndex)){let i=e.previousContainer.data,s=e.container.data;e.currentIndex>0&&e.previousContainer.data>e.container.data?s++:0==e.currentIndex&&e.previousContainer.datai instanceof Ze.Q&&i.entities.find(s=>s.number<1&&d.v.entityManager.isAlive(s)));if(e){const i=e;let s=i.entities.find(l=>l.number<1&&d.v.entityManager.isAlive(l)&&(R.r.settings.eliteFirst&&l.type==ee.M.elite||!R.r.settings.eliteFirst&&l.type==ee.M.normal));s||(s=i.entities.find(l=>l.number<1&&d.v.entityManager.isAlive(l))),this.standeeDialog=this.dialog.open(Gd,{panelClass:"dialog",disableClose:!0,data:{monster:i,type:s&&s.type,entity:s,range:[],entities:i.entities,automatic:!0}}),this.standeeDialog.closed.subscribe({next:l=>{l&&(d.v.stateManager.standeeDialogCanceled=!0),this.standeeDialog=void 0,this.standeeDialogSubscription&&(this.standeeDialogSubscription.unsubscribe(),this.standeeDialogSubscription=void 0),d.v.uiChange.emit()}})}}}exportDataDump(){return(0,J.Z)(function*(){try{let e=yield Pt.j.datadump(),i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-data-dump.json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}catch{console.warn("Could not read datadump")}})()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Gg),t.Y36(Te),t.Y36(iO))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-main"]],viewQuery:function(e,i){if(1&e&&t.Gf(wK,5),2&e){let s;t.iGM(s=t.CRH())&&(i.footer=s.first)}},decls:11,vars:11,consts:[["header",""],["ghs-keyboard-shortcuts","",3,"ngClass","footer"],["class","dialog blocked",4,"ngIf"],["class","welcome",3,"ngClass",4,"ngIf"],["class","figures","cdkDropListGroup","",3,"ngClass","scroll",4,"ngIf"],["class","dialog backup-error",3,"click",4,"ngIf"],["class","dialog backup-hint",4,"ngIf"],[3,"character",4,"ngIf"],["footer",""],[1,"dialog","blocked"],[3,"ghs-label"],[1,"buttons"],[1,"force",3,"click"],[1,"force-hint"],[1,"connect",3,"click"],["class","tries",4,"ngIf"],["class","tries-hint",4,"ngIf"],[1,"tries"],[3,"ghs-label","ghs-label-args"],[1,"tries-hint"],[1,"welcome",3,"ngClass"],["src","./assets/images/logo-transparent.svg",1,"ghs-logo"],["class","install",3,"click",4,"ngIf"],["class","choose-edition",4,"ngIf"],[4,"ngIf"],[1,"add-characters",3,"click"],[1,"install",3,"click"],["src","./assets/images/install.svg",1,"ghs-svg"],[1,"choose-edition"],[1,"editions"],["class","edition",3,"click",4,"ngFor","ngForOf"],[1,"edition",3,"click"],[3,"src","ghs-label","ghs-label-attribute",4,"ngIf"],["class","text",4,"ngIf"],[3,"src","ghs-label","ghs-label-attribute"],[1,"text"],[1,"loading-bar-container"],[1,"loading-bar"],["class","loading-cancel",3,"click",4,"ngIf"],[1,"loading-cancel",3,"click"],["cdkDropListGroup","",1,"figures",3,"ngClass","scroll"],["class","figure","cdkDropList","","cdkDropListAutoScrollStep","20",3,"figure-autoscroll","block","cdkDropListData","cdkDropListDisabled","ngClass","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"ngFor","ngForOf"],["cdkDropList","","cdkDropListAutoScrollStep","20",1,"figure",3,"figure-autoscroll","block","cdkDropListData","cdkDropListDisabled","ngClass","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["cdkDrag","",3,"cdkDragStartDelay","ngClass","cdkDragStarted","cdkDragReleased"],["figureDrag",""],["cdkDragHandle","","class","handle","ghs-pointer-input","",3,"ngClass","clickBehind",4,"ngIf"],[3,"monster",4,"ngIf"],[3,"objective",4,"ngIf"],["cdkDragHandle","","class","handle right","ghs-pointer-input","",3,"ngClass","clickBehind",4,"ngIf"],["cdkDragHandle","","ghs-pointer-input","",1,"handle",3,"ngClass","clickBehind"],[3,"character"],[3,"monster"],[3,"objective"],["cdkDragHandle","","ghs-pointer-input","",1,"handle","right",3,"ngClass","clickBehind"],[1,"dialog","backup-error",3,"click"],[3,"ghs-label","ghs-label-args",4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"dialog","backup-hint"],[3,"ghs-label","ghs-tooltip","originY","overlayY"],[3,"click"],["src","./assets/images/export.svg",1,"ghs-svg"],["type","checkbox",3,"checked","change"]],template:function(e,i){if(1&e&&(t._UZ(0,"ghs-header",null,0),t.TgZ(2,"main",1),t.YNc(3,ZK,11,6,"div",2),t.YNc(4,RK,11,11,"div",3),t.YNc(5,XK,2,7,"div",4),t.YNc(6,n$,4,3,"div",5),t.YNc(7,i$,9,8,"div",6),t.YNc(8,o$,1,1,"ghs-character-fullview",7),t.qZA(),t._UZ(9,"ghs-footer",null,8)),2&e){const s=t.MAs(10);t.xp6(2),t.Q6J("ngClass",t.WLB(8,a$,s.compact,"modern"==i.settingsManager.settings.theme))("footer",s),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.updateBlocked&&i.settingsManager.settings.serverUrl&&i.settingsManager.settings.serverPort&&i.settingsManager.settings.serverPassword),t.xp6(1),t.Q6J("ngIf",!i.fullviewChar&&i.welcome),t.xp6(1),t.Q6J("ngIf",!i.fullviewChar&&!i.welcome),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.backupError),t.xp6(1),t.Q6J("ngIf",i.showBackupHint),t.xp6(1),t.Q6J("ngIf",i.fullviewChar)}},dependencies:[x.mk,x.sg,x.O5,Bs,H_,Ms,Zr,Yr,gj,UT,uV,IV,AY,xK,ie,An,Ge,Ba,Kw],styles:['[_nghost-%COMP%]{overflow:hidden}ghs-header[_ngcontent-%COMP%], ghs-footer[_ngcontent-%COMP%]{position:fixed;left:0;right:0;z-index:2;flex-shrink:0}ghs-header[_ngcontent-%COMP%]{top:0;height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor) * var(--ghs-barsize))}ghs-footer[_ngcontent-%COMP%]{bottom:0;height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize))}main[_ngcontent-%COMP%]{position:fixed;left:0;right:0;top:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;flex-direction:column;align-items:center;z-index:1}.loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;overflow:auto;color:var(--ghs-color-darkgray);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;max-width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));border-radius:5px}.loading[_ngcontent-%COMP%] .ghs-logo[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));filter:var(--ghs-filter-outline)}.blocked[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));text-align:center;color:var(--ghs-color-white)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:flex-start}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .connect[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--ghs-color-green)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .connect[_ngcontent-%COMP%] .tries[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .connect[_ngcontent-%COMP%] .tries-hint[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow-light)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .force[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--ghs-color-yellow)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .force[_ngcontent-%COMP%] .force-hint[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow-light)}.welcome[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;width:100%;height:100%;overflow:auto}.welcome[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;max-width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));border-radius:5px}.welcome[_ngcontent-%COMP%] .ghs-logo[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));filter:var(--ghs-filter-outline)}.welcome[_ngcontent-%COMP%] .loading-bar-container[_ngcontent-%COMP%]{height:2px;width:100%;max-width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));overflow:hidden;position:relative;background-color:var(--ghs-color-gray);border-radius:2px}.welcome[_ngcontent-%COMP%] .loading-bar-container[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]{height:100%;width:50%;background-color:var(--ghs-color-darkgray);position:absolute;left:-50%;animation:_ngcontent-%COMP%_loading 2s ease-in .5s infinite;border-radius:2px}@keyframes _ngcontent-%COMP%_loading{0%{transform:translate(0)}to{transform:translate(400%)}}.welcome[_ngcontent-%COMP%] .loading-cancel[_ngcontent-%COMP%]{cursor:pointer;margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));color:var(--ghs-color-darkgray);font-family:var(--ghs-font-text)}.welcome[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));text-align:center}.welcome[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);font-family:var(--ghs-font-text);margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));text-align:center}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;align-items:center}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{cursor:pointer;margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]:hover{filter:brightness(.8) grayscale(.4)}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]:hover .text[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.welcome[_ngcontent-%COMP%] .add-characters[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.welcome[_ngcontent-%COMP%] .add-characters[_ngcontent-%COMP%]:hover{opacity:.6}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:2}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:.9em;height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray)}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)}.welcome.fh[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .welcome.fh[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .welcome.fh[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]{color:var(--ghs-color-black)}.welcome.fh[_ngcontent-%COMP%] .install[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-black)}.welcome.fh[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .welcome.fh[_ngcontent-%COMP%] .add-characters[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);filter:none}.columns[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.columns[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.figures[_ngcontent-%COMP%]{display:flex;height:100%;max-height:100%;width:100%;max-width:100%;overflow:auto;transform:translateZ(0);scroll-behavior:smooth;transform-style:preserve-3d;scrollbar-width:none;-ms-overflow-style:none}.figures[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%]{position:absolute;width:100%;top:0;left:50%;transition:transform .25s ease-in-out,width .1s ease-in-out,height .25s ease-in-out;transform:scale(0);overflow:unset}.figures[_ngcontent-%COMP%] .figure.column[_ngcontent-%COMP%]{width:calc(50% - var(--ghs-unit) * 2)}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 98);margin:calc(var(--ghs-unit) * .8) auto}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(2){position:relative;display:block}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag.enabled[_ngcontent-%COMP%]{cursor:grabbing}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag.dragging[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * -1);left:calc(var(--ghs-unit) * -1);bottom:calc(var(--ghs-unit) * -1);right:calc(var(--ghs-unit) * -1);border-radius:calc(var(--ghs-unit) * 1);background-color:var(--ghs-color-darkgray);opacity:.5}.figures[_ngcontent-%COMP%] .figure.column-left[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{margin-left:auto;margin-right:calc(var(--ghs-unit) * 2)}.figures[_ngcontent-%COMP%] .figure.column-right[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{margin-right:auto;margin-left:calc(var(--ghs-unit) * 2)}.figures.ally-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 13.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.figures.loot-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 24.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.figures.backup-hint-spacer[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:50%!important}.figures.drag-disabled[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{display:none}.compact[_ngcontent-%COMP%] .figures[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 13.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.compact[_ngcontent-%COMP%] .figures.ally-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%], .compact[_ngcontent-%COMP%] .figures.loot-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 26.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;top:0;left:calc(var(--ghs-unit) * (-2 + var(--ghs-text-factor)));width:calc(var(--ghs-unit) * 8);height:100%;z-index:2}.handle[_ngcontent-%COMP%]:hover:before{display:block;content:" ";position:absolute;left:calc(var(--ghs-unit) * -.5);width:calc(var(--ghs-unit) * 1);height:100%;background-color:var(--ghs-color-darkgray);opacity:.5;border-radius:calc(var(--ghs-unit) * 1)}.handle.enabled[_ngcontent-%COMP%]{cursor:grabbing}.handle.character[_ngcontent-%COMP%], .handle.objective[_ngcontent-%COMP%], .handle.objective-container[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 14)}.handle.character.character.permanent-am[_ngcontent-%COMP%], .handle.objective.character.permanent-am[_ngcontent-%COMP%], .handle.objective-container.character.permanent-am[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 26)}.handle.character.character.compact[_ngcontent-%COMP%], .handle.objective.character.compact[_ngcontent-%COMP%], .handle.objective-container.character.compact[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10.25)}.handle.character.character.compact.character.permanent-am[_ngcontent-%COMP%], .handle.objective.character.compact.character.permanent-am[_ngcontent-%COMP%], .handle.objective-container.character.compact.character.permanent-am[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 22.25)}.handle.monster[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 21.5)}.handle.monster.monster-full[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 24)}.handle.right[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * (-2 + var(--ghs-text-factor)));left:auto}.handle.right[_ngcontent-%COMP%]:hover:before{right:calc(var(--ghs-unit) * -.5);left:auto}.modern[_ngcontent-%COMP%] .handle.character[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 16)}.modern[_ngcontent-%COMP%] .handle.character.character.permanent-am[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 28)}.cdk-drag-preview[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * 1)}.cdk-drag-preview[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.8;transform:initial;margin-bottom:calc(var(--ghs-unit) * .5)}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%], .cdk-drop-list-receiving[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{display:none}.cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.backup-error[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}.backup-error[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);font-size:2em;padding:0;margin:calc(var(--ghs-unit) * .5) 0}.backup-error[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:1.5em}.backup-hint[_ngcontent-%COMP%]{position:absolute;bottom:0;display:flex;flex-direction:column;align-items:center;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-white)}.backup-hint[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2em;padding:0;margin:calc(var(--ghs-unit) * .5) 0}.backup-hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1em;padding:0;margin:calc(var(--ghs-unit) * .5) 0}.backup-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:1.5em;color:var(--ghs-color-gray);margin:calc(var(--ghs-unit) * 1.5) 0}.backup-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.backup-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray)}.backup-hint[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.backup-hint[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{color:var(--ghs-color-gray);width:1.2em;height:1.2em;border-width:.1em;margin-right:.3em}.backup-hint[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}']})),a})();function r$(o,a){if(1&o&&(t.TgZ(0,"option",9),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function c$(o,a){if(1&o&&(t.TgZ(0,"option",9),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n.name),t.xp6(1),t.Q6J("ghs-label","data.character."+n.name)}}function l$(o,a){if(1&o&&t._UZ(0,"ghs-attackmodifier",13),2&o){const n=a.$implicit,e=t.oxw(2).$implicit,i=t.oxw();t.Q6J("attackModifier",n)("flipped",!0)("characterIcon","./assets/images/character/icons/"+e.edition+"-"+e.name+".svg")("newStyle",i.settingsManager.settings.fhStyle||i.gameManager.newAmStyle(e.edition))}}function g$(o,a){if(1&o&&(t.TgZ(0,"div",11)(1,"h1"),t._UZ(2,"span",3),t._uU(3),t.qZA(),t.YNc(4,l$,1,4,"ghs-attackmodifier",12),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.character."+n.name),t.xp6(1),t.hij(" [",n.attackModifierDeck.cards.length,"] "),t.xp6(1),t.Q6J("ngForOf",n.attackModifierDeck.cards)}}function d$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,g$,5,3,"div",10),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n&&n.attackModifierDeck.cards.length>0)}}let h$=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterName",[]),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"filteredCharacters",[]),(0,_.Z)(this,"edition",void 0),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{let s=!1;i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),s=!0),i.characters&&(e.characterName="string"==typeof i.characters?[i.characters]:i.characters,s=!0),s&&e.update()}})})()}update(){this.characters=[],d.v.charactersData(this.edition).forEach(e=>{let i=new oe.z(e,0);i.attackModifierDeck.cards=[];let s=0;i.perks.forEach(l=>{l.cards&&l.cards.forEach((m,O)=>{if(l.type==n_.Ib.add||l.type==n_.Ib.replace){let k=Object.assign(new Lt.YY(m.attackModifier.type),m.attackModifier);if(k.id="perk"+s,(!d.v.attackModifierManager.findByAttackModifier(Lt.UO,k)||l.type==n_.Ib.add||O>0)&&(k.character=!0),k.character){d.v.attackModifierManager.findByAttackModifier(i.attackModifierDeck.cards,k)||s++;for(let W=0;We.edition!=i.edition?e.edition{const i=this.characters.find(s=>s.name==e);i&&this.filteredCharacters.push(i)})}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,characters:this.characterName||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-tool"]],decls:13,vars:8,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["multiple","",3,"ngModel","ngModelChange","change"],[1,"characters"],[4,"ngFor","ngForOf"],[3,"value"],["class","character",4,"ngIf"],[1,"character"],[3,"attackModifier","flipped","characterIcon","newStyle",4,"ngFor","ngForOf"],[3,"attackModifier","flipped","characterIcon","newStyle"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,r$,2,2,"option",5),t.qZA()(),t.TgZ(7,"label"),t._UZ(8,"span",3),t.TgZ(9,"select",6),t.NdJ("ngModelChange",function(l){return i.characterName=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(10,c$,2,2,"option",5),t.qZA()()(),t.TgZ(11,"div",7),t.YNc(12,d$,2,1,"ng-container",8),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.Q6J("ghs-label","settings.character"),t.xp6(1),t.Q6J("ngModel",i.characterName),t.xp6(1),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngForOf",i.filteredCharacters))},dependencies:[x.sg,x.O5,wo,ko,Ca,Sl,yi,Si,Yr,JO,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.characters[_ngcontent-%COMP%]{display:flex;overflow:auto}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{display:flex;flex-direction:column}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%]{width:300px;min-width:300px;height:200px;min-height:200px;margin:10px}"]})),a})();function u$(o,a){if(1&o&&(t.TgZ(0,"option",10),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function _$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",7),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return i.settingsManager.setCalculateStats(!i.settingsManager.settings.calculateStats),t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.settingsManager.settings.calculateStats),t.xp6(1),t.Q6J("ghs-label","settings.calcStats")}}function p$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",6),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.entity=i)})("change",function(){t.CHM(n);const i=t.oxw();return i.update(),t.KtG(i.updateQueryParams())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.entity),t.xp6(1),t.Q6J("ghs-label","tools.decks.entity")}}function f$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",6),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.elite=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.elite),t.xp6(1),t.Q6J("ghs-label","tools.decks.elite")}}function m$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",11),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.level=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.level),t.xp6(1),t.Q6J("ghs-label","tools.decks.level")}}function v$(o,a){if(1&o&&(t.TgZ(0,"small"),t._UZ(1,"span",3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","data.deck."+e.deck(n).name)}}function C$(o,a){if(1&o&&t._UZ(0,"ghs-ability",15),2&o){const n=a.$implicit,e=t.oxw(),i=e.$implicit,s=e.index,l=t.oxw(2);t.Q6J("ability",n)("abilities",l.deck(i).abilities)("character",l.characters[s])("flipped",!0)}}function M$(o,a){if(1&o&&(t.TgZ(0,"div",13)(1,"h2"),t._UZ(2,"span",3),t.YNc(3,v$,2,1,"small",8),t.qZA(),t.YNc(4,C$,1,4,"ghs-ability",14),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.character."+n.name),t.xp6(1),t.Q6J("ngIf",n.name!=e.deck(n).name),t.xp6(1),t.Q6J("ngForOf",e.deck(n).abilities)}}function O$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,M$,5,3,"div",12),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.characters)}}function P$(o,a){if(1&o&&(t.TgZ(0,"small"),t._UZ(1,"span",3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","data.deck."+e.deck(n).name)}}const y$=function(o){return{"bottom-actions":o}};function b$(o,a){if(1&o&&t._UZ(0,"ghs-ability",17),2&o){const n=a.$implicit,e=t.oxw(),i=e.$implicit,s=e.index,l=t.oxw(2);t.Q6J("ability",n)("abilities",l.deck(i).abilities)("monster",l.monsters[s])("flipped",!0)("ngClass",t.VKq(5,y$,n.bottomActions&&n.bottomActions.length>0))}}function x$(o,a){if(1&o&&(t.TgZ(0,"div",13)(1,"h2"),t._UZ(2,"span",3),t.YNc(3,P$,2,1,"small",8),t.qZA(),t.YNc(4,b$,1,7,"ghs-ability",16),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",n.name!=e.deck(n).name),t.xp6(1),t.Q6J("ngForOf",e.deck(n).abilities)}}function w$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,x$,5,3,"div",12),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.monsters)}}let k$=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"monsters",[]),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"character",!1),(0,_.Z)(this,"entity",!0),(0,_.Z)(this,"elite",!0),(0,_.Z)(this,"level",1),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),e.update())}})})()}update(){if(this.monsters=[],this.characters=[],this.character){const e=d.v.editionData.filter(i=>i.edition==this.edition).map(i=>i.characters).flat().filter(i=>d.v.decksData().some(s=>s.name==i.deck||s.name==i.name));this.characters=e.sort((i,s)=>i.name.toLowerCase()new oe.z(i,this.level))}else{const e=d.v.editionData.filter(i=>i.edition==this.edition).map(i=>i.monsters).flat().filter((i,s,l)=>i.replace||!i.replace&&!l.find(m=>m.replace&&m.name==i.name&&m.edition==i.edition));this.monsters=e.sort((i,s)=>i.name.toLowerCase(){let s=new Ze.Q(i,this.level);return s.boss&&this.entity&&d.v.monsterManager.addMonsterEntity(s,1,ee.M.boss),!s.boss&&this.elite&&d.v.monsterManager.addMonsterEntity(s,1,ee.M.elite),!s.boss&&this.entity&&d.v.monsterManager.addMonsterEntity(s,2,ee.M.normal),s})}d.v.uiChange.emit()}deck(e){return d.v.deckData(e)}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-decks-tool"]],decls:23,vars:16,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["type","checkbox",3,"ngModel","ngModelChange","change"],["type","checkbox",3,"checked","change"],[4,"ngIf"],[1,"decks"],[3,"value"],["type","number","min","0","max","7",3,"ngModel","ngModelChange","change"],["class","deck",4,"ngFor","ngForOf"],[1,"deck"],["class","bottom-actions",3,"ability","abilities","character","flipped",4,"ngFor","ngForOf"],[1,"bottom-actions",3,"ability","abilities","character","flipped"],[3,"ability","abilities","monster","flipped","ngClass",4,"ngFor","ngForOf"],[3,"ability","abilities","monster","flipped","ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,u$,2,2,"option",5),t.qZA()(),t.TgZ(7,"label")(8,"input",6),t.NdJ("ngModelChange",function(l){return i.character=l})("change",function(){return i.update()}),t.qZA(),t._UZ(9,"span",3),t.qZA(),t.TgZ(10,"label")(11,"input",7),t.NdJ("change",function(){return i.settingsManager.setCalculate(!i.settingsManager.settings.calculate),i.update()}),t.qZA(),t._UZ(12,"span",3),t.qZA(),t.YNc(13,_$,3,2,"label",8),t.YNc(14,p$,3,2,"label",8),t.YNc(15,f$,3,2,"label",8),t.YNc(16,m$,3,2,"label",8),t.TgZ(17,"label")(18,"input",7),t.NdJ("change",function(){return i.settingsManager.setFhStyle(!i.settingsManager.settings.fhStyle),i.gameManager.uiChange.emit()}),t.qZA(),t._UZ(19,"span",3),t.qZA()(),t.TgZ(20,"div",9),t.YNc(21,O$,2,1,"ng-container",8),t.YNc(22,w$,2,1,"ng-container",8),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.Q6J("ngModel",i.character),t.xp6(1),t.Q6J("ghs-label","tools.decks.character"),t.xp6(2),t.Q6J("checked",i.settingsManager.settings.calculate),t.xp6(1),t.Q6J("ghs-label","settings.calc"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate&&!i.character),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate&&!i.character),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate),t.xp6(2),t.Q6J("checked",i.settingsManager.settings.fhStyle),t.xp6(1),t.Q6J("ghs-label","settings.fhStyle"),t.xp6(2),t.Q6J("ngIf",i.characters.length>0),t.xp6(1),t.Q6J("ngIf",i.monsters.length>0))},dependencies:[x.mk,x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Jc,id,Si,Yr,a_,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.menu[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex}.decks[_ngcontent-%COMP%]{flex:1 1 auto;width:100%;overflow:auto;display:flex;margin-top:20px}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%]{display:flex;flex-direction:column}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{text-align:center;margin:0}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{flex-shrink:0;width:400px;height:255px;margin:10px}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] ghs-ability.bottom-actions[_ngcontent-%COMP%]{height:540px}"]})),a})();var YO=E(2736),l_=E(3788);class KO{constructor(a=void 0,n=void 0,e=0,i=[],s=!1,l=[],m=0,O=void 0){(0,_.Z)(this,"cardId",void 0),(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"initiative",void 0),(0,_.Z)(this,"level",0),(0,_.Z)(this,"shuffle",void 0),(0,_.Z)(this,"actions",void 0),(0,_.Z)(this,"lost",!1),(0,_.Z)(this,"bottomActions",void 0),(0,_.Z)(this,"bottomLost",!1),(0,_.Z)(this,"bottomShuffle",!1),(0,_.Z)(this,"hint",void 0),(0,_.Z)(this,"revealed",!1),this.cardId=a,this.name=n,this.initiative=e,this.actions=i,this.shuffle=s,this.bottomActions=l,this.level=m,this.hint=O}}var $w=E(2113);class BT{constructor(a,n,e,i,s,l,m,O,k=void 0,W=void 0,ct=void 0,Ct=!1,Ot=1,xt=!1,Gt=void 0,se=!1){(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"cardId",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"health",void 0),(0,_.Z)(this,"attack",void 0),(0,_.Z)(this,"movement",void 0),(0,_.Z)(this,"range",void 0),(0,_.Z)(this,"flying",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"additionalAction",void 0),(0,_.Z)(this,"level",void 0),(0,_.Z)(this,"special",void 0),(0,_.Z)(this,"count",void 0),(0,_.Z)(this,"thumbnail",void 0),(0,_.Z)(this,"thumbnailUrl",void 0),(0,_.Z)(this,"noThumbnail",!1),this.name=a,this.cardId=n,this.edition=e,this.health=i,this.attack=s,this.movement=l,this.range=m,this.flying=O,this.action=k,this.additionalAction=W,this.level=ct,this.special=Ct,this.count=Ot,this.thumbnail=xt,this.thumbnail=xt,this.thumbnailUrl=Gt,this.noThumbnail=se}}class T${constructor(a){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"count",""),(0,_.Z)(this,"marker",""),(0,_.Z)(this,"summon",!1),(0,_.Z)(this,"manual",!1),(0,_.Z)(this,"manualMin",0),(0,_.Z)(this,"manualMax",0),this.monster=a}}const Z$=function(o,a,n,e){return[o,a,n,e]};function A$(o,a){if(1&o&&t._UZ(0,"span",10),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Akn(e.style),t.Q6J("ghs-label",n.marker?"game.summon.spawnTypeMarker":"game.summon.spawnType")("ghs-label-args",t.l5B(4,Z$,n.monster.name,n.monster.type,n.count?""+n.count:"",n.marker))}}const S$=function(o,a,n){return[o,a,n]};function E$(o,a){if(1&o&&t._UZ(0,"span",10),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Akn(e.style),t.Q6J("ghs-label",n.marker?"game.summon.spawnMarker":"game.summon.spawn")("ghs-label-args",t.kEZ(4,S$,n.monster.name,n.count?""+n.count:"",n.marker))}}function D$(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," ("),t._UZ(2,"span",11),t._uU(3,"\xa0"),t._UZ(4,"span",4),t._uU(5,")\xa0 "),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("value-calc",n.monster.health),t.xp6(2),t.Akn(e.style),t.Q6J("ghs-label","game.hp")}}function I$(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t._UZ(2,"span",4),t._uU(3,"\xa0"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","and")}}const N$=function(o,a){return{"spawn-highlight":o,"spawn-objective-highlight":a}};function J$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",7),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(),l=s.$implicit,m=s.index,O=t.oxw(2);return t.KtG(O.spawnSummons(i,l,m))}),t.YNc(1,A$,1,9,"span",8),t.YNc(2,E$,1,8,"span",8),t.YNc(3,D$,6,4,"span",9),t.YNc(4,I$,4,3,"span",9),t.qZA()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw(2);t.Q6J("ngClass",t.WLB(6,N$,s.spawnHighlight(e,i)&&!s.settingsManager.settings.disableAnimations,s.objective))("clickBehind",!s.spawnHighlight(e,i)),t.xp6(1),t.Q6J("ngIf",e.monster.type!=s.MonsterType.boss),t.xp6(1),t.Q6J("ngIf",e.monster.type==s.MonsterType.boss),t.xp6(1),t.Q6J("ngIf",e.monster.health),t.xp6(1),t.Q6J("ngIf",i1)}}function U$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,J$,5,9,"span",6),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.monster.type)}}const L$=function(o,a){return{"text-white":o,small:a}};function Q$(o,a){if(1&o&&(t.TgZ(0,"span",2)(1,"span",3),t._UZ(2,"span",4),t._uU(3,"\xa0"),t.qZA(),t.YNc(4,U$,2,1,"ng-container",5),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(5,L$,!n.right,n.action.small)),t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label",n.isSpawn?"game.action.spawn":"game.action.summon"),t.xp6(2),t.Q6J("ngForOf",n.monsters)}}function R$(o,a){if(1&o&&t._UZ(0,"ghs-summon-sheet",12),2&o){const n=t.oxw();t.Akn(n.style),t.Q6J("summon",n.getSummon())("action",!0)("additional",n.additional)("right",n.right)("item","summonDataItem"==n.action.value)}}let zT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"monsterType",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"isSpawn",!1),(0,_.Z)(this,"additional",!1),(0,_.Z)(this,"highlight",!0),(0,_.Z)(this,"actionIndex",""),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"spawners",[]),(0,_.Z)(this,"monsters",[]),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"summonData",void 0),(0,_.Z)(this,"count",void 0),(0,_.Z)(this,"tags",[]),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"uiChangeSubscription",void 0),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){this.update()}update(){if(this.summonData=void 0,this.spawners=[],this.monster?this.spawners=d.v.entityManager.entities(this.monster,!0).map(e=>e).filter(e=>!this.monsterType||e.type==this.monsterType):this.objective instanceof qe.CH?this.spawners=[this.objective]:this.objective instanceof Nn.k&&(this.spawners=d.v.entityManager.entities(this.objective,!0).map(e=>e)),this.monsters=[],this.tags=[],this.count=void 0,this.type=void 0,"summonData"==this.action.value||"summonDataItem"==this.action.value)this.summonData=this.action.valueObject;else if("monsterStandee"==this.action.value){this.monsters=JSON.parse(JSON.stringify(this.action.valueObject));const e=Math.max(2,d.v.characterManager.characterCount());this.monsters=this.monsters.filter(i=>!!(i.monster.type||e<3&&i.monster.player2||3==e&&i.monster.player3||e>3&&i.monster.player4)||!R.r.settings.calculate),this.monsters.forEach(i=>{i.monster.type||(e<3&&i.monster.player2?i.monster.type=i.monster.player2:3==e&&i.monster.player3?i.monster.type=i.monster.player3:e>3&&i.monster.player4&&(i.monster.type=i.monster.player4))})}else(""+this.action.value).split("|").forEach(e=>{const i=e.split(":");let s=new yn.Qw(i[0]);s.type=ee.M.normal;let l=new T$(s);i.length>1&&(isNaN(+i[1])?s.type=i[1]:l.count=+i[1]),i.length>2&&i[2]&&(l.count=i[2]),i.length>3&&i[3]&&(s.health=i[3]),this.monsters.push(l)});(this.monster||this.objective)&&d.v.game.figures.forEach(e=>{e instanceof Ze.Q&&e.entities.forEach(i=>{i.tags&&i.tags.forEach(s=>{this.monster&&s.startsWith("roundAction-summon-"+this.monster.name+"-"+(this.actionIndex?this.actionIndex+"-":"")+this.getSpawnId())&&this.tags.push(s)})})})}getSummonLabel(e){const i="string"==typeof e.monster.health&&-1!=e.monster.health.indexOf("H")?e.monster.health:e.monster.health?(0,ae.j9)(e.monster.health):"";return e.monster.player2==e.monster.player3&&e.monster.player3==e.monster.player4?R.r.getLabel("game.summon.playerAll",[""+e.monster.type])+(i?"("+i+" "+R.r.getLabel("game.hp")+")":""):e.monster.player2==e.monster.player3?R.r.getLabel("game.summon.player2-3",[""+e.monster.player2,""+e.monster.player4])+(i?"("+i+" "+R.r.getLabel("game.hp")+")":""):e.monster.player3==e.monster.player4?R.r.getLabel("game.summon.player3-4",[""+e.monster.player2,""+e.monster.player4])+(i?"("+i+" "+R.r.getLabel("game.hp")+")":""):(console.warn("Incorrect summon data",e),"")}getSummon(){return this.summonData?new Ee.eU("",this.summonData.name,this.summonData.cardId,this.summonData.level||0,this.summonData.count,Ee.mp.custom,this.summonData):new Ee.eU("","","",0,0,Ee.mp.custom)}getSpawnId(){if(this.monster){const e=d.v.monsterManager.getAbility(this.monster);if(e)return e.cardId||d.v.deckData(this.monster).abilities.indexOf(e)}return-1}getTag(e,i=!1){return this.monster?(i?"roundAction-spawner-":"roundAction-summon-")+this.monster.name+"-"+(this.actionIndex?this.actionIndex+"-":"")+this.getSpawnId()+"-"+e:this.objective instanceof qe.CH?(i?"roundAction-spawner-":"roundAction-summon-")+this.objective.id+"-"+(this.actionIndex?this.actionIndex+"-":"")+e:this.objective instanceof Nn.k?(i?"roundAction-spawner-":"roundAction-summon-")+this.objective.uuid+"-"+(this.actionIndex?this.actionIndex+"-":"")+e:""}spawnHighlight(e,i){if(this.monster){const s=d.v.game.figures.find(m=>m instanceof Ze.Q&&m.name==e.monster.name),l=s&&d.v.monsterManager.monsterEntityCountAll(s)||0;return this.highlight&&(this.spawners.length>0&&this.monster.active&&this.tags.filter(m=>m==this.getTag(i)).lengthO instanceof qe.CH||O instanceof oa.W||-1==O.tags.indexOf(l)).filter((O,k)=>R.r.settings.combineSummonAction||0==k);if(i.monster&&i.monster.type){const O=(0,ae.j9)(i.count||1);d.v.stateManager.before("summonAction","data.monster."+i.monster.name,"game.monsterType."+i.monster.type,""+O*m.length),m.forEach(k=>{if(i.monster&&i.monster.type){const W=d.v.monsterManager.addMonsterByName(i.monster.name,this.monster&&this.monster.edition||d.v.currentEdition());if(W){for(let ct=0;ctCt.maxHealth&&(Ct.health=Ct.maxHealth)}(Ct.marker||Ct.tags.length>0)&&d.v.addEntityCount(W,Ct)}}k.tags.push(l)}}}),this.update(),d.v.stateManager.after()}e.stopPropagation(),e.preventDefault()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-action-summon"]],inputs:{monster:"monster",monsterType:"monsterType",objective:"objective",action:"action",right:"right",isSpawn:["spawn","isSpawn"],additional:"additional",highlight:"highlight",actionIndex:["index","actionIndex"],style:"style"},features:[t.TTD],decls:2,vars:2,consts:[["class","summon-value",3,"ngClass",4,"ngIf"],[3,"summon","action","additional","right","item","style",4,"ngIf"],[1,"summon-value",3,"ngClass"],[1,"summon-label"],[3,"ghs-label"],[4,"ngFor","ngForOf"],["ghs-pointer-input","",3,"ngClass","clickBehind","singleClick",4,"ngIf"],["ghs-pointer-input","",3,"ngClass","clickBehind","singleClick"],[3,"ghs-label","ghs-label-args","style",4,"ngIf"],[4,"ngIf"],[3,"ghs-label","ghs-label-args"],[3,"value-calc"],[3,"summon","action","additional","right","item"]],template:function(e,i){1&e&&(t.YNc(0,Q$,5,8,"span",0),t.YNc(1,R$,1,7,"ghs-summon-sheet",1)),2&e&&(t.Q6J("ngIf",!i.summonData),t.xp6(1),t.Q6J("ngIf",i.summonData))},dependencies:[x.mk,x.sg,x.O5,DT,ie,ng,An],styles:[".summon-value[_ngcontent-%COMP%]{font-family:var(--ghs-font-text)}.summon-value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow)}.summon-value.small[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}@keyframes _ngcontent-%COMP%_spawn-pulse{0%{transform:scale(.9)}50%{transform:scale(1)}to{transform:scale(.9)}}.summon-value[_ngcontent-%COMP%] .spawn-highlight[_ngcontent-%COMP%]{display:inline-block;cursor:pointer;animation:_ngcontent-%COMP%_spawn-pulse 2s ease-in-out infinite}.summon-value[_ngcontent-%COMP%] .spawn-highlight[_ngcontent-%COMP%]:hover{transform:scale(1);opacity:.8;animation:none}.summon-value[_ngcontent-%COMP%] .spawn-objective-highlight[_ngcontent-%COMP%]{display:inline-block;cursor:pointer;transform:scale(.9);font-style:italic}.summon-value[_ngcontent-%COMP%] .spawn-objective-highlight[_ngcontent-%COMP%]:hover{transform:scale(1);opacity:.8}.summon-value[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{vertical-align:initial}"]})),a})();function F$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.action."+n)}}function q$(o,a){1&o&&(t.TgZ(0,"label"),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","editor.action.value"))}const Ww=function(){return["X"]};function H$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",18),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.specialTarget."+n)("ghs-label-args",t.DdM(3,Ww))}}function j$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",19),t._uU(1," X: "),t.TgZ(2,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.subValue=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSpecialTarget())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngModel",n.subValue)}}function B$(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeSpecialTarget())}),t.YNc(2,H$,2,4,"option",5),t.qZA(),t.YNc(3,j$,3,1,"label",17),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.value),t.xp6(1),t.Q6J("ngForOf",n.ActionSpecialTarget),t.xp6(1),t.Q6J("ngIf",n.subValue)}}function z$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",21),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.value=s.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngModel",n.action.value)}}function G$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",22)(1,"div",23)(2,"ghs-action-hex",24),t.NdJ("clickCallback",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.toggleHex(i))})("doubleclickCallback",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.removeHex(i))}),t.qZA()(),t.TgZ(3,"textarea",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.hexAction.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeHex())}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("action",n.hexAction)("value",""+n.hexAction.value),t.xp6(1),t.Q6J("ngModel",n.hexAction.value)}}function V$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.monster."+n)}}function Y$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","monster."+n)}}function K$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",31)(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.monster=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummonMonster())}),t.YNc(2,V$,2,2,"option",5),t.qZA(),t.TgZ(3,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.monsterType=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummonMonster())}),t._UZ(4,"option"),t.YNc(5,Y$,2,2,"option",5),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngModel",n.monster),t.xp6(1),t.Q6J("ngForOf",n.monsters),t.xp6(1),t.Q6J("ngModel",n.monsterType),t.xp6(2),t.Q6J("ngForOf",n.MonsterTypes)}}function $$(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","editor.action.add"))}function W$(o,a){1&o&&t._UZ(0,"span",2),2&o&&t.Q6J("ghs-label","editor.action.add")}function X$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",32),t._UZ(1,"ghs-action-summon",33),t.TgZ(2,"input",34),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.name=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA(),t.TgZ(3,"div",35)(4,"span",36)(5,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.health=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(6,"span",36)(7,"input",38),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.movement=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(8,"a",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.editSummonAction())}),t.YNc(9,$$,2,1,"span",6),t.qZA(),t.TgZ(10,"span",36)(11,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.attack=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(12,"span",36)(13,"input",40),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.range=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(14,"a",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.editSummonAdditionalAction())}),t.YNc(15,W$,1,1,"span",41),t.qZA()()()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("action",n.action)("additional",!0),t.xp6(1),t.Q6J("ngModel",n.summon.name),t.xp6(3),t.Q6J("ngModel",n.summon.health),t.xp6(2),t.Q6J("ngModel",n.summon.movement),t.xp6(2),t.Q6J("ngIf",!n.summon.action),t.xp6(2),t.Q6J("ngModel",n.summon.attack),t.xp6(2),t.Q6J("ngModel",n.summon.range),t.xp6(2),t.Q6J("ngIf",!n.summon.additionalAction)}}function tW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",25)(1,"div",26)(2,"label")(3,"input",27),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeSummonType(i))}),t.qZA(),t._UZ(4,"span",2),t.qZA(),t.TgZ(5,"label")(6,"input",28),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeSummonType(i))}),t.qZA(),t._UZ(7,"span",2),t.qZA()(),t.YNc(8,K$,6,4,"div",29),t.YNc(9,X$,16,9,"div",30),t.qZA()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("checked",!n.summon),t.xp6(1),t.Q6J("ghs-label","editor.action.summon.type.monster"),t.xp6(2),t.Q6J("checked",n.summon),t.xp6(1),t.Q6J("ghs-label","editor.action.summon.type.summon"),t.xp6(1),t.Q6J("ngIf",!n.summon),t.xp6(1),t.Q6J("ngIf",n.summon)}}function eW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",18),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.condition."+n)("ghs-label-args",t.DdM(3,Ww))}}function nW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",19),t._uU(1," X: "),t.TgZ(2,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.subValue=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCondition())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngModel",n.subValue)}}function iW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCondition())}),t.YNc(2,eW,2,4,"option",5),t.qZA(),t.YNc(3,nW,3,1,"label",17),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.value),t.xp6(1),t.Q6J("ngForOf",n.ConditionNames),t.xp6(1),t.Q6J("ngIf",n.subValue)}}function oW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",18),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.card."+n)("ghs-label-args",t.DdM(3,Ww))}}function aW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",19),t._uU(1," X: "),t.TgZ(2,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.subValue=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCard())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngModel",n.subValue)}}function sW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCard())}),t.YNc(2,oW,2,4,"option",5),t.qZA(),t.YNc(3,aW,3,1,"label",17),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.value),t.xp6(1),t.Q6J("ngForOf",n.ActionCardTypes),t.xp6(1),t.Q6J("ngIf",n.subValue)}}function rW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.element."+n)}}function cW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.YNc(1,rW,2,2,"option",5),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngModel",n.action.value),t.xp6(1),t.Q6J("ngForOf",n.Elements)}}function lW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.monster."+n)}}function gW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.YNc(1,lW,2,2,"option",5),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngModel",n.action.value),t.xp6(1),t.Q6J("ngForOf",n.MonsterTypes)}}function dW(o,a){if(1&o&&(t.TgZ(0,"option",44),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("value",n)("selected",e.action.valueType==n||!e.action.valueType&&n==e.ActionValueType.fixed),t.xp6(1),t.Q6J("ghs-label","editor.action.valueType."+n)}}function hW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"span",2),t.qZA(),t.TgZ(3,"select",42),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.valueType=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.YNc(4,dW,2,3,"option",43),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","editor.action.valueType"),t.xp6(1),t.Q6J("ngModel",n.action.valueType),t.xp6(1),t.Q6J("ngForOf",n.ActionValueTypes)}}function uW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",45)(1,"span",46),t._UZ(2,"img",47),t.qZA(),t.TgZ(3,"ghs-editor-action",48),t.NdJ("actionChange",function(i){const l=t.CHM(n).index,m=t.oxw();return t.KtG(m.action.subActions[l]=i)}),t.qZA(),t.TgZ(4,"a",12),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeSubAction(s))}),t._UZ(5,"img",49)(6,"span",2),t.qZA()()}if(2&o){const n=a.index,e=t.oxw();t.xp6(3),t.Q6J("action",e.action.subActions[n]),t.xp6(3),t.Q6J("ghs-label","editor.action.removeSubAction")}}const _W=function(o){return[o]},pW=function(o,a,n,e,i,s,l,m){return[o,a,n,e,i,s,l,m]},fW=function(o,a,n,e,i,s,l,m,O,k,W,ct){return[o,a,n,e,i,s,l,m,O,k,W,ct]};function mW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-action",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.relative=!i.relative)}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("action",n.data.action)("relative",n.relative)}}let vW=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"actionChange",new t.vpe),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionTypes",Object.values(vt.Us)),(0,_.Z)(this,"ActionSpecialTarget",Object.values(vt.q2)),(0,_.Z)(this,"ConditionNames",Object.values(re.fT)),(0,_.Z)(this,"Elements",Object.values(Gn.W_)),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"ActionValueTypes",Object.values(vt.EF)),(0,_.Z)(this,"ActionCardTypes",Object.values(vt.TE)),(0,_.Z)(this,"MonsterTypes",Object.values(ee.M)),(0,_.Z)(this,"hexAction",new vt.aU(vt.Us.area,"(0,0,invisible)")),(0,_.Z)(this,"value",""),(0,_.Z)(this,"subValue",""),(0,_.Z)(this,"summon",void 0),(0,_.Z)(this,"monster",""),(0,_.Z)(this,"monsterType",void 0),(0,_.Z)(this,"monsters",[]),this.dialog=e}ngOnInit(){if(this.monsters=d.v.monstersData().map(e=>e.name),this.action&&this.action.type==vt.Us.area){this.hexAction.value=""+this.action.value;let e=[];this.hexAction.value.split("|").forEach(i=>{const s=Fi.fromString(i);null!=s&&e.push(s)}),e.forEach(i=>this.fillHexes(i,e)),this.hexAction.value=e.map(i=>Fi.toString(i)).join("|"),this.change()}else if(this.action.type==vt.Us.condition||this.action.type==vt.Us.specialTarget||this.action.type==vt.Us.card)-1!=(""+this.action.value).indexOf(":")?(this.value=(""+this.action.value).split(":")[0],this.subValue=(""+this.action.value).split(":")[1]):this.value=""+this.action.value;else if(this.action.type==vt.Us.summon&&this.action.value)try{let e=JSON.parse(this.action.value+"");if("string"==typeof e)throw Error("fallback");this.summon=new BT(e.name,e.health,e.attack,e.movement,e.range,e.flying,e.action,e.additionalAction)}catch{this.summon=void 0;const i=(this.action.value+"").split(":");this.monster=i[0],i.length>1&&(this.monsterType=i[1])}}valueChange(e){return isNaN(+e)?e||"":+e}addSubAction(){this.action.subActions||(this.action.subActions=[]),this.action.subActions.push(new vt.aU(vt.Us.attack)),this.change()}removeSubAction(e){this.action.subActions.splice(e,1),this.change()}changeType(){this.action.valueType=vt.EF.fixed,this.action.type==vt.Us.area?this.hexAction.value="(0,0,invisible)":this.action.type==vt.Us.condition?(this.value=this.ConditionNames[0],this.changeCondition()):this.action.type==vt.Us.element?this.action.value=this.Elements[0]:this.action.type==vt.Us.card&&(this.value=this.ActionCardTypes[0],this.changeCard()),this.change()}change(){d.v.uiChange.emit()}toggleHex(e){switch(e.type){case ci.target:e.type=ci.active;break;case ci.active:e.type=ci.blank;break;case ci.blank:e.type=ci.ally;break;case ci.ally:e.type=ci.conditional;break;case ci.conditional:e.type=ci.invisible;break;case ci.invisible:e.type=ci.target}let i=[];(""+this.hexAction.value).split("|").forEach(l=>{const m=Fi.fromString(l);null!=m&&i.push(m)});const s=i.find(l=>e.x==l.x&&e.y==l.y);s?i.splice(i.indexOf(s),1,e):i.push(e),this.fillHexes(e,i),this.hexAction.value=i.map(l=>Fi.toString(l)).join("|"),this.action.value=i.filter(l=>l.type!=ci.invisible).map(l=>Fi.toString(l)).join("|"),this.change()}changeHex(){let e=[];(""+this.hexAction.value).split("|").forEach(i=>{const s=Fi.fromString(i);null!=s&&e.push(s)}),this.hexAction.value=e.map(i=>Fi.toString(i)).join("|"),this.action.value=e.filter(i=>i.type!=ci.invisible).map(i=>Fi.toString(i)).join("|"),this.change()}removeHex(e){let i=[];(""+this.hexAction.value).split("|").forEach(l=>{const m=Fi.fromString(l);null!=m&&i.push(m)});const s=i.find(l=>e.x==l.x&&e.y==l.y);if(s){0==s.x&&0==s.y?s.type=ci.invisible:i.splice(i.indexOf(s),1);for(let l=-1;l<2;l++)for(let m=-1;m<2;m++)if((e.x+l!=e.x||e.y+m!=e.y)&&e.x+l>=0&&e.y+m>=0){let O=i.find(k=>e.x+l==k.x&&e.y+m==k.y&&k.type==ci.invisible);O&&(0!=O.x||0!=O.y)&&i.splice(i.indexOf(O),1)}}i.filter(l=>l.type!=ci.invisible).forEach(l=>this.fillHexes(l,i)),this.hexAction.value=i.map(l=>Fi.toString(l)).join("|"),this.action.value=i.filter(l=>l.type!=ci.invisible).map(l=>Fi.toString(l)).join("|"),this.change()}fillHexes(e,i){for(let s=-1;s<2;s++)for(let l=-1;l<2;l++)(e.x+s!=e.x||e.y+l!=e.y)&&e.x+s>=0&&e.y+l>=0&&(i.find(m=>e.x+s==m.x&&e.y+l==m.y)||i.push(new Fi(e.x+s,e.y+l,ci.invisible,"")))}changeSpecialTarget(){-1!=R.r.getLabel("game.specialTarget."+this.value).indexOf("{0}")?(this.subValue||(this.subValue="1"),this.action.value=this.value+":"+this.subValue):(this.action.value=this.value,this.subValue=""),this.change()}changeCondition(){-1!=new re.gP(this.value).types.indexOf(re.CP.value)?(this.subValue||(this.subValue="1"),this.action.value=this.value+":"+this.subValue):(this.action.value=this.value,this.subValue=""),this.change()}changeCard(){this.value==vt.TE.experience||this.value==vt.TE.slotXp?(this.subValue||(this.subValue="1"),this.action.value=this.value+":"+this.subValue):(this.action.value=this.value,this.subValue=""),this.change()}dropSubAction(e){Fn(this.action.subActions,e.previousIndex,e.currentIndex),d.v.uiChange.emit()}changeSummonType(e){this.monster="",this.monsterType=void 0,"monster"==e.target.value?(this.summon=void 0,this.changeSummonMonster()):"summon"==e.target.value&&(this.summon=new BT("","","",0,0,0,0,!1),this.action.value=JSON.stringify(this.summon))}changeSummonMonster(){this.action.value=this.monster+(this.monsterType?":"+this.monsterType:""),d.v.uiChange.emit()}changeSummon(){this.summon&&(this.action.value=JSON.stringify(this.summon)),d.v.uiChange.emit()}editSummonAction(){this.summon&&(this.summon.action||(this.summon.action=new vt.aU(vt.Us.attack)),this.dialog.open(Kr,{panelClass:"dialog",data:{action:this.summon.action}}).closed.subscribe({next:i=>{0==i&&this.summon&&(this.summon.action=void 0),this.changeSummon()}}))}editSummonAdditionalAction(){this.summon&&(this.summon.additionalAction||(this.summon.additionalAction=new vt.aU(vt.Us.attack)),this.dialog.open(Kr,{panelClass:"dialog",data:{action:this.summon.additionalAction}}).closed.subscribe({next:i=>{0==i&&this.summon&&(this.summon.additionalAction=void 0),this.changeSummon()}}))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-editor-action"]],inputs:{action:"action"},outputs:{actionChange:"actionChange"},decls:24,vars:41,consts:[[1,"action"],[1,"type"],[3,"ghs-label"],["type","checkbox",3,"ngModel","ngModelChange","change"],["placeholder","type",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["type","text",3,"ngModel","ngModelChange","change",4,"ngIf"],["class","area-container",4,"ngIf"],["class","summon",4,"ngIf"],[3,"ngModel","ngModelChange","change",4,"ngIf"],["cdkDropList","",1,"subactions",3,"cdkDropListDropped"],[3,"click"],["src","./assets/images/plus.svg",1,"ghs-icon"],["class","subaction","cdkDrag","",4,"ngFor","ngForOf"],[3,"value"],[3,"ngModel","ngModelChange","change"],["class","inline",4,"ngIf"],[3,"ghs-label","ghs-label-args"],[1,"inline"],["min","1","type","number",3,"ngModel","ngModelChange","change"],["type","text",3,"ngModel","ngModelChange","change"],[1,"area-container"],[1,"hexes"],[3,"action","value","clickCallback","doubleclickCallback"],[1,"summon"],[1,"summon-type"],["type","radio","name","summonType","value","monster",3,"checked","change"],["type","radio","name","summonType","value","summon",3,"checked","change"],["class","summon-monster",4,"ngIf"],["class","summon-form",4,"ngIf"],[1,"summon-monster"],[1,"summon-form"],[3,"action","additional"],[1,"summon-name",3,"ngModel","ngModelChange","change"],[1,"grid"],[1,"item"],[1,"summon-health",3,"ngModel","ngModelChange","change"],[1,"summon-movement",3,"ngModel","ngModelChange","change"],[1,"summon-attack",3,"ngModel","ngModelChange","change"],[1,"summon-range",3,"ngModel","ngModelChange","change"],[3,"ghs-label",4,"ngIf"],["placeholder","valueType",3,"ngModel","ngModelChange","change"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"value","selected"],["cdkDrag","",1,"subaction"],["cdkDragHandle","",1,"handle"],["src","./assets/images/menu.svg",1,"ghs-icon"],[3,"action","actionChange"],["src","./assets/images/minus.svg",1,"ghs-icon"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1),t._UZ(2,"span",2),t.TgZ(3,"input",3),t.NdJ("ngModelChange",function(l){return i.action.small=l})("change",function(){return i.change()}),t.qZA(),t._UZ(4,"span",2),t.qZA(),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.action.type=l})("change",function(){return i.changeType()}),t.YNc(6,F$,2,2,"option",5),t.qZA(),t.YNc(7,q$,2,1,"label",6),t.YNc(8,B$,4,3,"ng-container",6),t.YNc(9,z$,1,1,"input",7),t.YNc(10,G$,4,3,"div",8),t.YNc(11,tW,10,6,"div",9),t.YNc(12,iW,4,3,"ng-container",6),t.YNc(13,sW,4,3,"ng-container",6),t.YNc(14,cW,2,2,"select",10),t.YNc(15,gW,2,2,"select",10),t.YNc(16,hW,5,3,"ng-container",6),t.TgZ(17,"div",11),t.NdJ("cdkDropListDropped",function(l){return i.dropSubAction(l)}),t.TgZ(18,"label"),t._uU(19,"SubActions"),t.qZA(),t.TgZ(20,"a",12),t.NdJ("click",function(){return i.addSubAction()}),t._UZ(21,"img",13)(22,"span",2),t.qZA(),t.YNc(23,uW,7,2,"div",14),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","editor.action.type"),t.xp6(1),t.Q6J("ngModel",i.action.small),t.xp6(1),t.Q6J("ghs-label","editor.action.small"),t.xp6(1),t.Q6J("ngModel",i.action.type),t.xp6(1),t.Q6J("ngForOf",i.ActionTypes),t.xp6(1),t.Q6J("ngIf",-1==t.VKq(17,_W,i.ActionType.jump).indexOf(i.action.type)),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.specialTarget),t.xp6(1),t.Q6J("ngIf",-1==t.qlk(19,pW,i.ActionType.area,i.ActionType.card,i.ActionType.condition,i.ActionType.element,i.ActionType.jump,i.ActionType.monsterType,i.ActionType.specialTarget,i.ActionType.summon).indexOf(i.action.type)),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.area),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.summon),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.condition),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.card),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.element),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.monsterType),t.xp6(1),t.Q6J("ngIf",-1==t.rFY(28,fW,[i.ActionType.area,i.ActionType.card,i.ActionType.condition,i.ActionType.concatenation,i.ActionType.custom,i.ActionType.grant,i.ActionType.grid,i.ActionType.jump,i.ActionType.monsterType,i.ActionType.specialTarget,i.ActionType.summon,i.ActionType.trigger]).indexOf(i.action.type)),t.xp6(6),t.Q6J("ghs-label","editor.action.addSubAction"),t.xp6(1),t.Q6J("ngForOf",i.action.subActions))},dependencies:[x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Jc,Si,Bs,Ms,Zr,Sf,zT,ie,o],styles:[".action[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--ghs-color-white)}.action[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{display:flex;align-items:center}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]{display:flex;flex-direction:column}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] .subaction[_ngcontent-%COMP%]{position:relative;margin-left:calc(var(--ghs-unit) * 2)}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] .subaction[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{position:absolute;right:0;top:0}.action[_ngcontent-%COMP%] .area-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.action[_ngcontent-%COMP%] .area-container[_ngcontent-%COMP%] .hexes[_ngcontent-%COMP%]{width:0}label.inline[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);display:flex}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-white);background-color:transparent;border:1px solid var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize))}input[type=text][_ngcontent-%COMP%]:hover, input[type=number][_ngcontent-%COMP%]:hover, select[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}input[type=text][_ngcontent-%COMP%] option[_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%] option[_ngcontent-%COMP%], select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{color:var(--ghs-color-black)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{display:flex;align-items:center}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}a[_ngcontent-%COMP%], ghs-action-hex[_ngcontent-%COMP%]{cursor:pointer}.summon[_ngcontent-%COMP%] .summon-type[_ngcontent-%COMP%], .summon[_ngcontent-%COMP%] .summon-type[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .summon[_ngcontent-%COMP%] .summon-monster[_ngcontent-%COMP%]{display:flex}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%]{position:relative;padding-top:38%;background-color:var(--ghs-color-darkgray)}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .summon-name[_ngcontent-%COMP%]{position:absolute;top:5%;left:50%;width:65%;height:20%;transform:translate(-50%)}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:32% 32% 36%;grid-template-rows:1fr 1fr;position:absolute;justify-items:stretch;top:36%;left:13%;width:87%;height:56%}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;justify-content:center}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:100%;width:30%;margin-left:40%}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background-color:var(--ghs-color-black);opacity:.7}"]})),a})(),Kr=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"relative",!0),(0,_.Z)(this,"noPreview",[]),this.data=e,this.dialogRef=i}deleteAction(){this.dialogRef.close(!1)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-editor-action-dialog"]],decls:6,vars:3,consts:[[1,"scroll-container"],[3,"action","relative","click",4,"ngIf"],[3,"action","actionChange"],[3,"click"],["src","./assets/images/minus.svg",1,"ghs-icon"],[3,"ghs-label"],[3,"action","relative","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,mW,1,2,"ghs-action",1),t.TgZ(2,"ghs-editor-action",2),t.NdJ("actionChange",function(l){return i.data.action=l}),t.qZA(),t.TgZ(3,"a",3),t.NdJ("click",function(){return i.deleteAction()}),t._UZ(4,"img",4)(5,"span",5),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngIf",-1==i.noPreview.indexOf(i.data.action.type)),t.xp6(1),t.Q6J("action",i.data.action),t.xp6(3),t.Q6J("ghs-label","editor.action.remove"))},dependencies:[x.O5,Gr,ie,vW],styles:["[_nghost-%COMP%]{display:block;font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize));width:500px}ghs-action[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize))}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}"]})),a})();const CW=["inputDeckData"];function MW(o,a){1&o&&t._UZ(0,"ghs-header",21),2&o&&t.Q6J("standalone",!0)}function OW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"span",5),t.qZA(),t.TgZ(3,"input",22),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.deckData.character=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deckDataToJson())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","editor.deck.character"),t.xp6(1),t.Q6J("ngModel",n.deckData.character)}}function PW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",44),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw();return t.KtG(s.level=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.deckDataToJson())}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("ngModel",n.level)}}const $O=function(o){return{enabled:o}};function yW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",45),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return i.bottomShuffle=!i.bottomShuffle,t.KtG(s.deckDataToJson())}),t._UZ(2,"img",32),t.qZA(),t.BQk()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(1,$O,n.bottomShuffle))}}function bW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return i.lost=!i.lost,t.KtG(s.deckDataToJson())}),t._UZ(2,"img",47)(3,"img",48),t.qZA(),t.TgZ(4,"a",49),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return i.bottomLost=!i.bottomLost,t.KtG(s.deckDataToJson())}),t._UZ(5,"img",47)(6,"img",48),t.qZA(),t.BQk()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(2,$O,n.lost)),t.xp6(3),t.Q6J("ngClass",t.VKq(4,$O,n.bottomLost))}}function xW(o,a){1&o&&t._UZ(0,"div",55)}function wW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",50),t.YNc(1,xW,1,0,"div",51),t.TgZ(2,"span",52),t._UZ(3,"img",53),t.qZA(),t.TgZ(4,"ghs-action",54),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw().$implicit,m=t.oxw();return t.KtG(m.editAbilityAction(l,s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw().$implicit,s=t.oxw();t.xp6(1),t.Q6J("ngIf",s.divider(i.actions,e)),t.xp6(3),t.Q6J("action",n)("relative",!0)}}function kW(o,a){1&o&&t._UZ(0,"div",55)}function TW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",50),t.YNc(1,kW,1,0,"div",51),t.TgZ(2,"span",52),t._UZ(3,"img",53),t.qZA(),t.TgZ(4,"ghs-action",54),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2).$implicit,m=t.oxw();return t.KtG(m.editAbilityActionBottom(l,s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2).$implicit,s=t.oxw();t.xp6(1),t.Q6J("ngIf",s.divider(i.bottomActions,e)),t.xp6(3),t.Q6J("action",n)("relative",!0)}}function ZW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",56)(1,"div",34),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw();return t.KtG(l.dropAction(s.bottomActions,i))}),t.YNc(2,TW,5,3,"div",35),t.qZA()()}if(2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ngForOf",n.bottomActions)}}const AW=function(o,a){return{"bottom-actions":o,"character-actions":a}},GT=function(o){return{"bottom-actions":o}};function SW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"div",24)(2,"div",25,26)(4,"input",27),t.NdJ("ngModelChange",function(i){const l=t.CHM(n).$implicit;return t.KtG(l.name=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deckDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deckDataToJson())}),t.qZA(),t.TgZ(5,"span",28),t.YNc(6,PW,1,1,"input",29),t.qZA(),t.TgZ(7,"input",30),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.changeInitiative(i,l))}),t.qZA(),t.TgZ(8,"a",31),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return s.shuffle=!s.shuffle,t.KtG(l.deckDataToJson())}),t._UZ(9,"img",32),t.qZA(),t.YNc(10,yW,3,3,"ng-container",8),t.YNc(11,bW,7,6,"ng-container",8),t.TgZ(12,"div",33)(13,"div",34),t.NdJ("cdkDropListDropped",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.dropAction(l.actions,i))}),t.YNc(14,wW,5,3,"div",35),t.qZA()(),t.YNc(15,ZW,3,1,"div",36),t.TgZ(16,"input",37),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.changeCardId(i,l))}),t.qZA(),t.TgZ(17,"a",38),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeAbility(s))}),t._UZ(18,"img",39),t.qZA()(),t.TgZ(19,"div",40)(20,"a",41),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addAbilityAction(s))}),t._UZ(21,"img",11)(22,"span",5),t.qZA(),t.TgZ(23,"a",42),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addAbilityActionBottom(s))}),t._UZ(24,"img",11)(25,"span",5),t.qZA()()(),t._UZ(26,"ghs-ability",43),t.qZA()}if(2&o){const n=a.$implicit,e=t.MAs(3),i=t.oxw();let s;t.xp6(2),t.Udp("font-size",.04*e.offsetWidth+"px")("--ghs-ability-color",i.getCharacter()&&(null==(s=i.getCharacter())?null:s.color)),t.Q6J("ngClass",t.WLB(28,AW,i.deckData.character||n.bottomActions&&n.bottomActions.length>0,i.deckData.character)),t.xp6(2),t.Q6J("ngModel",n.name)("ghs-label",n.name||"editor.deck.abilityName")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngIf",i.deckData.character||n.bottomActions&&n.bottomActions.length>0),t.xp6(1),t.Q6J("value",n.initiative&&(n.initiative<10?"0":"")+n.initiative),t.xp6(1),t.Q6J("ngClass",t.VKq(31,$O,n.shuffle)),t.xp6(2),t.Q6J("ngIf",!i.deckData.character&&n.bottomActions&&n.bottomActions.length>0),t.xp6(1),t.Q6J("ngIf",i.deckData.character||n.bottomActions&&n.bottomActions.length>0),t.xp6(3),t.Q6J("ngForOf",n.actions),t.xp6(1),t.Q6J("ngIf",i.deckData.character||n.bottomActions&&n.bottomActions.length>0),t.xp6(1),t.Q6J("value",n.cardId&&(n.cardId<100?"0":"")+(n.cardId<10?"0":"")+n.cardId),t.xp6(3),t.Q6J("ngClass",t.VKq(33,GT,i.deckData.character||n.bottomActions&&n.bottomActions.length>0)),t.xp6(3),t.Q6J("ghs-label","editor.action.add"),t.xp6(3),t.Q6J("ghs-label","editor.action.addBottom"),t.xp6(1),t.Q6J("ngClass",t.VKq(35,GT,i.deckData.character||n.bottomActions&&n.bottomActions.length>0))("ability",n)("abilities",i.deckData.abilities)("character",i.getCharacter())("monster",i.monster)("relative",!0)("flipped",!0)("reveal",!0)("statsCalculation",!1)}}function EW(o,a){if(1&o&&(t.TgZ(0,"option",57),t._uU(1),t._UZ(2,"span",5),t._uU(3,") "),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("value",e)("selected",n.edition==i.deckData.edition&&n.name==i.deckData.name),t.xp6(1),t.hij(" ",n.name," ("),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition)}}function DW(o,a){if(1&o&&(t.TgZ(0,"option",14),t._UZ(1,"span",5),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function tl(o){if(o.valueType&&o.valueType==vt.EF.fixed&&(o.valueType=void 0),o.subActions&&0==o.subActions.length?o.subActions=void 0:o.subActions&&o.subActions.forEach(a=>{tl(a)}),o.type==vt.Us.summon)try{let a=JSON.parse(o.value);"string"!=typeof a&&(Object.keys(a).forEach(n=>{(!a[n]||0==a[n])&&(a[n]=void 0)}),a.action&&tl(a.action),a.additionalAction&&tl(a.additionalAction)),o.value=JSON.stringify(a)}catch{}!o.value&&0!=o.value&&(o.value=void 0),o.small||(o.small=void 0)}let Xw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"inputDeckData",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"standalone",!0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"deckData",void 0),(0,_.Z)(this,"deckError",void 0),this.dialog=e,this.route=i,this.router=s,this.deckData=new $w.x("",[],""),this.deckData.abilities.push(new KO)}ngOnInit(){var e=this;return(0,J.Z)(function*(){e.standalone&&(yield R.r.init(!1)),e.character&&(e.deckData.character=!0),e.deckDataToJson(),e.inputDeckData.nativeElement.addEventListener("change",i=>{e.deckDataFromJson()}),e.route.queryParams.subscribe({next:i=>{if(i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition)),i.deck){const s=e.decksData().find(l=>l.name==i.deck);s&&(e.deckData=s,e.deckDataToJson())}!e.deckData.edition&&e.edition&&(e.deckData.edition=e.edition)}})})()}updateQueryParams(){!this.deckData.edition&&this.edition&&(this.deckData.edition=this.edition),this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,monster:this.monster&&this.monster.name||void 0,character:this.character&&this.character.name||void 0,deck:this.deckData.name||void 0},queryParamsHandling:"merge"})}decksData(){return d.v.decksData(this.edition).filter(e=>this.character?e.character:!this.monster||!e.character)}deckDataToJson(){let e=JSON.parse(JSON.stringify(this.deckData));Object.keys(e).forEach(i=>{(!e[i]||0==e[i])&&(e[i]=void 0)}),e.abilities&&e.abilities.forEach(i=>{Object.keys(i).forEach(s=>{(!i[s]&&0!=i[s]||"boolean"==typeof i[s]&&0==i[s])&&(i[s]=void 0),i.revealed=void 0,"level"==s&&0==i[s]&&(i[s]=void 0),i.actions&&0==i.actions.length?i.actions=void 0:i.actions&&i.actions.forEach(l=>{tl(l)}),i.bottomActions&&0==i.bottomActions.length?i.bottomActions=void 0:i.bottomActions&&i.bottomActions.forEach(l=>{tl(l)})})}),this.inputDeckData.nativeElement.value=JSON.stringify(e,null,2)}deckDataFromJson(){if(this.deckError="",this.inputDeckData.nativeElement.value)try{return void(this.deckData=JSON.parse(this.inputDeckData.nativeElement.value))}catch(e){this.deckData=new $w.x("",[],""),this.deckData.abilities.push(new KO),this.deckError=e}}valueChange(e){return e&&!isNaN(+e)?+e:e}changeInitiative(e,i){i.initiative=e.target.value?+e.target.value:0,e.target.value=(i.initiative<10?"0":"")+i.initiative,this.deckDataToJson()}changeCardId(e,i){e.target.value?(i.cardId=+e.target.value,e.target.value=(i.cardId<100?"0":"")+(i.cardId<10?"0":"")+i.cardId):i.cardId=void 0,this.deckDataToJson()}addAbility(){this.deckData.abilities.push(new KO),this.deckDataToJson()}removeAbility(e){this.deckData.abilities.splice(this.deckData.abilities.indexOf(e),1),this.deckDataToJson()}addAbilityAction(e){let i=new vt.aU(vt.Us.attack);e.actions||(e.actions=[]),e.actions.push(i),this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.actions.splice(e.actions.indexOf(i),1),this.deckDataToJson()}})}editAbilityAction(e,i){this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.actions.splice(e.actions.indexOf(i),1),this.deckDataToJson()}})}dropAction(e,i){Fn(e,i.previousIndex,i.currentIndex),d.v.uiChange.emit()}addAbilityActionBottom(e){let i=new vt.aU(vt.Us.move);e.bottomActions||(e.bottomActions=[]),e.bottomActions.push(i),this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.bottomActions.splice(e.bottomActions.indexOf(i),1),this.deckDataToJson()}})}editAbilityActionBottom(e,i){this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.bottomActions.splice(e.actions.indexOf(i),1),this.deckDataToJson()}})}divider(e,i){if(i<1)return!1;const s=e[i];return!(!s||(s.type==vt.Us.element||s.type==vt.Us.elementHalf)&&s.valueType!=vt.EF.minus||s.type==vt.Us.card||e[i-1].type==vt.Us.box||s.type==vt.Us.concatenation&&s.subActions.every(l=>l.type==vt.Us.card||l.type==vt.Us.element||l.type==vt.Us.elementHalf))}getCharacter(){if(this.character)return this.character;if(this.deckData.character){const e=new l_.x3;e.iconUrl="./assets/images/warning.svg";for(let i=0;i<9;i++)e.stats.push(new YO.a(i,i));return new oe.z(e,1)}}loadDeckData(e){const i=+e.target.value;-1==i?(this.deckData=new $w.x("",[],""),this.deckData.abilities.push(new KO),this.character&&(this.deckData.character=!0)):this.deckData=this.decksData()[i],this.deckDataToJson(),this.updateQueryParams()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-deck-editor"]],viewQuery:function(e,i){if(1&e&&t.Gf(CW,7),2&e){let s;t.iGM(s=t.CRH())&&(i.inputDeckData=s.first)}},inputs:{character:"character",monster:"monster",edition:"edition",standalone:"standalone"},decls:38,vars:23,consts:[[1,"container"],[3,"standalone",4,"ngIf"],[1,"columns"],[1,"input"],[1,"deck"],[3,"ghs-label"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[4,"ngIf"],["class","abilities-container",4,"ngFor","ngForOf"],[1,"button",3,"click"],["src","./assets/images/plus.svg",1,"ghs-icon"],[1,"output"],[3,"change"],[3,"value"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["inputDeckData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"standalone"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"abilities-container"],[1,"ability-input"],[1,"ability",3,"ngClass"],["card",""],[1,"name",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[1,"level"],["class","text",3,"ngModel","ngModelChange","change",4,"ngIf"],["min","0","max","100","type","number",1,"initiative",3,"value","change"],[1,"shuffle",3,"ngClass","click"],["src","./assets/images/shuffle.svg"],[1,"actions-container"],["cdkDropList","",1,"actions",3,"cdkDropListDropped"],["class","action-container","cdkDrag","",4,"ngFor","ngForOf"],["class","actions-container bottom",4,"ngIf"],["type","number",1,"card-id",3,"value","change"],[1,"remove",3,"click"],["src","./assets/images/minus.svg",1,"ghs-icon"],[1,"buttons",3,"ngClass"],[1,"button","add",3,"click"],[1,"button","add","bottom",3,"click"],[3,"ngClass","ability","abilities","character","monster","relative","flipped","reveal","statsCalculation"],[1,"text",3,"ngModel","ngModelChange","change"],[1,"bottom","shuffle",3,"ngClass","click"],[1,"lost",3,"ngClass","click"],["src","./assets/images/action/card/lost.svg"],["src","./assets/images/action/card/overlay/lost.svg",1,"overlay"],[1,"lost","bottom",3,"ngClass","click"],["cdkDrag","",1,"action-container"],["class","divider",4,"ngIf"],["cdkDragHandle","",1,"handle"],["src","./assets/images/menu.svg",1,"ghs-icon"],[3,"action","relative","click"],[1,"divider"],[1,"actions-container","bottom"],[3,"value","selected"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t.YNc(1,MW,1,1,"ghs-header",1),t.TgZ(2,"div",2)(3,"div",3)(4,"div",4)(5,"h2"),t._UZ(6,"span",5),t.qZA(),t.TgZ(7,"div",6)(8,"label"),t._UZ(9,"span",5),t.qZA(),t.TgZ(10,"input",7),t.NdJ("ngModelChange",function(l){return i.deckData.name=l})("change",function(){return i.deckDataToJson()})("keyup",function(){return i.deckDataToJson()}),t.qZA(),t.TgZ(11,"label"),t._UZ(12,"span",5),t.qZA(),t.TgZ(13,"input",7),t.NdJ("ngModelChange",function(l){return i.deckData.edition=l})("change",function(){return i.deckDataToJson()})("keyup",function(){return i.deckDataToJson()}),t.qZA(),t.YNc(14,OW,4,2,"ng-container",8),t.qZA(),t.YNc(15,SW,27,37,"div",9),t.TgZ(16,"a",10),t.NdJ("click",function(){return i.addAbility()}),t._UZ(17,"img",11)(18,"span",5),t.qZA()()(),t.TgZ(19,"div",12)(20,"h2"),t._UZ(21,"span",5),t.TgZ(22,"select",13),t.NdJ("change",function(l){return i.loadDeckData(l)}),t.TgZ(23,"option",14),t._uU(24,"<"),t._UZ(25,"span",5),t._uU(26,">"),t.qZA(),t.YNc(27,EW,4,4,"option",15),t.qZA(),t.TgZ(28,"select",16),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.updateQueryParams()}),t._UZ(29,"option"),t.YNc(30,DW,2,2,"option",17),t.qZA()(),t.TgZ(31,"div"),t._uU(32),t.qZA(),t._UZ(33,"textarea",null,18),t.TgZ(35,"a",19),t._UZ(36,"img",20)(37,"span",5),t.qZA()()()()),2&e){const s=t.MAs(34);t.xp6(1),t.Q6J("ngIf",i.standalone),t.xp6(5),t.Q6J("ghs-label","editor.deck"),t.xp6(3),t.Q6J("ghs-label","editor.deck.name"),t.xp6(1),t.Q6J("ngModel",i.deckData.name)("ghs-label","editor.deck.name")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.deck.edition"),t.xp6(1),t.Q6J("ngModel",i.deckData.edition)("ghs-label","editor.deck.edition")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",!i.character&&!i.monster),t.xp6(1),t.Q6J("ngForOf",i.deckData.abilities),t.xp6(3),t.Q6J("ghs-label","editor.deck.addAbility"),t.xp6(3),t.Q6J("ghs-label","editor.deck.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.deck.new"),t.xp6(2),t.Q6J("ngForOf",i.decksData()),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.hij(" ",i.deckError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.encodeURIComponent(s.value),t.LSH)("download",i.deckData.name+".json"),t.xp6(2),t.Q6J("ghs-label","editor.deck.json.download")}},dependencies:[x.mk,x.sg,x.O5,wo,ko,Ho,va,Ca,yi,Si,Bs,Ms,Zr,Yr,a_,Gr,ie],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.deck[_ngcontent-%COMP%]{display:flex;flex-direction:column}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-around;align-items:flex-start;margin-top:calc(var(--ghs-unit) * 3);min-width:calc(var(--ghs-unit) * 82)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{display:block;width:calc(var(--ghs-unit) * 40);min-height:calc(var(--ghs-unit) * 25.5)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] ghs-ability.bottom-actions[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 54)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%]{position:relative}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{position:relative;margin-top:calc(var(--ghs-unit) * -2);display:flex;justify-content:space-evenly}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2);color:var(--ghs-color-black);background-color:var(--ghs-color-gray);border-color:var(--ghs-color-darkgray);z-index:2}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:none}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add.bottom[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 1.5);padding:calc(var(--ghs-unit) * .1);margin:calc(var(--ghs-unit) * 2) auto;opacity:.7}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add.bottom[_ngcontent-%COMP%]:hover{opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons.bottom-actions[_ngcontent-%COMP%]{position:absolute;left:-3%;top:49%;z-index:2;flex-direction:column;align-items:flex-start}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons.bottom-actions[_ngcontent-%COMP%] .add[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons.bottom-actions[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2);padding:calc(var(--ghs-unit) * .2);margin:calc(var(--ghs-unit) * .5) 0;opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;text-align:center;background-position:center;background-size:100% auto;background-repeat:no-repeat;border-radius:3.5%;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 25.5);background-image:url(monster-ability-front.6630d6e4791f6c50.png);z-index:1;--ghs-ability-color: var(--ghs-color-red)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * .5);right:calc(var(--ghs-unit) * 1);width:calc(var(--ghs-unit) * 3)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow);width:100%;height:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);position:absolute;font-size:1.7em;top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 26);color:var(--ghs-color-white);background-color:transparent;border:1px solid var(--ghs-color-gray);z-index:2;text-align:center}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);position:absolute;font-size:2.4em;top:calc(var(--ghs-unit) * 4.5);left:calc(var(--ghs-unit) * 2);width:calc(var(--ghs-unit) * 6);color:var(--ghs-color-white);background-color:transparent;border:none;z-index:3}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]:hover{border:none}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;font-family:var(--ghs-font-normal);font-size:1em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));bottom:calc(var(--ghs-unit) * 1);left:calc(var(--ghs-unit) * 2);width:calc(var(--ghs-unit) * 6);color:var(--ghs-color-white);background-color:transparent;border:none;z-index:3}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]:hover{border:none}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * .5);right:calc(var(--ghs-unit) * .5);width:calc(var(--ghs-unit) * 3);height:calc(var(--ghs-unit) * 3);z-index:3;cursor:pointer}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3);height:calc(var(--ghs-unit) * 3);margin:0}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:before{width:calc(var(--ghs-unit) * 3);height:calc(var(--ghs-unit) * 3)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);width:100%;height:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle.enabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 4.5);height:calc(var(--ghs-unit) * 21);width:100%;z-index:1;overflow:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:100%;font-size:calc(1.7em * var(--ghs-fontsize))}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{width:100%;display:inline-flex;cursor:pointer}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:15%;border-top:.11em var(--ghs-color-white) dotted;margin:.2em}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{position:absolute;left:-3%;top:0;z-index:2;cursor:grab;opacity:.7}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]:hover{opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%]{background-image:url(monster-ability-front-bottom.43963667f697d866.png);background-position:top;background-attachment:local;height:calc(var(--ghs-unit) * 54)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions.character-actions[_ngcontent-%COMP%]{background-color:var(--ghs-ability-color);background-image:url(character-ability-front.78d3032ed2ab477f.png),url(character-ability-front-blend.7ab7f92ad3df07cf.png);background-blend-mode:screen,luminosity;overflow-x:unset;overflow-y:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:4.5%;left:calc(var(--ghs-unit) * 7)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{top:49%;left:52.5%;transform:translate(-50%);width:calc(var(--ghs-unit) * 6)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 23);bottom:calc(var(--ghs-unit) * 3.5)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%]{top:17%;left:10.6%;width:78.3%;height:30%;min-height:30%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .actions-container.bottom[_ngcontent-%COMP%]{top:59%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]{position:absolute;bottom:50%;right:15%;height:6%;z-index:3;filter:grayscale(1);opacity:.5}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]:hover{filter:grayscale(0)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.enabled[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.enabled[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.enabled[_ngcontent-%COMP%]{filter:grayscale(0);opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.enabled[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.enabled[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.enabled[_ngcontent-%COMP%]:hover{filter:grayscale(1);opacity:.5}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;top:0;left:0;height:100%;width:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1){filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2){position:absolute}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.bottom[_ngcontent-%COMP%]{right:19%;bottom:9%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.shuffle[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.shuffle[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.shuffle[_ngcontent-%COMP%]{right:27%;height:5.5%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.shuffle.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.shuffle.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.shuffle.bottom[_ngcontent-%COMP%]{right:32%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{position:absolute;top:11%;left:45%;width:10%;height:6%;font-size:1.2em;font-family:ghs-title;display:flex;justify-content:center;align-items:center;background-color:var(--ghs-ability-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-size:115% 170%;-webkit-mask-size:115% 170%;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:60% 66%;-webkit-mask-position:60% 66%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{background:inherit;-webkit-background-clip:text;background-clip:text;color:transparent;filter:invert(1) grayscale(1) contrast(100);font-family:var(--ghs-font-title);text-align:center;font-size:1em}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:hover{border:none!important}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{left:58%}"]})),a})();const IW=["inputCharacterData"];function NW(o,a){if(1&o&&(t.TgZ(0,"option",25),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.Q6J("value",n)("selected",e.characterData.characterClass==n),t.xp6(1),t.Q6J("ghs-label","character.class."+n)}}function JW(o,a){if(1&o&&(t.TgZ(0,"option",19),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n-1),t.xp6(1),t.Q6J("ghs-label","editor.character.data.hp."+(n-1))}}function UW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",28),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit;return t.KtG(s.health=i)}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("ngModel",n.health)}}function LW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",29),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit;return t.KtG(s.health=i)}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("ngModel",n.health)}}function QW(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span"),t._uU(2),t.qZA(),t.YNc(3,UW,1,1,"input",26),t.YNc(4,LW,1,1,"input",27),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Oqu(n.level),t.xp6(1),t.Q6J("ngIf",-1!=e.hpIndex),t.xp6(1),t.Q6J("ngIf",-1==e.hpIndex)}}function RW(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.character."+n.name)}}function FW(o,a){if(1&o&&(t.TgZ(0,"option",25),t.YNc(1,RW,1,1,"span",30),t._uU(2),t._UZ(3,"span",3),t._uU(4),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("value",e)("selected",n.edition==i.characterData.edition&&n.name==i.characterData.name),t.xp6(1),t.Q6J("ngIf",i.isSpoiled(n)),t.xp6(1),t.hij(" ",n.name," ("),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(") [",n.name,"] ")}}function qW(o,a){if(1&o&&(t.TgZ(0,"option",19),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function HW(o,a){if(1&o&&t._UZ(0,"ghs-deck-editor",31),2&o){const n=t.oxw();t.Q6J("character",n.getCharacter())("standalone",!1)("edition",n.edition)}}const jW=function(){return[]};let BW=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"inputCharacterData",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"isSpoiled",he.NB),(0,_.Z)(this,"characterData",void 0),(0,_.Z)(this,"characterError",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"hpIndex",0),(0,_.Z)(this,"CharacterClasses",Object.values(l_.NU)),(0,_.Z)(this,"hpValues",[[6,7,8,9,10,11,12,13,14],[8,9,11,12,14,15,17,18,20],[10,12,14,16,18,20,22,24,26]]),this.route=e,this.router=i,this.characterData=new l_.x3,this.characterData.iconUrl="./assets/images/warning.svg";for(let s=0;s<9;s++)this.characterData.stats.push(new YO.a(s+1,s+6))}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),e.characterDataToJson(),e.inputCharacterData.nativeElement.addEventListener("change",i=>{e.characterDataFromJson()}),e.route.queryParams.subscribe({next:i=>{if(i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition)),i.character){const s=d.v.charactersData(e.edition).find(l=>l.name==i.character);s&&(e.characterData=s,e.characterDataToJson())}!e.characterData.edition&&e.edition&&(e.characterData.edition=e.edition)}}),e.init=!0})()}getCharacter(){return new oe.z(this.characterData,1)}changeHpIndex(){(this.hpIndex<-1||this.hpIndex>2)&&(this.hpIndex=-1),-1!=this.hpIndex&&this.characterData.stats.forEach(e=>{e.health=this.hpValues[this.hpIndex][e.level-1]}),this.characterDataToJson()}characterDataToJson(){this.characterData.stats.sort((i,s)=>i.level-s.level);let e=JSON.parse(JSON.stringify(this.characterData));this.inputCharacterData.nativeElement.value=JSON.stringify(e,null,2)}characterDataFromJson(){if(this.characterError="",this.inputCharacterData.nativeElement.value)try{return void(this.characterData=JSON.parse(this.inputCharacterData.nativeElement.value))}catch(e){this.characterData=new l_.x3,this.characterData.iconUrl="./assets/images/warning.svg";for(let i=0;i<9;i++)this.characterData.stats.push(new YO.a(i,i));this.characterError=e}}loadCharacterData(e){const i=+e.target.value;if(-1!=i)this.characterData=d.v.charactersData(this.edition)[i];else{this.characterData=new l_.x3,this.characterData.iconUrl="./assets/images/warning.svg";for(let s=0;s<9;s++)this.characterData.stats.push(new YO.a(s+1,s+6))}this.hpIndex=-1,this.hpValues.forEach((s,l)=>{s.every((m,O)=>this.characterData.stats.find(k=>k.level==O+1&&k.health==m))&&(this.hpIndex=l)}),this.characterDataToJson(),this.updateQueryParams()}updateQueryParams(){!this.characterData.edition&&this.edition&&(this.characterData.edition=this.edition),this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,character:this.characterData&&this.characterData.name||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-editor"]],viewQuery:function(e,i){if(1&e&&t.Gf(IW,7),2&e){let s;t.iGM(s=t.CRH())&&(i.inputCharacterData=s.first)}},decls:61,vars:44,consts:[[1,"container"],[3,"standalone"],[1,"character-editor"],[3,"ghs-label"],[1,"columns"],[1,"input"],[1,"character-data"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["type","color",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["type","checkbox",3,"ngModel","ngModelChange","change"],[3,"ngModel","ngModelChange","change"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"hp-container"],[3,"value",4,"ngFor","ngForOf"],[1,"hp-grid"],[4,"ngFor","ngForOf"],[1,"output"],[3,"change"],[3,"value"],[3,"ngModel","ngModelChange"],["inputCharacterData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"character","standalone","edition",4,"ngIf"],[3,"value","selected"],["disabled","",3,"ngModel","ngModelChange",4,"ngIf"],["type","number",3,"ngModel","ngModelChange",4,"ngIf"],["disabled","",3,"ngModel","ngModelChange"],["type","number",3,"ngModel","ngModelChange"],[3,"ghs-label",4,"ngIf"],[3,"character","standalone","edition"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"h1"),t._UZ(4,"span",3),t._uU(5," ("),t._UZ(6,"span",3),t._uU(7,")"),t.qZA(),t.TgZ(8,"div",4)(9,"div",5)(10,"div",6)(11,"h2"),t._UZ(12,"span",3),t.qZA(),t.TgZ(13,"div",7)(14,"label"),t._UZ(15,"span",3),t.qZA(),t.TgZ(16,"input",8),t.NdJ("ngModelChange",function(l){return i.characterData.name=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(17,"label"),t._UZ(18,"span",3),t.qZA(),t.TgZ(19,"input",8),t.NdJ("ngModelChange",function(l){return i.characterData.edition=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(20,"label"),t._UZ(21,"span",3),t.qZA(),t.TgZ(22,"input",9),t.NdJ("ngModelChange",function(l){return i.characterData.color=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(23,"label"),t._UZ(24,"span",3),t.qZA(),t.TgZ(25,"input",10),t.NdJ("ngModelChange",function(l){return i.characterData.spoiler=l})("change",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(26,"label"),t._UZ(27,"span",3),t.qZA(),t.TgZ(28,"input",8),t.NdJ("ngModelChange",function(l){return i.characterData.deck=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(29,"label"),t._UZ(30,"span",3),t.qZA(),t.TgZ(31,"select",11),t.NdJ("ngModelChange",function(l){return i.characterData.characterClass=l})("change",function(){return i.characterDataToJson()}),t.YNc(32,NW,2,3,"option",12),t.qZA(),t.TgZ(33,"label"),t._UZ(34,"span",3),t.qZA(),t.TgZ(35,"div",13)(36,"select",11),t.NdJ("ngModelChange",function(l){return i.hpIndex=l})("change",function(){return i.changeHpIndex()}),t.YNc(37,JW,2,2,"option",14),t.ALo(38,"ghsRange"),t.qZA(),t.TgZ(39,"div",15),t.YNc(40,QW,5,3,"ng-container",16),t.qZA()()()()(),t.TgZ(41,"div",17)(42,"h2"),t._UZ(43,"span",3),t.TgZ(44,"select",18),t.NdJ("change",function(l){return i.loadCharacterData(l)}),t.TgZ(45,"option",19),t._uU(46,"<"),t._UZ(47,"span",3),t._uU(48,">"),t.qZA(),t.YNc(49,FW,5,6,"option",12),t.qZA(),t.TgZ(50,"select",20),t.NdJ("ngModelChange",function(l){return i.edition=l}),t._UZ(51,"option"),t.YNc(52,qW,2,2,"option",14),t.qZA()(),t.TgZ(53,"div"),t._uU(54),t.qZA(),t._UZ(55,"textarea",null,21),t.TgZ(57,"a",22),t._UZ(58,"img",23)(59,"span",3),t.qZA()()(),t.YNc(60,HW,1,3,"ghs-deck-editor",24),t.qZA()()),2&e){const s=t.MAs(56);t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","editor.character"),t.xp6(2),t.Q6J("ghs-label","wip"),t.xp6(6),t.Q6J("ghs-label","editor.character.data"),t.xp6(3),t.Q6J("ghs-label","editor.character.data.name"),t.xp6(1),t.Q6J("ngModel",i.characterData.name)("ghs-label","editor.character.data.name")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","edition"),t.xp6(1),t.Q6J("ngModel",i.characterData.edition)("ghs-label","edition")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.color"),t.xp6(1),t.Q6J("ngModel",i.characterData.color)("ghs-label","editor.character.data.color")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.spoiler"),t.xp6(1),t.Q6J("ngModel",i.characterData.spoiler),t.xp6(2),t.Q6J("ghs-label","editor.character.data.deck"),t.xp6(1),t.Q6J("ngModel",i.characterData.deck)("ghs-label","editor.character.data.deck")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.class"),t.xp6(1),t.Q6J("ngModel",i.characterData.characterClass),t.xp6(1),t.Q6J("ngForOf",i.CharacterClasses),t.xp6(2),t.Q6J("ghs-label","editor.character.data.hp"),t.xp6(2),t.Q6J("ngModel",i.hpIndex),t.xp6(1),t.Q6J("ngForOf",t.xi3(38,40,t.DdM(43,jW),4)),t.xp6(3),t.Q6J("ngForOf",i.characterData.stats),t.xp6(3),t.Q6J("ghs-label","editor.character.data.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.character.new"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.charactersData(i.edition)),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.hij(" ",i.characterError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.encodeURIComponent(s.value),t.LSH)("download",i.characterData.name+".json"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.json.download"),t.xp6(1),t.Q6J("ngIf",i.init)}},dependencies:[x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Si,Yr,ie,Xw,Ii],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.character-editor[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 2)}.character-data[_ngcontent-%COMP%]{display:flex;flex-direction:column}.character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%]{max-width:600px;display:grid;grid-auto-flow:column;grid-template-rows:1fr 1fr}.character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center}.character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:transparent;border:1px solid var(--ghs-color-red);color:var(--ghs-color-red);min-width:40px;font-size:1em}"]})),a})();const zW=["inputEditionData"];function GW(o,a){if(1&o&&(t.TgZ(0,"option",21),t._UZ(1,"span",1),t._uU(2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n.edition),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(" [",n.edition,"] ")}}const VW=function(){return["X"]};function YW(o,a){if(1&o&&(t.TgZ(0,"option",21),t._UZ(1,"span",25),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.condition."+n)("ghs-label-args",t.DdM(3,VW))}}function KW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeCharacter(s))}),t._UZ(1,"span",1),t._uU(2),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-label","editor.edition.character.remove")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","data.character."+n.name),t.xp6(1),t.hij(" [",n.name,"]")}}function $W(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeMonster(s))}),t._UZ(1,"span",1),t._uU(2),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-label","editor.edition.monster.remove")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.hij(" [",n.name,"]")}}function WW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeDeck(s))}),t._UZ(1,"span",1),t._uU(2),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-label","editor.edition.decks.remove")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","data.deck."+n.name),t.xp6(1),t.hij(" [",n.name,"]")}}function XW(o,a){if(1&o&&(t.TgZ(0,"option",21),t._UZ(1,"span",1),t._uU(2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",a.index),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(" [",n.edition,"] ")}}let tX=(()=>{var o;class a{constructor(){(0,_.Z)(this,"inputEditionData",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"Conditions",Object.values(re.fT).filter(e=>e!=re.fT.bless&&e!=re.fT.curse)),(0,_.Z)(this,"editionData",void 0),(0,_.Z)(this,"editionError",void 0),this.editionData=new Wu._S("",[],[],[],[],[],[])}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),e.editionDataToJson()})()}editionDataToJson(){let e=JSON.parse(JSON.stringify(this.editionData));Object.keys(e).forEach(i=>{e[i]||(e[i]=void 0)}),this.inputEditionData.nativeElement.value=JSON.stringify(e,null,2)}jsonDownload(){let e=JSON.parse(JSON.stringify(this.editionData));return Object.keys(e).forEach(i=>{e[i]||(e[i]=void 0)}),this.encodeURIComponent(JSON.stringify(e))}loadEditionData(e){const i=+e.target.value;this.editionData=-1!=i?d.v.editionData[i]:new Wu._S("",[],[],[],[],[],[]),this.editionDataToJson()}toggleAllConditions(e){this.editionData.conditions.length==this.Conditions.length?(this.editionData.conditions=[],e.blur()):(this.editionData.conditions=JSON.parse(JSON.stringify(this.Conditions)),e.focus()),this.editionDataToJson()}addCharacterJson(e){if(e.target.files)for(let i=0;i{try{let l=JSON.parse(s.result);return void(l&&(this.editionData.characters.find(m=>l.name==m.name&&l.edition==m.edition)||(this.editionData.characters.push(new l_.x3(l)),this.editionDataToJson())))}catch(l){console.error(l)}},s.readAsText(e.target.files[i])}e.target.value=""}removeCharacter(e){this.editionData.characters.splice(e,1),this.editionDataToJson()}addMonsterJson(e){if(e.target.files)for(let i=0;i{try{const l=JSON.parse(s.result);return void(l&&(this.editionData.monsters.find(m=>l.name==m.name&&l.edition==m.edition)||(this.editionData.monsters.push(new ot.A(l)),this.editionDataToJson())))}catch(l){console.error(l)}},s.readAsText(e.target.files[i])}e.target.value=""}removeMonster(e){this.editionData.monsters.splice(e,1),this.editionDataToJson()}addDeckJson(e){if(e.target.files)for(let i=0;i{try{const l=JSON.parse(s.result);return void(l&&(this.editionData.decks.find(m=>l.name==m.name&&l.edition==m.edition)||(this.editionData.decks.push(l),this.editionDataToJson())))}catch(l){console.error(l)}},s.readAsText(e.target.files[i])}e.target.value=""}removeDeck(e){this.editionData.decks.splice(e,1),this.editionDataToJson()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-edition-editor"]],viewQuery:function(e,i){if(1&e&&t.Gf(zW,7),2&e){let s;t.iGM(s=t.CRH())&&(i.inputEditionData=s.first)}},decls:63,vars:30,consts:[[1,"back",3,"routerLink"],[3,"ghs-label"],[1,"edition-editor"],[1,"columns"],[1,"input"],[1,"edition-base"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["multiple","",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[1,"conditions"],[3,"click"],["conditionSelect",""],[1,"files"],[1,"file-list","characters"],["class","file",3,"ghs-label","ghs-label-attribute","click",4,"ngFor","ngForOf"],["type","file","multiple","","accept","application/json",3,"change"],[1,"file-list","monsters"],[1,"file-list","decks"],[1,"output"],[3,"change"],[3,"value"],["inputEditionData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"ghs-label","ghs-label-args"],[1,"file",3,"ghs-label","ghs-label-attribute","click"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"a",0),t._UZ(1,"span",1),t.qZA(),t.TgZ(2,"div",2)(3,"h1"),t._UZ(4,"span",1),t._uU(5," ("),t._UZ(6,"span",1),t._uU(7,")"),t.qZA(),t.TgZ(8,"div",3)(9,"div",4)(10,"div",5)(11,"h2"),t._UZ(12,"span",1),t.qZA(),t.TgZ(13,"div",6)(14,"label"),t._UZ(15,"span",1),t.qZA(),t.TgZ(16,"input",7),t.NdJ("ngModelChange",function(m){return i.editionData.edition=m})("change",function(){return i.editionDataToJson()})("keyup",function(){return i.editionDataToJson()}),t.qZA(),t.TgZ(17,"label"),t._UZ(18,"span",1),t.qZA(),t.TgZ(19,"select",8),t.NdJ("ngModelChange",function(m){return i.editionData.extensions=m})("change",function(){return i.editionDataToJson()}),t.YNc(20,GW,3,3,"option",9),t.qZA(),t.TgZ(21,"label"),t._UZ(22,"span",1),t.qZA(),t.TgZ(23,"div",10)(24,"a",11),t.NdJ("click",function(){t.CHM(s);const m=t.MAs(27);return t.KtG(i.toggleAllConditions(m))}),t._UZ(25,"span",1),t.qZA(),t.TgZ(26,"select",8,12),t.NdJ("ngModelChange",function(m){return i.editionData.conditions=m})("change",function(){return i.editionDataToJson()}),t.YNc(28,YW,2,4,"option",9),t.qZA()()()(),t.TgZ(29,"div",13)(30,"h2"),t._UZ(31,"span",1),t.qZA(),t.TgZ(32,"div",14),t.YNc(33,KW,3,4,"span",15),t.qZA(),t.TgZ(34,"input",16),t.NdJ("change",function(m){return i.addCharacterJson(m)}),t.qZA()(),t.TgZ(35,"div",13)(36,"h2"),t._UZ(37,"span",1),t.qZA(),t.TgZ(38,"div",17),t.YNc(39,$W,3,4,"span",15),t.qZA(),t.TgZ(40,"input",16),t.NdJ("change",function(m){return i.addMonsterJson(m)}),t.qZA()(),t.TgZ(41,"div",13)(42,"h2"),t._UZ(43,"span",1),t.qZA(),t.TgZ(44,"div",18),t.YNc(45,WW,3,4,"span",15),t.qZA(),t.TgZ(46,"input",16),t.NdJ("change",function(m){return i.addDeckJson(m)}),t.qZA()()(),t.TgZ(47,"div",19)(48,"h2"),t._UZ(49,"span",1),t.TgZ(50,"select",20),t.NdJ("change",function(m){return i.loadEditionData(m)}),t.TgZ(51,"option",21),t._uU(52,"<"),t._UZ(53,"span",1),t._uU(54,">"),t.qZA(),t.YNc(55,XW,3,3,"option",9),t.qZA()(),t.TgZ(56,"div"),t._uU(57),t.qZA(),t._UZ(58,"textarea",null,22),t.TgZ(60,"a",23),t._UZ(61,"img",24)(62,"span",1),t.qZA()()()()}2&e&&(t.Q6J("routerLink","/"),t.xp6(1),t.Q6J("ghs-label","tools.backToGhs"),t.xp6(3),t.Q6J("ghs-label","editor.edition"),t.xp6(2),t.Q6J("ghs-label","wip"),t.xp6(6),t.Q6J("ghs-label","editor.edition.base"),t.xp6(3),t.Q6J("ghs-label","editor.edition.edition"),t.xp6(1),t.Q6J("ngModel",i.editionData.edition)("ghs-label","editor.edition.edition")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.edition.extensions"),t.xp6(1),t.Q6J("ngModel",i.editionData.extensions),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editionData),t.xp6(2),t.Q6J("ghs-label","editor.edition.conditions"),t.xp6(3),t.Q6J("ghs-label",i.editionData.conditions.length!=i.Conditions.length?"editor.edition.conditions.allSelected":"editor.edition.conditions.allHint"),t.xp6(1),t.Q6J("ngModel",i.editionData.conditions),t.xp6(2),t.Q6J("ngForOf",i.Conditions),t.xp6(3),t.Q6J("ghs-label","editor.edition.character"),t.xp6(2),t.Q6J("ngForOf",i.editionData.characters),t.xp6(4),t.Q6J("ghs-label","editor.edition.monster"),t.xp6(2),t.Q6J("ngForOf",i.editionData.monsters),t.xp6(4),t.Q6J("ghs-label","editor.edition.decks"),t.xp6(2),t.Q6J("ngForOf",i.editionData.decks),t.xp6(4),t.Q6J("ghs-label","editor.edition.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.edition.new"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editionData),t.xp6(2),t.hij(" ",i.editionError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.jsonDownload(),t.LSH)("download",i.editionData.edition+".json"),t.xp6(2),t.Q6J("ghs-label","editor.edition.json.download"))},dependencies:[x.sg,Vc,wo,ko,Ho,Sl,yi,Si,ie],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".files[_ngcontent-%COMP%] .file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.files[_ngcontent-%COMP%] .file-list[_ngcontent-%COMP%] .file[_ngcontent-%COMP%]{font-size:1.5em;cursor:pointer}.files[_ngcontent-%COMP%] .file-list[_ngcontent-%COMP%] .file[_ngcontent-%COMP%]:hover{text-decoration:line-through}.conditions[_ngcontent-%COMP%]{display:flex;flex-direction:column}.conditions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:.7em}"]})),a})();const eX=["inputMonsterData"],nX=["monsterStats"],iX=["deckEditor"],VT=function(o){return{current:o}};function oX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return l.level=s,t.KtG(l.updateQueryParams())}),t._uU(1),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(2,VT,e.level==n)),t.xp6(1),t.hij(" ",n,"")}}function aX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",36)(1,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).health=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(2,"input",38),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).health=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(3,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).movement=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(4,"input",40),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).movement=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(5,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).attack=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(6,"input",38),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).attack=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(7,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).range=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(8,"input",40),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).range=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA()()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).health),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).health),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).movement),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).movement),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).attack),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).attack),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).range),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).range)}}function sX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",41)(1,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).health=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(2,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).movement=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(3,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).attack=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(4,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).range=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA()()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).health),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).movement),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).attack),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).range)}}function rX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"span",50),t._UZ(2,"img",51),t.qZA(),t.TgZ(3,"ghs-action",52),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.editMonsterAction(m.MonsterType.normal,s,l))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(3),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("right",!0)("hexSize",.5)("relative",!0)}}function cX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"ghs-action",53),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.editMonsterAction(m.MonsterType.elite,s,l))}),t.qZA(),t.TgZ(2,"span",50),t._UZ(3,"img",51),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(1),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("hexSize",.5)("relative",!0)}}function lX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",42),t._UZ(2,"div",43),t.TgZ(3,"div",44),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.dropMonsterAction(l.MonsterType.normal,s,i))}),t.YNc(4,rX,4,6,"div",45),t.TgZ(5,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addMonsterAction(s.MonsterType.normal,i))}),t._UZ(6,"img",47)(7,"span",3),t.qZA()()(),t.TgZ(8,"div",48),t._UZ(9,"div",43),t.TgZ(10,"div",44),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.dropMonsterAction(l.MonsterType.elite,s,i))}),t.YNc(11,cX,4,5,"div",45),t.TgZ(12,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addMonsterAction(s.MonsterType.elite,i))}),t._UZ(13,"img",47)(14,"span",3),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label",e.statsForType(e.MonsterType.normal,n).note),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.normal,n).actions),t.xp6(3),t.Q6J("ghs-label","editor.action.add"),t.xp6(2),t.Q6J("ghs-label",e.statsForType(e.MonsterType.elite,n).note),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.elite,n).actions),t.xp6(3),t.Q6J("ghs-label","editor.action.add")}}function gX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"ghs-action",53),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.editMonsterAction(m.MonsterType.boss,s,l))}),t.qZA(),t.TgZ(2,"span",50),t._UZ(3,"img",51),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(1),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("hexSize",.5)("relative",!0)}}function dX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"ghs-action",53),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw().index,m=t.oxw(3).$implicit,O=t.oxw();return t.KtG(O.editSpecialAction(O.MonsterType.boss,l,s,m))}),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(4).$implicit,i=t.oxw();t.xp6(1),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("hexSize",.5)("relative",!0)}}function hX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57)(1,"span",58),t._uU(2),t.qZA(),t.TgZ(3,"div",59),t.YNc(4,dX,2,5,"ng-container",60),t.TgZ(5,"a",46),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.addSpecialAction(m.MonsterType.boss,s,l))}),t._UZ(6,"img",47)(7,"span",3),t.qZA()()()}if(2&o){const n=a.index,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(2),t.hij("",n+1,":"),t.xp6(2),t.Q6J("ngForOf",i.statsForType(i.MonsterType.boss,e).special[n]),t.xp6(3),t.Q6J("ghs-label","editor.action.add")}}function uX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",54),t._UZ(2,"div",43),t.TgZ(3,"div",44),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.dropMonsterAction(l.MonsterType.boss,s,i))}),t.YNc(4,gX,4,5,"div",45),t.TgZ(5,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addMonsterAction(s.MonsterType.boss,i))}),t._UZ(6,"img",47)(7,"span",3),t.qZA()(),t.TgZ(8,"div",55),t.YNc(9,hX,8,3,"div",56),t.TgZ(10,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addSpecialAction(s.MonsterType.boss,s.statsForType(s.MonsterType.boss,i).special.length,i))}),t._UZ(11,"img",47)(12,"span",3),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label",e.statsForType(e.MonsterType.boss,n).note),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.boss,n).actions),t.xp6(3),t.Q6J("ghs-label","editor.action.add"),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.boss,n).special),t.xp6(3),t.Q6J("ghs-label","editor.monster.stats.addSpecial")}}function _X(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",30),t._UZ(1,"ghs-monster-stats",31),t.TgZ(2,"input",32),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.monsterData.name=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.YNc(3,aX,9,8,"div",33),t.YNc(4,sX,5,4,"div",34),t.YNc(5,lX,15,6,"ng-container",35),t.YNc(6,uX,13,5,"ng-container",35),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("monster",e.getMonsterForLevel(n))("noClick",!0),t.xp6(1),t.Q6J("ngModel",e.monsterData.name),t.xp6(1),t.Q6J("ngIf",!e.monsterData.boss),t.xp6(1),t.Q6J("ngIf",e.monsterData.boss),t.xp6(1),t.Q6J("ngIf",!e.monsterData.boss),t.xp6(1),t.Q6J("ngIf",e.monsterData.boss)}}function pX(o,a){if(1&o&&(t.TgZ(0,"div",27),t.YNc(1,_X,7,7,"div",28),t._UZ(2,"ghs-monster-stats",29),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",-1!=n),t.xp6(1),t.Q6J("monster",e.getMonsterForLevel(n))("forceStats",!0)("relative",!0)("noClick",!0)}}function fX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",61),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.applyToAllLevel(i.level))}),t._UZ(1,"span",3),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","editor.monster.stats.applyAll"))}function mX(o,a){if(1&o&&(t.TgZ(0,"option",62),t._UZ(1,"span",3),t._uU(2," ("),t._UZ(3,"span",3),t._uU(4),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("value",e)("selected",n.edition==i.monsterData.edition&&n.name==i.monsterData.name),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(") [",n.name,"] ")}}function vX(o,a){if(1&o&&(t.TgZ(0,"option",19),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function CX(o,a){if(1&o&&t._UZ(0,"ghs-deck-editor",63,64),2&o){const n=t.oxw();t.Q6J("monster",n.getMonsterForLevel(n.level))("standalone",!1)("edition",n.edition)}}const YT=function(){return[]},MX=function(o){return[o]},t2='{"name": "new-monster", "thumbnail" : "", "edition": "", "deck": "", "boss": false, "flying" : false, "hidden":false, "count": 10, "baseStat" : {}, "stats": []}';let OX=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"inputMonsterData",void 0),(0,_.Z)(this,"monsterStats",void 0),(0,_.Z)(this,"deckEditor",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"monsterData",void 0),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),(0,_.Z)(this,"level",-1),(0,_.Z)(this,"monsterError",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"init",!1),this.dialog=e,this.route=i,this.router=s,this.monsterData=JSON.parse(t2),this.updateType(!1)}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),e.monsterDataToJson(),e.inputMonsterData.nativeElement.addEventListener("change",i=>{e.monsterDataFromJson()}),e.route.queryParams.subscribe({next:i=>{if(i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition)),i.monster){const s=d.v.monstersData(e.edition).find(l=>l.name==i.monster);s&&(e.monsterData=s,e.monsterDataToJson())}i.level&&(e.level=+i.level,-1!=e.level&&-1==e.levels.indexOf(e.level)&&(e.level=1)),!e.monsterData.edition&&e.edition&&(e.monsterData.edition=e.edition)}}),e.init=!0})()}monsterDataToJson(){this.monsterData.stats.sort((i,s)=>i.level-s.level!=0?i.level-s.level:i.type==ee.M.normal&&s.type==ee.M.elite?-1:1);let e=JSON.parse(JSON.stringify(this.monsterData));if(e.baseStat.actions=e.baseStat.actions||void 0,e.baseStat.immunities=e.baseStat.immunities||void 0,e.baseStat.special=e.baseStat.special||void 0,Object.keys(e.stats[0]).forEach(i=>{e.stats.every(s=>JSON.stringify(s[i])==JSON.stringify(e.stats[0][i]))&&(e.baseStat[i]=e.stats[0][i],e.stats.forEach(s=>{s[i]=void 0}))}),!e.boss){e.baseStat.type="normal",e.stats.filter(m=>"normal"==m.type).forEach(m=>{m.type=void 0});let i=[];const s=e.stats.filter(m=>!m.type)[0];s&&Object.keys(s).forEach(m=>{s[m]&&e.stats.filter(O=>!O.type).every(O=>JSON.stringify(O[m])==JSON.stringify(s[m]))&&"type"!=m&&(e.baseStat[m]=s[m],i.push(m),e.stats.filter(O=>!O.type).forEach(O=>{O[m]=void 0}))});const l=e.stats.filter(m=>"elite"==m.type)[0];l&&Object.keys(l).forEach(m=>{l[m]&&e.stats.filter(O=>"elite"==O.type).every(O=>JSON.stringify(O[m])==JSON.stringify(l[m]))&&-1==i.indexOf(m)&&"type"!=m&&(e.baseStat[m]=l[m],e.stats.filter(O=>"elite"==O.type).forEach(O=>{O[m]=void 0}))})}Object.keys(e).forEach(i=>{e[i]||(e[i]=void 0)}),e.stats.forEach(i=>{Object.keys(i).forEach(s=>{!i[s]&&"level"!=s&&(i[s]=void 0)}),i.immunities&&0==i.immunities.length&&(i.immunities=void 0),i.actions&&0==i.actions.length?i.actions=void 0:i.actions&&i.actions.forEach(s=>tl(s)),i.special&&0==i.special.length?i.special=void 0:i.special&&i.special.forEach(s=>{s.forEach(l=>tl(l))})}),Object.keys(e.baseStat).forEach(i=>{e.baseStat[i]||(e.baseStat[i]=void 0)}),e.baseStat.actions&&0==e.baseStat.actions.length?e.baseStat.actions=void 0:e.baseStat.actions&&e.baseStat.actions.forEach(i=>tl(i)),e.baseStat.special&&e.baseStat.special.forEach(i=>{i.forEach(s=>tl(s))}),this.inputMonsterData.nativeElement.value=JSON.stringify(e,null,2)}monsterDataFromJson(){if(this.monsterError="",this.inputMonsterData.nativeElement.value)try{return this.monsterData=JSON.parse(this.inputMonsterData.nativeElement.value),void(this.monsterData&&this.updateType(!1))}catch(e){this.monsterData=JSON.parse(t2),this.monsterError=e}}valueChange(e){return e&&!isNaN(+e)?+e:e}statsForType(e,i){let s=this.monsterData.stats.find(l=>this.monsterData&&l.level==i&&l.type==e);return s||(this.monsterData.errors=this.monsterData.errors||[],!this.monsterData.errors.find(l=>l.type==ug.r.unknown)&&!this.monsterData.errors.find(l=>l.type==ug.r.stat)&&(console.error("Could not find '"+e+"' stats for monster: "+this.monsterData.name+" level: "+i),this.monsterData.errors.push(new ug.o(ug.r.stat,"monster",this.monsterData.name,this.monsterData.edition,e,""+i))),s=new zr.c(e,i,0,0,0,0),this.monsterData.stats.push(s)),s}setLevel(e){this.monsterStats.setLevel(e)}getMonsterForLevel(e){let i=new Ze.Q(this.monsterData);return i.level=-1!=e?e:1,i}applyToAllLevel(e){this.monsterData.stats=this.monsterData.stats.filter(i=>i.level==e);for(let i of this.levels)if(i!=e)if(this.monsterData.boss){let s=JSON.parse(JSON.stringify(this.statsForType(ee.M.boss,e)));s.level=i,this.monsterData.stats.push(s)}else{let s=JSON.parse(JSON.stringify(this.statsForType(ee.M.normal,e)));s.level=i,this.monsterData.stats.push(s),s=JSON.parse(JSON.stringify(this.statsForType(ee.M.elite,e))),s.level=i,this.monsterData.stats.push(s)}this.monsterDataToJson()}updateType(e=!0){if(this.monsterData)if(this.monsterData.boss){this.monsterData.stats=this.monsterData.stats.filter(i=>!i.type||i.type==ee.M.boss);for(let i of this.levels)this.monsterData.stats.some(s=>s.level==i)||this.monsterData.stats.push(new zr.c(ee.M.boss,i,0,0,0,0))}else{this.monsterData.stats=this.monsterData.stats.filter(i=>i.type!=ee.M.boss);for(let i of this.levels)this.monsterData.stats.some(s=>s.level==i&&(!s.type||s.type==ee.M.normal))||this.monsterData.stats.push(new zr.c(ee.M.normal,i,0,0,0,0)),this.monsterData.stats.some(s=>s.level==i&&s.type==ee.M.elite)||this.monsterData.stats.push(new zr.c(ee.M.elite,i,0,0,0,0))}e&&this.monsterDataToJson()}toggleBoss(){this.monsterData.count=this.monsterData.boss?1:10,this.updateType()}addMonsterAction(e,i){let s=new vt.aU(vt.Us.attack);const l=this.statsForType(e,i);l.actions.push(s),this.dialog.open(Kr,{panelClass:"dialog",data:{action:s,monster:this.getMonsterForLevel(i)}}).closed.subscribe({next:O=>{0==O&&l.actions.splice(l.actions.indexOf(s),1),this.monsterDataToJson()}})}editMonsterAction(e,i,s){this.dialog.open(Kr,{panelClass:"dialog",data:{action:i,monster:this.getMonsterForLevel(s)}}).closed.subscribe({next:m=>{if(0==m){const O=this.statsForType(e,s);O.actions.splice(O.actions.indexOf(i),1)}this.monsterDataToJson()}})}dropMonsterAction(e,i,s){Fn(this.statsForType(e,i).actions,s.previousIndex,s.currentIndex),d.v.uiChange.emit(),this.monsterDataToJson()}addSpecialAction(e,i,s){let l=new vt.aU(vt.Us.attack);const m=this.statsForType(e,s);m.special||(m.special=[]),m.special.length<=i&&(m.special[i]=[]),m.special[i].push(l),this.dialog.open(Kr,{panelClass:"dialog",data:{action:l,monster:this.getMonsterForLevel(s)}}).closed.subscribe({next:k=>{0==k&&(m.special[i].splice(m.special[i].indexOf(l),1),0==m.special[i].length&&m.special.splice(i,1)),this.monsterDataToJson()}})}editSpecialAction(e,i,s,l){this.dialog.open(Kr,{panelClass:"dialog",data:{action:s,monster:this.getMonsterForLevel(l)}}).closed.subscribe({next:O=>{if(0==O){const k=this.statsForType(e,l);k.special||(k.special=[]),k.special.length<=i&&(k.special[i]=[]),k.special[i].splice(k.special[i].indexOf(s),1),0==k.special[i].length&&k.special.splice(i,1)}this.monsterDataToJson()}})}loadMonsterData(e){const i=+e.target.value;this.monsterData=-1!=i?d.v.monstersData(this.edition)[i]:JSON.parse(t2),this.updateType(),this.monsterDataToJson(),this.updateQueryParams()}updateQueryParams(){!this.monsterData.edition&&this.edition&&(this.monsterData.edition=this.edition),this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,monster:this.monsterData&&this.monsterData.name||void 0,level:1!=this.level?this.level:void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-editor"]],viewQuery:function(e,i){if(1&e&&(t.Gf(eX,7),t.Gf(nX,5),t.Gf(iX,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.inputMonsterData=s.first),t.iGM(s=t.CRH())&&(i.monsterStats=s.first),t.iGM(s=t.CRH())&&(i.deckEditor=s.first)}},decls:63,vars:51,consts:[[1,"container"],[3,"standalone"],[1,"monster-editor"],[3,"ghs-label"],[1,"columns"],[1,"input"],[1,"monster-stats"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["type","checkbox",3,"ngModel","ngModelChange","change"],["type","number","min","1","max","10",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[1,"level-select"],[1,"select"],["class","level",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"level",3,"ngClass","click"],["class","stats-container",4,"ngFor","ngForOf"],["class","button",3,"click",4,"ngIf"],[1,"output"],[3,"change"],[3,"value"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["inputMonsterData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"monster","standalone","edition",4,"ngIf"],[1,"stats-container"],["class","stats-input",4,"ngIf"],[1,"stats-preview",3,"monster","forceStats","relative","noClick"],[1,"stats-input"],[1,"stats-editor",3,"monster","noClick"],[1,"name",3,"ngModel","ngModelChange","change","keyup"],["class","stats",4,"ngIf"],["class","stats boss",4,"ngIf"],[4,"ngIf"],[1,"stats"],[1,"stat","end",3,"ngModel","ngModelChange","change","keyup"],[1,"stat","start",3,"ngModel","ngModelChange","change","keyup"],["type","number",1,"stat","end",3,"ngModel","ngModelChange","change","keyup"],["type","number",1,"stat","start",3,"ngModel","ngModelChange","change","keyup"],[1,"stats","boss"],[1,"extra","normal"],[1,"notes",3,"ghs-label"],["cdkDropList","",1,"additional",3,"cdkDropListDropped"],["class","monster-action","cdkDrag","",4,"ngFor","ngForOf"],[3,"click"],["src","./assets/images/plus.svg",1,"ghs-icon"],[1,"extra","elite"],["cdkDrag","",1,"monster-action"],["cdkDragHandle","",1,"handle"],["src","./assets/images/menu.svg",1,"ghs-icon"],[3,"action","monster","inline","right","hexSize","relative","click"],[3,"action","monster","inline","hexSize","relative","click"],[1,"extra","boss"],[1,"specials"],["class","special",4,"ngFor","ngForOf"],[1,"special"],[1,"index"],[1,"actions"],[4,"ngFor","ngForOf"],[1,"button",3,"click"],[3,"value","selected"],[3,"monster","standalone","edition"],["deckEditor",""]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"h1"),t._UZ(4,"span",3),t._uU(5," ("),t._UZ(6,"span",3),t._uU(7,")"),t.qZA(),t.TgZ(8,"div",4)(9,"div",5)(10,"div",6)(11,"h2"),t._UZ(12,"span",3),t.qZA(),t.TgZ(13,"div",7)(14,"label"),t._UZ(15,"span",3),t.qZA(),t.TgZ(16,"input",8),t.NdJ("ngModelChange",function(l){return i.monsterData.edition=l})("change",function(){return i.monsterDataToJson()})("keyup",function(){return i.monsterDataToJson()}),t.qZA(),t.TgZ(17,"label"),t._UZ(18,"span",3),t.qZA(),t.TgZ(19,"input",8),t.NdJ("ngModelChange",function(l){return i.monsterData.deck=l})("change",function(){return i.monsterDataToJson()})("keyup",function(){return i.monsterDataToJson()}),t.qZA(),t.TgZ(20,"label"),t._UZ(21,"span",3),t.qZA(),t.TgZ(22,"input",9),t.NdJ("ngModelChange",function(l){return i.monsterData.boss=l})("change",function(){return i.toggleBoss()}),t.qZA(),t.TgZ(23,"label"),t._UZ(24,"span",3),t.qZA(),t.TgZ(25,"input",9),t.NdJ("ngModelChange",function(l){return i.monsterData.flying=l})("change",function(){return i.updateType()}),t.qZA(),t.TgZ(26,"label"),t._UZ(27,"span",3),t.qZA(),t.TgZ(28,"input",9),t.NdJ("ngModelChange",function(l){return i.monsterData.hidden=l})("change",function(){return i.updateType()}),t.qZA(),t.TgZ(29,"label"),t._UZ(30,"span",3),t.qZA(),t.TgZ(31,"input",10),t.NdJ("ngModelChange",function(l){return i.monsterData.count=l})("change",function(){return i.monsterDataToJson()})("keyup",function(){return i.monsterDataToJson()}),t.qZA()(),t.TgZ(32,"div",11)(33,"span",12),t._UZ(34,"span",3),t._uU(35,":"),t.qZA(),t.YNc(36,oX,2,4,"div",13),t.ALo(37,"ghsRange"),t.TgZ(38,"div",14),t.NdJ("click",function(){return i.level=-1,i.updateQueryParams()}),t._UZ(39,"span",3),t.qZA()(),t.YNc(40,pX,3,5,"div",15),t.ALo(41,"ghsRange"),t.YNc(42,fX,2,1,"a",16),t.qZA()(),t.TgZ(43,"div",17)(44,"h2"),t._UZ(45,"span",3),t.TgZ(46,"select",18),t.NdJ("change",function(l){return i.loadMonsterData(l)}),t.TgZ(47,"option",19),t._uU(48,"<"),t._UZ(49,"span",3),t._uU(50,">"),t.qZA(),t.YNc(51,mX,5,5,"option",20),t.qZA(),t.TgZ(52,"select",21),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.updateQueryParams()}),t._UZ(53,"option"),t.YNc(54,vX,2,2,"option",22),t.qZA()(),t.TgZ(55,"div"),t._uU(56),t.qZA(),t._UZ(57,"textarea",null,23),t.TgZ(59,"a",24),t._UZ(60,"img",25)(61,"span",3),t.qZA()()(),t.YNc(62,CX,2,3,"ghs-deck-editor",26),t.qZA()()),2&e){const s=t.MAs(58);t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","editor.monster"),t.xp6(2),t.Q6J("ghs-label","wip"),t.xp6(6),t.Q6J("ghs-label","editor.monster.stats"),t.xp6(3),t.Q6J("ghs-label","edition"),t.xp6(1),t.Q6J("ngModel",i.monsterData.edition)("ghs-label","edition")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.deck"),t.xp6(1),t.Q6J("ngModel",i.monsterData.deck)("ghs-label","editor.monster.stats.deck")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.boss"),t.xp6(1),t.Q6J("ngModel",i.monsterData.boss),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.flying"),t.xp6(1),t.Q6J("ngModel",i.monsterData.flying),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.hidden"),t.xp6(1),t.Q6J("ngModel",i.monsterData.hidden),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.count"),t.xp6(1),t.Q6J("ngModel",i.monsterData.count)("ghs-label","editor.monster.count")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","editor.monster.stats.levelSelect"),t.xp6(2),t.Q6J("ngForOf",t.xi3(37,39,t.DdM(45,YT),8)),t.xp6(2),t.Q6J("ngClass",t.VKq(46,VT,-1==i.level)),t.xp6(1),t.Q6J("ghs-label","editor.monster.stats.allLevel"),t.xp6(1),t.Q6J("ngForOf",-1==i.level?t.xi3(41,42,t.DdM(48,YT),8):t.VKq(49,MX,i.level)),t.xp6(2),t.Q6J("ngIf",-1!=i.level),t.xp6(3),t.Q6J("ghs-label","editor.monster.stats.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.monster.new"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.monstersData(i.edition)),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.hij(" ",i.monsterError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.encodeURIComponent(s.value),t.LSH)("download",i.monsterData.name+".json"),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.json.download"),t.xp6(1),t.Q6J("ngIf",i.init)}},dependencies:[x.mk,x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Jc,id,Si,Bs,Ms,Zr,Yr,T,Gr,ie,Xw,Ii],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.monster-editor[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 2)}.monster-stats[_ngcontent-%COMP%]{display:flex;flex-direction:column}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%]{display:flex;grid-gap:calc(var(--ghs-unit) * 2);margin:0 auto;margin-top:calc(var(--ghs-unit) * 3)}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{font-family:ghs-title;font-size:calc(var(--ghs-unit) * 3);text-shadow:var(--ghs-outline);color:var(--ghs-color-gray);cursor:pointer}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%] .level.current[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%] .select[_ngcontent-%COMP%]{pointer-events:none;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-black)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-around;align-items:center;margin-top:calc(var(--ghs-unit) * 3);min-width:calc(var(--ghs-unit) * 82)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 21.5)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 21.5)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 6.2);left:calc(var(--ghs-unit) * 15);width:calc(var(--ghs-unit) * 9.5);display:grid;grid-template-columns:1fr 1fr;column-gap:calc(var(--ghs-unit) * 2);filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));z-index:1}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize));padding:0;width:calc(var(--ghs-unit) * 4 * var(--ghs-fontsize));min-width:auto;color:var(--ghs-color-black);background-color:var(--ghs-color-white);height:calc(var(--ghs-unit) * 2.9 * var(--ghs-fontsize));border:none;margin:calc(var(--ghs-unit) * .2 * var(--ghs-fontsize)) 0}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.end[_ngcontent-%COMP%]{justify-self:end}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.start[_ngcontent-%COMP%]{justify-self:start;text-align:left}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats.boss[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.5);left:calc(var(--ghs-unit) * 4.5);grid-template-columns:1fr}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats.boss[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 6 * var(--ghs-fontsize))}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 6.5);width:calc(var(--ghs-unit) * 14);height:calc(100% - var(--ghs-unit) * 6.5);overflow-y:auto;display:flex;flex-direction:column;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-fontsize))}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .monster-action[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .monster-action[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{cursor:grab}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{cursor:pointer}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]:hover{opacity:.7}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 25.5);text-align:right}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{justify-content:end}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--ghs-color-black);justify-content:flex-end}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]{filter:none}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.elite[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * .5);color:var(--ghs-color-white)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.boss[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 21);right:calc(var(--ghs-unit) * .5);color:var(--ghs-color-white)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%]{display:flex;align-items:baseline}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;flex-direction:column}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]:first-child{margin-top:calc(var(--ghs-unit) * .5)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .2)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);position:absolute;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 26);color:var(--ghs-color-white);background-color:transparent;border:1px solid var(--ghs-color-gray)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}"]})),a})();const PX=function(o){return{vertical:o}};let yX=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v)}ngOnInit(){return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),d.v.game.figures.forEach(e=>e.active=!1),d.v.uiChange.emit(),d.v.game.state!=ge.D2.next&&d.v.roundManager.nextGameState(!0)})()}vertical(){return window.innerWidth<800}beforeMonsterAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"monster",...e.values)}afterMonsterAttackModifierDeck(e){d.v.game.monsterAttackModifierDeck=e.deck,d.v.stateManager.after()}next(){d.v.stateManager.before("draw"),d.v.game.state==ge.D2.next&&d.v.roundManager.nextGameState(!0),d.v.roundManager.nextGameState(!0),d.v.game.figures.forEach(e=>e.active=!1),d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-standalone"]],decls:5,vars:9,consts:[["ghs-keyboard-shortcuts","",1,"attackmodifier-standalone",3,"ngClass"],[3,"standalone"],["numeration","m",3,"deck","standalone","fullscreen","vertical","before","after"],[1,"next",3,"click"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"ghs-attackmodifier-deck",2),t.NdJ("before",function(l){return i.beforeMonsterAttackModifierDeck(l)})("after",function(l){return i.afterMonsterAttackModifierDeck(l)}),t.qZA(),t.TgZ(3,"a",3),t.NdJ("click",function(){return i.next()}),t._UZ(4,"span",4),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(7,PX,i.vertical())),t.xp6(1),t.Q6J("standalone",!0),t.xp6(1),t.Q6J("deck",i.gameManager.game.monsterAttackModifierDeck)("standalone",!0)("fullscreen",!1)("vertical",i.vertical()),t.xp6(2),t.Q6J("ghs-label","game.round.next"))},dependencies:[x.mk,Yr,Kf,ie,Kw],styles:[".attackmodifier-standalone[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100vw;height:100vh}.attackmodifier-standalone[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.attackmodifier-standalone[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:800px;height:25.5vw;max-height:213px;z-index:1;margin-top:2em;margin-left:1%}.attackmodifier-standalone[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);font-size:3em;margin:1em}.attackmodifier-standalone.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden}.attackmodifier-standalone.vertical[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:calc(100% - var(--ghs-unit) * 10 * var(--ghs-text-factor));max-height:initial;transform:none}"]})),a})();const bX=function(o){return{vertical:o}};let xX=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"configuration",!1)}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),d.v.uiChange.emit(),d.v.game.state!=ge.D2.next&&d.v.roundManager.nextGameState(!0),0==d.v.game.lootDeck.cards.length&&(e.configuration=!0)})()}vertical(){return window.innerWidth<800}beforeLootDeck(e){d.v.stateManager.before(e.type,...e.values)}afterLootDeck(e){d.v.game.lootDeck=e.deck,d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck-standalone"]],decls:3,vars:9,consts:[["ghs-keyboard-shortcuts","",1,"loot-deck-standalone",3,"ngClass"],[3,"standalone"],[3,"deck","fullscreen","standalone","vertical","characters","before","after"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"ghs-loot-deck",2),t.NdJ("before",function(l){return i.beforeLootDeck(l)})("after",function(l){return i.afterLootDeck(l)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(7,bX,i.vertical())),t.xp6(1),t.Q6J("standalone",!0),t.xp6(1),t.Q6J("deck",i.gameManager.game.lootDeck)("fullscreen",!1)("standalone",!0)("vertical",i.vertical())("characters",!1))},dependencies:[x.mk,Yr,Fw,Kw],styles:[".loot-deck-standalone[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100vw;height:100vh}.loot-deck-standalone[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2;width:100%}.loot-deck-standalone[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:600px;height:100vw;max-height:420px;z-index:1;margin-top:2em}.loot-deck-standalone.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden}.loot-deck-standalone.vertical[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:132vw;max-height:800px;transform:none}"]})),a})();function wX(o,a){if(1&o&&(t.TgZ(0,"option",7),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function kX(o,a){if(1&o&&(t.TgZ(0,"div",10)(1,"span",11),t._uU(2),t.qZA(),t._UZ(3,"ghs-treasure-label",12),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Oqu(n.index),t.xp6(1),t.Q6J("treasure",n)("edition",e.edition)}}function TX(o,a){if(1&o&&(t.TgZ(0,"div",8),t.YNc(1,kX,4,3,"div",9),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.treasures)}}let ZX=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"treasures",[]),(0,_.Z)(this,"edition",void 0),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),e.update())}})})()}update(){this.treasures=[];const e=d.v.editionData.find(i=>i.edition==this.edition);e&&e.treasures&&e.treasures.forEach((i,s)=>{this.treasures.push(new yn.KI(i,s+1+(e.treasureOffset||0)))})}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-treasures-tool"]],decls:8,vars:5,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["class","treasures",4,"ngIf"],[3,"value"],[1,"treasures"],["class","treasure",4,"ngFor","ngForOf"],[1,"treasure"],[1,"index"],[1,"placeholder","text-white",3,"treasure","edition"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,wX,2,2,"option",5),t.qZA()()(),t.YNc(7,TX,2,1,"div",6),t.qZA()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(1),t.Q6J("ngIf",i.edition))},dependencies:[x.sg,x.O5,wo,ko,Ca,yi,Si,Yr,$f,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.treasures[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;overflow:auto}.treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{display:flex;margin:10px;padding:10px;background-color:var(--ghs-color-darkgray);color:var(--ghs-color-white);font-size:2em}.treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:5px}"]})),a})();var Yn=function(o){return o.additionalGold="additionalGold",o.event="event",o.collectiveGold="collectiveGold",o.collectiveItem="collectiveItem",o.consumeItem="consumeItem",o.consumeCollectiveItem="consumeCollectiveItem",o.custom="costum",o.discard="discard",o.experience="experience",o.globalAchievement="globalAchievement",o.gold="gold",o.itemDesign="itemDesign",o.loseBattleGoal="loseBattleGoal",o.loseCollectiveGold="loseCollectiveGold",o.loseGold="loseGold",o.loseReputation="loseReputation",o.noEffect="noEffect",o.outcome="outcome",o.randomItemDesign="randomItemDesign",o.reputation="reputation",o.partyAchievement="partyAchievement",o.prosperity="prosperity",o.scenario="scenario",o.scenarioCondition="scenarioCondition",o.scenarioDamage="scenarioDamage",o.scenarioSingleMinus1="scenarioSingleMinus1",o}(Yn||{}),g_=function(o){return o.otherwise="otherwise",o.payCollectiveGold="payCollectiveGold",o.payCollectiveGoldConditional="payCollectiveGoldConditional",o.reputationGT="reputationGT",o.reputationLT="reputationLT",o}(g_||{});function AX(o,a){if(1&o&&t._UZ(0,"span",1),2&o){const n=t.oxw();t.Q6J("ghs-label",n.conditionLabel[0])("ghs-label-args",n.conditionLabel.slice(1))}}let KT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"condition",void 0),(0,_.Z)(this,"conditionLabel",[]),(0,_.Z)(this,"conditionPrefix","game.events.conditions.")}ngOnInit(){this.conditionLabel=this.calcConditionLabel(this.condition)}calcConditionLabel(e){if(e){const i=""+(e.value||"");switch(e.type){case g_.otherwise:case g_.payCollectiveGold:case g_.reputationGT:case g_.reputationLT:return[this.conditionPrefix+e.type,i];case g_.payCollectiveGoldConditional:let s=[this.conditionPrefix+e.type];return i.split("|").forEach(m=>{const O=m.split("-")[0];let k="";if(2==m.split("-").length){const W=m.split("-")[1];k=R.r.getLabel(this.conditionPrefix+W.split(":")[0],W.split(":").slice(1))}s.push(O,k)}),s}}return[]}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-condition-label"]],inputs:{condition:"condition"},decls:1,vars:1,consts:[["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"text-white",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&t.YNc(0,AX,1,2,"span",0),2&e&&t.Q6J("ngIf",i.conditionLabel.length>0)},dependencies:[x.O5,ie],encapsulation:2})),a})();function SX(o,a){if(1&o&&t._UZ(0,"ghs-event-condition-label",2),2&o){const n=t.oxw();t.Q6J("condition",n.reward.condition)}}function EX(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw();t.Q6J("ghs-label",n.rewardLabel[0])("ghs-label-args",n.rewardLabel.slice(1))}}let DX=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"reward",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"itemCards",!1),(0,_.Z)(this,"rewardLabel",[]),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"rewardPrefix","game.events.rewards."),this.dialog=e}ngOnInit(){if(this.rewardLabel=this.calcRewardLabel(),this.itemCards&&-1!=[Yn.collectiveItem,Yn.itemDesign].indexOf(this.reward.type)){const e=(""+this.reward.value).split(":")[0];let i=this.edition,s=-1;isNaN(+e)?(s=+e.split("-")[0],i=e.split("-")[1]):s=+e;const l=d.v.itemManager.getItem(s,i,!0);l&&this.items.push(l)}}calcRewardLabel(){if(this.reward.type==Yn.custom)return[""+this.reward.value];const e=""+(this.reward.value||"");switch(this.reward.type){case Yn.additionalGold:case Yn.collectiveGold:case Yn.discard:case Yn.experience:case Yn.globalAchievement:case Yn.gold:case Yn.loseBattleGoal:case Yn.loseCollectiveGold:case Yn.loseGold:case Yn.loseReputation:case Yn.noEffect:case Yn.outcome:case Yn.randomItemDesign:case Yn.reputation:case Yn.partyAchievement:case Yn.prosperity:case Yn.scenarioCondition:case Yn.scenarioDamage:case Yn.scenarioSingleMinus1:return[this.rewardPrefix+this.reward.type,e];case Yn.collectiveItem:case Yn.itemDesign:const i=(""+this.reward.value).split(":")[0],s=(""+this.reward.value).split(":")[1];let l=this.edition,m=-1;return isNaN(+i)?(m=+i.split("-")[0],l=i.split("-")[1]):m=+i,[this.rewardPrefix+this.reward.type,""+m,l,s];case Yn.scenario:const O=d.v.scenarioManager.getScenario(e,this.edition,void 0);return O?[this.rewardPrefix+this.reward.type,O.index,"data.scenario."+O.name]:(console.warn("Invalid Scenario '"+e+"' on event reward "+this.reward+"' for Edition "+this.edition),[this.rewardPrefix+this.reward.type,e,' %scenario%']);case Yn.consumeItem:case Yn.consumeCollectiveItem:case Yn.event:case Yn.event:const k=e.split("-")[0],W=e.split("-")[1];return[this.rewardPrefix+this.reward.type,k,W]}return[]}openItemDialog(e){this.dialog.open(gg,{data:{item:e}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-reward-label"]],inputs:{reward:"reward",edition:"edition",itemCards:"itemCards"},decls:2,vars:2,consts:[["class","condition",3,"condition",4,"ngIf"],["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"condition",3,"condition"],[1,"text-white",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.YNc(0,SX,1,1,"ghs-event-condition-label",0),t.YNc(1,EX,1,2,"span",1)),2&e&&(t.Q6J("ngIf",i.reward.condition),t.xp6(1),t.Q6J("ngIf",i.rewardLabel.length>0))},dependencies:[x.O5,KT,ie],styles:[".condition{margin-right:.2em}\n"],encapsulation:2})),a})();const IX=function(o){return[o]};function NX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.selectOption(s))}),t._UZ(1,"span",12)(2,"span",13),t.qZA()}if(2&o){const n=a.index,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.events.option")("ghs-label-args",t.VKq(3,IX,"game.events.option."+(n+1))),t.xp6(1),t.Q6J("ghs-label",e.label+".options."+(n+1)+".choice")}}function JX(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function UX(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",6),t._UZ(2,"p",7),t.qZA(),t.TgZ(3,"div",8),t.YNc(4,NX,3,5,"div",9),t.qZA(),t.TgZ(5,"div",10),t.YNc(6,JX,2,0,"span",4),t._uU(7),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label",n.label+".text"),t.xp6(2),t.Q6J("ngForOf",n.event.options),t.xp6(2),t.Q6J("ngIf",n.event.cardId<10),t.xp6(1),t.hij("",n.event.cardId," ")}}function LX(o,a){if(1&o&&t._UZ(0,"span",22),2&o){const n=t.oxw().index,e=t.oxw(2);t.Q6J("ghs-label",e.label+".options."+(n+1)+".outcome")}}function QX(o,a){if(1&o&&(t.TgZ(0,"div",27),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("TODO: ",n.rule,"")}}function RX(o,a){if(1&o&&t._UZ(0,"ghs-event-condition-label",30),2&o){const n=t.oxw(2).$implicit;t.Q6J("condition",n.condition)}}function FX(o,a){if(1&o&&(t.TgZ(0,"div",6),t.YNc(1,RX,1,1,"ghs-event-condition-label",28),t._UZ(2,"span",29),t.qZA()),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw().index,l=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.condition),t.xp6(1),t.Q6J("ghs-label",l.label+".options."+(s+1)+".effects."+(s+1)+"."+(i+1))}}function qX(o,a){1&o&&t._UZ(0,"span",36),2&o&&t.Q6J("ghs-label","or")}const HX=function(o){return{"selected-reward":o}};function jX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",33),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw().index,m=t.oxw().index,O=t.oxw(3);return t.KtG(O.selectReward(m,l,s))}),t._UZ(2,"ghs-event-reward-label",34),t.qZA(),t.YNc(3,qX,1,1,"span",35),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(),s=i.index,l=i.$implicit,m=t.oxw().index,O=t.oxw().index,k=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(4,HX,O==k.selected&&m==k.selectedEffect&&k.getRewardSelection(m,s).index==e)),t.xp6(1),t.Q6J("reward",n)("edition",k.event.edition),t.xp6(1),t.Q6J("ngIf",l.length>1&&e{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"event",void 0),(0,_.Z)(this,"identifier",void 0),(0,_.Z)(this,"select",-1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"label",""),(0,_.Z)(this,"selected",-1),(0,_.Z)(this,"selectedEffect",-1),(0,_.Z)(this,"rewardSelection",[])}ngOnInit(){this.event&&(this.label="data.events."+this.event.edition+"."+this.event.type+"."+this.event.cardId)}ngOnChanges(e){e.identifier&&e.identifier.previousValue!=e.identifier.currentValue?!this.event&&this.identifier&&(this.event=void 0):e.select&&e.select.previousValue!=e.select.currentValue&&this.selectOption(this.select)}selectOption(e){this.event&&!this.disabled&&this.selected!=e&&(this.selected=e,this.rewardSelection=[],-1!=this.selected&&(this.event.options[e].effects.length&&(this.selectedEffect=0),this.event.options[e].effects.forEach((i,s)=>{i.rewards&&i.rewards.forEach((l,m)=>{this.rewardSelection.push(l.length?{effectIndex:s,rewardIndex:m,index:0}:{effectIndex:s,rewardIndex:m,index:-1})})})))}selectEffect(e){this.selectedEffect=this.selectedEffect==e?-1:e}selectReward(e,i,s){if(this.event&&!this.disabled){let l=this.rewardSelection.find(m=>m.effectIndex==e&&m.rewardIndex==i);l?l.index=s:(l={effectIndex:e,rewardIndex:i,index:s},this.rewardSelection.push(l))}}getRewardSelection(e,i){return this.rewardSelection.find(l=>l.effectIndex==e&&l.rewardIndex==i)||{effectIndex:e,rewardIndex:i,index:-1}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-card"]],inputs:{event:"event",identifier:"identifier",select:"select",disabled:"disabled"},features:[t.TTD],decls:7,vars:10,consts:[[1,"event-card-container"],["container",""],[1,"card","vertical","reverse","event",3,"ngClass"],[1,"card-back",3,"ngClass"],[4,"ngIf"],[1,"card-front",3,"ngClass"],[1,"text"],[1,"placeholder",3,"ghs-label"],[1,"options"],["class","option",3,"click",4,"ngFor","ngForOf"],[1,"card-id"],[1,"option",3,"click"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"choice",3,"ghs-label"],["class","option",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"option",3,"ngClass","click"],["class","text",3,"ghs-label",4,"ngIf"],[1,"effects"],["class","effect",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"card-action"],["class","ghs-svg","src","./assets/images/eventcards/return.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/eventcards/remove.svg",4,"ngIf"],[1,"text",3,"ghs-label"],[1,"effect",3,"ngClass","click"],["class","rule",4,"ngIf"],["class","text",4,"ngIf"],["class","rewards",4,"ngFor","ngForOf"],[1,"rule"],["class","condition",3,"condition",4,"ngIf"],[3,"ghs-label"],[1,"condition",3,"condition"],[1,"rewards"],[4,"ngFor","ngForOf"],[1,"reward",3,"ngClass","click"],[3,"reward","edition"],["class","separator",3,"ghs-label",4,"ngIf"],[1,"separator",3,"ghs-label"],["src","./assets/images/eventcards/return.svg",1,"ghs-svg"],["src","./assets/images/eventcards/remove.svg",1,"ghs-svg"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0,1)(2,"div",2)(3,"div",3),t.YNc(4,UX,8,4,"ng-container",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,ttt,3,1,"ng-container",4),t.qZA()()()),2&e){const s=t.MAs(1);t.xp6(2),t.Udp("font-size",.072*s.offsetWidth+"px"),t.Q6J("ngClass",t.WLB(7,ett,-1!=i.selected,i.disabled)),t.xp6(1),t.Q6J("ngClass",i.event?i.event.type:""),t.xp6(1),t.Q6J("ngIf",i.event),t.xp6(1),t.Q6J("ngClass",i.event?i.event.type:""),t.xp6(1),t.Q6J("ngIf",i.event)}},dependencies:[x.mk,x.sg,x.O5,KT,DX,ie],styles:['.event-card-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-bottom:147%}.event[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border:.2em solid transparent;border-radius:.5em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%]{background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.event[_ngcontent-%COMP%] .card-front.city[_ngcontent-%COMP%]{background-image:url(city-front.446be7156765ae21.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-front.road[_ngcontent-%COMP%]{background-image:url(road-front.3bc5c71940cbeabd.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-rows:repeat(2,50%);width:100%;height:100%}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;font-size:.6em;line-height:1em;padding-top:1.5em;padding-left:4em;padding-right:2em;filter:grayscale(.7);opacity:.3;overflow:auto}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:first-child{padding-top:2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-style:italic;margin-bottom:.5em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%]{position:absolute;bottom:1em;right:1em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:2em;height:auto;filter:var(--ghs-filter-white)}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-top:.3em;margin-bottom:.3em;width:100%}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{margin-bottom:.2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{text-transform:uppercase;margin-right:.2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:1.2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{margin:0 .1em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%]{bottom:-.5em;right:-1em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%]{filter:none;opacity:1}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{cursor:pointer;opacity:.6}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%]{opacity:1}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{opacity:.8}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%]{cursor:pointer;opacity:.6}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .reward.selected-reward[_ngcontent-%COMP%]{opacity:1}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%]{background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.event[_ngcontent-%COMP%] .card-back.city[_ngcontent-%COMP%]{background-image:url(city-back.6833a16b28926dd8.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-back.road[_ngcontent-%COMP%]{background-image:url(road-back.41656a4c3b0c3423.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{position:absolute;top:10%;width:100%;height:60%;margin:0;font-family:var(--ghs-font-text);font-size:.6em;line-height:.8em;font-style:italic}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:before{content:" ";float:left;height:100%;width:50%;shape-outside:polygon(98.99% 12.78%,99.5% 4.97%,0% 5%,0% 100%,22.05% 100%,24.62% 45%,30.13% 28.66%,43.84% 17.5%,57.95% 11.71%);shape-margin:3%}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0;text-align:justify;width:100%;height:100%}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:before{content:" ";float:right;height:100%;width:50%;shape-outside:polygon(.5% .87%,100% 0%,100% 100%,75.9% 100%,75.39% 48.17%,73.46% 37.6%,65.89% 26.63%,57.57% 17.79%,38.47% 11.36%,-1.51% 12.82%);shape-margin:3%}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%]{position:absolute;top:72%;left:13%;width:74%;display:flex;flex-direction:column;border-top:.1em solid var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]{cursor:pointer;margin-top:.4em;margin-bottom:.4em;font-family:var(--ghs-font-text);font-size:.6em}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;margin-right:.3em}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover{opacity:.7}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;top:89%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;text-align:center;text-transform:uppercase;transform:translate(-50%);font-family:var(--ghs-font-title);font-size:.6em;padding-top:.1em;color:var(--ghs-color-white)}.event.disabled[_ngcontent-%COMP%]{cursor:initial}']})),a})();function itt(o,a){if(1&o&&(t.TgZ(0,"option",6),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function ott(o,a){if(1&o&&(t.TgZ(0,"option",6),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.events.type."+n)}}function att(o,a){if(1&o&&t._UZ(0,"ghs-event-card",9),2&o){const n=a.$implicit,e=t.oxw();t.Q6J("event",n)("select",e.selected)}}const stt=function(){return["city","road"]},rtt=[{path:"editor/edition",component:tX},{path:"editor/deck",component:Xw},{path:"editor/monster",component:OX},{path:"editor/character",component:BW},{path:"tools/attackmodifier",component:h$},{path:"tools/decks",component:k$},{path:"tools/events",component:(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"events",[]),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"type",""),(0,_.Z)(this,"selected",-1),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{let s=!1;i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),s=!0),i.type&&(e.type="string"==typeof i.type?[i.type]:i.type,s=!0),i.selected&&(e.selected="string"==typeof i.selected?[i.selected]:i.selected),s&&e.update()}})})()}update(){this.events=[],this.edition&&(this.events=d.v.eventCardManager.getEventCardsForEdition(this.type,this.edition))}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,type:this.type||void 0,selected:this.selected||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-cards-tool"]],decls:22,vars:14,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"events"],[3,"event","select",4,"ngFor","ngForOf"],[3,"event","select"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,itt,2,2,"option",5),t.qZA()(),t.TgZ(7,"label"),t._UZ(8,"span",3),t.TgZ(9,"select",4),t.NdJ("ngModelChange",function(l){return i.type=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(10,ott,2,2,"option",5),t.qZA()(),t.TgZ(11,"label"),t._UZ(12,"span",3),t.TgZ(13,"select",4),t.NdJ("ngModelChange",function(l){return i.selected=l})("change",function(){return i.updateQueryParams()}),t.TgZ(14,"option",6),t._uU(15,"none"),t.qZA(),t.TgZ(16,"option",6),t._uU(17,"0"),t.qZA(),t.TgZ(18,"option",6),t._uU(19,"1"),t.qZA()()()(),t.TgZ(20,"div",7),t.YNc(21,att,1,2,"ghs-event-card",8),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.Q6J("ghs-label","game.events.type"),t.xp6(1),t.Q6J("ngModel",i.type),t.xp6(1),t.Q6J("ngForOf",t.DdM(13,stt)),t.xp6(2),t.Q6J("ghs-label","game.events.select"),t.xp6(1),t.Q6J("ngModel",i.selected),t.xp6(1),t.Q6J("value",-1),t.xp6(2),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(3),t.Q6J("ngForOf",i.events))},dependencies:[x.sg,wo,ko,Ca,yi,Si,Yr,ntt,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.events[_ngcontent-%COMP%]{display:flex;overflow:auto}.events[_ngcontent-%COMP%] ghs-event-card[_ngcontent-%COMP%]{width:400px;min-width:400px;height:600px;min-height:600px;margin:10px}"]})),a})()},{path:"tools/treasures",component:ZX},{path:"loot",component:xX},{path:"am",component:yX},{path:"**",component:s$}];let ctt=(()=>{var o;class a{}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275mod",t.oAB({type:o})),(0,_.Z)(a,"\u0275inj",t.cJS({imports:[jM.forRoot(rtt,{}),jM]})),a})(),ltt=(()=>{var o;class a{constructor(){(0,_.Z)(this,"settingsManager",R.r)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-debug-menu"]],decls:37,vars:19,consts:[[1,"menu-container","debug"],[1,"line"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],[1,"line","title","span"],[3,"routerLink"],[1,"separator"],[3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"label")(3,"input",2),t.NdJ("change",function(){return i.settingsManager.setDebugRightClick(!i.settingsManager.settings.debugRightClick)}),t.qZA(),t._UZ(4,"span",3),t.qZA()(),t.TgZ(5,"div",4)(6,"label"),t._UZ(7,"span",3),t.qZA()(),t.TgZ(8,"div",1)(9,"a",5),t._UZ(10,"span",3),t.qZA()(),t.TgZ(11,"div",1)(12,"a",5),t._UZ(13,"span",3),t.qZA()(),t.TgZ(14,"div",1)(15,"a",5),t._UZ(16,"span",3),t.qZA()(),t.TgZ(17,"div",1)(18,"a",5),t._UZ(19,"span",3),t.qZA()(),t.TgZ(20,"div",4)(21,"label"),t._UZ(22,"span",3),t.qZA()(),t.TgZ(23,"div",1)(24,"a",5),t._UZ(25,"span",3),t.qZA()(),t.TgZ(26,"div",1)(27,"a",5),t._UZ(28,"span",3),t.qZA()(),t._UZ(29,"div",6),t.TgZ(30,"div",1)(31,"a",7),t.NdJ("click",function(){return i.settingsManager.validateEditionData()}),t._UZ(32,"span",3),t.qZA()(),t._UZ(33,"div",6),t.TgZ(34,"div",1)(35,"a",5),t._UZ(36,"span",3),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("checked",i.settingsManager.settings.debugRightClick),t.xp6(1),t.Q6J("ghs-label","settings.debug.rightClick"),t.xp6(3),t.Q6J("ghs-label","editor"),t.xp6(2),t.Q6J("routerLink","/editor/monster"),t.xp6(1),t.Q6J("ghs-label","editor.monster"),t.xp6(2),t.Q6J("routerLink","/editor/character"),t.xp6(1),t.Q6J("ghs-label","editor.character"),t.xp6(2),t.Q6J("routerLink","/editor/deck"),t.xp6(1),t.Q6J("ghs-label","editor.deck"),t.xp6(2),t.Q6J("routerLink","/editor/edition"),t.xp6(1),t.Q6J("ghs-label","editor.edition"),t.xp6(3),t.Q6J("ghs-label","tools"),t.xp6(2),t.Q6J("routerLink","/tools/decks"),t.xp6(1),t.Q6J("ghs-label","tools.decks"),t.xp6(2),t.Q6J("routerLink","/tools/attackmodifier"),t.xp6(1),t.Q6J("ghs-label","tools.attackModifier"),t.xp6(4),t.Q6J("ghs-label","tools.validateEditionData"),t.xp6(3),t.Q6J("routerLink","/"),t.xp6(1),t.Q6J("ghs-label","tools.backToGhs"))},dependencies:[Vc,ie],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}']})),a})();const gtt=function(o){return{active:o}};function dtt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",2)(1,"a",11),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.characterLevel=s+1)}),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,gtt,n+1==e.characterLevel)),t.xp6(1),t.Oqu(n+1)}}function htt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",12),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return i.allEditions=!i.allEditions,t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",13),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.allEditions),t.xp6(1),t.Q6J("ghs-label","character.filter.allEditions")}}const $T=function(o){return{confirm:o}};function utt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",19)(1,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.unlockAll(i))})("mouseleave",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.cancelConfirm())}),t._UZ(2,"span",13),t.qZA()()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,$T,e.confirm=="confirm-all-"+n)),t.xp6(1),t.Q6J("ghs-label",e.confirm=="confirm-all-"+n?"character.unlockAll.confirm":"character.unlockAll")}}function _tt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.addCharacter(i))}),t._UZ(1,"img",25)(2,"span",13),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ghs-label","data.character."+n.name)}}function ptt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.unlock(i))})("mouseleave",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.cancelConfirm())}),t._UZ(1,"img",26),t.TgZ(2,"span",27),t._UZ(3,"span",13),t.qZA(),t._UZ(4,"span",28),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.Q6J("ngClass",t.VKq(4,$T,e.confirm==n.name)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Q6J("ghs-label","spoiler.placeholder"),t.xp6(1),t.Q6J("ghs-label",e.confirm==n.name?"character.unlock.confirm":"character.unlock")}}const ftt=function(o,a){return{disabled:o,spoiler:a}};function mtt(o,a){if(1&o&&(t.TgZ(0,"div",21),t.YNc(1,_tt,3,2,"a",22),t.YNc(2,ptt,5,6,"a",23),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.WLB(3,ftt,e.hasCharacter(n)&&e.unlocked(n),n.spoiler)),t.xp6(1),t.Q6J("ngIf",e.unlocked(n)),t.xp6(1),t.Q6J("ngIf",!e.unlocked(n))}}const WT=function(o,a){return{fh:o,modern:a}},XT=function(){return[]};function vtt(o,a){if(1&o&&(t.TgZ(0,"div",15)(1,"div",16)(2,"label"),t._UZ(3,"span",13),t.qZA()(),t.YNc(4,utt,3,4,"div",17),t.YNc(5,mtt,3,6,"div",18),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(4,WT,"fh"==e.settingsManager.settings.theme,"modern"==e.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","data.edition."+n),t.xp6(1),t.Q6J("ngIf",e.locked(n)),t.xp6(1),t.Q6J("ngForOf",e.characterData[n]||t.DdM(7,XT))}}function Ctt(o,a){if(1&o&&(t.ynx(0),t.YNc(1,vtt,6,8,"div",14),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.characterData[n]&&e.characterData[n].length>0)}}function Mtt(o,a){1&o&&(t.TgZ(0,"div",29)(1,"div",30)(2,"label"),t._UZ(3,"span",13),t.qZA()()()),2&o&&(t.xp6(3),t.Q6J("ghs-label","character.filter.noResult"))}let Ott=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterLevel",1),(0,_.Z)(this,"filter",""),(0,_.Z)(this,"allEditions",!1),(0,_.Z)(this,"newUnlocks",[]),(0,_.Z)(this,"confirm",""),(0,_.Z)(this,"characterData",{})}ngOnInit(){this.update()}update(){this.characterData={},(this.allEditions?d.v.editions(!0,!0):d.v.currentEditions(!0)).forEach(e=>{this.characterData[e]=this.getCharacterData(this.filter,e)})}getCharacterData(e,i){return d.v.charactersData(i).filter(s=>(!s.locked||this.unlocked(s))&&((0,he.eL)(s.name,e)||this.unlocked(s)&&(0,he.eL)(R.r.getLabel("data.character."+s.name),e))||s.locked&&(0,he.eL)(R.r.getLabel("data.character."+s.name),e,!0)).sort((s,l)=>{const m=R.r.getLabel("data.character."+s.name).toLowerCase(),O=R.r.getLabel("data.character."+l.name).toLowerCase();if(s.spoiler&&!l.spoiler)return 1;if(!s.spoiler&&l.spoiler)return-1;if(s.spoiler&&l.spoiler){if(!this.unlocked(s)&&this.unlocked(l)&&-1==this.newUnlocks.indexOf(l.name))return 1;if(this.unlocked(s)&&-1==this.newUnlocks.indexOf(s.name)&&!this.unlocked(l))return-1;if(this.unlocked(s)&&-1!=this.newUnlocks.indexOf(s.name)&&this.unlocked(l)&&-1==this.newUnlocks.indexOf(l.name))return 1;if(this.unlocked(s)&&-1==this.newUnlocks.indexOf(s.name)&&this.unlocked(l)&&-1!=this.newUnlocks.indexOf(s.name))return-1}return m>O?1:mi.spoiler&&!this.unlocked(i))}unlock(e){-1==d.v.game.unlockedCharacters.indexOf(e.name)&&(this.confirm==e.name?(d.v.stateManager.before("unlockChar","data.character."+e.name),d.v.game.unlockedCharacters.push(e.name),this.newUnlocks.push(e.name),d.v.stateManager.after()):this.confirm=e.name)}cancelConfirm(){this.confirm=""}unlockAll(e){const i=d.v.charactersData(e).filter(s=>s.spoiler&&!this.unlocked(s)).map(s=>s.name);i.length>0&&(this.confirm=="confirm-all-"+e?(d.v.stateManager.before("unlockAllCharacters","data.edition."+e),d.v.game.unlockedCharacters.push(...i),d.v.stateManager.after()):this.confirm="confirm-all-"+e)}noResults(){return(this.allEditions?d.v.editions(!0,!0):d.v.currentEditions(!0)).every(i=>!this.characterData[i]||0==this.characterData[i].length)}addCharacter(e){d.v.stateManager.before("addChar","data.character."+e.name),d.v.characterManager.addCharacter(e,this.characterLevel),d.v.stateManager.after()}hasCharacter(e){return d.v.game.figures.some(i=>i instanceof oe.z&&e.name==i.name&&e.edition==i.edition)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-menu"]],decls:12,vars:15,consts:[[1,"menu-container","character-add"],[1,"level-container",3,"ngClass"],[1,"item"],["src","./assets/images/status/level.svg"],["class","item",4,"ngFor","ngForOf"],[1,"line","search"],["type","text",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[4,"ngIf"],[1,"columns"],[4,"ngFor","ngForOf"],["class","column",4,"ngIf"],[1,"level",3,"ngClass","click"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","column spoilers",4,"ngIf"],[1,"column","spoilers"],[1,"line","title","sticky",3,"ngClass"],["class","line separator reveal-all",4,"ngIf"],["class","line",3,"ngClass",4,"ngFor","ngForOf"],[1,"line","separator","reveal-all"],[3,"ngClass","click","mouseleave"],[1,"line",3,"ngClass"],[3,"click",4,"ngIf"],[3,"ngClass","click","mouseleave",4,"ngIf"],[3,"click"],[1,"icon",3,"src"],[1,"icon","spoiler",3,"src"],[1,"name"],[1,"add",3,"ghs-label"],[1,"column"],[1,"line"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span",2),t._UZ(3,"img",3),t.qZA(),t.YNc(4,dtt,3,4,"span",4),t.ALo(5,"ghsRange"),t.TgZ(6,"div",5)(7,"input",6),t.NdJ("ngModelChange",function(l){return i.filter=l})("change",function(){return i.update()})("keyup",function(){return i.update()}),t.qZA(),t.YNc(8,htt,3,2,"label",7),t.qZA()(),t.TgZ(9,"div",8),t.YNc(10,Ctt,2,1,"ng-container",9),t.YNc(11,Mtt,4,1,"div",10),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.WLB(11,WT,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ngForOf",t.xi3(5,8,t.DdM(14,XT),9)),t.xp6(3),t.Q6J("ngModel",i.filter)("ghs-label","character.filter")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.edition),t.xp6(2),t.Q6J("ngForOf",i.allEditions?i.gameManager.editions(!0,!0):i.gameManager.currentEditions(!0)),t.xp6(1),t.Q6J("ngIf",i.filter&&i.noResults()))},dependencies:[x.mk,x.sg,x.O5,Ho,yi,Si,ie,Ii],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".character-add[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 45 * var(--ghs-dialog-factor))}.level-container[_ngcontent-%COMP%]{position:fixed;top:0;display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .6 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:2}.level-container.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.level-container.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.level-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.level-container[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{grid-column:5 span}.level-container[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%], .level-container[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:not(sticky):first-child{padding-top:calc(var(--ghs-unit) * 20.5 * var(--ghs-dialog-factor))}.reveal-all[_ngcontent-%COMP%]{position:absolute;bottom:0;border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)!important;width:auto!important}.spoilers[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:nth-child(2), .spoilers[_ngcontent-%COMP%] .reveal-all[_ngcontent-%COMP%] + .line[_ngcontent-%COMP%]{border-top:none!important}.spoilers[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:last-child{margin-bottom:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}"]})),a})();const tZ=function(o,a){return{fh:o,modern:a}};function Ptt(o,a){if(1&o&&(t.TgZ(0,"div",14)(1,"label"),t._UZ(2,"span",5),t.qZA()()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.Q6J("ngClass",t.WLB(2,tZ,"fh"==e.settingsManager.settings.theme,"modern"==e.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","data.edition."+n)}}function ytt(o,a){1&o&&(t.TgZ(0,"span",20),t._UZ(1,"img",21),t.qZA())}function btt(o,a){1&o&&t._UZ(0,"img",22)}function xtt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.addMonster(i))}),t.YNc(1,ytt,2,0,"span",18),t._UZ(2,"span",5),t.YNc(3,btt,1,0,"img",19),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",n.boss),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",n.hidden)}}function wtt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.settingsManager.addSpoiler(i.name))}),t.TgZ(1,"span",23),t._UZ(2,"span",5),t.qZA(),t.TgZ(3,"span",24),t._UZ(4,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","spoiler.placeholder"),t.xp6(2),t.Q6J("ghs-label","spoiler.add"))}const ktt=function(o,a,n,e){return{disabled:o,spoiler:a,boss:n,"hidden-monster":e}};function Ttt(o,a){if(1&o&&(t.TgZ(0,"div",15),t.YNc(1,xtt,4,3,"a",16),t.YNc(2,wtt,5,2,"a",16),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.l5B(3,ktt,e.hasMonster(n),n.spoiler,n.boss,n.hidden)),t.xp6(1),t.Q6J("ngIf",e.isSpoiled(n)),t.xp6(1),t.Q6J("ngIf",!e.isSpoiled(n))}}function Ztt(o,a){if(1&o&&(t.TgZ(0,"div",11),t.YNc(1,Ptt,3,5,"div",12),t.YNc(2,Ttt,3,8,"div",13),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.gameManager.currentEditions().length>1),t.xp6(1),t.Q6J("ngForOf",e.monsterData(n,e.filter))}}function Att(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Ztt,3,2,"div",10),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.monsterData(n,e.filter).length>0)}}function Stt(o,a){1&o&&(t.TgZ(0,"div",25)(1,"div",26)(2,"label"),t._UZ(3,"span",5),t.qZA()()()),2&o&&(t.xp6(3),t.Q6J("ghs-label","monster.filter.noResult"))}function Ett(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",26)(1,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.addSpoilers(i.notSpoiled(i.monsterData())))}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","spoiler.all"))}const eZ=function(o){return{disabled:o}};let Dtt=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"hasSpoilers",he.Ul),(0,_.Z)(this,"isSpoiled",he.NB),(0,_.Z)(this,"notSpoiled",he.q_),(0,_.Z)(this,"filter","")}hasMonster(e){return d.v.game.figures.some(i=>i instanceof Ze.Q&&e.name==i.name&&e.edition==i.edition)}hasBossMonster(){return d.v.currentEditions().some(e=>d.v.monstersData(e).some(i=>i.boss))}hasHiddenMonster(){return d.v.currentEditions().some(e=>d.v.monstersData(e).some(i=>i.hidden))}monsterData(e=void 0,i=""){return d.v.monstersData(e).filter(s=>(!s.boss||s.boss==R.r.settings.showBossMonster)&&(!s.hidden||s.hidden==R.r.settings.showHiddenMonster)&&(!i||(0,he.eL)(s.name,i)||(0,he.eL)(R.r.getLabel("data.monster."+s.name),i))).sort((s,l)=>{const m=R.r.getLabel("data.monster."+s.name).toLowerCase(),O=R.r.getLabel("data.monster."+l.name).toLowerCase();if(s.spoiler&&!l.spoiler)return 1;if(!s.spoiler&&l.spoiler)return-1;if(s.boss&&!l.boss)return 1;if(!s.boss&&l.boss)return-1;if(s.hidden&&!l.hidden)return 1;if(!s.hidden&&l.hidden)return-1;if(s.spoiler&&l.spoiler){if(!this.isSpoiled(s)&&this.isSpoiled(l))return 1;if(this.isSpoiled(s)&&!this.isSpoiled(l))return-1}return m>O?1:m0==this.monsterData(e,this.filter).length)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-menu"]],decls:13,vars:20,consts:[[1,"menu-container","monster-add"],[1,"line","filter-monster-menu",3,"ngClass"],["type","text",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange"],[3,"ngClass"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],[1,"columns"],[4,"ngFor","ngForOf"],["class","column",4,"ngIf"],["class","line",4,"ngIf"],["class","column spoilers bosses",4,"ngIf"],[1,"column","spoilers","bosses"],["class","line title sticky",3,"ngClass",4,"ngIf"],["class","line",3,"ngClass",4,"ngFor","ngForOf"],[1,"line","title","sticky",3,"ngClass"],[1,"line",3,"ngClass"],[3,"click",4,"ngIf"],[3,"click"],["class","boss-icon",4,"ngIf"],["class","ghs-svg hidden-icon","src","./assets/images/hidden.svg",4,"ngIf"],[1,"boss-icon"],["src","./assets/images/monster/enemy.png"],["src","./assets/images/hidden.svg",1,"ghs-svg","hidden-icon"],[1,"name"],[1,"add"],[1,"column"],[1,"line"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"input",2),t.NdJ("ngModelChange",function(l){return i.filter=l}),t.qZA(),t.TgZ(3,"label",3)(4,"input",4),t.NdJ("change",function(){return i.settingsManager.setShowBossMonster(!i.settingsManager.settings.showBossMonster)}),t.qZA(),t._UZ(5,"span",5),t.qZA(),t.TgZ(6,"label",3)(7,"input",4),t.NdJ("change",function(){return i.settingsManager.setShowHiddenMonster(!i.settingsManager.settings.showHiddenMonster)}),t.qZA(),t._UZ(8,"span",5),t.qZA()(),t.TgZ(9,"div",6),t.YNc(10,Att,2,1,"ng-container",7),t.YNc(11,Stt,4,1,"div",8),t.qZA(),t.YNc(12,Ett,3,1,"div",9),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.WLB(13,tZ,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(1),t.Q6J("ngModel",i.filter)("ghs-label","monster.filter")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngClass",t.VKq(16,eZ,!i.hasBossMonster())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.showBossMonster),t.xp6(1),t.Q6J("ghs-label","monster.showBoss"),t.xp6(1),t.Q6J("ngClass",t.VKq(18,eZ,!i.hasHiddenMonster())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.showHiddenMonster),t.xp6(1),t.Q6J("ghs-label","monster.showHidden"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.currentEditions()),t.xp6(1),t.Q6J("ngIf",i.filter&&i.noResults()),t.xp6(1),t.Q6J("ngIf",i.hasSpoilers(i.monsterData())))},dependencies:[x.mk,x.sg,x.O5,Ho,yi,Si,ie],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".monster-add[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 70 * var(--ghs-dialog-factor))}.monster-add[_ngcontent-%COMP%] .filter-monster-menu[_ngcontent-%COMP%]{position:fixed;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:2;width:inherit;display:flex;flex-direction:column;align-items:flex-start}.monster-add[_ngcontent-%COMP%] .filter-monster-menu.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.monster-add[_ngcontent-%COMP%] .filter-monster-menu.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.monster-add[_ngcontent-%COMP%] .filter-monster-menu[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%], .monster-add[_ngcontent-%COMP%] .filter-monster-menu[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:not(sticky):first-child{padding-top:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] > .boss[_ngcontent-%COMP%]:not(:nth-child(2)){margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] > .boss[_ngcontent-%COMP%] ~ .boss[_ngcontent-%COMP%]{margin-top:0;border-top:none}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] .boss-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));background-color:var(--ghs-color-darkred);border:2px solid var(--ghs-color-gray);border-radius:100%;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] .boss-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] .hidden-icon[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray)}.monster-add[_ngcontent-%COMP%] .hidden-monster[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-style:italic;font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor))}"]})),a})(),Itt=(()=>{var o;class a extends t.qLn{handleError(e){d.v.stateManager.errorLog.push(e),super.handleError(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(){let n;return function(i){return(n||(n=t.n5z(o)))(i||o)}}()),(0,_.Z)(a,"\u0275prov",t.Yz7({token:o,factory:o.\u0275fac})),a})(),Ntt=(()=>{var o;class a{}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275mod",t.oAB({type:o,bootstrap:[VM]})),(0,_.Z)(a,"\u0275inj",t.cJS({providers:[{provide:iv,useValue:{autoFocus:"dialog",hasBackdrop:!0}},{provide:t.qLn,useClass:Itt}],imports:[Me,C_,ctt,zv,ny,Bg,vC,lv.register("ngsw-worker.js",{enabled:true,registrationStrategy:"registerImmediately"})]})),a})();t.B6R(z6,function(){return[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,Vc,Ott,Dtt,W3,UR,sF,jF,IF,ltt,OR,ie]},function(){return[x.OU]}),t.B6R(yT,function(){return[x.mk,Fw]},[]),t.B6R(Pw,function(){return[x.mk,x.O5,Kf,ie]},[]),t.B6R(IO,function(){return[RT]},[]),t.B6R(Wd,function(){return[x.mk,T]},[]),t.B6R(zf,function(){return[x.sg,x.O5,T,ie]},[]),t.B6R(Gr,function(){return[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,ag,Gr,Sf,zT,ie,ng,An]},function(){return[x.OU]}),(0,t.G48)(),Ft().bootstrapModule(Ntt).catch(o=>console.error(o))},1028:function(q){q.exports=function(){"use strict";return function nt(E){var t=document,x=E.container||t.createElement("div"),G=E.preventSubmit||0;x.id=x.id||"autocomplete-"+Jt();var gt,Q,tt=x.style,at=E.debounceWaitMs||0,it=E.disableAutoSelect||!1,K=x.parentElement,dt=[],X="",et=2,st=E.showOnFocus,I=0,lt=!1,_t=!1;if(void 0!==E.minLength&&(et=E.minLength),!E.input)throw new Error("input undefined");var H=E.input;function Jt(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}function bt(){var Ft=x.parentNode;Ft&&Ft.removeChild(x)}function Tt(){Q&&window.clearTimeout(Q)}function Dt(){return!!x.parentNode}function Ht(){I++,dt=[],X="",gt=void 0,H.setAttribute("aria-activedescendant",""),H.setAttribute("aria-expanded","false"),bt()}function wt(){x.innerHTML="",H.setAttribute("aria-activedescendant","");var Ft=function(Y,on,p){var P=t.createElement("div");return P.textContent=Y.label||"",P};E.render&&(Ft=E.render);var Oe=function(Y,on){var p=t.createElement("div");return p.textContent=Y,p};E.renderGroup&&(Oe=E.renderGroup);var rn=t.createDocumentFragment(),kn=Jt();if(dt.forEach(function(Y,on){if(Y.group&&Y.group!==kn){kn=Y.group;var p=Oe(Y.group,X);p&&(p.className+=" group",rn.appendChild(p))}var P=Ft(Y,X,on);P&&(P.id=x.id+"_"+on,P.setAttribute("role","option"),P.addEventListener("click",function(M){_t=!0;try{E.onSelect(Y,H)}finally{_t=!1}Ht(),M.preventDefault(),M.stopPropagation()}),Y===gt&&(P.className+=" selected",P.setAttribute("aria-selected","true"),H.setAttribute("aria-activedescendant",P.id)),rn.appendChild(P))}),x.appendChild(rn),dt.length<1){if(!E.emptyMsg)return void Ht();var Me=t.createElement("div");Me.id=x.id+"_"+Jt(),Me.className="empty",Me.textContent=E.emptyMsg,x.appendChild(Me),H.setAttribute("aria-activedescendant",Me.id)}(function Rt(){x.parentNode||(K||t.body).appendChild(x)})(),function jt(){if(Dt()){H.setAttribute("aria-expanded","true"),tt.height="auto",tt.width=H.offsetWidth+"px";var Oe,Ft=0;rn(),rn(),E.customize&&Oe&&E.customize(H,Oe,x,Ft)}function rn(){var kn=t.documentElement,Me=kn.clientTop||t.body.clientTop||0,Y=kn.clientLeft||t.body.clientLeft||0,on=window.pageYOffset||kn.scrollTop,p=window.pageXOffset||kn.scrollLeft,P=(Oe=H.getBoundingClientRect()).top+H.offsetHeight+on-Me,M=Oe.left+p-Y;tt.top=P+"px",tt.left=M+"px",(Ft=window.innerHeight-(Oe.top+H.offsetHeight))<0&&(Ft=0),tt.top=P+"px",tt.bottom="",tt.left=M+"px",tt.maxHeight=Ft+"px"}}(),ue()}function Zt(){Dt()&&wt()}function qt(){Zt()}function Wt(Ft){Ft.target!==x?Zt():Ft.preventDefault()}function Ie(){_t||Et(0)}function ue(){var Ft=x.getElementsByClassName("selected");if(Ft.length>0){var Oe=Ft[0],rn=Oe.previousElementSibling;if(rn&&-1!==rn.className.indexOf("group")&&!rn.previousElementSibling&&(Oe=rn),Oe.offsetTopMe&&(x.scrollTop+=kn-Me)}}}function _n(Ft){dt.length>0&&(function en(Ft){var Oe=t.getElementById(x.id+"_"+Ft);Oe&&(Oe.classList.remove("selected"),Oe.removeAttribute("aria-selected"),H.removeAttribute("aria-activedescendant"))}(Ft),function be(Ft){var Oe=t.getElementById(x.id+"_"+Ft);Oe&&(Oe.classList.add("selected"),Oe.setAttribute("aria-selected","true"),H.setAttribute("aria-activedescendant",Oe.id))}(dt.indexOf(gt)),ue())}function St(Ft,Oe){var rn=Dt();if("Escape"===Oe)Ht();else{if(!rn||dt.length<1)return;"ArrowUp"===Oe?function We(){var Ft=dt.indexOf(gt);gt=-1===Ft?void 0:dt[(Ft+dt.length-1)%dt.length],_n(Ft)}():function ve(){var Ft=dt.indexOf(gt);gt=dt.length<1?void 0:-1===Ft?dt[0]:dt[(Ft+1)%dt.length],_n(Ft)}()}Ft.preventDefault(),rn&&Ft.stopPropagation()}function It(Ft){var Oe=Ft.key;switch(Oe){case"ArrowUp":case"ArrowDown":case"Escape":St(Ft,Oe);break;case"Enter":!function kt(Ft){if(gt){2===G&&Ft.preventDefault(),_t=!0;try{E.onSelect(gt,H)}finally{_t=!1}Ht()}1===G&&Ft.preventDefault()}(Ft)}}function Ut(){st&&Et(1)}function Et(Ft){H.value.length>=et||1===Ft?(Tt(),Q=window.setTimeout(function(){return Yt(H.value,Ft,H.selectionStart||0)},0===Ft||2===Ft?at:0)):Ht()}function Yt(Ft,Oe,rn){if(!lt){var kn=++I;E.fetch(Ft,function(Me){I===kn&&Me&&(X=Ft,gt=(dt=Me).length<1||it?void 0:dt[0],wt())},Oe,rn)}}function Ce(Ft){E.keyup?E.keyup({event:Ft,fetch:function(){return Et(0)}}):!Dt()&&"ArrowDown"===Ft.key&&Et(0)}function me(Ft){E.click&&E.click({event:Ft,fetch:function(){return Et(2)}})}function wn(){setTimeout(function(){t.activeElement!==H&&Ht()},200)}return x.className="autocomplete "+(E.className||""),x.setAttribute("role","listbox"),H.setAttribute("role","combobox"),H.setAttribute("aria-expanded","false"),H.setAttribute("aria-autocomplete","list"),H.setAttribute("aria-controls",x.id),H.setAttribute("aria-owns",x.id),H.setAttribute("aria-activedescendant",""),H.setAttribute("aria-haspopup","listbox"),tt.position="absolute",x.addEventListener("mousedown",function(Ft){Ft.stopPropagation(),Ft.preventDefault()}),x.addEventListener("focus",function(){return H.focus()}),bt(),H.addEventListener("keyup",Ce),H.addEventListener("click",me),H.addEventListener("keydown",It),H.addEventListener("input",Ie),H.addEventListener("blur",wn),H.addEventListener("focus",Ut),window.addEventListener("resize",qt),t.addEventListener("scroll",Wt,!0),{destroy:function ke(){H.removeEventListener("focus",Ut),H.removeEventListener("keyup",Ce),H.removeEventListener("click",me),H.removeEventListener("keydown",It),H.removeEventListener("input",Ie),H.removeEventListener("blur",wn),window.removeEventListener("resize",qt),t.removeEventListener("scroll",Wt,!0),H.removeAttribute("role"),H.removeAttribute("aria-expanded"),H.removeAttribute("aria-autocomplete"),H.removeAttribute("aria-controls"),H.removeAttribute("aria-activedescendant"),H.removeAttribute("aria-owns"),H.removeAttribute("aria-haspopup"),Tt(),Ht(),lt=!0},fetch:function xe(){Yt(H.value,3,H.selectionStart||0)}}}}()},8433:function(q,nt){ + */const tn="primary",Qr=Symbol("RouteTitle");class PC{constructor(a){this.params=a||{}}has(a){return Object.prototype.hasOwnProperty.call(this.params,a)}get(a){if(this.has(a)){const n=this.params[a];return Array.isArray(n)?n[0]:n}return null}getAll(a){if(this.has(a)){const n=this.params[a];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}}function Zs(o){return new PC(o)}function yC(o,a,n){const e=n.path.split("/");if(e.length>o.length||"full"===n.pathMatch&&(a.hasChildren()||e.lengthe[s]===i)}return o===a}function xC(o){return o.length>0?o[o.length-1]:null}function Rr(o){return function CC(o){return!!o&&(o instanceof ma.y||(0,Cs.m)(o.lift)&&(0,Cs.m)(o.subscribe))}(o)?o:(0,t.QGY)(o)?(0,Qi.D)(Promise.resolve(o)):(0,Se.of)(o)}const Ob={exact:function Pb(o,a,n){if(!Fr(o.segments,a.segments)||!xu(o.segments,a.segments,n)||o.numberOfChildren!==a.numberOfChildren)return!1;for(const e in a.children)if(!o.children[e]||!Pb(o.children[e],a.children[e],n))return!1;return!0},subset:wC},Pu={exact:function yu(o,a){return zo(o,a)},subset:function yb(o,a){return Object.keys(a).length<=Object.keys(o).length&&Object.keys(a).every(n=>bC(o[n],a[n]))},ignored:()=>!0};function dd(o,a,n){return Ob[n.paths](o.root,a.root,n.matrixParams)&&Pu[n.queryParams](o.queryParams,a.queryParams)&&!("exact"===n.fragment&&o.fragment!==a.fragment)}function wC(o,a,n){return bu(o,a,a.segments,n)}function bu(o,a,n,e){if(o.segments.length>n.length){const i=o.segments.slice(0,n.length);return!(!Fr(i,n)||a.hasChildren()||!xu(i,n,e))}if(o.segments.length===n.length){if(!Fr(o.segments,n)||!xu(o.segments,n,e))return!1;for(const i in a.children)if(!o.children[i]||!wC(o.children[i],a.children[i],e))return!1;return!0}{const i=n.slice(0,o.segments.length),s=n.slice(o.segments.length);return!!(Fr(o.segments,i)&&xu(o.segments,i,e)&&o.children[tn])&&bu(o.children[tn],a,s,e)}}function xu(o,a,n){return a.every((e,i)=>Pu[n](o[i].parameters,e.parameters))}class Rc{constructor(a=new qn([],{}),n={},e=null){this.root=a,this.queryParams=n,this.fragment=e}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zs(this.queryParams)),this._queryParamMap}toString(){return bb.serialize(this)}}class qn{constructor(a,n){this.segments=a,this.children=n,this.parent=null,Object.values(n).forEach(e=>e.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return _d(this)}}class hd{constructor(a,n){this.path=a,this.parameters=n}get parameterMap(){return this._parameterMap||(this._parameterMap=Zs(this.parameters)),this._parameterMap}toString(){return ZC(this)}}function Fr(o,a){return o.length===a.length&&o.every((n,e)=>n.path===a[e].path)}let ud=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return new Fp},providedIn:"root"}),a})();class Fp{parse(a){const n=new DC(a);return new Rc(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(a){const n=`/${Fc(a.root,!0)}`,e=function wb(o){const a=Object.keys(o).map(n=>{const e=o[n];return Array.isArray(e)?e.map(i=>`${ku(n)}=${ku(i)}`).join("&"):`${ku(n)}=${ku(e)}`}).filter(n=>!!n);return a.length?`?${a.join("&")}`:""}(a.queryParams);return`${n}${e}${"string"==typeof a.fragment?`#${function Tu(o){return encodeURI(o)}(a.fragment)}`:""}`}}const bb=new Fp;function _d(o){return o.segments.map(a=>ZC(a)).join("/")}function Fc(o,a){if(!o.hasChildren())return _d(o);if(a){const n=o.children[tn]?Fc(o.children[tn],!1):"",e=[];return Object.entries(o.children).forEach(([i,s])=>{i!==tn&&e.push(`${i}:${Fc(s,!1)}`)}),e.length>0?`${n}(${e.join("//")})`:n}{const n=function TC(o,a){let n=[];return Object.entries(o.children).forEach(([e,i])=>{e===tn&&(n=n.concat(a(i,e)))}),Object.entries(o.children).forEach(([e,i])=>{e!==tn&&(n=n.concat(a(i,e)))}),n}(o,(e,i)=>i===tn?[Fc(o.children[tn],!1)]:[`${i}:${Fc(e,!1)}`]);return 1===Object.keys(o.children).length&&null!=o.children[tn]?`${_d(o)}/${n[0]}`:`${_d(o)}/(${n.join("//")})`}}function wu(o){return encodeURIComponent(o).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ku(o){return wu(o).replace(/%3B/gi,";")}function ql(o){return wu(o).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Hl(o){return decodeURIComponent(o)}function qp(o){return Hl(o.replace(/\+/g,"%20"))}function ZC(o){return`${ql(o.path)}${function xb(o){return Object.keys(o).map(a=>`;${ql(a)}=${ql(o[a])}`).join("")}(o.parameters)}`}const Zu=/^[^\/()?;#]+/;function jl(o){const a=o.match(Zu);return a?a[0]:""}const AC=/^[^\/()?;=#]+/,kb=/^[^=?&#]+/,EC=/^[^&#]+/;class DC{constructor(a){this.url=a,this.remaining=a}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new qn([],{}):new qn([],this.parseChildren())}parseQueryParams(){const a={};if(this.consumeOptional("?"))do{this.parseQueryParam(a)}while(this.consumeOptional("&"));return a}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const a=[];for(this.peekStartsWith("(")||a.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),a.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let e={};return this.peekStartsWith("(")&&(e=this.parseParens(!1)),(a.length>0||Object.keys(n).length>0)&&(e[tn]=new qn(a,n)),e}parseSegment(){const a=jl(this.remaining);if(""===a&&this.peekStartsWith(";"))throw new t.vHH(4009,!1);return this.capture(a),new hd(Hl(a),this.parseMatrixParams())}parseMatrixParams(){const a={};for(;this.consumeOptional(";");)this.parseParam(a);return a}parseParam(a){const n=function SC(o){const a=o.match(AC);return a?a[0]:""}(this.remaining);if(!n)return;this.capture(n);let e="";if(this.consumeOptional("=")){const i=jl(this.remaining);i&&(e=i,this.capture(e))}a[Hl(n)]=Hl(e)}parseQueryParam(a){const n=function Tb(o){const a=o.match(kb);return a?a[0]:""}(this.remaining);if(!n)return;this.capture(n);let e="";if(this.consumeOptional("=")){const l=function Hp(o){const a=o.match(EC);return a?a[0]:""}(this.remaining);l&&(e=l,this.capture(e))}const i=qp(n),s=qp(e);if(a.hasOwnProperty(i)){let l=a[i];Array.isArray(l)||(l=[l],a[i]=l),l.push(s)}else a[i]=s}parseParens(a){const n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const e=jl(this.remaining),i=this.remaining[e.length];if("/"!==i&&")"!==i&&";"!==i)throw new t.vHH(4010,!1);let s;e.indexOf(":")>-1?(s=e.slice(0,e.indexOf(":")),this.capture(s),this.capture(":")):a&&(s=tn);const l=this.parseChildren();n[s]=1===Object.keys(l).length?l[tn]:new qn([],l),this.consumeOptional("//")}return n}peekStartsWith(a){return this.remaining.startsWith(a)}consumeOptional(a){return!!this.peekStartsWith(a)&&(this.remaining=this.remaining.substring(a.length),!0)}capture(a){if(!this.consumeOptional(a))throw new t.vHH(4011,!1)}}function Au(o){return o.segments.length>0?new qn([],{[tn]:o}):o}function jp(o){const a={};for(const e of Object.keys(o.children)){const s=jp(o.children[e]);if(e===tn&&0===s.segments.length&&s.hasChildren())for(const[l,m]of Object.entries(s.children))a[l]=m;else(s.segments.length>0||s.hasChildren())&&(a[e]=s)}return function Zb(o){if(1===o.numberOfChildren&&o.children[tn]){const a=o.children[tn];return new qn(o.segments.concat(a.segments),a.children)}return o}(new qn(o.segments,a))}function qr(o){return o instanceof Rc}function Bp(o){let a;const i=Au(function n(s){const l={};for(const O of s.children){const k=n(O);l[O.outlet]=k}const m=new qn(s.url,l);return s===o&&(a=m),m}(o.root));return a??i}function zp(o,a,n,e){let i=o;for(;i.parent;)i=i.parent;if(0===a.length)return Gp(i,i,i,n,e);const s=function NC(o){if("string"==typeof o[0]&&1===o.length&&"/"===o[0])return new fd(!0,0,o);let a=0,n=!1;const e=o.reduce((i,s,l)=>{if("object"==typeof s&&null!=s){if(s.outlets){const m={};return Object.entries(s.outlets).forEach(([O,k])=>{m[O]="string"==typeof k?k.split("/"):k}),[...i,{outlets:m}]}if(s.segmentPath)return[...i,s.segmentPath]}return"string"!=typeof s?[...i,s]:0===l?(s.split("/").forEach((m,O)=>{0==O&&"."===m||(0==O&&""===m?n=!0:".."===m?a++:""!=m&&i.push(m))}),i):[...i,s]},[]);return new fd(n,a,e)}(a);if(s.toRoot())return Gp(i,i,new qn([],{}),n,e);const l=function JC(o,a,n){if(o.isAbsolute)return new md(a,!0,0);if(!n)return new md(a,!1,NaN);if(null===n.parent)return new md(n,!0,0);const e=Su(o.commands[0])?0:1;return function UC(o,a,n){let e=o,i=a,s=n;for(;s>i;){if(s-=i,e=e.parent,!e)throw new t.vHH(4005,!1);i=e.segments.length}return new md(e,!1,i-s)}(n,n.segments.length-1+e,o.numberOfDoubleDots)}(s,i,o),m=l.processChildren?Bl(l.segmentGroup,l.index,s.commands):Vp(l.segmentGroup,l.index,s.commands);return Gp(i,l.segmentGroup,m,n,e)}function Su(o){return"object"==typeof o&&null!=o&&!o.outlets&&!o.segmentPath}function pd(o){return"object"==typeof o&&null!=o&&o.outlets}function Gp(o,a,n,e,i){let l,s={};e&&Object.entries(e).forEach(([O,k])=>{s[O]=Array.isArray(k)?k.map(W=>`${W}`):`${k}`}),l=o===a?n:Eu(o,a,n);const m=Au(jp(l));return new Rc(m,s,i)}function Eu(o,a,n){const e={};return Object.entries(o.children).forEach(([i,s])=>{e[i]=s===a?n:Eu(s,a,n)}),new qn(o.segments,e)}class fd{constructor(a,n,e){if(this.isAbsolute=a,this.numberOfDoubleDots=n,this.commands=e,a&&e.length>0&&Su(e[0]))throw new t.vHH(4003,!1);const i=e.find(pd);if(i&&i!==xC(e))throw new t.vHH(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class md{constructor(a,n,e){this.segmentGroup=a,this.processChildren=n,this.index=e}}function Vp(o,a,n){if(o||(o=new qn([],{})),0===o.segments.length&&o.hasChildren())return Bl(o,a,n);const e=function QC(o,a,n){let e=0,i=a;const s={match:!1,pathIndex:0,commandIndex:0};for(;i=n.length)return s;const l=o.segments[i],m=n[e];if(pd(m))break;const O=`${m}`,k=e0&&void 0===O)break;if(O&&k&&"object"==typeof k&&void 0===k.outlets){if(!FC(O,k,l))return s;e+=2}else{if(!FC(O,{},l))return s;e++}i++}return{match:!0,pathIndex:i,commandIndex:e}}(o,a,n),i=n.slice(e.commandIndex);if(e.match&&e.pathIndexs!==tn)&&o.children[tn]&&1===o.numberOfChildren&&0===o.children[tn].segments.length){const s=Bl(o.children[tn],a,n);return new qn(o.segments,s.children)}return Object.entries(e).forEach(([s,l])=>{"string"==typeof l&&(l=[l]),null!==l&&(i[s]=Vp(o.children[s],a,l))}),Object.entries(o.children).forEach(([s,l])=>{void 0===e[s]&&(i[s]=l)}),new qn(o.segments,i)}}function zl(o,a,n){const e=o.segments.slice(0,a);let i=0;for(;i{"string"==typeof e&&(e=[e]),null!==e&&(a[n]=zl(new qn([],{}),0,e))}),a}function RC(o){const a={};return Object.entries(o).forEach(([n,e])=>a[n]=`${e}`),a}function FC(o,a,n){return o==n.path&&zo(a,n.parameters)}const qc="imperative";class lo{constructor(a,n){this.id=a,this.url=n}}class Gl extends lo{constructor(a,n,e="imperative",i=null){super(a,n),this.type=0,this.navigationTrigger=e,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class jr extends lo{constructor(a,n,e){super(a,n),this.urlAfterRedirects=e,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Hc extends lo{constructor(a,n,e,i){super(a,n),this.reason=e,this.code=i,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class vd extends lo{constructor(a,n,e,i){super(a,n),this.reason=e,this.code=i,this.type=16}}class Yp extends lo{constructor(a,n,e,i){super(a,n),this.error=e,this.target=i,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class qC extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ab extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class HC extends lo{constructor(a,n,e,i,s){super(a,n),this.urlAfterRedirects=e,this.state=i,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Sb extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ei extends lo{constructor(a,n,e,i){super(a,n),this.urlAfterRedirects=e,this.state=i,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jC{constructor(a){this.route=a,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Eb{constructor(a){this.route=a,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Db{constructor(a){this.snapshot=a,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BC{constructor(a){this.snapshot=a,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ib{constructor(a){this.snapshot=a,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class zC{constructor(a){this.snapshot=a,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Kp{constructor(a,n,e){this.routerEvent=a,this.position=n,this.anchor=e,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Br{}class $p{constructor(a){this.url=a}}class GC{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Cd,this.attachRef=null}}let Cd=(()=>{var o;class a{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const s=this.getOrCreateContext(e);s.outlet=i,this.contexts.set(e,s)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new GC,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();class Wp{constructor(a){this._root=a}get root(){return this._root.value}parent(a){const n=this.pathFromRoot(a);return n.length>1?n[n.length-2]:null}children(a){const n=VC(a,this._root);return n?n.children.map(e=>e.value):[]}firstChild(a){const n=VC(a,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(a){const n=Md(a,this._root);return n.length<2?[]:n[n.length-2].children.map(i=>i.value).filter(i=>i!==a)}pathFromRoot(a){return Md(a,this._root).map(n=>n.value)}}function VC(o,a){if(o===a.value)return a;for(const n of a.children){const e=VC(o,n);if(e)return e}return null}function Md(o,a){if(o===a.value)return[a];for(const n of a.children){const e=Md(o,n);if(e.length)return e.unshift(a),e}return[]}class qa{constructor(a,n){this.value=a,this.children=n}toString(){return`TreeNode(${this.value})`}}function go(o){const a={};return o&&o.children.forEach(n=>a[n.value.outlet]=n),a}class YC extends Wp{constructor(a,n){super(a),this.snapshot=n,tf(this,a)}toString(){return this.snapshot.toString()}}function Xp(o,a){const n=function As(o,a){const l=new Od([],{},{},"",{},tn,a,null,{});return new $C("",new qa(l,[]))}(0,a),e=new zn.X([new hd("",{})]),i=new zn.X({}),s=new zn.X({}),l=new zn.X({}),m=new zn.X(""),O=new ri(e,i,l,m,s,tn,a,n.root);return O.snapshot=n.root,new YC(new qa(O,[]),n)}class ri{constructor(a,n,e,i,s,l,m,O){this.urlSubject=a,this.paramsSubject=n,this.queryParamsSubject=e,this.fragmentSubject=i,this.dataSubject=s,this.outlet=l,this.component=m,this._futureSnapshot=O,this.title=this.dataSubject?.pipe((0,bn.U)(k=>k[Qr]))??(0,Se.of)(void 0),this.url=a,this.params=n,this.queryParams=e,this.fragment=i,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,bn.U)(a=>Zs(a)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,bn.U)(a=>Zs(a)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Pa(o,a="emptyOnly"){const n=o.pathFromRoot;let e=0;if("always"!==a)for(e=n.length-1;e>=1;){const i=n[e],s=n[e-1];if(i.routeConfig&&""===i.routeConfig.path)e--;else{if(s.component)break;e--}}return function KC(o){return o.reduce((a,n)=>({params:{...a.params,...n.params},data:{...a.data,...n.data},resolve:{...n.data,...a.resolve,...n.routeConfig?.data,...n._resolvedData}}),{params:{},data:{},resolve:{}})}(n.slice(e))}class Od{get title(){return this.data?.[Qr]}constructor(a,n,e,i,s,l,m,O,k){this.url=a,this.params=n,this.queryParams=e,this.fragment=i,this.data=s,this.outlet=l,this.component=m,this.routeConfig=O,this._resolve=k}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Zs(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zs(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(e=>e.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class $C extends Wp{constructor(a,n){super(n),this.url=a,tf(this,n)}toString(){return WC(this._root)}}function tf(o,a){a.value._routerState=o,a.children.forEach(n=>tf(o,n))}function WC(o){const a=o.children.length>0?` { ${o.children.map(WC).join(", ")} } `:"";return`${o.value}${a}`}function ef(o){if(o.snapshot){const a=o.snapshot,n=o._futureSnapshot;o.snapshot=n,zo(a.queryParams,n.queryParams)||o.queryParamsSubject.next(n.queryParams),a.fragment!==n.fragment&&o.fragmentSubject.next(n.fragment),zo(a.params,n.params)||o.paramsSubject.next(n.params),function Mb(o,a){if(o.length!==a.length)return!1;for(let n=0;nzo(n.parameters,a[e].parameters))}(o.url,a.url);return n&&!(!o.parent!=!a.parent)&&(!o.parent||Pd(o.parent,a.parent))}let jc=(()=>{var o;class a{constructor(){this.activated=null,this._activatedRoute=null,this.name=tn,this.activateEvents=new t.vpe,this.deactivateEvents=new t.vpe,this.attachEvents=new t.vpe,this.detachEvents=new t.vpe,this.parentContexts=(0,t.f3M)(Cd),this.location=(0,t.f3M)(t.s_b),this.changeDetector=(0,t.f3M)(t.sBO),this.environmentInjector=(0,t.f3M)(t.lqb),this.inputBinder=(0,t.f3M)(yd,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:s}=e.name;if(i)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new t.vHH(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new t.vHH(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new t.vHH(4012,!1);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new t.vHH(4013,!1);this._activatedRoute=e;const s=this.location,m=e.snapshot.component,O=this.parentContexts.getOrCreateContext(this.name).children,k=new Nb(e,O,s.injector);this.activated=s.createComponent(m,{index:s.length,injector:k,environmentInjector:i??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275dir=t.lG2({type:o,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[t.TTD]}),a})();class Nb{constructor(a,n,e){this.route=a,this.childContexts=n,this.parent=e}get(a,n){return a===ri?this.route:a===Cd?this.childContexts:this.parent.get(a,n)}}const yd=new t.OlP("");let XC=(()=>{var o;class a{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){const{activatedRoute:i}=e,s=Eg([i.queryParams,i.params,i.data]).pipe((0,ro.w)(([l,m,O],k)=>(O={...l,...m,...O},0===k?(0,Se.of)(O):Promise.resolve(O)))).subscribe(l=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||null===i.component)return void this.unsubscribeFromRouteData(e);const m=(0,t.qFp)(i.component);if(m)for(const{templateName:O}of m.inputs)e.activatedComponentRef.setInput(O,l[O]);else this.unsubscribeFromRouteData(e)});this.outletDataSubscriptions.set(e,s)}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac}),a})();function Vl(o,a,n){if(n&&o.shouldReuseRoute(a.value,n.value.snapshot)){const e=n.value;e._futureSnapshot=a.value;const i=function tM(o,a,n){return a.children.map(e=>{for(const i of n.children)if(o.shouldReuseRoute(e.value,i.value.snapshot))return Vl(o,e,i);return Vl(o,e)})}(o,a,n);return new qa(e,i)}{if(o.shouldAttach(a.value)){const s=o.retrieve(a.value);if(null!==s){const l=s.route;return l.value._futureSnapshot=a.value,l.children=a.children.map(m=>Vl(o,m)),l}}const e=function Du(o){return new ri(new zn.X(o.url),new zn.X(o.params),new zn.X(o.queryParams),new zn.X(o.fragment),new zn.X(o.data),o.outlet,o.component,o)}(a.value),i=a.children.map(s=>Vl(o,s));return new qa(e,i)}}const nf="ngNavigationCancelingError";function af(o,a){const{redirectTo:n,navigationBehaviorOptions:e}=qr(a)?{redirectTo:a,navigationBehaviorOptions:void 0}:a,i=sf(!1,0,a);return i.url=n,i.navigationBehaviorOptions=e,i}function sf(o,a,n){const e=new Error("NavigationCancelingError: "+(o||""));return e[nf]=!0,e.cancellationCode=a,n&&(e.url=n),e}function nM(o){return o&&o[nf]}let iM=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["ng-component"]],standalone:!0,features:[t.jDz],decls:1,vars:0,template:function(e,i){1&e&&t._UZ(0,"router-outlet")},dependencies:[jc],encapsulation:2}),a})();function Iu(o){const a=o.children&&o.children.map(Iu),n=a?{...o,children:a}:{...o};return!n.component&&!n.loadComponent&&(a||n.loadChildren)&&n.outlet&&n.outlet!==tn&&(n.component=iM),n}function ya(o){return o.outlet||tn}function bd(o){if(!o)return null;if(o.routeConfig?._injector)return o.routeConfig._injector;for(let a=o.parent;a;a=a.parent){const n=a.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}class Rb{constructor(a,n,e,i,s){this.routeReuseStrategy=a,this.futureState=n,this.currState=e,this.forwardEvent=i,this.inputBindingEnabled=s}activate(a){const n=this.futureState._root,e=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,e,a),ef(this.futureState.root),this.activateChildRoutes(n,e,a)}deactivateChildRoutes(a,n,e){const i=go(n);a.children.forEach(s=>{const l=s.value.outlet;this.deactivateRoutes(s,i[l],e),delete i[l]}),Object.values(i).forEach(s=>{this.deactivateRouteAndItsChildren(s,e)})}deactivateRoutes(a,n,e){const i=a.value,s=n?n.value:null;if(i===s)if(i.component){const l=e.getContext(i.outlet);l&&this.deactivateChildRoutes(a,n,l.children)}else this.deactivateChildRoutes(a,n,e);else s&&this.deactivateRouteAndItsChildren(n,e)}deactivateRouteAndItsChildren(a,n){a.value.component&&this.routeReuseStrategy.shouldDetach(a.value.snapshot)?this.detachAndStoreRouteSubtree(a,n):this.deactivateRouteAndOutlet(a,n)}detachAndStoreRouteSubtree(a,n){const e=n.getContext(a.value.outlet),i=e&&a.value.component?e.children:n,s=go(a);for(const l of Object.keys(s))this.deactivateRouteAndItsChildren(s[l],i);if(e&&e.outlet){const l=e.outlet.detach(),m=e.children.onOutletDeactivated();this.routeReuseStrategy.store(a.value.snapshot,{componentRef:l,route:a,contexts:m})}}deactivateRouteAndOutlet(a,n){const e=n.getContext(a.value.outlet),i=e&&a.value.component?e.children:n,s=go(a);for(const l of Object.keys(s))this.deactivateRouteAndItsChildren(s[l],i);e&&(e.outlet&&(e.outlet.deactivate(),e.children.onOutletDeactivated()),e.attachRef=null,e.route=null)}activateChildRoutes(a,n,e){const i=go(n);a.children.forEach(s=>{this.activateRoutes(s,i[s.value.outlet],e),this.forwardEvent(new zC(s.value.snapshot))}),a.children.length&&this.forwardEvent(new BC(a.value.snapshot))}activateRoutes(a,n,e){const i=a.value,s=n?n.value:null;if(ef(i),i===s)if(i.component){const l=e.getOrCreateContext(i.outlet);this.activateChildRoutes(a,n,l.children)}else this.activateChildRoutes(a,n,e);else if(i.component){const l=e.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const m=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),l.children.onOutletReAttached(m.contexts),l.attachRef=m.componentRef,l.route=m.route.value,l.outlet&&l.outlet.attach(m.componentRef,m.route.value),ef(m.route.value),this.activateChildRoutes(a,null,l.children)}else{const m=bd(i.snapshot);l.attachRef=null,l.route=i,l.injector=m,l.outlet&&l.outlet.activateWith(i,l.injector),this.activateChildRoutes(a,null,l.children)}}else this.activateChildRoutes(a,null,e)}}class gM{constructor(a){this.path=a,this.route=this.path[this.path.length-1]}}class Nu{constructor(a,n){this.component=a,this.route=n}}function Fb(o,a,n){const e=o._root;return xd(e,a?a._root:null,n,[e.value])}function Yl(o,a){const n=Symbol(),e=a.get(o,n);return e===n?"function"!=typeof o||(0,t.Z0I)(o)?a.get(o):o:e}function xd(o,a,n,e,i={canDeactivateChecks:[],canActivateChecks:[]}){const s=go(a);return o.children.forEach(l=>{(function Hb(o,a,n,e,i={canDeactivateChecks:[],canActivateChecks:[]}){const s=o.value,l=a?a.value:null,m=n?n.getContext(o.value.outlet):null;if(l&&s.routeConfig===l.routeConfig){const O=function jb(o,a,n){if("function"==typeof n)return n(o,a);switch(n){case"pathParamsChange":return!Fr(o.url,a.url);case"pathParamsOrQueryParamsChange":return!Fr(o.url,a.url)||!zo(o.queryParams,a.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Pd(o,a)||!zo(o.queryParams,a.queryParams);default:return!Pd(o,a)}}(l,s,s.routeConfig.runGuardsAndResolvers);O?i.canActivateChecks.push(new gM(e)):(s.data=l.data,s._resolvedData=l._resolvedData),xd(o,a,s.component?m?m.children:null:n,e,i),O&&m&&m.outlet&&m.outlet.isActivated&&i.canDeactivateChecks.push(new Nu(m.outlet.component,l))}else l&&wd(a,m,i),i.canActivateChecks.push(new gM(e)),xd(o,null,s.component?m?m.children:null:n,e,i)})(l,s[l.value.outlet],n,e.concat([l.value]),i),delete s[l.value.outlet]}),Object.entries(s).forEach(([l,m])=>wd(m,n.getContext(l),i)),i}function wd(o,a,n){const e=go(o),i=o.value;Object.entries(e).forEach(([s,l])=>{wd(l,i.component?a?a.children.getContext(s):null:a,n)}),n.canDeactivateChecks.push(new Nu(i.component&&a&&a.outlet&&a.outlet.isActivated?a.outlet.component:null,i))}function kd(o){return"function"==typeof o}function lf(o){return o instanceof Ll||"EmptyError"===o?.name}const Td=Symbol("INITIAL_VALUE");function Bc(){return(0,ro.w)(o=>Eg(o.map(a=>a.pipe((0,_i.q)(1),vc(Td)))).pipe((0,bn.U)(a=>{for(const n of a)if(!0!==n){if(n===Td)return Td;if(!1===n||n instanceof Rc)return n}return!0}),(0,so.h)(a=>a!==Td),(0,_i.q)(1)))}function df(o){return(0,fb.z)(Ai(a=>{if(qr(a))throw af(0,a)}),(0,bn.U)(a=>!0===a))}class hf{constructor(a){this.segmentGroup=a||null}}class Gc{constructor(a){this.urlTree=a}}function $l(o){return wc(new hf(o))}function CM(o){return wc(new Gc(o))}class $b{constructor(a,n){this.urlSerializer=a,this.urlTree=n}noMatchError(a){return new t.vHH(4002,!1)}lineralizeSegments(a,n){let e=[],i=n.root;for(;;){if(e=e.concat(i.segments),0===i.numberOfChildren)return(0,Se.of)(e);if(i.numberOfChildren>1||!i.children[tn])return wc(new t.vHH(4e3,!1));i=i.children[tn]}}applyRedirectCommands(a,n,e){return this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),a,e)}applyRedirectCreateUrlTree(a,n,e,i){const s=this.createSegmentGroup(a,n.root,e,i);return new Rc(s,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(a,n){const e={};return Object.entries(a).forEach(([i,s])=>{if("string"==typeof s&&s.startsWith(":")){const m=s.substring(1);e[i]=n[m]}else e[i]=s}),e}createSegmentGroup(a,n,e,i){const s=this.createSegments(a,n.segments,e,i);let l={};return Object.entries(n.children).forEach(([m,O])=>{l[m]=this.createSegmentGroup(a,O,e,i)}),new qn(s,l)}createSegments(a,n,e,i){return n.map(s=>s.path.startsWith(":")?this.findPosParam(a,s,i):this.findOrReturn(s,e))}findPosParam(a,n,e){const i=e[n.path.substring(1)];if(!i)throw new t.vHH(4001,!1);return i}findOrReturn(a,n){let e=0;for(const i of n){if(i.path===a.path)return n.splice(e),i;e++}return a}}const Xl={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Ju(o,a,n,e,i){const s=ho(o,a,n);return s.matched?(e=function rf(o,a){return o.providers&&!o._injector&&(o._injector=(0,t.MMx)(o.providers,a,`Route: ${o.path}`)),o._injector??a}(a,e),function vM(o,a,n,e){const i=a.canMatch;if(!i||0===i.length)return(0,Se.of)(!0);const s=i.map(l=>{const m=Yl(l,o);return Rr(function _M(o){return o&&kd(o.canMatch)}(m)?m.canMatch(a,n):o.runInContext(()=>m(a,n)))});return(0,Se.of)(s).pipe(Bc(),df())}(e,a,n).pipe((0,bn.U)(l=>!0===l?s:{...Xl}))):(0,Se.of)(s)}function ho(o,a,n){if(""===a.path)return"full"===a.pathMatch&&(o.hasChildren()||n.length>0)?{...Xl}:{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};const i=(a.matcher||yC)(n,o,a);if(!i)return{...Xl};const s={};Object.entries(i.posParams??{}).forEach(([m,O])=>{s[m]=O.path});const l=i.consumed.length>0?{...s,...i.consumed[i.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:i.consumed,remainingSegments:n.slice(i.consumed.length),parameters:l,positionalParamSegments:i.posParams??{}}}function Wb(o,a,n,e){return n.length>0&&function Xb(o,a,n){return n.some(e=>Zd(o,a,e)&&ya(e)!==tn)}(o,n,e)?{segmentGroup:new qn(a,OM(e,new qn(n,o.children))),slicedSegments:[]}:0===n.length&&function PM(o,a,n){return n.some(e=>Zd(o,a,e))}(o,n,e)?{segmentGroup:new qn(o.segments,MM(o,0,n,e,o.children)),slicedSegments:n}:{segmentGroup:new qn(o.segments,o.children),slicedSegments:n}}function MM(o,a,n,e,i){const s={};for(const l of e)if(Zd(o,n,l)&&!i[ya(l)]){const m=new qn([],{});s[ya(l)]=m}return{...i,...s}}function OM(o,a){const n={};n[tn]=a;for(const e of o)if(""===e.path&&ya(e)!==tn){const i=new qn([],{});n[ya(e)]=i}return n}function Zd(o,a,n){return(!(o.hasChildren()||a.length>0)||"full"!==n.pathMatch)&&""===n.path}class e0{constructor(a,n,e,i,s,l,m){this.injector=a,this.configLoader=n,this.rootComponentType=e,this.config=i,this.urlTree=s,this.paramsInheritanceStrategy=l,this.urlSerializer=m,this.allowRedirects=!0,this.applyRedirects=new $b(this.urlSerializer,this.urlTree)}noMatchError(a){return new t.vHH(4002,!1)}recognize(){const a=Wb(this.urlTree.root,[],[],this.config).segmentGroup;return this.processSegmentGroup(this.injector,this.config,a,tn).pipe(Fl(n=>{if(n instanceof Gc)return this.allowRedirects=!1,this.urlTree=n.urlTree,this.match(n.urlTree);throw n instanceof hf?this.noMatchError(n):n}),(0,bn.U)(n=>{const e=new Od([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},tn,this.rootComponentType,null,{}),i=new qa(e,n),s=new $C("",i),l=function IC(o,a,n=null,e=null){return zp(Bp(o),a,n,e)}(e,[],this.urlTree.queryParams,this.urlTree.fragment);return l.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(l),this.inheritParamsAndData(s._root),{state:s,tree:l}}))}match(a){return this.processSegmentGroup(this.injector,this.config,a.root,tn).pipe(Fl(e=>{throw e instanceof hf?this.noMatchError(e):e}))}inheritParamsAndData(a){const n=a.value,e=Pa(n,this.paramsInheritanceStrategy);n.params=Object.freeze(e.params),n.data=Object.freeze(e.data),a.children.forEach(i=>this.inheritParamsAndData(i))}processSegmentGroup(a,n,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(a,n,e):this.processSegment(a,n,e,e.segments,i,!0)}processChildren(a,n,e){const i=[];for(const s of Object.keys(e.children))"primary"===s?i.unshift(s):i.push(s);return(0,Qi.D)(i).pipe(gd(s=>{const l=e.children[s],m=function lM(o,a){const n=o.filter(e=>ya(e)===a);return n.push(...o.filter(e=>ya(e)!==a)),n}(n,s);return this.processSegmentGroup(a,m,l,s)}),function Cb(o,a){return(0,$i.e)(function vb(o,a,n,e,i){return(s,l)=>{let m=n,O=a,k=0;s.subscribe((0,Po.x)(l,W=>{const ct=k++;O=m?o(O,W,ct):(m=!0,W),e&&l.next(O)},i&&(()=>{m&&l.next(O),l.complete()})))}}(o,a,arguments.length>=2,!0))}((s,l)=>(s.push(...l),s)),Lp(null),function Rp(o,a){const n=arguments.length>=2;return e=>e.pipe(o?(0,so.h)((i,s)=>o(i,s,e)):br.y,Qp(1),n?Lp(a):OC(()=>new Ll))}(),(0,co.z)(s=>{if(null===s)return $l(e);const l=xM(s);return function n0(o){o.sort((a,n)=>a.value.outlet===tn?-1:n.value.outlet===tn?1:a.value.outlet.localeCompare(n.value.outlet))}(l),(0,Se.of)(l)}))}processSegment(a,n,e,i,s,l){return(0,Qi.D)(n).pipe(gd(m=>this.processSegmentAgainstRoute(m._injector??a,n,m,e,i,s,l).pipe(Fl(O=>{if(O instanceof hf)return(0,Se.of)(null);throw O}))),Rl(m=>!!m),Fl(m=>{if(lf(m))return function bM(o,a,n){return 0===a.length&&!o.children[n]}(e,i,s)?(0,Se.of)([]):$l(e);throw m}))}processSegmentAgainstRoute(a,n,e,i,s,l,m){return function yM(o,a,n,e){return!!(ya(o)===e||e!==tn&&Zd(a,n,o))&&("**"===o.path||ho(a,o,n).matched)}(e,i,s,l)?void 0===e.redirectTo?this.matchSegmentAgainstRoute(a,i,e,s,l,m):m&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(a,i,n,e,s,l):$l(i):$l(i)}expandSegmentAgainstRouteUsingRedirect(a,n,e,i,s,l){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(a,e,i,l):this.expandRegularSegmentAgainstRouteUsingRedirect(a,n,e,i,s,l)}expandWildCardWithParamsAgainstRouteUsingRedirect(a,n,e,i){const s=this.applyRedirects.applyRedirectCommands([],e.redirectTo,{});return e.redirectTo.startsWith("/")?CM(s):this.applyRedirects.lineralizeSegments(e,s).pipe((0,co.z)(l=>{const m=new qn(l,{});return this.processSegment(a,n,m,l,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(a,n,e,i,s,l){const{matched:m,consumedSegments:O,remainingSegments:k,positionalParamSegments:W}=ho(n,i,s);if(!m)return $l(n);const ct=this.applyRedirects.applyRedirectCommands(O,i.redirectTo,W);return i.redirectTo.startsWith("/")?CM(ct):this.applyRedirects.lineralizeSegments(i,ct).pipe((0,co.z)(Ct=>this.processSegment(a,e,n,Ct.concat(k),l,!1)))}matchSegmentAgainstRoute(a,n,e,i,s,l){let m;if("**"===e.path){const O=i.length>0?xC(i).parameters:{},k=new Od(i,O,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,wM(e),ya(e),e.component??e._loadedComponent??null,e,Sd(e));m=(0,Se.of)({snapshot:k,consumedSegments:[],remainingSegments:[]}),n.children={}}else m=Ju(n,e,i,a).pipe((0,bn.U)(({matched:O,consumedSegments:k,remainingSegments:W,parameters:ct})=>O?{snapshot:new Od(k,ct,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,wM(e),ya(e),e.component??e._loadedComponent??null,e,Sd(e)),consumedSegments:k,remainingSegments:W}:null));return m.pipe((0,ro.w)(O=>null===O?$l(n):this.getChildConfig(a=e._injector??a,e,i).pipe((0,ro.w)(({routes:k})=>{const W=e._loadedInjector??a,{snapshot:ct,consumedSegments:Ct,remainingSegments:Ot}=O,{segmentGroup:xt,slicedSegments:Gt}=Wb(n,Ct,Ot,k);if(0===Gt.length&&xt.hasChildren())return this.processChildren(W,k,xt).pipe((0,bn.U)(De=>null===De?null:[new qa(ct,De)]));if(0===k.length&&0===Gt.length)return(0,Se.of)([new qa(ct,[])]);const se=ya(e)===s;return this.processSegment(W,k,xt,Gt,se?tn:s,!0).pipe((0,bn.U)(De=>[new qa(ct,De)]))}))))}getChildConfig(a,n,e){return n.children?(0,Se.of)({routes:n.children,injector:a}):n.loadChildren?void 0!==n._loadedRoutes?(0,Se.of)({routes:n._loadedRoutes,injector:n._loadedInjector}):function yk(o,a,n,e){const i=a.canLoad;if(void 0===i||0===i.length)return(0,Se.of)(!0);const s=i.map(l=>{const m=Yl(l,o);return Rr(function zb(o){return o&&kd(o.canLoad)}(m)?m.canLoad(a,n):o.runInContext(()=>m(a,n)))});return(0,Se.of)(s).pipe(Bc(),df())}(a,n,e).pipe((0,co.z)(i=>i?this.configLoader.loadChildren(a,n).pipe(Ai(s=>{n._loadedRoutes=s.routes,n._loadedInjector=s.injector})):function Wl(o){return wc(sf(!1,3))}())):(0,Se.of)({routes:[],injector:a})}}function Ad(o){const a=o.value.routeConfig;return a&&""===a.path}function xM(o){const a=[],n=new Set;for(const e of o){if(!Ad(e)){a.push(e);continue}const i=a.find(s=>e.value.routeConfig===s.value.routeConfig);void 0!==i?(i.children.push(...e.children),n.add(i)):a.push(e)}for(const e of n){const i=xM(e.children);a.push(new qa(e.value,i))}return a.filter(e=>!n.has(e))}function wM(o){return o.data||{}}function Sd(o){return o.resolve||{}}function AM(o){return"string"==typeof o.title||null===o.title}function uf(o){return(0,ro.w)(a=>{const n=o(a);return n?(0,Qi.D)(n).pipe((0,bn.U)(()=>a)):(0,Se.of)(a)})}const tg=new t.OlP("ROUTES");let Uu=(()=>{var o;class a{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=(0,t.f3M)(t.Sil)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return(0,Se.of)(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Rr(e.loadComponent()).pipe((0,bn.U)(DM),Ai(l=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=l}),Qc(()=>{this.componentLoaders.delete(e)})),s=new zg(i,()=>new sn.x).pipe(ov());return this.componentLoaders.set(e,s),s}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return(0,Se.of)({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const l=function SM(o,a,n,e){return Rr(o.loadChildren()).pipe((0,bn.U)(DM),(0,co.z)(i=>i instanceof t.YKP||Array.isArray(i)?(0,Se.of)(i):(0,Qi.D)(a.compileModuleAsync(i))),(0,bn.U)(i=>{e&&e(o);let s,l,m=!1;return Array.isArray(i)?(l=i,!0):(s=i.create(n).injector,l=s.get(tg,[],{optional:!0,self:!0}).flat()),{routes:l.map(Iu),injector:s}}))}(i,this.compiler,e,this.onLoadEndListener).pipe(Qc(()=>{this.childrenLoaders.delete(i)})),m=new zg(l,()=>new sn.x).pipe(ov());return this.childrenLoaders.set(i,m),m}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();function DM(o){return function EM(o){return o&&"object"==typeof o&&"default"in o}(o)?o.default:o}let Id=(()=>{var o;class a{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new sn.x,this.transitionAbortSubject=new sn.x,this.configLoader=(0,t.f3M)(Uu),this.environmentInjector=(0,t.f3M)(t.lqb),this.urlSerializer=(0,t.f3M)(ud),this.rootContexts=(0,t.f3M)(Cd),this.inputBindingEnabled=null!==(0,t.f3M)(yd,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>(0,Se.of)(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=s=>this.events.next(new Eb(s)),this.configLoader.onLoadStartListener=s=>this.events.next(new jC(s))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e,i,s){return this.transitions=new zn.X({id:0,currentUrlTree:i,currentRawUrl:i,currentBrowserUrl:i,extractedUrl:e.urlHandlingStrategy.extract(i),urlAfterRedirects:e.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:qc,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,so.h)(l=>0!==l.id),(0,bn.U)(l=>({...l,extractedUrl:e.urlHandlingStrategy.extract(l.rawUrl)})),(0,ro.w)(l=>{this.currentTransition=l;let m=!1,O=!1;return(0,Se.of)(l).pipe(Ai(k=>{this.currentNavigation={id:k.id,initialUrl:k.rawUrl,extractedUrl:k.extractedUrl,trigger:k.source,extras:k.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,ro.w)(k=>{const W=k.currentBrowserUrl.toString(),ct=!e.navigated||k.extractedUrl.toString()!==W||W!==k.currentUrlTree.toString();if(!ct&&"reload"!==(k.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const Ot="";return this.events.next(new vd(k.id,this.urlSerializer.serialize(k.rawUrl),Ot,0)),k.resolve(null),Ql.E}if(e.urlHandlingStrategy.shouldProcessUrl(k.rawUrl))return(0,Se.of)(k).pipe((0,ro.w)(Ot=>{const xt=this.transitions?.getValue();return this.events.next(new Gl(Ot.id,this.urlSerializer.serialize(Ot.extractedUrl),Ot.source,Ot.restoredState)),xt!==this.transitions?.getValue()?Ql.E:Promise.resolve(Ot)}),function kM(o,a,n,e,i,s){return(0,co.z)(l=>function t0(o,a,n,e,i,s,l="emptyOnly"){return new e0(o,a,n,e,i,l,s).recognize()}(o,a,n,e,l.extractedUrl,i,s).pipe((0,bn.U)(({state:m,tree:O})=>({...l,targetSnapshot:m,urlAfterRedirects:O}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Ai(Ot=>{l.targetSnapshot=Ot.targetSnapshot,l.urlAfterRedirects=Ot.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:Ot.urlAfterRedirects};const xt=new qC(Ot.id,this.urlSerializer.serialize(Ot.extractedUrl),this.urlSerializer.serialize(Ot.urlAfterRedirects),Ot.targetSnapshot);this.events.next(xt)}));if(ct&&e.urlHandlingStrategy.shouldProcessUrl(k.currentRawUrl)){const{id:Ot,extractedUrl:xt,source:Gt,restoredState:se,extras:De}=k,un=new Gl(Ot,this.urlSerializer.serialize(xt),Gt,se);this.events.next(un);const vn=Xp(0,this.rootComponentType).snapshot;return this.currentTransition=l={...k,targetSnapshot:vn,urlAfterRedirects:xt,extras:{...De,skipLocationChange:!1,replaceUrl:!1}},(0,Se.of)(l)}{const Ot="";return this.events.next(new vd(k.id,this.urlSerializer.serialize(k.extractedUrl),Ot,1)),k.resolve(null),Ql.E}}),Ai(k=>{const W=new Ab(k.id,this.urlSerializer.serialize(k.extractedUrl),this.urlSerializer.serialize(k.urlAfterRedirects),k.targetSnapshot);this.events.next(W)}),(0,bn.U)(k=>(this.currentTransition=l={...k,guards:Fb(k.targetSnapshot,k.currentSnapshot,this.rootContexts)},l)),function fM(o,a){return(0,co.z)(n=>{const{targetSnapshot:e,currentSnapshot:i,guards:{canActivateChecks:s,canDeactivateChecks:l}}=n;return 0===l.length&&0===s.length?(0,Se.of)({...n,guardsResult:!0}):function mM(o,a,n,e){return(0,Qi.D)(o).pipe((0,co.z)(i=>function gf(o,a,n,e,i){const s=a&&a.routeConfig?a.routeConfig.canDeactivate:null;if(!s||0===s.length)return(0,Se.of)(!0);const l=s.map(m=>{const O=bd(a)??i,k=Yl(m,O);return Rr(function uM(o){return o&&kd(o.canDeactivate)}(k)?k.canDeactivate(o,a,n,e):O.runInContext(()=>k(o,a,n,e))).pipe(Rl())});return(0,Se.of)(l).pipe(Bc())}(i.component,i.route,n,a,e)),Rl(i=>!0!==i,!0))}(l,e,i,o).pipe((0,co.z)(m=>m&&function Bb(o){return"boolean"==typeof o}(m)?function zc(o,a,n,e){return(0,Qi.D)(a).pipe(gd(i=>vl(function Yb(o,a){return null!==o&&a&&a(new Db(o)),(0,Se.of)(!0)}(i.route.parent,e),function Vb(o,a){return null!==o&&a&&a(new Ib(o)),(0,Se.of)(!0)}(i.route,e),function Pk(o,a,n){const e=a[a.length-1],s=a.slice(0,a.length-1).reverse().map(l=>function qb(o){const a=o.routeConfig?o.routeConfig.canActivateChild:null;return a&&0!==a.length?{node:o,guards:a}:null}(l)).filter(l=>null!==l).map(l=>Os(()=>{const m=l.guards.map(O=>{const k=bd(l.node)??n,W=Yl(O,k);return Rr(function hM(o){return o&&kd(o.canActivateChild)}(W)?W.canActivateChild(e,o):k.runInContext(()=>W(e,o))).pipe(Rl())});return(0,Se.of)(m).pipe(Bc())}));return(0,Se.of)(s).pipe(Bc())}(o,i.path,n),function Kl(o,a,n){const e=a.routeConfig?a.routeConfig.canActivate:null;if(!e||0===e.length)return(0,Se.of)(!0);const i=e.map(s=>Os(()=>{const l=bd(a)??n,m=Yl(s,l);return Rr(function dM(o){return o&&kd(o.canActivate)}(m)?m.canActivate(a,o):l.runInContext(()=>m(a,o))).pipe(Rl())}));return(0,Se.of)(i).pipe(Bc())}(o,i.route,n))),Rl(i=>!0!==i,!0))}(e,s,o,a):(0,Se.of)(m)),(0,bn.U)(m=>({...n,guardsResult:m})))})}(this.environmentInjector,k=>this.events.next(k)),Ai(k=>{if(l.guardsResult=k.guardsResult,qr(k.guardsResult))throw af(0,k.guardsResult);const W=new HC(k.id,this.urlSerializer.serialize(k.extractedUrl),this.urlSerializer.serialize(k.urlAfterRedirects),k.targetSnapshot,!!k.guardsResult);this.events.next(W)}),(0,so.h)(k=>!!k.guardsResult||(this.cancelNavigationTransition(k,"",3),!1)),uf(k=>{if(k.guards.canActivateChecks.length)return(0,Se.of)(k).pipe(Ai(W=>{const ct=new Sb(W.id,this.urlSerializer.serialize(W.extractedUrl),this.urlSerializer.serialize(W.urlAfterRedirects),W.targetSnapshot);this.events.next(ct)}),(0,ro.w)(W=>{let ct=!1;return(0,Se.of)(W).pipe(function TM(o,a){return(0,co.z)(n=>{const{targetSnapshot:e,guards:{canActivateChecks:i}}=n;if(!i.length)return(0,Se.of)(n);let s=0;return(0,Qi.D)(i).pipe(gd(l=>function ZM(o,a,n,e){const i=o.routeConfig,s=o._resolve;return void 0!==i?.title&&!AM(i)&&(s[Qr]=i.title),function o0(o,a,n,e){const i=function Ed(o){return[...Object.keys(o),...Object.getOwnPropertySymbols(o)]}(o);if(0===i.length)return(0,Se.of)({});const s={};return(0,Qi.D)(i).pipe((0,co.z)(l=>function Dd(o,a,n,e){const i=bd(a)??e,s=Yl(o,i);return Rr(s.resolve?s.resolve(a,n):i.runInContext(()=>s(a,n)))}(o[l],a,n,e).pipe(Rl(),Ai(m=>{s[l]=m}))),Qp(1),sv(s),Fl(l=>lf(l)?Ql.E:wc(l)))}(s,o,a,e).pipe((0,bn.U)(l=>(o._resolvedData=l,o.data=Pa(o,n).resolve,i&&AM(i)&&(o.data[Qr]=i.title),null)))}(l.route,e,o,a)),Ai(()=>s++),Qp(1),(0,co.z)(l=>s===i.length?(0,Se.of)(n):Ql.E))})}(e.paramsInheritanceStrategy,this.environmentInjector),Ai({next:()=>ct=!0,complete:()=>{ct||this.cancelNavigationTransition(W,"",2)}}))}),Ai(W=>{const ct=new Ei(W.id,this.urlSerializer.serialize(W.extractedUrl),this.urlSerializer.serialize(W.urlAfterRedirects),W.targetSnapshot);this.events.next(ct)}))}),uf(k=>{const W=ct=>{const Ct=[];ct.routeConfig?.loadComponent&&!ct.routeConfig._loadedComponent&&Ct.push(this.configLoader.loadComponent(ct.routeConfig).pipe(Ai(Ot=>{ct.component=Ot}),(0,bn.U)(()=>{})));for(const Ot of ct.children)Ct.push(...W(Ot));return Ct};return Eg(W(k.targetSnapshot.root)).pipe(Lp(),(0,_i.q)(1))}),uf(()=>this.afterPreactivation()),(0,bn.U)(k=>{const W=function Jb(o,a,n){const e=Vl(o,a._root,n?n._root:void 0);return new YC(e,a)}(e.routeReuseStrategy,k.targetSnapshot,k.currentRouterState);return this.currentTransition=l={...k,targetRouterState:W},l}),Ai(()=>{this.events.next(new Br)}),((o,a,n,e)=>(0,bn.U)(i=>(new Rb(a,i.targetRouterState,i.currentRouterState,n,e).activate(o),i)))(this.rootContexts,e.routeReuseStrategy,k=>this.events.next(k),this.inputBindingEnabled),(0,_i.q)(1),Ai({next:k=>{m=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new jr(k.id,this.urlSerializer.serialize(k.extractedUrl),this.urlSerializer.serialize(k.urlAfterRedirects))),e.titleStrategy?.updateTitle(k.targetRouterState.snapshot),k.resolve(!0)},complete:()=>{m=!0}}),(0,mc.R)(this.transitionAbortSubject.pipe(Ai(k=>{throw k}))),Qc(()=>{m||O||this.cancelNavigationTransition(l,"",1),this.currentNavigation?.id===l.id&&(this.currentNavigation=null)}),Fl(k=>{if(O=!0,nM(k))this.events.next(new Hc(l.id,this.urlSerializer.serialize(l.extractedUrl),k.message,k.cancellationCode)),function eM(o){return nM(o)&&qr(o.url)}(k)?this.events.next(new $p(k.url)):l.resolve(!1);else{this.events.next(new Yp(l.id,this.urlSerializer.serialize(l.extractedUrl),k,l.targetSnapshot??void 0));try{l.resolve(e.errorHandler(k))}catch(W){l.reject(W)}}return Ql.E}))}))}cancelNavigationTransition(e,i,s){const l=new Hc(e.id,this.urlSerializer.serialize(e.extractedUrl),i,s);this.events.next(l),e.resolve(!1)}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();function IM(o){return o!==qc}let NM=(()=>{var o;class a{buildTitle(e){let i,s=e.root;for(;void 0!==s;)i=this.getResolvedTitleForRoute(s)??i,s=s.children.find(l=>l.outlet===tn);return i}getResolvedTitleForRoute(e){return e.data[Qr]}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return(0,t.f3M)(xk)},providedIn:"root"}),a})(),xk=(()=>{var o;class a extends NM{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return(o=a).\u0275fac=function(e){return new(e||o)(t.LFG(M))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})(),wk=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return(0,t.f3M)(Tk)},providedIn:"root"}),a})();class kk{shouldDetach(a){return!1}store(a,n){}shouldAttach(a){return!1}retrieve(a){return null}shouldReuseRoute(a,n){return a.routeConfig===n.routeConfig}}let Tk=(()=>{var o;class a extends kk{}return(o=a).\u0275fac=function(){let n;return function(i){return(n||(n=t.n5z(o)))(i||o)}}(),o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();const Nd=new t.OlP("",{providedIn:"root",factory:()=>({})});let Lu=(()=>{var o;class a{}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:function(){return(0,t.f3M)(a0)},providedIn:"root"}),a})(),a0=(()=>{var o;class a{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();var Jd=function(o){return o[o.COMPLETE=0]="COMPLETE",o[o.FAILED=1]="FAILED",o[o.REDIRECTING=2]="REDIRECTING",o}(Jd||{});function _f(o,a){o.events.pipe((0,so.h)(n=>n instanceof jr||n instanceof Hc||n instanceof Yp||n instanceof vd),(0,bn.U)(n=>n instanceof jr||n instanceof vd?Jd.COMPLETE:n instanceof Hc&&(0===n.code||1===n.code)?Jd.REDIRECTING:Jd.FAILED),(0,so.h)(n=>n!==Jd.REDIRECTING),(0,_i.q)(1)).subscribe(()=>{a()})}function Ud(o){throw o}function s0(o,a,n){return a.parse("/")}const r0={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},c0={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Di=(()=>{var o;class a{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.location.getState()?.\u0275routerPageId??this.currentPageId}get events(){return this._events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=(0,t.f3M)(t.c2e),this.isNgZoneEnabled=!1,this._events=new sn.x,this.options=(0,t.f3M)(Nd,{optional:!0})||{},this.pendingTasks=(0,t.f3M)(t.HDt),this.errorHandler=this.options.errorHandler||Ud,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||s0,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=(0,t.f3M)(Lu),this.routeReuseStrategy=(0,t.f3M)(wk),this.titleStrategy=(0,t.f3M)(NM),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=(0,t.f3M)(tg,{optional:!0})?.flat()??[],this.navigationTransitions=(0,t.f3M)(Id),this.urlSerializer=(0,t.f3M)(ud),this.location=(0,t.f3M)(x.Ye),this.componentInputBindingEnabled=!!(0,t.f3M)(yd,{optional:!0}),this.eventsSubscription=new kr.w0,this.isNgZoneEnabled=(0,t.f3M)(t.R0b)instanceof t.R0b&&t.R0b.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Rc,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=Xp(0,null),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const e=this.navigationTransitions.events.subscribe(i=>{try{const{currentTransition:s}=this.navigationTransitions;if(null===s)return void(JM(i)&&this._events.next(i));if(i instanceof Gl)IM(s.source)&&(this.browserUrlTree=s.extractedUrl);else if(i instanceof vd)this.rawUrlTree=s.rawUrl;else if(i instanceof qC){if("eager"===this.urlUpdateStrategy){if(!s.extras.skipLocationChange){const l=this.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl);this.setBrowserUrl(l,s)}this.browserUrlTree=s.urlAfterRedirects}}else if(i instanceof Br)this.currentUrlTree=s.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),this.routerState=s.targetRouterState,"deferred"===this.urlUpdateStrategy&&(s.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,s),this.browserUrlTree=s.urlAfterRedirects);else if(i instanceof Hc)0!==i.code&&1!==i.code&&(this.navigated=!0),(3===i.code||2===i.code)&&this.restoreHistory(s);else if(i instanceof $p){const l=this.urlHandlingStrategy.merge(i.url,s.currentRawUrl),m={skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||IM(s.source)};this.scheduleNavigation(l,qc,null,m,{resolve:s.resolve,reject:s.reject,promise:s.promise})}i instanceof Yp&&this.restoreHistory(s,!0),i instanceof jr&&(this.navigated=!0),JM(i)&&this._events.next(i)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),qc,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,s){const l={replaceUrl:!0},m=s?.navigationId?s:null;if(s){const k={...s};delete k.navigationId,delete k.\u0275routerPageId,0!==Object.keys(k).length&&(l.state=k)}const O=this.parseUrl(e);this.scheduleNavigation(O,i,m,l)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Iu),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){const{relativeTo:s,queryParams:l,fragment:m,queryParamsHandling:O,preserveFragment:k}=i,W=k?this.currentUrlTree.fragment:m;let Ct,ct=null;switch(O){case"merge":ct={...this.currentUrlTree.queryParams,...l};break;case"preserve":ct=this.currentUrlTree.queryParams;break;default:ct=l||null}null!==ct&&(ct=this.removeEmptyProps(ct));try{Ct=Bp(s?s.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof e[0]||!e[0].startsWith("/"))&&(e=[]),Ct=this.currentUrlTree.root}return zp(Ct,e,ct,W??null)}navigateByUrl(e,i={skipLocationChange:!1}){const s=qr(e)?e:this.parseUrl(e),l=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(l,qc,null,i)}navigate(e,i={skipLocationChange:!1}){return function Zk(o){for(let a=0;a{const l=e[s];return null!=l&&(i[s]=l),i},{})}scheduleNavigation(e,i,s,l,m){if(this.disposed)return Promise.resolve(!1);let O,k,W;m?(O=m.resolve,k=m.reject,W=m.promise):W=new Promise((Ct,Ot)=>{O=Ct,k=Ot});const ct=this.pendingTasks.add();return _f(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(ct))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,currentBrowserUrl:this.browserUrlTree,rawUrl:e,extras:l,resolve:O,reject:k,promise:W,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),W.catch(Ct=>Promise.reject(Ct))}setBrowserUrl(e,i){const s=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(s)||i.extras.replaceUrl){const m={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(s,"",m)}else{const l={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId+1)};this.location.go(s,"",l)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const l=this.currentPageId-this.browserPageId;0!==l?this.location.historyGo(l):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===l&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return(o=a).\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();function JM(o){return!(o instanceof Br||o instanceof $p)}let Vc=(()=>{var o;class a{constructor(e,i,s,l,m,O){this.router=e,this.route=i,this.tabIndexAttribute=s,this.renderer=l,this.el=m,this.locationStrategy=O,this.href=null,this.commands=null,this.onChanges=new sn.x,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const k=m.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===k||"area"===k,this.isAnchorElement?this.subscription=e.events.subscribe(W=>{W instanceof jr&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,s,l,m){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||s||l||m||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:(0,t.P3R)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const s=this.renderer,l=this.el.nativeElement;null!==i?s.setAttribute(l,e,i):s.removeAttribute(l,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return(o=a).\u0275fac=function(e){return new(e||o)(t.Y36(Di),t.Y36(ri),t.$8M("tabindex"),t.Y36(t.Qsj),t.Y36(t.SBq),t.Y36(x.S$))},o.\u0275dir=t.lG2({type:o,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&t.NdJ("click",function(l){return i.onClick(l.button,l.ctrlKey,l.shiftKey,l.altKey,l.metaKey)}),2&e&&t.uIk("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:["preserveFragment","preserveFragment",t.VuI],skipLocationChange:["skipLocationChange","skipLocationChange",t.VuI],replaceUrl:["replaceUrl","replaceUrl",t.VuI],routerLink:"routerLink"},standalone:!0,features:[t.Xq5,t.TTD]}),a})();class eg{}let h0=(()=>{var o;class a{constructor(e,i,s,l,m){this.router=e,this.injector=s,this.preloadingStrategy=l,this.loader=m}setUpPreloading(){this.subscription=this.router.events.pipe((0,so.h)(e=>e instanceof jr),gd(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const s=[];for(const l of i){l.providers&&!l._injector&&(l._injector=(0,t.MMx)(l.providers,e,`Route: ${l.path}`));const m=l._injector??e,O=l._loadedInjector??m;(l.loadChildren&&!l._loadedRoutes&&void 0===l.canLoad||l.loadComponent&&!l._loadedComponent)&&s.push(this.preloadConfig(m,l)),(l.children||l._loadedRoutes)&&s.push(this.processRoutes(O,l.children??l._loadedRoutes))}return(0,Qi.D)(s).pipe((0,ml.J)())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let s;s=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):(0,Se.of)(null);const l=s.pipe((0,co.z)(m=>null===m?(0,Se.of)(void 0):(i._loadedRoutes=m.routes,i._loadedInjector=m.injector,this.processRoutes(m.injector??e,m.routes))));if(i.loadComponent&&!i._loadedComponent){const m=this.loader.loadComponent(i);return(0,Qi.D)([l,m]).pipe((0,ml.J)())}return l})}}return(o=a).\u0275fac=function(e){return new(e||o)(t.LFG(Di),t.LFG(t.Sil),t.LFG(t.lqb),t.LFG(eg),t.LFG(Uu))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),a})();const Qu=new t.OlP("");let UM=(()=>{var o;class a{constructor(e,i,s,l,m={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=s,this.zone=l,this.options=m,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},m.scrollPositionRestoration=m.scrollPositionRestoration||"disabled",m.anchorScrolling=m.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Gl?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof jr?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof vd&&0===e.code&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Kp&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Kp(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return(o=a).\u0275fac=function(e){t.$Z()},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac}),a})();function Ha(o,a){return{\u0275kind:o,\u0275providers:a}}function QM(){const o=(0,t.f3M)(t.zs3);return a=>{const n=o.get(t.z2F);if(a!==n.components[0])return;const e=o.get(Di),i=o.get(RM);1===o.get(Ld)&&e.initialNavigation(),o.get(qM,null,t.XFs.Optional)?.setUpPreloading(),o.get(Qu,null,t.XFs.Optional)?.init(),e.resetRootComponentType(n.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}const RM=new t.OlP("",{factory:()=>new sn.x}),Ld=new t.OlP("",{providedIn:"root",factory:()=>1}),qM=new t.OlP("");function v0(o){return Ha(0,[{provide:qM,useExisting:h0},{provide:eg,useExisting:o}])}const pf=new t.OlP("ROUTER_FORROOT_GUARD"),HM=[x.Ye,{provide:ud,useClass:Fp},Di,Cd,{provide:ri,useFactory:function LM(o){return o.routerState.root},deps:[Di]},Uu,[]];function M0(){return new t.PXZ("Router",Di)}let jM=(()=>{var o;class a{constructor(e){}static forRoot(e,i){return{ngModule:a,providers:[HM,[],{provide:tg,multi:!0,useValue:e},{provide:pf,useFactory:y0,deps:[[Di,new t.FiY,new t.tp0]]},{provide:Nd,useValue:i||{}},i?.useHash?{provide:x.S$,useClass:x.Do}:{provide:x.S$,useClass:x.b0},{provide:Qu,useFactory:()=>{const o=(0,t.f3M)(x.EM),a=(0,t.f3M)(t.R0b),n=(0,t.f3M)(Nd),e=(0,t.f3M)(Id),i=(0,t.f3M)(ud);return n.scrollOffset&&o.setOffset(n.scrollOffset),new UM(i,e,o,a,n)}},i?.preloadingStrategy?v0(i.preloadingStrategy).\u0275providers:[],{provide:t.PXZ,multi:!0,useFactory:M0},i?.initialNavigation?b0(i):[],i?.bindToComponentInputs?Ha(8,[XC,{provide:yd,useExisting:XC}]).\u0275providers:[],[{provide:Ru,useFactory:QM},{provide:t.tb,multi:!0,useExisting:Ru}]]}}static forChild(e){return{ngModule:a,providers:[{provide:tg,multi:!0,useValue:e}]}}}return(o=a).\u0275fac=function(e){return new(e||o)(t.LFG(pf,8))},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({}),a})();function y0(o){return"guarded"}function b0(o){return["disabled"===o.initialNavigation?Ha(3,[{provide:t.ip1,multi:!0,useFactory:()=>{const a=(0,t.f3M)(Di);return()=>{a.setUpLocationChangeListener()}}},{provide:Ld,useValue:2}]).\u0275providers:[],"enabledBlocking"===o.initialNavigation?Ha(2,[{provide:Ld,useValue:0},{provide:t.ip1,multi:!0,deps:[t.zs3],useFactory:a=>{const n=a.get(x.V_,Promise.resolve());return()=>n.then(()=>new Promise(e=>{const i=a.get(Di),s=a.get(RM);_f(i,()=>{e(!0)}),a.get(Id).afterPreactivation=()=>(e(!0),s.closed?(0,Se.of)(void 0):s),i.initialNavigation()}))}}]).\u0275providers:[]]}const Ru=new t.OlP("");let VM=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"meta",void 0),(0,_.Z)(this,"title","gloomhavensecretariat"),(0,_.Z)(this,"theme",""),this.meta=e}ngOnInit(){this.applyStyle(),d.v.uiChange.subscribe({next:()=>{this.applyStyle(),this.applyAnimations()}})}applyStyle(){this.theme=R.r.settings.theme,"fh"==this.theme?(document.body.classList.remove("modern"),document.body.classList.add("fh"),this.meta.updateTag({name:"theme-color",content:"#a2bbd1"})):"modern"==this.theme?(document.body.classList.remove("fh"),document.body.classList.add("modern"),this.meta.updateTag({name:"theme-color",content:"#0e1f1f"})):(document.body.classList.remove("fh"),document.body.classList.remove("modern"),this.meta.updateTag({name:"theme-color",content:"#936658"})),R.r.settings.portraitMode?document.body.classList.add("portrait-mode"):document.body.classList.remove("portrait-mode"),this.isAppDevMode()||R.r.settings.debugRightClick?document.body.classList.contains("disable-context-menu-touch")&&document.body.classList.remove("disable-context-menu-touch"):document.body.classList.contains("disable-context-menu-touch")||document.body.classList.add("disable-context-menu-touch")}applyAnimations(){R.r.settings.disableAnimations?document.body.classList.add("no-animations"):document.body.classList.remove("no-animations")}isAppDevMode(){return(0,t.X6Q)()}onRightClick(){return!(!this.isAppDevMode()&&!R.r.settings.debugRightClick)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(on))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["app-root"]],decls:2,vars:1,consts:[[1,"container",3,"ngClass","contextmenu"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("contextmenu",function(){return i.onRightClick()}),t._UZ(1,"router-outlet"),t.qZA()),2&e&&t.Q6J("ngClass",i.theme)},dependencies:[x.mk,jc],styles:[".container[_ngcontent-%COMP%]{position:relative;width:100vw;max-width:100vw;height:100vh;max-height:100vh;background-image:url(bg.21a3b4d9cc4773f5.jpg);background-size:cover;overflow:auto}.container.fh[_ngcontent-%COMP%]{background-image:url(bg.b402b1d465a94b7a.jpg)}.container.modern[_ngcontent-%COMP%]{background-image:url(bg.cca7e4a6587b5386.jpg)}"]})),a})();var vt=E(7227),re=E(9310),Gn=E(6140),ae=E(3157),zr=E(9144),ee=E(4377),oe=E(5609),ci=function(o){return o.active="active",o.target="target",o.conditional="conditional",o.ally="ally",o.blank="blank",o.invisible="invisible",o}(ci||{});class Fi{constructor(a,n,e,i){(0,_.Z)(this,"x",0),(0,_.Z)(this,"y",0),(0,_.Z)(this,"type",ci.active),(0,_.Z)(this,"value",""),this.x=a,this.y=n,this.type=e,this.value=i}static fromString(a){let n=new RegExp(/^\((\d+),(\d+),(active|target|conditional|ally|blank|invisible)(\:(\w*))?\)$/).exec(a);if(null==n)return null;let e="";return n.length>5&&n[5]&&(e=n[5]),new Fi(+n[1],+n[2],n[3],e)}static toString(a){return"("+a.x+","+a.y+","+ci[a.type]+(a.value?":"+a.value:"")+")"}}var Lt=E(2098);const Qd=/\%((\w+|\.|\-|\:|\,|\+|\(|\)|\||\_|\[|\]|\||\{|\}|\$|\\|\/|\%U+200B)+)\%/,ja=function(o,a=[],n=!1,e=!1){const i=!e&&R.r.settings.fhStyle||"fh"==e;for(;o.match(Qd);)o=o.replace(Qd,(s,...l)=>{let m=l[0],O="";-1!=m.indexOf(":")&&(O=m.split(":")[1],m=m.split(":")[0]);let k=m.split(".");!O&&-1!=l[0].indexOf(":")&&(O=k[k.length-1]),O||(O="");const W=k[0],ct=k[1];let Ct=s,Ot="";if("condition"==ct)Ot='',O&&(Ot+=''+O+""),Ct=''+(i?" ":R.r.getLabel(m,[""]))+Ot+"";else if("action"!=ct||3!=k.length||k[2].startsWith("specialTarget")||k[2].startsWith("summon")||k[2].startsWith("area"))if("element"==ct){let xt=k[2];"consume"==xt?(Ot='',xt=k[3]):Ot='',Ot+='',Ct=Ot}else if("elementHalf"==ct){let xt=!1;k[2]&&k[2].startsWith("consume")&&(xt=!0);const Gt=O.split("|");Ct=''}else if("action"==ct&&k[2].startsWith("area"))Ct='',O.split("|").forEach(xt=>{const Gt=Fi.fromString(xt);null!=Gt&&(Ct+='')}),Ct+="";else if("initiative"==ct&&3==k.length)Ot='',Ct=''+k[2]+Ot+"";else if("action"==ct&&4==k.length)Ot='',Ct=''+Ot+O+"";else if("game"==W&&"items"==ct&&4==k.length)Ot='',Ct=''+Ot+O+"";else if("game"==W&&"itemFh"==ct&&3==k.length){const xt=+k[2];Ct=''+(xt<100?"0":"")+(xt<10?"0":"")+xt+""}else if("card"==ct&&3==k.length){let xt=k[2],Gt="";O&&(Gt=''+O+""),Ot='',Ct=''+Ot+''+Gt+""}else if("attackmodifier"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("experience"==ct)Ot='',Ct=''+Ot+(O?''+O+"":"")+"";else if("characterIcon"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("characterIconColored"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("characterIconColoredBg"==ct&&3==k.length){const xt=k[2];Ot='',Ct=''+Ot+""}else if("characterIconIdentity"==ct&&4==k.length)Ot='',Ct=''+Ot+"";else if("characterIconIdentityColored"==ct&&4==k.length)Ot='',Ct=''+Ot+"";else if("characterIconIdentityColoredBg"==ct&&4==k.length){const xt=k[2];Ot='',Ct=''+Ot+""}else if("characterToken"==ct&&k.length>=3){const xt=k[2];let Gt=d.v.characterManager.characterIcon(xt),se=!1;k.length>3&&(Gt="./assets/images/character/token/"+xt+"-"+k[3]+".svg",se=!0),Ot='',Ct=''+Ot+""}else if("coloredToken"==ct&&k.length>3)Ot='',Ct=''+Ot+"";else if("monsterType"==ct&&3==k.length){const xt=k[2];Ct=''+R.r.getLabel("game.monster."+xt)+""}else if("mapMarker"==ct&&3==k.length)"element"==k[2]?(Ot='',Ct=''+Ot+""):Ct=''+k[2]+"";else if("objectiveMarker"==ct&&3==k.length)Ct=''+k[2]+"";else if("scenarioNumber"==ct)Ct=''+O+"";else if(i&&"target"==ct&&2==k.length)Ot='',Ct=''+Ot+"";else if(i||"damage"!=ct)if(i&&"damage"==ct)Ot='',Ct=' '+Ot+O+"";else if("loot"==ct&&4==k.length)Ot='',Ct=''+Ot+"";else if("resource"==ct&&3==k.length)Ot='',Ct=''+Ot+"";else if("section"==ct&&O)Ot='',Ct=''+Ot+O+"";else if("checkmark"==ct)Ct='';else if("itemSlot"==ct&&O)Ct='';else if("townGuardAm"==ct&&3==k.length&&O){const xt=k[2];let Gt="";xt==Lt.tI.plus?Gt="+":xt==Lt.tI.minus?Gt="-":xt==Lt.tI.multiply&&(Gt="x"),Ct=''+Gt+O+""}else if("fhIcon"==ct&&O)Ot='',Ct=''+Ot+"";else if("trait"==ct&&O)Ot='',Ct=''+Ot+R.r.getLabel("data.character.traits."+O)+"";else{let xt=m.split(":").splice(1).map(Gt=>ja(R.r.getLabel(Gt),a,n));O&&(xt=[O,...xt]),xt.push(...a),Ct=R.r.getLabel(m.split(":")[0],xt)+Ot}else Ct=''+R.r.getLabel("game.damage",[O])+"";else{k.splice(0,1);const xt=-1!=q1.indexOf(k[k.length-1]);Ot='',Ct=''+(i?" ":R.r.getLabel(m))+Ot+O+""}return Ct});return YM(o,n)},YM=function(o,a){for(;o.match(ae.HY);)o=o.replace(ae.HY,(n,...e)=>{if(R.r.settings.calculate&&!a)return""+(0,ae.j9)(n);{let i=e[2];const s=i&&i.startsWith("$");return s&&(i=i.replace("$","")),s?e[0]+" "+R.r.getLabel("game.custom."+i):e[0]}});for(;o.match(ae.et);)o=o.replace(ae.et,(n,...e)=>{let i=e[2];const s=i&&i.startsWith("$");return s&&(i=i.replace("$","")),s?e[0]+" "+R.r.getLabel("game.custom."+i):e[0]});return o};let ie=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"args",[]),(0,_.Z)(this,"argLabel",!0),(0,_.Z)(this,"empty",!0),(0,_.Z)(this,"attribute",""),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"C",void 0),(0,_.Z)(this,"L",void 0),(0,_.Z)(this,"locale",void 0),(0,_.Z)(this,"calc",!1),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e,e.nativeElement.classList.add("placeholder"),this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.locale=R.r.settings.locale,this.calc=R.r.settings.calculate,this.fhStyle=R.r.settings.fhStyle}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{(this.locale!=R.r.settings.locale||this.C!=d.v.game.figures.filter(e=>e instanceof oe.z).length||this.L!=d.v.game.level||this.fhStyle!=R.r.settings.fhStyle||this.calc!=R.r.settings.calculate)&&(this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.locale=R.r.settings.locale,this.calc=R.r.settings.calculate,this.fhStyle=R.r.settings.fhStyle,this.apply())}}),this.apply()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){(e.args&&JSON.stringify(e.args.previousValue)!=JSON.stringify(e.args.currentValue)||e.value&&e.value.previousValue!=e.value.currentValue||e.style&&e.style.previousValue!=e.style.currentValue)&&this.apply()}apply(){let e=this.args||[];this.argLabel&&(e=e.map(s=>ja(R.r.getLabel(s,[],!1,this.empty),[],this.relative,this.style)));const i=this.value&&ja(R.r.getLabel(this.value,e,!1,this.empty),e,this.relative,this.style)||"";this.attribute?this.el.nativeElement.setAttribute(this.attribute,i):this.el.nativeElement.innerHTML=i}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","ghs-label",""]],inputs:{value:["ghs-label","value"],args:["ghs-label-args","args"],argLabel:["ghs-label-args-replace","argLabel"],empty:["ghs-label-empty","empty"],attribute:["ghs-label-attribute","attribute"],relative:"relative",style:"style"},features:[t.TTD]})),a})();function Rd(o,a=void 0,n=!1){if("number"==typeof o)return n&&0==o?"-":o;if("string"==typeof o&&"0"==o)return"-";if(!o)return n?"-":"";let e=d.v.game.level;if(a&&a>0&&(e=a),R.r.settings.calculate&&(o.match(ae.GB)||o.match(ae.HY)))try{return(0,ae.j9)(o,e)}catch{return console.error("Could not calculate value for: ",o),o}const i=o.match(ae.HY);if(i){let s=i[3];const l=s&&s.startsWith("$");return l&&(s=s.replace("$","")),l?i[1]+" "+R.r.getLabel("game.custom."+s):i[1]}for(;o.match(Qd);)o=o.replace(Qd,(s,...l)=>R.r.getLabel(l[0]));return o||(n?"-":"")}let ng=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"level",void 0),(0,_.Z)(this,"empty",!1),(0,_.Z)(this,"C",void 0),(0,_.Z)(this,"L",void 0),(0,_.Z)(this,"calc",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e,this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.calc=R.r.settings.calculate}ngOnChanges(e){this.el.nativeElement.innerHTML=Rd(this.value,this.level,this.empty)}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{(this.calc!=R.r.settings.calculate||this.C!=Math.max(2,d.v.characterManager.characterCount())||this.L!=d.v.game.level)&&(this.C=Math.max(2,d.v.characterManager.characterCount()),this.L=d.v.game.level,this.calc=R.r.settings.calculate,this.el.nativeElement.innerHTML=Rd(this.value,this.level,this.empty))}}),this.el.nativeElement.innerHTML=Rd(this.value,this.level,this.empty)}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","value-calc",""]],inputs:{value:["value-calc","value"],level:"level",empty:"empty"},features:[t.TTD]})),a})();const Go=function(o){return{small:o}};function w0(o,a){if(1&o&&(t.TgZ(0,"span",20),t._UZ(1,"ghs-action-hex",21),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(4,Go,n.action.small)),t.xp6(1),t.Q6J("action",n.action)("value",""+n.action.value)("size",n.hexSize)}}function k0(o,a){if(1&o&&t._UZ(0,"img",31),2&o){const n=t.oxw(3);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/condition/"+n.getConditionName(n.getValues(n.action)[0])+".svg",t.LSH)}}function T0(o,a){1&o&&t._UZ(0,"img",32)}function KM(o,a){if(1&o&&(t.TgZ(0,"span",33),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Oqu(n.getValues(n.action)[1])}}function Rk(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function $M(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Rk,2,0,"span",19),t._UZ(2,"ghs-action",36),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("statsCalculation",i.statsCalculation)("highlightElements",i.highlightElements)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function Z0(o,a){if(1&o&&(t.TgZ(0,"div",34),t.YNc(1,$M,3,13,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const mf=function(o){return{"highlight-text":o}},Fk=function(o){return[o]},A0=function(){return[]};function S0(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",22)(1,"span",23),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.TgZ(2,"span",24),t._UZ(3,"span",25),t.qZA(),t.TgZ(4,"span",26),t.YNc(5,k0,1,1,"img",27),t.YNc(6,T0,1,0,"img",28),t.YNc(7,KM,2,1,"span",29),t.qZA()(),t.YNc(8,Z0,3,4,"div",30),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(11,Go,n.action.small)),t.xp6(1),t.Q6J("ngClass",t.VKq(13,mf,n.highlightAction()))("clickBehind",!n.highlightAction()),t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","game.condition."+n.getConditionName(n.getValues(n.action)[0]))("ghs-label-args",n.getValues(n.action).length>1?t.VKq(15,Fk,n.getValues(n.action)[1]):t.DdM(17,A0)),t.xp6(2),t.Q6J("ngIf","invalid"!=n.getConditionName(n.getValues(n.action)[0])),t.xp6(1),t.Q6J("ngIf","invalid"==n.getConditionName(n.getValues(n.action)[0])),t.xp6(1),t.Q6J("ngIf",n.getValues(n.action).length>1),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function WM(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",48),t.NdJ("singleClick",function(i){const l=t.CHM(n).$implicit,m=t.oxw(2).index,O=t.oxw(4);return t.KtG(O.elementAction(i,O.action,l,m,!0))}),t._UZ(1,"img",44),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2).index,i=t.oxw(4);t.Q6J("clickBehind",!i.highlightElement(i.getValues(i.action),i.action.valueType==i.ActionValueType.minus,e)),t.xp6(1),t.Q6J("src","./assets/images"+(i.fhStyle?"/fh":"")+"/element/"+n+".svg",t.LSH)}}function XM(o,a){if(1&o&&(t.TgZ(0,"span",46),t.YNc(1,WM,2,2,"span",47),t.qZA()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("ngForOf",n.action.valueType==n.ActionValueType.minus?n.wildToConsume():n.wildToCreate())}}const t1=function(o,a,n){return{consume:o,highlight:a,wild:n}};function e1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",43),t.NdJ("singleClick",function(i){const s=t.CHM(n),l=s.$implicit,m=s.index,O=t.oxw(4);return t.KtG(O.elementAction(i,O.action,l,m))}),t._UZ(1,"img",44),t.YNc(2,XM,2,1,"span",45),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Q6J("clickBehind",!i.highlightElement(i.getValues(i.action),i.action.valueType==i.ActionValueType.minus,e))("ngClass",t.kEZ(4,t1,i.action.valueType==i.ActionValueType.minus,i.highlightElement(i.getValues(i.action),i.action.valueType==i.ActionValueType.minus,e),"wild"==n)),t.xp6(1),t.Q6J("src","./assets/images"+(i.fhStyle?"/fh":"")+"/element/"+n+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf","wild"==n)}}function n1(o,a){1&o&&(t.TgZ(0,"span",49),t._uU(1,":"),t.qZA())}function o1(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",40),t.YNc(2,e1,3,8,"span",41),t.YNc(3,n1,2,0,"span",42),t.qZA(),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngForOf",n.getValues(n.action)),t.xp6(1),t.Q6J("ngIf",n.action.valueType==n.ActionValueType.minus&&n.subActions.length>0)}}function a1(o,a){1&o&&(t.TgZ(0,"span",49),t._uU(1,":"),t.qZA())}const vf=function(o,a){return{consume:o,highlight:a}};function s1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",40)(1,"span",50),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.elementAction(i,s.action,s.getValues(s.action)[0],0))}),t._UZ(2,"img",44),t.qZA(),t.TgZ(3,"span",50),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.elementAction(i,s.action,s.getValues(s.action)[1],1))}),t._UZ(4,"img",44),t.qZA(),t.YNc(5,a1,2,0,"span",42),t.qZA()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.WLB(7,vf,n.action.valueType==n.ActionValueType.minus,n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,0)))("clickBehind",!n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,0)),t.xp6(1),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/element/"+n.getValues(n.action)[0]+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.WLB(10,vf,n.action.valueType==n.ActionValueType.minus,n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,1)))("clickBehind",!n.highlightElement(n.getValues(n.action),n.action.valueType==n.ActionValueType.minus,1)),t.xp6(1),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/element/"+n.getValues(n.action)[1]+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.action.valueType==n.ActionValueType.minus)}}function r1(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function Fd(o,a){if(1&o&&(t.ynx(0),t.YNc(1,r1,2,0,"span",19),t._UZ(2,"ghs-action",52),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("relative",i.relative||i.forceRelative)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements&&(i.action.valueType!=i.ActionValueType.minus||i.elementActionsPerformed(i.getValues(i.action),!0)))("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function c1(o,a){if(1&o&&(t.TgZ(0,"div",51),t.YNc(1,Fd,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const l1=function(o,a){return{small:o,"action-element-consume":a}};function g1(o,a){if(1&o&&(t.TgZ(0,"span",37),t.YNc(1,o1,4,2,"ng-container",19),t.YNc(2,s1,6,13,"span",38),t.YNc(3,c1,3,4,"div",39),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.WLB(4,l1,n.action.small,n.action.valueType==n.ActionValueType.minus)),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.element),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.elementHalf&&2==n.getValues(n.action).length),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function d1(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function h1(o,a){if(1&o&&(t.ynx(0),t.YNc(1,d1,2,0,"span",19),t._UZ(2,"ghs-action",59),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(5);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("relative",i.relative)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.getMonsterType(""+i.action.value))}}function u1(o,a){if(1&o&&(t.TgZ(0,"div",58),t.YNc(1,h1,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function E0(o,a){if(1&o&&(t.TgZ(0,"span",54)(1,"span",55),t._UZ(2,"span",56),t._uU(3,":"),t.qZA(),t.YNc(4,u1,3,4,"div",57),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngClass","monster-type-"+n.action.value),t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","monster."+n.action.value),t.xp6(2),t.Q6J("ngIf",n.subActions.length>0)}}function qk(o,a){if(1&o&&(t.ynx(0),t.YNc(1,E0,5,8,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.relative||n.hasEntities(""+n.action.value))}}function Hk(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function _1(o,a){if(1&o&&(t.TgZ(0,"span",66),t._uU(1),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Oqu(n.getEliteRange())}}function p1(o,a){if(1&o&&(t.TgZ(0,"span",64)(1,"span"),t._uU(2),t.qZA(),t.YNc(3,Hk,2,0,"span",19),t.YNc(4,_1,2,1,"span",65),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(4,Go,n.action.small)),t.xp6(2),t.Oqu(n.getRange()),t.xp6(1),t.Q6J("ngIf",n.getEliteRange()&&n.getRange()!=n.getEliteRange()),t.xp6(1),t.Q6J("ngIf",n.getEliteRange()&&n.getRange()!=n.getEliteRange())}}function f1(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function D0(o,a){if(1&o&&(t.ynx(0),t.YNc(1,f1,2,0,"span",19),t._UZ(2,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function I0(o,a){if(1&o&&(t.TgZ(0,"div",67),t.YNc(1,D0,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const qd=function(o,a){return{"text-white":o,small:a}},N0=function(){return["alliesRange:","alliesRangeAffect:","allyAffectRange:","enemiesRange:","enemiesRangeAffect:","enemyRange:"]};function Cf(o,a){if(1&o&&(t.TgZ(0,"span",60),t._UZ(1,"span",61),t.YNc(2,p1,5,6,"span",62),t.YNc(3,I0,3,4,"div",63),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.specialTarget."+n.getValues(n.action)[0])("ghs-label-args",n.getValues(n.action).splice(1))("relative",n.relative||n.forceRelative)("ngClass",t.WLB(8,qd,!n.right,n.action.small)),t.xp6(1),t.Q6J("ngIf",-1!=t.DdM(11,N0).indexOf(n.action.value+"")),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function J0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function jk(o,a){if(1&o&&(t.TgZ(0,"div",72),t.YNc(1,J0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const Hd=function(o,a){return{small:o,"text-white":a}};function Bk(o,a){if(1&o&&(t.TgZ(0,"span",69),t._UZ(1,"span",70),t.YNc(2,jk,3,4,"div",71),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(6,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function jd(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function U0(o,a){if(1&o&&(t.TgZ(0,"div",72),t.YNc(1,jd,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}const m1=function(o,a){return[o,a]};function L0(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",74)(1,"span",75),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.qZA(),t.YNc(2,U0,3,4,"div",71),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(9,mf,n.highlightAction())),t.xp6(1),t.Akn(n.style),t.Q6J("clickBehind",!n.highlightAction())("ghs-label","game.sufferDamage")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(11,Hd,n.action.small,!n.right))("ghs-label-args",t.WLB(14,m1,n.monster?"%data.monster."+n.monster.name+"%":"",n.action.value+"")),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function Fu(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function v1(o,a){if(1&o&&(t.TgZ(0,"div",72),t.YNc(1,Fu,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function Q0(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",74)(1,"span",76),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.qZA(),t.YNc(2,v1,3,4,"div",71),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(8,mf,n.highlightAction())),t.xp6(1),t.Akn(n.style),t.Q6J("clickBehind",!n.highlightAction())("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(10,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function C1(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",!0)("statsCalculation",!1)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function qu(o,a){if(1&o&&(t.TgZ(0,"div",80),t.YNc(1,C1,1,13,"ghs-action",73),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function R0(o,a){if(1&o&&(t.TgZ(0,"span",77),t._UZ(1,"span",78),t.YNc(2,qu,3,4,"div",79),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(6,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function F0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function M1(o,a){if(1&o&&(t.ynx(0),t.YNc(1,F0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function q0(o,a){if(1&o&&(t.TgZ(0,"span",81),t._UZ(1,"ghs-action-summon",82),t.YNc(2,M1,3,4,"ng-container",19),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(11,Go,n.action.small)),t.xp6(1),t.Akn(n.style),t.Q6J("action",n.action)("right",n.right)("monster",n.monster)("objective",n.objective)("highlight",n.highlightElements)("index",n.actionIndex)("monsterType",n.monsterType),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function H0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function O1(o,a){if(1&o&&(t.ynx(0),t.YNc(1,H0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function Hu(o,a){if(1&o&&(t.TgZ(0,"span",81),t._UZ(1,"ghs-action-summon",83),t.YNc(2,O1,3,4,"ng-container",19),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(12,Go,n.action.small)),t.xp6(1),t.Akn(n.style),t.Q6J("action",n.action)("right",n.right)("monster",n.monster)("objective",n.objective)("spawn",!0)("highlight",n.highlightElements)("index",n.actionIndex)("monsterType",n.monsterType),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function j0(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function B0(o,a){if(1&o&&(t.ynx(0),t.YNc(1,j0,1,13,"ghs-action",73),t.ALo(2,"slice"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.subActions,n.hasAOE?1:0))}}function P1(o,a){if(1&o&&(t.TgZ(0,"span",84),t._UZ(1,"span",70),t.YNc(2,B0,3,4,"ng-container",19),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.action.value+"")("relative",n.relative||n.forceRelative)("ngClass",t.WLB(6,Hd,n.action.small,!n.right)),t.xp6(1),t.Q6J("ngIf",n.subActions.length>0)}}function y1(o,a){if(1&o&&t._UZ(0,"span",90),2&o){const n=t.oxw(6);t.Akn(n.style),t.Q6J("ghs-label",n.getValues(n.action)[0])("relative",n.relative||n.forceRelative)}}function Mf(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function b1(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,y1,1,4,"span",89),t.YNc(2,Mf,2,0,"span",19),t.qZA()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("ngIf",!n.fhStyle),t.xp6(1),t.Q6J("ngIf",n.fhStyle)}}function z0(o,a){if(1&o&&(t.TgZ(0,"span",88),t.YNc(1,b1,3,2,"span",19),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.getValues(n.action).length>0)}}function x1(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.YNc(2,z0,2,1,"span",87),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType),t.xp6(1),t.Q6J("ngIf",!i.inline&&(i.getValues(i.action).length>1&&+i.getValues(i.action)[1]>0&&e<+i.getValues(i.action)[1]-1||i.getValues(i.action).length<2&&e0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function V0(o,a){if(1&o&&(t.TgZ(0,"div",34),t.YNc(1,G0,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.Dn7(2,1,n.subActions,+n.getValues(n.action)[1]+(n.hasAOE?1:0),n.subActions.length))}}function Of(o,a){if(1&o&&(t.TgZ(0,"span",85)(1,"span",86),t.YNc(2,x1,3,14,"ng-container",35),t.ALo(3,"slice"),t.qZA(),t.YNc(4,V0,3,5,"div",30),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(7,Go,n.action.small)),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,3,n.subActions,n.hasAOE?1:0,n.getValues(n.action).length>1?+n.getValues(n.action)[1]:n.subActions.length)),t.xp6(2),t.Q6J("ngIf",n.getValues(n.action).length>1&&n.subActions.length>+n.getValues(n.action)[1])}}function Pf(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function k1(o,a){if(1&o&&(t.TgZ(0,"span",92),t.YNc(1,Pf,2,13,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.Udp("--ghs-grid-columns",n.action.value||2),t.Q6J("ngClass",t.VKq(7,Go,n.action.small)),t.xp6(1),t.Q6J("ngForOf",t.xi3(2,4,n.subActions,n.hasAOE?1:0))}}function yf(o,a){if(1&o&&(t.TgZ(0,"span",85),t.YNc(1,k1,3,9,"span",91),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",t.xi3(2,1,n.subActions,n.hasAOE?1:0).length>0)}}function bf(o,a){if(1&o&&t._UZ(0,"span",96),2&o){const n=t.oxw(3);t.Akn(n.style),t.Q6J("ghs-label",""+n.action.value)("relative",n.relative||n.forceRelative)}}function Y0(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function K0(o,a){if(1&o&&(t.TgZ(0,"span",93),t.YNc(1,bf,1,4,"span",94),t.TgZ(2,"span",95),t.YNc(3,Y0,2,13,"ng-container",35),t.ALo(4,"slice"),t.qZA()()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngIf",n.action.value),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,3,n.subActions,n.hasAOE?1:0))}}function $0(o,a){if(1&o&&t._UZ(0,"span",96),2&o){const n=t.oxw(3);t.Akn(n.style),t.Q6J("ghs-label",""+n.action.value)("relative",n.relative||n.forceRelative)}}function W0(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function T1(o,a){if(1&o&&(t.TgZ(0,"span",97),t.YNc(1,$0,1,4,"span",94),t.TgZ(2,"span",95),t.YNc(3,W0,2,13,"ng-container",35),t.ALo(4,"slice"),t.qZA()()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngIf",n.action.value),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,3,n.subActions,n.hasAOE?1:0))}}function xf(o,a){if(1&o&&t._UZ(0,"span",96),2&o){const n=t.oxw(3);t.Akn(n.style),t.Q6J("ghs-label",""+n.action.value)("relative",n.relative||n.forceRelative)}}function Z1(o,a){1&o&&(t.TgZ(0,"span",100)(1,"span",33),t._uU(2,"!"),t.qZA()())}function A1(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function S1(o,a){if(1&o&&(t.TgZ(0,"span",98),t.YNc(1,xf,1,4,"span",94),t.YNc(2,Z1,3,0,"span",99),t.TgZ(3,"span",95),t.YNc(4,A1,2,13,"ng-container",35),t.ALo(5,"slice"),t.qZA()()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(7,Go,n.action.small)),t.xp6(1),t.Q6J("ngIf",n.action.value),t.xp6(1),t.Q6J("ngIf",!n.action.value),t.xp6(2),t.Q6J("ngForOf",t.xi3(5,4,n.subActions,n.hasAOE?1:0))}}function E1(o,a){if(1&o&&t._UZ(0,"img",106),2&o){const n=t.oxw(3);t.MGl("src","./assets/images/action/card/overlay/",n.getValues(n.action)[0],".svg",t.LSH)}}function X0(o,a){if(1&o&&t._UZ(0,"span",107),2&o){const n=t.oxw(3);t.Udp("mask-image","url('/assets/images/action/card/overlay/"+n.getValues(n.action)[0]+".svg')")("-webkit-mask-image","url('/assets/images/action/card/overlay/"+n.getValues(n.action)[0]+".svg')")}}function D1(o,a){if(1&o&&(t.TgZ(0,"span",33),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Oqu(n.getValues(n.action)[1])}}function I1(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",101)(2,"div",102),t._UZ(3,"img",103),t.YNc(4,E1,1,1,"img",104),t.YNc(5,X0,1,4,"span",105),t.YNc(6,D1,2,1,"span",29),t.qZA()(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(6,Go,n.action.small)),t.xp6(1),t.Q6J("ngClass",n.getValues(n.action)[0]),t.xp6(1),t.MGl("src","./assets/images/action/card/",n.getValues(n.action)[0],".svg",t.LSH),t.xp6(1),t.Q6J("ngIf","slot"!=n.getValues(n.action)[0]&&"slotStart"!=n.getValues(n.action)[0]&&"slotXp"!=n.getValues(n.action)[0]),t.xp6(1),t.Q6J("ngIf","slot"==n.getValues(n.action)[0]||"slotStart"==n.getValues(n.action)[0]||"slotXp"==n.getValues(n.action)[0]),t.xp6(1),t.Q6J("ngIf",n.getValues(n.action).length>1)}}function tx(o,a){if(1&o&&(t.TgZ(0,"span",108)(1,"span",109),t._UZ(2,"span",56),t._uU(3),t.qZA(),t._UZ(4,"ghs-actions",110),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(16,Go,n.action.small)),t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","game.action."+n.action.type),t.xp6(1),t.hij(" ",n.action.value,":"),t.xp6(1),t.Akn(n.style),t.Q6J("actions",n.getSpecial(n.action))("monster",n.monster)("inline",n.inline)("right",n.right)("hexSize",n.hexSize)("highlightElements",n.highlightElements)("relative",n.relative||n.forceRelative)("statsCalculation",n.statsCalculation)("index",n.actionIndex)}}const Bd=function(o){return{"ghs-svg":o}};function ex(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/"+n.action.type+".svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function Ao(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function ig(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",117),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("value-calc",n.getNormalValue())("level",n.level)}}function nx(o,a){1&o&&(t.ynx(0),t.TgZ(1,"span"),t._uU(2,"/"),t.qZA(),t.BQk())}const N1=function(o){return{elite:o}};function zk(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",118),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Q6J("ngClass",t.VKq(3,N1,n.hasEntities(n.MonsterType.normal)))("value-calc",n.getEliteValue())("level",n.level)}}function Gk(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,ig,2,2,"ng-container",19),t.YNc(2,nx,3,0,"ng-container",19),t.YNc(3,zk,2,5,"ng-container",19),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)||!n.monster),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)&&n.hasEntities(n.MonsterType.elite)&&n.getNormalValue()!=n.getEliteValue()),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.elite)&&(n.getNormalValue()!=n.getEliteValue()||!n.hasEntities(n.MonsterType.normal)))}}function J1(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",90),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label",n.getNormalValue()+"")("relative",n.relative||n.forceRelative)}}function wf(o,a){1&o&&(t.ynx(0),t.TgZ(1,"span"),t._uU(2,"/"),t.qZA(),t.BQk())}function Vk(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",119),t.BQk()),2&o){const n=t.oxw(5);t.xp6(1),t.Akn(n.style),t.Q6J("ngClass",t.VKq(5,N1,n.hasEntities(n.MonsterType.normal)))("ghs-label",n.getEliteValue()+"")("relative",n.relative||n.forceRelative)}}function Yk(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t.qZA())}function Kk(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,J1,2,4,"ng-container",19),t.YNc(2,wf,3,0,"ng-container",19),t.YNc(3,Vk,2,7,"ng-container",19),t.YNc(4,Yk,2,0,"span",19),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)||!n.monster||n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.normal)&&n.hasEntities(n.MonsterType.elite)&&n.getNormalValue()!=n.getEliteValue()),t.xp6(1),t.Q6J("ngIf",n.hasEntities(n.MonsterType.elite)&&(n.getNormalValue()!=n.getEliteValue()||!n.hasEntities(n.MonsterType.normal))),t.xp6(1),t.Q6J("ngIf",!n.fhStyle)}}function zd(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",113),t._UZ(2,"span",56),t.qZA(),t.TgZ(3,"span",114),t.YNc(4,ex,1,4,"img",115),t.YNc(5,Ao,1,4,"img",115),t.qZA(),t.TgZ(6,"span",33),t.YNc(7,Gk,4,3,"span",19),t.YNc(8,Kk,5,4,"span",19),t.qZA(),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","game.action."+n.action.type),t.xp6(2),t.Q6J("ngIf",n.action.type!=n.ActionType.move||!n.monster||!n.monster.flying),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.move&&n.monster&&n.monster.flying),t.xp6(2),t.Q6J("ngIf",!n.relative&&!n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.relative||n.forceRelative)}}function ix(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function kf(o,a){if(1&o&&t._UZ(0,"span",122),2&o){const n=t.oxw(5);t.Q6J("value-calc",n.getEliteValue())("level",n.level)}}function ox(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",117),t.YNc(2,ix,2,0,"span",19),t.YNc(3,kf,1,2,"span",121),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("value-calc",n.getNormalValue())("level",n.level),t.xp6(1),t.Q6J("ngIf",n.getEliteValue()&&n.getNormalValue()!=n.getEliteValue()),t.xp6(1),t.Q6J("ngIf",n.getEliteValue()&&n.getNormalValue()!=n.getEliteValue())}}function U1(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t._UZ(2,"span",123),t.qZA()),2&o){const n=t.oxw(5);t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label",n.getEliteValue()+"")("relative",n.relative||n.forceRelative)}}function ax(o,a){if(1&o&&(t.TgZ(0,"span",90),t.YNc(1,U1,3,4,"span",19),t.qZA()),2&o){const n=t.oxw(4);t.Akn(n.style),t.Q6J("ghs-label",n.getNormalValue()+"")("relative",n.relative||n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.getNormalValue()!=n.getEliteValue())}}function sx(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t.qZA())}function rx(o,a){if(1&o&&(t.TgZ(0,"span",113),t._UZ(1,"span",56),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.action.targets")}}function Tf(o,a){if(1&o&&(t.TgZ(0,"span",113),t._UZ(1,"span",56),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.action."+n.action.type)}}function L1(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/"+n.action.type+".svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function cx(o,a){if(1&o&&t._UZ(0,"img",116),2&o){const n=t.oxw(4);t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)("ngClass",t.VKq(2,Bd,n.isGhsSvg(n.action.type)))}}function ju(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._uU(2),t.YNc(3,ox,4,4,"span",19),t.YNc(4,ax,2,5,"span",89),t.YNc(5,sx,2,0,"span",19),t.qZA(),t.YNc(6,rx,2,3,"span",120),t.YNc(7,Tf,2,3,"span",120),t.YNc(8,L1,1,4,"img",115),t.YNc(9,cx,1,4,"img",115),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.action.valueType==n.ActionValueType.add?"+":"-"," "),t.xp6(1),t.Q6J("ngIf",!n.relative&&!n.forceRelative),t.xp6(1),t.Q6J("ngIf",n.relative||n.forceRelative),t.xp6(1),t.Q6J("ngIf",!n.fhStyle),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.target&&n.EntityValueFunction(n.action.value)>1),t.xp6(1),t.Q6J("ngIf",n.action.type!=n.ActionType.target||n.EntityValueFunction(n.action.value)<2),t.xp6(1),t.Q6J("ngIf",n.action.type!=n.ActionType.move||!n.monster||!n.monster.flying),t.xp6(1),t.Q6J("ngIf",n.action.type==n.ActionType.move&&n.monster&&n.monster.flying)}}function Zf(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function $k(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Zf,2,0,"span",19),t._UZ(2,"ghs-action",68),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.fhStyle&&e>0),t.xp6(1),t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function Q1(o,a){if(1&o&&(t.TgZ(0,"div",34),t.YNc(1,$k,3,14,"ng-container",35),t.ALo(2,"slice"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,n.statsCalculation&&n.additionalSubActions.length>0?n.additionalSubActions:n.subActions,n.hasAOE?1:0))}}const lx=function(o,a){return{small:o,"highlight-text":a}};function R1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",111),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.applyHighlightAction(i))}),t.TgZ(1,"span",112),t.YNc(2,zd,9,7,"ng-container",19),t.YNc(3,ju,10,8,"ng-container",19),t.qZA(),t.YNc(4,Q1,3,4,"div",30),t.ALo(5,"slice"),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass","action-"+n.action.type)("clickBehind",!n.highlightAction()),t.xp6(1),t.Q6J("ngClass",t.WLB(9,lx,n.action.small,n.highlightAction())),t.xp6(1),t.Q6J("ngIf",n.action.valueType!=n.ActionValueType.add&&n.action.valueType!=n.ActionValueType.subtract),t.xp6(1),t.Q6J("ngIf",n.action.valueType==n.ActionValueType.add||n.action.valueType==n.ActionValueType.subtract),t.xp6(1),t.Q6J("ngIf",t.xi3(5,6,n.statsCalculation&&n.additionalSubActions.length>0?n.additionalSubActions:n.subActions,n.hasAOE?1:0).length>0)}}function og(o,a){if(1&o&&(t.TgZ(0,"div",124),t._UZ(1,"ghs-action",125),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(13,Go,n.action.small)),t.xp6(1),t.Akn(n.style),t.Q6J("ngClass","subaction-area")("action",(n.statsCalculation&&n.additionalSubActions.length>0?n.additionalSubActions:n.subActions)[0])("monster",n.monster)("inline",n.inline)("right",n.right)("hexSize",n.hexSize)("highlightElements",n.highlightElements)("relative",n.relative||n.forceRelative)("statsCalculation",n.statsCalculation)("monsterType",n.monsterType)}}function gx(o,a){if(1&o&&t._UZ(0,"ghs-action",68),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.Akn(i.style),t.Q6J("ngClass","subaction-"+n.type)("action",n)("monster",i.monster)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("highlightElements",i.highlightElements)("relative",i.relative||i.forceRelative)("statsCalculation",i.statsCalculation)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("monsterType",i.monsterType)}}function F1(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",126),t.YNc(2,gx,1,13,"ghs-action",73),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",n.elementActions)}}const Af=function(o,a,n,e,i){return{highlight:o,inline:a,right:n,fh:e,aoe:i}};function Wk(o,a){if(1&o&&(t.TgZ(0,"span",1),t.YNc(1,w0,2,6,"span",2),t.YNc(2,S0,9,18,"span",3),t.YNc(3,g1,4,7,"span",4),t.YNc(4,qk,2,1,"ng-container",5),t.YNc(5,Cf,4,12,"span",6),t.YNc(6,Bk,3,9,"span",7),t.YNc(7,L0,3,17,"span",8),t.YNc(8,Q0,3,13,"span",8),t.YNc(9,R0,3,9,"span",9),t.YNc(10,q0,3,13,"span",10),t.YNc(11,Hu,3,14,"span",10),t.YNc(12,P1,3,9,"span",11),t.YNc(13,Of,5,9,"span",12),t.YNc(14,yf,3,4,"span",12),t.YNc(15,K0,5,8,"span",13),t.YNc(16,T1,5,8,"span",14),t.YNc(17,S1,6,9,"span",15),t.YNc(18,I1,7,8,"ng-container",5),t.YNc(19,tx,5,18,"span",16),t.YNc(20,R1,6,12,"span",17),t.YNc(21,og,2,15,"div",18),t.YNc(22,F1,3,1,"ng-container",19),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngSwitch",n.action.type)("ngClass",t.qbA(23,Af,n.highlight,n.inline,n.right,n.fhStyle,n.hasAOE)),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.area),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.condition),t.xp6(1),t.Q6J("ngSwitchCase",t.WLB(29,m1,n.ActionType.element,n.ActionType.elementHalf).includes(n.action.type)?n.action.type:""),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.monsterType),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.specialTarget),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.custom),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.sufferDamage),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.switchType),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.grant),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.summon),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.spawn),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.trigger),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.concatenation),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.grid),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.box),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.boxFhSubActions),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.forceBox),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.card),t.xp6(1),t.Q6J("ngSwitchCase",n.ActionType.special),t.xp6(2),t.Q6J("ngIf",n.hasAOE),t.xp6(1),t.Q6J("ngIf",n.elementActions.length>0&&n.fhStyle)}}const q1=[vt.Us.attack,vt.Us.damage,vt.Us.fly,vt.Us.heal,vt.Us.jump,vt.Us.loot,vt.Us.move,vt.Us.range,vt.Us.retaliate,vt.Us.shield,vt.Us.target,vt.Us.teleport];let Gr=(()=>{var o;class a{constructor(){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"monsterType",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"origAction",void 0),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"inline",!1),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"highlight",!1),(0,_.Z)(this,"highlightElements",!1),(0,_.Z)(this,"statsCalculation",!1),(0,_.Z)(this,"hexSize",void 0),(0,_.Z)(this,"actionIndex",""),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"subActions",[]),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"additionalSubActions",[]),(0,_.Z)(this,"elementActions",[]),(0,_.Z)(this,"additionAttackSubActionTypes",[vt.Us.condition,vt.Us.target,vt.Us.pierce,vt.Us.pull,vt.Us.push,vt.Us.swing,vt.Us.area]),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"hasAOE",!1),(0,_.Z)(this,"forceRelative",!1),(0,_.Z)(this,"level",0),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.fhStyle=R.r.settings.fhStyle&&!this.style||"fh"==this.style,this.action=this.origAction?JSON.parse(JSON.stringify(this.origAction)):void 0,this.action&&!this.action.subActions&&(this.action.subActions=[]),this.action&&void 0===this.action.value&&(this.action.value=""),this.action&&this.action.type==vt.Us.monsterType&&(this.monsterType=this.action.value),this.updateSubActions(),this.forceRelative=null!=this.monster&&!this.hasEntities(),this.monster&&!this.relative&&!this.forceRelative&&R.r.settings.calculate&&this.action&&(this.action.type==vt.Us.shield||this.action.type==vt.Us.retaliate)&&this.action.valueType!=vt.EF.minus&&this.action.subActions&&this.action.subActions.find(e=>e.type==vt.Us.specialTarget&&!(e.value+"").startsWith("self"))&&(this.forceRelative=!0,this.action.valueType=vt.EF.plus),this.level=this.monster?this.monster.level:d.v.game.level}hasEntities(e=void 0){return e==ee.M.normal&&this.monster&&this.monster.boss?this.hasEntities(ee.M.boss):this.monster&&(!this.monsterType||!e||this.monsterType==e)&&this.monster.entities.some(i=>(!e||i.type==e)&&d.v.entityManager.isAlive(i))||!1}getNormalValue(){return this.getValue(this.monster&&this.monster.boss?ee.M.boss:ee.M.normal)}getEliteValue(){return this.hasEntities(ee.M.elite)?this.getValue(ee.M.elite):this.getNormalValue()}getMonsterType(e){return e}getStat(e){return this.monster?d.v.monsterManager.getStat(this.monster,e):new zr.c(e,d.v.game.level,0,0,0,0)}getRange(e=ee.M.normal){return this.monster&&this.monster.boss&&(e=ee.M.boss),Rd(this.getStat(e).range,this.monster?this.monster.level:void 0)}getEliteRange(){return this.monster&&!this.monster.entities.some(e=>e.type==ee.M.elite&&d.v.entityManager.isAlive(e))?this.getRange():this.getRange(ee.M.elite)}getValues(e){return e.value&&"string"==typeof e.value?e.value.split(":"):[]}getSpecial(e){if(this.monster&&this.monster.boss)return this.getStat(ee.M.boss).special[e.value-1];{const i=this.getStat(ee.M.normal).special[e.value-1],s=this.getStat(ee.M.elite).special[e.value-1];return i!=s&&JSON.stringify(i)!=JSON.stringify(s)?[new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,i),new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,s)]:i}}getValue(e){if(!this.action)return"";if(R.r.settings.calculate&&!this.relative&&!this.forceRelative){const i=this.getStat(e);let s=0,l=!0;switch(this.action.type){case vt.Us.attack:if("number"==typeof i.attack)s=i.attack;else try{s=(0,ae.j9)(i.attack,this.level)}catch{l=!1}i.actions&&i.actions.forEach(m=>{m.type==vt.Us.attack&&(m.valueType==vt.EF.add?s+=(0,ae.j9)(m.value,this.level):m.valueType==vt.EF.subtract&&(s-=(0,ae.j9)(m.value,this.level),s<0&&(s=0)))});break;case vt.Us.move:s=i.movement;break;case vt.Us.range:s=i.range}if(l&&(this.action.value||0==this.action.value)&&("number"==typeof this.action.value||this.action.value.match(ae.GB)||this.action.value.match(ae.HY))){if(this.action.valueType==vt.EF.plus)return s+(0,ae.j9)(this.action.value);if(this.action.valueType==vt.EF.minus)return s-(0,ae.j9)(this.action.value)}}if(R.r.settings.calculateStats&&R.r.settings.calculateShieldStats&&!this.relative&&!this.forceRelative){const i=this.getStat(e);let s=0;if(this.action.type==vt.Us.shield||this.action.type==vt.Us.retaliate){if(!this.action.subActions||!this.action.subActions.find(l=>l.type==vt.Us.specialTarget&&!(l.value+"").startsWith("self"))){const l=i.actions&&i.actions.find(m=>this.action&&m.type==this.action.type);l&&l!=this.action&&(s=(0,ae.j9)(l.value,this.level))}if(s>0)return s+(0,ae.j9)(this.action.value,this.level)}}return this.action.valueType==vt.EF.plus?"+"+(R.r.settings.fhStyle?"":" ")+this.action.value:this.action.valueType==vt.EF.minus?"-"+(R.r.settings.fhStyle?"":" ")+this.action.value:R.r.settings.calculate&&((""+this.action.value).match(ae.GB)||(""+this.action.value).match(ae.HY))?(0,ae.j9)(this.action.value,this.level):this.action.value}getConditionName(e){return new re.gP(e).name}updateSubActions(){if(this.action){if(R.r.settings.fhStyle&&-1==[vt.Us.element,vt.Us.concatenation,vt.Us.box].indexOf(this.action.type)?(this.elementActions=this.action.subActions.filter(e=>e.type==vt.Us.element),this.action.subActions=this.action.subActions.filter(e=>e.type!=vt.Us.element)):this.elementActions=[],this.additionalSubActions=JSON.parse(JSON.stringify(this.action.subActions)),this.hasAOE=this.additionalSubActions.some((e,i)=>0==i&&e.type==vt.Us.area)&&(this.action.type!=vt.Us.element||this.action.valueType!=vt.EF.minus),this.monster&&R.r.settings.calculateStats&&!this.relative){let e=[];const i=d.v.monsterManager.getStat(this.monster,this.monster.boss?ee.M.boss:ee.M.normal);let s=this.monster.boss?void 0:d.v.monsterManager.getStat(this.monster,ee.M.elite);if(this.action.type==vt.Us.attack&&this.action.valueType!=vt.EF.add&&this.action.valueType!=vt.EF.subtract){let O=this.additionalSubActions.find(W=>W.type==vt.Us.monsterType&&W.value==ee.M.normal),k=this.additionalSubActions.find(W=>W.type==vt.Us.monsterType&&W.value==ee.M.elite);if((i.range||s&&s.range)&&!this.action.subActions.some(W=>W.type==vt.Us.range||W.type==vt.Us.area&&-1!=(""+W.value).indexOf("active")||W.type==vt.Us.specialTarget)){const W=new vt.aU(vt.Us.range,0,vt.EF.plus);W.small=!0,i.range&&(s&&s.range||!s)?this.additionalSubActions.splice(this.hasAOE?1:0,0,W):i.range?O?O.subActions.push(W):(O=new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[W]),e.push(O)):s&&s.range&&(k?k.subActions.push(W):(k=new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[W]),e.push(k)))}i.actions&&this.monster.entities.some(W=>d.v.entityManager.isAlive(W)&&(W.type==ee.M.normal||W.type==ee.M.boss))&&i.actions.filter(W=>-1!=this.additionAttackSubActionTypes.indexOf(W.type)).forEach(W=>{const ct=new vt.aU(W.type,W.value,W.valueType,W.subActions);this.action&&!this.subActionExists(this.action.subActions,ct)&&!this.subActionExists(e,ct)&&(W.type!=vt.Us.area||this.action.subActions.every(Ct=>Ct.type!=vt.Us.area))&&(!s||s.actions&&this.subActionExists(s.actions,ct,!1)||R.r.settings.hideStats&&this.monster&&!this.monster.entities.some(Ct=>d.v.entityManager.isAlive(Ct)&&Ct.type==ee.M.elite)?(ct.small=!0,e.push(ct)):s&&(!s.actions||!this.subActionExists(s.actions,ct))&&!this.subActionExists(this.action.subActions,ct)&&!this.subActionExists(e,ct)&&(O?this.subActionExists(O.subActions,ct)||O.subActions.push(ct):(O=new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[ct]),e.push(O))))}),s&&s.actions&&this.monster.entities.some(W=>d.v.entityManager.isAlive(W)&&W.type==ee.M.elite)&&s.actions.filter(W=>-1!=this.additionAttackSubActionTypes.indexOf(W.type)).forEach(W=>{const ct=new vt.aU(W.type,W.value,W.valueType,W.subActions);this.action&&(!i.actions||!this.subActionExists(i.actions,ct,!1)||!this.hasEntities(ee.M.normal))&&(this.hasEntities(ee.M.normal)?!this.subActionExists(this.action.subActions,ct)&&!this.subActionExists(e,ct)&&(k?this.subActionExists(k.subActions,ct)||k.subActions.push(ct):(k=new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,[ct]),e.push(k))):(ct.small=!0,e.push(ct)))})}e.forEach(O=>{if(this.action)if(O.type==vt.Us.target)if(this.additionalSubActions.some(k=>k.type==vt.Us.target||k.type==vt.Us.specialTarget&&k.value!=vt.q2.enemyOneAll)){if((O.valueType==vt.EF.add||O.valueType==vt.EF.fixed)&&this.additionalSubActions.some(k=>k.type==vt.Us.target)&&!this.additionalSubActions.some(k=>k.type==vt.Us.specialTarget)){const k=this.additionalSubActions.find(W=>W.type==vt.Us.target&&W!=O);k&&(O.valueType=vt.EF.fixed,O.value=(0,ae.j9)(O.value,this.level)+(k.valueType!=vt.EF.subtract&&k.valueType!=vt.EF.minus?(0,ae.j9)(k.value,this.level):-(0,ae.j9)(k.value,this.level)),this.additionalSubActions.splice(this.additionalSubActions.indexOf(k),1,O))}}else O.valueType==vt.EF.add&&(O.valueType=vt.EF.fixed,O.value=(0,ae.j9)(O.value,this.level)+1),this.additionalSubActions.length>0&&(this.additionalSubActions[this.additionalSubActions.length-1].type==vt.Us.element||this.additionalSubActions[this.additionalSubActions.length-1].type==vt.Us.specialTarget&&this.additionalSubActions[this.additionalSubActions.length-1].value==vt.q2.enemyOneAll)?this.additionalSubActions.splice(this.additionalSubActions.length-1,0,O):this.additionalSubActions.push(O);else if(O.type!=vt.Us.range||this.additionalSubActions.some(k=>k.type==vt.Us.range)){if(O.type!=vt.Us.range&&!this.subActionExists(this.additionalSubActions,O))if(O.type==vt.Us.area)this.additionalSubActions.splice(0,0,O),this.hasAOE=!0;else if(this.action&&O.type==vt.Us.card&&this.action.subActions.find(k=>k.type==vt.Us.pierce)){const k=this.action.subActions.find(W=>W.type==vt.Us.pierce);k&&(k.value=(0,ae.j9)(k.value,this.level)+(0,ae.j9)(O.value,this.level))}else O.small=!0,O.type==vt.Us.monsterType&&(O.small=!1,O.subActions.forEach(k=>k.small=!0)),this.additionalSubActions.length>0&&this.additionalSubActions[this.additionalSubActions.length-1].type==vt.Us.element?this.additionalSubActions.splice(this.additionalSubActions.length-1,0,O):this.additionalSubActions.push(O)}else this.additionalSubActions.length>0&&this.action.subActions[this.additionalSubActions.length-1].type==vt.Us.element?this.additionalSubActions.splice(this.action.subActions.length-1,0,O):this.additionalSubActions.push(O)});const l=this.additionalSubActions.find(O=>O.type==vt.Us.target&&(O.valueType==vt.EF.add||O.valueType==vt.EF.subtract));if(l){let O=!1;e.forEach(k=>{if(this.action&&k.type==vt.Us.monsterType&&k.subActions.find(W=>W.type==vt.Us.target)){const W=k.subActions.find(ct=>ct.type==vt.Us.target);W&&(O=!0,W.value=(0,ae.j9)(W.value,this.level)+(l.valueType==vt.EF.add?(0,ae.j9)(l.value,this.level):-(0,ae.j9)(l.value,this.level)))}}),O&&this.additionalSubActions.splice(this.additionalSubActions.indexOf(l),1)}if(this.action.type==vt.Us.move&&!this.action.subActions.find(O=>O.type==vt.Us.jump)){let O=new vt.aU(vt.Us.jump,"");O.small=!0,i.actions.find(k=>k.type==vt.Us.jump)?s&&!s.actions.find(k=>k.type==vt.Us.jump)&&this.hasEntities(ee.M.elite)?this.additionalSubActions.push(new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[O])):this.additionalSubActions.push(O):s&&s.actions.find(k=>k.type==vt.Us.jump)&&(this.hasEntities(ee.M.normal)?this.additionalSubActions.push(new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,[O])):this.additionalSubActions.push(O))}let m=this.additionalSubActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k)));for(R.r.settings.fhStyle&&(m=this.elementActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k))));m;)R.r.settings.fhStyle?(this.elementActions.splice(this.elementActions.indexOf(m),1),m=this.elementActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k)))):(this.additionalSubActions.splice(this.additionalSubActions.indexOf(m),1),m=this.additionalSubActions.find(O=>(O.type==vt.Us.element||O.type==vt.Us.elementHalf)&&O.valueType==vt.EF.minus&&O.subActions.every(k=>this.subActionExists(e,k))));if(this.additionalSubActions.some((O,k,W)=>O.type==vt.Us.monsterType&&kk.type==vt.Us.monsterType);this.additionalSubActions.splice(O,2,new vt.aU(vt.Us.grid,"",vt.EF.fixed,[this.additionalSubActions[O],this.additionalSubActions[O+1]]))}}this.subActions=this.action.subActions.filter(e=>!e.hidden),this.additionalSubActions=this.additionalSubActions.filter(e=>!e.hidden)}}subActionExists(e,i,s=!0){return(!s||i.type!=vt.Us.condition||-1==new re.gP(i.value+"").types.indexOf(re.CP.stack))&&e.some(l=>l.type==i.type&&l.value==i.value&&(l.valueType||vt.EF.fixed)==(i.valueType||vt.EF.fixed))}isGhsSvg(e){return-1!=q1.indexOf(e)}highlightAction(){return!(!this.monster||!this.action||(this.action.type!=vt.Us.heal&&this.action.type!=vt.Us.condition||!this.action.subActions||1!=this.action.subActions.length||!this.action.subActions.find(e=>e.type==vt.Us.specialTarget&&(""+e.value).startsWith("self")))&&this.action.type!=vt.Us.sufferDamage&&this.action.type!=vt.Us.switchType)&&(this.action.type!=vt.Us.heal||!this.monster.entities.every(e=>e.dead||e.health<1||e.health==e.maxHealth))&&this.highlightElements&&(this.monster.active&&this.monster&&null!=this.monster.entities.find(e=>this.action&&d.v.entityManager.isAlive(e,!0)&&!e.tags.find(i=>this.action&&i=="roundAction-"+(this.actionIndex?this.actionIndex+"-":"")+this.action.type))||!1)}applyHighlightAction(e){if(this.monster&&this.highlightAction()&&this.action){d.v.stateManager.before("applyHighlightAction."+this.action.type,"data.monster."+this.monster.name,""+this.action.value);let i=!0;if(this.monster.entities.filter(s=>d.v.entityManager.isAlive(s,!0)).forEach(s=>{if(this.action&&!s.tags.find(l=>l=="roundAction-"+(this.actionIndex?this.actionIndex+"-":"")+this.action?.type))if(s.tags.push("roundAction-"+(this.actionIndex?this.actionIndex+"-":"")+this.action.type),this.monster&&this.action.type==vt.Us.heal){const l=(0,ae.j9)(this.action.value,this.level);s.health+=l,d.v.entityManager.addCondition(s,new re.gP(re.fT.heal,l),this.monster&&this.monster.active||!1,this.monster&&this.monster.off||!1),d.v.entityManager.applyCondition(s,this.monster,re.fT.heal,!0)}else if(this.action.type==vt.Us.condition)if("bless"==this.action.value||"curse"==this.action.value){const l=R.r.settings.allyAttackModifierDeck&&(d.v.fhRules()||R.r.settings.alwaysAllyAttackModifierDeck)&&(this.monster?.isAlly||this.monster?.isAllied)?d.v.game.allyAttackModifierDeck:d.v.game.monsterAttackModifierDeck;d.v.attackModifierManager.addModifier(l,new Lt.YY("bless"==this.action.value?Lt.kl.bless:Lt.kl.curse))}else d.v.entityManager.addCondition(s,new re.gP(""+this.action.value),this.monster?.active||!1,this.monster?.off||!1);else this.action.type==vt.Us.sufferDamage&&(s.health-=(0,ae.j9)(this.action.value,this.level),s.health<=0&&(s.health=0,s.dead=!0),this.monster&&s.dead&&(i=!1,setTimeout(()=>{this.monster&&s.dead&&(d.v.monsterManager.removeMonsterEntity(this.monster,s),this.monster.entities.every(l=>l.dead||l.health<=0||!l.active)&&(this.monster.off=!0,this.monster.active&&d.v.roundManager.toggleFigure(this.monster))),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500)))}),this.action.type==vt.Us.switchType&&this.monster){const s=this.monster.stats.find(m=>this.monster&&m.level==this.monster.level&&m.type==ee.M.normal),l=this.monster.stats.find(m=>this.monster&&m.level==this.monster.level&&m.type==ee.M.elite);s&&l&&this.monster.entities.forEach(m=>{this.monster&&d.v.entityManager.isAlive(m)&&(m.type=m.type==ee.M.elite?ee.M.normal:ee.M.elite,m.maxHealth=(0,ae.j9)(m.type==ee.M.normal?s.health:l.health,this.monster.level),(m.health>m.maxHealth||m.healthl.type==e[s]&&l.state!=Gn.fq.new&&l.state!=Gn.fq.strong&&l.state!=Gn.fq.always))||i&&d.v.game.elementBoard.some(l=>!(l.type!=e[s]&&e[s]!=Gn.W_.wild||l.state!=Gn.fq.strong&&l.state!=Gn.fq.waning&&l.state!=Gn.fq.always)))&&(0==s||this.elementActionPerformed(e[s-1],i,s-1))&&null==this.elementActionPerformed(e[s],i,s)||!1)}wildToConsume(){return d.v.game.elementBoard.filter(e=>e.state!=Gn.fq.inert&&e.state!=Gn.fq.new).map(e=>e.type)}wildToCreate(){return d.v.game.elementBoard.filter(e=>e.state!=Gn.fq.new&&e.state!=Gn.fq.strong&&e.state!=Gn.fq.always).map(e=>e.type)}elementAction(e,i,s,l,m=!1){if(this.monster&&this.highlightElement(this.getValues(i),i.valueType==vt.EF.minus,l)){const O=this.monster&&this.monster.entities.find(k=>d.v.entityManager.isAlive(k)&&!k.tags.some(W=>W=="roundAction-element-"+(i.valueType==vt.EF.minus?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+l+s));d.v.game.elementBoard.forEach(i.valueType==vt.EF.minus?k=>{k.type==s&&this.monster&&(d.v.stateManager.before("monsterConsumeElement","data.monster."+this.monster.name,"game.element."+s),k.state!=Gn.fq.always&&(k.state=Gn.fq.consumed),O&&O.tags.push("roundAction-element-consume-"+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+(m?"wild":s)),d.v.stateManager.after())}:k=>{k.type==s&&this.monster&&(d.v.stateManager.before("monsterInfuseElement","data.monster."+this.monster.name,"game.element."+s),k.state!=Gn.fq.always&&(k.state=Gn.fq.new),O&&O.tags.push("roundAction-element-"+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+(m?"wild":s)),d.v.stateManager.after())}),e.preventDefault()}}elementActionPerformed(e,i,s){return this.monster&&this.monster.entities.find(l=>d.v.entityManager.isAlive(l)&&l.tags.some(m=>m=="roundAction-element-"+(i?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+s+"-"+e))}elementActionsPerformed(e,i){return this.monster&&e.every((s,l)=>this.monster&&this.monster.entities.find(m=>d.v.entityManager.isAlive(m)&&m.tags.some(O=>O=="roundAction-element-"+(i?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+s)))||!1}elementActionsPerformedSome(e,i){return this.monster&&e.some((s,l)=>this.monster&&this.monster.entities.find(m=>d.v.entityManager.isAlive(m)&&m.tags.some(O=>O=="roundAction-element-"+(i?"consume-":"")+(this.actionIndex?this.actionIndex+"-":"")+l+"-"+s)))||!0}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-action"]],inputs:{monster:"monster",monsterType:"monsterType",objective:"objective",origAction:["action","origAction"],relative:"relative",inline:"inline",right:"right",highlight:"highlight",highlightElements:"highlightElements",statsCalculation:"statsCalculation",hexSize:"hexSize",actionIndex:["index","actionIndex"],style:"style"},decls:1,vars:1,consts:[["class","action",3,"ngSwitch","ngClass",4,"ngIf"],[1,"action",3,"ngSwitch","ngClass"],["class","action-area",3,"ngClass",4,"ngSwitchCase"],["class","action-condition",3,"ngClass",4,"ngSwitchCase"],["class","action-element",3,"ngClass",4,"ngSwitchCase"],[4,"ngSwitchCase"],["class","action-specialTarget",4,"ngSwitchCase"],["class","action-custom",4,"ngSwitchCase"],["class","action-custom",3,"ngClass",4,"ngSwitchCase"],["class","action-grant",4,"ngSwitchCase"],["class","action-summon",3,"ngClass",4,"ngSwitchCase"],["class","action-trigger",4,"ngSwitchCase"],["class","action-default",4,"ngSwitchCase"],["class","action-box-container",3,"ngClass",4,"ngSwitchCase"],["class","action-box-fh-subactions-container",3,"ngClass",4,"ngSwitchCase"],["class","action-box-container-forced",3,"ngClass",4,"ngSwitchCase"],["class","action-default action-special",3,"ngClass",4,"ngSwitchCase"],["class","action-default","ghs-pointer-input","",3,"ngClass","clickBehind","singleClick",4,"ngSwitchDefault"],["class","aoe-value",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"action-area",3,"ngClass"],[3,"action","value","size"],[1,"action-condition",3,"ngClass"],["ghs-pointer-input","",1,"condition",3,"ngClass","clickBehind","singleClick"],[1,"condition-value"],[3,"ghs-label","ghs-label-args"],[1,"condition-image"],["class","icon",3,"src",4,"ngIf"],["class","icon warning","src","./assets/images/warning.svg",4,"ngIf"],["class","value",4,"ngIf"],["class","subactions",4,"ngIf"],[1,"icon",3,"src"],["src","./assets/images/warning.svg",1,"icon","warning"],[1,"value"],[1,"subactions"],[4,"ngFor","ngForOf"],[3,"ngClass","action","monster","inline","right","hexSize","statsCalculation","highlightElements","index","monsterType"],[1,"action-element",3,"ngClass"],["class","elements",4,"ngIf"],["class","element-subactions",4,"ngIf"],[1,"elements"],["class","element","ghs-pointer-input","",3,"clickBehind","ngClass","singleClick",4,"ngFor","ngForOf"],["class","minus",4,"ngIf"],["ghs-pointer-input","",1,"element",3,"clickBehind","ngClass","singleClick"],[3,"src"],["class","choose-element-container",4,"ngIf"],[1,"choose-element-container"],["class","choose-element","ghs-pointer-input","",3,"clickBehind","singleClick",4,"ngFor","ngForOf"],["ghs-pointer-input","",1,"choose-element",3,"clickBehind","singleClick"],[1,"minus"],["ghs-pointer-input","",1,"element","element-half",3,"ngClass","clickBehind","singleClick"],[1,"element-subactions"],[1,"element-subaction",3,"ngClass","action","monster","relative","inline","right","hexSize","highlightElements","statsCalculation","index","monsterType"],["class","action-monster-type",3,"ngClass",4,"ngIf"],[1,"action-monster-type",3,"ngClass"],[1,"monster-type","small",3,"ngClass"],[3,"ghs-label"],["class","monster-type-subactions",4,"ngIf"],[1,"monster-type-subactions"],[3,"ngClass","action","monster","relative","inline","right","hexSize","highlightElements","statsCalculation","index","monsterType"],[1,"action-specialTarget"],[1,"special-target-value",3,"ghs-label","ghs-label-args","relative","ngClass"],[3,"ngClass",4,"ngIf"],["class","special-target-subactions",4,"ngIf"],[3,"ngClass"],["class","elite",4,"ngIf"],[1,"elite"],[1,"special-target-subactions"],[3,"ngClass","action","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","index","monsterType"],[1,"action-custom"],[1,"custom-value",3,"ghs-label","relative","ngClass"],["class","custom-subactions",4,"ngIf"],[1,"custom-subactions"],[3,"ngClass","action","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","index","monsterType","style",4,"ngFor","ngForOf"],[1,"action-custom",3,"ngClass"],["ghs-pointer-input","",1,"custom-value",3,"clickBehind","ghs-label","relative","ngClass","ghs-label-args","singleClick"],["ghs-pointer-input","",1,"custom-value",3,"clickBehind","ghs-label","relative","ngClass","singleClick"],[1,"action-grant"],[1,"grant-value",3,"ghs-label","relative","ngClass"],["class","grant-subactions",4,"ngIf"],[1,"grant-subactions"],[1,"action-summon",3,"ngClass"],[3,"action","right","monster","objective","highlight","index","monsterType"],[3,"action","right","monster","objective","spawn","highlight","index","monsterType"],[1,"action-trigger"],[1,"action-default"],[1,"action-concatenation",3,"ngClass"],["class","action-concatenation-item",4,"ngIf"],[1,"action-concatenation-item"],[3,"ghs-label","relative","style",4,"ngIf"],[3,"ghs-label","relative"],["class","action-grid",3,"--ghs-grid-columns","ngClass",4,"ngIf"],[1,"action-grid",3,"ngClass"],[1,"action-box-container",3,"ngClass"],["class","action-box-label",3,"ghs-label","relative","style",4,"ngIf"],[1,"action-box"],[1,"action-box-label",3,"ghs-label","relative"],[1,"action-box-fh-subactions-container",3,"ngClass"],[1,"action-box-container-forced",3,"ngClass"],["class","action-box-label",4,"ngIf"],[1,"action-box-label"],[1,"action-card",3,"ngClass"],[1,"card-value",3,"ngClass"],[1,"ghs-svg",3,"src"],["class","overlay",3,"src",4,"ngIf"],["class","overlay",3,"mask-image","-webkit-mask-image",4,"ngIf"],[1,"overlay",3,"src"],[1,"overlay"],[1,"action-default","action-special",3,"ngClass"],[1,"special-type"],[1,"special-subactions",3,"actions","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","index"],["ghs-pointer-input","",1,"action-default",3,"ngClass","clickBehind","singleClick"],[1,"main-action",3,"ngClass"],[1,"type"],[1,"action-icon"],["class","icon",3,"src","ngClass",4,"ngIf"],[1,"icon",3,"src","ngClass"],[3,"value-calc","level"],[3,"ngClass","value-calc","level"],[3,"ngClass","ghs-label","relative"],["class","type",4,"ngIf"],["class","elite",3,"value-calc","level",4,"ngIf"],[1,"elite",3,"value-calc","level"],[1,"elite",3,"ghs-label","relative"],[1,"aoe-value",3,"ngClass"],[3,"ngClass","action","monster","inline","right","hexSize","highlightElements","relative","statsCalculation","monsterType"],[1,"element-actions"]],template:function(e,i){1&e&&t.YNc(0,Wk,23,32,"span",0),2&e&&t.Q6J("ngIf",i.action)},styles:['.action[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;position:relative;width:100%;color:var(--ghs-color-white);line-height:.8em}.action.aoe[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:.2em;align-items:center}@keyframes _ngcontent-%COMP%_highlight-animation{0%{background-position:0% center;-webkit-mask-position:0% center;mask-position:0% center}65%{background-position:0% center;-webkit-mask-position:0% center;mask-position:0% center}to{background-position:200% center;-webkit-mask-position:200% center;mask-position:200% center}}@keyframes _ngcontent-%COMP%_highlight-image{0%{opacity:1}50%{opacity:1}to{opacity:.5}}.action.highlight[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-image:linear-gradient(-225deg,var(--ghs-color-white) 0%,var(--ghs-color-white) 50%,var(--ghs-color-darkgray) 75%,var(--ghs-color-white) 100%);background-position:0% center;background-clip:border-box;background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_highlight-animation 3s linear infinite;animation-delay:-1.5s}.action.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_highlight-image 3s ease-in-out infinite;animation-delay:-1.5s}.action.highlight.right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-image:linear-gradient(-225deg,var(--ghs-color-black) 0%,var(--ghs-color-black) 50%,var(--ghs-color-white) 75%,var(--ghs-color-black) 100%)}.action[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .placeholder-action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin:0 .1em .1em;height:1em;width:auto}.action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:not(.ghs-svg){filter:var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .summon-value[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .type.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .condition-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .custom-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .special-target-value.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type.small[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .summon-value.small[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%]{font-size:82%;line-height:82%}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .summon-value[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .placeholder-action[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .small[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:not(.ghs-svg){filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%]{filter:drop-shadow(.01em .01em .01em var(--ghs-color-black))}.action[_ngcontent-%COMP%] .action-monster-type[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{white-space:nowrap}.action[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%]{width:100%}.action[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{width:100%}.action[_ngcontent-%COMP%] .action-area[_ngcontent-%COMP%]{margin-top:.3em}.action[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{padding:0 .2em}.action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]{position:relative;font-size:82%;line-height:82%;padding:0 .5em}.action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]:before, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]:after, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]:before, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]:after{content:" ";position:absolute;width:2em;height:.09em;left:-1.6em;top:50%;transform:translateY(-50%);background:linear-gradient(90deg,transparent 0%,var(--ghs-color-white) 100%)}.action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]:after, .action[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]:after{left:auto;right:-1.6em;background:linear-gradient(90deg,var(--ghs-color-white) 0%,transparent 100%)}.action[_ngcontent-%COMP%] .action-special[_ngcontent-%COMP%] > .type[_ngcontent-%COMP%]{margin-bottom:.1em}.action[_ngcontent-%COMP%] .special-type[_ngcontent-%COMP%]{color:var(--ghs-color-red);filter:var(--ghs-filter-shadow)}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{position:relative;width:1em;height:1em;margin:0 .1em .1em}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:100%;height:auto;margin:0;filter:var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img.icon.warning[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow-thin)}.action[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:.45em;line-height:1em;color:var(--ghs-color-white);position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:flex-end;width:100%;height:100%}.action[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%]{display:block}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;margin:.15em 0}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%]{position:relative;height:1.2em}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;height:100%;width:auto;z-index:1}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:var(--ghs-font-title);font-size:.8em;filter:invert(1);z-index:3}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%]{height:2em}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background-color:var(--ghs-ability-color);-webkit-mask-position:top left;mask-position:top left;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{left:42%}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slot[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotStart[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotEnd[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] + .slot[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] .card-value.slotXp[_ngcontent-%COMP%] + .slotXp[_ngcontent-%COMP%]{margin-left:-.1em}.action[_ngcontent-%COMP%] .action-card[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{margin-left:.1em}.action[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%]{text-transform:uppercase}.action[_ngcontent-%COMP%] .elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:.3em;align-items:flex-start;margin-top:.5%}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{display:flex;flex-wrap:unset;justify-content:center;align-items:center}@keyframes _ngcontent-%COMP%_element-pulse{0%{transform:scale(.8)}50%{transform:scale(1)}to{transform:scale(.8)}}@keyframes _ngcontent-%COMP%_element-half-pulse{0%{transform:scale(.8)}50%{transform:scale(1)}to{transform:scale(.8)}}@keyframes _ngcontent-%COMP%_element-half-pulse-right{0%{transform:scale(.8)}50%{transform:scale(1)}to{transform:scale(.8)}}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{position:relative;width:1.2em;height:1.2em}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%]{display:none;position:absolute;width:400%;height:400%;top:50%;left:50%;transform:translate(-50%,-50%)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-color-darkgray);opacity:.5;z-index:0;border-radius:100%}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]{display:block;position:absolute;top:50%;left:50%;width:25%;height:25%;margin:-12.5%;z-index:1}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:hover{filter:brightness(.8) grayscale(.4)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(1){transform:rotate(-30deg) translate(125%) rotate(30deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(2){transform:rotate(-210deg) translate(125%) rotate(210deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-330deg) translate(125%) rotate(330deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(4){transform:rotate(-150deg) translate(125%) rotate(150deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(5){transform:rotate(-90deg) translate(125%) rotate(90deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .choose-element-container[_ngcontent-%COMP%] .choose-element[_ngcontent-%COMP%]:nth-child(6){transform:rotate(-270deg) translate(125%) rotate(270deg)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element.highlight[_ngcontent-%COMP%]{cursor:pointer!important;animation:_ngcontent-%COMP%_element-pulse 1.2s ease-in-out infinite}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element.highlight[_ngcontent-%COMP%]:hover{animation:none;transform:scale(1)!important;z-index:5}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element.highlight[_ngcontent-%COMP%]:hover .choose-element-container[_ngcontent-%COMP%]{display:block}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]{position:relative;width:.6em;overflow:hidden}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:200%}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(1){left:0;margin-right:-.01em}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(1).highlight{animation:_ngcontent-%COMP%_element-half-pulse 1.2s ease-in-out infinite;transform-origin:center right}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(1).highlight:hover{transform:scale(1)!important}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2){right:0;margin-left:-.01em}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2) img[_ngcontent-%COMP%]{transform:translate(-50%)}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2):before{background-position:right}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2).highlight{animation:_ngcontent-%COMP%_element-half-pulse-right 1.2s ease-in-out infinite;transform-origin:center left}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element-half[_ngcontent-%COMP%]:nth-child(2).highlight:hover{transform:scale(1)!important}.action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .minus[_ngcontent-%COMP%]{font-size:1.5em}@keyframes _ngcontent-%COMP%_highlight-text-pulse{0%{transform:scale(.9)}50%{transform:scale(1)}to{transform:scale(.9)}}.action[_ngcontent-%COMP%] .highlight-text[_ngcontent-%COMP%]{cursor:pointer;animation:_ngcontent-%COMP%_highlight-text-pulse 1.2s ease-in-out infinite}.action[_ngcontent-%COMP%] .highlight-text[_ngcontent-%COMP%]:hover{transform:scale(1);opacity:.8;animation:none}.action[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%]:not(:nth-of-type(1)){margin-top:.1%}.action[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%]:nth-of-type(1){flex-basis:0}.action[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%]:nth-of-type(1) .action-area[_ngcontent-%COMP%] ghs-action-hex[_ngcontent-%COMP%]{position:relative}.action[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{margin-top:0}.action[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%;justify-content:center;flex:1 0 auto}.action[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{margin-top:0;margin-left:5%}.action[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%]{width:100%}.action[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%]{text-transform:uppercase}.action[_ngcontent-%COMP%] .monster-type.monster-type-elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.action[_ngcontent-%COMP%] .monster-type.monster-type-boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.action[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{flex-basis:auto;flex-shrink:0}.action[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%] .action-concatenation-item[_ngcontent-%COMP%]{margin:0 .15em}.action[_ngcontent-%COMP%] .action-grid[_ngcontent-%COMP%]{--ghs-grid-columns: 2;display:grid;grid-template-columns:repeat(var(--ghs-grid-columns),auto);column-gap:.5em;margin:0 .5em;align-items:center}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%]{width:100%;position:relative;display:flex;flex-direction:column;margin-bottom:.5em}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%]{color:var(--ghs-ability-color);text-align:left;padding:.3em 1em}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.2em .3em}.action[_ngcontent-%COMP%] .action-box-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-black);opacity:.5;z-index:0}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%]{width:100%;position:relative;display:flex;flex-direction:column;margin-bottom:.5em}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%]{color:var(--ghs-ability-color);text-align:left;padding:.3em 1em}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.2em .3em;border:.04em dashed var(--ghs-color-white);border-radius:2em/100%}.action[_ngcontent-%COMP%] .action-box-fh-subactions-container[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:-.04em;left:-.02em;height:100%;width:100%;background-color:var(--ghs-color-white);opacity:.2;border:.04em solid var(--ghs-color-white);border-radius:2em/100%;z-index:-1}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%]{width:100%;position:relative;display:flex;margin-bottom:.5em}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%]{position:relative;top:.1em;display:flex;flex-grow:1;justify-content:center;align-items:center;padding:.3em;border-right:.1em solid var(--ghs-color-white)}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%] .action-box-label[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1.5em}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%] .action-box[_ngcontent-%COMP%]{position:relative;display:flex;flex-grow:1;justify-content:flex-start;align-items:center;padding:.2em}.action[_ngcontent-%COMP%] .action-box-container-forced[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-black);opacity:.5;z-index:0;border:.1em solid var(--ghs-color-white);border-radius:.5em}.action[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] ghs-action.subaction-monsterType[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.action.inline[_ngcontent-%COMP%]{justify-content:flex-start;margin-top:0;margin-bottom:0}.action.inline[_ngcontent-%COMP%]:not(:nth-child(1)){margin-top:.1em}.action.inline[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.action.inline[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .summon-value[_ngcontent-%COMP%]{filter:none!important}.action.inline[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%]{align-self:flex-start;justify-content:flex-start}.action.inline[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{text-align:left;padding:0!important}.action.inline[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%]{justify-content:flex-start}.action.inline[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{flex-basis:unset}.action.inline[_ngcontent-%COMP%] .element-subactions.subaction-area[_ngcontent-%COMP%] ~ ghs-action[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] ghs-action.subaction-area[_ngcontent-%COMP%] ~ ghs-action[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:1;margin-left:.1%}.action.inline[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{flex-wrap:unset}.action.inline[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%]{align-items:flex-start;flex-wrap:wrap}.action.inline[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:.7em;width:auto}.action.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.inline[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%]{align-items:flex-start}.action.right[_ngcontent-%COMP%]{color:var(--ghs-color-black);filter:none;justify-content:flex-end;text-align:right}.action.right[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action.right[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{justify-content:flex-end;text-align:right}.action.right[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%]{justify-content:flex-end;text-align:right;width:100%}.action.right.inline[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.right.inline[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.right.inline[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{text-align:right;width:100%}.action.right.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]{align-items:flex-end;align-self:flex-end}.action.right.inline[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:none}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center;align-items:center}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] .subaction-area[_ngcontent-%COMP%], .action[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%] .subaction-area[_ngcontent-%COMP%]{margin-top:.3em}.action.fh[_ngcontent-%COMP%]{max-width:100%}.action.fh[_ngcontent-%COMP%] .action-default[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-custom[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-grant[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-summon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-trigger[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-specialTarget[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-condition[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap}.action.fh[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .special-target-value[_ngcontent-%COMP%]{font-family:var(--ghs-font-text)}.action.fh[_ngcontent-%COMP%] .main-action[_ngcontent-%COMP%]{font-size:125%;line-height:125%}.action.fh[_ngcontent-%COMP%] .main-action.small[_ngcontent-%COMP%]{font-size:90%;line-height:90%}.action.fh[_ngcontent-%COMP%] .main-action.small[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:.8em}.action.fh[_ngcontent-%COMP%] .type[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .condition-value[_ngcontent-%COMP%]{display:none}.action.fh[_ngcontent-%COMP%] .action-monster-type[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.action.fh[_ngcontent-%COMP%] .action-monster-type.action-monster-type[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .element-subactions.action-monster-type[_ngcontent-%COMP%]{flex-wrap:wrap}.action.fh[_ngcontent-%COMP%] .action-grid[_ngcontent-%COMP%]{column-gap:.1em;margin:0}.action.fh[_ngcontent-%COMP%] .monster-type[_ngcontent-%COMP%]{text-transform:initial}.action.fh[_ngcontent-%COMP%]:not(.inline) .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{width:1.4em;height:1.4em;display:flex;justify-content:center;align-items:center}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{width:1.2em;height:1em;display:flex;justify-content:center;align-items:center}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:1.5em;height:1.5em;margin:0}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-push[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pull[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pierce[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]{width:1.7em;height:1em;justify-content:flex-start}.action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-push[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pull[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%]:not(.inline) .subactions[_ngcontent-%COMP%] .action-pierce[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:1.5em;height:1.5em;margin:0}.action.fh[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;max-width:95%;padding:.1em;margin-left:.2em;width:auto}.action.fh[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%]:before{content:" ";position:absolute;z-index:0;top:50%;width:100%;height:100%;transform:translateY(-50%);background-color:var(--ghs-color-white);opacity:.2;border-radius:1em/100%}.action.fh[_ngcontent-%COMP%] .subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .condition-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .monster-type-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions.monster-type-subactions[_ngcontent-%COMP%]:before, .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions.monster-type-subactions[_ngcontent-%COMP%]:before{display:none}.action.fh[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-custom[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-grant[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .subaction-specialTarget[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{margin:0 .1em}.action.fh[_ngcontent-%COMP%] .action-concatenation[_ngcontent-%COMP%] .action-concatenation-item[_ngcontent-%COMP%]{margin:0}.action.fh[_ngcontent-%COMP%] .special-type[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:0}.action.fh[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .minus[_ngcontent-%COMP%]{margin-left:.15em}.action.fh[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]:not(:first-child){margin-left:.3em}.action.fh[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .subaction-element[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{padding:0}.action.fh[_ngcontent-%COMP%] .element-actions[_ngcontent-%COMP%]{flex-basis:100%}.action.fh[_ngcontent-%COMP%] .element-actions[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{margin-top:.5em}.action.fh[_ngcontent-%COMP%] .element-actions[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:-.4em;left:50%;transform:translate(-50%);width:2em;height:.4em;color:radial-gradient(var(--ghs-color-white) 0%,transparent 100%);background:radial-gradient(var(--ghs-color-white) 0%,transparent 100%);background-clip:padding-box;clip-path:polygon(48% 100%,52% 100%,52% 15%,100% 15%,100% 0%,0% 0%,0% 15%,48.5% 15%);z-index:-1}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;padding:.2em}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%]{margin-left:-.2em}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .grant-value[_ngcontent-%COMP%]{padding:0}.action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .condition-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .monster-type-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .custom-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .grant-subactions[_ngcontent-%COMP%], .action.fh[_ngcontent-%COMP%] .action-element[_ngcontent-%COMP%] .element-subactions[_ngcontent-%COMP%] .special-target-subactions[_ngcontent-%COMP%]{margin-left:.1em}.action.fh[_ngcontent-%COMP%] .action-element-consume[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;z-index:1;border:.04em dashed var(--ghs-color-white);border-radius:2em/100%}.action.fh[_ngcontent-%COMP%] .action-element-consume[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:-.04em;left:-.02em;height:100%;width:100%;background-color:var(--ghs-color-white);opacity:.2;border:.04em solid var(--ghs-color-white);border-radius:2em/100%;z-index:-1}.action.fh.inline[_ngcontent-%COMP%]{width:100%}.action.fh.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]:before{background-color:var(--ghs-color-darkgray);opacity:.3}.action.fh.inline[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]{justify-content:center;align-self:center}']})),a})();function dx(o,a){1&o&&t._UZ(0,"div",5)}const hx=function(o){return{spacing:o}};function ux(o,a){if(1&o&&(t.ynx(0),t.YNc(1,dx,1,0,"div",3),t._UZ(2,"ghs-action",4),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Q6J("ngIf",i.divider[e]),t.xp6(1),t.Akn(i.style),t.Q6J("action",n)("monster",i.monster)("objective",i.objective)("inline",i.inline)("right",i.right)("hexSize",i.hexSize)("relative",i.relative)("statsCalculation",i.statsCalculation)("highlight",-1!=i.highlightActions.indexOf(n.type))("highlightElements",i.highlightElements)("index",(i.actionIndex?i.actionIndex+"-":"")+e)("ngClass",t.VKq(15,hx,!i.noDivider&&!i.inline&&e>0&&!i.divider[e]))}}function H1(o,a){if(1&o&&t._UZ(0,"div",6),2&o){const n=t.oxw();t.Q6J("ghs-label",n.hint)}}const j1=function(o,a,n){return{inline:o,right:a,fh:n}};let ag=(()=>{var o;class a{constructor(){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"actions",void 0),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"inline",!1),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"statsCalculation",!1),(0,_.Z)(this,"highlightElements",!1),(0,_.Z)(this,"highlightActions",[]),(0,_.Z)(this,"hexSize",void 0),(0,_.Z)(this,"hint",void 0),(0,_.Z)(this,"actionIndex",""),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"noDivider",!1),(0,_.Z)(this,"divider",[]),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"additionalActions",[]),(0,_.Z)(this,"additionActionTypes",[vt.Us.shield,vt.Us.retaliate,vt.Us.heal,vt.Us.element,vt.Us.elementHalf]),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){if(this.additionalActions=[],this.monster&&R.r.settings.calculateStats){const e=d.v.monsterManager.getStat(this.monster,this.monster.boss?ee.M.boss:ee.M.normal);let i=this.monster.boss?void 0:d.v.monsterManager.getStat(this.monster,ee.M.elite);e.actions&&e.actions.filter(s=>-1!=this.additionActionTypes.indexOf(s.type)).forEach(s=>{!i||i.actions&&i.actions.some(l=>JSON.stringify(s)==JSON.stringify(l))?this.additionalActions.push(JSON.parse(JSON.stringify(s))):i&&(!i.actions||!i.actions.some(l=>JSON.stringify(s)==JSON.stringify(l)))&&this.additionalActions.push(new vt.aU(vt.Us.monsterType,ee.M.normal,vt.EF.fixed,[JSON.parse(JSON.stringify(s))]))}),i&&i.actions.filter(s=>-1!=this.additionActionTypes.indexOf(s.type)).forEach(s=>{(!e.actions||!e.actions.some(l=>JSON.stringify(s)==JSON.stringify(l)))&&this.additionalActions.push(new vt.aU(vt.Us.monsterType,ee.M.elite,vt.EF.fixed,[JSON.parse(JSON.stringify(s))]))})}this.noDivider||this.actions.forEach((e,i)=>{this.divider[i]=this.calcDivider(e,i)})}calcDivider(e,i){return!(i<1||this.inline||(e.type==vt.Us.element||e.type==vt.Us.elementHalf)&&e.valueType!=vt.EF.minus||e.type==vt.Us.card||this.actions[i-1].type==vt.Us.box||R.r.settings.calculate&&this.actions[i-1].type==vt.Us.monsterType&&this.monster&&!this.monster.entities.find(s=>d.v.entityManager.isAlive(s)&&s.type==this.actions[i-1].value)||e.type==vt.Us.concatenation&&e.subActions.every(s=>s.type==vt.Us.card||s.type==vt.Us.element||s.type==vt.Us.elementHalf))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-actions"]],inputs:{monster:"monster",objective:"objective",actions:"actions",relative:"relative",inline:"inline",right:"right",statsCalculation:"statsCalculation",highlightElements:"highlightElements",highlightActions:"highlightActions",hexSize:"hexSize",hint:"hint",actionIndex:["index","actionIndex"],style:"style",noDivider:"noDivider"},decls:3,vars:7,consts:[[1,"actions",3,"ngClass"],[4,"ngFor","ngForOf"],["class","hint",3,"ghs-label",4,"ngIf"],["class","divider",4,"ngIf"],[3,"action","monster","objective","inline","right","hexSize","relative","statsCalculation","highlight","highlightElements","index","ngClass"],[1,"divider"],[1,"hint",3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,ux,3,17,"ng-container",1),t.YNc(2,H1,1,1,"div",2),t.qZA()),2&e&&(t.Q6J("ngClass",t.kEZ(3,j1,i.inline,i.right,i.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("ngForOf",i.actions),t.xp6(1),t.Q6J("ngIf",i.hint))},dependencies:[x.mk,x.sg,x.O5,Gr,ie],styles:[".actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;height:100%}.actions.inline[_ngcontent-%COMP%]{align-items:flex-start}.actions.right[_ngcontent-%COMP%]{align-items:flex-end;text-align:right}.actions.right[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{margin-left:auto}.actions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{position:relative;width:100%}.actions[_ngcontent-%COMP%] ghs-action.spacing[_ngcontent-%COMP%]{margin-top:.7em}.actions[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:2em;border-top:.11em var(--ghs-color-white) dotted;margin:.1em}.actions[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{position:relative;width:60%;background:rgb(124,210,224);background:linear-gradient(90deg,rgb(124,210,224) 0%,rgb(193,236,245) 100%);color:var(--ghs-color-black);font-size:70%;font-weight:700;margin:calc(var(--ghs-unit) * .5);margin-top:calc(var(--ghs-unit) * 1);padding:calc(var(--ghs-unit) * .5)}.actions[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:auto}.actions[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:auto}.actions.fh[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:3em;height:.06em;min-height:.06em;border-top:none;background:linear-gradient(90deg,transparent 0%,var(--ghs-color-white) 50%,transparent 100%);margin:.2em}"]})),a})();function B1(o,a){if(1&o&&(t.TgZ(0,"span",5),t._UZ(1,"img",3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/condition/"+n.value+".svg",t.LSH)("alt",e.action.small)}}function z1(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",2),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.click(s))}),t._UZ(1,"img",3),t.YNc(2,B1,2,2,"span",4),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Udp("grid-column-start",2*n.x+1+n.y%2)("grid-column-end",2*n.x+3+n.y%2)("grid-row-start",n.y+1)("grid-row-end",n.y+1),t.Q6J("title",e.ActionHex.toString(n)),t.xp6(1),t.Q6J("src","./assets/images/action/hex/"+n.type+".svg",t.LSH)("alt",e.action.small),t.xp6(1),t.Q6J("ngIf",e.hasCondition(n))}}const _x=function(o){return{small:o}};let Sf=(()=>{var o;class a{constructor(){(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"size",void 0),(0,_.Z)(this,"clickCallback",new t.vpe),(0,_.Z)(this,"doubleclickCallback",new t.vpe),(0,_.Z)(this,"hexes",[]),(0,_.Z)(this,"ActionHex",Fi),(0,_.Z)(this,"doubleClick",null)}ngOnChanges(e){this.hexes=[],this.value||(this.value=""+this.action.value),this.value.split("|").forEach(i=>{const s=Fi.fromString(i);null!=s&&this.hexes.push(s)})}click(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,this.doubleclickCallback.emit(e)):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.clickCallback.emit(e),this.doubleClick=null)},200)}hasCondition(e){return e.value&&Object.keys(re.fT).includes(e.value)||!1}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-action-hex"]],inputs:{action:"action",value:"value",size:"size"},outputs:{clickCallback:"clickCallback",doubleclickCallback:"doubleclickCallback"},features:[t.TTD],decls:2,vars:6,consts:[[1,"hex-grid",3,"ngClass"],["class","hex",3,"grid-column-start","grid-column-end","grid-row-start","grid-row-end","title","click",4,"ngFor","ngForOf"],[1,"hex",3,"title","click"],[3,"src","alt"],["class","condition",4,"ngIf"],[1,"condition"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,z1,3,12,"div",1),t.qZA()),2&e&&(t.Udp("--ghs-hex-size",i.size),t.Q6J("ngClass",t.VKq(4,_x,i.action.small)),t.xp6(1),t.Q6J("ngForOf",i.hexes))},dependencies:[x.mk,x.sg,x.O5],styles:[".hex-grid[_ngcontent-%COMP%]{--ghs-hex-size: 1;display:grid;justify-items:center;align-items:center;grid-template-columns:calc(.6em * var(--ghs-hex-size));filter:var(--ghs-filter-shadow)}.hex-grid.small[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(.6em * var(--ghs-hex-size) * 2);height:calc(.6em * var(--ghs-hex-size) * 1.7)}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:absolute;top:calc(.6em * var(--ghs-hex-size) * -.2);left:calc(.6em * var(--ghs-hex-size) * -.1);width:calc(.6em * var(--ghs-hex-size) * 1.3)}.hex-grid[_ngcontent-%COMP%] .hex[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}"]})),a})();var he=E(8927),Ze=E(7177),In=E(4968),qe=E(9120),Ee=E(8272),ge=E(6565);function px(o,a){if(1&o&&(t.TgZ(0,"div",12)(1,"div",13),t._UZ(2,"div",14),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Udp("background-image",n.monster.noThumbnail||n.settingsManager.settings.disableArtwork?"":"url("+n.gameManager.monsterManager.monsterThumbnail(n.monster)+")")}}function fx(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw();t.Q6J("ghs-label",(n.monster.isAlly?"game.ally.addEntity.":"monster.addEntity.")+n.type)}}const G1=function(o,a){return[o,a]};function V1(o,a){if(1&o&&t._UZ(0,"span",15),2&o){const n=t.oxw();t.Q6J("ghs-label","monster.changeStandee")("ghs-label-args",t.WLB(2,G1,n.entity.type,""+n.entity.number))}}function Xk(o,a){if(1&o&&t._UZ(0,"span",15),2&o){const n=t.oxw();t.Q6J("ghs-label","monster.setStandees")("ghs-label-args",t.WLB(2,G1,n.type,""+n.entitiesLeft()))}}const t6=function(o,a,n,e){return{disabled:o,existing:a,elite:n,boss:e}};function e6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.pickNumber(s))}),t.TgZ(1,"span",17),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.l5B(2,t6,e.hasNumber(n)&&(!e.change||!e.entity),e.hasNumber(n),e.type==e.MonsterType.elite,e.type==e.MonsterType.boss)),t.xp6(2),t.Oqu(n)}}const n6=function(o){return{active:o}};function i6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.summon=!i.summon)}),t._UZ(1,"img",19),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,n6,n.summon)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.monster.summonColor,".png",t.LSH)}}function o6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",20)(1,"a",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleMonsterType())}),t._UZ(2,"span",15),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","monster.changeType")("ghs-label-args",t.WLB(2,G1,n.entity.type==n.MonsterType.normal?n.entity.type:n.MonsterType.elite,n.entity.type==n.MonsterType.normal?n.MonsterType.elite:n.MonsterType.normal))}}function a6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",22)(1,"a",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(2,"span",3),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","monster.cancelNumberpicker"))}const s6=function(o,a){return{elite:o,boss:a}},r6=function(o,a){return{extended:o,small:a}};let Gd=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"max",void 0),(0,_.Z)(this,"range",void 0),(0,_.Z)(this,"summon",!1),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"entities",void 0),(0,_.Z)(this,"automatic",!1),(0,_.Z)(this,"change",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"timeout",void 0),(0,_.Z)(this,"gameManager",d.v),this.dialogRef=i,this.monster=e.monster,this.type=e.type,this.max=d.v.monsterManager.monsterStandeeMax(this.monster),this.range=e.range,this.entity=e.entity,this.entities=e.entities,this.automatic=e.automatic||!1,this.change=e.change||!1,this.entity||(this.entity=this.entities&&this.entities.find(s=>s.number<0)||void 0),this.entity&&(this.type=this.entity.type)}onKeyPress(e){if(e.key in["0","1","2","3","4","5","6","7","8","9"]){if(this.timeout){clearTimeout(this.timeout),this.timeout=void 0;const i=+e.key+10,s=+e.key;i<=this.max?this.pickNumber(i):(this.pickNumber(1),this.pickNumber(s))}else"1"===e.key&&this.range.filter(i=>i>=10).some(i=>!this.hasNumber(i))?this.timeout=setTimeout(()=>{this.pickNumber(1)},1e3):this.pickNumber(+e.key);e.preventDefault(),e.stopPropagation()}}ngOnInit(){this.range=Array.from(Array(this.max).keys()).map(e=>e+1)}hasEntity(){return this.monster.entities.filter(e=>d.v.entityManager.isAlive(e)&&(!R.r.settings.hideStats||e.type==this.type)).length>0}hasNumber(e){return null!=d.v.monsterManager.monsterStandeeUsed(this.monster,e)}entitiesLeft(){return this.entities&&this.entities.filter(e=>e.type==this.type&&e.number<1).length||0}randomStandee(){const e=(0,ae.j9)(this.monster.standeeCount||this.monster.count,this.monster.level);let i=Math.floor(Math.random()*e)+1;for(;this.monster.entities.some(s=>s.number==i);)i=Math.floor(Math.random()*e)+1;this.pickNumber(i,!0,!1)}nextStandee(){let e=1;for(;this.monster.entities.some(i=>i.number==e);)e+=1;this.pickNumber(e,!0,!0)}pickNumber(e,i=!1,s=!1){if(!(e<1||e>this.max)){if(this.hasNumber(e)||!this.type||this.change){if(this.change&&this.entity&&this.entity.number!=e){d.v.stateManager.before("updateStandee","data.monster."+this.monster.name,"monster."+this.entity.type,""+e);let l=d.v.monsterManager.monsterStandeeUsed(this.monster,e);if(l){let m=-1;for(;d.v.monsterManager.monsterStandeeUsed(this.monster,m);)m-=1;l.number=m}this.entity.number=e,d.v.stateManager.after()}}else{let l="addStandee";i&&!s?l="addRandomStandee":i&&(l="addNextStandee"),d.v.stateManager.before(l,"data.monster."+this.monster.name,"monster."+this.type,""+e);const m=this.monster.entities.find(O=>O.number==e);if(m&&d.v.monsterManager.removeMonsterEntity(this.monster,m),this.entity)this.entity.number=e,this.entity.revealed&&(this.entity.revealed=!1),this.entity=this.entities&&(this.entities.find(O=>O.number<0&&O.type==this.type)||this.entities.find(O=>O.number<0))||void 0,this.entity&&(this.type=this.entity.type);else{const O=d.v.monsterManager.addMonsterEntity(this.monster,e,this.type,this.summon);d.v.game.state==ge.D2.next&&O&&(this.monster.active=!d.v.game.figures.some(k=>k.active),this.monster.active&&(d.v.sortFigures(this.monster),O.active=!0))}d.v.stateManager.after(),(this.entities?this.monster.entities.filter(O=>O.number>0).length:d.v.entityManager.entities(this.monster).length)==(0,ae.j9)(this.monster.count,this.monster.level)||!this.entity&&this.entities?this.dialogRef.close():this.entity&&this.entities&&this.monster.entities.filter(O=>O.number>0).length==(0,ae.j9)(this.monster.count,this.monster.level)-1&&this.nextStandee()}this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}}toggleMonsterType(){if(this.entity&&(this.entity.type==ee.M.normal||this.entity.type==ee.M.elite)){const e=this.monster.stats.find(s=>s.level==this.monster.level&&s.type==ee.M.normal),i=this.monster.stats.find(s=>s.level==this.monster.level&&s.type==ee.M.elite);e&&i?(d.v.stateManager.before("changeMonsterType","data.monster."+this.monster.name,"monster."+this.entity.type,""+this.entity.number,this.entity.type==ee.M.normal?ee.M.elite:ee.M.normal),this.entity.type=this.entity.type==ee.M.normal?ee.M.elite:ee.M.normal,this.entity.maxHealth=(0,ae.j9)(this.entity.type==ee.M.normal?e.health:i.health,this.monster.level),(this.entity.health>this.entity.maxHealth||this.entity.health0),t.xp6(1),t.Q6J("ngClass",t.WLB(14,r6,4==i.max,(i.automatic||i.change||i.entities&&i.entities.length>0)&&i.max>4&&i.max<10)),t.xp6(1),t.Q6J("ngForOf",i.range),t.xp6(1),t.Q6J("ngIf",!(i.change||i.automatic||i.entities&&0!=i.entities.length)),t.xp6(1),t.Q6J("ngIf",i.change&&i.entity&&i.entity.type!=i.MonsterType.boss),t.xp6(1),t.Q6J("ngIf",i.automatic))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;display:flex;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 7.8 * var(--ghs-text-factor))}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:25% 25% 5% 5%;border:solid calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) var(--ghs-color-gray);overflow:hidden;z-index:0}.title[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{position:absolute;top:-8%;left:0;width:100%;height:150%;background-color:var(--ghs-color-darkgray);background-size:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor)) AUTO;background-repeat:no-repeat;background-position:top center;filter:brightness(70%)}.title[_ngcontent-%COMP%] .elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.title[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,auto);justify-items:center;align-items:center;gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.number-container.extended[_ngcontent-%COMP%]{grid-template-columns:repeat(5,auto)}.number-container.small[_ngcontent-%COMP%]{grid-template-columns:repeat(3,auto)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.number-container[_ngcontent-%COMP%] .number-button.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .number-button.existing[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray)}.number-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]{pointer-events:none}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] img.summon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .summon-button.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;border-radius:100%}.change-type[_ngcontent-%COMP%]{display:flex;justify-content:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.change-type[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.change-type[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.cancel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.cancel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.cancel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}"]})),a})();var Nn=E(5601),oa=E(1975);const mx=function(o){return{selected:o}};function Bu(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",7),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.toggleSelect(s))}),t._UZ(1,"img",8),t.TgZ(2,"span",9),t._uU(3),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(3,mx,i.selected==e)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.hij(" ",i.gameManager.characterManager.characterName(n,!0)," ")}}const Y1=function(o){return[o]},c6=function(o){return{disabled:o}},l6=function(){return[]};let K1=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"selected",0),(0,_.Z)(this,"characters",void 0),(0,_.Z)(this,"type",void 0),this.data=e,this.dialogRef=i,this.characters=e.characters,this.type=e.type}toggleSelect(e){this.selected=this.selected==e?-1:e}select(){this.dialogRef.close(this.selected)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-additional-am-select-dialog"]],decls:9,vars:14,consts:[[3,"ghs-label","ghs-label-args"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"menu"],[1,"cancel",3,"click"],[3,"ghs-label"],[1,"select",3,"ngClass","click"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[1,"name"]],template:function(e,i){1&e&&(t.TgZ(0,"p"),t._UZ(1,"span",0),t.qZA(),t.TgZ(2,"div",1),t.YNc(3,Bu,4,5,"div",2),t.qZA(),t.TgZ(4,"div",3)(5,"a",4),t.NdJ("click",function(){return i.dialogRef.close()}),t._UZ(6,"span",5),t.qZA(),t.TgZ(7,"a",6),t.NdJ("click",function(){return i.select()}),t._UZ(8,"span",0),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ghs-label","game.attackModifiers.additional.dialog")("ghs-label-args",t.VKq(7,Y1,i.type)),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngClass",t.VKq(9,c6,-1==i.selected)),t.xp6(1),t.Q6J("ghs-label",-1==i.selected?"game.attackModifiers.additional.select":"game.attackModifiers.additional.apply")("ghs-label-args",-1!=i.selected?t.VKq(11,Y1,i.characters[i.selected].title||"%data.character."+i.characters[i.selected].name+"%"):t.DdM(13,l6)))},dependencies:[x.mk,x.sg,ie],styles:["p[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-align:center}.characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:.25em;padding:.25em;border:1px solid transparent}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;color:var(--ghs-color-green);margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5;color:var(--ghs-color-gray)}"]})),a})();const $1=function(o){return{hint:o}};let vx=(()=>{var o;class a{constructor(){(0,_.Z)(this,"value",""),(0,_.Z)(this,"args",[]),(0,_.Z)(this,"argLabel",!0),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"size",void 0),(0,_.Z)(this,"hint",!1)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-tooltip"]],inputs:{value:"value",args:["ghs-label-args","args"],argLabel:["ghs-label-args-replace","argLabel"],style:"style",relative:"relative",size:"size",hint:"hint"},decls:2,vars:12,consts:[[3,"ngClass"],[1,"placeholder","text-white",3,"ghs-label","ghs-label-args","ghs-label-args-replace","relative"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"span",1),t.qZA()),2&e&&(t.Tol(i.size),t.Q6J("ngClass",t.VKq(10,$1,i.hint)),t.xp6(1),t.Akn(i.style),t.Q6J("ghs-label",i.value)("ghs-label-args",i.args)("ghs-label-args-replace",i.argLabel)("relative",i.relative))},dependencies:[x.mk,ie],styles:['[_nghost-%COMP%]{display:block;z-index:3000}div[_ngcontent-%COMP%]{position:relative;font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-text-factor));font-weight:200;margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));max-width:calc(var(--ghs-unit) * 50 * var(--ghs-text-factor))}div[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-color-darkgray);border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));opacity:.9;z-index:0}div[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{z-index:1}div.hint[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));background-color:var(--ghs-color-black)}div.small[_ngcontent-%COMP%]{font-weight:100;font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}div.large[_ngcontent-%COMP%]{font-weight:400;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor)) calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}'],data:{animation:[fo("tooltip",[li(":enter",[Wa({opacity:0}),Pe(300,Wa({opacity:1}))]),li(":leave",[Pe(300,Wa({opacity:0}))])])]},changeDetection:0})),a})(),Ba=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"overlayPositionBuilder",void 0),(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"value",""),(0,_.Z)(this,"args",[]),(0,_.Z)(this,"argLabel",!0),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"size",void 0),(0,_.Z)(this,"hint",!1),(0,_.Z)(this,"toggable",!0),(0,_.Z)(this,"originX",void 0),(0,_.Z)(this,"originY",void 0),(0,_.Z)(this,"overlayX",void 0),(0,_.Z)(this,"overlayY",void 0),(0,_.Z)(this,"offsetX",0),(0,_.Z)(this,"offsetY",0),(0,_.Z)(this,"delay",0),(0,_.Z)(this,"overlayRef",void 0),(0,_.Z)(this,"timeout",void 0),this.overlay=e,this.overlayPositionBuilder=i,this.elementRef=s}ngOnInit(){const e=this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([{originX:this.originX||"start",originY:this.originY||"bottom",overlayX:this.overlayX||(this.hint?"center":"start"),overlayY:this.overlayY||"top",offsetX:this.offsetX,offsetY:this.offsetY}]);this.overlayRef=this.overlay.create({positionStrategy:e}),this.overlayRef.hostElement.style.zIndex="3000",this.timeout=null}show(){(R.r.settings.tooltips||!this.toggable)&&this.value&&!this.overlayRef.hasAttached()&&!this.timeout&&(this.timeout=setTimeout(()=>{const e=this.overlayRef.attach(new zs.C5(vx));e.instance.value=this.value,e.instance.args=this.args,e.instance.argLabel=this.argLabel,e.instance.style=this.style,e.instance.relative=this.relative,e.instance.size=this.size,e.instance.hint=this.hint},this.delay||!this.hint&&500||1))}hide(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.overlayRef.hasAttached()&&this.overlayRef.detach()}ngOnDestroy(){this.hide(),this.overlayRef.dispose()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ti.aV),t.Y36(ti.wJ),t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","ghs-tooltip",""]],hostBindings:function(e,i){1&e&&t.NdJ("mouseover",function(){return i.show()})("mouseleave",function(){return i.hide()})},inputs:{value:["ghs-tooltip","value"],args:["ghs-label-args","args"],argLabel:["ghs-label-args-replace","argLabel"],style:"style",relative:"relative",size:"size",hint:"hint",toggable:"toggable",originX:"originX",originY:"originY",overlayX:"overlayX",overlayY:"overlayY",offsetX:"offsetX",offsetY:"offsetY",delay:"delay"}})),a})();function Cx(o,a){1&o&&t._UZ(0,"span",11)}const Vd=function(o,a,n){return{active:o,disabled:a,immunity:n}};function Mx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(2,"img",9),t.qZA(),t.YNc(3,Cx,1,0,"span",10),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(8,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function Yd(o,a){1&o&&t._UZ(0,"span",11)}const Yc=function(o){return{disabled:o}};function Ox(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",13),t._uU(5),t.qZA()(),t.YNc(6,Yd,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function Px(o,a){1&o&&t._UZ(0,"span",11)}function yx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",15),t._uU(5),t.qZA()(),t.YNc(6,Px,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function bx(o,a){1&o&&t._UZ(0,"span",11)}function xx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(2,"img",9),t.qZA(),t.YNc(3,bx,1,0,"span",10),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(8,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function wx(o,a){1&o&&t._UZ(0,"span",11)}function Ef(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",13),t._uU(5),t.qZA()(),t.YNc(6,wx,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}function kx(o,a){1&o&&t._UZ(0,"span",11)}function Tx(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",5)(1,"img",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dec(s))}),t.qZA(),t.TgZ(2,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s))}),t._UZ(3,"img",9),t.TgZ(4,"span",15),t._uU(5),t.qZA()(),t.YNc(6,kx,1,0,"span",10),t.TgZ(7,"img",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.inc(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(10,Yc,e.getValue(n)<=1)),t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.kEZ(12,Vd,!e.immunityEnabled&&e.hasCondition(n)||e.immunityEnabled&&-1!=e.immunities.indexOf(n.name),!e.hasCondition(n)&&!e.immunityEnabled&&e.isImmune(n.name)&&!e.permanentEnabled&&!e.isPermanent(n.name),e.isImmune(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(2),t.Oqu(e.getValue(n)),t.xp6(1),t.Q6J("ngIf",e.isPermanent(n.name))}}const Zx=function(o){return{fh:o}},W1=function(o){return{active:o}};let zu=(()=>{var o;class a{constructor(){(0,_.Z)(this,"entityConditions",void 0),(0,_.Z)(this,"immunities",void 0),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"entities",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"columns",3),(0,_.Z)(this,"onChange",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"standardNegative",[]),(0,_.Z)(this,"upgradeNegative",[]),(0,_.Z)(this,"stackNegative",[]),(0,_.Z)(this,"standardPositive",[]),(0,_.Z)(this,"upgradePositive",[]),(0,_.Z)(this,"stackPositive",[]),(0,_.Z)(this,"monsterType",!1),(0,_.Z)(this,"permanentEnabled",!1),(0,_.Z)(this,"immunityEnabled",!1),d.v.uiChange.subscribe({next:()=>{this.initializeConditions()}})}ngOnInit(){if(this.initializeConditions(),this.entities){const e=this.entities.map(i=>i instanceof In.g&&i.type).filter((i,s,l)=>i&&l.indexOf(i)==s);1==e.length&&(this.monsterType=e[0])}window.addEventListener("keydown",e=>{if(!(e.altKey||e.metaKey||window.document.activeElement&&("INPUT"==window.document.activeElement.tagName||"SELECT"==window.document.activeElement.tagName||"TEXTAREA"==window.document.activeElement.tagName)||e.ctrlKey||e.shiftKey||-1==["1","2","3","4","5","6","7","8","9","0"].indexOf(e.key))){if((!(this.entity instanceof qe.CH)||this.entity.escort)&&(!(this.figure instanceof Nn.k)||this.figure.escort)){let s,i=+e.key;0==i?i=9:i--,il.name==e.name&&l.state!=re.tT.removed&&!l.expired&&(!this.permanentEnabled||(i||this.permanentEnabled)&&l.permanent)):this.entity?d.v.entityManager.hasCondition(this.entity,e,i||this.permanentEnabled):this.entities.every(l=>d.v.entityManager.hasCondition(l,e,i||this.permanentEnabled))}isImmune(e){return this.immunities?-1!=this.immunities.indexOf(e):this.figure instanceof Ze.Q?this.entity instanceof In.g?d.v.entityManager.isImmune(this.entity,this.figure,e):this.entities.every(i=>this.figure instanceof Ze.Q&&i instanceof In.g&&d.v.entityManager.isImmune(i,this.figure,e)):this.figure instanceof oe.z&&this.entity instanceof oe.z&&d.v.entityManager.isImmune(this.entity,this.figure,e)}isPermanent(e){return!!this.entityConditions&&this.entityConditions.some(i=>i.name==e&&i.permanent&&!i.expired)}inc(e){e.value=this.getValue(e)+1,this.checkUpdate(e),this.onChange.emit(this.entityConditions)}dec(e){e.value=this.getValue(e)-1,e.value<1&&(e.value=1),this.checkUpdate(e),this.onChange.emit(this.entityConditions)}getValue(e){const i=this.entityConditions.find(s=>s.name==e.name&&!s.expired);return i?i.value:e.value}checkUpdate(e){const i=this.entityConditions.find(s=>s.name==e.name&&!s.expired);i&&(i.value=e.value)}toggleCondition(e,i=!1){if(this.immunityEnabled&&!i)-1==this.immunities.indexOf(e.name)?this.immunities.push(e.name):this.immunities.splice(this.immunities.indexOf(e.name),1);else{if(this.hasCondition(e,i||this.permanentEnabled)){let s=this.entityConditions.find(l=>l.name==e.name&&(!i||l.permanent));s&&(s.expired=!0,s.lastState=s.state,s.state=re.tT.removed)}else{let s=this.entityConditions.find(l=>l.name==e.name&&(!i||l.permanent));s?(s.expired=!1,s.lastState=s.state,s.state=re.tT.new):(s=new re.hT(e.name,e.value),s.lastState=s.state,s.state=re.tT.new,this.entityConditions.push(s)),s.permanent=i||this.permanentEnabled}this.onChange.emit(this.entityConditions)}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-conditions"]],inputs:{entityConditions:"entityConditions",immunities:"immunities",entity:"entity",entities:"entities",figure:"figure",type:"type",columns:"columns"},outputs:{onChange:"change"},decls:14,vars:17,consts:[[3,"ngClass"],[1,"condition-container","negative"],["class","item",4,"ngFor","ngForOf"],[1,"condition-container","positive"],[1,"condition-container","menu"],[1,"item"],[1,"condition","permanent",3,"ngClass","click"],[1,"condition","immunity",3,"ngClass","click"],[1,"condition",3,"ghs-tooltip","originX","overlayX","originY","overlayY","ngClass","click"],[3,"src"],["class","condition permanent permanent-overlay",4,"ngIf"],[1,"condition","permanent","permanent-overlay"],["src","./assets/images/left.svg",1,"ghs-svg","dec",3,"ngClass","click"],[1,"value"],["src","./assets/images/right.svg",1,"ghs-svg","inc",3,"click"],[1,"value","stack"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,Mx,4,12,"a",2),t.YNc(3,Ox,8,16,"a",2),t.YNc(4,yx,8,16,"a",2),t.qZA(),t.TgZ(5,"div",3),t.YNc(6,xx,4,12,"a",2),t.YNc(7,Ef,8,16,"a",2),t.YNc(8,Tx,8,16,"a",2),t.qZA(),t.TgZ(9,"div",4)(10,"a",5)(11,"span",6),t.NdJ("click",function(){return i.permanentEnabled=!i.permanentEnabled,i.immunityEnabled=!1}),t.qZA()(),t.TgZ(12,"a",5)(13,"span",7),t.NdJ("click",function(){return i.immunityEnabled=!i.immunityEnabled,i.permanentEnabled=!1}),t.qZA()()()()),2&e&&(t.Udp("--condition-columns",i.columns),t.Q6J("ngClass",t.VKq(11,Zx,i.settingsManager.settings.fhStyle)),t.xp6(2),t.Q6J("ngForOf",i.standardNegative),t.xp6(1),t.Q6J("ngForOf",i.upgradeNegative),t.xp6(1),t.Q6J("ngForOf",i.stackNegative),t.xp6(2),t.Q6J("ngForOf",i.standardPositive),t.xp6(1),t.Q6J("ngForOf",i.upgradePositive),t.xp6(1),t.Q6J("ngForOf",i.stackPositive),t.xp6(3),t.Q6J("ngClass",t.VKq(13,W1,i.permanentEnabled)),t.xp6(2),t.Q6J("ngClass",t.VKq(15,W1,i.immunityEnabled)))},dependencies:[x.mk,x.sg,x.O5,Ba],styles:['.condition-container[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(var(--condition-columns),calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto}.condition-container[_ngcontent-%COMP%]:not(:first-child){margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{cursor:pointer;display:flex;position:relative;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));z-index:1}.item[_ngcontent-%COMP%] .condition.permanent-overlay[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));pointer-events:none;z-index:2}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:after{pointer-events:none;content:" ";height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);position:absolute;bottom:0;left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));transform:translate(-50%)}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value.stack[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor))}.item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:after{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-red) solid}.item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray);filter:brightness(.5) grayscale(.2)}.item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.item[_ngcontent-%COMP%] .dec[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc[_ngcontent-%COMP%]{cursor:pointer;position:absolute;width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow);top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:translateY(-50%)}.item[_ngcontent-%COMP%] .dec.dec[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc.dec[_ngcontent-%COMP%]{left:0}.item[_ngcontent-%COMP%] .dec.inc[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc.inc[_ngcontent-%COMP%]{right:0}.item[_ngcontent-%COMP%] .dec.disabled[_ngcontent-%COMP%], .item[_ngcontent-%COMP%] .inc.disabled[_ngcontent-%COMP%]{pointer-events:none;filter:var(--ghs-filter-darkgray)}']})),a})(),Kd=(()=>{var o;class a{transform(e,...i){return(0,he.uZ)(e,-1!=i.indexOf("empty"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275pipe",t.Yjl({name:"ghsValueSign",type:o,pure:!0})),a})(),Ii=(()=>{var o;class a{transform(e,i,s=!1){e.length=0;for(let l=0;l{var o;class a{transform(e){return Math.floor(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275pipe",t.Yjl({name:"ghsFloor",type:o,pure:!0})),a})(),sg=(()=>{var o;class a{transform(e){return e<0?0:e}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275pipe",t.Yjl({name:"ghsMinZero",type:o,pure:!0})),a})(),Ax=(()=>{var o;class a{transform(e,i){return e.filter(s=>{if(!i||""==i)return!0;i=i.toLowerCase();let l=s.index.toLowerCase(),m=0;for(;i.startsWith("0");)m++,i=i.replace("0","");for(let O=0;O=10),t.xp6(1),t.Q6J("ngClass",t.VKq(3,Df,n.entityIndex<10&&n.entityIndex==n.gameManager.stateManager.keyboardSelect)),t.xp6(2),t.Oqu(n.entityIndex%10)}}let Gu=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"show",!1),(0,_.Z)(this,"entityIndex",-1),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.entityIndex=d.v.entityManager.getIndexForEntity(this.entity),-1!=this.entityIndex&&this.entityIndex++}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-entity-index-key"]],inputs:{entity:"entity",show:"show"},decls:1,vars:1,consts:[["class","key-container",4,"ngIf"],[1,"key-container"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,i){1&e&&t.YNc(0,Sx,5,5,"span",0),2&e&&t.Q6J("ngIf",i.gameManager.stateManager.keyboardSelecting||i.show)},dependencies:[x.mk,x.O5,X1],styles:['.key-container[_ngcontent-%COMP%]{display:flex;min-width:calc(var(--ghs-unit) * 10);max-width:calc(var(--ghs-unit) * 10);z-index:999}kbd[_ngcontent-%COMP%]{position:relative;display:inline-block;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);border-radius:calc(var(--ghs-unit) * .5);background:linear-gradient(180deg,#282828,#202020);box-shadow:inset calc(var(--ghs-unit) * -.4) 0 calc(var(--ghs-unit) * .4) #00000026,inset 0 calc(var(--ghs-unit) * -.4) calc(var(--ghs-unit) * .4) #00000040,0 0 0 calc(var(--ghs-unit) * .1) #000000bf,calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * 1.25) #0006;overflow:hidden}kbd[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * .125);left:calc(var(--ghs-unit) * .2);bottom:calc(var(--ghs-unit) * .7);right:calc(var(--ghs-unit) * .6);background:linear-gradient(90deg,#232323,#4a4a4a);border-radius:calc(var(--ghs-unit) * .5);box-shadow:calc(var(--ghs-unit) * -.5) calc(var(--ghs-unit) * -.5) calc(var(--ghs-unit) * .5) #ffffff40,calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .25) calc(var(--ghs-unit) * .5) #00000026;border-left:calc(var(--ghs-unit) * .05) solid rgba(0,0,0,.2666666667);border-bottom:calc(var(--ghs-unit) * .05) solid rgba(0,0,0,.2666666667);border-top:calc(var(--ghs-unit) * .05) solid rgba(0,0,0,.6)}kbd[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * .3);left:calc(var(--ghs-unit) * .9);font-size:calc(var(--ghs-unit) * 2);font-family:ghs-normal;font-style:normal;text-shadow:none;color:#ddd}kbd.highlight[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .3);height:calc(var(--ghs-unit) * 3.7);box-shadow:inset calc(var(--ghs-unit) * -.1) 0 calc(var(--ghs-unit) * .1) #00000026,inset 0 calc(var(--ghs-unit) * -.1) calc(var(--ghs-unit) * .1) #00000040,0 0 0 calc(var(--ghs-unit) * .025) #000000bf,calc(var(--ghs-unit) * .125) calc(var(--ghs-unit) * .25) calc(var(--ghs-unit) * .3) #0006}kbd.highlight[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#888}kbd.highlight[_ngcontent-%COMP%]:before{bottom:calc(var(--ghs-unit) * .3)}']})),a})(),iO=(()=>{var o;class a{constructor(){(0,_.Z)(this,"directives",[]),(0,_.Z)(this,"active",void 0),(0,_.Z)(this,"behindActive",void 0),(0,_.Z)(this,"currentZoom",0),(0,_.Z)(this,"zoomDiff",-1),this.currentZoom=R.r.settings.zoom,window.addEventListener("mousedown",e=>{if(this.active=this.find(e.target),this.active){if(this.active.clickBehind&&(this.active=this.find(this.active.elementRef.nativeElement.parentElement),!this.active)){const i=document.elementsFromPoint(e.clientX,e.clientY);for(let s=0;sl&&m.elementRef.nativeElement==l),this.active))break}}this.active&&(this.active.pointerdown(e),e.preventDefault(),e.stopPropagation())}}),window.addEventListener("touchstart",e=>{if(1==e.touches.length&&(this.active=this.find(e.target),this.active)){if(this.active.clickBehind&&(this.behindActive=this.find(this.active.elementRef.nativeElement.parentElement),!this.behindActive)){const i=document.elementsFromPoint(e.touches[0].clientX,e.touches[0].clientY);for(let s=0;sl&&m.elementRef.nativeElement==l),this.behindActive)){this.behindActive.pointerdown(e);break}}}this.active&&(this.active.pointerdown(e),e.preventDefault(),e.stopPropagation())}}),window.addEventListener("mousemove",e=>{this.active&&(this.active.pointermove(e),window.document.body.classList.add("dragging"),window.document.body.classList.add("no-pointer"))},{passive:!0}),window.addEventListener("touchmove",e=>{1==e.touches.length&&this.active?(this.active.pointermove(e),window.document.body.classList.add("dragging"),window.document.body.classList.add("no-pointer"),this.behindActive&&(this.behindActive.cancel(),this.behindActive=void 0)):(this.cancel(),this.touchmove(e))},{passive:!0}),window.addEventListener("mouseup",e=>{this.active&&(this.active.pointerup(e),this.active=void 0,e.preventDefault(),e.stopPropagation()),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")}),window.addEventListener("touchend",e=>{this.active?(this.active.pointerup(e),this.active=void 0,this.behindActive&&(this.behindActive.pointerup(e),this.behindActive=void 0),e.preventDefault(),e.stopPropagation()):this.touchend(e),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")}),window.addEventListener("touchcancel",e=>{this.active?(this.active.pointerup(e),this.behindActive&&(this.behindActive.pointerup(e),this.behindActive=void 0),this.active.clickBehind||(e.preventDefault(),e.stopPropagation()),this.active=void 0):this.touchend(e),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")})}zoom(e){this.currentZoom+=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+"");const i=+window.getComputedStyle(document.body).getPropertyValue("min-width").replace("px","");e<0&&i>=window.innerWidth&&(this.currentZoom-=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+""))}touchmove(e){if(!R.r.settings.disablePinchZoom&&2===e.touches.length){const i=Math.abs(e.touches[0].clientX-e.touches[1].clientX);this.zoomDiff>0&&this.zoom(Math.ceil(.25*(this.zoomDiff-i))),this.zoomDiff=i}}touchend(e){R.r.settings.disablePinchZoom||e.touches.length<2&&this.zoomDiff>-1&&R.r.settings.zoom!=this.currentZoom&&(this.zoomDiff=-1,R.r.setZoom(this.currentZoom))}cancel(){this.active&&(this.active.cancel(),this.active=void 0),this.behindActive&&(this.behindActive.cancel(),this.behindActive=void 0),window.document.body.classList.remove("dragging"),window.document.body.classList.remove("no-pointer")}register(e){this.directives.push(e)}unregister(e){this.directives.splice(this.directives.indexOf(e),1)}find(e){let i=e,s=this.directives.find(m=>i&&m.elementRef.nativeElement==i),l=0;for(;!s&&l<50&&i!==document.body&&i.parentElement;)i=i.parentElement,s=this.directives.find(m=>i&&m.elementRef.nativeElement==i),l++;return s}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275prov",t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"})),a})(),An=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"service",void 0),(0,_.Z)(this,"clickBehind",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"screenWidth",!1),(0,_.Z)(this,"repeat",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"forcePress",!1),(0,_.Z)(this,"forceDoubleClick",!1),(0,_.Z)(this,"onRelease",!1),(0,_.Z)(this,"dragMove",new t.vpe),(0,_.Z)(this,"dragEnd",new t.vpe),(0,_.Z)(this,"dragCancel",new t.vpe),(0,_.Z)(this,"singleClick",new t.vpe),(0,_.Z)(this,"doubleClick",new t.vpe),(0,_.Z)(this,"timeout",null),(0,_.Z)(this,"relativeValue",-1),(0,_.Z)(this,"value",-1),(0,_.Z)(this,"repeats",-1),(0,_.Z)(this,"down",!1),(0,_.Z)(this,"clicks",0),(0,_.Z)(this,"startX",0),(0,_.Z)(this,"move",!1),this.elementRef=e,this.service=i,this.value=-1,this.elementRef.nativeElement.style["touch-action"]="pan-y"}ngOnInit(){this.service.register(this)}ngOnDestroy(){this.service.unregister(this)}pointerdown(e){(!(e instanceof MouseEvent)||!e.button)&&(this.down=!0,this.startX=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,this.move||!this.repeat||this.doubleClick.observed?(this.forcePress||R.r.settings.pressDoubleClick&&!this.forceDoubleClick&&this.doubleClick.observed&&!this.move&&!(e instanceof MouseEvent))&&(this.timeout=setTimeout(()=>{(e instanceof MouseEvent||!this.onRelease)&&this.doubleClick.emit(e),this.timeout=null,this.clicks=2},550)):(this.repeats=-1,this.repeatTimeout(e)))}pointermove(e){if(this.down){const i=e instanceof MouseEvent?e.clientX:e.touches[0].clientX;!this.move&&Math.abs(this.startX-i)>7?this.panstart(e):this.move&&this.panmove(e)}}pointerup(e){this.down&&(this.down=!1,this.startX=0,this.move?this.clicks=0:!this.forcePress&&(e instanceof MouseEvent||!R.r.settings.pressDoubleClick||this.forceDoubleClick)?(this.clicks++,this.timeout&&(clearTimeout(this.timeout),this.timeout=null),2==this.clicks&&this.doubleClick.observed?(this.doubleClick.emit(e),this.clicks=0):this.timeout=setTimeout(()=>{this.clicks>0&&(!this.repeat||this.doubleClick.observed)&&this.singleClick.emit(e),this.clicks=0,this.timeout=null},this.doubleClick.observed?250:0)):e instanceof MouseEvent||!this.onRelease||2!=this.clicks?(this.clicks<2&&(!this.repeat||this.doubleClick.observed)&&this.singleClick.emit(e),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.clicks=0):(this.doubleClick.emit(e),this.clicks=0),this.panend(e))}panstart(e){!this.disabled&&R.r.settings.dragValues&&(this.dragMove.observed||this.dragEnd.observed)&&(this.elementRef.nativeElement.classList.add("dragging"),this.move=!0,this.timeout&&(clearTimeout(this.timeout),this.timeout=null))}panmove(e){if(!this.disabled&&R.r.settings.dragValues&&(this.dragMove.observed||this.dragEnd.observed)){const i=this.elementRef.nativeElement.getBoundingClientRect(),s=e instanceof MouseEvent?e.clientX:e.touches[0].clientX;this.screenWidth?document.body.clientWidth>1200?this.value=Math.min(99,Math.max(0,s*(1200/document.body.clientWidth)/document.body.clientWidth*100)):(this.value=Math.min(99,Math.max(0,s/document.body.clientWidth*100)),this.relative&&(this.value=.4*this.value)):this.value=Math.min(99,Math.max(0,(s-i.left)/i.width*100)),this.relative&&-1==this.relativeValue&&(this.relativeValue=this.value),this.value=Math.floor(this.relative?this.value-this.relativeValue:this.value),this.dragMove.emit(this.value)}}panend(e){!this.disabled&&R.r.settings.dragValues&&(this.dragMove.observed||this.dragEnd.observed)&&((this.value>=0||this.relative)&&this.dragEnd.emit(this.value),this.repeats=-1,this.startX=-1,this.move=!1,this.value=-1,this.relativeValue=-1,this.elementRef.nativeElement.classList.remove("dragging"))}cancel(){this.down=!1,this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.dragCancel.emit(this.value),this.repeats=-1,this.clicks=0,this.startX=-1,this.move=!1,this.value=-1,this.relativeValue=-1,this.elementRef.nativeElement.classList.remove("dragging")}repeatTimeout(e){this.down&&!this.move&&(this.singleClick.emit(e),-1==this.repeats?this.repeats=500:(this.repeats-=25,this.repeats<25&&(this.repeats=25)),this.timeout=setTimeout(()=>{this.repeatTimeout(e)},this.repeats))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(iO))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["ghs-pointer-input"],["","ghs-pointer-input",""]],inputs:{clickBehind:"clickBehind",relative:"relative",screenWidth:"screenWidth",repeat:"repeat",disabled:"disabled",forcePress:"forcePress",forceDoubleClick:"forceDoubleClick",onRelease:"onRelease"},outputs:{dragMove:"dragMove",dragEnd:"dragEnd",dragCancel:"dragCancel",singleClick:"singleClick",doubleClick:"doubleClick"}})),a})(),aa=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"value",0),(0,_.Z)(this,"colored",!0),(0,_.Z)(this,"empty",!0),(0,_.Z)(this,"hideEmpty",!1),(0,_.Z)(this,"container",!1),this.el=e,this.update()}ngOnChanges(e){this.update()}update(){this.el.nativeElement.innerHTML=(0,he.uZ)(this.value,this.empty),this.container&&(this.el.nativeElement.innerHTML=''+(0,he.uZ)(this.value,this.empty)+""),this.el.nativeElement.classList.remove("hide-zero-value","positive-value","negative-value"),0==this.value&&this.hideEmpty?this.el.nativeElement.classList.add("hide-zero-value"):this.colored&&(this.value>0?this.el.nativeElement.classList.add("positive-value"):this.value<0&&this.el.nativeElement.classList.add("negative-value"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","value-sign",""]],inputs:{value:["value-sign","value"],colored:"colored",empty:"empty",hideEmpty:"hideEmpty",container:"container"},features:[t.TTD]})),a})();const oO=["charactertitle"],Jf=["objectiveTitle"],Uf=["summonTitle"];function Ix(o,a){if(1&o&&t._UZ(0,"ghs-entity-index-key",7),2&o){const n=t.oxw();t.Q6J("entity",n.data.entity)("show",!0)}}const h6=function(o){return{absent:o}};function aO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t._UZ(1,"span",8),t.TgZ(2,"img",9),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleCharacterMarker())}),t.qZA(),t.TgZ(3,"span",10),t._uU(4),t.qZA(),t._UZ(5,"span",8),t.TgZ(6,"img",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleCharacterAbsent())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("src",n.gameManager.toCharacter(n.data.figure).iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(6,h6,n.gameManager.toCharacter(n.data.figure).absent)),t.xp6(1),t.Oqu(n.gameManager.characterManager.characterName(n.gameManager.toCharacter(n.data.figure),!0)),t.xp6(2),t.Q6J("src","./assets/images/status/"+(n.gameManager.toCharacter(n.data.figure).absent?"absent":"present")+".svg",t.LSH)("ghs-label",n.gameManager.toCharacter(n.data.figure).absent?"character.present":"character.absent")("ghs-label-attribute","title")}}function Nx(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.gameManager.toObjective(n.data.entity).title)}}function Jx(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label","data.objective."+n.gameManager.toObjective(n.data.entity).name)}}function Ux(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.gameManager.toObjective(n.data.entity).escort?"escort":"objective")}}function Lx(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," \xa0( "),t._UZ(2,"span",14),t._uU(3," ) "),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label",n.gameManager.toObjective(n.data.entity).escort?"escort":"objective")}}function sO(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",12),t.YNc(2,Nx,2,1,"span",3),t.YNc(3,Jx,1,1,"span",13),t.YNc(4,Ux,1,1,"span",13),t.YNc(5,Lx,4,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.gameManager.toObjective(n.data.entity).escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjective(n.data.entity).title),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjective(n.data.entity).title&&n.gameManager.toObjective(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjective(n.data.entity).title&&!n.gameManager.toObjective(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjective(n.data.entity).title)}}function u6(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.gameManager.toObjectiveContainer(n.data.figure).title)}}function rO(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label","data.objective."+n.gameManager.toObjectiveContainer(n.data.figure).name)}}function Qx(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.gameManager.toObjectiveContainer(n.data.figure).escort?"escort":"objective")}}function cO(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," \xa0( "),t._UZ(2,"span",14),t._uU(3," ) "),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label",n.gameManager.toObjectiveContainer(n.data.figure).escort?"escort":"objective")}}function _6(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",12),t.YNc(2,u6,2,1,"span",3),t.YNc(3,rO,1,1,"span",13),t.YNc(4,Qx,1,1,"span",13),t.YNc(5,cO,4,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.gameManager.toObjectiveContainer(n.data.figure).escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjectiveContainer(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjectiveContainer(n.data.figure).title&&n.gameManager.toObjectiveContainer(n.data.figure).name),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toObjectiveContainer(n.data.figure).title&&!n.gameManager.toObjectiveContainer(n.data.figure).name),t.xp6(1),t.Q6J("ngIf",n.gameManager.toObjectiveContainer(n.data.figure).title)}}function Lf(o,a){if(1&o&&t._UZ(0,"img",20),2&o){const n=t.oxw(2);t.Q6J("src",n.gameManager.monsterManager.monsterThumbnail(n.gameManager.toMonster(n.data.figure)),t.LSH)}}function lO(o,a){1&o&&(t.TgZ(0,"span",21),t._UZ(1,"span",14),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function gO(o,a){1&o&&(t.TgZ(0,"span",22),t._UZ(1,"span",14),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function Rx(o,a){if(1&o&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",n.gameManager.toMonsterEntity(n.data.entity).type),t.xp6(1),t.hij("#",n.gameManager.toMonsterEntity(n.data.entity).number,"")}}const dO=function(o){return{"change-entity":o}};function hO(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeMonsterEntity())}),t.YNc(1,Lf,1,1,"img",16),t._UZ(2,"span",14),t._uU(3,"\xa0 "),t.YNc(4,lO,3,1,"span",17),t.YNc(5,gO,3,1,"span",18),t.YNc(6,Rx,2,2,"span",19),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(6,dO,n.gameManager.monsterManager.monsterStandeeMax(n.gameManager.toMonster(n.data.figure))>1||n.data.entity&&n.gameManager.isMonsterEntity(n.data.entity)&&n.gameManager.toMonsterEntity(n.data.entity).type!=n.MonsterType.boss)),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toMonster(n.data.figure).noThumbnail&&!n.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.data.figure.name),t.xp6(2),t.Q6J("ngIf",n.gameManager.toMonster(n.data.figure).isAlly),t.xp6(1),t.Q6J("ngIf",n.gameManager.toMonster(n.data.figure).isAllied),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isMonsterEntity(n.data.entity))}}function rg(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.gameManager.toCharacter(n.data.figure).title)}}function Vu(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0("),t._UZ(2,"span",14),t._uU(3,")"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.character."+n.data.figure.name)}}function uO(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(2);t.Q6J("ghs-label","data.character."+n.data.figure.name)}}function _O(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("",n.gameManager.toSummon(n.data.entity).title,"\xa0")}}function Fx(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"("),t.qZA())}function qx(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,")"),t.qZA())}function p6(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,Fx,2,0,"span",3),t._UZ(2,"span",14),t.YNc(3,qx,2,0,"span",3),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).title),t.xp6(1),t.Q6J("ghs-label","data.summon."+n.gameManager.toSummon(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).title)}}function pO(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",14),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.summon"))}function Hx(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"small"),t._UZ(2,"img",12),t.YNc(3,rg,2,1,"span",3),t.YNc(4,Vu,4,1,"span",3),t.YNc(5,uO,1,1,"span",13),t.qZA(),t.YNc(6,_O,2,1,"span",3),t.YNc(7,p6,4,3,"span",3),t.YNc(8,pO,2,1,"span",3),t.TgZ(9,"span",24),t._UZ(10,"img",25),t.TgZ(11,"span",26),t._uU(12),t.qZA()(),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("src",n.gameManager.toCharacter(n.data.figure).iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",n.gameManager.toCharacter(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",n.gameManager.toCharacter(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toCharacter(n.data.figure).title),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).title),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).name),t.xp6(1),t.Q6J("ngIf",!n.gameManager.toSummon(n.data.entity).name),t.xp6(2),t.MGl("src","./assets/images/summons/",n.gameManager.toSummon(n.data.entity).color,".png",t.LSH),t.xp6(2),t.Oqu(n.gameManager.toSummon(n.data.entity).number)}}function jx(o,a){if(1&o&&(t.TgZ(0,"div",33),t._UZ(1,"ghs-action",34),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("action",n)("highlight",e.settingsManager.settings.statAnimations)}}const qi=function(o){return{disabled:o}};function f6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.changeLoot(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",38)(5,"span",39),t._uU(6),t.qZA(),t._UZ(7,"img",47)(8,"span",45),t.qZA(),t.TgZ(9,"span",35)(10,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.changeLoot(1))}),t._UZ(11,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(4);t.xp6(2),t.Q6J("ngClass",t.VKq(8,qi,n.gameManager.toCharacter(n.data.entity).loot+n.loot==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.loot")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(n.gameManager.toCharacter(n.data.entity).loot+n.loot),t.xp6(2),t.Q6J("value-sign",n.loot)("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0)}}function m6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(4);return t.KtG(l.changeCharacterToken(-1,s))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",46)(5,"span",39),t._uU(6),t.qZA(),t._UZ(7,"span",14)(8,"span",45),t.qZA(),t.TgZ(9,"span",35)(10,"ghs-pointer-input",36),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(4);return t.KtG(l.changeCharacterToken(1,s))}),t._UZ(11,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(2),t.Q6J("ngClass",t.VKq(9,qi,i.gameManager.toCharacter(i.data.entity).tokenValues[e]+i.characterTokenValues[e]==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","data.character.token."+n)("ghs-label-attribute","title"),t.xp6(2),t.Oqu(i.gameManager.toCharacter(i.data.entity).tokenValues[e]+i.characterTokenValues[e]),t.xp6(1),t.Q6J("ghs-label","%data.characterToken."+i.gameManager.toCharacter(i.data.entity).name+"."+n+"%"),t.xp6(1),t.Q6J("value-sign",i.characterTokenValues[e])("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0)}}function fO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeExperience(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",38)(5,"span",39),t._uU(6),t.qZA(),t._UZ(7,"img",44)(8,"span",45),t.qZA(),t.TgZ(9,"span",35)(10,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeExperience(1))}),t._UZ(11,"img",43),t.qZA()(),t.YNc(12,f6,12,10,"ng-container",3),t.TgZ(13,"span",35)(14,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeCharacterToken(-1))}),t._UZ(15,"img",37),t.qZA()(),t.TgZ(16,"span",46)(17,"span",39),t._uU(18),t.qZA(),t._UZ(19,"span",14)(20,"span",45),t.qZA(),t.TgZ(21,"span",35)(22,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeCharacterToken(1))}),t._UZ(23,"img",43),t.qZA()(),t.YNc(24,m6,12,11,"ng-container",32),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(19,qi,n.gameManager.toCharacter(n.data.entity).experience+n.experience==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.experience")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(n.gameManager.toCharacter(n.data.entity).experience+n.experience),t.xp6(2),t.Q6J("value-sign",n.experience)("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngIf",!n.settingsManager.settings.alwaysLootDeck&&!n.gameManager.fhRules()),t.xp6(2),t.Q6J("ngClass",t.VKq(21,qi,n.gameManager.toCharacter(n.data.entity).token+n.characterToken==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.character.token")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(n.gameManager.toCharacter(n.data.entity).token+n.characterToken),t.xp6(1),t.Q6J("ghs-label","%data.characterToken."+n.gameManager.toCharacter(n.data.entity).name+"%"),t.xp6(1),t.Q6J("value-sign",n.characterToken)("hideEmpty",!0),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngForOf",n.gameManager.toCharacter(n.data.entity).tokens)}}function Bx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeHealth(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",38)(5,"span",39),t._uU(6),t.ALo(7,"ghsMinZero"),t.qZA(),t._UZ(8,"img",40)(9,"span",41),t.qZA(),t.TgZ(10,"span",35)(11,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeHealth(1))}),t._UZ(12,"img",43),t.qZA()(),t.YNc(13,fO,25,23,"ng-container",3),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(2),t.Oqu(t.lcZ(7,9,n.data.entity.health+n.health)),t.xp6(3),t.Q6J("value-sign",n.health)("hideEmpty",!0),t.xp6(2),t.Q6J("ngClass",t.VKq(11,qi,n.data.entity.health+n.health==n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp))("repeat",!0),t.xp6(2),t.Q6J("ngIf",n.gameManager.isCharacter(n.data.entity))}}function zx(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function Gx(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function v6(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function C6(o,a){if(1&o&&(t.TgZ(0,"span",61),t._UZ(1,"img",25),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("src",n.empowerChar.iconUrl,t.LSH)}}function M6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEmpower(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",56)(5,"span",57),t._uU(6),t.qZA(),t.TgZ(7,"span",58),t._UZ(8,"img",59),t.qZA(),t._UZ(9,"span",45),t.YNc(10,v6,2,0,"span",51),t.YNc(11,C6,2,1,"span",60),t.qZA(),t.TgZ(12,"span",35)(13,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEmpower(1))}),t._UZ(14,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(14,qi,n.countUpcomingAttackModifier(n.AttackModifierType.empower)+n.empower==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-tooltip","game.condition.empower.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom"),t.xp6(2),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.empower)+n.empower),t.xp6(3),t.Q6J("value-sign",n.empower)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.countEmpower()<0),t.xp6(1),t.Q6J("ngIf",n.empowerChar),t.xp6(2),t.Q6J("ngClass",t.VKq(16,qi,n.empowerChar&&n.empower>=n.countEmpower()))("repeat",!0)}}function O6(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"img",55),t.qZA())}function P6(o,a){if(1&o&&(t.TgZ(0,"span",61),t._UZ(1,"img",25),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("src",n.enfeebleChar.iconUrl,t.LSH)}}function Vx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEnfeeble(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",56)(5,"span",62),t._uU(6),t.qZA(),t.TgZ(7,"span",58),t._UZ(8,"img",63),t.qZA(),t._UZ(9,"span",45),t.YNc(10,O6,2,0,"span",51),t.YNc(11,P6,2,1,"span",60),t.qZA(),t.TgZ(12,"span",35)(13,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeEnfeeble(1))}),t._UZ(14,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(14,qi,n.countUpcomingAttackModifier(n.AttackModifierType.enfeeble)+n.enfeeble==0))("repeat",!0),t.xp6(2),t.Q6J("ghs-tooltip","game.condition.enfeeble.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom"),t.xp6(2),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.enfeeble)+n.enfeeble),t.xp6(3),t.Q6J("value-sign",n.enfeeble)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.countEnfeeble()<0),t.xp6(1),t.Q6J("ngIf",n.enfeebleChar),t.xp6(2),t.Q6J("ngClass",t.VKq(16,qi,n.enfeebleChar&&n.enfeeble>=n.countEnfeeble()))("repeat",!0)}}const $d=function(o){return{"immunity disabled":o}};function Yx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeBless(-1))}),t._UZ(3,"img",37),t.qZA()(),t.TgZ(4,"span",35)(5,"span",48),t._uU(6),t.qZA(),t.TgZ(7,"span",49),t._UZ(8,"img",50),t.qZA(),t._UZ(9,"span",45),t.YNc(10,zx,2,0,"span",51),t.qZA(),t.TgZ(11,"span",35)(12,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeBless(1))}),t._UZ(13,"img",43),t.qZA()(),t.TgZ(14,"span",35)(15,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCurse(-1))}),t._UZ(16,"img",37),t.qZA()(),t.TgZ(17,"span",35)(18,"span",52),t._uU(19),t.qZA(),t.TgZ(20,"span",49),t._UZ(21,"img",53),t.qZA(),t._UZ(22,"span",45),t.YNc(23,Gx,2,0,"span",51),t.qZA(),t.TgZ(24,"span",35)(25,"ghs-pointer-input",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCurse(1))}),t._UZ(26,"img",43),t.qZA()(),t.YNc(27,M6,15,18,"ng-container",3),t.YNc(28,Vx,15,18,"ng-container",3),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(30,qi,n.countUpcomingAttackModifier(n.AttackModifierType.bless)+n.bless==0||n.isImmune(n.ConditionName.bless)))("repeat",!0),t.xp6(4),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.bless)+n.bless),t.xp6(1),t.Q6J("ghs-tooltip","game.condition.bless.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.VKq(32,$d,n.isImmune(n.ConditionName.bless))),t.xp6(2),t.Q6J("value-sign",n.bless)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingBlesses()+n.bless>10),t.xp6(2),t.Q6J("ngClass",t.VKq(34,qi,n.gameManager.attackModifierManager.countUpcomingBlesses()+n.bless>=10||n.isImmune(n.ConditionName.bless)))("repeat",!0),t.xp6(3),t.Q6J("ngClass",t.VKq(36,qi,n.countUpcomingAttackModifier(n.AttackModifierType.curse)+n.curse==0||n.isImmune(n.ConditionName.curse)))("repeat",!0),t.xp6(4),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.curse)+n.curse),t.xp6(1),t.Q6J("ghs-tooltip","game.condition.curse.hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.VKq(38,$d,n.isImmune(n.ConditionName.curse))),t.xp6(2),t.Q6J("value-sign",n.curse)("hideEmpty",!0),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingCurses(n.gameManager.isMonster(n.data.figure)&&!n.gameManager.toMonster(n.data.figure).isAlly&&!n.gameManager.toMonster(n.data.figure).isAllied)+n.curse>10),t.xp6(2),t.Q6J("ngClass",t.VKq(40,qi,n.gameManager.attackModifierManager.countUpcomingCurses(n.gameManager.isMonster(n.data.figure)&&!n.gameManager.toMonster(n.data.figure).isAlly&&!n.gameManager.toMonster(n.data.figure).isAllied)+n.curse>=10||n.isImmune(n.ConditionName.curse)))("repeat",!0),t.xp6(2),t.Q6J("ngIf",n.hasCondition(n.ConditionName.empower)&&n.empowerChars.length>0),t.xp6(1),t.Q6J("ngIf",n.hasCondition(n.ConditionName.enfeeble)&&n.enfeebleChars.length>0)}}const mO=function(o){return{empty:o}};function vO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(-1))}),t._UZ(3,"img",64),t.qZA()(),t.TgZ(4,"span",35)(5,"span",65),t._uU(6),t.qZA()(),t.TgZ(7,"span",35)(8,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(1))}),t._UZ(9,"img",66),t.qZA()(),t.TgZ(10,"span",35)(11,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(-1))}),t._UZ(12,"img",64),t.qZA()(),t.TgZ(13,"span",35)(14,"span",67),t._uU(15),t.qZA()(),t.TgZ(16,"span",35)(17,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(1))}),t._UZ(18,"img",66),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("repeat",!0),t.xp6(4),t.Oqu((n.gameManager.toObjective(n.data.entity).id+n.id)%12+1),t.xp6(2),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("ngClass",t.VKq(7,mO,!n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjective(n.data.entity).marker))%n.OBJECTIV_MARKERS.length])),t.xp6(1),t.Oqu(n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjective(n.data.entity).marker))%n.OBJECTIV_MARKERS.length]),t.xp6(2),t.Q6J("repeat",!0)}}function Kc(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(-1))}),t._UZ(3,"img",64),t.qZA()(),t.TgZ(4,"span",35)(5,"span",65),t._uU(6),t.qZA()(),t.TgZ(7,"span",35)(8,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeId(1))}),t._UZ(9,"img",66),t.qZA()(),t.TgZ(10,"span",35)(11,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(-1))}),t._UZ(12,"img",64),t.qZA()(),t.TgZ(13,"span",35)(14,"span",67),t._uU(15),t.qZA()(),t.TgZ(16,"span",35)(17,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMarker(1))}),t._UZ(18,"img",66),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("repeat",!0),t.xp6(4),t.Oqu(n.gameManager.toObjectiveEntity(n.data.entity).number+n.id),t.xp6(2),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("ngClass",t.VKq(7,mO,!n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjectiveEntity(n.data.entity).marker))%n.OBJECTIV_MARKERS.length])),t.xp6(1),t.Oqu(n.OBJECTIV_MARKERS[(n.marker+n.OBJECTIV_MARKERS.indexOf(n.gameManager.toObjectiveEntity(n.data.entity).marker))%n.OBJECTIV_MARKERS.length]),t.xp6(2),t.Q6J("repeat",!0)}}function CO(o,a){if(1&o&&t._UZ(0,"span",14),2&o){const n=t.oxw(3);t.Q6J("ghs-label",""+n.gameManager.toSummon(n.data.entity).attack)}}function Qf(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Rf(o,a){if(1&o&&(t.TgZ(0,"span",75),t._UZ(1,"ghs-action",76),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("action",n.gameManager.toSummon(n.data.entity).action)}}function Kx(o,a){if(1&o&&(t.TgZ(0,"span",75),t._UZ(1,"ghs-action",76),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("action",n.gameManager.toSummon(n.data.entity).additionalAction)}}function Ff(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",68)(2,"span",69),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._UZ(3,"img",70),t.TgZ(4,"span",71),t._uU(5,">"),t.qZA()(),t.TgZ(6,"span",69),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._UZ(7,"img",72),t.YNc(8,CO,1,1,"span",13),t.YNc(9,Qf,2,0,"span",3),t.qZA(),t.TgZ(10,"span",69),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._UZ(11,"img",73),t.TgZ(12,"span",71),t._uU(13,">"),t.qZA()(),t.YNc(14,Rf,2,1,"span",74),t.YNc(15,Kx,2,1,"span",74),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(4),t.Q6J("value-calc",n.gameManager.toSummon(n.data.entity).movement)("empty",!0),t.xp6(4),t.Q6J("ngIf",0!=n.gameManager.toSummon(n.data.entity).attack),t.xp6(1),t.Q6J("ngIf",0==n.gameManager.toSummon(n.data.entity).attack),t.xp6(3),t.Q6J("value-calc",n.gameManager.toSummon(n.data.entity).range)("empty",!0),t.xp6(2),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).action),t.xp6(1),t.Q6J("ngIf",n.gameManager.toSummon(n.data.entity).additionalAction)}}const Yu=function(o,a){return{active:o,new:a}};function Ku(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleSummon())}),t._UZ(1,"img",25),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.WLB(2,Yu,n.gameManager.toMonsterEntity(n.data.entity).summon==n.SummonState.true,n.gameManager.toMonsterEntity(n.data.entity).summon==n.SummonState.new)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.gameManager.toMonster(n.data.figure).summonColor,".png",t.LSH)}}const qf=function(o){return{active:o}};function y6(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",78),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.toggleMarker(s))}),t.TgZ(2,"span",79),t._UZ(3,"img",25),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(2,qf,e.hasMarker(n))),t.xp6(2),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function b6(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",80)(2,"a",81),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleExhausted())}),t._UZ(3,"img",82),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.exhausted")("ghs-label-attribute","title")("ngClass",t.VKq(3,qf,n.gameManager.toCharacter(n.data.entity).exhausted))}}function MO(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleDead())}),t._UZ(3,"img",84),t.qZA()(),t.TgZ(4,"span",80)(5,"a",81),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleExhausted())}),t._UZ(6,"img",82),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","game.exhausted")("ghs-label-attribute","title")("ngClass",t.VKq(5,qf,n.gameManager.toObjective(n.data.entity).exhausted||!1))}}function $x(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleDead())}),t._UZ(3,"img",84),t.qZA()(),t.BQk()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"))}function Wx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",85),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._uU(3),t._UZ(4,"img",86),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",n.data.figure.level," ")}}function Xx(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",38)(2,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleDead())}),t._UZ(3,"img",84),t.qZA()(),t.TgZ(4,"span",38)(5,"a",85),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openLevelDialog())}),t._uU(6),t._UZ(7,"img",86),t.qZA()(),t.TgZ(8,"span",35)(9,"a",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleSummonStatus())}),t._UZ(10,"img",25),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",n.data.figure.level," "),t.xp6(3),t.Q6J("ngClass",t.WLB(7,Yu,n.gameManager.toSummon(n.data.entity).state==n.SummonState.true,n.gameManager.toSummon(n.data.entity).state==n.SummonState.new)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.gameManager.toSummon(n.data.entity).color,".png",t.LSH)}}function tw(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",88)(1,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeMaxHealth(-1))}),t._UZ(2,"img",37),t.qZA(),t._UZ(3,"img",89),t.TgZ(4,"span",90),t._uU(5),t.qZA(),t.TgZ(6,"ghs-pointer-input",36),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeMaxHealth(1))}),t._UZ(7,"img",43),t.qZA()()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.maxHealth")("ghs-label-attribute","title"),t.xp6(2),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp0)}}function PO(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-conditions",91),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entity",n.data.entity)("figure",n.data.figure)("type",n.conditionType)}}function yO(o,a){if(1&o&&(t.TgZ(0,"div",27)(1,"div",28),t.YNc(2,jx,2,2,"div",29),t.YNc(3,Bx,14,13,"ng-container",3),t.YNc(4,Yx,29,42,"ng-container",3),t.YNc(5,vO,19,9,"ng-container",3),t.YNc(6,Kc,19,9,"ng-container",3),t.YNc(7,Ff,16,8,"ng-container",3),t.TgZ(8,"div",30),t.YNc(9,Ku,2,5,"a",31),t.YNc(10,y6,4,4,"span",32),t.qZA(),t.YNc(11,b6,4,5,"ng-container",3),t.YNc(12,MO,7,7,"ng-container",3),t.YNc(13,$x,4,2,"ng-container",3),t.YNc(14,Wx,5,3,"ng-container",3),t.YNc(15,Xx,11,10,"ng-container",3),t.YNc(16,OO,5,3,"ng-container",3),t.qZA(),t.YNc(17,PO,2,5,"ng-container",3),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngForOf",n.actionHints),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal)),t.xp6(1),t.Q6J("ngIf",(n.gameManager.isCharacter(n.data.figure)&&n.settingsManager.settings.characterAttackModifierDeck||n.gameManager.isMonster(n.data.figure))&&(!n.data.entity||n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal))),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjective(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjectiveEntity(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isSummon(n.data.entity)),t.xp6(2),t.Q6J("ngIf",n.data.entity&&n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal)&&n.gameManager.isMonsterEntity(n.data.entity)),t.xp6(1),t.Q6J("ngForOf",n.markers()),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isCharacter(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjective(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isObjectiveEntity(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isCharacter(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isSummon(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.gameManager.isMonsterEntity(n.data.entity)),t.xp6(1),t.Q6J("ngIf",n.data.entity&&n.EntityValueFunction(n.data.entity.maxHealth)>0&&(!n.gameManager.isObjective(n.data.entity)||n.gameManager.toObjective(n.data.entity).escort)&&(!n.gameManager.isObjectiveEntity(n.data.entity)||n.gameManager.isObjectiveContainer(n.data.figure)&&n.gameManager.toObjectiveContainer(n.data.figure).escort)&&(!n.gameManager.isMonster(n.data.figure)||!n.gameManager.toMonster(n.data.figure).immortal))}}function ew(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMaxHealth(-1))}),t._UZ(2,"img",37),t.qZA(),t.TgZ(3,"span",35),t._UZ(4,"img",40),t.TgZ(5,"span",90),t._uU(6),t.qZA()(),t.TgZ(7,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMaxHealth(1))}),t._UZ(8,"img",43),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(6),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp0&&n.settingsManager.settings.characterIdentities),t.xp6(3),t.Q6J("ghs-label","game.maxHealth")("ghs-label-attribute","title"),t.xp6(3),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp"),t.qZA()(),t.TgZ(18,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeMovement(1))}),t._UZ(19,"img",43),t.qZA(),t.TgZ(20,"a",110),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeAttack(-1))}),t._UZ(21,"img",37),t.qZA(),t.TgZ(22,"span",35),t._UZ(23,"img",72),t.YNc(24,k6,1,2,"span",112),t.YNc(25,ow,2,0,"span",113),t.qZA(),t.TgZ(26,"a",110),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeAttack(1))}),t._UZ(27,"img",43),t.qZA(),t.TgZ(28,"a",110),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeRange(-1))}),t._UZ(29,"img",37),t.qZA(),t.TgZ(30,"span",35),t._UZ(31,"img",73),t.TgZ(32,"span",111),t._uU(33,">"),t.qZA()(),t.TgZ(34,"a",83),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeRange(1))}),t._UZ(35,"img",43),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(4),t.Q6J("ngClass",t.VKq(13,qi,n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp==0)),t.xp6(5),t.AsE("",n.EntityValueFunction(n.data.entity.maxHealth)+n.maxHp{var o;class a{constructor(e,i,s,l,m){if((0,_.Z)(this,"data",void 0),(0,_.Z)(this,"changeDetectorRef",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterTitleInput",void 0),(0,_.Z)(this,"objectiveTitleInput",void 0),(0,_.Z)(this,"summonTitleInput",void 0),(0,_.Z)(this,"conditionType",""),(0,_.Z)(this,"levelDialog",!1),(0,_.Z)(this,"health",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"attack",0),(0,_.Z)(this,"movement",0),(0,_.Z)(this,"range",0),(0,_.Z)(this,"bless",0),(0,_.Z)(this,"curse",0),(0,_.Z)(this,"empower",0),(0,_.Z)(this,"enfeeble",0),(0,_.Z)(this,"marker",0),(0,_.Z)(this,"id",0),(0,_.Z)(this,"characterToken",0),(0,_.Z)(this,"characterTokenValues",[]),(0,_.Z)(this,"objectiveDead",!1),(0,_.Z)(this,"entityConditions",[]),(0,_.Z)(this,"entityImmunities",[]),(0,_.Z)(this,"actionHints",[]),(0,_.Z)(this,"titles",[]),(0,_.Z)(this,"empowerChar",void 0),(0,_.Z)(this,"empowerChars",[]),(0,_.Z)(this,"enfeebleChar",void 0),(0,_.Z)(this,"enfeebleChars",[]),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"ConditionName",re.fT),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"OBJECTIV_MARKERS",qe.H4),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"ghsModulo",he.Hy),this.data=e,this.changeDetectorRef=i,this.dialogRef=s,this.dialog=l,this.overlay=m,e.entity instanceof oe.z){this.conditionType="character";for(let O=0;O1&&R.r.settings.characterIdentities){if(this.titles=e.entity.title.split("|"),this.titles.lengthnew vt.aU(O.type,O.value,vt.EF.fixed,O.range?[new vt.aU(vt.Us.range,O.range,vt.EF.fixed,[],!0)]:[]))),this.dialogRef.closed.subscribe({next:O=>{O||this.close()}}),this.empowerChars=d.v.game.figures.filter(O=>O instanceof oe.z&&d.v.entityManager.isAlive(O)&&O.additionalModifier&&O.additionalModifier.find(k=>k.attackModifier&&k.attackModifier.type==Lt.kl.empower)).map(O=>O),this.empowerChars.forEach(O=>{O.active&&(this.empowerChar=O)}),!this.empowerChar&&1==this.empowerChars.length&&(this.empowerChar=this.empowerChars[0]),this.enfeebleChars=d.v.game.figures.filter(O=>O instanceof oe.z&&d.v.entityManager.isAlive(O)&&!O.absent&&O.additionalModifier&&O.additionalModifier.find(k=>k.attackModifier&&k.attackModifier.type==Lt.kl.enfeeble)).map(O=>O),this.enfeebleChars.forEach(O=>{O.active&&(this.enfeebleChar=O)}),!this.enfeebleChar&&1==this.enfeebleChars.length&&(this.enfeebleChar=this.enfeebleChars[0])}keyboardShortcuts(e){!this.levelDialog&&!e.altKey&&!e.metaKey&&(!window.document.activeElement||"INPUT"!=window.document.activeElement.tagName&&"SELECT"!=window.document.activeElement.tagName&&"TEXTAREA"!=window.document.activeElement.tagName)&&(e.ctrlKey||e.shiftKey||"ArrowRight"!==e.key?e.ctrlKey||e.shiftKey||"ArrowLeft"!==e.key?e.ctrlKey||e.shiftKey||"ArrowUp"!==e.key?e.ctrlKey||e.shiftKey||"ArrowDown"!==e.key?e.ctrlKey||"b"!==e.key.toLowerCase()?e.ctrlKey||"c"!==e.key.toLowerCase()?!e.ctrlKey&&!e.shiftKey&&("k"===e.key.toLowerCase()||"d"===e.key.toLowerCase())&&(this.data.entity instanceof oe.z?this.toggleExhausted():this.toggleDead(),e.preventDefault(),e.stopPropagation()):(this.changeCurse(e.shiftKey?-1:1),e.preventDefault(),e.stopPropagation()):(this.changeBless(e.shiftKey?-1:1),e.preventDefault(),e.stopPropagation()):(this.changeMaxHealth(-1),e.preventDefault(),e.stopPropagation()):(this.changeMaxHealth(1),e.preventDefault(),e.stopPropagation()):(this.changeHealth(-1),e.preventDefault(),e.stopPropagation()):(this.changeHealth(1),e.preventDefault(),e.stopPropagation()))}changeHealth(e){this.health+=e,this.data.entity&&this.data.entity.health+this.health>(0,ae.j9)(this.data.entity.maxHealth)+this.maxHp&&(this.health=(0,ae.j9)(this.data.entity.maxHealth)+this.maxHp-this.data.entity.health)}changeExperience(e){this.data.entity instanceof oe.z&&(this.experience+=e,this.data.entity.experience+this.experience<=0&&(this.experience=-this.data.entity.experience))}changeCharacterToken(e,i=-1){this.data.entity instanceof oe.z&&(i<0?(this.characterToken+=e,this.data.entity.token+this.characterToken<=0&&(this.characterToken=-this.data.entity.token)):(this.characterTokenValues[i]+=e,this.data.entity.tokenValues[i]+this.characterTokenValues[i]<=0&&(this.characterTokenValues[i]=-this.data.entity.tokenValues[i])))}changeLoot(e){this.data.entity instanceof oe.z&&(this.loot+=e,this.data.entity.loot+this.loot<=0&&(this.loot=-this.data.entity.loot))}attackModifierDeck(){return d.v.attackModifierManager.byFigure(this.data.figure)}beforeAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,this.data.figure instanceof oe.z?"data.character."+this.data.figure.name:this.data.figure instanceof Ze.Q&&(this.data.figure.isAlly||this.data.figure.isAllied)?"ally":"monster",...e.values)}afterAttackModifierDeck(e){this.attackModifierDeck().merge(e.deck),d.v.stateManager.after()}countAttackModifier(e){return this.attackModifierDeck().cards.filter(i=>i.type==e).length}countUpcomingAttackModifier(e,i=void 0){return this.attackModifierDeck().cards.filter((s,l)=>s.type==e&&l>this.attackModifierDeck().current&&(!i||s.id&&s.id.startsWith(i))).length}countDrawnAttackModifier(e){return this.attackModifierDeck().cards.filter((i,s)=>i.type==e&&s<=this.attackModifierDeck().current).length}changeAttackModifier(e,i){if(i>0){if(e==Lt.kl.bless&&d.v.attackModifierManager.countUpcomingBlesses()>=10)return;if(e==Lt.kl.curse&&d.v.attackModifierManager.countUpcomingCurses(this.data.figure instanceof Ze.Q&&!this.data.figure.isAlly&&!this.data.figure.isAllied)>=10)return;for(let s=0;sl.type==e&&m>this.attackModifierDeck().current);for(;s&&i<0;)this.attackModifierDeck().cards.splice(this.attackModifierDeck().cards.indexOf(s),1),s=this.attackModifierDeck().cards.find((l,m)=>l.type==e&&m>this.attackModifierDeck().current),i++}}changeBless(e){if(this.data.figure instanceof oe.z||this.data.figure instanceof Ze.Q){this.bless+=e;const i=d.v.attackModifierManager.countUpcomingBlesses();this.bless+i>=10?this.bless=10-i:this.bless+i<0&&(this.bless=-i)}}changeCurse(e){if(this.data.figure instanceof oe.z||this.data.figure instanceof Ze.Q){this.curse+=e;const i=d.v.attackModifierManager.countUpcomingCurses(this.data.figure instanceof Ze.Q&&!this.data.figure.isAlly&&!this.data.figure.isAllied);this.curse+i>=10?this.curse=10-i:this.curse+i<0&&(this.curse=-i)}}countEmpower(e=!1){return this.empowerChar?this.empowerChar.additionalModifier.filter(i=>i.attackModifier&&i.attackModifier.type==Lt.kl.empower).map(i=>i.count).reduce((i,s)=>i+s)-(e?0:d.v.attackModifierManager.countUpcomingAdditional(this.empowerChar,Lt.kl.empower)):-1}countEnfeeble(e=!1){return this.enfeebleChar?this.enfeebleChar.additionalModifier.filter(i=>i.attackModifier&&i.attackModifier.type==Lt.kl.enfeeble).map(i=>i.count).reduce((i,s)=>i+s)-(e?0:d.v.attackModifierManager.countUpcomingAdditional(this.enfeebleChar,Lt.kl.enfeeble)):-1}changeEmpower(e){if(this.empowerChar||e<0){this.empower+=e;const i=this.countUpcomingAttackModifier(Lt.kl.empower),s=this.countEmpower();this.empower>=s?this.empower=s:this.empower+i<0&&(this.empower=-i)}else this.dialog.open(K1,{panelClass:"dialog",data:{characters:this.empowerChars,type:Lt.kl.empower}}).closed.subscribe({next:s=>{"number"==typeof s&&-1!=s&&(this.empowerChar=this.empowerChars[s])}})}changeEnfeeble(e){if(this.enfeebleChar||e<0){this.enfeeble+=e;const i=this.countUpcomingAttackModifier(Lt.kl.enfeeble),s=this.countEnfeeble();this.enfeeble>=s?this.enfeeble=s:this.enfeeble+i<0&&(this.enfeeble=-i)}else this.dialog.open(K1,{panelClass:"dialog",data:{characters:this.enfeebleChars,type:Lt.kl.enfeeble}}).closed.subscribe({next:s=>{"number"==typeof s&&-1!=s&&(this.enfeebleChar=this.enfeebleChars[s])}})}hasCondition(e){return null!=d.v.conditions(d.v.game.edition).find(i=>i.name==e)}toggleExhausted(){(this.data.entity instanceof oe.z||this.data.entity instanceof qe.CH)&&(this.data.entity instanceof oe.z?d.v.stateManager.before(this.data.entity.exhausted?"unsetExhausted":"setExhausted","data.character."+this.data.entity.name):d.v.stateManager.before(this.data.entity.exhausted?"unsetObjectiveExhausted":"setObjectiveExhausted",this.data.entity.title||this.data.entity.name),this.exhausted(),d.v.stateManager.after())}exhausted(){(this.data.entity instanceof oe.z||this.data.entity instanceof qe.CH)&&(this.data.entity.exhausted=!this.data.entity.exhausted,this.data.entity.exhausted?(this.data.entity.off=!0,this.data.entity.active=!1):this.data.entity.off=!1)}changeMaxHealth(e){this.maxHp+=e,!(this.data.entity instanceof oe.z)&&!(this.data.entity instanceof qe.CH)&&!(this.data.figure instanceof Nn.k)&&(this.health+=e),this.data.figure instanceof Nn.k?(0,ae.j9)(this.data.figure.health)+this.maxHp<=1&&(this.maxHp=1-(0,ae.j9)(this.data.figure.health)):this.data.entity&&(0,ae.j9)(this.data.entity.maxHealth)+this.maxHp<=1&&(this.maxHp=1-(0,ae.j9)(this.data.entity.maxHealth))}setLevel(e){this.data.entity instanceof oe.z&&(d.v.stateManager.before("setLevel","data.character."+this.data.entity.name,""+e),d.v.characterManager.setLevel(this.data.entity,e),d.v.stateManager.after())}isImmune(e){return!!this.data.entity&&d.v.entityManager.isImmune(this.data.entity,this.data.figure,e)}markers(){return this.data.entity?[...d.v.markers(),...this.data.entity.markers].filter((e,i,s)=>i==s.indexOf(e)):[]}hasMarker(e){return!!this.data.entity&&d.v.entityManager.hasMarker(this.data.entity,e)}toggleCharacterAbsent(){this.data.entity instanceof oe.z&&(this.data.entity.absent||d.v.characterManager.characterCount()>1)&&(d.v.stateManager.before(this.data.entity.absent?"unsetAbsent":"setAbsent","data.character."+this.data.entity.name),this.data.entity.absent=!this.data.entity.absent,this.data.entity.absent&&this.data.entity.active&&d.v.roundManager.toggleFigure(this.data.entity),d.v.stateManager.after())}toggleCharacterMarker(){this.data.entity instanceof oe.z&&(d.v.stateManager.before(this.data.entity.marker?"disableMarker":"enableMarker","data.character."+this.data.entity.name),this.data.entity.marker=!this.data.entity.marker,d.v.stateManager.after())}toggleMarker(e){this.data.entity&&(this.data.entity instanceof In.g?d.v.stateManager.before(this.hasMarker(e)?"removeEntityMarker":"addEntityMarker","data.monster."+this.data.figure.name,""+this.data.entity.number,"data.character."+e.split("-")[1]):this.data.entity instanceof oe.z?d.v.stateManager.before(this.hasMarker(e)?"removeMarker":"addMarker","data.character."+this.data.entity.name,"data.character."+e.split("-")[1]):this.data.entity instanceof Ee.eU?d.v.stateManager.before(this.hasMarker(e)?"removeSummonMarker":"addSummonMarker","data.character."+this.data.figure.name,"data.summon."+this.data.entity.name,"data.character."+e.split("-")[1]):this.data.entity instanceof qe.CH?d.v.stateManager.before(this.hasMarker(e)?"removeObjectiveMarker":"addObjectiveMarker",this.data.entity.title||this.data.entity.name,"data.character."+e.split("-")[1]):this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W&&d.v.stateManager.before(this.hasMarker(e)?"removeObjectiveEntityMarker":"addObjectiveEntityMarker",this.data.figure.title||this.data.figure.name,""+this.data.entity.number,"data.character."+e.split("-")[1]),d.v.entityManager.toggleMarker(this.data.entity,e),d.v.stateManager.after())}toggleSummon(){if(this.data.entity instanceof In.g){let e=Ee.HY.false;this.data.entity.summon==Ee.HY.false?e=Ee.HY.new:this.data.entity.summon==Ee.HY.new&&(e=Ee.HY.true),d.v.stateManager.before("setEntitySummonState","data.monster."+this.data.figure.name,"monster."+this.data.entity.type,""+this.data.entity.number,"summon.state."+e),this.data.entity.summon=e,d.v.stateManager.after()}}changeMonsterEntity(){this.data.figure instanceof Ze.Q&&this.data.entity instanceof In.g&&(d.v.monsterManager.monsterStandeeMax(this.data.figure)>1||this.data.entity.type!=ee.M.boss)&&(this.close(),this.dialog.open(Gd,{panelClass:"dialog",data:{monster:this.data.figure,entity:this.data.entity,change:!0},positionStrategy:this.overlay.position().flexibleConnectedTo(this.data.positionElement).withPositions((0,he.sm)())}),this.dialogRef.close())}toggleDead(){(this.data.entity instanceof In.g||this.data.entity instanceof Ee.eU||this.data.entity instanceof qe.CH||this.data.entity instanceof oa.W)&&this.dead()}dead(){if(this.data.figure instanceof Ze.Q&&this.data.entity instanceof In.g)d.v.stateManager.before("entityDead","data.monster."+this.data.figure.name,"monster."+this.data.entity.type,""+this.data.entity.number),this.data.entity.dead=!0,this.data.figure.entities.every(e=>e.dead)&&this.data.figure.active&&d.v.roundManager.toggleFigure(this.data.figure),setTimeout(()=>{this.data.figure instanceof Ze.Q&&this.data.entity instanceof In.g&&(d.v.monsterManager.removeMonsterEntity(this.data.figure,this.data.entity),d.v.stateManager.after())},R.r.settings.disableAnimations?0:1500);else if(this.data.figure instanceof oe.z&&this.data.entity instanceof Ee.eU)d.v.stateManager.before("summonDead","data.character."+this.data.figure.name,"data.summon."+this.data.entity.name),this.data.entity.dead=!0,setTimeout(()=>{this.data.figure instanceof oe.z&&this.data.entity instanceof Ee.eU&&(d.v.characterManager.removeSummon(this.data.figure,this.data.entity),d.v.stateManager.after())},R.r.settings.disableAnimations?0:1500);else if(this.data.entity instanceof qe.CH)d.v.stateManager.before("removeObjective",this.data.entity.title||this.data.entity.name),d.v.characterManager.removeObjective(this.data.entity),d.v.stateManager.after();else if(this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W){let e=this.data.figure.name;e||(e=this.data.figure.title,e||(e=this.data.figure.escort?"%escort%":"%objective%")),d.v.stateManager.before("objectiveEntityDead",e,""+this.data.entity.number),this.data.entity.dead=!0,this.data.figure.entities.every(i=>i.dead)&&this.data.figure.active&&d.v.roundManager.toggleFigure(this.data.figure),setTimeout(()=>{this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W&&(d.v.objectiveManager.removeObjectiveEntity(this.data.figure,this.data.entity),d.v.stateManager.after())},R.r.settings.disableAnimations||!this.data.figure.entities.some(i=>d.v.entityManager.isAlive(i))?0:1500)}this.dialogRef.close(!0)}changeAttack(e){this.data.entity instanceof Ee.eU&&(this.attack+=e,"number"==typeof this.data.entity.attack&&this.data.entity.attack+this.attack<0&&(this.attack=-this.data.entity.attack))}changeMovement(e){this.data.entity instanceof Ee.eU&&(this.movement+=e,this.data.entity.movement+this.movement<=0&&(this.movement=-this.data.entity.movement))}changeRange(e){this.data.entity instanceof Ee.eU&&(this.range+=e,this.data.entity.range+this.range<=0&&(this.range=-this.data.entity.range))}toggleSummonStatus(){if(this.data.entity instanceof Ee.eU){let e=Ee.HY.new;this.data.entity.state==Ee.HY.new&&(e=Ee.HY.true),d.v.stateManager.before("setSummonState","data.character."+this.data.figure.name,"data.summon."+this.data.entity.name,"summon.state."+e),this.data.entity.state=e,d.v.stateManager.after()}}changeId(e){if(this.data.entity instanceof qe.CH&&(this.id=(0,he.Hy)(this.id+e,12),d.v.game.figures.filter(i=>i instanceof qe.CH).length<12))for(;d.v.game.figures.some(i=>i instanceof qe.CH&&i.id==this.id);)this.id=(0,he.Hy)(this.id+e,12);if(this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W){this.id+=e;let i=this.data.entity.number+this.id;if(i<1?this.id=12-this.data.entity.number:i>12&&(this.id=1-this.data.entity.number),i=this.data.entity.number+this.id,this.data.figure.entities.length<12)for(;this.data.figure.entities.some(s=>s.number==i&&s!=this.data.entity);)this.id+=e,i=this.data.entity.number+this.id,i<1?this.id=12-this.data.entity.number:i>12&&(this.id=1-this.data.entity.number),i=this.data.entity.number+this.id}}changeMarker(e){(this.data.entity instanceof qe.CH||this.data.entity instanceof oa.W)&&(this.marker=(0,he.Hy)(this.marker+e,qe.H4.length))}openLevelDialog(){if(this.levelDialog=!0,this.changeDetectorRef.detectChanges(),this.data.entity instanceof oe.z&&(this.characterTitleInput&&(this.characterTitleInput.nativeElement.value=this.data.entity.title||R.r.getLabel("data.character."+this.data.entity.name.toLowerCase())),this.titles=[],this.data.entity.identities&&this.data.entity.identities.length>1&&R.r.settings.characterIdentities)){if(this.titles=this.data.entity.title.split("|"),this.titles.length0){for(let i=0;i0&&this.data.entity.health<=0||this.data.entity.dead)&&(0==this.data.entity.entityConditions.length||this.data.entity.entityConditions.every(e=>!e.highlight&&-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))&&this.dead())}closeSummon(){this.data.figure instanceof oe.z&&this.data.entity instanceof Ee.eU&&(this.data.entity.init?(d.v.characterManager.removeSummon(this.data.figure,this.data.entity),d.v.stateManager.before("addSummon","data.character."+this.data.figure.name,this.data.entity.name),this.data.entity.init=!1,0!=this.health&&d.v.entityManager.changeHealth(this.data.entity,this.data.figure,this.health),0!=this.attack&&"number"==typeof this.data.entity.attack&&(this.data.entity.attack+=this.attack),0!=this.movement&&(this.data.entity.movement+=this.movement),0!=this.range&&(this.data.entity.range+=this.range),this.maxHp&&((this.data.entity.maxHealth+this.maxHp!e.highlight&&-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))&&this.dead())}showMaxHealth(){return this.data.entity instanceof qe.CH?!isNaN(+this.data.entity.maxHealth)&&(0,ae.j9)(this.data.entity.maxHealth)>0:this.data.figure instanceof Nn.k&&!isNaN(+this.data.figure.health)&&(0,ae.j9)(this.data.figure.health)>0}closeObjective(){if(this.data.entity instanceof qe.CH){this.maxHp&&(d.v.stateManager.before("changeObjectiveMaxHp",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",(0,he.uZ)(this.maxHp)),(+this.data.entity.maxHealth+this.maxHp<(0,ae.j9)(this.data.entity.maxHealth)||this.data.entity.health==(0,ae.j9)(this.data.entity.maxHealth))&&(this.data.entity.health=+this.data.entity.maxHealth+this.maxHp),this.data.entity.maxHealth=+this.data.entity.maxHealth+this.maxHp,d.v.stateManager.after()),0!=this.health&&(d.v.stateManager.before("changeHP",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.data.entity,this.data.figure,this.health),(this.data.entity.health<=0||this.data.entity.exhausted&&this.health>=0&&this.data.entity.health>0)&&(this.data.entity.escort?this.exhausted():d.v.characterManager.removeObjective(this.data.entity)),d.v.stateManager.after(),this.health=0);const e=(0,he.Hy)(this.id+this.data.entity.id,12);e!=this.data.entity.id&&(d.v.stateManager.before("changeObjectiveId",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",""+(e+1)),this.data.entity.id=e,d.v.stateManager.after()),this.id=0,this.data.entity.marker||(this.data.entity.marker="");const i=qe.H4[(0,he.Hy)(this.marker+qe.H4.indexOf(this.data.entity.marker),qe.H4.length)];i!=this.data.entity.marker&&(d.v.stateManager.before("changeObjectiveMarker",this.data.entity.title||this.data.entity.name||this.data.entity.escort?"escort":"objective",i),this.data.entity.marker=i,d.v.stateManager.after()),this.marker=0,this.objectiveTitleInput&&(this.objectiveTitleInput.nativeElement.value&&this.objectiveTitleInput.nativeElement.value!=this.data.entity.name?this.data.entity.title!=this.objectiveTitleInput.nativeElement.value&&(d.v.stateManager.before("setTitle",this.data.entity.name,this.objectiveTitleInput.nativeElement.value),this.data.entity.title=this.objectiveTitleInput.nativeElement.value,d.v.stateManager.after()):""!=this.data.entity.title&&(d.v.stateManager.before("unsetTitle",this.data.entity.name||this.data.entity.escort?"escort":"objective",this.data.entity.title),this.data.entity.title="",d.v.stateManager.after()))}}closeObjectiveEntity(){if(this.data.figure instanceof Nn.k&&this.data.entity instanceof oa.W){if(this.maxHp){d.v.stateManager.before("changeObjectiveMaxHp",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",(0,he.uZ)(this.maxHp));const s=(0,ae.j9)(this.data.figure.health)+this.maxHp;this.data.figure.health=s,this.data.figure.entities.forEach(l=>{(l.health==l.maxHealth||l.health>s)&&(l.health=s),l.maxHealth=s}),d.v.stateManager.after()}0!=this.health&&(d.v.stateManager.before("changeObjectiveEntityHP",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",""+this.data.entity.number,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.data.entity,this.data.figure,this.health),this.data.entity.health<=0&&d.v.objectiveManager.removeObjectiveEntity(this.data.figure,this.data.entity),d.v.stateManager.after(),this.health=0);const e=this.data.entity.number+this.id;e!=this.data.entity.number&&(d.v.stateManager.before("changeObjectiveEntityNumber",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",""+this.data.entity.number,""+e),this.data.entity.number=e,d.v.stateManager.after()),this.id=0,this.data.entity.marker||(this.data.entity.marker="");const i=qe.H4[(0,he.Hy)(this.marker+qe.H4.indexOf(this.data.entity.marker),qe.H4.length)];i!=this.data.entity.marker&&(d.v.stateManager.before("changeObjectiveEntityMarker",this.data.figure.title||this.data.figure.name||this.data.figure.escort?"escort":"objective",""+this.data.entity.number,i),this.data.entity.marker=i,d.v.stateManager.after()),this.marker=0,this.objectiveTitleInput&&(this.objectiveTitleInput.nativeElement.value&&this.objectiveTitleInput.nativeElement.value!=this.data.figure.name?this.data.figure.title!=this.objectiveTitleInput.nativeElement.value&&(d.v.stateManager.before("setTitle",this.data.figure.name,this.objectiveTitleInput.nativeElement.value),this.data.figure.title=this.objectiveTitleInput.nativeElement.value,d.v.stateManager.after()):""!=this.data.figure.title&&(d.v.stateManager.before("unsetTitle",this.data.figure.name||this.data.figure.escort?"escort":"objective",this.data.figure.title),this.data.figure.title="",d.v.stateManager.after()))}}closeAMs(){if(0!=this.bless&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.bless<0?"removeCondition"+(this.bless<-1?"s":""):"addCondition"+(this.bless>1?"s":"")),Lt.kl.bless,""+(this.bless>0?this.bless:-1*this.bless)),this.changeAttackModifier(Lt.kl.bless,this.bless),d.v.stateManager.after(),this.bless=0),0!=this.curse&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.curse<0?"removeCondition"+(this.curse<-1?"s":""):"addCondition"+(this.curse>1?"s":"")),Lt.kl.curse,""+(this.curse>0?this.curse:-1*this.curse)),this.changeAttackModifier(Lt.kl.curse,this.curse),d.v.stateManager.after(),this.curse=0),0!=this.empower&&(this.empowerChar||this.empower<0)){if(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.empower<0?"removeCondition"+(this.empower<-1?"s":""):"addCondition"+(this.empower>1?"s":"")),Lt.kl.empower,""+(this.empower>0?this.empower:-1*this.empower)),this.empowerChar&&this.empower>0){const e=d.v.attackModifierManager.getAdditional(this.empowerChar,Lt.kl.empower);for(let i=0;il>this.attackModifierDeck().current&&s.type==Lt.kl.empower);i&&this.attackModifierDeck().cards.splice(this.attackModifierDeck().cards.indexOf(i),1)}d.v.stateManager.after(),this.empower=0}if(0!=this.enfeeble&&(this.enfeebleChar||this.enfeeble<0)){if(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,this.enfeeble<0?"removeCondition"+(this.enfeeble<-1?"s":""):"addCondition"+(this.enfeeble>1?"s":"")),Lt.kl.enfeeble,""+(this.enfeeble>0?this.enfeeble:-1*this.enfeeble)),this.enfeebleChar&&this.enfeeble>0){const e=d.v.attackModifierManager.getAdditional(this.enfeebleChar,Lt.kl.enfeeble);for(let i=0;il>this.attackModifierDeck().current&&s.type==Lt.kl.enfeeble);i&&this.attackModifierDeck().cards.splice(this.attackModifierDeck().cards.indexOf(i),1)}d.v.stateManager.after(),this.enfeeble=0}}closeConditions(){this.data.entity&&(this.entityConditions.filter(e=>e.state==re.tT.new||e.state==re.tT.removed).forEach(e=>{this.data.entity&&(e.state==re.tT.new||d.v.entityManager.hasCondition(this.data.entity,e,e.permanent))&&(this.data.entity instanceof oe.z&&e.name==re.fT.muddle&&e.state==re.tT.new&&this.data.entity.progress.equippedItems.find(i=>"gh"==i.edition&&"108"==i.name)&&(e.name=re.fT.strengthen),e.expired=e.state==re.tT.new,d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,e.state==re.tT.removed?"removeCondition":"addCondition"),e.name,this.data.entity instanceof In.g?"monster."+this.data.entity.type+" ":""),e.state==re.tT.removed?d.v.entityManager.removeCondition(this.data.entity,e,e.permanent):d.v.entityManager.addCondition(this.data.entity,e,this.data.figure.active,this.data.figure.off,e.permanent),d.v.stateManager.after())}),this.entityConditions.forEach(e=>{if(this.data.entity){const i=this.data.entity.entityConditions.find(s=>s.name==e.name&&!s.expired);i&&i.value!=e.value&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,"setConditionValue"),e.name,""+e.value,this.data.entity instanceof In.g?"monster."+this.data.entity.type+" ":""),i.value=e.value,d.v.stateManager.after())}}),this.data.entity.immunities.forEach(e=>{this.data.entity&&-1==this.entityImmunities.indexOf(e)&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,"removeImmunity"),e),this.data.entity.immunities=this.data.entity.immunities.filter(i=>i!=e),d.v.stateManager.after())}),this.entityImmunities.forEach(e=>{this.data.entity&&-1==this.data.entity.immunities.indexOf(e)&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.data.entity,this.data.figure,"addImmunity"),e),this.data.entity.immunities.push(e),d.v.stateManager.after())}))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(t.sBO),t.Y36(He),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-entity-menu-dialog"]],viewQuery:function(e,i){if(1&e&&(t.Gf(oO,5),t.Gf(Jf,5),t.Gf(Uf,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.characterTitleInput=s.first),t.iGM(s=t.CRH())&&(i.objectiveTitleInput=s.first),t.iGM(s=t.CRH())&&(i.summonTitleInput=s.first)}},hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(l){return i.keyboardShortcuts(l)},!1,t.evT)},decls:12,vars:10,consts:[[1,"entity-menu-dialog"],[3,"entity","show",4,"ngIf"],[1,"name"],[4,"ngIf"],["class","name",3,"ngClass","click",4,"ngIf"],["class","status-container",4,"ngIf"],["class","level-dialog",4,"ngIf"],[3,"entity","show"],[1,"spacer"],[1,"icon","character-icon",3,"src","click"],[1,"character-title",3,"ngClass"],[1,"absent",3,"src","ghs-label","ghs-label-attribute","click"],[1,"icon",3,"src"],[3,"ghs-label",4,"ngIf"],[3,"ghs-label"],[1,"name",3,"ngClass","click"],["class","standee",3,"src",4,"ngIf"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","standee-number",3,"ngClass",4,"ngIf"],[1,"standee",3,"src"],[1,"ally"],[1,"allied"],[1,"standee-number",3,"ngClass"],[1,"summon-icon"],[3,"src"],[1,"summon-number"],[1,"status-container"],[1,"entity-container"],["class","action-hint",4,"ngFor","ngForOf"],[1,"marker-container"],["class","summon",3,"ngClass","click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"action-hint"],[3,"action","highlight"],[1,"item"],[1,"button",3,"repeat","singleClick"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],[1,"badge","badge-left"],["src","./assets/images/status/health.svg"],[1,"badge","badge-right","health-count",3,"value-sign","hideEmpty"],[1,"button",3,"ngClass","repeat","singleClick"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/status/experience.svg"],[1,"badge","badge-right",3,"value-sign","hideEmpty"],[1,"item","character-token",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/loot.svg"],[1,"badge","badge-left","bless-count"],[1,"condition",3,"ghs-tooltip","originX","overlayX","originY","overlayY","ngClass"],["src","./assets/images/status/bless.svg"],["class","badge badge-center badge-warning",4,"ngIf"],[1,"badge","badge-left","curse-count"],["src","./assets/images/status/curse.svg"],[1,"badge","badge-center","badge-warning"],["src","./assets/images/warning.svg"],[1,"item",3,"ghs-tooltip","originX","overlayX","originY","overlayY"],[1,"badge","badge-left","empower-count"],[1,"condition"],["src","./assets/images/status/empower.svg"],["class","badge badge-character-icon",4,"ngIf"],[1,"badge","badge-character-icon"],[1,"badge","badge-left","enfeeble-count"],["src","./assets/images/status/enfeeble.svg"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"objective-marker"],["src","./assets/images/right.svg",1,"ghs-svg"],[1,"map-marker",3,"ngClass"],[1,"summon-stats-container"],[1,"stat",3,"click"],["src","./assets/images/action/move.svg",1,"ghs-svg"],[3,"value-calc","empty"],["src","./assets/images/action/attack.svg",1,"ghs-svg"],["src","./assets/images/action/range.svg",1,"ghs-svg"],["class","action",4,"ngIf"],[1,"action"],[3,"action"],[1,"summon",3,"ngClass","click"],[1,"item",3,"ngClass","click"],[1,"condition","marker"],[1,"item",3,"ghs-label","ghs-label-attribute","ngClass"],[1,"exhausted",3,"click"],["src","./assets/images/status/exhausted.svg",1,"ghs-svg"],[1,"button",3,"click"],["src","./assets/images/status/dead.svg"],[1,"button","level-button",3,"click"],["src","./assets/images/status/level.svg"],["class","item max-health-container",4,"ngIf"],[1,"item","max-health-container"],["src","./assets/images/status/health.svg",3,"ghs-label","ghs-label-attribute"],[1,"badge","badge-right","max-health"],[3,"entityConditions","immunities","entity","figure","type"],[1,"objective-container"],[1,"title",3,"value"],["objectiveTitle",""],[1,"level-dialog"],[1,"level-container"],["class","item",4,"ngFor","ngForOf"],[1,"char-container"],["class","titles-container",4,"ngIf"],[1,"level",3,"ngClass","click"],["type","text",1,"title",3,"value"],["charactertitle",""],[1,"titles-container"],["class","title-container",4,"ngFor","ngForOf"],[1,"title-container"],["type","text",1,"title",3,"value","change"],[1,"title"],["summonTitle",""],[1,"summon-container"],[1,"button",3,"ngClass","click"],[1,"badge","badge-right",3,"value-calc","empty"],["class","badge badge-right",3,"value-calc","empty",4,"ngIf"],["class","badge badge-right",4,"ngIf"],[1,"badge","badge-right"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ix,1,2,"ghs-entity-index-key",1),t.TgZ(2,"div",2),t.YNc(3,aO,7,8,"ng-container",3),t.YNc(4,sO,6,5,"ng-container",3),t.YNc(5,_6,6,5,"ng-container",3),t.YNc(6,hO,7,8,"div",4),t.YNc(7,Hx,13,9,"ng-container",3),t.qZA(),t.YNc(8,yO,18,15,"div",5),t.YNc(9,nw,5,2,"ng-container",3),t.YNc(10,Hf,5,2,"ng-container",3),t.YNc(11,sw,3,2,"div",6),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.data.entityIndexKey&&i.data.entity),t.xp6(2),t.Q6J("ngIf",i.data.entity&&i.gameManager.isCharacter(i.data.figure)&&i.gameManager.isCharacter(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.data.entity&&i.gameManager.isObjective(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjectiveContainer(i.data.figure)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isMonster(i.data.figure)),t.xp6(1),t.Q6J("ngIf",i.data.entity&&i.gameManager.isCharacter(i.data.figure)&&i.gameManager.isSummon(i.data.entity)),t.xp6(1),t.Q6J("ngIf",!(i.levelDialog||i.gameManager.isCharacter(i.data.figure)&&i.gameManager.toCharacter(i.data.figure).absent)),t.xp6(1),t.Q6J("ngIf",i.data.entity&&i.gameManager.isObjective(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjectiveContainer(i.data.figure)&&i.data.entity&&i.gameManager.isObjectiveEntity(i.data.entity)),t.xp6(1),t.Q6J("ngIf",i.levelDialog))},dependencies:[x.mk,x.sg,x.O5,zu,Gr,Gu,ie,ng,An,aa,Ba,Ii,sg],styles:['.entity-menu-dialog[_ngcontent-%COMP%]{position:relative}.entity-menu-dialog[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 44 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.standee[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top-left-radius:30%;border-top-right-radius:30%;height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%]{cursor:pointer}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%]:hover{opacity:.4}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title[_ngcontent-%COMP%]{display:flex;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title.absent[_ngcontent-%COMP%]{text-decoration:line-through}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.absent[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));cursor:pointer;filter:var(--ghs-filter-white)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .change-entity[_ngcontent-%COMP%]{cursor:w-resize}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number.normal[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .standee-number.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .summon-icon[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .summon-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .summon-icon[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.25 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));border-bottom-left-radius:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));z-index:1;opacity:.9}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:0;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] small[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .status-container[_ngcontent-%COMP%]{display:flex;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .status-container[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));row-gap:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto}.entity-menu-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.entity-menu-dialog[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%]:hover, .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]:hover{opacity:.4}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.entity-menu-dialog[_ngcontent-%COMP%] .character-token[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 3.25 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-evenly;grid-column:2 span;width:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline);text-align:center}.entity-menu-dialog[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-left[_ngcontent-%COMP%]{left:0}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-right[_ngcontent-%COMP%]{right:0}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-center[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));left:50%;transform:translate(-50%)}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-character-icon[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:40%}.entity-menu-dialog[_ngcontent-%COMP%] .badge.badge-character-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] input.badge[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * -1.5 * var(--ghs-dialog-factor));min-width:0;border:none;width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));background:transparent}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));row-gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto;grid-column:1/span 3}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item.active[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item.new[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .marker-container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .item.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .action-hint[_ngcontent-%COMP%]{grid-column:span 3;font-size:1.5em}.entity-menu-dialog[_ngcontent-%COMP%] .exhausted[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] .condition.marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.entity-menu-dialog[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));filter:grayscale(70%)}.entity-menu-dialog[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]:after, .entity-menu-dialog[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover:after{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));background-image:url(minus.97c98a810771fceb.svg);background-size:cover}.entity-menu-dialog[_ngcontent-%COMP%] .summon.active[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%;filter:none}.entity-menu-dialog[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%;filter:none}.entity-menu-dialog[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]:hover:after, .entity-menu-dialog[_ngcontent-%COMP%] .summon.active[_ngcontent-%COMP%]:hover:after{content:"";display:none}.entity-menu-dialog[_ngcontent-%COMP%] .summon.active[_ngcontent-%COMP%]:hover{filter:grayscale(70%)}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%]{justify-content:space-evenly!important;width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor))!important}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.2 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red)}.entity-menu-dialog[_ngcontent-%COMP%] .summon-stats-container[_ngcontent-%COMP%]{grid-column:span 3;grid-row:span 2;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:auto}.entity-menu-dialog[_ngcontent-%COMP%] .summon-stats-container[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .summon-stats-container[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .map-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4.7 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .map-marker.empty[_ngcontent-%COMP%]{filter:grayscale(.7)}.entity-menu-dialog[_ngcontent-%COMP%] input.title[_ngcontent-%COMP%]{max-width:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor));margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * 1);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .objective-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .objective-container[_ngcontent-%COMP%] .max-health[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-button[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));display:flex;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%] .titles-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%] .titles-container[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .char-container[_ngcontent-%COMP%] .max-health[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .level-dialog[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{left:50%;transform:translate(-50%,calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)))}']})),a})();function kO(o,a){1&o&&(t.TgZ(0,"span",13),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function TO(o,a){1&o&&(t.TgZ(0,"span",14),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function rw(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1,"["),t._UZ(2,"span",3),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","data.edition."+n.getEdition())}}const ZO=function(o,a){return{current:o,active:a}};function AO(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s))}),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(2,ZO,n==e.gameManager.game.level,n==e.monster.level)),t.xp6(1),t.Oqu(n)}}const T6=function(o,a){return{ally:o,allied:a}};let cw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),(0,_.Z)(this,"gameManager",d.v),this.monster=e,this.dialogRef=i}setLevel(e){this.dialogRef.close(e)}getEdition(){return d.v.getEdition(this.monster)}toggleAlly(){d.v.stateManager.before(this.monster.isAlly?"unsetAlly":"setAlly","data.monster."+this.monster.name),this.monster.isAlly=!this.monster.isAlly,d.v.stateManager.after()}toggleallied(){d.v.stateManager.before(this.monster.isAllied?"unsetallied":"setallied","data.monster."+this.monster.name),this.monster.isAllied=!this.monster.isAllied,d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-level-dialog"]],decls:14,vars:10,consts:[[1,"level-dialog"],[1,"title"],[1,"name"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","edition",4,"ngIf"],[1,"level-container"],[1,"item"],["src","./assets/images/status/level.svg"],[4,"ngFor","ngForOf"],["ghs-pointer-input","",1,"toggle-ally",3,"ngClass","singleClick","doubleClick"],["src","./assets/images/monster/enemy.png"],[1,"ally"],[1,"allied"],[1,"edition"],[1,"level",3,"ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"span",1)(2,"span",2),t._UZ(3,"span",3),t.YNc(4,kO,2,1,"span",4),t.YNc(5,TO,2,1,"span",5),t.YNc(6,rw,4,1,"span",6),t.qZA(),t._UZ(7,"span",3),t.qZA(),t.TgZ(8,"div",7)(9,"span",8),t._UZ(10,"img",9),t.qZA(),t.YNc(11,AO,3,5,"span",10),t.TgZ(12,"span",11),t.NdJ("singleClick",function(){return i.toggleAlly()})("doubleClick",function(){return i.toggleallied()}),t._UZ(13,"img",12),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(1),t.Q6J("ngIf",i.monster.isAlly),t.xp6(1),t.Q6J("ngIf",i.monster.isAllied),t.xp6(1),t.Q6J("ngIf",i.getEdition()),t.xp6(1),t.Q6J("ghs-label","game.level"),t.xp6(4),t.Q6J("ngForOf",i.levels),t.xp6(1),t.Q6J("ngClass",t.WLB(7,T6,i.monster.isAlly,i.monster.isAllied)))},dependencies:[x.mk,x.sg,x.O5,ie,An],styles:['.level-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column}.level-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));text-align:center;width:100%}.level-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover, .level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.current[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .max-health[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;display:flex;justify-content:center;align-items:center;z-index:4}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .toggle-ally.ally[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:50%;left:50%;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));transform:translate(-50%,-50%);background-color:var(--ghs-color-red);clip-path:polygon(10% 0,0 10%,40% 50%,0 90%,10% 100%,50% 60%,90% 100%,100% 90%,60% 50%,100% 10%,90% 0,50% 40%)}']})),a})();const Bf=function(o,a){return{closed:o,opened:a}},SO=function(o){return{flipped:o}};let Wd=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"opened",!1),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"forceStats",void 0),this.data=e,this.dialogRef=i,this.monster=e.monster,this.forceStats=e.forceStats}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},1e3)}getBackside(){let e=new Ze.Q(this.monster);return e.boss?d.v.monsterManager.addMonsterEntity(e,1,ee.M.boss):(d.v.monsterManager.addMonsterEntity(e,1,ee.M.normal),d.v.monsterManager.addMonsterEntity(e,1,ee.M.elite)),e.isAlly=this.monster.isAlly,e.isAllied=this.monster.isAllied,e.level=this.monster.level<4?this.monster.level+4:this.monster.level-4,e.errors=this.monster.errors,e}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-stat-dialog"]],decls:9,vars:15,consts:[[1,"stat-dialog",3,"ngClass","click"],[1,"stat-container"],[1,"card-container"],[1,"card","reverse",3,"ngClass"],[1,"card-back"],[3,"monster","noClick","disablePoup","forceStats"],[1,"card-front"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(){return i.close()}),t.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"ghs-monster-stats",5),t.qZA(),t.TgZ(6,"div",6),t._UZ(7,"ghs-monster-stats",5),t.qZA()()()()(),t.TgZ(8,"div",7),t.NdJ("click",function(){return i.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.WLB(10,Bf,!i.opened,i.opened)),t.xp6(3),t.Q6J("ngClass",t.VKq(13,SO,i.opened)),t.xp6(2),t.Q6J("monster",i.getBackside())("noClick",!0)("disablePoup",!0)("forceStats",i.forceStats),t.xp6(2),t.Q6J("monster",i.monster)("noClick",!0)("disablePoup",!0)("forceStats",i.forceStats))},styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.stat-dialog[_ngcontent-%COMP%]{position:relative;width:100vw;height:100vh;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0);z-index:2;overflow:auto;display:flex;justify-content:center;align-items:center;-ms-overflow-style:none;scrollbar-width:none}.stat-dialog[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.stat-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.stat-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.8s}.stat-dialog[_ngcontent-%COMP%] .stat-container[_ngcontent-%COMP%]{overflow:visible;width:100vw;max-width:600px;max-height:100vh}.stat-dialog[_ngcontent-%COMP%] .stat-container[_ngcontent-%COMP%] .card-container[_ngcontent-%COMP%]{width:100%;height:100%;margin:1vh 0}.close-container[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1}"]})),a})();function lw(o,a){1&o&&(t.TgZ(0,"span",11),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function $u(o,a){1&o&&(t.TgZ(0,"span",12),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function gw(o,a){if(1&o&&(t.TgZ(0,"span",13),t._uU(1,"["),t._UZ(2,"span",2),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","data.edition."+n.getEdition())}}function dw(o,a){if(1&o&&(t.TgZ(0,"div",14),t._UZ(1,"ghs-monster-stats",15),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("monster",e.getMonsterForLevel(n))("forceStats",!0)("noClick",!0)}}let zf=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),this.monster=e,this.dialogRef=i,this.dialog=s}getEdition(){return d.v.getEdition(this.monster)}getMonsterForLevel(e){let i=new Ze.Q(this.monster,e);return i.isAlly=this.monster.isAlly,i.isAllied=this.monster.isAllied,i.errors=this.monster.errors,i}toggleAlly(){d.v.stateManager.before(this.monster.isAlly?"unsetAlly":"setAlly","data.monster."+this.monster.name),this.monster.isAlly=!this.monster.isAlly,d.v.stateManager.after()}toggleallied(){d.v.stateManager.before(this.monster.isAllied?"unsetallied":"setallied","data.monster."+this.monster.name),this.monster.isAllied=!this.monster.isAllied,d.v.stateManager.after()}openStatPopup(e){const i=new Ze.Q(this.monster,e);this.dialog.open(Wd,{panelClass:"fullscreen-panel",data:{monster:i,forceStats:!0}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-stats-popup"]],decls:11,vars:7,consts:[[1,"stats-dialog"],[1,"name"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","edition",4,"ngIf"],[1,"menu"],[1,"toggle-ally",3,"ghs-label","click"],[1,"toggle-allied",3,"ghs-label","click"],[1,"stats-container"],["class","stats",4,"ngFor","ngForOf"],[1,"ally"],[1,"allied"],[1,"edition"],[1,"stats"],[3,"monster","forceStats","noClick"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"span",1),t._UZ(2,"span",2),t.YNc(3,lw,2,1,"span",3),t.YNc(4,$u,2,1,"span",4),t.YNc(5,gw,4,1,"span",5),t.qZA(),t.TgZ(6,"div",6)(7,"a",7),t.NdJ("click",function(){return i.toggleAlly()}),t.qZA(),t.TgZ(8,"a",8),t.NdJ("click",function(){return i.toggleallied()}),t.qZA()(),t.TgZ(9,"div",9),t.YNc(10,dw,2,3,"div",10),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(1),t.Q6J("ngIf",i.monster.isAlly),t.xp6(1),t.Q6J("ngIf",i.monster.isAllied),t.xp6(1),t.Q6J("ngIf",i.getEdition()),t.xp6(2),t.Q6J("ghs-label","monster.toggleAlly."+(i.monster.isAlly?"off":"on")),t.xp6(1),t.Q6J("ghs-label","monster.toggleAllied."+(i.monster.isAllied?"off":"on")),t.xp6(2),t.Q6J("ngForOf",i.levels))},styles:[".stats-dialog[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 46 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.stats-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));text-align:center;width:100%}.stats-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;align-items:center}.stats-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-text);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ally[_ngcontent-%COMP%]{text-decoration:line-through}.stats-dialog[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%]{text-align:initial;display:flex;flex-direction:column;align-items:center;margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));max-height:80vh;overflow-y:auto;overflow-x:hidden}.stats-dialog[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:top left}"]})),a})();const EO=["levelButton"];function Z6(o,a){1&o&&t._UZ(0,"div",22)}function hw(o,a){1&o&&t._UZ(0,"div",23)}function A6(o,a){1&o&&(t.TgZ(0,"span",24),t._UZ(1,"span",8),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function uw(o,a){1&o&&(t.TgZ(0,"span",25),t._UZ(1,"span",8),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function S6(o,a){if(1&o&&(t.TgZ(0,"span",26),t._UZ(1,"img",27),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)}}function E6(o,a){if(1&o&&(t.TgZ(0,"span",28),t._uU(1,"["),t._UZ(2,"span",8),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function _w(o,a){1&o&&(t.TgZ(0,"span",29),t._UZ(1,"img",30),t.qZA())}const So=function(o){return{hidden:o}};function D6(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",35),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).range)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/range.svg",t.LSH)}}const I6=function(o,a){return{hidden:o,range:a}},DO=function(o,a){return{hidden:o,bordered:a}};function N6(o,a){if(1&o&&(t.TgZ(0,"div",31)(1,"span",32),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.TgZ(5,"span",32),t._UZ(6,"span",33),t.qZA(),t.TgZ(7,"span",34),t._UZ(8,"img",27),t.qZA(),t.TgZ(9,"span",35),t._UZ(10,"span",33),t.qZA(),t.TgZ(11,"span",34),t._UZ(12,"img",27),t.qZA(),t.YNc(13,D6,5,7,"ng-container",19),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(17,I6,n.hideStats(n.MonsterType.boss),n.hideStats(n.MonsterType.boss)||n.statsForType(n.MonsterType.boss).range)),t.xp6(1),t.Q6J("ngClass",t.VKq(20,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).health)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/hp.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(22,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).movement)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/"+(n.monster.flying?"fly":"move")+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.WLB(24,DO,n.hideStats(n.MonsterType.boss),n.hideStats(n.MonsterType.boss)||n.statsForType(n.MonsterType.boss).range)),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.boss).attack)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/attack.svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.hideStats(n.MonsterType.boss)||n.statsForType(n.MonsterType.boss).range)}}const J6=function(o){return{boss:o}};function pw(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-pointer-input",36),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(1,J6,n.monster.boss))}}function U6(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",40),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.TgZ(5,"span",41),t._UZ(6,"span",33),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(9,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).range)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/range.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(11,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).range)("level",n.monster.level)("empty",!0)}}const L6=function(o){return{range:o}};function Q6(o,a){if(1&o&&(t.TgZ(0,"div",37)(1,"span",38),t._UZ(2,"span",33),t.qZA(),t.TgZ(3,"span",34),t._UZ(4,"img",27),t.qZA(),t.TgZ(5,"span",39),t._UZ(6,"span",33),t.qZA(),t.TgZ(7,"span",38),t._UZ(8,"span",33),t.qZA(),t.TgZ(9,"span",34),t._UZ(10,"img",27),t.qZA(),t.TgZ(11,"span",39),t._UZ(12,"span",33),t.qZA(),t.TgZ(13,"span",40),t._UZ(14,"span",33),t.qZA(),t.TgZ(15,"span",34),t._UZ(16,"img",27),t.qZA(),t.TgZ(17,"span",41),t._UZ(18,"span",33),t.qZA(),t.YNc(19,U6,7,13,"ng-container",19),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(29,L6,n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.elite)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)),t.xp6(1),t.Q6J("ngClass",t.VKq(31,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).health)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/hp.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(33,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).health)("level",n.monster.level)("empty",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(35,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).movement)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/"+(n.monster.flying?"fly":"move")+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(37,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).movement)("level",n.monster.level)("empty",!0),t.xp6(1),t.Q6J("ngClass",t.WLB(39,DO,n.hideStats(n.MonsterType.normal),n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.normal)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.normal).attack)("level",n.monster.level)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images"+(n.settingsManager.settings.fhStyle?"/fh":"")+"/stats/attack.svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.WLB(42,DO,n.hideStats(n.MonsterType.elite),n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.normal)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)),t.xp6(1),t.Q6J("value-calc",n.statsForType(n.MonsterType.elite).attack)("level",n.monster.level)("empty",!0),t.xp6(1),t.Q6J("ngIf",n.hideStats(n.MonsterType.normal)&&n.hideStats(n.MonsterType.elite)||n.statsForType(n.MonsterType.normal).range||n.statsForType(n.MonsterType.elite).range)}}function R6(o,a){if(1&o&&(t.TgZ(0,"div",53)(1,"span",54),t._uU(2),t.qZA(),t._UZ(3,"ghs-actions",55),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.hij("",e+1,":"),t.xp6(1),t.Q6J("actions",n)("inline",!0)("statsCalculation",!1)("relative",!0)("right",!0)("hexSize",.5)("monster",i.monster)}}function F6(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH)}}function fw(o,a){if(1&o&&(t.TgZ(0,"div",53)(1,"span",54),t._uU(2),t.qZA(),t._UZ(3,"ghs-actions",58),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.hij("",e+1,":"),t.xp6(1),t.Q6J("actions",n)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("monster",i.monster)}}function q6(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH)}}function r(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",42),t._UZ(2,"div",43),t.TgZ(3,"div",44),t._UZ(4,"ghs-actions",45),t.qZA(),t.YNc(5,R6,4,8,"div",46),t.qZA(),t.TgZ(6,"div",47),t.YNc(7,F6,2,1,"span",48),t.qZA(),t.TgZ(8,"div",49),t._UZ(9,"div",50),t.TgZ(10,"div",44),t._UZ(11,"ghs-actions",51),t.qZA(),t.YNc(12,fw,4,7,"div",46),t.qZA(),t.TgZ(13,"div",52),t.YNc(14,q6,2,1,"span",48),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(25,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("ghs-label",n.statsForType(n.MonsterType.normal).note),t.xp6(2),t.Q6J("actions",n.statsForType(n.MonsterType.normal).actions)("inline",!0)("statsCalculation",!1)("relative",!0)("right",!0)("hexSize",.5)("highlightActions",n.highlightActions)("monster",n.monster),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.normal).special),t.xp6(1),t.Q6J("ngClass",t.VKq(27,So,n.hideStats(n.MonsterType.normal))),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.normal).immunities),t.xp6(1),t.Q6J("ngClass",t.VKq(29,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("ghs-label",n.statsForType(n.MonsterType.elite).note),t.xp6(2),t.Q6J("actions",n.statsForType(n.MonsterType.elite).actions)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("highlightActions",n.highlightActions)("monster",n.monster),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.elite).special),t.xp6(1),t.Q6J("ngClass",t.VKq(31,So,n.hideStats(n.MonsterType.elite))),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.elite).immunities)}}function c(o,a){if(1&o&&(t.TgZ(0,"div",53)(1,"span",54),t._uU(2),t.qZA(),t._UZ(3,"ghs-actions",58),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.hij("",e+1,":"),t.xp6(1),t.Q6J("actions",n)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("monster",i.monster)}}function g(o,a){if(1&o&&(t.TgZ(0,"div",59),t._UZ(1,"div",50),t.TgZ(2,"div",44),t._UZ(3,"ghs-actions",51),t.qZA(),t.YNc(4,c,4,7,"div",46),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(10,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("ghs-label",n.statsForType(n.MonsterType.boss).note),t.xp6(2),t.Q6J("actions",n.statsForType(n.MonsterType.boss).actions)("inline",!0)("statsCalculation",!1)("relative",!0)("hexSize",.5)("highlightActions",n.highlightActions)("monster",n.monster),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.boss).special)}}function u(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH)}}function f(o,a){if(1&o&&(t.TgZ(0,"div",60),t.YNc(1,u,2,1,"span",48),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,So,n.hideStats(n.MonsterType.boss))),t.xp6(1),t.Q6J("ngForOf",n.statsForType(n.MonsterType.boss).immunities)}}const C=function(o,a,n,e){return{boss:o,fh:a,"no-click":n,denied:e}},w=function(o,a){return{"is-ally":o,"is-allied":a}};let T=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"forceStats",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"noClick",!1),(0,_.Z)(this,"disablePoup",!1),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"stats",void 0),(0,_.Z)(this,"eliteStats",void 0),(0,_.Z)(this,"statOverview",!1),(0,_.Z)(this,"highlightActions",[vt.Us.shield,vt.Us.retaliate]),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"catching",!1),(0,_.Z)(this,"levelButton",void 0),this.dialog=e,this.overlay=i,this.element=s}ngOnInit(){this.setStats(),R.r.settings.statAnimations||(this.highlightActions=[]),this.edition=d.v.getEdition(this.monster),this.catching=this.monster.catching&&null!=d.v.game.party.buildings.find(e=>"stables"==e.name&&e.level>0&&"wrecked"!=e.state),d.v.uiChange.subscribe({next:()=>{this.highlightActions=R.r.settings.statAnimations?[vt.Us.shield,vt.Us.retaliate]:[],this.edition=d.v.getEdition(this.monster),this.catching=this.monster.catching&&null!=d.v.game.party.buildings.find(e=>"stables"==e.name&&e.level>0&&"wrecked"!=e.state)}})}hideStats(e){return!this.forceStats&&R.r.settings.hideStats&&this.monster.entities.every(i=>i.dead||i.type!=e)}setStats(){this.monster.boss?this.stats=d.v.monsterManager.getStat(this.monster,ee.M.boss):(this.stats=d.v.monsterManager.getStat(this.monster,ee.M.normal),this.eliteStats=d.v.monsterManager.getStat(this.monster,ee.M.elite))}statsForType(e){let i=this.monster.stats.find(s=>s.level==this.monster.level&&s.type==e);return i||(i=new zr.c(e,this.monster.level,0,0,0,0),this.monster.stats.push(i)),i}setLevel(e){e!=this.monster.level&&(d.v.stateManager.before("setLevel","data.monster."+this.monster.name,""+e),d.v.monsterManager.setLevel(this.monster,e),this.setStats(),d.v.stateManager.after())}openLevelDialog(){this.dialog.open(cw,{panelClass:"dialog",data:this.monster,positionStrategy:this.overlay.position().flexibleConnectedTo(this.levelButton).withPositions((0,he.sm)())}).closed.subscribe({next:i=>{"number"==typeof i&&this.setLevel(i)}})}openStatsPopup(){this.noClick?this.disablePoup||this.dialog.open(Wd,{panelClass:"fullscreen-panel",data:{monster:this.monster,forceStats:this.forceStats}}):this.dialog.open(zf,{panelClass:"dialog",data:this.monster})}openStatPopup(){!this.noClick&&!this.disablePoup&&this.dialog.open(Wd,{panelClass:"fullscreen-panel",data:{monster:this.monster,forceStats:this.forceStats}})}openEntityMenu(e){this.noClick||this.dialog.open($c,{panelClass:"dialog",data:{entity:void 0,figure:this.monster},positionStrategy:this.overlay.position().flexibleConnectedTo(this.element).withPositions((0,he.sm)())})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV),t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-stats"]],viewQuery:function(e,i){if(1&e&&t.Gf(EO,5,t.SBq),2&e){let s;t.iGM(s=t.CRH())&&(i.levelButton=s.first)}},inputs:{monster:"monster",forceStats:"forceStats",relative:"relative",noClick:"noClick",disablePoup:"disablePoup"},decls:23,vars:29,consts:[[1,"stats-container",3,"ngClass"],["card",""],[1,"level",3,"ghs-label","ghs-label-attribute","click"],["levelButton",""],["class","filter-stats normal",4,"ngIf"],["class","filter-stats elite",4,"ngIf"],["ghs-pointer-input","",1,"name-container",3,"singleClick","doubleClick"],[1,"name"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","flying",4,"ngIf"],["class","edition",4,"ngIf"],["class","catching",4,"ngIf"],[1,"toggle-ally",3,"ngClass"],["src","./assets/images/monster/enemy.png"],["class","stats boss",3,"ngClass",4,"ngIf"],["class","entity-menu",3,"ngClass","singleClick",4,"ngIf"],["class","stats",3,"ngClass",4,"ngIf"],[4,"ngIf"],["class","extra boss",3,"ngClass",4,"ngIf"],["class","immunities boss",3,"ngClass",4,"ngIf"],[1,"filter-stats","normal"],[1,"filter-stats","elite"],[1,"ally"],[1,"allied"],[1,"flying"],[3,"src"],[1,"edition"],[1,"catching"],["src","./assets/images/fh/catching.svg",1,"ghs-svg"],[1,"stats","boss",3,"ngClass"],[1,"stat","boss","bordered",3,"ngClass"],[1,"value",3,"value-calc","level","empty"],[1,"stat-icon"],[1,"stat","boss",3,"ngClass"],[1,"entity-menu",3,"ngClass","singleClick"],[1,"stats",3,"ngClass"],[1,"stat","normal","bordered",3,"ngClass"],[1,"stat","elite","bordered",3,"ngClass"],[1,"stat","normal",3,"ngClass"],[1,"stat","elite",3,"ngClass"],[1,"extra","normal",3,"ngClass"],[1,"notes",3,"ghs-label"],[1,"additional"],[3,"actions","inline","statsCalculation","relative","right","hexSize","highlightActions","monster"],["class","specials",4,"ngFor","ngForOf"],[1,"immunities","normal",3,"ngClass"],["class","immunity",4,"ngFor","ngForOf"],[1,"extra","elite",3,"ngClass"],[1,"notes","text-white",3,"ghs-label"],[3,"actions","inline","statsCalculation","relative","hexSize","highlightActions","monster"],[1,"immunities","elite",3,"ngClass"],[1,"specials"],[1,"special"],[3,"actions","inline","statsCalculation","relative","right","hexSize","monster"],[1,"immunity"],[1,"icon",3,"src"],[3,"actions","inline","statsCalculation","relative","hexSize","monster"],[1,"extra","boss",3,"ngClass"],[1,"immunities","boss",3,"ngClass"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0,1)(2,"div",2,3),t.NdJ("click",function(){return i.openLevelDialog()}),t._uU(4),t.qZA(),t.YNc(5,Z6,1,0,"div",4),t.YNc(6,hw,1,0,"div",5),t.TgZ(7,"div",6),t.NdJ("singleClick",function(){return i.openStatsPopup()})("doubleClick",function(){return i.openStatPopup()}),t.TgZ(8,"span",7),t._UZ(9,"span",8),t.YNc(10,A6,2,1,"span",9),t.YNc(11,uw,2,1,"span",10),t.qZA(),t.YNc(12,S6,2,1,"span",11),t.YNc(13,E6,4,1,"span",12),t.YNc(14,_w,2,0,"span",13),t.qZA(),t.TgZ(15,"span",14),t._UZ(16,"img",15),t.qZA(),t.YNc(17,N6,14,27,"div",16),t.YNc(18,pw,1,3,"ghs-pointer-input",17),t.YNc(19,Q6,20,45,"div",18),t.YNc(20,r,15,33,"ng-container",19),t.YNc(21,g,5,12,"div",20),t.YNc(22,f,2,4,"div",21),t.qZA()),2&e){const s=t.MAs(1);t.Udp("font-size",.03*s.offsetWidth+"px"),t.Q6J("ngClass",t.l5B(21,C,i.monster.boss,i.settingsManager.settings.fhStyle,i.noClick,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.monsterPermissions[i.monster.name+"|"+i.monster.edition])),t.xp6(2),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij("",i.monster.level," "),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.hideStats(i.MonsterType.normal)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.hideStats(i.MonsterType.elite)),t.xp6(3),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(1),t.Q6J("ngIf",i.monster.isAlly),t.xp6(1),t.Q6J("ngIf",i.monster.isAllied),t.xp6(1),t.Q6J("ngIf",i.monster.flying),t.xp6(1),t.Q6J("ngIf",i.edition),t.xp6(1),t.Q6J("ngIf",i.catching),t.xp6(1),t.Q6J("ngClass",t.WLB(26,w,i.monster.isAlly,i.monster.isAllied)),t.xp6(2),t.Q6J("ngIf",i.monster.boss),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.gameManager.gameplayFigure(i.monster)),t.xp6(1),t.Q6J("ngIf",!i.monster.boss),t.xp6(1),t.Q6J("ngIf",!i.monster.boss),t.xp6(1),t.Q6J("ngIf",i.monster.boss),t.xp6(1),t.Q6J("ngIf",i.monster.boss)}},dependencies:[x.mk,x.sg,x.O5,ag,ie,ng,An],styles:['.stats-container[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;display:flex;border-radius:1em}.stats-container[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{transition:opacity 1s ease-in-out}.stats-container[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{opacity:0}.stats-container[_ngcontent-%COMP%]:before{content:" ";position:absolute;width:100%;height:100%;background-image:url(standard.6c0bb378c65c9245.png);background-position:top;background-size:100% auto;background-repeat:no-repeat;border-radius:1em;z-index:0}.stats-container[_ngcontent-%COMP%]:after{content:" ";position:absolute;width:100%;height:100%;background-image:url(standard_repeat.40e23c6c9521de3d.png);background-position:top;background-size:100% auto;background-repeat:repeat-y;border-radius:1em;z-index:-1}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]{position:absolute;top:.4em;right:1.8em;width:11.3em;display:flex;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:2.1em;filter:drop-shadow(.1em .1em .1em var(--ghs-color-black));text-align:left;white-space:nowrap;overflow:auto;z-index:4;-ms-overflow-style:none;scrollbar-width:none}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{margin-left:.1em}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:auto;margin-left:.3em}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .catching[_ngcontent-%COMP%]{position:absolute;right:1em;top:50%;width:1.2em;height:auto;filter:var(--ghs-filter-white);transform:translateY(-50%)}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]:hover{cursor:pointer;color:var(--ghs-color-gray)}.stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]:hover .flying[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]:hover .catching[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.stats-container[_ngcontent-%COMP%] .entity-menu[_ngcontent-%COMP%]{position:absolute;inset:0 38%;z-index:3}.stats-container[_ngcontent-%COMP%] .entity-menu.boss[_ngcontent-%COMP%]{left:25%;right:55%}.stats-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%]{position:absolute;top:.2em;right:.8em;height:3.4em;width:2.4em;cursor:pointer;display:flex;justify-content:center;align-items:center;z-index:4}.stats-container[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.stats-container[_ngcontent-%COMP%] .toggle-ally.is-ally[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:.5em .1em;background-color:var(--ghs-color-red);clip-path:polygon(10% 0,0 10%,40% 50%,0 90%,10% 100%,50% 60%,90% 100%,100% 90%,60% 50%,100% 10%,90% 0,50% 40%)}.stats-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{position:absolute;top:.2em;left:.7em;font-family:ghs-title;font-size:3em;text-shadow:var(--ghs-outline);color:var(--ghs-color-gray);cursor:pointer;z-index:4}.stats-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover, .stats-container[_ngcontent-%COMP%] .level.active-button[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{position:absolute;top:4.8em;left:16.5em;width:8.4em;height:11.4em;display:grid;grid-template-columns:50% 0 50%;grid-template-rows:repeat(3,33%);filter:drop-shadow(.01em .01em .01em var(--ghs-color-black));z-index:1;transform:translate(-50%)}.stats-container[_ngcontent-%COMP%] .stats.boss[_ngcontent-%COMP%]{top:5.2em;left:9.6em;grid-template-columns:8em 0}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{position:relative;font-size:2.4em;line-height:1.7em;padding-top:0;width:100%;display:flex}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:block;width:100%;white-space:nowrap;overflow-x:auto;overflow-y:hidden}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.normal[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.boss[_ngcontent-%COMP%]{justify-self:end;justify-content:flex-end;filter:drop-shadow(.01em .01em .01em var(--ghs-color-white));padding-right:.8em}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.normal[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.boss[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{text-align:right}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.normal.bordered[_ngcontent-%COMP%]:before, .stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.boss.bordered[_ngcontent-%COMP%]:before{content:" ";position:absolute;bottom:0;right:0;height:1px;width:100%;background:linear-gradient(to right,transparent,var(--ghs-color-darkred))}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.elite[_ngcontent-%COMP%]{justify-self:start;color:var(--ghs-color-white);filter:drop-shadow(.01em .01em .01em var(--ghs-color-black));padding-left:.8em}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.elite.bordered[_ngcontent-%COMP%]:before{content:" ";position:absolute;bottom:0;left:0;height:1px;width:100%;background:linear-gradient(to right,var(--ghs-color-white),transparent)}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%]{position:relative;justify-self:center;align-self:center;width:2.5em;height:2.5em;display:flex;justify-content:center;align-items:center;z-index:1}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:50%;left:50%;width:2em;height:2em;background-color:var(--ghs-color-darkgray);border:.25em solid var(--ghs-color-white);z-index:1;transform:translate(-50%,-50%) rotate(45deg);filter:var(--ghs-filter-outline-thin)}.stats-container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);height:1.4em;width:auto;z-index:2}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%]{grid-template-rows:repeat(4,25%)}.stats-container[_ngcontent-%COMP%] .stats.range.boss[_ngcontent-%COMP%]{top:29%}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{line-height:1.3em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat.normal[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat.boss[_ngcontent-%COMP%]{padding-right:.7em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat.elite[_ngcontent-%COMP%]{padding-left:.6em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%]:before{width:1.4em;height:1.4em}.stats-container[_ngcontent-%COMP%] .stats.range[_ngcontent-%COMP%] .stat-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em}.stats-container.boss[_ngcontent-%COMP%]:before{background-image:url(boss.1798cff24c4bb013.png)}.stats-container.boss[_ngcontent-%COMP%]:after{background-image:url(boss_repeat.40e23c6c9521de3d.png)}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%]{position:relative;margin-top:3em;padding-bottom:.4em;width:7.5em;display:flex;flex-direction:column;font-size:1.6em;min-height:8.2em;z-index:2;overflow:auto}.stats-container[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%]{left:0;text-align:right}.stats-container[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{justify-content:end}.stats-container[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{filter:drop-shadow(.01em .01em .01em var(--ghs-color-gray))}.stats-container[_ngcontent-%COMP%] .extra.elite[_ngcontent-%COMP%]{left:5.6em;color:var(--ghs-color-white)}.stats-container[_ngcontent-%COMP%] .extra.boss[_ngcontent-%COMP%]{width:10.7em;height:auto;left:10em;color:var(--ghs-color-white)}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .notes[_ngcontent-%COMP%]{margin-top:2.3%;line-height:.8em;filter:drop-shadow(.01em .01em .01em var(--ghs-color-black))}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials[_ngcontent-%COMP%]{display:flex;align-items:baseline;font-size:calc(1em * var(--ghs-fontsize))}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]:first-child, .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]:first-child{margin-top:2.3%}.stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .additional.specials[_ngcontent-%COMP%] .special[_ngcontent-%COMP%], .stats-container[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .specials.specials[_ngcontent-%COMP%] .special[_ngcontent-%COMP%]{margin-right:.5%}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%]{position:absolute;top:5.6em;left:1.4em;display:grid;justify-items:center;align-items:center;grid-template-columns:repeat(5,2.25em);grid-template-rows:repeat(8,1.125em);column-gap:.4em;row-gap:.2em}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]{position:relative;display:block;width:2.25em;height:2.25em}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(1){grid-column:1;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(2){grid-column-start:1;grid-column-end:3;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(3){grid-column:2;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(4){grid-column-start:2;grid-column-end:4;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(5){grid-column-start:1;grid-column-end:3;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(6){grid-column:2;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(7){grid-column-start:2;grid-column-end:4;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(8){grid-column:3;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(9){grid-column-start:2;grid-column-end:4;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(10){grid-column:3;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(11){grid-column-start:3;grid-column-end:5;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(12){grid-column-start:3;grid-row:1;grid-column-end:5}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(5){grid-column:3;grid-row:6}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(6){grid-column-start:3;grid-column-end:5;grid-row:7}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(7){grid-column-start:1;grid-column-end:3;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(8){grid-column:2;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(9){grid-column-start:2;grid-column-end:4;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(10){grid-column:3;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(11){grid-column-start:3;grid-column-end:5;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities.normal[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(12){grid-column:4;grid-row:6}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%]{left:initial;right:1.4em}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(1){grid-column:5;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(2){grid-column-start:4;grid-column-end:6;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(3){grid-column:4;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(4){grid-column-start:3;grid-column-end:5;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(5){grid-column:3;grid-row:6}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(6){grid-column-start:2;grid-column-end:4;grid-row:7}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(7){grid-column-start:4;grid-column-end:6;grid-row:1}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(8){grid-column:4;grid-row:2}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(9){grid-column-start:3;grid-column-end:5;grid-row:3}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(10){grid-column:3;grid-row:4}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(11){grid-column-start:2;grid-column-end:4;grid-row:5}.stats-container[_ngcontent-%COMP%] .immunities.elite[_ngcontent-%COMP%] .immunity[_ngcontent-%COMP%]:nth-child(12){grid-column:2;grid-row:6}.stats-container.no-click[_ngcontent-%COMP%] .level[_ngcontent-%COMP%], .stats-container.no-click[_ngcontent-%COMP%] .toggle-ally[_ngcontent-%COMP%]{pointer-events:none}.stats-container.no-click[_ngcontent-%COMP%] .entity-menu[_ngcontent-%COMP%]{display:none}.stats-container[_ngcontent-%COMP%] .filter-stats[_ngcontent-%COMP%]{display:none;position:absolute;inset:0;background-color:var(--ghs-color-darkgray);opacity:.4;z-index:3}.stats-container[_ngcontent-%COMP%] .filter-stats.normal[_ngcontent-%COMP%]{right:50%}.stats-container[_ngcontent-%COMP%] .filter-stats.elite[_ngcontent-%COMP%]{left:50%;right:0}.stats-editor[_nghost-%COMP%] .extra[_ngcontent-%COMP%], .stats-editor[_nghost-%COMP%] .name-container[_ngcontent-%COMP%]{display:none!important}']})),a})();var J=E(5861);var ot=E(7866);class ft{constructor(a,n,e=!1,i=-1,s="",l=[],m=void 0){(0,_.Z)(this,"id",void 0),(0,_.Z)(this,"marker",void 0),(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"health",void 0),(0,_.Z)(this,"escort",void 0),(0,_.Z)(this,"initiative",void 0),(0,_.Z)(this,"actions",[]),(0,_.Z)(this,"allyDeck",!1),(0,_.Z)(this,"tags",[]),this.name=a,this.health=n,this.escort=e,this.id=i,this.marker=s,this.tags=l,this.initiative=m}}var Pt=E(3306),At=E(301);const zt=function(o){return{disabled:o}};function ne(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",5)(1,"label"),t._UZ(2,"span",2),t.qZA(),t.TgZ(3,"select",null,6)(5,"option",7),t._UZ(6,"span",2),t.qZA(),t.TgZ(7,"option",8),t._UZ(8,"span",2),t.qZA(),t.TgZ(9,"option",9),t._UZ(10,"span",2),t.qZA(),t.TgZ(11,"option",10),t._UZ(12,"span",2),t.qZA(),t.TgZ(13,"option",11),t._UZ(14,"span",2),t.qZA(),t.TgZ(15,"option",12),t._UZ(16,"span",2),t.qZA()(),t._UZ(17,"p",13)(18,"p",13)(19,"label",2)(20,"textarea",null,14),t.TgZ(22,"p",15),t._uU(23,"Please write in English or German / Bitte in Englisch oder Deutsch verfassen!"),t.qZA(),t.TgZ(24,"div",16)(25,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.downloadDataDump())}),t._UZ(26,"span",2),t.qZA(),t.TgZ(27,"a",18),t._UZ(28,"span",2),t.qZA()()()}if(2&o){const n=t.MAs(4),e=t.MAs(21),i=t.oxw();t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type"),t.xp6(4),t.Q6J("ghs-label","tools.feedback.reportIssue.type.abilityCard"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.monsterStat"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.characterStat"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.artwork"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.software"),t.xp6(2),t.Q6J("ghs-label","tools.feedback.reportIssue.type.feedback"),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.type."+n.value+".hint"),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.specify"),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.text"),t.xp6(7),t.Q6J("ghs-label","tools.feedback.reportIssue.download"),t.xp6(1),t.Q6J("ngClass",t.VKq(14,zt,!e.value))("href",i.issueMail(n.value,e.value),t.LSH),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue.send")}}const _e=function(o){return{active:o}};let ye=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"form","issue")}scenarioMail(e,i,s){let l="mailto:scenario@gloomhaven-secretariat.de",m=new At.tR;return m.name=e,m.index=i,m.monsters=d.v.game.figures.filter(O=>O instanceof Ze.Q).map(O=>O.name),m.allies=d.v.game.figures.filter(O=>O instanceof Ze.Q&&O.isAlly).map(O=>O.name),m.allied=d.v.game.figures.filter(O=>O instanceof Ze.Q&&O.isAllied).map(O=>O.name),m.drawExtra=d.v.game.figures.filter(O=>O instanceof Ze.Q&&O.drawExtra).map(O=>O.name),m.objectives=d.v.game.figures.filter(O=>O instanceof qe.CH||O instanceof Nn.k).map(O=>{if(O instanceof qe.CH||O instanceof Nn.k){if(O.objectiveId){const k=d.v.objectiveDataByScenarioObjectiveIdentifier(O.objectiveId);if(k)return k}if(O instanceof qe.CH)return new ft(O.name,O.maxHealth,O.escort,O.id,O.marker,O.tags,O.initiative);if(O instanceof Nn.k)return new ft(O.name,O.health,O.escort,-1,O.marker,[],O.initiative)}return new ft(O.name,0,!1)}),m.rooms=d.v.game.scenario?.rooms||[],m.marker=d.v.game.scenario?.marker||"",m.rules=d.v.game.scenario?.rules||[],m.edition=d.v.game.scenario?.edition||d.v.currentEdition(),l+="?subject=Submit Scenario #"+m.index+" "+m.name+" ("+R.r.getLabel("data.edition."+m.edition)+")",l+="&body="+s+"%0D%0A%0D%0AJSON:%0D%0A"+JSON.stringify(m,void 0,2),l}issueMail(e,i){let s="mailto:issue@gloomhaven-secretariat.de";return s+="?subject=[GHS v0.80.2] "+R.r.getLabel("tools.feedback.reportIssue.type."+e+".subject"),s+="&body="+R.r.getLabel("tools.feedback.reportIssue.type."+e+".hint")+"%0D%0A%0D%0A"+i,s}downloadDataDump(){return(0,J.Z)(function*(){try{let e=yield Pt.j.datadump(),i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-data-dump.json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}catch{console.warn("Could not read datadump")}})()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-feedback-dialog"]],decls:6,vars:6,consts:[[1,"feedback-dialog"],[3,"ngClass","click"],[3,"ghs-label"],["class","form issue-form",4,"ngIf"],["href","https://github.com/Lurkars/gloomhavensecretariat/issues/new/choose","target","_blank"],[1,"form","issue-form"],["issueType",""],["value","abilityCard"],["value","monsterStat"],["value","characterStat"],["value","artwork"],["value","software"],["value","feedback"],[1,"hint",3,"ghs-label"],["issuerText",""],[1,"hint"],[1,"buttons"],[1,"button",3,"click"],[1,"button",3,"ngClass","href"]],template:function(e,i){1&e&&(t.TgZ(0,"span",0)(1,"a",1),t.NdJ("click",function(){return i.form="issue"}),t._UZ(2,"span",2),t.qZA(),t.YNc(3,ne,29,16,"div",3),t.TgZ(4,"a",4),t._UZ(5,"span",2),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.VKq(4,_e,"issue"==i.form)),t.xp6(1),t.Q6J("ghs-label","tools.feedback.reportIssue"),t.xp6(1),t.Q6J("ngIf","issue"==i.form),t.xp6(2),t.Q6J("ghs-label","tools.feedback.githubIssue"))},dependencies:[x.mk,x.O5,wo,ko,ie],styles:[".feedback-dialog[_ngcontent-%COMP%]{font-size:150%;display:flex;flex-direction:column;padding:.5em}.feedback-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}.feedback-dialog[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-weight:700;pointer-events:none;text-decoration:none}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;align-items:center;justify-items:start;column-gap:.5em;row-gap:.5em}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-gray);display:flex}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{grid-column:2;padding:0;margin:0;font-family:var(--ghs-font-text);font-size:.7em;color:var(--ghs-color-gray);opacity:.9}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 65 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor));max-width:60vw}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;grid-column:span 2;place-self:end;padding:.3em .7em;border-radius:.5em;background-color:var(--ghs-color-darkgray);color:var(--ghs-color-white);text-decoration:none;font-family:var(--ghs-font-title)}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.8}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray);opacity:.8}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;grid-column:span 2;place-self:end}.feedback-dialog[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin:0 .5em}"]})),a})(),Kt=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"active",!1),this.el=e}ngOnChanges(e){e.active&&e.active.currentValue&&e.active.currentValue!=e.active.previousValue&&setTimeout(()=>{this.el.nativeElement.scrollIntoView({behavior:R.r.settings.disableAnimations?"auto":"smooth",block:"center",inline:"center"})},5)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","autoscroll",""]],inputs:{active:["autoscroll","active"]},features:[t.TTD]})),a})(),Ge=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"block","center"),(0,_.Z)(this,"inline","center"),(0,_.Z)(this,"active",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{setTimeout(()=>{R.r.settings.autoscroll&&!this.active&&this.figure.active&&this.el.nativeElement.scrollIntoView({behavior:R.r.settings.disableAnimations?"auto":"smooth",block:this.block,inline:this.inline}),this.active=this.figure.active},R.r.settings.disableAnimations?5:300)}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","figure-autoscroll",""]],inputs:{figure:["figure-autoscroll","figure"],block:"block",inline:"inline"}})),a})();function gn(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moreRedos())}),t._UZ(1,"span",3),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","state.loadMore"))}function Hn(o,a){if(1&o&&(t._UZ(0,"span",27),t.ALo(1,"slice")),2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ghs-label","state.info."+e.getRedoInfo(n)[0])("ghs-label-args",t.Dn7(1,3,e.getRedoInfo(n),1,e.getRedoInfo(n).length))("ghs-label-empty",!0)}}const Xi=function(o){return[o]};function ir(o,a){if(1&o&&(t.TgZ(0,"span",28),t._UZ(1,"img",29)(2,"span",30),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+(e.getRedoRevision(n)-e.getRedoRevision(n-1)-1)))}}const Wc=function(o,a){return{confirm:o,disabled:a}};function Gf(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.redo(s))})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelConfirm())}),t.TgZ(2,"span",12),t._uU(3),t.qZA(),t.YNc(4,Hn,2,7,"span",25),t._UZ(5,"span",14),t.TgZ(6,"span",15),t._uU(7),t.qZA()(),t.YNc(8,ir,3,4,"span",26),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(7,Wc,e.undoConfirm=="redo-"+n,!e.gameManager.stateManager.redoPermission)),t.xp6(2),t.hij("",e.getRedoRevision(n)+1,"."),t.xp6(1),t.Q6J("ngIf",e.getRedoInfo(n).length>0),t.xp6(3),t.lnq("",e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revision," - ",e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revisionOffset," - ",e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revision-e.gameManager.stateManager.redos[e.gameManager.stateManager.redos.length-n-1].revisionOffset,""),t.xp6(1),t.Q6J("ngIf",n>0&&e.getRedoRevision(n)-e.getRedoRevision(n-1)!=1)}}function mw(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.gameOffsetWarning=!1)}),t._UZ(1,"img",29)(2,"span",30),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+n.undoOffset))}}function vw(o,a){if(1&o&&(t.TgZ(0,"span",28),t._UZ(1,"img",29)(2,"span",30),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+(e.gameManager.game.revision-e.gameManager.game.revisionOffset-e.getUndoRevision(n)-1)))}}function AZ(o,a){if(1&o&&(t.TgZ(0,"span",28),t._UZ(1,"img",29)(2,"span",30),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,Xi,""+(e.getUndoRevision(n+1)-e.getUndoRevision(n)-1)))}}function SZ(o,a){if(1&o&&(t._UZ(0,"span",27),t.ALo(1,"slice")),2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ghs-label","state.info."+e.getUndoInfo(n)[0])("ghs-label-args",t.Dn7(1,3,e.getUndoInfo(n),1,e.getUndoInfo(n).length))("ghs-label-empty",!0)}}function EZ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,vw,3,4,"span",26),t.YNc(2,AZ,3,4,"span",26),t.TgZ(3,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.undo(s))})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelConfirm())}),t.TgZ(4,"span",12),t._uU(5),t.qZA(),t.YNc(6,SZ,2,7,"span",25),t._UZ(7,"span",14),t.TgZ(8,"span",15),t._uU(9),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",!e.undoOffset&&n==e.undoArray.length-1&&e.gameManager.game.revision-e.gameManager.game.revisionOffset-e.getUndoRevision(n)-1),t.xp6(1),t.Q6J("ngIf",n0),t.xp6(3),t.lnq("",e.gameManager.stateManager.undos[n].revision," - ",e.gameManager.stateManager.undos[n].revisionOffset," - ",e.gameManager.stateManager.undos[n].revision-e.gameManager.stateManager.undos[n].revisionOffset,"")}}function DZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",32),t.NdJ("inViewportAction",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moreUndos())})("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moreUndos())}),t._UZ(1,"span",3),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","state.loadMore"))}function IZ(o,a){1&o&&t._UZ(0,"span")}const H6=function(o,a){return{disabled:o,confirm:a}};function NZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",33),t.NdJ("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm="")})("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.clearUndos())}),t._UZ(1,"span",3),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,H6,!n.gameManager.stateManager.undoPermission,"clearUndos"==n.confirm)),t.xp6(1),t.Q6J("ghs-label","state.clear.undos"),t.xp6(1),t.Oqu("clearUndos"==n.confirm?"!":"?")}}function JZ(o,a){1&o&&(t.TgZ(0,"span",4),t._uU(1,"|"),t.qZA())}function UZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",33),t.NdJ("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm="")})("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.clearRedos())}),t._UZ(1,"span",3),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,H6,!n.gameManager.stateManager.redoPermission,"clearRedos"==n.confirm)),t.xp6(1),t.Q6J("ghs-label","state.clear.redos"),t.xp6(1),t.Oqu("clearRedos"==n.confirm?"!":"?")}}const j6=function(o){return{disabled:o}},LZ=function(o,a){return{"has-undos":o,"has-redos":a}};let QZ=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"undoOffset",0),(0,_.Z)(this,"confirm",""),(0,_.Z)(this,"undoArray",[]),(0,_.Z)(this,"redoArray",[]),(0,_.Z)(this,"undoConfirm",""),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=e,this.dialogRef.overlayRef.hostElement.style.zIndex="3000",this.dialogRef.overlayRef.backdropElement&&(this.dialogRef.overlayRef.backdropElement.style.zIndex="3000")}ngOnInit(){this.undoOffset=d.v.stateManager.undos.length>0?d.v.game.revision-(d.v.game.revisionOffset||0)-this.getUndoRevision(d.v.stateManager.undos.length-1)-1:0,this.undoArray=Array.from({length:Math.min(10,d.v.stateManager.undos.length)}).map((e,i)=>d.v.stateManager.undos.length-i-1),this.redoArray=Array.from({length:Math.min(10,d.v.stateManager.redos.length)}).map((e,i)=>Math.min(10,d.v.stateManager.redos.length)-i-1),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.undoOffset=d.v.stateManager.undos.length>0?d.v.game.revision-(d.v.game.revisionOffset||0)-this.getUndoRevision(d.v.stateManager.undos.length-1)-1:0,this.undoArray=Array.from({length:Math.min(10,d.v.stateManager.undos.length)}).map((e,i)=>d.v.stateManager.undos.length-i-1),this.redoArray=Array.from({length:Math.min(10,d.v.stateManager.redos.length)}).map((e,i)=>Math.min(10,d.v.stateManager.redos.length)-i-1)}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}moreUndos(){this.undoArray.lengthd.v.stateManager.undos.length-i-1))}moreRedos(){if(this.redoArray.lengthe-s-1)}}getUndoInfo(e){let i=[];return d.v.stateManager.undos.length>0&&d.v.stateManager.undoInfos.length>=d.v.stateManager.undos.length&&e>=0&&e1&&"serverSync"==i[0]?i="setInitiative"==i[1]&&i.length>3?["serverSync",R.r.getLabel("state.info."+i[1],[i[2],""])]:["serverSync",R.r.getLabel("state.info."+i[1],i.slice(2))]:i&&1==i.length&&"serverSync"==i[0]?i=["serverSync",""]:i||(i=["unknown"])),i}getRedoInfo(e){let i=[];return d.v.stateManager.redos.length>0&&d.v.stateManager.undoInfos.length>=d.v.stateManager.undos.length+d.v.stateManager.redos.length&&e>=0&&e1&&"serverSync"==i[0]?i="setInitiative"==i[1]&&i.length>3?["serverSync",R.r.getLabel("state.info."+i[1],[i[2],""])]:["serverSync",R.r.getLabel("state.info."+i[1],i.slice(2))]:i&&1==i.length&&"serverSync"==i[0]?i=["serverSync",""]:i||(i=["unknown"])),i}getUndoRevision(e){const i=d.v.stateManager.undos;return i[e].revision-(i[e].revisionOffset||0)}getRedoRevision(e){const i=d.v.stateManager.redos,s=i.length-e-1;return i[s].revision-(i[s].revisionOffset||0)}undo(e,i=!1){i||this.undoConfirm=="undo-"+e?d.v.stateManager.fixedUndo(this.undoArray.length-e):this.undoConfirm="undo-"+e}redo(e,i=!1){i||this.undoConfirm=="redo-"+e?d.v.stateManager.fixedRedo(e+1):this.undoConfirm="redo-"+e}cancelConfirm(){this.undoConfirm=""}clearUndos(){"clearUndos"!=this.confirm?this.confirm="clearUndos":(this.undoArray=[],this.undoOffset=0,d.v.stateManager.clearUndos())}clearRedos(){"clearRedos"!=this.confirm?this.confirm="clearRedos":(this.redoArray=[],d.v.stateManager.clearRedos())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-undo-dialog"]],decls:30,vars:27,consts:[[1,"undo-dialog"],[1,"menu"],[1,"state","undo",3,"ngClass","click"],[3,"ghs-label"],[1,"separator"],[1,"state","redo",3,"ngClass","click"],[1,"container"],[1,"list","redos"],["class","more",3,"click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"list","current",3,"autoscroll","ngClass"],[1,"entry"],[1,"revision"],[1,"info",3,"ghs-label"],[1,"spacer"],[1,"debug"],["class","warning undo-offset",3,"click",4,"ngIf"],[1,"list","undos"],["class","more","inViewport","",3,"inViewportAction","click",4,"ngIf"],[1,"menu","clear-menu"],[4,"ngIf"],["class","state",3,"ngClass","mouseleave","click",4,"ngIf"],["class","separator",4,"ngIf"],[1,"more",3,"click"],[1,"entry",3,"ngClass","click","mouseleave"],["class","info text-white",3,"ghs-label","ghs-label-args","ghs-label-empty",4,"ngIf"],["class","warning",4,"ngIf"],[1,"info","text-white",3,"ghs-label","ghs-label-args","ghs-label-empty"],[1,"warning"],["src","./assets/images/warning.svg"],[3,"ghs-label","ghs-label-args"],[1,"warning","undo-offset",3,"click"],["inViewport","",1,"more",3,"inViewportAction","click"],[1,"state",3,"ngClass","mouseleave","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"a",2),t.NdJ("click",function(){return i.gameManager.stateManager.undo()}),t._UZ(3,"span",3),t.qZA(),t.TgZ(4,"span",4),t._uU(5,"|"),t.qZA(),t.TgZ(6,"a",5),t.NdJ("click",function(){return i.gameManager.stateManager.redo()}),t._UZ(7,"span",3),t.qZA()(),t.TgZ(8,"div",6)(9,"div",7),t.YNc(10,gn,2,1,"span",8),t.YNc(11,Gf,9,10,"ng-container",9),t.qZA(),t.TgZ(12,"div",10)(13,"span",11)(14,"span",12),t._uU(15),t.qZA(),t._UZ(16,"span",13)(17,"span",14),t.TgZ(18,"span",15),t._uU(19),t.qZA()(),t.YNc(20,mw,3,4,"span",16),t.qZA(),t.TgZ(21,"div",17),t.YNc(22,EZ,10,11,"ng-container",9),t.YNc(23,DZ,2,1,"span",18),t.qZA()(),t._UZ(24,"div",14),t.TgZ(25,"div",19),t.YNc(26,IZ,1,0,"span",20),t.YNc(27,NZ,3,6,"a",21),t.YNc(28,JZ,2,0,"span",22),t.YNc(29,UZ,3,6,"a",21),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngClass",t.VKq(20,j6,!i.gameManager.stateManager.undoPermission||i.undoOffset&&i.gameManager.stateManager.gameOffsetWarning||0==i.undoArray.length)),t.xp6(1),t.Q6J("ghs-label","state.undo"),t.xp6(3),t.Q6J("ngClass",t.VKq(22,j6,!i.gameManager.stateManager.redoPermission||0==i.redoArray.length)),t.xp6(1),t.Q6J("ghs-label","state.redo"),t.xp6(3),t.Q6J("ngIf",i.redoArray.length0,i.redoArray.length>0)),t.xp6(3),t.hij("",i.gameManager.game.revision-(i.gameManager.game.revisionOffset||0)+1,"."),t.xp6(1),t.Q6J("ghs-label","state.currentGame"),t.xp6(3),t.lnq("",i.gameManager.game.revision," - ",i.gameManager.game.revisionOffset," - ",i.gameManager.game.revision-i.gameManager.game.revisionOffset,""),t.xp6(1),t.Q6J("ngIf",i.undoOffset&&i.gameManager.stateManager.gameOffsetWarning),t.xp6(2),t.Q6J("ngForOf",i.undoArray),t.xp6(1),t.Q6J("ngIf",i.undoArray.length0),t.xp6(1),t.Q6J("ngIf",i.undoArray.length>0&&i.redoArray.length>0),t.xp6(1),t.Q6J("ngIf",i.redoArray.length>0))},dependencies:[x.mk,x.sg,x.O5,mC,ie,Kt,x.OU],styles:[".undo-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;padding:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));min-width:calc(var(--ghs-unit) * 70);height:calc(var(--ghs-unit) * 68 * var(--ghs-dialog-factor));max-height:calc(var(--ghs-unit) * 68 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .working[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray);animation:ghs-spinning 1.5s linear infinite;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:center}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{color:var(--ghs-color-disabled);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.undo-dialog[_ngcontent-%COMP%] .menu.clear-menu[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .menu.clear-menu[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-text)}.undo-dialog[_ngcontent-%COMP%] .menu.clear-menu[_ngcontent-%COMP%] .state.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.undo-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));max-height:100%;overflow:auto}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;color:var(--ghs-color-white)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%] .revision[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;text-align:right;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%]:hover{filter:brightness(.5)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry.confirm[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry.disabled[_ngcontent-%COMP%]{pointer-events:none}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%] .debug[_ngcontent-%COMP%]{display:none}.undo-dialog[_ngcontent-%COMP%] .list.current[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid transparent;border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid transparent}.undo-dialog[_ngcontent-%COMP%] .list.current[_ngcontent-%COMP%] .entry[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-style:italic}.undo-dialog[_ngcontent-%COMP%] .list.current.has-undos[_ngcontent-%COMP%]{border-bottom-color:var(--ghs-color-gray)}.undo-dialog[_ngcontent-%COMP%] .list.current.has-redos[_ngcontent-%COMP%]{border-top-color:var(--ghs-color-gray)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-red)}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning.undo-offset[_ngcontent-%COMP%]{cursor:zoom-out}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning.undo-offset[_ngcontent-%COMP%]:hover{opacity:.7}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.undo-dialog[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-gray)}"]})),a})();const RZ=function(o){return[o]};function FZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.gameManager.stateManager.gameOffsetWarning=!1)}),t._UZ(1,"img",32)(2,"span",33),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","state.missing")("ghs-label-args",t.VKq(2,RZ,""+n.undoOffset))}}function qZ(o,a){if(1&o&&(t._UZ(0,"span",34),t.ALo(1,"slice")),2&o){const n=t.oxw(2);t.Q6J("ghs-label","state.info."+n.undoInfo[0])("ghs-label-args",t.Dn7(1,3,n.undoInfo,1,n.undoInfo.length))("ghs-label-empty",!0)}}function HZ(o,a){if(1&o&&(t._UZ(0,"span",34),t.ALo(1,"slice")),2&o){const n=t.oxw(2);t.Q6J("ghs-label","state.info."+n.redoInfo[0])("ghs-label-args",t.Dn7(1,3,n.redoInfo,1,n.redoInfo.length))("ghs-label-empty",!0)}}const Cw=function(o){return{denied:o}},Vf=function(o,a){return{disabled:o,denied:a}};function jZ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",35)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.scenario))}),t._UZ(3,"span",16),t.qZA()(),t.TgZ(4,"div",35)(5,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.section))}),t._UZ(6,"span",16),t.qZA()(),t.TgZ(7,"div",35)(8,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.monster_add))}),t._UZ(9,"span",16),t.qZA()(),t.TgZ(10,"div",35)(11,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.monster_remove))}),t._UZ(12,"span",16),t.qZA()(),t._UZ(13,"div",21),t.TgZ(14,"div",35)(15,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.character_add))}),t._UZ(16,"span",16),t.qZA()(),t.TgZ(17,"div",35)(18,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.character_remove))}),t._UZ(19,"span",16),t.qZA()(),t.TgZ(20,"div",35)(21,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.objective_add))}),t._UZ(22,"span",16),t.qZA()(),t.TgZ(23,"div",35)(24,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.objective_remove))}),t._UZ(25,"span",16),t.qZA()(),t._UZ(26,"div",21),t.TgZ(27,"div",36)(28,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.campaign))}),t._UZ(29,"span",16),t.qZA()(),t._UZ(30,"div",21),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(17,Cw,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.scenario)),t.xp6(2),t.Q6J("ghs-label","scenario.set"),t.xp6(1),t.Q6J("ngClass",t.WLB(19,Vf,!n.hasSections(),n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.scenario)),t.xp6(2),t.Q6J("ghs-label","section"),t.xp6(1),t.Q6J("ngClass",t.WLB(22,Vf,n.hasAllMonster(),n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters)),t.xp6(2),t.Q6J("ghs-label","monster.add"),t.xp6(1),t.Q6J("ngClass",t.WLB(25,Vf,0==n.monsters().length,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters)),t.xp6(2),t.Q6J("ghs-label","monster.remove"),t.xp6(2),t.Q6J("ngClass",t.VKq(28,Cw,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","character.add"),t.xp6(1),t.Q6J("ngClass",t.WLB(30,Vf,0==n.characters().length,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","character.remove"),t.xp6(1),t.Q6J("ngClass",t.VKq(33,Cw,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","objective.add"),t.xp6(1),t.Q6J("ngClass",t.WLB(35,Vf,0==n.objectives().length,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ghs-label","objective.remove"),t.xp6(4),t.Q6J("ghs-label","campaign")}}function BZ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setActive(i.SubMenu.datamanagement))}),t._UZ(3,"span",16),t.qZA()(),t.BQk()}2&o&&(t.xp6(3),t.Q6J("ghs-label","datamanagement"))}function zZ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.menu.connected"))}function GZ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connecting"))}function VZ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.menu.connect"))}function YZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",37),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.close())}),t._UZ(2,"img",38),t._uU(3,"\xa0 "),t._UZ(4,"span",16),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("routerLink","/"),t.xp6(3),t.Q6J("ghs-label","tools.backToGhs"))}function KZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",39),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.gameManager.stateManager.install())}),t._UZ(2,"img",40)(3,"span",16),t.qZA()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","app.install"))}function $Z(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",41)(1,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.update())}),t._uU(2,"<"),t._UZ(3,"span",16),t._uU(4,"(!)>"),t.qZA()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","update"))}const B6=function(o){return{disabled:o}};function WZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"div",12),t.YNc(2,FZ,3,4,"span",13),t.TgZ(3,"a",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.undo())}),t.TgZ(4,"span",15),t._UZ(5,"span",16),t.qZA(),t.YNc(6,qZ,2,7,"span",17),t.qZA(),t.TgZ(7,"span",18),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openUndoDialog(i))}),t._UZ(8,"img",19),t.qZA(),t.TgZ(9,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.redo())}),t._UZ(10,"span",16),t.YNc(11,HZ,2,7,"span",17),t.qZA()(),t._UZ(12,"div",21),t.YNc(13,jZ,31,38,"ng-container",22),t.TgZ(14,"div",23)(15,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.settings))}),t._UZ(16,"span",16),t.qZA()(),t.YNc(17,BZ,4,1,"ng-container",22),t._UZ(18,"div",21),t.TgZ(19,"div",23)(20,"a",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.server))}),t.YNc(21,zZ,2,1,"span",3),t.YNc(22,GZ,2,1,"span",3),t.YNc(23,VZ,2,1,"span",26),t.qZA()(),t._UZ(24,"div",21),t.TgZ(25,"div",23)(26,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.about))}),t._UZ(27,"span",16),t.qZA()(),t.TgZ(28,"div",23)(29,"a",27),t._UZ(30,"span",16),t.qZA()(),t._UZ(31,"div",21),t.YNc(32,YZ,5,2,"div",28),t.YNc(33,KZ,4,1,"div",28),t.TgZ(34,"div",23)(35,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.feedbackDialog())}),t._UZ(36,"img",29),t._uU(37,"\xa0 "),t._UZ(38,"span",16),t.qZA()(),t.YNc(39,$Z,5,1,"div",30),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.undoOffset&&n.gameManager.stateManager.gameOffsetWarning),t.xp6(1),t.Q6J("ngClass",t.VKq(19,B6,!n.gameManager.stateManager.undoPermission||n.undoOffset&&n.gameManager.stateManager.gameOffsetWarning||0==n.gameManager.stateManager.undos.length)),t.xp6(2),t.Q6J("ghs-label","state.undo"),t.xp6(1),t.Q6J("ngIf",n.undoInfo.length>0),t.xp6(3),t.Q6J("ngClass",t.VKq(21,B6,!n.gameManager.stateManager.redoPermission||0==n.gameManager.stateManager.redos.length)),t.xp6(1),t.Q6J("ghs-label","state.redo"),t.xp6(1),t.Q6J("ngIf",n.redoInfo.length>0),t.xp6(2),t.Q6J("ngIf",!n.standalone),t.xp6(3),t.Q6J("ghs-label","settings"),t.xp6(1),t.Q6J("ngIf",!n.standalone),t.xp6(3),t.Q6J("ngSwitch",n.gameManager.stateManager.wsState()),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.OPEN),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CONNECTING),t.xp6(5),t.Q6J("ghs-label","about"),t.xp6(3),t.Q6J("ghs-label","help"),t.xp6(2),t.Q6J("ngIf",n.standalone),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.installPrompt),t.xp6(5),t.Q6J("ghs-label","tools.feedback"),t.xp6(1),t.Q6J("ngIf",n.isUpdateAvailable())}}function XZ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-scenario-menu",42),t.NdJ("close",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t.qZA()}}function t3(o,a){1&o&&t._UZ(0,"ghs-section-menu")}function e3(o,a){1&o&&t._UZ(0,"ghs-character-menu")}function n3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-campaign-menu",42),t.NdJ("close",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t.qZA()}}function i3(o,a){if(1&o&&(t.TgZ(0,"span",47),t._uU(1,"\xa0 "),t.TgZ(2,"span"),t._uU(3,"["),t.qZA(),t._UZ(4,"span",16),t.TgZ(5,"span"),t._uU(6,"]"),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(4),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function o3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeCharacter(s))}),t._UZ(2,"img",45),t.TgZ(3,"span"),t._uU(4),t.qZA(),t.YNc(5,i3,7,1,"span",46),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Oqu(e.gameManager.characterManager.characterName(n,!0)),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function a3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllCharacters())}),t._uU(3," <"),t._UZ(4,"span",16),t._uU(5,"> "),t.qZA()(),t.YNc(6,o3,6,3,"div",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(4),t.Q6J("ghs-label","character.removeAll"),t.xp6(2),t.Q6J("ngForOf",n.characters())}}function s3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",48)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addObjectiveContainer())}),t._UZ(3,"img",49)(4,"span",16),t.qZA()(),t.TgZ(5,"div",23)(6,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addObjectiveContainer(!0))}),t._UZ(7,"img",50)(8,"span",16),t.qZA()()()}2&o&&(t.xp6(4),t.Q6J("ghs-label","objective.add"),t.xp6(4),t.Q6J("ghs-label","escort.add"))}function r3(o,a){1&o&&t._UZ(0,"img",49)}function c3(o,a){1&o&&t._UZ(0,"img",50)}function l3(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.title)}}function g3(o,a){if(1&o&&t._UZ(0,"span",16),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.objective."+n.name)}}function d3(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"("),t.qZA())}function h3(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,")"),t.qZA())}function u3(o,a){if(1&o&&(t.TgZ(0,"span",57),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Oqu(e.gameManager.toObjective(n).id+1)}}function _3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeObjective(s))}),t.YNc(2,r3,1,0,"img",52),t.YNc(3,c3,1,0,"img",53),t.YNc(4,l3,2,1,"span",22),t.YNc(5,g3,1,1,"span",54),t.YNc(6,d3,2,0,"span",22),t._UZ(7,"span",16),t.YNc(8,h3,2,0,"span",22),t._UZ(9,"span",55),t.YNc(10,u3,2,1,"span",56),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ngIf",!n.escort),t.xp6(1),t.Q6J("ngIf",n.escort),t.xp6(1),t.Q6J("ngIf",n.title),t.xp6(1),t.Q6J("ngIf",!n.title&&n.name),t.xp6(1),t.Q6J("ngIf",n.title||n.name),t.xp6(1),t.Q6J("ghs-label",n.escort?"escort":"objective"),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(2),t.Q6J("ngIf",e.gameManager.isObjective(n))}}function p3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",51)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllObjectives())}),t._uU(3," <"),t._UZ(4,"span",16),t._uU(5,"> "),t.qZA()(),t.YNc(6,_3,11,8,"div",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(4),t.Q6J("ghs-label","objective.removeAll"),t.xp6(2),t.Q6J("ngForOf",n.objectives())}}function f3(o,a){1&o&&t._UZ(0,"ghs-monster-menu")}function m3(o,a){if(1&o&&(t.TgZ(0,"span",60),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.hij("\xa0(",e.gameManager.entityManager.entities(n).length,")")}}function v3(o,a){if(1&o&&(t.TgZ(0,"span",47),t._uU(1,"\xa0["),t._UZ(2,"span",16),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function C3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"a",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeMonster(s))}),t._UZ(2,"span",16),t.YNc(3,m3,2,1,"span",59),t.YNc(4,v3,4,1,"span",46),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",e.gameManager.entityManager.entities(n).length>0),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function M3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",58)(1,"div",23)(2,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllMonsters())}),t._uU(3," <"),t._UZ(4,"span",16),t._uU(5,"> "),t.qZA()(),t.YNc(6,C3,5,3,"div",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(4),t.Q6J("ghs-label","monster.removeAll"),t.xp6(2),t.Q6J("ngForOf",n.monsters())}}function O3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-settings-menu",61),t.NdJ("setMenu",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setActive(i))}),t.qZA()}}function P3(o,a){1&o&&t._UZ(0,"ghs-debug-menu")}function y3(o,a){1&o&&t._UZ(0,"ghs-server-menu")}function b3(o,a){1&o&&t._UZ(0,"ghs-datamanagement-menu")}const w3=function(){return["Cephalofair Games"]},T3=function(){return[" AGPL3"]};function Z3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",62)(1,"div",23),t._UZ(2,"p",33),t.qZA(),t.TgZ(3,"div",63)(4,"div",64)(5,"div",23)(6,"a",65),t._uU(7),t.qZA()()(),t.TgZ(8,"div",64)(9,"div",23)(10,"p")(11,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update(!0))}),t._UZ(12,"span",16),t.qZA()()()()(),t.TgZ(13,"div",23)(14,"div",63)(15,"div",64)(16,"p")(17,"a",66),t._UZ(18,"span",16),t.qZA()()(),t.TgZ(19,"div",64)(20,"p")(21,"a",67),t._UZ(22,"span",16),t.qZA()()(),t.TgZ(23,"div",64),t._UZ(24,"p",33),t.qZA()()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","about.ip")("ghs-label-args",t.DdM(9,w3)),t.xp6(4),t.Q6J("href","https://github.com/Lurkars/gloomhavensecretariat/releases/tag/v"+n.version,t.LSH),t.xp6(1),t.hij("Gloomhaven Secretariat v",n.version,""),t.xp6(5),t.Q6J("ghs-label","about.forceUpdate"),t.xp6(6),t.Q6J("ghs-label","about.support"),t.xp6(4),t.Q6J("ghs-label","about.sourceCode"),t.xp6(2),t.Q6J("ghs-label","about.license")("ghs-label-args",t.DdM(10,T3))}}function A3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",68),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setActive(i.SubMenu.main))}),t._UZ(1,"img",38),t.qZA()}2&o&&t.Q6J("ghs-label","menu.backToMain")("ghs-label-attribute","title")}var cg=function(o){return o[o.main=0]="main",o[o.scenario=1]="scenario",o[o.section=2]="section",o[o.monster_add=3]="monster_add",o[o.monster_remove=4]="monster_remove",o[o.character_add=5]="character_add",o[o.character_remove=6]="character_remove",o[o.objective_add=7]="objective_add",o[o.objective_remove=8]="objective_remove",o[o.settings=9]="settings",o[o.debug=10]="debug",o[o.server=11]="server",o[o.datamanagement=12]="datamanagement",o[o.about=13]="about",o[o.campaign=14]="campaign",o}(cg||{});let z6=(()=>{var o;class a{constructor(e,i,s,l){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"swUpdate",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"active",cg.main),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"hasSpoilers",he.Ul),(0,_.Z)(this,"isSpoiled",he.NB),(0,_.Z)(this,"notSpoiled",he.q_),(0,_.Z)(this,"version","0.80.2"),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"undoInfo",[]),(0,_.Z)(this,"undoOffset",0),(0,_.Z)(this,"redoInfo",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.swUpdate=l,this.active=e.subMenu,this.standalone=e.standalone,this.dialogRef.overlayRef.hostElement.style.zIndex="3000",this.dialogRef.overlayRef.backdropElement&&(this.dialogRef.overlayRef.backdropElement.style.zIndex="3000")}ngOnInit(){this.updateUndoRedo(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.updateUndoRedo()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}close(){this.dialogRef.close()}updateUndoRedo(){const e=d.v.stateManager.undos,i=d.v.stateManager.redos,s=d.v.stateManager.undoInfos;e.length>0&&s.length>=e.length?(this.undoInfo=s[e.length-1],this.undoOffset=d.v.game.revision-(d.v.game.revisionOffset||0)-(e[e.length-1].revision-(e[e.length-1].revisionOffset||0))-1,this.undoInfo&&this.undoInfo.length>1&&"serverSync"==this.undoInfo[0]?this.undoInfo="setInitiative"==this.undoInfo[1]&&this.undoInfo.length>3?["serverSync",R.r.getLabel("state.info."+this.undoInfo[1],[this.undoInfo[2],""])]:["serverSync",R.r.getLabel("state.info."+this.undoInfo[1],this.undoInfo.slice(2))]:this.undoInfo&&1==this.undoInfo.length&&"serverSync"==this.undoInfo[0]?this.undoInfo=["serverSync",""]:this.undoInfo||(this.undoInfo=["unknown"])):(this.undoInfo=[],this.undoOffset=0),i.length>0&&s.length>e.length?(this.redoInfo=s[e.length],this.redoInfo&&this.redoInfo.length>1&&"serverSync"==this.redoInfo[0]?this.redoInfo="setInitiative"==this.redoInfo[1]&&this.redoInfo.length>3?["serverSync",R.r.getLabel("state.info."+this.redoInfo[1],[this.redoInfo[2],""])]:["serverSync",R.r.getLabel("state.info."+this.redoInfo[1],this.redoInfo.slice(2))]:this.redoInfo&&1==this.redoInfo.length&&"serverSync"==this.redoInfo[0]?this.redoInfo=["serverSync",""]:this.redoInfo||(this.redoInfo=["unknown"])):this.redoInfo=[]}openUndoDialog(e){this.dialog.open(QZ,{panelClass:"dialog"}),this.close(),e.preventDefault(),e.stopPropagation()}setActive(e){this.active=e}hasSections(){return d.v.editionData.some(e=>e.edition==d.v.currentEdition()&&e.sections&&e.sections.length>0)}characters(){return d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e).sort((e,i)=>{const s=e.title.toLowerCase()||R.r.getLabel("data.character."+e.name).toLowerCase(),l=i.title.toLowerCase()||R.r.getLabel("data.character."+i.name).toLowerCase();return s>l?1:se instanceof qe.CH||e instanceof Nn.k).map(e=>e).sort((e,i)=>{const s=(e.title?e.title:R.r.getLabel(e.name?"data.objective."+e.name:e.escort?"escort":"objective")).toLowerCase(),l=(i.title?i.title:R.r.getLabel(i.name?"data.objective."+i.name:i.escort?"escort":"objective")).toLowerCase();return s>l?1:se instanceof Ze.Q).map(e=>e).sort((e,i)=>{const s=R.r.getLabel("data.monster."+e.name).toLowerCase(),l=R.r.getLabel("data.monster."+i.name).toLowerCase();return s>l?1:s!(e instanceof oe.z)),this.close(),d.v.stateManager.after()}addObjectiveContainer(e=!1){d.v.stateManager.before("addObjective"+(e?".escort":"")),d.v.objectiveManager.addObjective(new ft("",e?3:7,e)),this.close(),d.v.stateManager.after()}removeObjective(e){d.v.stateManager.before("removeObjective",e.title||e.name),e instanceof qe.CH?d.v.characterManager.removeObjective(e):d.v.objectiveManager.removeObjective(e),0==this.objectives().length&&this.close(),d.v.stateManager.after()}removeAllObjectives(){d.v.stateManager.before("removeAllObjectives"),d.v.game.figures=d.v.game.figures.filter(e=>!(e instanceof qe.CH||e instanceof Nn.k)),this.close(),d.v.stateManager.after()}removeMonster(e){d.v.stateManager.before("removeMonster","data.monster."+e.name),d.v.monsterManager.removeMonster(e),0==this.monsters().length&&this.close(),d.v.stateManager.after()}removeAllMonsters(){d.v.stateManager.before("removeAllMonster"),d.v.game.figures=d.v.game.figures.filter(e=>!(e instanceof Ze.Q)),this.close(),d.v.stateManager.after()}hasAllMonster(){return d.v.monstersData().every(e=>d.v.game.figures.some(i=>i instanceof ot.A&&i.name==e.name&&i.edition==e.edition))}isUpdateAvailable(){return d.v.stateManager.hasUpdate}update(e=!1){(this.isUpdateAvailable()||e)&&(this.swUpdate.isEnabled?this.swUpdate.activateUpdate().then(()=>{this.clearAndRefresh()}):this.clearAndRefresh())}clearAndRefresh(){return(0,J.Z)(function*(){if("caches"in window){const e=yield caches.keys();yield Promise.all(e.map(function(){var i=(0,J.Z)(function*(s){return yield caches.delete(s)});return function(s){return i.apply(this,arguments)}}()))}window.location.reload()})()}feedbackDialog(){this.dialog.open(ye,{panelClass:"dialog"}),this.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te),t.Y36(Gg))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-main-menu"]],decls:17,vars:17,consts:[[1,"scroll-container",3,"ngSwitch"],["class","menu-container main two-column",4,"ngSwitchCase"],[3,"close",4,"ngSwitchCase"],[4,"ngSwitchCase"],["class","menu-container character-remove",4,"ngSwitchCase"],["class","menu-container objective-add",4,"ngSwitchCase"],["class","menu-container objective-remove",4,"ngSwitchCase"],["class","menu-container monster-remove",4,"ngSwitchCase"],[3,"setMenu",4,"ngSwitchCase"],["class","menu-container about",4,"ngSwitchCase"],["class","back",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],[1,"menu-container","main","two-column"],[1,"line","state-container","span"],["class","warning",3,"click",4,"ngIf"],[1,"state","undo",3,"ngClass","click"],[1,"undo-text"],[3,"ghs-label"],["class","info text-white",3,"ghs-label","ghs-label-args","ghs-label-empty",4,"ngIf"],[1,"undo-dialog",3,"click"],["src","./assets/images/long-rest.svg",1,"ghs-svg"],[1,"state","redo",3,"ngClass","click"],[1,"separator"],[4,"ngIf"],[1,"line"],[3,"click"],[3,"ngSwitch","click"],[4,"ngSwitchDefault"],["href","https://help.gloomhaven-secretariat.de","target","_blank"],["class","line",4,"ngIf"],["src","./assets/images/hint.svg",1,"ghs-svg"],["class","line separator",4,"ngIf"],[1,"warning",3,"click"],["src","./assets/images/warning.svg"],[3,"ghs-label","ghs-label-args"],[1,"info","text-white",3,"ghs-label","ghs-label-args","ghs-label-empty"],[1,"line",3,"ngClass"],[1,"line","span"],[3,"routerLink","click"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"install",3,"click"],["src","./assets/images/install.svg",1,"ghs-svg"],[1,"line","separator"],[3,"close"],[1,"menu-container","character-remove"],["class","line",4,"ngFor","ngForOf"],[1,"icon",3,"src"],["class","edition",4,"ngIf"],[1,"edition"],[1,"menu-container","objective-add"],["src","./assets/images/objective/objective.svg",1,"icon"],["src","./assets/images/objective/escort.svg",1,"icon"],[1,"menu-container","objective-remove"],["class","icon","src","./assets/images/objective/objective.svg",4,"ngIf"],["class","icon","src","./assets/images/objective/escort.svg",4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"spacer"],["class","objective-marker",4,"ngIf"],[1,"objective-marker"],[1,"menu-container","monster-remove"],["class","count",4,"ngIf"],[1,"count"],[3,"setMenu"],[1,"menu-container","about"],[1,"columns"],[1,"column"],["target","_blank",3,"href"],["href","https://ko-fi.com/lurkars","target","_blank"],["href","https://github.com/Lurkars/gloomhavensecretariat","target","_blank"],[1,"back",3,"ghs-label","ghs-label-attribute","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,WZ,40,23,"div",1),t.YNc(2,XZ,1,0,"ghs-scenario-menu",2),t.YNc(3,t3,1,0,"ghs-section-menu",3),t.YNc(4,e3,1,0,"ghs-character-menu",3),t.YNc(5,n3,1,0,"ghs-campaign-menu",2),t.YNc(6,a3,7,2,"div",4),t.YNc(7,s3,9,2,"div",5),t.YNc(8,p3,7,2,"div",6),t.YNc(9,f3,1,0,"ghs-monster-menu",3),t.YNc(10,M3,7,2,"div",7),t.YNc(11,O3,1,0,"ghs-settings-menu",8),t.YNc(12,P3,1,0,"ghs-debug-menu",3),t.YNc(13,y3,1,0,"ghs-server-menu",3),t.YNc(14,b3,1,0,"ghs-datamanagement-menu",3),t.YNc(15,Z3,25,11,"div",9),t.qZA(),t.YNc(16,A3,2,2,"div",10)),2&e&&(t.Q6J("ngSwitch",i.active),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.main),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.scenario),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.section),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.character_add),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.campaign),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.character_remove),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.objective_add),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.objective_remove),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.monster_add),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.monster_remove),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.settings),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.debug),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.server),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.datamanagement),t.xp6(1),t.Q6J("ngSwitchCase",i.SubMenu.about),t.xp6(1),t.Q6J("ngIf",i.active!=i.SubMenu.main))},styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}']})),a})();function S3(o,a){1&o&&t._UZ(0,"img",31)}function E3(o,a){1&o&&t._UZ(0,"img",31)}function D3(o,a){1&o&&t._UZ(0,"img",31)}const nn=function(o){return{disabled:o}};function I3(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",7)(2,"div",8)(3,"div",3)(4,"label")(5,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAbilities(!i.settingsManager.settings.abilities))}),t.qZA(),t._UZ(6,"span",2),t.qZA(),t._UZ(7,"img",10),t.TgZ(8,"span",5),t._UZ(9,"span",6),t.qZA()()(),t.TgZ(10,"div",8)(11,"div",3)(12,"label",11)(13,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCalculate(!i.settingsManager.settings.calculate))}),t.qZA(),t._UZ(14,"span",2),t.qZA(),t._UZ(15,"img",10),t.TgZ(16,"span",5),t._UZ(17,"span",6),t.qZA()()(),t.TgZ(18,"div",8)(19,"div",3)(20,"label",11)(21,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCalculateStats(!i.settingsManager.settings.calculateStats))}),t.qZA(),t._UZ(22,"span",2),t.qZA(),t._UZ(23,"img",10),t.TgZ(24,"span",5),t._UZ(25,"span",6),t.qZA()()(),t.TgZ(26,"div",8)(27,"div",3)(28,"label",11)(29,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCalculateShieldStats(!i.settingsManager.settings.calculateShieldStats))}),t.qZA(),t._UZ(30,"span",2),t.qZA(),t._UZ(31,"img",10),t.TgZ(32,"span",5),t._UZ(33,"span",6),t.qZA()()(),t.TgZ(34,"div",8)(35,"div",3)(36,"label",11)(37,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setInteractiveAbilities(!i.settingsManager.settings.interactiveAbilities))}),t.qZA(),t._UZ(38,"span",2),t.qZA(),t._UZ(39,"img",10),t.TgZ(40,"span",5),t._UZ(41,"span",6),t.qZA()()(),t.TgZ(42,"div",8)(43,"div",3)(44,"label",11)(45,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAbilityReveal(!i.settingsManager.settings.abilityReveal))}),t.qZA(),t._UZ(46,"span",2),t.qZA(),t._UZ(47,"img",10),t.TgZ(48,"span",5),t._UZ(49,"span",6),t.qZA()()()(),t.TgZ(50,"div",7)(51,"div",8)(52,"div",3)(53,"label",11)(54,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setCombineSummonAction(!i.settingsManager.settings.combineSummonAction))}),t.qZA(),t._UZ(55,"span",2),t.qZA(),t._UZ(56,"img",10),t.TgZ(57,"span",5),t._UZ(58,"span",6),t.qZA()()(),t.TgZ(59,"div",8)(60,"div",3)(61,"label",11)(62,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAbilityNumbers(!i.settingsManager.settings.abilityNumbers))}),t.qZA(),t._UZ(63,"span",2),t.qZA(),t._UZ(64,"img",10),t.TgZ(65,"span",5),t._UZ(66,"span",6),t.qZA()()(),t.TgZ(67,"div",8)(68,"div",3)(69,"label",11)(70,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setShowExpandedAbilityCard(!i.settingsManager.settings.showExpandedAbilityCard))}),t.qZA(),t._UZ(71,"span",2),t.qZA(),t._UZ(72,"img",10),t.TgZ(73,"span",5),t._UZ(74,"span",6),t.qZA()()(),t.TgZ(75,"div",8)(76,"div",3)(77,"label",11)(78,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setShowFullAbilityCard(!i.settingsManager.settings.showFullAbilityCard))}),t.qZA(),t._UZ(79,"span",2),t.qZA(),t._UZ(80,"img",10),t.TgZ(81,"span",5),t._UZ(82,"span",6),t.qZA()()(),t.TgZ(83,"div",8)(84,"div",3)(85,"label")(86,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setHideStats(!i.settingsManager.settings.hideStats))}),t.qZA(),t._UZ(87,"span",2),t.qZA(),t._UZ(88,"img",10),t.TgZ(89,"span",5),t._UZ(90,"span",6),t.qZA()()(),t.TgZ(91,"div",8)(92,"div",3)(93,"label")(94,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAddAllMonsters(!i.settingsManager.settings.addAllMonsters))}),t.qZA(),t._UZ(95,"span",2),t.qZA(),t._UZ(96,"img",10),t.TgZ(97,"span",5),t._UZ(98,"span",6),t.qZA()()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(5),t.Q6J("checked",n.settingsManager.settings.abilities),t.xp6(1),t.Q6J("ghs-label","settings.abilities"),t.xp6(3),t.Q6J("ghs-label","settings.abilities.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(45,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.calculate),t.xp6(1),t.Q6J("ghs-label","settings.calc"),t.xp6(3),t.Q6J("ghs-label","settings.calc.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(47,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.calculateStats),t.xp6(1),t.Q6J("ghs-label","settings.calculateStats"),t.xp6(3),t.Q6J("ghs-label","settings.calculateStats.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(49,nn,!n.settingsManager.settings.abilities||!n.settingsManager.settings.calculateStats)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.calculateStats&&n.settingsManager.settings.calculateShieldStats),t.xp6(1),t.Q6J("ghs-label","settings.calculateShieldStats"),t.xp6(3),t.Q6J("ghs-label","settings.calculateShieldStats.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(51,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.interactiveAbilities),t.xp6(1),t.Q6J("ghs-label","settings.interactiveAbilities"),t.xp6(3),t.Q6J("ghs-label","settings.interactiveAbilities.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(53,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.abilityReveal),t.xp6(1),t.Q6J("ghs-label","settings.abilityReveal"),t.xp6(3),t.Q6J("ghs-label","settings.abilityReveal.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(55,nn,!n.settingsManager.settings.abilities||!n.settingsManager.settings.interactiveAbilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.combineSummonAction&&n.settingsManager.settings.abilities&&n.settingsManager.settings.interactiveAbilities),t.xp6(1),t.Q6J("ghs-label","settings.combineSummonAction"),t.xp6(3),t.Q6J("ghs-label","settings.combineSummonAction.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(57,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.abilityNumbers),t.xp6(1),t.Q6J("ghs-label","settings.abilityNumbers"),t.xp6(3),t.Q6J("ghs-label","settings.abilityNumbers.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(59,nn,!n.settingsManager.settings.abilities)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&n.settingsManager.settings.showExpandedAbilityCard),t.xp6(1),t.Q6J("ghs-label","settings.showExpandedAbilityCard"),t.xp6(3),t.Q6J("ghs-label","settings.showExpandedAbilityCard.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(61,nn,!n.settingsManager.settings.abilities||n.settingsManager.settings.showExpandedAbilityCard)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.abilities&&(n.settingsManager.settings.showFullAbilityCard||n.settingsManager.settings.showExpandedAbilityCard)),t.xp6(1),t.Q6J("ghs-label","settings.showFullAbilityCard"),t.xp6(3),t.Q6J("ghs-label","settings.showFullAbilityCard.hint"),t.xp6(4),t.Q6J("checked",n.settingsManager.settings.hideStats),t.xp6(1),t.Q6J("ghs-label","settings.hideStats"),t.xp6(3),t.Q6J("ghs-label","settings.hideStats.hint"),t.xp6(4),t.Q6J("checked",n.settingsManager.settings.addAllMonsters),t.xp6(1),t.Q6J("ghs-label","settings.addAllMonsters"),t.xp6(3),t.Q6J("ghs-label","settings.addAllMonsters.hint")}}function N3(o,a){1&o&&t._UZ(0,"img",31)}function J3(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",8)(2,"div",3)(3,"label",11)(4,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setEliteFirst(!i.settingsManager.settings.eliteFirst))}),t.qZA(),t._UZ(5,"span",2),t.qZA(),t._UZ(6,"img",10),t.TgZ(7,"span",5),t._UZ(8,"span",6),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ngClass",t.VKq(4,nn,n.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.eliteFirst&&!n.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.eliteFirst"),t.xp6(3),t.Q6J("ghs-label","settings.eliteFirst.hint")}}function U3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",7)(1,"div",8)(2,"div",3)(3,"label",11)(4,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAutomaticStandeesDialog(!i.settingsManager.settings.automaticStandeesDialog))}),t.qZA(),t._UZ(5,"span",2),t.qZA(),t._UZ(6,"img",10),t.TgZ(7,"span",5),t._UZ(8,"span",6),t.qZA()()(),t.TgZ(9,"div",8)(10,"div",3)(11,"label",11)(12,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setRandomStandees(!i.settingsManager.settings.randomStandees))}),t.qZA(),t._UZ(13,"span",2),t.qZA(),t._UZ(14,"img",10),t.TgZ(15,"span",5),t._UZ(16,"span",6),t.qZA()()(),t.TgZ(17,"div",8)(18,"div",3)(19,"label")(20,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setDisableStandees(!i.settingsManager.settings.disableStandees))}),t.qZA(),t._UZ(21,"span",2),t.qZA(),t._UZ(22,"img",10),t.TgZ(23,"span",5),t._UZ(24,"span",6),t.qZA()()()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ngClass",t.VKq(11,nn,!n.settingsManager.settings.scenarioRooms||n.settingsManager.settings.disableStandees||!n.settingsManager.settings.automaticStandees||n.settingsManager.settings.randomStandees)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.automaticStandeesDialog&&n.settingsManager.settings.automaticStandees&&!n.settingsManager.settings.disableStandees&&!n.settingsManager.settings.randomStandees&&n.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.automaticStandeesDialog"),t.xp6(3),t.Q6J("ghs-label","settings.automaticStandeesDialog.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(13,nn,n.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",n.settingsManager.settings.randomStandees&&!n.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.randomStandees"),t.xp6(3),t.Q6J("ghs-label","settings.randomStandees.hint"),t.xp6(4),t.Q6J("checked",n.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.disableStandees"),t.xp6(3),t.Q6J("ghs-label","settings.disableStandees.hint")}}function L3(o,a){1&o&&t._UZ(0,"img",31)}const G6=function(o){return{immunity:o}},V6=function(o){return{right:o}};function Q3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3)(1,"div",32),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleApplyConditionsExclude(s))}),t._UZ(2,"img",33),t.qZA(),t._UZ(3,"img",10),t.TgZ(4,"span",34),t._UZ(5,"span",6),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(4,G6,-1!=i.settingsManager.settings.applyConditionsExcludes.indexOf(n))),t.xp6(1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH),t.xp6(2),t.Q6J("ngClass",t.VKq(6,V6,e>2)),t.xp6(1),t.Q6J("ghs-label","settings.applyConditions.hint."+n)}}function R3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3)(1,"div",32),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleActiveApplyConditionsExclude(s))}),t._UZ(2,"img",33),t.qZA(),t._UZ(3,"img",10),t.TgZ(4,"span",34),t._UZ(5,"span",6),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(4,G6,-1!=i.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n))),t.xp6(1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n+".svg",t.LSH),t.xp6(2),t.Q6J("ngClass",t.VKq(6,V6,e>2)),t.xp6(1),t.Q6J("ghs-label","settings.activeApplyConditions.hint."+n)}}function F3(o,a){1&o&&t._UZ(0,"img",31)}function q3(o,a){1&o&&t._UZ(0,"img",31)}function H3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"div",3)(2,"label")(3,"input",9),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setDisableWakeLock(!i.settingsManager.settings.disableWakeLock))}),t.qZA(),t._UZ(4,"span",2),t.qZA(),t._UZ(5,"img",10),t.TgZ(6,"span",5),t._UZ(7,"span",6),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("checked",n.settingsManager.settings.disableWakeLock),t.xp6(1),t.Q6J("ghs-label","settings.disableWakeLock"),t.xp6(3),t.Q6J("ghs-label","settings.disableWakeLock.hint")}}function j3(o,a){1&o&&t._UZ(0,"img",35)}function B3(o,a){1&o&&t._UZ(0,"div",38),2&o&&t.Q6J("ghs-label","settings.maxUndo.warning.firefox")}function z3(o,a){if(1&o&&(t.TgZ(0,"div",5)(1,"div",36),t._UZ(2,"div",2)(3,"br"),t.YNc(4,B3,1,1,"div",37),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","settings.maxUndo.warning"),t.xp6(2),t.Q6J("ngIf",n.platform.FIREFOX)}}function G3(o,a){1&o&&t._UZ(0,"img",31)}function V3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"label",11)(2,"input",9),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.settingsManager.setLocale(s))}),t.qZA(),t._UZ(3,"span",2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(3,nn,e.settingsManager.settings.locale==n)),t.xp6(1),t.Q6J("checked",e.settingsManager.settings.locale==n),t.xp6(1),t.Q6J("ghs-label","settings.locale."+n)}}function Y3(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"label",11)(2,"input",9),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.settingsManager.setTheme(s))}),t.qZA(),t._UZ(3,"span",2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(3,nn,e.settingsManager.settings.theme==n)),t.xp6(1),t.Q6J("checked",e.settingsManager.settings.theme==n),t.xp6(1),t.Q6J("ghs-label","settings.theme."+n)}}const K3=function(o){return{connected:o}},$3=function(){return["default","fh","modern"]};let W3=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"platform",void 0),(0,_.Z)(this,"setMenu",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"storageManager",Pt.j),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"wakeLock",void 0),(0,_.Z)(this,"applyConditionsExcludes",[]),(0,_.Z)(this,"activeApplyConditionsExcludes",[]),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"doubleClick",null),this.platform=e,this.wakeLock="wakeLock"in navigator,Object.keys(re.fT).forEach(i=>{const s=new re.gP(i);(-1!=s.types.indexOf(re.CP.turn)||-1!=s.types.indexOf(re.CP.afterTurn))&&this.applyConditionsExcludes.push(s.name),-1!=s.types.indexOf(re.CP.apply)&&this.activeApplyConditionsExcludes.push(s.name)})}toggleApplyConditionsExclude(e){let i=R.r.settings.applyConditionsExcludes.indexOf(e);-1==i?R.r.settings.applyConditionsExcludes.push(e):R.r.settings.applyConditionsExcludes.splice(i,1),R.r.storeSettings()}toggleActiveApplyConditionsExclude(e){let i=R.r.settings.activeApplyConditionsExcludes.indexOf(e);-1==i?R.r.settings.activeApplyConditionsExcludes.push(e):R.r.settings.activeApplyConditionsExcludes.splice(i,1),R.r.storeSettings()}zoomOut(e=!1){this.zoom(5,e)}zoomIn(e=!1){this.zoom(-5,e)}zoom(e,i){let s=+window.getComputedStyle(document.body).getPropertyValue("--ghs-factor");s+=e,this.setZoom(s,e,i)}setZoom(e,i,s){if(R.r.settings.zoom!=e){if(document.body.style.setProperty("--ghs-factor",e+""),!s){const l=+window.getComputedStyle(document.body).getPropertyValue("min-width").replace("px","");i<0&&l>=window.innerWidth&&(e-=i,document.body.style.setProperty("--ghs-factor",e+""))}R.r.setZoom(e)}}resetZoom(){this.setZoom(100,0,!0)}updateBarsize(e){document.body.style.setProperty("--ghs-barsize",e.target.value+"")}setBarsize(e){R.r.setBarsize(e.target.value),document.body.style.setProperty("--ghs-barsize",R.r.settings.barsize+"")}resetBarsize(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,R.r.setBarsize(1),document.body.style.setProperty("--ghs-barsize",R.r.settings.barsize+"")):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.doubleClick=null)},200)}updateFontsize(e){document.body.style.setProperty("--ghs-fontsize",e.target.value+"")}setFontsize(e){R.r.setFontsize(e.target.value),document.body.style.setProperty("--ghs-fontsize",R.r.settings.fontsize+"")}resetFontsize(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,R.r.setFontsize(1),document.body.style.setProperty("--ghs-fontsize",R.r.settings.fontsize+"")):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.doubleClick=null)},200)}updateGlobalFontsize(e){document.body.style.setProperty("--ghs-global-fontsize",e.target.value+"")}setGlobalFontsize(e){R.r.setGlobalFontsize(e.target.value),document.body.style.setProperty("--ghs-global-fontsize",R.r.settings.globalFontsize+"")}resetGlobalFontsize(e){this.doubleClick?(clearTimeout(this.doubleClick),this.doubleClick=null,R.r.setGlobalFontsize(1),document.body.style.setProperty("--ghs-global-fontsize",R.r.settings.globalFontsize+"")):this.doubleClick=setTimeout(()=>{this.doubleClick&&(this.doubleClick=null)},200)}setTheme(e){R.r.setTheme(e.target.value)}fullscreen(){R.r.setFullscreen(!R.r.settings.fullscreen),R.r.settings.fullscreen?document.body.requestFullscreen():document.exitFullscreen()}togglePortraitMode(){R.r.setPortraitMode(!R.r.settings.portraitMode),R.r.settings.portraitMode?document.body.classList.add("portrait-mode"):document.body.classList.remove("portrait-mode")}helperDefaults(){R.r.settings.abilityNumbers=!1,R.r.settings.activeApplyConditions=!1,R.r.settings.activeStandees=!1,R.r.settings.activeSummons=!1,R.r.settings.applyConditions=!1,R.r.settings.applyLongRest=!1,R.r.settings.allyAttackModifierDeck=!1,R.r.settings.automaticUnlocking=!1,R.r.settings.automaticStandees=!1,R.r.settings.autoscroll=!1,R.r.settings.battleGoals=!1,R.r.settings.calculate=!0,R.r.settings.calculateStats=!1,R.r.settings.characterAttackModifierDeck=!1,R.r.settings.characterIdentities=!1,R.r.settings.characterItems=!1,R.r.settings.characterHandSize=!1,R.r.settings.characterSheet=!1,R.r.settings.disabledTurnConfirmation=!0,R.r.settings.disableStandees=!1,R.r.settings.dragValues=!0,R.r.settings.eliteFirst=!0,R.r.settings.expireConditions=!1,R.r.settings.fhStyle=!1,R.r.settings.hideAbsent=!1,R.r.settings.hideStats=!0,R.r.settings.hints=!0,R.r.settings.initiativeRequired=!0,R.r.settings.initiativeRequired=!0,R.r.settings.lootDeck=!1,R.r.settings.moveElements=!0,R.r.settings.partySheet=!1,R.r.settings.randomStandees=!1,R.r.settings.scenarioRooms=!1,R.r.settings.standeeStats=!1,R.r.settings.theme="default",R.r.storeSettings()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Xn.t4))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-settings-menu"]],outputs:{setMenu:"setMenu"},decls:663,vars:344,consts:[[1,"menu-container","two-column","settings",3,"ngClass"],[1,"line","title","span"],[3,"ghs-label"],[1,"hint-container"],["src","./assets/images/sync-settings.svg","class","hint-trigger ghs-svg sync-settings",4,"ngIf"],[1,"hint"],[1,"text",3,"ghs-label"],[1,"column"],[1,"line"],["type","checkbox",3,"checked","change"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg"],[3,"ngClass"],[4,"ngIf"],["class","column",4,"ngIf"],[1,"line",3,"ngClass"],[1,"condition-list"],["class","hint-container",4,"ngFor","ngForOf"],[1,"separator"],["ghs-pointer-input","",3,"singleClick","doubleClick"],[3,"click"],["class","line",4,"ngIf"],["type","range","min","0.1","step","0.1","max","2",3,"value","change","input"],[1,"hint-container","warning"],[1,"label"],["type","number","min","0",3,"value","max","size","ghs-label","ghs-label-attribute","keyup","change"],["maxUndo",""],["src","./assets/images/warning.svg","class","hint-trigger ghs-svg",4,"ngIf"],["class","hint",4,"ngIf"],[1,"line","disabled"],[1,"line","title"],["class","line",4,"ngFor","ngForOf"],["src","./assets/images/sync-settings.svg",1,"hint-trigger","ghs-svg","sync-settings"],[1,"condition",3,"ngClass","click"],[3,"src"],[1,"hint",3,"ngClass"],["src","./assets/images/warning.svg",1,"hint-trigger","ghs-svg"],[1,"text"],["class","firefox",3,"ghs-label",4,"ngIf"],[1,"firefox",3,"ghs-label"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1)(2,"label"),t._UZ(3,"span",2),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,S3,1,0,"img",4),t.TgZ(6,"span",5),t._UZ(7,"span",6),t.qZA()()(),t.TgZ(8,"div",7)(9,"div",8)(10,"div",3)(11,"label")(12,"input",9),t.NdJ("change",function(){return i.settingsManager.setScenarioRooms(!i.settingsManager.settings.scenarioRooms)}),t.qZA(),t._UZ(13,"span",2),t.qZA(),t._UZ(14,"img",10),t.TgZ(15,"span",5),t._UZ(16,"span",6),t.qZA()()(),t.TgZ(17,"div",8)(18,"div",3)(19,"label")(20,"input",9),t.NdJ("change",function(){return i.settingsManager.setScenarioRules(!i.settingsManager.settings.scenarioRules)}),t.qZA(),t._UZ(21,"span",2),t.qZA(),t._UZ(22,"img",10),t.TgZ(23,"span",5),t._UZ(24,"span",6),t.qZA()()()(),t.TgZ(25,"div",7)(26,"div",8)(27,"div",3)(28,"label",11)(29,"input",9),t.NdJ("change",function(){return i.settingsManager.setTreasures(!i.settingsManager.settings.treasures)}),t.qZA(),t._UZ(30,"span",2),t.qZA(),t._UZ(31,"img",10),t.TgZ(32,"span",5),t._UZ(33,"span",6),t.qZA()()(),t.TgZ(34,"div",8)(35,"div",3)(36,"label",11)(37,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisabledTurnConfirmation(!i.settingsManager.settings.disabledTurnConfirmation)}),t.qZA(),t._UZ(38,"span",2),t.qZA(),t._UZ(39,"img",10),t.TgZ(40,"span",5),t._UZ(41,"span",6),t.qZA()()()(),t.TgZ(42,"div",1)(43,"label"),t._UZ(44,"span",2),t.qZA(),t.TgZ(45,"div",3),t.YNc(46,E3,1,0,"img",4),t.TgZ(47,"span",5),t._UZ(48,"span",6),t.qZA()()(),t.TgZ(49,"div",7)(50,"div",8)(51,"div",3)(52,"label")(53,"input",9),t.NdJ("change",function(){return i.settingsManager.setInitiativeRequired(!i.settingsManager.settings.initiativeRequired)}),t.qZA(),t._UZ(54,"span",2),t.qZA(),t._UZ(55,"img",10),t.TgZ(56,"span",5),t._UZ(57,"span",6),t.qZA()()(),t.TgZ(58,"div",8)(59,"div",3)(60,"label")(61,"input",9),t.NdJ("change",function(){return i.settingsManager.setHideAbsent(!i.settingsManager.settings.hideAbsent)}),t.qZA(),t._UZ(62,"span",2),t.qZA(),t._UZ(63,"img",10),t.TgZ(64,"span",5),t._UZ(65,"span",6),t.qZA()()(),t.TgZ(66,"div",8)(67,"div",3)(68,"label",11)(69,"input",9),t.NdJ("change",function(){return i.settingsManager.setTreasuresLoot(!i.settingsManager.settings.treasuresLoot)}),t.qZA(),t._UZ(70,"span",2),t.qZA(),t._UZ(71,"img",10),t.TgZ(72,"span",5),t._UZ(73,"span",6),t.qZA()()(),t.TgZ(74,"div",8)(75,"div",3)(76,"label")(77,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyLongRest(!i.settingsManager.settings.applyLongRest)}),t.qZA(),t._UZ(78,"span",2),t.qZA(),t._UZ(79,"img",10),t.TgZ(80,"span",5),t._UZ(81,"span",6),t.qZA()()(),t.TgZ(82,"div",8)(83,"div",3)(84,"label",11)(85,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyRetirement(!i.settingsManager.settings.applyRetirement)}),t.qZA(),t._UZ(86,"span",2),t.qZA(),t._UZ(87,"img",10),t.TgZ(88,"span",5),t._UZ(89,"span",6),t.qZA()()(),t.TgZ(90,"div",8)(91,"div",3)(92,"label")(93,"input",9),t.NdJ("change",function(){return i.settingsManager.setActiveSummons(!i.settingsManager.settings.activeSummons)}),t.qZA(),t._UZ(94,"span",2),t.qZA(),t._UZ(95,"img",10),t.TgZ(96,"span",5),t._UZ(97,"span",6),t.qZA()()()(),t.TgZ(98,"div",7)(99,"div",8)(100,"div",3)(101,"label")(102,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterIdentities(!i.settingsManager.settings.characterIdentities)}),t.qZA(),t._UZ(103,"span",2),t.qZA(),t._UZ(104,"img",10),t.TgZ(105,"span",5),t._UZ(106,"span",6),t.qZA()()(),t.TgZ(107,"div",8)(108,"div",3)(109,"label",11)(110,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterIdentityHint(!i.settingsManager.settings.characterIdentityHint)}),t.qZA(),t._UZ(111,"span",2),t.qZA(),t._UZ(112,"img",10),t.TgZ(113,"span",5),t._UZ(114,"span",6),t.qZA()()(),t.TgZ(115,"div",8)(116,"div",3)(117,"label",11)(118,"input",9),t.NdJ("change",function(){return i.settingsManager.setBattleGoalsCharacter(!i.settingsManager.settings.battleGoalsCharacter)}),t.qZA(),t._UZ(119,"span",2),t.qZA(),t._UZ(120,"img",10),t.TgZ(121,"span",5),t._UZ(122,"span",6),t.qZA()()(),t.TgZ(123,"div",8)(124,"div",3)(125,"label")(126,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterHandSize(!i.settingsManager.settings.characterHandSize)}),t.qZA(),t._UZ(127,"span",2),t.qZA(),t._UZ(128,"img",10),t.TgZ(129,"span",5),t._UZ(130,"span",6),t.qZA()()(),t.TgZ(131,"div",8)(132,"div",3)(133,"label")(134,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterTraits(!i.settingsManager.settings.characterTraits)}),t.qZA(),t._UZ(135,"span",2),t.qZA(),t._UZ(136,"img",10),t.TgZ(137,"span",5),t._UZ(138,"span",6),t.qZA()()()(),t.TgZ(139,"div",1)(140,"label"),t._UZ(141,"span",2),t.qZA(),t.TgZ(142,"div",3),t.YNc(143,D3,1,0,"img",4),t.TgZ(144,"span",5),t._UZ(145,"span",6),t.qZA()()(),t.YNc(146,I3,99,63,"ng-container",12),t.TgZ(147,"div",1)(148,"label"),t._UZ(149,"span",2),t.qZA(),t.TgZ(150,"div",3),t.YNc(151,N3,1,0,"img",4),t.TgZ(152,"span",5),t._UZ(153,"span",6),t.qZA()()(),t.TgZ(154,"div",7),t.YNc(155,J3,9,6,"ng-container",12),t.TgZ(156,"div",8)(157,"div",3)(158,"label",11)(159,"input",9),t.NdJ("change",function(){return i.settingsManager.setActiveStandees(!i.settingsManager.settings.activeStandees)}),t.qZA(),t._UZ(160,"span",2),t.qZA(),t._UZ(161,"img",10),t.TgZ(162,"span",5),t._UZ(163,"span",6),t.qZA()()(),t.TgZ(164,"div",8)(165,"div",3)(166,"label",11)(167,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticStandees(!i.settingsManager.settings.automaticStandees)}),t.qZA(),t._UZ(168,"span",2),t.qZA(),t._UZ(169,"img",10),t.TgZ(170,"span",5),t._UZ(171,"span",6),t.qZA()()(),t.TgZ(172,"div",8)(173,"div",3)(174,"label",11)(175,"input",9),t.NdJ("change",function(){return i.settingsManager.setStandeeStats(!i.settingsManager.settings.standeeStats)}),t.qZA(),t._UZ(176,"span",2),t.qZA(),t._UZ(177,"img",10),t.TgZ(178,"span",5),t._UZ(179,"span",6),t.qZA()()()(),t.YNc(180,U3,25,15,"div",13),t.TgZ(181,"div",1)(182,"label"),t._UZ(183,"span",2),t.qZA(),t.TgZ(184,"div",3),t.YNc(185,L3,1,0,"img",4),t.TgZ(186,"span",5),t._UZ(187,"span",6),t.qZA()()(),t.TgZ(188,"div",7)(189,"div",8)(190,"div",3)(191,"label")(192,"input",9),t.NdJ("change",function(){return i.settingsManager.setExpireConditions(!i.settingsManager.settings.expireConditions)}),t.qZA(),t._UZ(193,"span",2),t.qZA(),t._UZ(194,"img",10),t.TgZ(195,"span",5),t._UZ(196,"span",6),t.qZA()()(),t.TgZ(197,"div",8)(198,"div",3)(199,"label")(200,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyConditions(!i.settingsManager.settings.applyConditions)}),t.qZA(),t._UZ(201,"span",2),t.qZA(),t._UZ(202,"img",10),t.TgZ(203,"span",5),t._UZ(204,"span",6),t.qZA()()(),t.TgZ(205,"div",7)(206,"div",14)(207,"div",15),t.YNc(208,Q3,6,8,"div",16),t.qZA()()()(),t.TgZ(209,"div",7)(210,"div",8)(211,"div",3)(212,"label")(213,"input",9),t.NdJ("change",function(){return i.settingsManager.setMoveElements(!i.settingsManager.settings.moveElements)}),t.qZA(),t._UZ(214,"span",2),t.qZA(),t._UZ(215,"img",10),t.TgZ(216,"span",5),t._UZ(217,"span",6),t.qZA()()(),t.TgZ(218,"div",8)(219,"div",3)(220,"label",11)(221,"input",9),t.NdJ("change",function(){return i.settingsManager.setActiveApplyConditions(!i.settingsManager.settings.activeApplyConditions)}),t.qZA(),t._UZ(222,"span",2),t.qZA(),t._UZ(223,"img",10),t.TgZ(224,"span",5),t._UZ(225,"span",6),t.qZA()()(),t.TgZ(226,"div",7)(227,"div",14)(228,"div",15),t.YNc(229,R3,6,8,"div",16),t.qZA()()()(),t._UZ(230,"div",17),t.TgZ(231,"div",1)(232,"label"),t._UZ(233,"span",2),t.qZA(),t.TgZ(234,"div",3),t.YNc(235,F3,1,0,"img",4),t.TgZ(236,"span",5),t._UZ(237,"span",6),t.qZA()()(),t.TgZ(238,"div",7)(239,"div",8)(240,"div",3)(241,"label",11)(242,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyLoot(!i.settingsManager.settings.applyLoot)}),t.qZA(),t._UZ(243,"span",2),t.qZA(),t._UZ(244,"img",10),t.TgZ(245,"span",5),t._UZ(246,"span",6),t.qZA()()(),t.TgZ(247,"div",8)(248,"div",3)(249,"label",11)(250,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyLootRandomItem(!i.settingsManager.settings.applyLootRandomItem)}),t.qZA(),t._UZ(251,"span",2),t.qZA(),t._UZ(252,"img",10),t.TgZ(253,"span",5),t._UZ(254,"span",6),t.qZA()()(),t.TgZ(255,"div",8)(256,"div",3)(257,"label",11)(258,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysLootApplyDialog(!i.settingsManager.settings.alwaysLootApplyDialog)}),t.qZA(),t._UZ(259,"span",2),t.qZA(),t._UZ(260,"img",10),t.TgZ(261,"span",5),t._UZ(262,"span",6),t.qZA()()(),t.TgZ(263,"div",8)(264,"div",3)(265,"label",11)(266,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysLootDeck(!i.settingsManager.settings.alwaysLootDeck)}),t.qZA(),t._UZ(267,"span",2),t.qZA(),t._UZ(268,"img",10),t.TgZ(269,"span",5),t._UZ(270,"span",6),t.qZA()()(),t.TgZ(271,"div",8)(272,"div",3)(273,"label",11)(274,"input",9),t.NdJ("change",function(){return i.settingsManager.setApplyBuildingRewards(!i.settingsManager.settings.applyBuildingRewards)}),t.qZA(),t._UZ(275,"span",2),t.qZA(),t._UZ(276,"img",10),t.TgZ(277,"span",5),t._UZ(278,"span",6),t.qZA()()()(),t.TgZ(279,"div",7)(280,"div",8)(281,"div",3)(282,"label",11)(283,"input",9),t.NdJ("change",function(){return i.settingsManager.setBattleGoalsFh(!i.settingsManager.settings.battleGoalsFh)}),t.qZA(),t._UZ(284,"span",2),t.qZA(),t._UZ(285,"img",10),t.TgZ(286,"span",5),t._UZ(287,"span",6),t.qZA()()(),t.TgZ(288,"div",8)(289,"div",3)(290,"label",11)(291,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysAllyAttackModifierDeck(!i.settingsManager.settings.alwaysAllyAttackModifierDeck)}),t.qZA(),t._UZ(292,"span",2),t.qZA(),t._UZ(293,"img",10),t.TgZ(294,"span",5),t._UZ(295,"span",6),t.qZA()()(),t.TgZ(296,"div",8)(297,"div",3)(298,"label",11)(299,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysHazardousTerrain(!i.settingsManager.settings.alwaysHazardousTerrain)}),t.qZA(),t._UZ(300,"span",2),t.qZA(),t._UZ(301,"img",10),t.TgZ(302,"span",5),t._UZ(303,"span",6),t.qZA()()(),t.TgZ(304,"div",8)(305,"div",3)(306,"label",11)(307,"input",9),t.NdJ("change",function(){return i.settingsManager.setAlwaysFhSolo(!i.settingsManager.settings.alwaysFhSolo)}),t.qZA(),t._UZ(308,"span",2),t.qZA(),t._UZ(309,"img",10),t.TgZ(310,"span",5),t._UZ(311,"span",6),t.qZA()()(),t.TgZ(312,"div",8)(313,"div",3)(314,"label",11)(315,"input",9),t.NdJ("change",function(){return i.settingsManager.setFhGhItems(!i.settingsManager.settings.fhGhItems)}),t.qZA(),t._UZ(316,"span",2),t.qZA(),t._UZ(317,"img",10),t.TgZ(318,"span",5),t._UZ(319,"span",6),t.qZA()()()(),t._UZ(320,"div",17),t.TgZ(321,"div",1)(322,"label"),t._UZ(323,"span",2),t.qZA(),t.TgZ(324,"div",3),t.YNc(325,q3,1,0,"img",4),t.TgZ(326,"span",5),t._UZ(327,"span",6),t.qZA()()(),t.TgZ(328,"div",7)(329,"div",8)(330,"div",3)(331,"label")(332,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierDeck(!i.settingsManager.settings.characterAttackModifierDeck)}),t.qZA(),t._UZ(333,"span",2),t.qZA(),t._UZ(334,"img",10),t.TgZ(335,"span",5),t._UZ(336,"span",6),t.qZA()()(),t.TgZ(337,"div",8)(338,"div",3)(339,"label")(340,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterSheet(!i.settingsManager.settings.characterSheet)}),t.qZA(),t._UZ(341,"span",2),t.qZA(),t._UZ(342,"img",10),t.TgZ(343,"span",5),t._UZ(344,"span",6),t.qZA()()(),t.TgZ(345,"div",8)(346,"div",3)(347,"label")(348,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticUnlocking(!i.settingsManager.settings.automaticUnlocking)}),t.qZA(),t._UZ(349,"span",2),t.qZA(),t._UZ(350,"img",10),t.TgZ(351,"span",5),t._UZ(352,"span",6),t.qZA()()(),t.TgZ(353,"div",8)(354,"div",3)(355,"label")(356,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterItems(!i.settingsManager.settings.characterItems)}),t.qZA(),t._UZ(357,"span",2),t.qZA(),t._UZ(358,"img",10),t.TgZ(359,"span",5),t._UZ(360,"span",6),t.qZA()()(),t.TgZ(361,"div",8)(362,"div",3)(363,"label")(364,"input",9),t.NdJ("change",function(){return i.settingsManager.setBattleGoals(!i.settingsManager.settings.battleGoals)}),t.qZA(),t._UZ(365,"span",2),t.qZA(),t._UZ(366,"img",10),t.TgZ(367,"span",5),t._UZ(368,"span",6),t.qZA()()()(),t.TgZ(369,"div",7)(370,"div",8)(371,"div",3)(372,"label")(373,"input",9),t.NdJ("change",function(){return i.settingsManager.setLootDeck(!i.settingsManager.settings.lootDeck)}),t.qZA(),t._UZ(374,"span",2),t.qZA(),t._UZ(375,"img",10),t.TgZ(376,"span",5),t._UZ(377,"span",6),t.qZA()()(),t.TgZ(378,"div",8)(379,"div",3)(380,"label")(381,"input",9),t.NdJ("change",function(){return i.settingsManager.setAllyAttackModifierDeck(!i.settingsManager.settings.allyAttackModifierDeck)}),t.qZA(),t._UZ(382,"span",2),t.qZA(),t._UZ(383,"img",10),t.TgZ(384,"span",5),t._UZ(385,"span",6),t.qZA()()(),t.TgZ(386,"div",8)(387,"div",3)(388,"label")(389,"input",9),t.NdJ("change",function(){return i.settingsManager.setPartySheet(!i.settingsManager.settings.partySheet)}),t.qZA(),t._UZ(390,"span",2),t.qZA(),t._UZ(391,"img",10),t.TgZ(392,"span",5),t._UZ(393,"span",6),t.qZA()()(),t.TgZ(394,"div",8)(395,"div",3)(396,"label")(397,"input",9),t.NdJ("change",function(){return i.settingsManager.setMonsters(!i.settingsManager.settings.monsters)}),t.qZA(),t._UZ(398,"span",2),t.qZA(),t._UZ(399,"img",10),t.TgZ(400,"span",5),t._UZ(401,"span",6),t.qZA()()()(),t.TgZ(402,"div",1)(403,"label"),t._UZ(404,"span",2),t.qZA()(),t.TgZ(405,"div",7)(406,"div",8)(407,"div",3)(408,"label")(409,"input",9),t.NdJ("change",function(){return i.settingsManager.setFhStyle(!i.settingsManager.settings.fhStyle)}),t.qZA(),t._UZ(410,"span",2),t.qZA(),t._UZ(411,"img",10),t.TgZ(412,"span",5),t._UZ(413,"span",6),t.qZA()()(),t.TgZ(414,"div",8)(415,"div",3)(416,"label")(417,"input",9),t.NdJ("change",function(){return i.settingsManager.setDragValues(!i.settingsManager.settings.dragValues)}),t.qZA(),t._UZ(418,"span",2),t.qZA(),t._UZ(419,"img",10),t.TgZ(420,"span",5),t._UZ(421,"span",6),t.qZA()()(),t.TgZ(422,"div",8)(423,"div",3)(424,"label")(425,"input",9),t.NdJ("change",function(){return i.settingsManager.setPressDoubleClick(!i.settingsManager.settings.pressDoubleClick)}),t.qZA(),t._UZ(426,"span",2),t.qZA(),t._UZ(427,"img",10),t.TgZ(428,"span",5),t._UZ(429,"span",6),t.qZA()()(),t.TgZ(430,"div",8)(431,"div",3)(432,"label")(433,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableDragFigures(!i.settingsManager.settings.disableDragFigures)}),t.qZA(),t._UZ(434,"span",2),t.qZA(),t._UZ(435,"img",10),t.TgZ(436,"span",5),t._UZ(437,"span",6),t.qZA()()(),t.TgZ(438,"div",8)(439,"div",3)(440,"label",11)(441,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticAttackModifierFullscreen(!i.settingsManager.settings.automaticAttackModifierFullscreen)}),t.qZA(),t._UZ(442,"span",2),t.qZA(),t._UZ(443,"img",10),t.TgZ(444,"span",5),t._UZ(445,"span",6),t.qZA()()(),t.TgZ(446,"div",8)(447,"div",3)(448,"label",11)(449,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterSheetCompact(!i.settingsManager.settings.characterSheetCompact)}),t.qZA(),t._UZ(450,"span",2),t.qZA(),t._UZ(451,"img",10),t.TgZ(452,"span",5),t._UZ(453,"span",6),t.qZA()()()(),t.TgZ(454,"div",7)(455,"div",8)(456,"div",3)(457,"label",11)(458,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierAnimate(!i.settingsManager.settings.characterAttackModifierAnimate)}),t.qZA(),t._UZ(459,"span",2),t.qZA(),t._UZ(460,"img",10),t.TgZ(461,"span",5),t._UZ(462,"span",6),t.qZA()()(),t.TgZ(463,"div",8)(464,"div",3)(465,"label",11)(466,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierDeckPermanent(!i.settingsManager.settings.characterAttackModifierDeckPermanent)}),t.qZA(),t._UZ(467,"span",2),t.qZA(),t._UZ(468,"img",10),t.TgZ(469,"span",5),t._UZ(470,"span",6),t.qZA()()(),t.TgZ(471,"div",8)(472,"div",3)(473,"label",11)(474,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterAttackModifierDeckPermanentActive(!i.settingsManager.settings.characterAttackModifierDeckPermanentActive)}),t.qZA(),t._UZ(475,"span",2),t.qZA(),t._UZ(476,"img",10),t.TgZ(477,"span",5),t._UZ(478,"span",6),t.qZA()()(),t.TgZ(479,"div",8)(480,"div",3)(481,"label",11)(482,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterItemsPermanent(!i.settingsManager.settings.characterItemsPermanent)}),t.qZA(),t._UZ(483,"span",2),t.qZA(),t._UZ(484,"img",10),t.TgZ(485,"span",5),t._UZ(486,"span",6),t.qZA()()(),t.TgZ(487,"div",8)(488,"div",3)(489,"label",11)(490,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterItemsPermanentActive(!i.settingsManager.settings.characterItemsPermanentActive)}),t.qZA(),t._UZ(491,"span",2),t.qZA(),t._UZ(492,"img",10),t.TgZ(493,"span",5),t._UZ(494,"span",6),t.qZA()()()(),t._UZ(495,"div",17),t.TgZ(496,"div",7)(497,"div",8)(498,"a",18),t.NdJ("singleClick",function(){return i.zoomOut()})("doubleClick",function(){return i.zoomOut(!0)}),t._UZ(499,"span",2),t.qZA()(),t.TgZ(500,"div",8)(501,"a",18),t.NdJ("singleClick",function(){return i.zoomIn()})("doubleClick",function(){return i.zoomIn(!0)}),t._UZ(502,"span",2),t.qZA()(),t.TgZ(503,"div",8)(504,"a",19),t.NdJ("click",function(){return i.resetZoom()}),t._UZ(505,"span",2),t.qZA()(),t.TgZ(506,"div",8)(507,"div",3)(508,"label")(509,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisablePinchZoom(!i.settingsManager.settings.disablePinchZoom)}),t.qZA(),t._UZ(510,"span",2),t.qZA(),t._UZ(511,"img",10),t.TgZ(512,"span",5),t._UZ(513,"span",6),t.qZA()()(),t.TgZ(514,"div",8)(515,"div",3)(516,"label")(517,"input",9),t.NdJ("change",function(){return i.fullscreen()}),t.qZA(),t._UZ(518,"span",2),t.qZA(),t._UZ(519,"img",10),t.TgZ(520,"span",5),t._UZ(521,"span",6),t.qZA()()(),t.TgZ(522,"div",8)(523,"div",3)(524,"label")(525,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutoscroll(!i.settingsManager.settings.autoscroll)}),t.qZA(),t._UZ(526,"span",2),t.qZA(),t._UZ(527,"img",10),t.TgZ(528,"span",5),t._UZ(529,"span",6),t.qZA()()(),t.TgZ(530,"div",8)(531,"div",3)(532,"label")(533,"input",9),t.NdJ("change",function(){return i.togglePortraitMode()}),t.qZA(),t._UZ(534,"span",2),t.qZA(),t._UZ(535,"img",10),t.TgZ(536,"span",5),t._UZ(537,"span",6),t.qZA()()()(),t.TgZ(538,"div",7)(539,"div",8)(540,"div",3)(541,"label")(542,"input",9),t.NdJ("change",function(){return i.settingsManager.setHints(!i.settingsManager.settings.hints)}),t.qZA(),t._UZ(543,"span",2),t.qZA(),t._UZ(544,"img",10),t.TgZ(545,"span",5),t._UZ(546,"span",6),t.qZA()()(),t.TgZ(547,"div",8)(548,"div",3)(549,"label")(550,"input",9),t.NdJ("change",function(){return i.settingsManager.setTooltips(!i.settingsManager.settings.tooltips)}),t.qZA(),t._UZ(551,"span",2),t.qZA(),t._UZ(552,"img",10),t.TgZ(553,"span",5),t._UZ(554,"span",6),t.qZA()()(),t.TgZ(555,"div",8)(556,"div",3)(557,"label")(558,"input",9),t.NdJ("change",function(){return i.settingsManager.setBackupHint(!i.settingsManager.settings.backupHint)}),t.qZA(),t._UZ(559,"span",2),t.qZA(),t._UZ(560,"img",10),t.TgZ(561,"span",5),t._UZ(562,"span",6),t.qZA()()(),t.TgZ(563,"div",8)(564,"div",3)(565,"label")(566,"input",9),t.NdJ("change",function(){return i.settingsManager.setStatAnimations(!i.settingsManager.settings.statAnimations)}),t.qZA(),t._UZ(567,"span",2),t.qZA(),t._UZ(568,"img",10),t.TgZ(569,"span",5),t._UZ(570,"span",6),t.qZA()()(),t.TgZ(571,"div",8)(572,"div",3)(573,"label")(574,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableColumns(!i.settingsManager.settings.disableColumns)}),t.qZA(),t._UZ(575,"span",2),t.qZA(),t._UZ(576,"img",10),t.TgZ(577,"span",5),t._UZ(578,"span",6),t.qZA()()(),t.TgZ(579,"div",8)(580,"div",3)(581,"label")(582,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableAnimations(!i.settingsManager.settings.disableAnimations)}),t.qZA(),t._UZ(583,"span",2),t.qZA(),t._UZ(584,"img",10),t.TgZ(585,"span",5),t._UZ(586,"span",6),t.qZA()()(),t.TgZ(587,"div",8)(588,"div",3)(589,"label")(590,"input",9),t.NdJ("change",function(){return i.settingsManager.setDisableArtwork(!i.settingsManager.settings.disableArtwork)}),t.qZA(),t._UZ(591,"span",2),t.qZA(),t._UZ(592,"img",10),t.TgZ(593,"span",5),t._UZ(594,"span",6),t.qZA()()(),t.YNc(595,H3,8,3,"div",20),t.qZA(),t.TgZ(596,"div",8)(597,"div",3)(598,"label",19),t.NdJ("click",function(m){return i.resetBarsize(m)}),t._UZ(599,"span",2),t.TgZ(600,"input",21),t.NdJ("change",function(m){return i.setBarsize(m)})("input",function(m){return i.updateBarsize(m)}),t.qZA()(),t._UZ(601,"img",10),t.TgZ(602,"span",5),t._UZ(603,"span",6),t.qZA()()(),t.TgZ(604,"div",8)(605,"div",3)(606,"label",19),t.NdJ("click",function(m){return i.resetFontsize(m)}),t._UZ(607,"span",2),t.TgZ(608,"input",21),t.NdJ("change",function(m){return i.setFontsize(m)})("input",function(m){return i.updateFontsize(m)}),t.qZA()(),t._UZ(609,"img",10),t.TgZ(610,"span",5),t._UZ(611,"span",6),t.qZA()()(),t._UZ(612,"div",17),t.TgZ(613,"div",8)(614,"div",22)(615,"label",23),t._UZ(616,"span",2),t.TgZ(617,"input",24,25),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(s);const m=t.MAs(618);return t.KtG(i.settingsManager.setMaxUndo(+m.value))}),t.qZA()(),t.YNc(619,j3,1,0,"img",26),t.YNc(620,z3,5,2,"div",27),t.qZA()(),t.TgZ(621,"div",28)(622,"label")(623,"input",9),t.NdJ("change",function(){return i.settingsManager.setBrowserNavigation(!i.settingsManager.settings.browserNavigation)}),t.qZA(),t._UZ(624,"span",2),t.qZA()(),t.TgZ(625,"div",7)(626,"div",29)(627,"label"),t._UZ(628,"span",2),t.qZA(),t.TgZ(629,"div",3),t.YNc(630,G3,1,0,"img",4),t.TgZ(631,"span",5),t._UZ(632,"span",6),t.qZA()()(),t.YNc(633,V3,4,5,"div",30),t.qZA(),t.TgZ(634,"div",7)(635,"div",29)(636,"label"),t._UZ(637,"span",2),t.qZA()(),t.YNc(638,Y3,4,5,"div",30),t._UZ(639,"div",17),t.TgZ(640,"div",8)(641,"div",3)(642,"label")(643,"input",9),t.NdJ("change",function(){return i.settingsManager.setAutomaticTheme(!i.settingsManager.settings.automaticTheme)}),t.qZA(),t._UZ(644,"span",2),t.qZA(),t._UZ(645,"img",10),t.TgZ(646,"span",5),t._UZ(647,"span",6),t.qZA()()(),t.TgZ(648,"div",8)(649,"div",3)(650,"label",11)(651,"input",9),t.NdJ("change",function(){return i.settingsManager.setCharacterCompact(!i.settingsManager.settings.characterCompact)}),t.qZA(),t._UZ(652,"span",2),t.qZA(),t._UZ(653,"img",10),t.TgZ(654,"span",5),t._UZ(655,"span",6),t.qZA()()()(),t._UZ(656,"div",17),t.TgZ(657,"div",8)(658,"a",19),t.NdJ("click",function(){return i.helperDefaults()}),t._UZ(659,"span",2),t.qZA()(),t.TgZ(660,"div",8)(661,"a",19),t.NdJ("click",function(){return i.setMenu.emit(i.SubMenu.debug)}),t._UZ(662,"span",2),t.qZA()()()}if(2&e){const s=t.MAs(618);t.Q6J("ngClass",t.VKq(281,K3,i.gameManager.stateManager.wsState()==i.WebSocket.OPEN)),t.xp6(3),t.Q6J("ghs-label","settings.gameplay"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.scenarioRooms"),t.xp6(3),t.Q6J("ghs-label","settings.scenarioRooms.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.scenarioRules),t.xp6(1),t.Q6J("ghs-label","settings.scenarioRules"),t.xp6(3),t.Q6J("ghs-label","settings.scenarioRules.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(283,nn,!i.settingsManager.settings.scenarioRooms)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.treasures&&i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.treasures"),t.xp6(3),t.Q6J("ghs-label","settings.treasures.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(285,nn,!i.settingsManager.settings.expireConditions&&!i.settingsManager.settings.applyConditions)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.disabledTurnConfirmation||!i.settingsManager.settings.expireConditions&&!i.settingsManager.settings.applyConditions),t.xp6(1),t.Q6J("ghs-label","settings.disabledTurnConfirmation"),t.xp6(3),t.Q6J("ghs-label","settings.disabledTurnConfirmation.hint"),t.xp6(3),t.Q6J("ghs-label","settings.character"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.initiativeRequired),t.xp6(1),t.Q6J("ghs-label","settings.initiativeRequired"),t.xp6(3),t.Q6J("ghs-label","settings.initiativeRequired.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.hideAbsent),t.xp6(1),t.Q6J("ghs-label","settings.hideAbsent"),t.xp6(3),t.Q6J("ghs-label","settings.hideAbsent.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(287,nn,!i.settingsManager.settings.scenarioRooms||!i.settingsManager.settings.treasures)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.treasuresLoot&&i.settingsManager.settings.scenarioRooms&&i.settingsManager.settings.treasures),t.xp6(1),t.Q6J("ghs-label","settings.treasuresLoot"),t.xp6(3),t.Q6J("ghs-label","settings.treasuresLoot.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.applyLongRest),t.xp6(1),t.Q6J("ghs-label","settings.applyLongRest"),t.xp6(3),t.Q6J("ghs-label","settings.applyLongRest.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(289,nn,!i.settingsManager.settings.characterSheet)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterSheet&&i.settingsManager.settings.applyRetirement),t.xp6(1),t.Q6J("ghs-label","settings.applyRetirement"),t.xp6(3),t.Q6J("ghs-label","settings.applyRetirement.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.activeSummons),t.xp6(1),t.Q6J("ghs-label","settings.activeSummons"),t.xp6(3),t.Q6J("ghs-label","settings.activeSummons.hint"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.characterIdentities),t.xp6(1),t.Q6J("ghs-label","settings.characterIdentities"),t.xp6(3),t.Q6J("ghs-label","settings.characterIdentities.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(291,nn,!i.settingsManager.settings.characterIdentities)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterIdentities&&i.settingsManager.settings.characterIdentityHint),t.xp6(1),t.Q6J("ghs-label","settings.characterIdentityHint"),t.xp6(3),t.Q6J("ghs-label","settings.characterIdentityHint.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(293,nn,!i.settingsManager.settings.battleGoals||!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.battleGoals&&(i.settingsManager.settings.battleGoalsCharacter||!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("ghs-label","settings.battleGoalsCharacter"),t.xp6(3),t.Q6J("ghs-label","settings.battleGoalsCharacter.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterHandSize),t.xp6(1),t.Q6J("ghs-label","settings.characterHandSize"),t.xp6(3),t.Q6J("ghs-label","settings.characterHandSize.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterTraits),t.xp6(1),t.Q6J("ghs-label","settings.characterTraits"),t.xp6(3),t.Q6J("ghs-label","settings.characterTraits.hint"),t.xp6(3),t.Q6J("ghs-label","settings.monsters"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.monsters),t.xp6(3),t.Q6J("ghs-label","settings.standees"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.monsters),t.xp6(3),t.Q6J("ngClass",t.VKq(295,nn,i.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.activeStandees&&!i.settingsManager.settings.disableStandees),t.xp6(1),t.Q6J("ghs-label","settings.activeStandees"),t.xp6(3),t.Q6J("ghs-label","settings.activeStandees.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(297,nn,!i.settingsManager.settings.scenarioRooms||i.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.automaticStandees&&!i.settingsManager.settings.disableStandees&&i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ghs-label","settings.automaticStandees"),t.xp6(3),t.Q6J("ghs-label","settings.automaticStandees.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(299,nn,i.settingsManager.settings.disableStandees)),t.xp6(1),t.Q6J("checked",!i.settingsManager.settings.disableStandees&&i.settingsManager.settings.standeeStats),t.xp6(1),t.Q6J("ghs-label","settings.standeeStats"),t.xp6(3),t.Q6J("ghs-label","settings.standeeStats.hint"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.monsters),t.xp6(3),t.Q6J("ghs-label","settings.conditions"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.expireConditions),t.xp6(1),t.Q6J("ghs-label","settings.expireConditions"),t.xp6(3),t.Q6J("ghs-label","settings.expireConditions.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.applyConditions),t.xp6(1),t.Q6J("ghs-label","settings.applyConditions"),t.xp6(3),t.Q6J("ghs-label","settings.applyConditions.hint"),t.xp6(2),t.Q6J("ngClass",t.VKq(301,nn,!i.settingsManager.settings.applyConditions)),t.xp6(2),t.Q6J("ngForOf",i.applyConditionsExcludes),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.moveElements),t.xp6(1),t.Q6J("ghs-label","settings.moveElements"),t.xp6(3),t.Q6J("ghs-label","settings.moveElements.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(303,nn,!i.settingsManager.settings.applyConditions)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.applyConditions&&i.settingsManager.settings.activeApplyConditions),t.xp6(1),t.Q6J("ghs-label","settings.activeApplyConditions"),t.xp6(3),t.Q6J("ghs-label","settings.activeApplyConditions.hint"),t.xp6(2),t.Q6J("ngClass",t.VKq(305,nn,!i.settingsManager.settings.applyConditions||!i.settingsManager.settings.activeApplyConditions)),t.xp6(2),t.Q6J("ngForOf",i.activeApplyConditionsExcludes),t.xp6(4),t.Q6J("ghs-label","settings.fhRules"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(4),t.Q6J("ngClass",t.VKq(307,nn,!i.settingsManager.settings.lootDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot),t.xp6(1),t.Q6J("ghs-label","settings.applyLoot"),t.xp6(3),t.Q6J("ghs-label","settings.applyLoot.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(309,nn,!i.settingsManager.settings.lootDeck||!i.settingsManager.settings.applyLoot)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot&&i.settingsManager.settings.applyLootRandomItem),t.xp6(1),t.Q6J("ghs-label","settings.applyLootRandomItem"),t.xp6(3),t.Q6J("ghs-label","settings.applyLootRandomItem.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(311,nn,!i.settingsManager.settings.lootDeck||!i.settingsManager.settings.applyLoot)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.alwaysLootApplyDialog&&i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot),t.xp6(1),t.Q6J("ghs-label","settings.alwaysLootApplyDialog"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysLootApplyDialog.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(313,nn,!i.settingsManager.settings.lootDeck||i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.lootDeck&&(i.settingsManager.settings.alwaysLootDeck||i.gameManager.fhRules())),t.xp6(1),t.Q6J("ghs-label","settings.alwaysLootDeck"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysLootDeck.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(315,nn,!i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.applyBuildingRewards&&i.gameManager.fhRules()),t.xp6(1),t.Q6J("ghs-label","settings.applyBuildingRewards"),t.xp6(3),t.Q6J("ghs-label","settings.applyBuildingRewards.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(317,nn,!i.settingsManager.settings.battleGoals||i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.battleGoals&&(i.gameManager.fhRules()||i.settingsManager.settings.battleGoalsFh)),t.xp6(1),t.Q6J("ghs-label","settings.battleGoalsFh"),t.xp6(3),t.Q6J("ghs-label","settings.battleGoalsFh.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(319,nn,!i.settingsManager.settings.allyAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.allyAttackModifierDeck&&i.settingsManager.settings.alwaysAllyAttackModifierDeck),t.xp6(1),t.Q6J("ghs-label","settings.alwaysAllyAttackModifierDeck"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysAllyAttackModifierDeck.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(321,nn,i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.alwaysHazardousTerrain||i.gameManager.fhRules()),t.xp6(1),t.Q6J("ghs-label","settings.alwaysHazardousTerrain"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysHazardousTerrain.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(323,nn,i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.alwaysFhSolo||i.gameManager.fhRules()),t.xp6(1),t.Q6J("ghs-label","settings.alwaysFhSolo"),t.xp6(3),t.Q6J("ghs-label","settings.alwaysFhSolo.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(325,nn,!i.settingsManager.settings.characterItems&&!i.settingsManager.settings.characterSheet||!i.gameManager.fhRules())),t.xp6(1),t.Q6J("checked",(i.settingsManager.settings.characterItems||i.settingsManager.settings.characterSheet)&&i.settingsManager.settings.fhGhItems),t.xp6(1),t.Q6J("ghs-label","settings.fhGhItems"),t.xp6(3),t.Q6J("ghs-label","settings.fhGhItems.hint"),t.xp6(4),t.Q6J("ghs-label","settings.additional"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierDeck"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierDeck.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterSheet),t.xp6(1),t.Q6J("ghs-label","settings.characterSheet"),t.xp6(3),t.Q6J("ghs-label","settings.characterSheet.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.automaticUnlocking),t.xp6(1),t.Q6J("ghs-label","settings.automaticUnlocking"),t.xp6(3),t.Q6J("ghs-label","settings.automaticUnlocking.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.characterItems),t.xp6(1),t.Q6J("ghs-label","settings.characterItems"),t.xp6(3),t.Q6J("ghs-label","settings.characterItems.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.battleGoals),t.xp6(1),t.Q6J("ghs-label","settings.battleGoals"),t.xp6(3),t.Q6J("ghs-label","settings.battleGoals.hint"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.lootDeck),t.xp6(1),t.Q6J("ghs-label","settings.lootDeck"),t.xp6(3),t.Q6J("ghs-label","settings.lootDeck.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.allyAttackModifierDeck),t.xp6(1),t.Q6J("ghs-label","settings.allyAttackModifierDeck"),t.xp6(3),t.Q6J("ghs-label","settings.allyAttackModifierDeck.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.partySheet),t.xp6(1),t.Q6J("ghs-label","settings.partySheet"),t.xp6(3),t.Q6J("ghs-label","settings.partySheet.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.monsters),t.xp6(1),t.Q6J("ghs-label","settings.monsters"),t.xp6(3),t.Q6J("ghs-label","settings.monsters.hint"),t.xp6(3),t.Q6J("ghs-label","settings.interface"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.fhStyle),t.xp6(1),t.Q6J("ghs-label","settings.fhStyle"),t.xp6(3),t.Q6J("ghs-label","settings.fhStyle.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.dragValues),t.xp6(1),t.Q6J("ghs-label","settings.dragValues"),t.xp6(3),t.Q6J("ghs-label","settings.dragValues.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.pressDoubleClick),t.xp6(1),t.Q6J("ghs-label","settings.pressDoubleClick"),t.xp6(3),t.Q6J("ghs-label","settings.pressDoubleClick.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableDragFigures),t.xp6(1),t.Q6J("ghs-label","settings.disableDragFigures"),t.xp6(3),t.Q6J("ghs-label","settings.disableDragFigures.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(327,nn,!i.settingsManager.settings.portraitMode)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.automaticAttackModifierFullscreen&&i.settingsManager.settings.portraitMode),t.xp6(1),t.Q6J("ghs-label","settings.automaticAttackModifierFullscreen"),t.xp6(3),t.Q6J("ghs-label","settings.automaticAttackModifierFullscreen.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(329,nn,!i.settingsManager.settings.characterSheet)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterSheet&&i.settingsManager.settings.characterSheetCompact),t.xp6(1),t.Q6J("ghs-label","settings.characterSheetCompact"),t.xp6(3),t.Q6J("ghs-label","settings.characterSheetCompact.hint"),t.xp6(4),t.Q6J("ngClass",t.VKq(331,nn,!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierAnimate),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierAnimate"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierAnimate.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(333,nn,!i.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierDeckPermanent),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanent"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanent.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(335,nn,!i.settingsManager.settings.characterAttackModifierDeck||!i.settingsManager.settings.characterAttackModifierDeckPermanent)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierDeckPermanent&&i.settingsManager.settings.characterAttackModifierDeckPermanentActive),t.xp6(1),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanentActive"),t.xp6(3),t.Q6J("ghs-label","settings.characterAttackModifierDeckPermanentActive.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(337,nn,!i.settingsManager.settings.characterItems)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterItems&&i.settingsManager.settings.characterItemsPermanent),t.xp6(1),t.Q6J("ghs-label","settings.characterItemsPermanent"),t.xp6(3),t.Q6J("ghs-label","settings.characterItemsPermanent.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(339,nn,!i.settingsManager.settings.characterItems||!i.settingsManager.settings.characterItemsPermanent)),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.characterItems&&i.settingsManager.settings.characterItemsPermanent&&i.settingsManager.settings.characterItemsPermanentActive),t.xp6(1),t.Q6J("ghs-label","settings.characterItemsPermanentActive"),t.xp6(3),t.Q6J("ghs-label","settings.characterItemsPermanentActive.hint"),t.xp6(5),t.Q6J("ghs-label","settings.zoom.out"),t.xp6(3),t.Q6J("ghs-label","settings.zoom.in"),t.xp6(3),t.Q6J("ghs-label","settings.zoom.reset"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disablePinchZoom),t.xp6(1),t.Q6J("ghs-label","settings.disablePinchZoom"),t.xp6(3),t.Q6J("ghs-label","settings.disablePinchZoom.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.fullscreen),t.xp6(1),t.Q6J("ghs-label","settings.fullscreen"),t.xp6(3),t.Q6J("ghs-label","settings.fullscreen.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.autoscroll),t.xp6(1),t.Q6J("ghs-label","settings.autoscroll"),t.xp6(3),t.Q6J("ghs-label","settings.autoscroll.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.portraitMode),t.xp6(1),t.Q6J("ghs-label","settings.portraitMode"),t.xp6(3),t.Q6J("ghs-label","settings.portraitMode.hint"),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.hints),t.xp6(1),t.Q6J("ghs-label","settings.hints"),t.xp6(3),t.Q6J("ghs-label","settings.hints.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.tooltips),t.xp6(1),t.Q6J("ghs-label","settings.tooltips"),t.xp6(3),t.Q6J("ghs-label","settings.tooltips.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.backupHint),t.xp6(1),t.Q6J("ghs-label","settings.backupHint"),t.xp6(3),t.Q6J("ghs-label","settings.backupHint.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.statAnimations),t.xp6(1),t.Q6J("ghs-label","settings.statAnimations"),t.xp6(3),t.Q6J("ghs-label","settings.statAnimations.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableColumns),t.xp6(1),t.Q6J("ghs-label","settings.disableColumns"),t.xp6(3),t.Q6J("ghs-label","settings.disableColumns.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableAnimations),t.xp6(1),t.Q6J("ghs-label","settings.disableAnimations"),t.xp6(3),t.Q6J("ghs-label","settings.disableAnimations.hint"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ghs-label","settings.disableArtwork"),t.xp6(3),t.Q6J("ghs-label","settings.disableArtwork.hint"),t.xp6(1),t.Q6J("ngIf",i.wakeLock),t.xp6(4),t.Q6J("ghs-label","settings.barsize"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.barsize),t.xp6(3),t.Q6J("ghs-label","settings.barsize.hint"),t.xp6(4),t.Q6J("ghs-label","settings.fontsize"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.fontsize),t.xp6(3),t.Q6J("ghs-label","settings.fontsize.hint"),t.xp6(5),t.Q6J("ghs-label","settings.maxUndo"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.maxUndo)("max",i.storageManager.db?"":50)("size",s.value.length)("ghs-label","settings.maxUndo")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngIf",!i.storageManager.db),t.xp6(1),t.Q6J("ngIf",!i.storageManager.db),t.xp6(3),t.Q6J("checked",i.settingsManager.settings.browserNavigation),t.xp6(1),t.Q6J("ghs-label","settings.browserNavigation"),t.xp6(4),t.Q6J("ghs-label","settings.locale"),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.serverSettings),t.xp6(2),t.Q6J("ghs-label","settings.synced"),t.xp6(1),t.Q6J("ngForOf",i.settingsManager.locales),t.xp6(4),t.Q6J("ghs-label","settings.theme"),t.xp6(1),t.Q6J("ngForOf",t.DdM(341,$3)),t.xp6(5),t.Q6J("checked",i.settingsManager.settings.automaticTheme),t.xp6(1),t.Q6J("ghs-label","settings.automaticTheme"),t.xp6(3),t.Q6J("ghs-label","settings.automaticTheme.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(342,nn,"modern"==i.settingsManager.settings.theme)),t.xp6(1),t.Q6J("checked","modern"!=i.settingsManager.settings.theme&&i.settingsManager.settings.characterCompact),t.xp6(1),t.Q6J("ghs-label","settings.characterCompact"),t.xp6(3),t.Q6J("ghs-label","settings.characterCompact.hint"),t.xp6(4),t.Q6J("ghs-label","settings.helperDefaults"),t.xp6(3),t.Q6J("ghs-label","settings.debug")}},dependencies:[x.mk,x.sg,x.O5,ie,An],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',"@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%]{display:flex;align-items:center}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition.immunity[_ngcontent-%COMP%]{opacity:.7;filter:grayscale(.3)}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{opacity:.6;filter:none}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .hint-trigger[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.line[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .hint.right[_ngcontent-%COMP%]{transform:translate(-50%)}.line.disabled[_ngcontent-%COMP%] .condition-list[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{filter:grayscale(.6)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg.sync-settings[_ngcontent-%COMP%]{height:2em;width:auto;filter:var(--ghs-filter-disabled) var(--ghs-filter-outline-thin-black)}.menu-container.connected[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg.sync-settings[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-outline-thin-black)}"]})),a})();const X3=["characterSheet"];let IO=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"characterSheet",void 0),this.character=e,this.dialogRef=i,this.dialogRef.closed.subscribe({next:()=>{this.characterSheet.applyValues()}})}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-sheet-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(X3,5),2&e){let s;t.iGM(s=t.CRH())&&(i.characterSheet=s.first)}},decls:4,vars:1,consts:[[1,"light","character-sheet-dialog"],[1,"scroll-container"],[3,"character"],["characterSheet",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"ghs-character-sheet",2,3),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("character",i.character))},styles:[".character-sheet-dialog[_ngcontent-%COMP%]{position:relative;background-color:var(--ghs-color-white)}.character-sheet-dialog[_ngcontent-%COMP%] ghs-character-sheet[_ngcontent-%COMP%]{display:block}"]})),a})();var Wu=E(7680),Vn=E(6223),le=E(6441),Mw=E(9048),ei=E(4756);function tA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(n.value.split(":")[1])}}function eA(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function nA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}const Ow=function(o){return{target:o}};function iA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",11),t.YNc(2,tA,2,1,"span",12),t.YNc(3,eA,2,7,"span",13),t.YNc(4,nA,2,3,"span",14),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,Ow,e.getTarget(n)||e.getRange(n)))("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"condition/"+n.value.split(":")[0]+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.value.split(":").length>1),t.xp6(1),t.Q6J("ngIf",e.getTarget(n)),t.xp6(1),t.Q6J("ngIf",e.getRange(n))}}function oA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",19),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value+".svg",t.LSH)}}function aA(o,a){if(1&o&&(t.TgZ(0,"span",20)(1,"span",21),t._UZ(2,"img",22),t.qZA(),t.TgZ(3,"span",21),t._UZ(4,"img",22),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value.split("|")[0]+".svg",t.LSH),t.xp6(2),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value.split("|")[1]+".svg",t.LSH)}}function sA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function rA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",23),t._UZ(2,"img",22),t.qZA(),t.TgZ(3,"span",24),t._uU(4,":"),t.qZA(),t.YNc(5,sA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"element/"+n.value+".svg",t.LSH),t.xp6(3),t.Q6J("ngIf",n.effects)}}function cA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,+n.value))}}function lA(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function gA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}const dA=function(o,a){return{target:o,"sub-effects":a}},NO=function(o){return{"ghs-svg":o}};function hA(o,a){if(1&o&&(t.TgZ(0,"div",28),t._UZ(1,"img",29),t.YNc(2,cA,3,3,"span",12),t.YNc(3,lA,2,7,"span",13),t.YNc(4,gA,2,3,"span",14),t.TgZ(5,"div",26)(6,"span",24),t._uU(7,","),t.qZA(),t._UZ(8,"ghs-attackmodifier-effects",27),t.qZA()()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Udp("border-width",s.offsetWidth*(s.attackModifier.type==s.AttackModifierType.plus0&&0==e?.02:.01)+"px"),t.Q6J("ngClass",t.WLB(12,dA,s.getTarget(i)||s.getRange(i),s.subEffects(i).length>0)),t.xp6(1),t.Q6J("ngClass",t.VKq(15,NO,s.isGhsSvg(i.type)))("src","./assets/images/action/"+i.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.value),t.xp6(1),t.Q6J("ngIf",s.getTarget(i)),t.xp6(1),t.Q6J("ngIf",s.getRange(i)),t.xp6(4),t.Q6J("attackModifier",s.attackModifier)("effects",s.subEffects(i))("offsetWidth",s.offsetWidth)("newStyle",s.newStyle)}}function uA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(+n.value)}}function _A(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function pA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}function fA(o,a){if(1&o&&(t.TgZ(0,"div",30),t._UZ(1,"img",29),t.YNc(2,uA,2,1,"span",12),t.YNc(3,_A,2,7,"span",13),t.YNc(4,pA,2,3,"span",14),t.TgZ(5,"div",26),t._UZ(6,"ghs-attackmodifier-effects",27),t.qZA()()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Udp("border-width",s.offsetWidth*(s.attackModifier.type==s.AttackModifierType.plus0&&0==e?.02:.01)+"px"),t.Q6J("ngClass",t.VKq(12,Ow,s.getTarget(i)||s.getRange(i))),t.xp6(1),t.Q6J("ngClass",t.VKq(14,NO,s.isGhsSvg(i.type)))("src","./assets/images/"+(s.settingsManager.settings.fhStyle?"fh/":"")+"action/"+i.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.value),t.xp6(1),t.Q6J("ngIf",s.getTarget(i)),t.xp6(1),t.Q6J("ngIf",s.getRange(i)),t.xp6(2),t.Q6J("attackModifier",s.attackModifier)("effects",s.subEffects(i))("offsetWidth",s.offsetWidth)("newStyle",s.newStyle)}}function mA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(+n.value)}}function vA(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",16),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Gre("target-value-container ","target-"+e.getTarget(n).replace("game.specialTarget.",""),""),t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getTarget(n).split(":")[0])("ghs-label-args",e.getTarget(n).split(":").slice(1))}}function CA(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Akn(!!e.newStyle&&"fh"),t.Q6J("ghs-label",e.getRange(n))}}function MA(o,a){if(1&o&&(t.TgZ(0,"div",31),t._UZ(1,"img",29),t.YNc(2,mA,2,1,"span",12),t.YNc(3,vA,2,7,"span",13),t.YNc(4,CA,2,3,"span",14),t.TgZ(5,"div",26),t._UZ(6,"ghs-attackmodifier-effects",27),t.qZA()()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Udp("border-width",s.offsetWidth*(s.attackModifier.type==s.AttackModifierType.plus0&&0==e?.02:.01)+"px"),t.Q6J("ngClass",t.VKq(12,Ow,s.getTarget(i)||s.getRange(i))),t.xp6(1),t.Q6J("ngClass",t.VKq(14,NO,s.isGhsSvg(i.type)))("src","./assets/images/"+(s.settingsManager.settings.fhStyle?"fh/":"")+"action/"+i.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.value),t.xp6(1),t.Q6J("ngIf",s.getTarget(i)),t.xp6(1),t.Q6J("ngIf",s.getRange(i)),t.xp6(2),t.Q6J("attackModifier",s.attackModifier)("effects",s.subEffects(i))("offsetWidth",s.offsetWidth)("newStyle",s.newStyle)}}function OA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function PA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",19),t.YNc(2,OA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/target.svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.effects)}}function yA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function bA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-action-hex",32),t.YNc(2,yA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("value",n.value),t.xp6(1),t.Q6J("ngIf",n.effects)}}function xA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function wA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._UZ(2,"img",34)(3,"img",35),t.qZA(),t.YNc(4,xA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(4),t.Q6J("ngIf",n.effects)}}function kA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function TA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",36)(2,"span",33),t._UZ(3,"img",34)(4,"img",35),t.qZA(),t.TgZ(5,"span",37),t._UZ(6,"span",38),t.qZA(),t.YNc(7,kA,2,4,"div",25),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(6),t.Q6J("ghs-label","game.attackModifiers.effects.refreshSpentItem"),t.xp6(1),t.Q6J("ngIf",n.effects)}}function ZA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function AA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._UZ(2,"img",39)(3,"img",40),t.qZA(),t.YNc(4,ZA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(4),t.Q6J("ngIf",n.effects)}}function SA(o,a){if(1&o&&(t.TgZ(0,"span",45),t._uU(1),t.qZA()),2&o){const n=t.oxw(5);t.xp6(1),t.AsE("",n.attackModifier.value<0?"-":"+","",n.attackModifier.value,"")}}const EA=function(o){return{"text-white":o}};function DA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,SA,2,2,"span",42),t.TgZ(2,"span",43),t._UZ(3,"span",44),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.townGuard),t.xp6(2),t.Q6J("ngClass",t.VKq(3,EA,!e.settingsManager.settings.fhStyle||e.townGuard))("ghs-label",n.value+"")}}function IA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",46),t._UZ(2,"img",22),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(2),t.Q6J("src","./assets/images/action/custom/"+n.value+".svg",t.LSH)}}function NA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function JA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,DA,4,5,"ng-container",41),t.YNc(2,IA,3,1,"ng-container",41),t.YNc(3,NA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",!n.icon),t.xp6(1),t.Q6J("ngIf",n.icon),t.xp6(1),t.Q6J("ngIf",n.effects)}}const UA=function(o){return{"new-style":o}};function LA(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",47),t._UZ(2,"span",38),t.qZA(),t._UZ(3,"ghs-attackmodifier-effects",27),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(6,UA,e.newStyle)),t.xp6(1),t.Q6J("ghs-label","or"),t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function QA(o,a){if(1&o&&(t.TgZ(0,"div",26),t._UZ(1,"ghs-attackmodifier-effects",27),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("attackModifier",e.attackModifier)("effects",n.effects)("offsetWidth",e.offsetWidth)("newStyle",e.newStyle)}}function RA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",48),t.YNc(2,QA,2,4,"div",25),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/overlays/replace/"+n.value+".png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.effects)}}function FA(o,a){if(1&o&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(+n.value)}}function qA(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",11),t.YNc(2,FA,2,1,"span",12),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(3,NO,e.isGhsSvg(n.type)))("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"action/"+n.type+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.value)}}const HA=function(o,a,n,e,i,s,l,m){return{center:o,fh:a,"new-style":n,"town-guard":e,multiple:i,"multiple-2":s,"multiple-3":l,"multiple-4":m}};function jA(o,a){if(1&o&&(t.TgZ(0,"span",3),t.ynx(1,4),t.YNc(2,iA,5,7,"ng-container",5),t.YNc(3,oA,2,1,"ng-container",5),t.YNc(4,aA,5,2,"span",6),t.YNc(5,rA,6,2,"ng-container",5),t.YNc(6,hA,9,17,"div",7),t.YNc(7,fA,7,16,"div",8),t.YNc(8,MA,7,16,"div",9),t.YNc(9,PA,3,2,"ng-container",5),t.YNc(10,bA,3,2,"ng-container",5),t.YNc(11,wA,5,1,"ng-container",5),t.YNc(12,TA,8,2,"ng-container",5),t.YNc(13,AA,5,1,"ng-container",5),t.YNc(14,JA,4,3,"ng-container",5),t.YNc(15,LA,4,8,"ng-container",5),t.YNc(16,RA,3,2,"ng-container",5),t.YNc(17,qA,3,5,"ng-container",10),t.BQk(),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Gre("effect ",n.type,""),t.Q6J("ngClass",t.qlk(20,HA,e.attackModifier.type==e.AttackModifierType.plus0||e.newStyle||0==e.attackModifier.value&&e.townGuard,e.settingsManager.settings.fhStyle,e.newStyle,e.townGuard,e.effects.length>1,2==e.effects.length,3==e.effects.length,4==e.effects.length)),t.xp6(1),t.Q6J("ngSwitch",n.type),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.condition),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.element),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.elementHalf),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.elementConsume),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.heal),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.shield),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.retaliate),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.target),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.area),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.refreshItem),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.refreshSpentItem),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.recoverRandomDiscard),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.custom),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.or),t.xp6(1),t.Q6J("ngSwitchCase",e.AttackModifierEffectType.changeType)}}function BA(o,a){if(1&o&&(t.TgZ(0,"span",1),t.YNc(1,jA,18,29,"span",2),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.effects)}}let zA=(()=>{var o;class a{constructor(){(0,_.Z)(this,"offsetWidth",void 0),(0,_.Z)(this,"attackModifier",void 0),(0,_.Z)(this,"effects",void 0),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"AttackModifierEffectType",Lt.US),(0,_.Z)(this,"invertIcons",[Lt.US.attack,Lt.US.heal,Lt.US.range,Lt.US.retaliate,Lt.US.shield,Lt.US.target])}getTarget(e){if(e.effects){const i=e.effects.find(l=>l.type==Lt.US.specialTarget);if(i)return"game.specialTarget."+i.value;const s=e.effects.find(l=>l.type==Lt.US.custom);if(s)return s.value}return""}getRange(e){if(e.effects){const i=e.effects.find(s=>s.type==Lt.US.range);if(i)return"%game.action.range:"+i.value+"%"}return""}subEffects(e){return e.effects&&e.effects.filter(i=>i.type!=Lt.US.specialTarget&&i.type!=Lt.US.target&&i.type!=Lt.US.range&&i.type!=Lt.US.custom)||[]}isGhsSvg(e){return-1!=this.invertIcons.indexOf(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-effects"]],inputs:{offsetWidth:"offsetWidth",attackModifier:"attackModifier",effects:"effects",newStyle:"newStyle",townGuard:"townGuard"},decls:1,vars:1,consts:[["class","effects",4,"ngIf"],[1,"effects"],[3,"class","ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","element-half-container",4,"ngSwitchCase"],["class","effect-container heal-container",3,"border-width","ngClass",4,"ngSwitchCase"],["class","effect-container shield-container",3,"border-width","ngClass",4,"ngSwitchCase"],["class","effect-container retaliate-container",3,"border-width","ngClass",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"full",3,"ngClass","src"],["class","value",4,"ngIf"],[3,"class",4,"ngIf"],["class","target-value-container range",4,"ngIf"],[1,"value"],[1,"target-value","text-white",3,"ghs-label","ghs-label-args"],[1,"target-value-container","range"],[1,"target-value","text-white",3,"ghs-label"],[1,"full",3,"src"],[1,"element-half-container"],[1,"element-half"],[3,"src"],[1,"element","consume"],[1,"divider"],["class","sub-effects",4,"ngIf"],[1,"sub-effects"],[3,"attackModifier","effects","offsetWidth","newStyle"],[1,"effect-container","heal-container",3,"ngClass"],[3,"ngClass","src"],[1,"effect-container","shield-container",3,"ngClass"],[1,"effect-container","retaliate-container",3,"ngClass"],[3,"value"],[1,"card-action"],["src","./assets/images/action/card/refresh.svg",1,"ghs-svg"],["src","./assets/images/action/card/overlay/refresh.svg",1,"overlay"],[1,"card-action-container"],[1,"label"],[3,"ghs-label"],["src","./assets/images/action/card/recover.svg",1,"ghs-svg"],["src","./assets/images/action/card/overlay/recover.svg",1,"overlay"],[4,"ngIf"],["class","type",4,"ngIf"],[1,"custom-value-container"],[1,"custom-value",3,"ngClass","ghs-label"],[1,"type"],[1,"effect-icon"],[1,"or-label",3,"ngClass"],[1,"overlay",3,"src"]],template:function(e,i){1&e&&t.YNc(0,BA,2,1,"span",0),2&e&&t.Q6J("ngIf",i.effects)},dependencies:[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,o,Sf,ie,Kd],styles:['.effects[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;z-index:3;width:18%;height:28%;top:35%;left:6%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]:nth-child(2){top:5%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] img.full[_ngcontent-%COMP%]{width:100%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:35%;left:50%;transform:translate(-50%);font-family:var(--ghs-font-title);font-size:.6em;color:var(--ghs-color-white)}.effects[_ngcontent-%COMP%] .effect.condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:55%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:40%;bottom:5%;font-family:var(--ghs-font-title);font-size:.6em;line-height:.8em;color:var(--ghs-color-white);left:50%;transform:translate(-50%)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%] .target-value[_ngcontent-%COMP%]{display:inline;text-align:center}.effects[_ngcontent-%COMP%] .effect.fh[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:.7em}.effects[_ngcontent-%COMP%] .effect.fh[_ngcontent-%COMP%] .target-value-container.target-self[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.fh[_ngcontent-%COMP%] .target-value-container.target-allyShort[_ngcontent-%COMP%]{font-size:1.3em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;border:1px solid var(--ghs-color-white);border-radius:100%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:8%;width:40%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:22%;font-size:.8em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:10%;left:50%;transform:translate(-50%);width:50%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:35%;left:50%;transform:translate(-50%);font-family:ghs-title;font-size:.6em;color:var(--ghs-color-black)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container[_ngcontent-%COMP%]{background-color:#a11f1a}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%]{display:none}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{left:35%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%]{display:block;position:absolute;top:15%;left:40%;width:100%;height:100%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{position:absolute;top:10%;left:10%;color:var(--ghs-color-white);margin-left:5%;margin-right:3%;font-size:1.5em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.heal-container.sub-effects[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{top:0;left:0;width:100%;height:100%;transform:none}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container[_ngcontent-%COMP%]{background-color:#6e4e34}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:10%;width:80%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1em;top:35%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:15%;width:48%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.shield-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:17%;font-size:.8em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container[_ngcontent-%COMP%]{background-color:#384c5a;position:relative}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50%;left:42%;top:20%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:1em;top:25%;left:80%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:15%;width:48%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-container.retaliate-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:17%;font-size:.8em}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%]{position:relative;width:80%}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;top:0;left:0;width:100%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%] img.overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:auto}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--ghs-color-white);text-transform:uppercase}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-normal)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{display:block;text-align:center;font-size:.8em;line-height:.8em;text-shadow:var(--ghs-outline-thin);white-space:break-spaces}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .element.consume[_ngcontent-%COMP%]{width:50%;height:auto;display:flex}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{margin-left:5%;margin-right:3%}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%]{width:50%}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%]{position:relative;display:block;width:100%}.effects[_ngcontent-%COMP%] .effect.elementConsume[_ngcontent-%COMP%] .sub-effects[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%] .effect.center.element[_ngcontent-%COMP%]{width:100%;height:auto;display:flex}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .effect-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.effects[_ngcontent-%COMP%] .effect.pull[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.push[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:60%}.effects[_ngcontent-%COMP%] .effect.pierce[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{left:30%;background-color:#c6833f}.effects[_ngcontent-%COMP%] .effect.pierce.fh[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{background-color:#c88c4e;font-size:1.2em;left:25%;font-family:ghs-title;top:32%}.effects[_ngcontent-%COMP%] .effect.push.fh[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ghs-title;top:12%;color:#4f504f}.effects[_ngcontent-%COMP%] .effect.pull.fh[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ghs-title;top:40%;color:#4f504f}.effects[_ngcontent-%COMP%] .effect.loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:60%;height:auto;filter:var(--ghs-filter-white)}.effects[_ngcontent-%COMP%] .effect.loot[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-black)}.effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .element-background[_ngcontent-%COMP%]{position:absolute;inset:0;background-image:url(am-front.48806d22feb6f4bf.png);background-size:100%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%]{top:50%;left:49.5%;width:34%;height:52%;transform:translate(-50%,-50%)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(1){transform:translate(-70%,-70%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(2){transform:translate(-30%,-30%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(3), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(3), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(3), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(3){transform:translate(-30%,-70%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition[_ngcontent-%COMP%]:nth-child(4), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull[_ngcontent-%COMP%]:nth-child(4), .effects[_ngcontent-%COMP%] .effect.center.multiple.push[_ngcontent-%COMP%]:nth-child(4), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce[_ngcontent-%COMP%]:nth-child(4){transform:translate(-70%,-30%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition.multiple-2[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull.multiple-2[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.push.multiple-2[_ngcontent-%COMP%]:nth-child(1), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce.multiple-2[_ngcontent-%COMP%]:nth-child(1){transform:translate(-67.5%,-67.5%) scale(.6)}.effects[_ngcontent-%COMP%] .effect.center.multiple.condition.multiple-2[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pull.multiple-2[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.push.multiple-2[_ngcontent-%COMP%]:nth-child(2), .effects[_ngcontent-%COMP%] .effect.center.multiple.pierce.multiple-2[_ngcontent-%COMP%]:nth-child(2){transform:translate(-32.5%,-32.5%) scale(.6)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(1){transform:translate(-72.5%,-75%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(2){transform:translate(-27.5%,-25%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(3){transform:translate(-27.5%,-75%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element[_ngcontent-%COMP%]:nth-child(4){transform:translate(-72.5%,-25%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.multiple.element.multiple-3[_ngcontent-%COMP%]:nth-child(2){transform:translate(-50%,-25%) scale(.4)}.effects[_ngcontent-%COMP%] .effect.center.heal[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center.shield[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center.retaliate[_ngcontent-%COMP%]{width:46%;height:68%}.effects[_ngcontent-%COMP%] .effect.center.element[_ngcontent-%COMP%]{width:38%;height:50%}.effects[_ngcontent-%COMP%] .effect.center.custom[_ngcontent-%COMP%]{width:46%;height:68%}.effects[_ngcontent-%COMP%] .effect.center.custom[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{position:absolute;top:-2%;left:20%;font-family:ghs-title;font-size:3em;color:var(--ghs-color-white);text-shadow:var(--ghs-outline-thin)}.effects[_ngcontent-%COMP%] .effect.center.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{width:80%;height:40%;top:20%}.effects[_ngcontent-%COMP%] .effect.center.custom.new-style[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{display:none}.effects[_ngcontent-%COMP%] .effect.center.custom.new-style[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{top:0;width:70%;height:70%}.effects[_ngcontent-%COMP%] .effect.center.custom.fh[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{text-shadow:none}.effects[_ngcontent-%COMP%] .effect.center.changeType[_ngcontent-%COMP%]{top:0;left:0;width:100%;height:100%;transform:none}.effects[_ngcontent-%COMP%] .effect.center.changeType[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%]{position:absolute;top:40%;left:-15%;width:135%;height:50%}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%]{width:100%;height:100%}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] .or-label[_ngcontent-%COMP%]{font-size:.8em;color:var(--ghs-color-white);position:relative}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] .or-label.new-style[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:-1em -1.25em 1em .75em;color:var(--ghs-color-white);background-color:var(--ghs-color-white);clip-path:polygon(100% 0%,95% 0%,0% 95%,0% 100%,5% 100%,100% 5%)}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] .or-label.new-style[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:1em .75em -1em -1.25em;color:var(--ghs-color-white);background-color:var(--ghs-color-white);clip-path:polygon(100% 0%,95% 0%,0% 95%,0% 100%,5% 100%,100% 5%)}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%]{position:absolute;inset:0}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]:nth-child(1){transform:translate(-70%,-70%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center.or[_ngcontent-%COMP%] ghs-attackmodifier-effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]:nth-child(2){transform:translate(-30%,-30%) scale(.5)}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1em}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%]{flex-direction:column}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1.3em}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%] img.full.target[_ngcontent-%COMP%]{width:60%;top:0;position:absolute}.effects[_ngcontent-%COMP%] .effect.center.condition[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{width:90%;height:40%;bottom:5%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%]{width:80%;height:80%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:2em;top:25%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .target-value-container[_ngcontent-%COMP%]{width:80%;height:30%;bottom:10%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .target-value-container.target-self[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container[_ngcontent-%COMP%] .target-value-container.target-allyShort[_ngcontent-%COMP%]{font-size:1.2em}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:8%;width:35%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:20%;font-size:1.4em}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.shield-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.retaliate-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:10%;width:50%}.effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.shield-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .effects[_ngcontent-%COMP%] .effect.center[_ngcontent-%COMP%] .effect-container.target.retaliate-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{top:15%}.effects[_ngcontent-%COMP%] .effect.town-guard[_ngcontent-%COMP%]{top:70%;left:49.5%;width:34%;height:22%;transform:translate(-50%,-50%)}.effects[_ngcontent-%COMP%] .effect.town-guard.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{font-family:ghs-title;font-size:.8em}.effects[_ngcontent-%COMP%] .effect.town-guard.center[_ngcontent-%COMP%]{top:50%;left:49.5%;width:34%;height:52%;transform:translate(-50%,-50%)}.effects[_ngcontent-%COMP%] .effect.town-guard.center.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%]{min-width:130%;width:auto;height:auto;top:initial}.effects[_ngcontent-%COMP%] .effect.town-guard.center.custom[_ngcontent-%COMP%] .custom-value-container[_ngcontent-%COMP%] .custom-value[_ngcontent-%COMP%]{font-family:ghs-title;font-size:2.6em;text-shadow:var(--ghs-outline-thin)}']})),a})(),Yf=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"clicked",!1),(0,_.Z)(this,"change",new t.vpe),this.el=e,this.el.nativeElement.classList.add("reveal")}onClick(){this.disabled?this.clicked&&(this.clicked=!1,this.el.nativeElement.classList.remove("confirm")):this.el.nativeElement.classList.contains("flipped")?(this.el.nativeElement.classList.remove("flipped"),this.change.emit(!1)):this.clicked?(this.el.nativeElement.classList.add("flipped"),this.change.emit(!0),this.clicked=!1,this.el.nativeElement.classList.remove("confirm")):(this.clicked=!0,this.el.nativeElement.classList.add("confirm"))}onMouseLeave(){(!this.disabled||this.clicked)&&(this.clicked=!1,this.el.nativeElement.classList.remove("confirm"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","card-reveal",""]],hostBindings:function(e,i){1&e&&t.NdJ("click",function(){return i.onClick()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{disabled:"disabled"},outputs:{change:"change"}})),a})();const Xu=function(o,a){return{"new-style":o,fh:a}};function GA(o,a){if(1&o&&(t.TgZ(0,"div",0),t._UZ(1,"img",22),t.qZA()),2&o){const n=t.oxw(2);t.Gre("type ",n.effectClasses,""),t.Q6J("ngClass",t.WLB(5,Xu,n.newStyle,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/"+(!n.defaultType||n.townGuard||n.csOak||n.newStyle&&n.attackModifier.valueType==n.AttackModifierValueType.plus&&n.attackModifier.effects&&0!=n.attackModifier.effects.length?"am-front":n.attackModifier.type)+".png",t.LSH)}}const Y6=function(o,a,n,e,i){return{"new-style":o,fh:a,"multiple-2":n,"multiple-3":e,"multiple-4":i}};function VA(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(3);t.MT6("type multiple ",n.type," ",n.value,""),t.Q6J("ngClass",t.qbA(5,Y6,e.newStyle,e.settingsManager.settings.fhStyle,2==e.attackModifier.effects.length,3==e.attackModifier.effects.length,4==e.attackModifier.effects.length))}}function YA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,VA,1,11,"div",23),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.attackModifier.effects)}}function KA(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.MT6("type multiple multiple-mixed-element ",n.type," ",n.value,""),t.Q6J("ngClass",t.WLB(5,Xu,e.newStyle,e.settingsManager.settings.fhStyle))}}function $A(o,a){if(1&o&&(t.ynx(0),t.YNc(1,KA,1,8,"div",8),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.filter(n))}}function WA(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(4);t.MT6("type multiple multiple-mixed-element multiple-mixed-element-or ",n.type," ",n.value,""),t.Q6J("ngClass",t.WLB(5,Xu,e.newStyle,e.settingsManager.settings.fhStyle))}}function XA(o,a){if(1&o&&(t.ynx(0),t.YNc(1,WA,1,8,"div",23),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.orTypeEffect.effects)}}function tS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"div",0),t.YNc(2,$A,2,1,"ng-container",24),t.YNc(3,XA,2,1,"ng-container",7),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Gre("type multiple multiple-mixed-element ",n.mixedElement.value,""),t.Q6J("ngClass",t.WLB(6,Xu,n.newStyle,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("ngForOf",n.effects()),t.xp6(1),t.Q6J("ngIf",n.orTypeEffect&&n.orTypeEffect.effects.length>1)}}function eS(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(3);t.MT6("type multiple ",n.type," ",n.value,""),t.Q6J("ngClass",t.qbA(5,Y6,e.newStyle,e.settingsManager.settings.fhStyle,2==e.orTypeEffect.effects.length,3==e.orTypeEffect.effects.length,4==e.orTypeEffect.effects.length))}}function nS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,eS,1,11,"div",23),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.orTypeEffect.effects)}}function iS(o,a){if(1&o&&t._UZ(0,"div",0),2&o){const n=a.$implicit,e=t.oxw(3);t.Gre("type multiple multiple-1 ",n,""),t.Q6J("ngClass",t.WLB(4,Xu,e.newStyle,e.settingsManager.settings.fhStyle))}}function oS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,iS,1,7,"div",23),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.attackModifier.effects[0].value.split("|"))}}function aS(o,a){1&o&&(t.ynx(0),t._UZ(1,"div",25)(2,"div",26)(3,"div",27)(4,"div",28)(5,"div",29)(6,"div",30),t.BQk())}function sS(o,a){1&o&&(t.TgZ(0,"div",31),t._UZ(1,"img",32),t.qZA())}function rS(o,a){1&o&&(t.TgZ(0,"div",33),t._UZ(1,"img",34),t.qZA())}function cS(o,a){1&o&&(t.TgZ(0,"div",35),t._UZ(1,"img",36),t.qZA())}const lS=function(o){return{side:o}};function gS(o,a){if(1&o&&t._UZ(0,"img",37),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,lS,n.newStyle))("src","./assets/images/attackmodifier/"+(n.newStyle?"icons/":"overlays/")+n.attackModifier.type+".png",t.LSH)}}function dS(o,a){if(1&o&&t._UZ(0,"img",38),2&o){const n=t.oxw(2);t.Q6J("src","./assets/images/attackmodifier/"+(n.newStyle?"icons/":"overlays/")+n.attackModifier.valueType+n.attackModifier.value+".png",t.LSH)}}function hS(o,a){1&o&&t._UZ(0,"img",39)}function uS(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.numeration)}}function _S(o,a){1&o&&(t.TgZ(0,"span",41),t._uU(1," * "),t.qZA())}function pS(o,a){if(1&o&&(t.TgZ(0,"span",42),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("+",n.attackModifier.value,"")}}function fS(o,a){if(1&o&&(t.TgZ(0,"span",42),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("-",n.attackModifier.value,"")}}function mS(o,a){if(1&o&&(t.TgZ(0,"span",43),t._UZ(1,"img",22),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src",n.characterIcon,t.LSH)}}function vS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-attackmodifier-effects",44),t.BQk()),2&o){const n=t.oxw(2),e=t.MAs(2);t.xp6(1),t.Q6J("attackModifier",n.attackModifier)("effects",n.effects())("offsetWidth",e.offsetWidth)("newStyle",n.newStyle)}}const CS=function(o){return[o]};function MS(o,a){if(1&o&&(t.TgZ(0,"div",45),t._UZ(1,"ghs-attackmodifier-effects",44),t.qZA()),2&o){const n=t.oxw(2),e=t.MAs(2);t.xp6(1),t.Q6J("attackModifier",n.attackModifier)("effects",t.VKq(4,CS,n.mixedElement))("offsetWidth",e.offsetWidth)("newStyle",n.newStyle)}}function OS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,GA,2,8,"div",8),t.YNc(2,YA,2,1,"ng-container",7),t.YNc(3,tS,4,9,"ng-container",7),t.YNc(4,nS,2,1,"ng-container",7),t.YNc(5,oS,2,1,"ng-container",7),t.YNc(6,aS,7,0,"ng-container",7),t.YNc(7,sS,2,0,"div",9),t.YNc(8,rS,2,0,"div",10),t.YNc(9,cS,2,0,"div",11),t._UZ(10,"img",12)(11,"img",13),t.YNc(12,gS,1,4,"img",14),t.YNc(13,dS,1,1,"img",15),t.YNc(14,hS,1,0,"img",16),t.YNc(15,uS,2,1,"span",17),t.YNc(16,_S,2,0,"span",18),t.YNc(17,pS,2,1,"span",19),t.YNc(18,fS,2,1,"span",19),t.YNc(19,mS,2,1,"span",20),t.YNc(20,vS,2,4,"ng-container",7),t.YNc(21,MS,2,6,"div",21),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",!n.mixedElement&&!n.multipe||n.wildElement),t.xp6(1),t.Q6J("ngIf",n.multipe&&n.attackModifier.effects.length>1),t.xp6(1),t.Q6J("ngIf",n.mixedElement&&n.effects().length>0),t.xp6(1),t.Q6J("ngIf",!n.mixedElement&&n.orTypeEffect&&n.orTypeEffect.effects.length>1),t.xp6(1),t.Q6J("ngIf",n.multipe&&1==n.attackModifier.effects.length),t.xp6(1),t.Q6J("ngIf",n.wildElement),t.xp6(1),t.Q6J("ngIf",n.csOak),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.empower),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.enfeeble),t.xp6(3),t.Q6J("ngIf",n.attackModifier.effects&&n.attackModifier.effects.length>0&&(n.attackModifier.type!=n.AttackModifierType.plus0&&n.attackModifier.type!=n.AttackModifierType.plus&&n.attackModifier.type!=n.AttackModifierType.minus||n.newStyle)&&n.attackModifier.type!=n.AttackModifierType.empower&&n.attackModifier.type!=n.AttackModifierType.enfeeble),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.empower||n.attackModifier.type==n.AttackModifierType.enfeeble),t.xp6(1),t.Q6J("ngIf",n.attackModifier.rolling),t.xp6(1),t.Q6J("ngIf",(!n.characterIcon&&!n.ally||!n.attackModifier.character&&n.attackModifier.type!=n.AttackModifierType.curse)&&n.attackModifier.type!=n.AttackModifierType.bless&&!n.csOak&&n.attackModifier.type!=n.AttackModifierType.minus1extra),t.xp6(1),t.Q6J("ngIf",(n.characterIcon||n.ally)&&n.attackModifier.type==n.AttackModifierType.curse||n.attackModifier.type==n.AttackModifierType.minus1extra),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.plus),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.minus),t.xp6(1),t.Q6J("ngIf",n.characterIcon&&n.attackModifier.character),t.xp6(1),t.Q6J("ngIf",n.attackModifier.effects),t.xp6(1),t.Q6J("ngIf",n.mixedElement)}}const K6=function(o){return{effects:o}};function PS(o,a){if(1&o&&(t.TgZ(0,"span",49),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(2,K6,!n.townGuardEffectIcon&&n.attackModifier.effects.length>0||n.townGuardEffectIcon&&n.attackModifier.effects.length>1)),t.xp6(1),t.hij("+",n.attackModifier.value,"")}}function yS(o,a){if(1&o&&(t.TgZ(0,"span",49),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.Q6J("ngClass",t.VKq(2,K6,n.attackModifier.effects.length>0)),t.xp6(1),t.hij("-",n.attackModifier.value,"")}}function bS(o,a){if(1&o&&(t.ynx(0),t.YNc(1,PS,2,4,"span",48),t.YNc(2,yS,2,4,"span",48),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(n.attackModifier.value>0||0==n.attackModifier.effects.length)&&(n.attackModifier.valueType==n.AttackModifierValueType.plus||n.attackModifier.valueType==n.AttackModifierValueType.default)),t.xp6(1),t.Q6J("ngIf",n.attackModifier.valueType==n.AttackModifierValueType.minus)}}function xS(o,a){if(1&o&&(t.TgZ(0,"span",50),t._UZ(1,"img",22),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/action/custom/"+n.townGuardEffectIcon.value+".svg",t.LSH)}}function wS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-attackmodifier-effects",51),t.BQk()),2&o){const n=t.oxw(2),e=t.MAs(2);t.xp6(1),t.Q6J("attackModifier",n.attackModifier)("effects",n.effects())("offsetWidth",e.offsetWidth)("townGuard",!0)}}function kS(o,a){1&o&&t._UZ(0,"img",39)}function TS(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",46),t._UZ(2,"img",22),t.qZA(),t.YNc(3,bS,3,2,"ng-container",7),t.YNc(4,xS,2,1,"span",47),t.YNc(5,wS,2,4,"ng-container",7),t.YNc(6,kS,1,0,"img",16),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(6,Xu,n.newStyle,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("src","./assets/images/attackmodifier/town-guard/"+(n.attackModifier.type==n.AttackModifierType.townguard?n.attackModifier.valueType:n.attackModifier.type)+".png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.attackModifier.type==n.AttackModifierType.townguard),t.xp6(1),t.Q6J("ngIf",n.townGuardEffectIcon),t.xp6(1),t.Q6J("ngIf",n.attackModifier.effects),t.xp6(1),t.Q6J("ngIf",n.attackModifier.rolling)}}const ZS=function(o){return{"town-guard":o}},AS=function(o,a){return{flipped:o,"no-animations":a}};let JO=(()=>{var o;class a{constructor(){(0,_.Z)(this,"attackModifier",void 0),(0,_.Z)(this,"characterIcon",void 0),(0,_.Z)(this,"ally",!1),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"number",0),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"disableFlip",!1),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"effectClasses",""),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"AttackModifierValueType",Lt.tI),(0,_.Z)(this,"AttackModifierEffectType",Lt.US),(0,_.Z)(this,"defaultType",!0),(0,_.Z)(this,"animate",!0),(0,_.Z)(this,"multipe",!1),(0,_.Z)(this,"wildElement",!1),(0,_.Z)(this,"csOak",!1),(0,_.Z)(this,"mixedElement",void 0),(0,_.Z)(this,"orTypeEffect",void 0),(0,_.Z)(this,"townGuardEffectIcon",void 0),(0,_.Z)(this,"settingsManager",R.r)}ngOnInit(){this.animate=!this.disableFlip,this.init()}init(){this.attackModifier&&(this.csOak=this.attackModifier.id.startsWith("cs-oak"),this.newStyle=this.newStyle||this.attackModifier.type==Lt.kl.empower||this.attackModifier.type==Lt.kl.enfeeble,this.multipe=!1,this.wildElement=!1,this.mixedElement=void 0,this.orTypeEffect=void 0,this.attackModifier.effects&&(this.attackModifier.effects.find(e=>e.type==Lt.US.element)&&this.attackModifier.effects.some(e=>e.type!=Lt.US.element)&&(this.mixedElement=this.attackModifier.effects.find(e=>e.type==Lt.US.element)),this.townGuard&&(this.townGuardEffectIcon=this.attackModifier.effects.find(e=>e.type==Lt.US.custom&&e.icon)),this.multipe=this.effects().length>1&&this.effects().every(e=>e.type==Lt.US.element)||this.effects().length>1&&this.effects().every(e=>e.type==Lt.US.condition||e.type==Lt.US.pierce||e.type==Lt.US.pull||e.type==Lt.US.push)||1==this.effects().length&&this.effects().every(e=>e.type==Lt.US.elementHalf)||!1,this.wildElement=1==this.effects().length&&this.effects().every(e=>(e.type==Lt.US.element||e.type==Lt.US.elementConsume)&&"wild"==e.value),this.orTypeEffect=this.effects().find(e=>e.type==Lt.US.or),this.effects().forEach(e=>{e.type!=Lt.US.heal&&e.type!=Lt.US.shield&&(this.defaultType=!1),this.effectClasses+=e.type==Lt.US.condition||e.type==Lt.US.element||e.type==Lt.US.elementHalf?" "+e.value.replaceAll("|","-").replaceAll(":","-"):" "+e.type})))}onChange(e){this.attackModifier.revealed=e}ngOnChanges(e){const i=e.flipped;i&&!this.disableFlip&&i.currentValue&&i.currentValue!=i.previousValue&&(this.animate=!0);const s=e.attackModifier;s&&s.currentValue&&s.currentValue!=s.previousValue&&this.init()}getTarget(e){if(e.effects){const i=e.effects.find(s=>s.type==Lt.US.specialTarget);if(i)return""+i.value}return""}effects(){return(this.mixedElement?this.attackModifier.effects.filter(e=>e!=this.mixedElement):this.attackModifier.effects).filter(e=>!this.townGuard||e.type!=Lt.US.custom||!e.icon)}filter(e){return-1!=[Lt.US.element,Lt.US.elementConsume,Lt.US.elementHalf,Lt.US.condition,Lt.US.custom,Lt.US.pull,,Lt.US.push,Lt.US.pierce].indexOf(e.type)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier"]],inputs:{attackModifier:"attackModifier",characterIcon:"characterIcon",ally:"ally",numeration:"numeration",number:"number",reveal:"reveal",disableFlip:"disableFlip",flipped:"flipped",newStyle:"newStyle",townGuard:"townGuard"},features:[t.TTD],decls:9,vars:16,consts:[[3,"ngClass"],["card-reveal","",1,"card",3,"ngClass","disabled","change"],["card",""],[1,"card-back","back"],[1,"revealed"],[3,"ghs-label"],[1,"card-front","front"],[4,"ngIf"],[3,"class","ngClass",4,"ngIf"],["class","type cs-oak",4,"ngIf"],["class","type empower",4,"ngIf"],["class","type enfeeble",4,"ngIf"],["src","./assets/images/attackmodifier/overlays/custom.png",1,"overlay","custom"],["src","./assets/images/attackmodifier/overlays/custom-fh.png",1,"overlay","custom-fh"],["class","overlay",3,"ngClass","src",4,"ngIf"],["class","overlay side",3,"src",4,"ngIf"],["class","rolling","src","./assets/images/attackmodifier/rolling.svg",4,"ngIf"],["class","numeration",4,"ngIf"],["class","numeration character-curse-icon",4,"ngIf"],["class","am-value",4,"ngIf"],["class","character-icon",4,"ngIf"],["class","mixed-element",4,"ngIf"],[3,"src"],[3,"class","ngClass",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"type","multiple","wild","air"],[1,"type","multiple","wild","ice"],[1,"type","multiple","wild","fire"],[1,"type","multiple","wild","earth"],[1,"type","multiple","wild","light"],[1,"type","multiple","wild","dark"],[1,"type","cs-oak"],["src","./assets/images/attackmodifier/cs-oak.png"],[1,"type","empower"],["src","./assets/images/attackmodifier/empower.png"],[1,"type","enfeeble"],["src","./assets/images/attackmodifier/enfeeble.png"],[1,"overlay",3,"ngClass","src"],[1,"overlay","side",3,"src"],["src","./assets/images/attackmodifier/rolling.svg",1,"rolling"],[1,"numeration"],[1,"numeration","character-curse-icon"],[1,"am-value"],[1,"character-icon"],[3,"attackModifier","effects","offsetWidth","newStyle"],[1,"mixed-element"],[1,"type",3,"ngClass"],["class","town-guard-icon",4,"ngIf"],["class","am-value",3,"ngClass",4,"ngIf"],[1,"am-value",3,"ngClass"],[1,"town-guard-icon"],[3,"attackModifier","effects","offsetWidth","townGuard"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1,2),t.NdJ("change",function(l){return i.onChange(l)}),t.TgZ(3,"div",3)(4,"span",4),t._UZ(5,"span",5),t.qZA()(),t.TgZ(6,"div",6),t.YNc(7,OS,22,19,"ng-container",7),t.YNc(8,TS,7,9,"ng-container",7),t.qZA()()()),2&e){const s=t.MAs(2);t.Gre("attack-modifier ",i.attackModifier.type,""),t.Q6J("ngClass",t.VKq(11,ZS,i.townGuard)),t.xp6(1),t.Udp("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.WLB(13,AS,i.flipped||i.attackModifier.revealed,!i.animate))("disabled",!i.reveal),t.xp6(4),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(2),t.Q6J("ngIf",!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.townGuard)}},dependencies:[x.mk,x.sg,x.O5,zA,Yf,ie],styles:[".attack-modifier{position:relative;width:100%;height:100%;transition:filter 2s linear,transform .8s cubic-bezier(.75,0,.85,1),top .5s linear,left .5s linear}.attack-modifier .back{background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-back.e947b7717f678f92.png);border-radius:5%}.attack-modifier .front{display:flex;position:relative;top:0;left:0;width:100%;height:100%;border-radius:5%}.attack-modifier .front .type{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.attack-modifier .front .type img{position:absolute;top:0;left:0;width:100%;height:100%}.attack-modifier .front .type.custom.new-style{filter:none}.attack-modifier .front .type.custom.new-style~.overlay.custom{display:inline-block}.attack-modifier .front .type.custom.fh~.overlay.custom{display:none}.attack-modifier .front .type.custom.fh~.overlay.custom-fh{display:inline-block}.attack-modifier .front .type.multiple{background-image:url(am-front.48806d22feb6f4bf.png);background-size:100%}.attack-modifier .front .type.multiple.multiple-mixed-element:not(:nth-child(1)){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 25%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%);mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 25%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%)}.attack-modifier .front .type.multiple.multiple-mixed-element.multiple-mixed-element-or{-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 20%,rgb(0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 20%,rgb(0,0,0) 100%)}.attack-modifier .front .type.multiple.multiple-1:nth-child(2){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 45%,rgb(0,0,0) 55%,rgb(0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 45%,rgb(0,0,0) 55%,rgb(0,0,0) 100%)}.attack-modifier .front .type.multiple.multiple-1.fh:nth-child(2){-webkit-mask-image:conic-gradient(from 110deg at 50% 50%,rgb(0,0,0) 20%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%);mask-image:conic-gradient(from 110deg at 50% 50%,rgb(0,0,0) 20%,rgba(0,0,0,0) 25%,rgba(0,0,0,0) 70%,rgb(0,0,0) 75%)}.attack-modifier .front .type.multiple.multiple-2:nth-child(2){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 35%,rgba(0,0,0,0) 40%,rgba(0,0,0,0) 85%,rgb(0,0,0) 95%);mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 35%,rgba(0,0,0,0) 40%,rgba(0,0,0,0) 85%,rgb(0,0,0) 95%)}.attack-modifier .front .type.multiple.multiple-3:nth-child(2){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgba(0,0,0,0) 5%,rgb(0,0,0) 10%,rgb(0,0,0) 40%,rgba(0,0,0,0) 45%);mask-image:conic-gradient(from 90deg at 50% 50%,rgba(0,0,0,0) 5%,rgb(0,0,0) 10%,rgb(0,0,0) 40%,rgba(0,0,0,0) 45%)}.attack-modifier .front .type.multiple.multiple-3:nth-child(3){-webkit-mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 5%,rgba(0,0,0,0) 10%,rgba(0,0,0,0) 60%,rgb(0,0,0) 75%);mask-image:conic-gradient(from 90deg at 50% 50%,rgb(0,0,0) 5%,rgba(0,0,0,0) 10%,rgba(0,0,0,0) 60%,rgb(0,0,0) 75%)}.attack-modifier .front .type.multiple.wild.air{-webkit-mask-image:conic-gradient(from 90deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%);mask-image:conic-gradient(from 90deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%)}.attack-modifier .front .type.multiple.wild.ice{-webkit-mask-image:conic-gradient(from 180deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%);mask-image:conic-gradient(from 180deg at 50% 20%,rgba(0,0,0,0) 45%,rgb(0,0,0) 50%,rgb(0,0,0) 75%,rgba(0,0,0,0) 80%)}.attack-modifier .front .type.multiple.wild.fire{-webkit-mask-image:conic-gradient(from 270deg at 66% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 270deg at 66% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.multiple.wild.earth{-webkit-mask-image:conic-gradient(from 290deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 290deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.multiple.wild.light{-webkit-mask-image:conic-gradient(from 30deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 30deg at 50% 80%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.multiple.wild.dark{-webkit-mask-image:conic-gradient(from 40deg at 33% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%);mask-image:conic-gradient(from 40deg at 33% 30%,rgba(0,0,0,0) 35%,rgb(0,0,0) 50%,rgb(0,0,0) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 70%)}.attack-modifier .front .type.air{filter:hue-rotate(160deg) saturate(80%)}.attack-modifier .front .type.dark{filter:hue-rotate(180deg) saturate(20%) brightness(85%)}.attack-modifier .front .type.earth{filter:hue-rotate(60deg) saturate(160%)}.attack-modifier .front .type.fire{filter:hue-rotate(355deg) saturate(250%)}.attack-modifier .front .type.ice{filter:hue-rotate(165deg) saturate(250%) brightness(120%)}.attack-modifier .front .type.light{filter:hue-rotate(20deg) saturate(200%) brightness(110%)}.attack-modifier .front .type.bless{filter:hue-rotate(20deg) saturate(250%) brightness(100%)}.attack-modifier .front .type.brittle{filter:hue-rotate(175deg) saturate(90%)}.attack-modifier .front .type.curse{filter:hue-rotate(254deg) saturate(110%) brightness(90%)}.attack-modifier .front .type.disarm{filter:hue-rotate(200deg) saturate(50%) sepia(10%)}.attack-modifier .front .type.immobilize{filter:hue-rotate(330deg) saturate(200%) brightness(80%)}.attack-modifier .front .type.invisible{filter:hue-rotate(200deg) saturate(20%) brightness(70%) contrast(110%)}.attack-modifier .front .type.muddle{filter:hue-rotate(335deg) saturate(170%) sepia(40%) brightness(80%)}.attack-modifier .front .type.poison{filter:hue-rotate(80deg) saturate(90%)}.attack-modifier .front .type.regenerate{filter:hue-rotate(290deg) saturate(200%)}.attack-modifier .front .type.strengthen{filter:hue-rotate(165deg) saturate(100%)}.attack-modifier .front .type.stun{filter:hue-rotate(168deg) saturate(150%)}.attack-modifier .front .type.wound{filter:hue-rotate(355deg) saturate(250%)}.attack-modifier .front .type.push,.attack-modifier .front .type.pull{filter:grayscale(80%)}.attack-modifier .front .type.pierce{filter:hue-rotate(10deg) saturate(180%)}.attack-modifier .front .type.retaliate{filter:hue-rotate(160deg) grayscale(30%)}.attack-modifier .front .type.target{filter:hue-rotate(330deg) saturate(350%) brightness(80%)}.attack-modifier .front .type.refreshItem{filter:hue-rotate(330deg) saturate(130%)}.attack-modifier .front .type.custom{filter:hue-rotate(330deg) saturate(250%)}.attack-modifier .front img.overlay{position:absolute;width:100%;height:100%;z-index:2}.attack-modifier .front img.overlay.custom,.attack-modifier .front img.overlay.custom-fh{display:none}.attack-modifier .front img.overlay.side{top:50%;width:18%;height:auto;left:5%;transform:translateY(-50%)}.attack-modifier .front img.rolling{position:absolute;z-index:3;width:auto;height:28%;top:36%;right:5%}.attack-modifier .front .numeration{position:absolute;left:9.6%;top:74%;font-family:ghs-title;font-size:.8em;line-height:.8em;color:var(--ghs-color-white);z-index:2;width:8%;height:12%;display:flex;justify-content:center;align-items:center}.attack-modifier .front .numeration.character-curse-icon{font-size:1.8em;top:80%}.attack-modifier .front .numeration img{filter:grayscale(100%) brightness(100) contrast(100%);width:90%;height:auto}.attack-modifier .front .character-icon{position:absolute;left:7.5%;top:67%;z-index:2;width:14%;height:20%;display:flex;justify-content:center;align-items:center;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-character-icon.83c1ab396221d56b.png)}.attack-modifier .front .character-icon img{filter:grayscale(100%) brightness(100) contrast(100%);height:70%;width:auto}.attack-modifier .front .town-guard-icon{position:absolute;left:7.5%;top:67%;z-index:2;width:16%;height:24%;display:flex;justify-content:center;align-items:center;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-town-guard-icon.c02be0601faddc20.png)}.attack-modifier .front .town-guard-icon img{filter:var(--ghs-filter-white) var(--ghs-filter-shadow);height:70%;width:auto}.attack-modifier .front .am-value{position:absolute;display:flex;justify-content:center;align-items:center;top:50%;left:49.5%;width:34%;height:52%;transform:translate(-50%,-50%);font-family:ghs-title;color:var(--ghs-color-white);font-size:3.5em;z-index:1;text-shadow:1px 0px var(--ghs-color-darkgray),0px 1px var(--ghs-color-darkgray),1px 0px var(--ghs-color-darkgray),0px 1px var(--ghs-color-darkgray);filter:drop-shadow(1px 1px 1px var(--ghs-color-darkgray))}.attack-modifier .front .mixed-element{position:absolute;top:0;left:-7%;width:40%;height:40%}.attack-modifier.bless .front:before{display:none}.attack-modifier.draw{z-index:0}.attack-modifier .confirm .revealed{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:1.3em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black))}.attack-modifier.town-guard .back{background-image:url(back.86db9c801336d036.png)}.attack-modifier.town-guard .front .am-value.effects{top:43%}\n"],encapsulation:2})),a})();const SS=["menu"];function ES(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeDrawnDiscards())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.removeDrawnDiscards"))}function DS(o,a){1&o&&(t.TgZ(0,"span",31),t._UZ(1,"img",32),t.qZA())}function IS(o,a){1&o&&(t.TgZ(0,"span",31),t._UZ(1,"img",32),t.qZA())}function NS(o,a){1&o&&(t.TgZ(0,"span",31),t._UZ(1,"img",32),t.qZA())}const t_=function(o){return{disabled:o}};function JS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",18)(1,"span",19)(2,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(-1))}),t._UZ(3,"img",21),t.qZA()(),t.TgZ(4,"span",22),t._UZ(5,"img",23),t.TgZ(6,"span",24),t._uU(7),t.qZA(),t.YNc(8,DS,2,0,"span",25),t.qZA(),t.TgZ(9,"span",19)(10,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(1))}),t._UZ(11,"img",26),t.qZA()(),t.TgZ(12,"span",19)(13,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(-1))}),t._UZ(14,"img",21),t.qZA()(),t.TgZ(15,"span",22),t._UZ(16,"img",27),t.TgZ(17,"span",28),t._uU(18),t.qZA(),t.YNc(19,IS,2,0,"span",25),t.qZA(),t.TgZ(20,"span",19)(21,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(1))}),t._UZ(22,"img",26),t.qZA()(),t.TgZ(23,"span",19)(24,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeMinus1Extra(-1))}),t._UZ(25,"img",21),t.qZA()(),t.TgZ(26,"span",22),t._UZ(27,"img",29),t.TgZ(28,"span",30),t._uU(29),t.qZA(),t.YNc(30,NS,2,0,"span",25),t.qZA(),t.TgZ(31,"span",19)(32,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeMinus1Extra(1))}),t._UZ(33,"img",26),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngClass",t.VKq(18,t_,0==n.countUpcomingAttackModifier(n.AttackModifierType.bless))),t.xp6(2),t.Q6J("ghs-label","game.condition.bless")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.bless)),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingBlesses()>10),t.xp6(2),t.Q6J("ngClass",t.VKq(20,t_,n.gameManager.attackModifierManager.countUpcomingBlesses()>=10)),t.xp6(3),t.Q6J("ngClass",t.VKq(22,t_,0==n.countUpcomingAttackModifier(n.AttackModifierType.curse))),t.xp6(2),t.Q6J("ghs-label","game.condition.curse")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.countUpcomingAttackModifier(n.AttackModifierType.curse)),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countUpcomingCurses(!n.character&&!n.ally)>10),t.xp6(2),t.Q6J("ngClass",t.VKq(24,t_,n.gameManager.attackModifierManager.countUpcomingCurses(!n.character&&!n.ally)>=10)),t.xp6(3),t.Q6J("ngClass",t.VKq(26,t_,0==n.countAttackModifier(n.AttackModifierType.minus1extra))),t.xp6(2),t.Q6J("ghs-label","game.attackmodifiers.types.minus1")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.countAttackModifier(n.AttackModifierType.minus1extra)),t.xp6(1),t.Q6J("ngIf",n.gameManager.attackModifierManager.countExtraMinus1()>15),t.xp6(2),t.Q6J("ngClass",t.VKq(28,t_,n.gameManager.attackModifierManager.countExtraMinus1()>=15))}}function US(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.restoreDefault())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.restore"))}function LS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",33)(1,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.newFirst(i.type))}),t._UZ(2,"img",26),t.qZA(),t.TgZ(3,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType(!0))}),t._UZ(4,"img",35),t.qZA(),t.TgZ(5,"span",36),t._UZ(6,"img",37),t.qZA(),t.TgZ(7,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType())}),t._UZ(8,"img",38),t.qZA(),t.TgZ(9,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.newShuffle(i.type))}),t._UZ(10,"img",39),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(6),t.MGl("src","./assets/images/attackmodifier/",n.type,".png",t.LSH)}}function QS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",33)(1,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addModifier())}),t._UZ(2,"img",26),t.qZA(),t.TgZ(3,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType(!0))}),t._UZ(4,"img",35),t.qZA(),t.TgZ(5,"span",36),t._UZ(6,"ghs-attackmodifier",40),t.qZA(),t.TgZ(7,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeType())}),t._UZ(8,"img",38),t.qZA(),t.TgZ(9,"a",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addModifierShuffle())}),t._UZ(10,"img",39),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(6),t.Q6J("attackModifier",n.tgAM)("flipped",!0)("newStyle",!0)("characterIcon",n.characterIcon)("ally",n.ally)("townGuard",n.townGuard)}}function RS(o,a){1&o&&t._UZ(0,"div",17)}function FS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",45),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(i+s.deck.current+1))}),t._UZ(1,"img",21),t.qZA()}}function qS(o,a){1&o&&t._UZ(0,"div",46)}function HS(o,a){if(1&o&&(t.TgZ(0,"div",41),t._UZ(1,"ghs-attackmodifier",42),t.YNc(2,FS,2,0,"a",43),t.YNc(3,qS,1,0,"div",44),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("attackModifier",n)("numeration",e.numeration)("reveal",!0)("flipped",2==e.reveal||n.revealed)("newStyle",e.newStyle)("characterIcon",e.characterIcon)("ally",e.ally)("townGuard",e.townGuard),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}function jS(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",45),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(s.deck.current-i))}),t._UZ(1,"img",21),t.qZA()}}function BS(o,a){1&o&&t._UZ(0,"div",46)}function zS(o,a){if(1&o&&(t.TgZ(0,"div",41),t._UZ(1,"ghs-attackmodifier",47),t.YNc(2,jS,2,0,"a",43),t.YNc(3,BS,1,0,"div",44),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("attackModifier",n)("numeration",e.numeration)("flipped",!0)("newStyle",e.newStyle)("characterIcon",e.characterIcon)("ally",e.ally)("townGuard",e.townGuard),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}const $6=function(o){return{denied:o}};let W6=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"characterIcon",""),(0,_.Z)(this,"ally",!1),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"type",Lt.kl.minus1),(0,_.Z)(this,"tgAM",Lt.Bt[0]),(0,_.Z)(this,"currentAttackModifier",-1),(0,_.Z)(this,"drawing",!1),this.dialogRef=i,this.deck=e.deck,this.character=e.character,this.ally=e.ally,this.numeration=e.numeration,this.newStyle=e.newStyle,this.townGuard=e.townGuard,this.before=e.before,this.after=e.after,this.dialogRef.closed.subscribe(()=>{this.upcomingCards().forEach(s=>s.revealed=!1)})}ngOnInit(){this.character&&(this.deck=this.character.attackModifierDeck,this.numeration=""+this.character.number,this.characterIcon=this.character.iconUrl),setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},R.r.settings.disableAnimations?0:250)}toggleEdit(){this.edit=!this.edit,setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}upcomingCards(){return this.deck.cards.filter((e,i)=>i>this.deck.current)}disgardedCards(){return this.deck.cards.filter((e,i)=>i<=this.deck.current).reverse()}shuffle(){this.before.emit(new xn(this.deck,"shuffle")),d.v.attackModifierManager.shuffleModifiers(this.deck),this.after.emit(new xn(this.deck,"shuffle"))}removeDrawnDiscards(){this.before.emit(new xn(this.deck,"removeDrawnDiscards")),d.v.attackModifierManager.removeDrawnDiscards(this.deck),this.after.emit(new xn(this.deck,"removeDrawnDiscards"))}restoreDefault(){this.before.emit(new xn(this.deck,"restoreDefault")),this.character?(this.character.mergeAttackModifierDeck(d.v.attackModifierManager.buildCharacterAttackModifierDeck(this.character)),d.v.attackModifierManager.fromModel(this.deck,this.character.attackModifierDeck.toModel())):this.townGuard?this.deck=d.v.attackModifierManager.buildTownGuardAttackModifierDeck(d.v.game.party,d.v.campaignData()):(this.deck=new Lt.ut,d.v.game.party.townGuardDeck=this.deck.toModel()),this.after.emit(new xn(this.deck,"restoreDefault"))}hasDrawnDiscards(){return this.deck.cards.some((e,i)=>i<=this.deck.current&&(e.type==Lt.kl.bless||e.type==Lt.kl.curse))}dropUpcoming(e){if(this.before.emit(new xn(this.deck,"reorder")),e.container==e.previousContainer){const i=this.deck.current+1;Fn(this.deck.cards,e.previousIndex+i,e.currentIndex+i)}else{const i=this.deck.current;Fn(this.deck.cards,i-e.previousIndex,e.currentIndex+i),this.deck.current=this.deck.current-1}this.after.emit(new xn(this.deck,"reorder"))}dropDisgarded(e){if(this.before.emit(new xn(this.deck,"reorder")),e.container==e.previousContainer)Fn(this.deck.cards,this.deck.current-e.previousIndex,this.deck.current-e.currentIndex);else{this.deck.current=this.deck.current+1;const i=this.deck.current;Fn(this.deck.cards,e.previousIndex+i,i-e.currentIndex),this.deck.cards[i-e.currentIndex].revealed=!0}this.after.emit(new xn(this.deck,"reorder"))}remove(e){this.before.emit(new xn(this.deck,"removeCard",""+e)),e<=this.deck.current&&(this.deck.current--,this.currentAttackModifier=this.deck.current),this.deck.cards.splice(e,1),this.after.emit(new xn(this.deck,"removeCard",""+e))}newFirst(e){this.before.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+e));let i=new Lt.YY(e);i.revealed=!0,this.deck.cards.splice(this.deck.current+1,0,i),this.after.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+e))}newShuffle(e){this.before.emit(new xn(this.deck,"addCardShuffled","game.attackModifiers.types."+e)),this.deck.cards.splice(this.deck.current+1+Math.random()*(this.deck.cards.length-this.deck.current),0,new Lt.YY(e)),this.after.emit(new xn(this.deck,"addCardShuffled","game.attackModifiers.types."+e))}addModifier(){this.before.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type));let e=this.tgAM.clone();e.revealed=!0,this.deck.attackModifiers.find(i=>i.id==e.id)||this.deck.attackModifiers.push(e),this.deck.cards.splice(this.deck.current+1,0,e),this.after.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type))}addModifierShuffle(){this.before.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type));let e=this.tgAM.clone();this.deck.cards.splice(this.deck.current+1+Math.random()*(this.deck.cards.length-this.deck.current),0,e),this.deck.attackModifiers.find(i=>i.id==e.id)||this.deck.attackModifiers.push(e),this.after.emit(new xn(this.deck,"addCard","game.attackModifiers.types."+this.tgAM.type))}countAttackModifier(e){return this.deck.cards.filter(i=>i.type==e&&!i.character).length}countDrawnAttackModifier(e){return this.deck.cards.filter((i,s)=>i.type==e&&s<=this.deck.current).length}countUpcomingAttackModifier(e){return this.deck.cards.filter((i,s)=>i.type==e&&s>this.deck.current).length}changeAttackModifier(e,i){if(i>0){if(e==Lt.kl.bless&&d.v.attackModifierManager.countUpcomingBlesses()>=10)return;if(e==Lt.kl.curse&&d.v.attackModifierManager.countUpcomingCurses(!this.character&&!this.ally)>=10)return;if(e==Lt.kl.minus1&&d.v.attackModifierManager.countExtraMinus1()>=15)return;d.v.attackModifierManager.addModifier(this.deck,new Lt.YY(e))}else if(i<0){const s=this.deck.cards.find((l,m)=>l.type==e&&m>this.deck.current);s&&this.deck.cards.splice(this.deck.cards.indexOf(s),1)}}changeBless(e){this.before.emit(new xn(this.deck,e<0?"removeBless":"addBless")),this.changeAttackModifier(Lt.kl.bless,e),this.after.emit(new xn(this.deck,e<0?"removeBless":"addBless"))}changeCurse(e){this.before.emit(new xn(this.deck,e<0?"removeCurse":"addCurse")),this.changeAttackModifier(Lt.kl.curse,e),this.after.emit(new xn(this.deck,e<0?"removeCurse":"addCurse"))}changeMinus1Extra(e){this.before.emit(new xn(this.deck,e<0?"removeMinus1":"addMinus1")),this.changeAttackModifier(Lt.kl.minus1extra,e),this.after.emit(new xn(this.deck,e<0?"removeMinus1":"addMinus1"))}onChange(e,i){e.revealed=i}changeType(e=!1){if(this.townGuard){let i=Lt.Bt.indexOf(this.tgAM)+(e?-1:1);i<0?i=Lt.Bt.length-1:i>=Lt.Bt.length&&(i=0),this.tgAM=Lt.Bt[i]}else{let i=Object.values(Lt.kl).indexOf(this.type)+(e?-1:1);i<0?i=Object.values(Lt.kl).length-1:i>=Object.values(Lt.kl).length&&(i=0),this.type=Object.values(Lt.kl)[i],-1!=[Lt.kl.plus,Lt.kl.plus3,Lt.kl.plus4,Lt.kl.plusX,Lt.kl.invalid,Lt.kl.minus,Lt.kl.minus1extra,Lt.kl.empower,Lt.kl.enfeeble,Lt.kl.townguard,Lt.kl.success,Lt.kl.wreck].indexOf(this.type)&&this.changeType(e)}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-deck-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(SS,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},decls:25,vars:26,consts:[[1,"attack-modifiers-dialog"],[1,"scroll-container"],[1,"menu",3,"ngClass"],["menu",""],[3,"click"],[3,"ghs-label"],[3,"click",4,"ngIf"],["type","checkbox",3,"checked","click"],["class","curse-bless",4,"ngIf"],["class","insert-menu",4,"ngIf"],[1,"attack-modifiers-container"],["cdkDropList","",1,"upcoming","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","ngClass","cdkDropListDropped"],["upcomingList","cdkDropList"],["class","empty",4,"ngIf"],["class","attack-modifier-container","cdkDrag","",4,"ngFor","ngForOf"],["cdkDropList","",1,"disgarded","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["disgardedList","cdkDropList"],[1,"empty"],[1,"curse-bless"],[1,"item"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/bless.svg"],[1,"badge","bless-count"],["class","warning",4,"ngIf"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/status/curse.svg"],[1,"badge","curse-count"],["src","./assets/images/attackmodifier/icons/minus1.png"],[1,"badge","minus1-count"],[1,"warning"],["src","./assets/images/warning.svg"],[1,"insert-menu"],[1,"icon-button",3,"click"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"attack-modifier"],[3,"src"],["src","./assets/images/right.svg",1,"ghs-svg"],["src","./assets/images/shuffle.svg",1,"ghs-svg"],[1,"drag-hidden",3,"attackModifier","flipped","newStyle","characterIcon","ally","townGuard"],["cdkDrag","",1,"attack-modifier-container"],[1,"drag-hidden",3,"attackModifier","numeration","reveal","flipped","newStyle","characterIcon","ally","townGuard"],["class","button-remove",3,"click",4,"ngIf"],["cdkDragHandle","","class","drag-handle",4,"ngIf"],[1,"button-remove",3,"click"],["cdkDragHandle","",1,"drag-handle"],[1,"drag-hidden",3,"attackModifier","numeration","flipped","newStyle","characterIcon","ally","townGuard"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"a",4),t.NdJ("click",function(){return i.reveal=(i.reveal+1)%3}),t._UZ(5,"span",5),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return i.shuffle()}),t._UZ(7,"span",5),t.qZA(),t.YNc(8,ES,2,1,"a",6),t.TgZ(9,"label")(10,"input",7),t.NdJ("click",function(){return i.toggleEdit()}),t.qZA(),t._UZ(11,"span",5),t.qZA(),t.YNc(12,JS,34,30,"div",8),t.YNc(13,US,2,1,"a",6),t.YNc(14,LS,11,1,"div",9),t.YNc(15,QS,11,6,"div",9),t.qZA(),t.TgZ(16,"div",10)(17,"div",11,12),t.NdJ("cdkDropListDropped",function(l){return i.dropUpcoming(l)}),t.YNc(19,RS,1,0,"div",13),t.YNc(20,HS,4,10,"div",14),t.qZA(),t.TgZ(21,"div",15,16),t.NdJ("cdkDropListDropped",function(l){return i.dropDisgarded(l)}),t._UZ(23,"div",17),t.YNc(24,zS,4,9,"div",14),t.qZA()()()()),2&e){const s=t.MAs(18),l=t.MAs(22);t.xp6(2),t.Q6J("ngClass",t.VKq(22,$6,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.attackModifiers&&(!i.character||!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]))),t.xp6(3),t.Q6J("ghs-label",2==i.reveal?"game.cards.coverAll":0==i.reveal?"game.cards.revealAll":"game.cards.revealAllConfirm"),t.xp6(2),t.Q6J("ghs-label","game.cards.shuffle"),t.xp6(1),t.Q6J("ngIf",i.hasDrawnDiscards()),t.xp6(2),t.Q6J("checked",i.edit),t.xp6(1),t.Q6J("ghs-label","game.cards.edit"),t.xp6(1),t.Q6J("ngIf",!i.edit&&!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit&&!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.edit&&i.townGuard),t.xp6(1),t.Udp("max-height",i.maxHeight),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",l)("cdkDropListAutoScrollStep",20)("ngClass",t.VKq(24,$6,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.attackModifiers&&(!i.character||!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]))),t.xp6(2),t.Q6J("ngIf",0==i.upcomingCards().length),t.xp6(1),t.Q6J("ngForOf",i.upcomingCards()),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",s)("cdkDropListAutoScrollStep",20),t.xp6(3),t.Q6J("ngForOf",i.disgardedCards())}},dependencies:[x.mk,x.sg,x.O5,Bs,Ms,Zr,JO,ie],styles:['.attack-modifiers-dialog[_ngcontent-%COMP%]{position:relative}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap;max-width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%]{display:flex;max-width:calc(100% - var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * 2)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .curse-bless[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%]{display:flex;align-items:center;flex-basis:100%;flex-shrink:0;max-width:calc(100% - var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * 2)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .attack-modifier[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));flex-grow:1}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .attack-modifier[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:auto;border-radius:5%}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .attack-modifier[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 19.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 13 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .drop-list[_ngcontent-%COMP%]{position:relative}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor));overflow:auto}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 30 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 17 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .attack-modifier-container[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .7 * var(--ghs-dialog-factor));display:block;border-style:dashed;border-width:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));border-color:var(--ghs-color-white);width:calc(var(--ghs-unit) * 25.1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 16.6 * var(--ghs-dialog-factor));border-radius:5%}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .attack-modifiers-dialog[_ngcontent-%COMP%] .attack-modifiers-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;left:50%;top:50%;width:50%;height:70%;transform:translate(-50%,-50%)}.cdk-drag-preview[_ngcontent-%COMP%]{opacity:0;cursor:grabbing;z-index:999}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.5;cursor:grabbing}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}']})),a})();function GS(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",8),t._uU(2),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",n.gameManager.characterManager.characterName(n.character,!0)," \xa0 ")}}function VS(o,a){1&o&&t._UZ(0,"img",10)}function YS(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",11),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","monster"))}function KS(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",11),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function $S(o,a){if(1&o&&(t.ynx(0),t.YNc(1,VS,1,0,"img",9),t.YNc(2,YS,3,1,"span",3),t.YNc(3,KS,3,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf","m"==n.numeration),t.xp6(1),t.Q6J("ngIf","m"==n.numeration),t.xp6(1),t.Q6J("ngIf","A"==n.numeration)}}function WS(o,a){1&o&&t._UZ(0,"span",11),2&o&&t.Q6J("ghs-label","game.attackModifiers")}function XS(o,a){1&o&&t._UZ(0,"span",11),2&o&&t.Q6J("ghs-label","party.campaign.townGuardDeck")}function tE(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("\xa0",n.numeration,"")}}const eE=function(o){return{vertical:o}};let Pw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"ally",void 0),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),(0,_.Z)(this,"gameManager",d.v),this.dialogRef=i,this.deck=e.deck,this.character=e.character,this.ally=e.ally,this.numeration=e.numeration,this.newStyle=e.newStyle,this.townGuard=e.townGuard,this.before=e.before,this.after=e.after}beforeAttackModifierDeck(e){this.before.emit(e)}afterAttackModifierDeck(e){this.after.emit(e)}vertical(){return window.innerWidth<800}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-deck-fullscreen"]],decls:12,vars:16,consts:[[1,"attack-modifiers-fullscreen"],[1,"header"],[1,"title"],[4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"attack-modifierdeck-container",3,"ngClass"],[3,"deck","character","ally","numeration","fullscreen","vertical","townGuard","initTimeout","before","after"],[1,"close-container",3,"click"],[1,"icon",3,"src"],["class","icon","src","./assets/images/monster/enemy.png",4,"ngIf"],["src","./assets/images/monster/enemy.png",1,"icon"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,GS,3,2,"ng-container",3),t.YNc(4,$S,4,3,"ng-container",3),t.YNc(5,WS,1,1,"span",4),t.YNc(6,XS,1,1,"span",4),t.YNc(7,tE,2,1,"span",3),t.qZA()(),t.TgZ(8,"div",5)(9,"ghs-attackmodifier-deck",6),t.NdJ("before",function(l){return i.beforeAttackModifierDeck(l)})("after",function(l){return i.afterAttackModifierDeck(l)}),t.qZA(),t.TgZ(10,"div",7),t.NdJ("click",function(){return i.dialogRef.close()}),t.qZA()(),t.TgZ(11,"div",7),t.NdJ("click",function(){return i.dialogRef.close()}),t.qZA()()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",!i.character&&!i.townGuard),t.xp6(1),t.Q6J("ngIf",!i.townGuard),t.xp6(1),t.Q6J("ngIf",i.townGuard),t.xp6(1),t.Q6J("ngIf",!i.character&&"m"!=i.numeration&&"A"!=i.numeration),t.xp6(1),t.Q6J("ngClass",t.VKq(14,eE,i.vertical())),t.xp6(1),t.Q6J("deck",i.deck)("character",i.character)("ally",i.ally)("numeration",i.numeration)("fullscreen",!1)("vertical",i.vertical())("townGuard",i.townGuard)("initTimeout",1))},styles:[".attack-modifiers-fullscreen[_ngcontent-%COMP%]{width:100vw;height:100vh}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:1}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));cursor:initial}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));width:auto;margin-right:.2em}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%]{position:relative;width:100%;height:30vw;max-height:350px;overflow-x:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:3}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:800px;height:25.5vw;max-height:213px;z-index:3;margin-top:2em;margin-left:1%}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;width:99vw;max-width:800px;height:100%;max-height:initial}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .attack-modifierdeck-container.vertical[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:calc(100% - var(--ghs-unit) * 10 * var(--ghs-text-factor));max-height:initial;transform:none}.attack-modifiers-fullscreen[_ngcontent-%COMP%] .close-container[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;display:flex;width:100%;height:100%;z-index:2;top:0;left:0}"]})),a})();function nE(o,a){1&o&&t._UZ(0,"img",15)}function iE(o,a){1&o&&t._UZ(0,"img",16)}const oE=function(){return[]};function aE(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"div",8),t.TgZ(2,"div",9),t._UZ(3,"span",10),t.qZA(),t.TgZ(4,"div",11),t.YNc(5,nE,1,0,"img",12),t.ALo(6,"ghsRange"),t.qZA(),t.TgZ(7,"div",13),t._uU(8),t.YNc(9,iE,1,0,"img",14),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.battleGoals."+n.battleGoal.cardId),t.xp6(2),t.Q6J("ghs-label","data.battleGoals."+n.battleGoal.cardId+".text"),t.xp6(2),t.Q6J("ngForOf",t.xi3(6,5,t.DdM(8,oE),n.battleGoal.checks)),t.xp6(3),t.hij(" ",n.battleGoal.cardId," "),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.fhStyle)}}const sE=function(o,a,n,e,i){return{flipped:o,selected:a,disabled:n,filtered:e,fh:i}};let yw=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"battleGoal",void 0),(0,_.Z)(this,"identifier",void 0),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"selected",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"filtered",!1),(0,_.Z)(this,"reveal",!1)}ngOnChanges(e){e.identifier&&e.identifier.previousValue!=e.identifier.currentValue&&!this.battleGoal&&this.identifier&&(this.battleGoal=d.v.battleGoalManager.getBattleGoal(this.identifier))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-battlegoal"]],inputs:{battleGoal:"battleGoal",identifier:"identifier",flipped:"flipped",selected:"selected",disabled:"disabled",filtered:"filtered",reveal:"reveal"},features:[t.TTD],decls:8,vars:12,consts:[[1,"battlegoal-container"],["container",""],["card-reveal","",1,"card","vertical","reverse","battlegoal",3,"ngClass","disabled"],[1,"card-front"],[4,"ngIf"],[1,"card-back"],[1,"revealed"],[3,"ghs-label"],[1,"name",3,"ghs-label"],[1,"text"],[1,"placeholder",3,"ghs-label"],[1,"checks"],["src","./assets/images/check.svg",4,"ngFor","ngForOf"],[1,"card-id"],["src","./assets/images/fh/battlegoals/winter.svg",4,"ngIf"],["src","./assets/images/check.svg"],["src","./assets/images/fh/battlegoals/winter.svg"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0,1)(2,"div",2)(3,"div",3),t.YNc(4,aE,10,9,"ng-container",4),t.qZA(),t.TgZ(5,"div",5)(6,"span",6),t._UZ(7,"span",7),t.qZA()()()()),2&e){const s=t.MAs(1);t.xp6(2),t.Udp("font-size",.072*s.offsetWidth+"px"),t.Q6J("ngClass",t.qbA(6,sE,i.flipped,i.selected,i.disabled,i.filtered,i.settingsManager.settings.fhStyle))("disabled",!i.reveal),t.xp6(2),t.Q6J("ngIf",i.battleGoal),t.xp6(3),t.Q6J("ghs-label","game.cards.confirmReveal")}},dependencies:[x.mk,x.sg,x.O5,Yf,ie,Ii],styles:[".battlegoal-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-bottom:147%}.battlegoal[_ngcontent-%COMP%]{cursor:pointer;position:absolute;width:100%;height:100%;border:.2em solid transparent;border-radius:.5em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%]{background-image:url(battle-goal-front.e7531094c588ed2e.png);background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{position:absolute;top:22.5%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;transform:translate(-50%);font-family:var(--ghs-font-title);color:var(--ghs-color-black);font-size:1.5em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{position:absolute;top:30%;left:50%;width:55%;height:40%;display:flex;justify-content:center;align-items:center;text-align:center;transform:translate(-50%);font-family:var(--ghs-font-text);color:var(--ghs-color-black);font-size:1em;line-height:1em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .checks[_ngcontent-%COMP%]{position:absolute;top:70%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;transform:translate(-50%)}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .checks[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.5em;width:auto;margin:0 .2em}.battlegoal[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;top:80%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;text-align:center;text-transform:uppercase;transform:translate(-50%);font-family:var(--ghs-font-normal);font-size:.75em;color:var(--ghs-color-white);filter:var(--ghs-filter-outline-thin)}.battlegoal[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%]{background-image:url(battle-goal-back.d069b60d499428ec.png);background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.battlegoal.confirm[_ngcontent-%COMP%] .revealed[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--ghs-color-white);font-size:1.5em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black))}.battlegoal.disabled[_ngcontent-%COMP%]{cursor:initial}.battlegoal.selected[_ngcontent-%COMP%]{border-color:var(--ghs-color-green)}.battlegoal.filtered[_ngcontent-%COMP%]{border-color:var(--ghs-color-red)}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%]{background-image:url(battle-goal-front-fh.9cbd213e8708b674.png)}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal)}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{color:var(--ghs-color-brown);filter:none;font-weight:700}.battlegoal.fh[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-left:.1em;filter:var(--ghs-filter-brown)}.battlegoal.fh[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%]{background-image:url(battle-goal-back-fh.60856d4f807bfc05.png)}"]})),a})();const rE=function(o){return[o]},X6=function(o){return{selected:o}};function cE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",4)(1,"span",11),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.selectEdition(s))}),t.qZA(),t.TgZ(2,"span",6),t._uU(3),t.qZA(),t.TgZ(4,"input",12),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEdition(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.battleGoals.edition")("ghs-label-args",t.VKq(6,rE,n))("ngClass",t.VKq(8,X6,n==e.currentEdition)),t.xp6(2),t.hij("(",e.gameManager.battleGoalManager.getBattleGoalsForEdition(n).length,")"),t.xp6(1),t.Q6J("checked",-1!=e.gameManager.game.battleGoalEditions.indexOf(n)||e.gameManager.editionRules(n,!1))("disabled",e.gameManager.editionRules(n,!1))}}function lE(o,a){1&o&&t._UZ(0,"span",13),2&o&&t.Q6J("ghs-label","game.battleGoals.setup.empty")}const gE=function(o){return{disabled:o}};function dE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-battlegoal",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleFilter(s))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("battleGoal",n)("flipped",!0)("disabled",!e.selected(n)&&!e.filtered(n)||e.selectedAlias(n))("reveal",!1)("selected",!e.selectedAlias(n)&&e.selected(n))("filtered",e.filtered(n))("ngClass",t.VKq(7,gE,n.alias&&e.selectedAlias(n)))}}let UO=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"currentEdition",""),(0,_.Z)(this,"editions",[]),(0,_.Z)(this,"battleGoals",[]),this.dialogRef=e,this.editions=d.v.battleGoalManager.getBattleGoalEditions(),d.v.game.edition&&-1!=d.v.battleGoalManager.getBattleGoalEditions().indexOf(d.v.game.edition)&&(!d.v.game.battleGoalEditions||0==d.v.game.battleGoalEditions.length||1==d.v.game.battleGoalEditions.length&&-1!=d.v.game.battleGoalEditions.indexOf(d.v.game.edition))&&this.selectEdition(d.v.game.edition),this.update()}selectedAlias(e){return e.alias&&null!=d.v.battleGoalManager.getBattleGoals().find(i=>e.alias&&i.edition==e.alias.edition&&i.name==e.alias.name)||!1}selectEdition(e=""){this.currentEdition=e,this.update()}update(){this.battleGoals=this.currentEdition?d.v.battleGoalManager.getBattleGoalsForEdition(this.currentEdition):d.v.battleGoalManager.getBattleGoals(!1,!0)}toggleEdition(e){d.v.editionRules(e,!1)||(d.v.game.battleGoalEditions=d.v.game.battleGoalEditions||[],d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals||[],d.v.stateManager.before("battleGoals.setup."+(-1==d.v.game.battleGoalEditions.indexOf(e)?"addEdition":"removeEdition"),e),-1==d.v.game.battleGoalEditions.indexOf(e)?d.v.game.battleGoalEditions.push(e):(d.v.game.battleGoalEditions=d.v.game.battleGoalEditions.filter(i=>i!=e),d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals.filter(i=>i.edition!=e)),d.v.stateManager.after(),this.update())}selected(e){return!this.filtered(e)&&(e.edition==d.v.game.edition||-1!=d.v.game.battleGoalEditions.indexOf(e.edition))}filtered(e){return null!=d.v.game.filteredBattleGoals.find(i=>i.edition==e.edition&&i.name==e.name)}toggleFilter(e){d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals||[],d.v.stateManager.before("battleGoals.setup.filter."+(this.filtered(e)?"addCard":"removeCard"),e.edition,e.name),this.filtered(e)?d.v.game.filteredBattleGoals=d.v.game.filteredBattleGoals.filter(i=>i.edition!=e.edition||i.name!=e.name):this.selected(e)&&!this.selectedAlias(e)&&d.v.game.filteredBattleGoals.push(new Vn.xb(e.name,e.edition)),d.v.stateManager.after(),this.update()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-battlegoal-setup"]],decls:12,vars:9,consts:[[1,"battle-goals-setup-dialog"],[1,"scroll-container"],[1,"header",3,"ghs-label"],[1,"editions"],[1,"edition"],[1,"name",3,"ghs-label","ngClass","click"],[1,"size"],["class","edition",4,"ngFor","ngForOf"],[1,"battle-goals"],["class","warning",3,"ghs-label",4,"ngIf"],["class","battlegoal",3,"battleGoal","flipped","disabled","reveal","selected","filtered","ngClass","click",4,"ngFor","ngForOf"],[1,"name",3,"ghs-label","ghs-label-args","ngClass","click"],["type","checkbox",3,"checked","disabled","change"],[1,"warning",3,"ghs-label"],[1,"battlegoal",3,"battleGoal","flipped","disabled","reveal","selected","filtered","ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"div",3)(4,"div",4)(5,"span",5),t.NdJ("click",function(){return i.selectEdition()}),t.qZA(),t.TgZ(6,"span",6),t._uU(7),t.qZA()(),t.YNc(8,cE,5,10,"div",7),t.qZA(),t.TgZ(9,"div",8),t.YNc(10,lE,1,1,"span",9),t.YNc(11,dE,1,9,"ghs-battlegoal",10),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","game.battleGoals.setup"),t.xp6(3),t.Q6J("ghs-label","game.battleGoals.all")("ngClass",t.VKq(7,X6,""==i.currentEdition)),t.xp6(2),t.hij("(",i.gameManager.battleGoalManager.getBattleGoals().length,")"),t.xp6(1),t.Q6J("ngForOf",i.editions),t.xp6(2),t.Q6J("ngIf",0==i.battleGoals.length),t.xp6(1),t.Q6J("ngForOf",i.battleGoals))},dependencies:[x.mk,x.sg,x.O5,yw,ie],styles:[".battle-goals-setup-dialog[_ngcontent-%COMP%]{position:relative;width:100%}.battle-goals-setup-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{cursor:pointer}.battle-goals-setup-dialog[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%] .name.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));font-weight:700}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] ghs-battlegoal[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor))}.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] ghs-battlegoal.disabled[_ngcontent-%COMP%]{opacity:.5}@media (max-width: 600px),(orientation: portrait){.battle-goals-setup-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}"]})),a})();function hE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-battlegoal",8),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.select(s))})("doubleClick",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.select(s,!0))}),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("battleGoal",n)("flipped",i.gameManager.roundManager.firstRound||i.selected==e||!i.character.battleGoal||-1!=i.revealed.indexOf(e))("selected",i.selected==e)("reveal",i.gameManager.game.round>0&&i.selected!=e&&i.character.battleGoal&&-1==i.revealed.indexOf(e))("disabled",i.character.battleGoal&&i.gameManager.game.scenario&&i.gameManager.game.round>0||!1)}}const uE=function(o){return{disabled:o}};function _E(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",9)(1,"a",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancel())}),t.qZA(),t.TgZ(2,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.accept())}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.battleGoals.cancel"),t.xp6(1),t.Q6J("ngClass",t.VKq(3,uE,-1==n.selected))("ghs-label","game.battleGoals.chooseCard")}}const pE=function(o,a){return[o,a]};let bw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"battleGoals",[]),(0,_.Z)(this,"revealed",[]),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"selected",void 0),(0,_.Z)(this,"cardOnly",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.character=e.character,this.selected=this.character.battleGoal?0:-1,this.cardOnly=e.cardOnly,0==d.v.battleGoalManager.getBattleGoals().length?this.dialog.open(UO,{panelClass:["dialog"]}).closed.subscribe({next:()=>{d.v.battleGoalManager.getBattleGoals().length>(d.v.fhRules()||R.r.settings.battleGoalsFh?2:1)&&e.draw?this.drawCards():this.close()}}):e.draw?this.drawCards():this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.character=d.v.game.figures.find(l=>l instanceof oe.z&&l.edition==this.character.edition&&l.name==this.character.name)||this.character,this.selected=this.character.battleGoal?0:-1,this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}drawCards(){d.v.battleGoalManager.getBattleGoals().length>(d.v.fhRules()||R.r.settings.battleGoalsFh?2:1)&&(d.v.stateManager.before("battleGoals.drawCards","data.character."+this.character.name),this.character.battleGoals=[],this.character.battleGoal=!1,d.v.battleGoalManager.drawBattleGoal(this.character),d.v.battleGoalManager.drawBattleGoal(this.character),(d.v.fhRules()||R.r.settings.battleGoalsFh)&&d.v.battleGoalManager.drawBattleGoal(this.character),d.v.stateManager.after()),this.update()}update(){this.battleGoals=this.character.battleGoals.map(e=>d.v.battleGoalManager.getBattleGoal(e)).filter(e=>e).map(e=>e),this.character.battleGoal&&-1==this.revealed.indexOf(0)&&this.revealed.push(0)}drawCard(){d.v.stateManager.before("battleGoals.drawCard","data.character."+this.character.name),d.v.battleGoalManager.drawBattleGoal(this.character),d.v.stateManager.after(),this.update()}select(e,i=!1){!this.cardOnly&&(i||!this.character.battleGoal||d.v.roundManager.firstRound)&&(-1==this.revealed.indexOf(e)&&this.revealed.push(e),-1!=this.selected&&-1==this.revealed.indexOf(this.selected)&&this.revealed.push(this.selected),this.selected=this.selected==e?-1:e)}setup(){this.dialog.open(UO,{panelClass:["dialog"]}).closed.subscribe({next:()=>{d.v.battleGoalManager.getBattleGoals().length<(d.v.fhRules()||R.r.settings.battleGoalsFh?3:2)?this.close():this.update()}})}accept(){(-1!=this.selected&&!this.character.battleGoal||0!=this.selected&&this.character.battleGoal)&&(d.v.stateManager.before("battleGoals."+(-1!=this.selected?"select":"deselect"),"data.character."+this.character.name),-1!=this.selected?(this.character.battleGoal=!0,Fn(this.character.battleGoals,this.selected,0)):this.character.battleGoal=!1,d.v.stateManager.after()),this.close()}cancel(){this.selected=this.character.battleGoal?0:-1,this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-battlegoals"]],decls:11,vars:10,consts:[[1,"battle-goals-dialog"],[1,"scroll-container"],[1,"header",3,"ghs-label","ghs-label-args"],[1,"battle-goals"],["ghs-pointer-input","",3,"battleGoal","flipped","selected","reveal","disabled","singleClick","doubleClick",4,"ngFor","ngForOf"],["class","menu",4,"ngIf"],[1,"menu","small"],[3,"ghs-label","click"],["ghs-pointer-input","",3,"battleGoal","flipped","selected","reveal","disabled","singleClick","doubleClick"],[1,"menu"],[1,"cancel",3,"ghs-label","click"],[1,"accept",3,"ngClass","ghs-label","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"div",3),t.YNc(4,hE,1,5,"ghs-battlegoal",4),t.qZA(),t.YNc(5,_E,3,5,"div",5),t.TgZ(6,"div",6)(7,"a",7),t.NdJ("click",function(){return i.drawCards()}),t.qZA(),t.TgZ(8,"a",7),t.NdJ("click",function(){return i.drawCard()}),t.qZA()(),t.TgZ(9,"div",6)(10,"a",7),t.NdJ("click",function(){return i.setup()}),t.qZA()()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label",i.character.battleGoal?"game.battleGoals.chosen":"game.battleGoals.choose")("ghs-label-args",t.WLB(7,pE,i.character.name,i.gameManager.characterManager.characterName(i.character))),t.xp6(2),t.Q6J("ngForOf",i.battleGoals),t.xp6(1),t.Q6J("ngIf",!i.character.battleGoal||0!=i.selected),t.xp6(2),t.Q6J("ghs-label","game.battleGoals.drawCards"),t.xp6(1),t.Q6J("ghs-label","game.battleGoals.drawCard"),t.xp6(2),t.Q6J("ghs-label","game.battleGoals.setup"))},dependencies:[x.mk,x.sg,x.O5,yw,ie,An],styles:[".battle-goals-dialog[_ngcontent-%COMP%]{position:relative}.battle-goals-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{text-align:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.battle-goals-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.battle-goals-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] ghs-battlegoal[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.battle-goals-dialog[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor)) 0;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.battle-goals-dialog[_ngcontent-%COMP%] .menu.small[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)) 0;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor))}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center;margin:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.accept[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.battle-goals-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}"]})),a})();const fE=["menu"],mE=["drawCard"];function vE(o,a){1&o&&t._UZ(0,"img",15)}function CE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openBattleGoals(i))}),t._UZ(1,"img",13),t.YNc(2,vE,1,0,"img",14),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.battleGoals")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/battlegoals/battle-goal-back-fh.png":"./assets/images/battlegoals/battle-goal-back.png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.character.battleGoal&&n.character.battleGoals.length>0)}}function ME(o,a){1&o&&t._UZ(0,"img",16),2&o&&t.Q6J("ghs-label","game.cards.openDialog")("ghs-label-attribute","title")}function OE(o,a){if(1&o&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.numeration)}}function PE(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",13),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.characterIcon,t.LSH)}}const yE=function(o,a){return{vertical:o,minimize:a}};function bE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openFullscreen(i))}),t._UZ(1,"img",20),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.fullscreen")("ghs-label-attribute","title")("ngClass",t.WLB(3,yE,n.vertical,!n.deck.active))}}const xE=function(o,a,n){return{vertical:o,"without-fullscreen":a,minimize:n}};function wE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.open(i))}),t._UZ(1,"img",22),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.openDialog")("ghs-label-attribute","title")("ngClass",t.kEZ(3,xE,n.vertical,!n.fullscreen,!n.deck.active))}}const kE=function(o,a,n,e,i,s,l,m,O,k){return{disgarded:o,current:a,last:n,bottom:e,rolling:i,active:s,"disgard-active":l,animate:m,"animate-reverse":O,disabled:k}};function TE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",24),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw();return t.KtG(l.clickCard(s,i))}),t._UZ(1,"ghs-attackmodifier",25),t.qZA()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(),l=t.MAs(3);t.Udp("z-index",e>s.current?s.deck.cards.length-e:s.deck.cards.length+e+1)("left",i.rolling&&!s.vertical&&s.rollingIndex[e]?"calc(75% + "+(s.rollingIndex[e]-1)+" * 25%)":"")("top",i.rolling&&s.vertical&&s.rollingIndex[e]?"calc("+l.offsetHeight/1.3*(s.rollingIndex[e]-1)+"px)":""),t.Q6J("ngClass",t.rFY(17,kE,[es.rollingIndexPrev[e],e0||e>i.current-3||e>=i.current&&n.active&&-1==i.deck.disgarded.indexOf(e)))}}const AE=function(o,a,n){return{disabled:o,vertical:a,character:n}},SE=function(o){return{denied:o}},EE=function(o,a){return{"town-guard":o,disabled:a}},DE=function(o){return{"has-shuffle":o}};class xn{constructor(a,n,...e){(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"values",void 0),this.deck=a,this.type=n,this.values=e}}let Kf=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"ally",!1),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"bottom",!1),(0,_.Z)(this,"before",new t.vpe),(0,_.Z)(this,"after",new t.vpe),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"fullscreen",!0),(0,_.Z)(this,"vertical",!1),(0,_.Z)(this,"townGuard",!1),(0,_.Z)(this,"battleGoals",!0),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"initTimeout",1500),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"characterIcon",""),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"type",Lt.kl.minus1),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"drawTimeout",null),(0,_.Z)(this,"queue",0),(0,_.Z)(this,"queueTimeout",null),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"rollingIndex",[]),(0,_.Z)(this,"rollingIndexPrev",[]),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"initServer",!1),(0,_.Z)(this,"drawCard",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.element.nativeElement.addEventListener("click",s=>{let l=document.elementsFromPoint(s.clientX,s.clientY);l[0].classList.contains("attack-modifiers")&&l.length>2&&l[2].click()})}ngOnInit(){this.character?(this.deck=this.character.attackModifierDeck,this.edition=this.character.edition,this.numeration=""+this.character.number,this.characterIcon=this.character.iconUrl):this.battleGoals=!1,this.current=this.deck.current,this.compact=!this.drawing&&this.fullscreen&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400),this.deck.cards.forEach((e,i)=>{this.rollingIndex[i]=this.calcRollingIndex(i,this.current),this.rollingIndexPrev[i]=this.calcRollingIndex(i,this.current-1)}),this.init||(this.drawTimeout=setTimeout(()=>{this.current=this.deck.current,this.drawTimeout=null,this.init=!0},R.r.settings.disableAnimations?0:this.initTimeout)),this.uiChangeSubscription=d.v.uiChange.subscribe({next:e=>{this.update(e)}}),this.edition&&!this.newStyle&&(this.newStyle=d.v.newAmStyle(this.edition)),R.r.settings.fhStyle&&(this.newStyle=!0),this.disabled=!this.standalone&&(!this.townGuard&&d.v.game.state==ge.D2.draw||this.townGuard&&null!=d.v.game.scenario),window.addEventListener("resize",e=>{this.compact=R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)}),window.addEventListener("fullscreenchange",e=>{this.compact=R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){e.deck&&this.update()}update(e=!1){this.disabled=!this.standalone&&(!this.townGuard&&d.v.game.state==ge.D2.draw||this.townGuard&&null!=d.v.game.scenario),this.character&&this.deck!=this.character.attackModifierDeck&&(this.deck=this.character.attackModifierDeck),this.initServer&&d.v.stateManager.wsState()!=WebSocket.OPEN&&(this.initServer=!1),this.deck.active?!this.init||e&&!this.initServer?(this.current=this.deck.current,e&&!this.initServer&&(this.initServer=!0)):this.current{this.rollingIndex[s]=this.calcRollingIndex(s,this.current),this.rollingIndexPrev[s]=this.calcRollingIndex(s,this.current-1)}),this.compact=R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)}drawQueue(){this.drawing=!0,this.element.nativeElement.getElementsByClassName("attack-modifiers")[0].classList.add("drawing"),this.queueTimeout=setTimeout(()=>{this.drawing=!1,this.queueTimeout=null,this.queue>0?(this.queue--,this.current++,this.drawQueue()):(this.element.nativeElement.getElementsByClassName("attack-modifiers")[0].classList.remove("drawing"),this.queue<0&&(this.queue=0))},R.r.settings.disableAnimations?0:this.vertical?1050:1850)}draw(e){this.compact&&this.fullscreen?this.openFullscreen(e):this.disabled?this.dialog.open(W6,{panelClass:"dialog",data:{deck:this.deck,character:this.character,ally:this.ally,numeration:this.numeration,newStyle:this.newStyle,townGuard:this.townGuard,before:this.before,after:this.after}}):!this.drawTimeout&&this.deck.current{this.before.emit(new xn(this.deck,"draw")),d.v.attackModifierManager.drawModifier(this.deck),this.after.emit(new xn(this.deck,"draw")),this.drawTimeout=null},R.r.settings.disableAnimations?0:150))}openFullscreen(e){this.dialog.open(Pw,{backdropClass:"fullscreen-backdrop",data:{deck:this.deck,character:this.character,ally:this.ally,numeration:this.numeration,newStyle:this.newStyle,townGuard:this.townGuard,before:this.before,after:this.after}}),e.preventDefault(),e.stopPropagation()}openBattleGoals(e){this.dialog.open(bw,{panelClass:["dialog"],data:{character:this.character,draw:!this.character.battleGoals||0==this.character.battleGoals.length}}),e.preventDefault(),e.stopPropagation()}calcRollingIndex(e,i){const s=this.deck.cards[e];if(!s.rolling||s.active&&-1!=this.deck.disgarded.indexOf(e)||i<0)return 0;if(e==i-2)return 2;if(el.rolling))return i-e;if(e-1&&this.deck.cards[m].rolling&&!this.deck.cards[m].active;)m--,l++;return 1+this.deck.cards.slice(e,i-1).filter(O=>O.active&&-1==this.deck.disgarded.indexOf(this.deck.cards.indexOf(O))).length+l}return 0}clickCard(e,i){(!this.drawing||e>this.current)&&(this.deck.cards[e].active&&-1==this.deck.disgarded.indexOf(e)?(this.before.emit(new xn(this.deck,"disgard",""+e)),this.deck.disgarded.push(e),this.after.emit(new xn(this.deck,"disgard",""+e))):this.open(i))}open(e){d.v.game.state==ge.D2.next&&this.fullscreen&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)?this.openFullscreen(e):(this.dialog.open(W6,{panelClass:"dialog",data:{deck:this.deck,character:this.character,ally:this.ally,numeration:this.numeration,newStyle:this.newStyle,townGuard:this.townGuard,before:this.before,after:this.after}}),e.preventDefault(),e.stopPropagation())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-deck"]],viewQuery:function(e,i){if(1&e&&(t.Gf(fE,5),t.Gf(mE,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first),t.iGM(s=t.CRH())&&(i.drawCard=s.first)}},inputs:{deck:"deck",character:"character",ally:"ally",numeration:"numeration",bottom:"bottom",fullscreen:"fullscreen",vertical:"vertical",townGuard:"townGuard",battleGoals:"battleGoals",standalone:"standalone",edition:"edition",initTimeout:"initTimeout"},outputs:{before:"before",after:"after"},features:[t.TTD],decls:13,vars:29,consts:[[1,"attack-modifiers",3,"ngClass"],["class","battlegoals-button",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],[1,"am-container","draw",3,"ngClass"],["drawCard",""],[1,"am",3,"ghs-label","ghs-label-attribute","ngClass","click"],[1,"number",3,"ngClass"],["class","shuffle","src","./assets/images/shuffle.svg",3,"ghs-label","ghs-label-attribute",4,"ngIf"],["class","numeration",4,"ngIf"],["class","character-icon",4,"ngIf"],["class","fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],["class","settings",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"battlegoals-button",3,"ghs-label","ghs-label-attribute","click"],[3,"src"],["class","check","src","./assets/images/check.svg",4,"ngIf"],["src","./assets/images/check.svg",1,"check"],["src","./assets/images/shuffle.svg",1,"shuffle",3,"ghs-label","ghs-label-attribute"],[1,"numeration"],[1,"character-icon"],[1,"fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/fullscreen.svg"],[1,"settings",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/settings.svg",1,"ghs-svg"],["class","am-container",3,"z-index","ngClass","left","top","ghs-label","ghs-label-attribute","click",4,"ngIf"],[1,"am-container",3,"ngClass","ghs-label","ghs-label-attribute","click"],[1,"am",3,"attackModifier","numeration","characterIcon","ally","flipped","disableFlip","newStyle","townGuard"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t.YNc(1,CE,3,4,"div",1),t.TgZ(2,"div",2,3)(4,"div",4),t.NdJ("click",function(l){return i.draw(l)}),t.TgZ(5,"span",5),t._uU(6),t.qZA(),t.YNc(7,ME,1,2,"img",6),t.YNc(8,OE,2,1,"span",7),t.YNc(9,PE,2,1,"span",8),t.qZA(),t.YNc(10,bE,2,6,"span",9),t.YNc(11,wE,2,7,"span",10),t.qZA(),t.YNc(12,ZE,2,1,"ng-container",11),t.qZA()),2&e){const s=t.MAs(3);t.Q6J("ngClass",t.kEZ(18,AE,!i.standalone&&(!i.townGuard&&i.gameManager.game.state==i.GameState.draw||i.townGuard&&i.gameManager.game.scenario),i.vertical,i.character)),t.xp6(1),t.Q6J("ngIf",i.character&&i.battleGoals&&i.gameManager.game.scenario&&i.settingsManager.settings.battleGoals&&i.gameManager.game.round>0&&!i.settingsManager.settings.battleGoalsCharacter),t.xp6(1),t.Udp("z-index",i.deck.cards.length+1)("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.VKq(22,SE,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.attackModifiers&&(!i.character||!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]))),t.xp6(2),t.Q6J("ghs-label",i.deck.current==i.deck.cards.length-1?"game.cards.shuffle":"game.cards.draw")("ghs-label-attribute","title")("ngClass",t.WLB(24,EE,i.townGuard,i.disabled)),t.xp6(1),t.Q6J("ngClass",t.VKq(27,DE,i.deck.current==i.deck.cards.length-1)),t.xp6(1),t.hij(" ",i.deck.current{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"lootTypes",Object.values(le.CG)),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"loot",{}),this.data=e,this.dialogRef=i,this.character=e.character,e.all&&this.lootTypes.forEach(s=>{this.loot[s]=this.character.progress.loot[s]||0})}ngOnInit(){this.character.progress||(this.character.progress=new tT.f)}changeLoot(e,i){this.loot[e]||(this.loot[e]=0),this.loot[e]=this.loot[e]+i,this.loot[e]<0?this.loot[e]=0:(!this.character.progress.loot[e]||this.loot[e]>this.character.progress.loot[e])&&(this.loot[e]=this.character.progress.loot[e]||0)}moveLoot(){Object.keys(this.loot).forEach(e=>{const i=e;let s=this.loot[i]||0;(this.character.progress.loot[i]||0)0&&(d.v.stateManager.before("moveResource","data.character."+this.character.name,"game.loot."+i,s+""),d.v.game.party.loot[i]=(d.v.game.party.loot[i]||0)+s,this.character.progress.loot[i]=(this.character.progress.loot[i]||0)-s,d.v.stateManager.after())}),this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-move-resources"]],decls:14,vars:9,consts:[[1,"move-resources-dialog"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"icon","character-icon",3,"src"],[1,"character-title",3,"ngClass"],[1,"values"],[4,"ngFor","ngForOf"],[1,"menu"],[1,"cancel",3,"click"],[1,"apply",3,"click"],["class","loot",4,"ngIf"],[1,"loot"],[1,"ghs-svg",3,"src"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"value",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/plus.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"img",4),t.TgZ(5,"span",5),t._uU(6),t.qZA()()(),t.TgZ(7,"div",6),t.YNc(8,NE,2,1,"ng-container",7),t.qZA(),t.TgZ(9,"div",8)(10,"a",9),t.NdJ("click",function(){return i.close()}),t._UZ(11,"span",2),t.qZA(),t.TgZ(12,"a",10),t.NdJ("click",function(){return i.moveLoot()}),t._UZ(13,"span",2),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","character.progress.resources.move"),t.xp6(2),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(7,JE,i.character.absent)),t.xp6(1),t.Oqu(i.gameManager.characterManager.characterName(i.character,!0)),t.xp6(2),t.Q6J("ngForOf",i.lootTypes),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(2),t.Q6J("ghs-label","character.progress.resources.apply"))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".move-resources-dialog[_ngcontent-%COMP%]{padding:.5em}.move-resources-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 44 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title[_ngcontent-%COMP%]{display:flex;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title.absent[_ngcontent-%COMP%]{text-decoration:line-through}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto auto auto;font-size:2em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:flex-start;align-items:center;white-space:nowrap}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);margin-right:.3em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();const UE=function(o,a){return[o,a]};function LE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.dialogRef.close(s))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ghs-label","scenario.section.conclusion"+(e.data.parent.conclusion?".continue":"")+(n.named?".named":""))("ghs-label-args",t.WLB(2,UE,"%data.section:"+n.index+"%",n.named?"data.section."+n.name:""))}}let lg=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),this.data=e,this.dialogRef=i,1==this.data.conclusions.length&&this.dialogRef.close(this.data.conclusions[0])}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-conclusion-dialog"]],decls:9,vars:3,consts:[[1,"section-popup"],[1,"header"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"],[3,"ghs-label"],[1,"conclusions"],["class","placeholder text-white conclusion",3,"ghs-label","ghs-label-args","click",4,"ngFor","ngForOf"],[1,"buttons"],[1,"cancel",3,"click"],[1,"placeholder","text-white","conclusion",3,"ghs-label","ghs-label-args","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"img",2)(3,"span",3),t.qZA(),t.TgZ(4,"div",4),t.YNc(5,LE,1,5,"span",5),t.qZA(),t.TgZ(6,"div",6)(7,"a",7),t.NdJ("click",function(){return i.dialogRef.close()}),t._UZ(8,"span",3),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ghs-label","scenario.section.conclusion.select"),t.xp6(2),t.Q6J("ngForOf",i.data.conclusions),t.xp6(3),t.Q6J("ghs-label","scenario.section.cancel"))},dependencies:[x.sg,ie],styles:[".section-popup[_ngcontent-%COMP%]{text-align:center;min-width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.section-popup[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white)}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]:hover{opacity:.7}.section-popup[_ngcontent-%COMP%] .conclusions[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]:not(:first-child){border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}"]})),a})();var Ni=E(1235);function QE(o,a){if(1&o&&(t.TgZ(0,"span",30),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.hij("",n.edition,"\xa0")}}function RE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function FE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function qE(o,a){if(1&o&&(t.TgZ(0,"div",27)(1,"span",28),t._UZ(2,"span",29),t.qZA(),t.TgZ(3,"div",23),t.YNc(4,QE,2,1,"span",24),t.YNc(5,RE,2,0,"span",25),t.YNc(6,FE,2,0,"span",25),t.TgZ(7,"span"),t._uU(8),t.qZA()()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(2),t.Q6J("ngIf",n.edition),t.xp6(1),t.Q6J("ngIf",n.item.id<100),t.xp6(1),t.Q6J("ngIf",n.item.id<10),t.xp6(2),t.Oqu(n.item.id)}}const ww=function(o){return{fh:o}};function HE(o,a){if(1&o&&t._UZ(0,"span",40),2&o){const n=t.oxw().index,e=t.oxw(4);t.Q6J("ngClass",t.VKq(2,ww,e.settingsManager.settings.fhStyle))("ghs-label","%game.characterToken."+e.slotsBackMarked[n]+"%")}}const e_=function(o){return{interactive:o}};function jE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",37),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(4);return t.KtG(l.clickedSlotBack.emit(s))}),t._UZ(1,"ghs-action",38),t.YNc(2,HE,1,4,"span",39),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Q6J("ngClass",t.VKq(5,e_,i.clickedSlotBack.observed)),t.xp6(1),t.Akn(i.fhStyle?"fh":"gh"),t.Q6J("action",n),t.xp6(1),t.Q6J("ngIf",i.slotsBackMarked.length>=e-1&&i.slotsBackMarked[e])}}function BE(o,a){if(1&o&&(t.TgZ(0,"div",35),t.YNc(1,jE,3,7,"span",36),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.slotsBack)}}function zE(o,a){if(1&o&&(t.TgZ(0,"div",41),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.AsE("",n.count,"/",n.item.count,"")}}function GE(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",42),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.flipped=!i.flipped)}),t._UZ(1,"span",43),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.card.flip%"))}function VE(o,a){if(1&o&&(t.TgZ(0,"span",30),t._uU(1),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.hij("",n.edition,"\xa0")}}function YE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function KE(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function $E(o,a){if(1&o&&(t.TgZ(0,"div",31),t._UZ(1,"img",7)(2,"div",8),t.TgZ(3,"div",9)(4,"div",32),t._UZ(5,"ghs-actions",33),t.qZA(),t.YNc(6,BE,2,1,"div",11),t.qZA(),t.YNc(7,zE,2,2,"div",12),t.YNc(8,GE,2,1,"div",34),t.TgZ(9,"div",23),t.YNc(10,VE,2,1,"span",24),t.YNc(11,YE,2,0,"span",25),t.YNc(12,KE,2,0,"span",25),t.TgZ(13,"span"),t._uU(14),t.qZA()()()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/artwork/items/"+n.item.edition+"-"+(n.item.id<100?"0":"")+(n.item.id<10?"0":"")+n.item.id+".png",t.LSH),t.xp6(1),t.Q6J("ghs-label","data.items."+n.item.edition+"-"+n.item.id),t.xp6(3),t.Akn(n.fhStyle?"fh":"gh"),t.Q6J("actions",n.item.actionsBack)("noDivider",!0),t.xp6(1),t.Q6J("ngIf",n.slotsBack.length>0),t.xp6(1),t.Q6J("ngIf",n.item.count),t.xp6(1),t.Q6J("ngIf",n.item.actionsBack&&n.item.actionsBack.length>0),t.xp6(2),t.Q6J("ngIf",n.edition),t.xp6(1),t.Q6J("ngIf",n.item.id<100),t.xp6(1),t.Q6J("ngIf",n.item.id<10),t.xp6(2),t.Oqu(n.item.id)}}function WE(o,a){if(1&o&&(t.TgZ(0,"div",32),t._UZ(1,"ghs-actions",33),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.fhStyle?"fh":"gh"),t.Q6J("actions",n.item.actions)("noDivider",!0)}}function XE(o,a){if(1&o&&t._UZ(0,"span",40),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ngClass",t.VKq(2,ww,e.settingsManager.settings.fhStyle))("ghs-label","%game.characterToken."+e.slotsMarked[n]+"%")}}function tD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",37),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(3);return t.KtG(l.clickedSlot.emit(s))}),t._UZ(1,"ghs-action",38),t.YNc(2,XE,1,4,"span",39),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.Q6J("ngClass",t.VKq(5,e_,i.clickedSlot.observed)),t.xp6(1),t.Akn(i.fhStyle?"fh":"gh"),t.Q6J("action",n),t.xp6(1),t.Q6J("ngIf",i.slotsMarked.length>=e-1&&i.slotsMarked[e])}}function eD(o,a){if(1&o&&(t.TgZ(0,"div",35),t.YNc(1,tD,3,7,"span",36),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.slots)}}function nD(o,a){if(1&o&&(t.TgZ(0,"div",41),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.AsE("",n.count,"/",n.item.count,"")}}function iD(o,a){1&o&&t._UZ(0,"span",47),2&o&&t.Q6J("ghs-label","%game.itemFh."+a.$implicit+"%")}function oD(o,a){if(1&o&&(t.ynx(0),t.YNc(1,iD,1,1,"span",46),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.item.requiredItems)}}function aD(o,a){if(1&o&&(t.TgZ(0,"span",52),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("x",n.value,"")}}function sD(o,a){if(1&o&&(t.TgZ(0,"span",49),t._UZ(1,"img",50),t.YNc(2,aD,2,1,"span",51),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n.key+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.value&&n.value>1)}}function rD(o,a){if(1&o&&(t.ynx(0),t.YNc(1,sD,3,2,"span",48),t.ALo(2,"keyvalue"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,1,n.item.resources))}}function cD(o,a){if(1&o&&(t.TgZ(0,"span",52),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("x",n.value,"")}}const lD=function(o){return[o]};function gD(o,a){if(1&o&&(t.TgZ(0,"span",49),t._UZ(1,"span",53),t.YNc(2,cD,2,1,"span",51),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ghs-label","game.items.anyResource")("ghs-label-args",t.VKq(3,lD,n.key)),t.xp6(1),t.Q6J("ngIf",n.value&&n.value>1)}}function dD(o,a){if(1&o&&(t.ynx(0),t.YNc(1,gD,3,5,"span",48),t.ALo(2,"keyvalue"),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,1,n))}}const hD=function(){return[]};function uD(o,a){if(1&o&&(t.TgZ(0,"div",44),t.YNc(1,oD,2,1,"ng-container",25),t.YNc(2,rD,3,3,"ng-container",25),t.YNc(3,dD,3,3,"ng-container",45),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.item.requiredItems),t.xp6(1),t.Q6J("ngIf",n.item.resources),t.xp6(1),t.Q6J("ngForOf",n.item.resourcesAny||t.DdM(3,hD))}}function _D(o,a){if(1&o&&(t.TgZ(0,"div",54)(1,"span",52),t._uU(2),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Oqu(n.item.cost)}}function pD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",55),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedConsumed.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedConsumed.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedConsumed.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.lost%")}}function fD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",56),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedSpent.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedSpent.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedSpent.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.spent%")}}function mD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return i.flipped=!i.flipped,t.KtG(i.clickedFlip.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedFlip.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedFlip.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.flip%")}}function vD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",58),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedPersistent.emit())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.clickedPersistent.emit(!0))}),t._UZ(1,"span",43),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,e_,n.clickedPersistent.observed)),t.xp6(1),t.Q6J("ghs-label","%game.card.persistent%")}}function CD(o,a){1&o&&(t.TgZ(0,"div",59),t._UZ(1,"span",43),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.card.loss%"))}function MD(o,a){1&o&&(t.TgZ(0,"div",60),t._UZ(1,"span",43),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.card.round%"))}function OD(o,a){if(1&o&&(t.TgZ(0,"div",61)(1,"span",62),t._UZ(2,"img",63),t.qZA(),t.TgZ(3,"span",52),t._uU(4),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh/attackmodifier/icons/minus1.png":"/items/minus1.svg"),t.LSH),t.xp6(2),t.hij("x",n.item.minusOne,"")}}function PD(o,a){if(1&o&&(t.TgZ(0,"div",64),t._UZ(1,"img",65),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/items/slots/"+n.item.slot+".svg",t.LSH)}}function yD(o,a){if(1&o&&(t.TgZ(0,"span",30),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("",n.edition,"\xa0")}}function bD(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function xD(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function wD(o,a){if(1&o&&(t.TgZ(0,"div",66),t._UZ(1,"span",29),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,ww,n.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("ghs-label","%game.characterToken."+n.item.solo+"%")}}const kD=function(o,a,n,e){return{flipped:o,random:a,fh:n,craft:e}};function TD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",1,2)(2,"div",3),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.emitRevealed(i))}),t.YNc(3,qE,9,5,"div",4),t.YNc(4,$E,15,13,"div",5),t.TgZ(5,"div",6),t._UZ(6,"img",7)(7,"div",8),t.TgZ(8,"div",9),t.YNc(9,WE,2,4,"div",10),t.YNc(10,eD,2,1,"div",11),t.qZA(),t.YNc(11,nD,2,2,"div",12),t.YNc(12,uD,4,4,"div",13),t.YNc(13,_D,3,1,"div",14),t.YNc(14,pD,2,4,"div",15),t.YNc(15,fD,2,4,"div",16),t.YNc(16,mD,2,4,"div",17),t.YNc(17,vD,2,4,"div",18),t.YNc(18,CD,2,1,"div",19),t.YNc(19,MD,2,1,"div",20),t.YNc(20,OD,5,2,"div",21),t.YNc(21,PD,2,1,"div",22),t.TgZ(22,"div",23),t.YNc(23,yD,2,1,"span",24),t.YNc(24,bD,2,0,"span",25),t.YNc(25,xD,2,0,"span",25),t.TgZ(26,"span"),t._uU(27),t.qZA()(),t.YNc(28,wD,2,4,"div",26),t.qZA()()()}if(2&o){const n=t.MAs(1),e=t.oxw();t.xp6(2),t.Udp("font-size",.072*n.offsetWidth+"px"),t.Q6J("ngClass",t.l5B(26,kD,e.flipped,e.item.random,e.fhStyle,e.craft))("disabled",!e.reveal||e.item.actionsBack&&e.item.actionsBack.length>0||!1),t.xp6(1),t.Q6J("ngIf",!e.item.actionsBack||0==e.item.actionsBack.length),t.xp6(1),t.Q6J("ngIf",e.item.actionsBack&&e.item.actionsBack.length>0),t.xp6(2),t.Q6J("src","./assets/artwork/items/"+e.item.edition+"-"+(e.item.id<100?"0":"")+(e.item.id<10?"0":"")+e.item.id+".png",t.LSH),t.xp6(1),t.Q6J("ghs-label","data.items."+e.item.edition+"-"+e.item.id),t.xp6(2),t.Q6J("ngIf",e.item.actions&&e.item.actions.length>0),t.xp6(1),t.Q6J("ngIf",e.slots.length>0),t.xp6(1),t.Q6J("ngIf",e.item.count),t.xp6(1),t.Q6J("ngIf",e.craft),t.xp6(1),t.Q6J("ngIf",e.item.cost&&!e.item.solo),t.xp6(1),t.Q6J("ngIf",e.item.consumed),t.xp6(1),t.Q6J("ngIf",e.item.spent),t.xp6(1),t.Q6J("ngIf",e.item.actionsBack&&e.item.actionsBack.length>0),t.xp6(1),t.Q6J("ngIf",e.item.persistent),t.xp6(1),t.Q6J("ngIf",e.item.loss),t.xp6(1),t.Q6J("ngIf",e.item.round),t.xp6(1),t.Q6J("ngIf",e.item.minusOne),t.xp6(1),t.Q6J("ngIf",e.item.slot),t.xp6(2),t.Q6J("ngIf",e.edition),t.xp6(1),t.Q6J("ngIf",e.item.id<100),t.xp6(1),t.Q6J("ngIf",e.item.id<10),t.xp6(2),t.Oqu(e.item.id),t.xp6(1),t.Q6J("ngIf",e.item.solo)}}let Xd=(()=>{var o;class a{constructor(){(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"identifier",void 0),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"count",1),(0,_.Z)(this,"slotsMarked",[]),(0,_.Z)(this,"slotsBackMarked",[]),(0,_.Z)(this,"editionLabel",""),(0,_.Z)(this,"revealed",new t.vpe),(0,_.Z)(this,"clickedConsumed",new t.vpe),(0,_.Z)(this,"clickedSpent",new t.vpe),(0,_.Z)(this,"clickedFlip",new t.vpe),(0,_.Z)(this,"clickedSlot",new t.vpe),(0,_.Z)(this,"clickedSlotBack",new t.vpe),(0,_.Z)(this,"clickedPersistent",new t.vpe),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"craft",!1),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"slots",[]),(0,_.Z)(this,"slotsBack",[]),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"gameManager",d.v)}ngOnInit(){if(!this.item&&this.identifier&&(this.item=d.v.itemManager.getItem(+this.identifier.name,this.identifier.edition,!0)),this.item&&(this.item.edition!=this.editionLabel&&(this.edition=this.item.edition),"fh"==this.item.edition&&(this.fhStyle=!0),(this.item.resources&&Object.values(this.item.resources).some(e=>e)||this.item.requiredItems&&this.item.requiredItems.length>0||this.item.resourcesAny&&this.item.resourcesAny.length>0)&&(this.fhStyle=!0,this.craft=!0),this.item.actions=this.item.actions||[],this.applySlots(this.item.slots,this.slots),this.item.slotsBack&&(this.item.actionsBack=this.item.actionsBack||[],this.applySlots(this.item.slotsBack,this.slots)),this.item.summon&&!this.item.actions.find(e=>e.type==vt.Us.summon&&"summonDataItem"==e.value))){const e=new vt.aU(vt.Us.summon,"summonDataItem");e.valueObject=this.item.summon,e.small=!0,this.item.actions.push(e)}}applySlots(e,i){if(e&&!i.find(s=>s.type==vt.Us.card&&s.subActions.length>0&&(""+s.value).startsWith("slot")))for(let s=0;s3&&(l.small=!0),i.push(l)}}applySlotsGrid(e,i){if(e&&!i.find(s=>s.type==vt.Us.grid&&s.subActions.length>0&&s.subActions[0].type==vt.Us.card&&(""+s.subActions[0].value).startsWith("slot")))if(e<5){const s=new vt.aU(vt.Us.grid,e);for(let l=0;l3&&(s.small=!0),i.push(s)}else{const s=Math.ceil(e/3);for(let l=0;l1&&(O.small=!0);for(let k=0;k0,n.countFlag(n.ItemFlags.persistent)>0))}}function DD(o,a){1&o&&(t.TgZ(0,"span",9),t._UZ(1,"img",10),t.qZA())}const ID=function(o,a){return{equipped:o,disabled:a}};let kw=(()=>{var o;class a{constructor(){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ItemFlags",Ni.CT),(0,_.Z)(this,"GameState",ge.D2)}equipped(){return this.character.progress.equippedItems.find(e=>e.name==""+this.item.id&&e.edition==this.item.edition)}isLootRandomItem(){return this.character.progress.equippedItems.find(e=>e.name==""+this.item.id&&e.edition==this.item.edition&&"loot-random-item"==e.marker)}toggleEquippedItem(e=!1){(this.setup||e)&&null!=this.character.progress.items.find(i=>i.name==""+this.item.id&&i.edition==this.item.edition)&&(d.v.stateManager.before(this.equipped()?"unequipItem":"equipItem","data.character."+this.character.name,""+this.item.id,this.item.edition),d.v.itemManager.toggleEquippedItem(this.item,this.character,e),d.v.stateManager.after(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500))}countFlag(e){const i=this.equipped();return i&&i.tags&&i.tags.filter(s=>s==e).length||0}toggleFlag(e,i){if(!this.setup&&d.v.game.state==ge.D2.next||e){const s=this.equipped();s&&(s.tags=s.tags||[],d.v.stateManager.before(-1==s.tags.indexOf(i)?"characterItemApply."+i:"characterItemUnapply."+i,"data.character."+this.character.name,""+this.item.id,this.item.edition),-1==s.tags.indexOf(i)?s.tags.push(i):(s.tags=s.tags.filter(l=>l!=i),i==Ni.CT.spent&&(s.tags=s.tags.filter(l=>l!=Ni.CT.slot&&l!=Ni.CT.slotBack))),d.v.stateManager.after(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500))}}toggleFlagCount(e,i){if(!this.setup&&d.v.game.state==ge.D2.next){const s=this.equipped();if(s){s.tags=s.tags||[];const l=this.countFlag(i);if(d.v.stateManager.before(l<=e?"characterItemApply."+i:"characterItemUnapply."+i,"data.character."+this.character.name,""+this.item.id,this.item.edition),l<=e){for(let m=l;m<=e;m++)s.tags.push(i);i==Ni.CT.slot&&this.countFlag(i)==this.item.slots&&(this.item.spent&&!this.countFlag(Ni.CT.spent)?this.toggleFlag(!0,Ni.CT.spent):this.item.consumed&&!this.countFlag(Ni.CT.consumed)&&this.toggleFlag(!0,Ni.CT.consumed))}else for(let m=e;m{d.v.uiChange.emit()},500)}}}slotsMarked(e){let i=[];for(let s=0;s{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"opened",!1),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"setup",!1),this.data=e,this.dialogRef=i,this.item=e.item,this.character=e.character,this.setup=e.setup||!1}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},1e3)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-item-dialog"]],decls:4,vars:7,consts:[[1,"item-dialog",3,"ngClass","click"],[3,"item","flipped","editionLabel",4,"ngIf"],[3,"character","item","setup",4,"ngIf"],["class","close-container",3,"click",4,"ngIf"],[3,"item","flipped","editionLabel"],[3,"character","item","setup"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(){return!i.character&&i.close()}),t.YNc(1,ND,1,3,"ghs-item",1),t.YNc(2,JD,1,3,"ghs-character-item",2),t.qZA(),t.YNc(3,UD,1,0,"div",3)),2&e&&(t.Q6J("ngClass",t.WLB(4,LD,!i.opened,i.opened)),t.xp6(1),t.Q6J("ngIf",!i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",!i.character))},dependencies:[x.mk,x.O5,kw,Xd],styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.item-dialog[_ngcontent-%COMP%]{width:66.66vh;max-width:400px;height:100vh;max-height:600px;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0)}.item-dialog[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%], .item-dialog[_ngcontent-%COMP%] ghs-character-item[_ngcontent-%COMP%]{width:100%;height:auto}.item-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.item-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.8s}@media (max-width: 600px),(orientation: portrait){.item-dialog[_ngcontent-%COMP%]{width:80vw;max-width:400px;height:120vw;max-height:600px}}.close-container[_ngcontent-%COMP%]{position:absolute;inset:0}"]})),a})();var yn=E(9148);function QD(o,a){if(1&o&&t._UZ(0,"span",7),2&o){const n=t.oxw().index,e=t.oxw(2);t.Q6J("ghs-label",e.rewardLabel[n][0]+".result")("ghs-label-args",e.rewardResults[n])}}function RD(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,",\xa0"),t.qZA())}function FD(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",4),t.YNc(2,QD,1,2,"span",5),t.YNc(3,RD,2,0,"span",6),t.BQk()),2&o){const n=a.index,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",e.rewardLabel[n][0])("ghs-label-args",e.rewardLabel[n].slice(1)),t.xp6(1),t.Q6J("ngIf",e.rewardResults&&e.rewardResults[n]&&e.rewardResults[n].length>0),t.xp6(1),t.Q6J("ngIf",e.treasure.rewards.length>1&&n0)}}let $f=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"treasure",void 0),(0,_.Z)(this,"index",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"rewardResults",void 0),(0,_.Z)(this,"itemCards",!1),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"rewardLabel",[]),(0,_.Z)(this,"labelPrefix","game.loot.treasures.rewards."),this.dialog=e}ngOnInit(){if(this.treasure)this.index=this.treasure.index;else{const e=d.v.editionData.find(i=>i.edition==this.edition);if(e&&e.treasures){const i=this.index-(e.treasureOffset||0);i>=0&&i{this.rewardLabel[i]=this.calcRewardLabel(e)}),this.itemCards&&this.treasure.rewards.forEach((e,i)=>{if(-1!=[yn.Hj.item,yn.Hj.itemBlueprint,yn.Hj.itemDesign,yn.Hj.itemFh].indexOf(e.type)){const s=""+e.value;let l=this.edition,m=-1;isNaN(+s)?(m=+s.split("-")[0],l=s.split("-")[1]):m=+s;const O=d.v.itemManager.getItem(m,l,!0);O&&this.items.push(O)}else if(-1!=[yn.Hj.randomItem,yn.Hj.randomItemBlueprint,yn.Hj.randomItemDesign].indexOf(e.type)&&this.rewardResults&&this.rewardResults[i]&&this.rewardResults[i][0]&&!isNaN(+this.rewardResults[i][0])){const s=d.v.itemManager.getItem(+this.rewardResults[i][0],this.rewardResults[i][2],!0);s&&this.items.push(s)}}))}calcRewardLabel(e){if("custom"==e.type)return[""+e.value];const i=""+(e.value||"");switch(e.type){case yn.Hj.gold:case yn.Hj.goldFh:case yn.Hj.experience:case yn.Hj.experienceFh:case yn.Hj.battleGoal:case yn.Hj.randomScenario:case yn.Hj.randomScenarioFh:case yn.Hj.randomItem:case yn.Hj.randomItemDesign:case yn.Hj.randomItemBlueprint:case yn.Hj.partyAchievement:case yn.Hj.campaignSticker:case yn.Hj.heal:case yn.Hj.loot:case yn.Hj.lootCards:return[this.labelPrefix+e.type,i];case yn.Hj.damage:return"terrain"==i?[this.labelPrefix+e.type,"%game.level.hazardousTerrain%"]:[this.labelPrefix+e.type,"%game.damage:"+i+"%"];case yn.Hj.condition:const s=i.split("+").map(se=>"%game.condition."+se+"%");let l=s[0];return s.length>1&&(l=s.slice(0,-1).join(","),l+=" %and% "+s[s.length-1]),[this.labelPrefix+e.type,l];case yn.Hj.item:case yn.Hj.itemDesign:case yn.Hj.itemFh:case yn.Hj.itemBlueprint:const m=[],O=[];i.split("+").forEach(se=>{let De=this.edition,un=-1;isNaN(+se)?(un=+se.split("-")[0],De=se.split("-")[1]):un=+se;const vn=d.v.itemManager.getItem(un,De,!0);vn?(m.push(e.type==yn.Hj.itemFh||e.type==yn.Hj.itemBlueprint?vn.id+"":"%game.item% "+(De==this.edition?vn.id:vn.id+" [%data.edition."+vn.edition+"%]")),O.push('"'+R.r.getLabel("data.items."+vn.name)+'"')):(console.warn("Invalid Item '"+un+"' (Edition "+De+") on treasure"+this.index+"' for Edition "+this.edition),O.push(' %item%'))});let k=m[0];m.length>1&&(k=m.slice(0,-1).join(","),k+=" %and% "+m[m.length-1]);let W=O[0];return O.length>1&&(W=O.slice(0,-1).join(","),W+=" %and% "+O[O.length-1]),[this.labelPrefix+e.type,k,W];case yn.Hj.scenario:const ct=d.v.scenarioManager.getScenario(i,this.edition,void 0);return ct?[this.labelPrefix+e.type,ct.index,"data.scenario."+ct.name]:(console.warn("Invalid Scenario '"+i+"' on treasure "+this.index+"' for Edition "+this.edition),[this.labelPrefix+e.type,i,' %scenario%']);case yn.Hj.event:const Ct=i.split("-")[0],Ot=i.split("-")[1];return[this.labelPrefix+e.type+"."+Ct,""+Ot];case yn.Hj.resource:const xt=i.split("+").map(se=>se.split("-")[1]+'');let Gt=xt[0];return xt.length>1&&(Gt=xt.slice(0,-1).join(","),Gt+=" %and% "+xt[xt.length-1]),[this.labelPrefix+e.type,Gt];case yn.Hj.calendarSection:if(i.split("-").length>1)return[this.labelPrefix+e.type,i.split("-")[0],i.split("-")[1]]}return[]}openItemDialog(e){this.dialog.open(gg,{data:{item:e}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-treasure-label"]],inputs:{treasure:"treasure",index:"index",edition:"edition",rewardResults:"rewardResults",itemCards:"itemCards"},decls:1,vars:1,consts:[["class","treasure-label",4,"ngIf"],[1,"treasure-label"],[4,"ngFor","ngForOf"],["class","items",4,"ngIf"],[1,"label",3,"ghs-label","ghs-label-args"],["class","result",3,"ghs-label","ghs-label-args",4,"ngIf"],[4,"ngIf"],[1,"result",3,"ghs-label","ghs-label-args"],[1,"items"],[3,"item","flipped","editionLabel","click",4,"ngFor","ngForOf"],[3,"item","flipped","editionLabel","click"]],template:function(e,i){1&e&&t.YNc(0,jD,3,2,"span",0),2&e&&t.Q6J("ngIf",i.treasure)},dependencies:[x.sg,x.O5,Xd,ie],styles:[".treasure-label{display:inline-block;line-height:1em}.treasure-label:first-letter{text-transform:uppercase}.treasure-label .items{display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.treasure-label .items ghs-item{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor))}\n"],encapsulation:2})),a})();function BD(o,a){1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.finish.success"))}function zD(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"span",3),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label",n.conclusion.name?"data.section."+n.conclusion.name:"%scenario.section% #"+n.conclusion.index)}}function GD(o,a){1&o&&(t.TgZ(0,"span",19),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.summary.casualWarning"))}function VD(o,a){1&o&&(t.TgZ(0,"span",20),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.finish.failure"))}const YD=function(o){return{absent:o}},nT=function(o){return{denied:o}};function KD(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",29)(1,"img",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.openCharacterSheet(s))}),t.qZA(),t.TgZ(2,"span",31),t._uU(3),t.qZA(),t.TgZ(4,"span",32)(5,"img",33),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.toggleAbsent(s))}),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(7,YD,n.absent)),t.xp6(1),t.hij(" ",e.gameManager.characterManager.characterName(n,!0)," "),t.xp6(1),t.Q6J("ngClass",t.VKq(9,nT,!e.gameManager.stateManager.characterPermissions[n.name+"|"+n.edition])),t.xp6(1),t.Q6J("src","./assets/images/status/"+(n.absent?"absent":"present")+".svg",t.LSH)("ghs-label",n.absent?"character.present":"character.absent")("ghs-label-attribute","title")}}function $D(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,n.loot)," ")}}function WD(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,n.rewards.gold)," ")}}function XD(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,WD,3,3,"span",25),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.rewards.gold"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function tI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",34)(1,"input",35),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.changeCollectiveGold(i,l))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(3);t.xp6(1),t.Q6J("max",e.collectiveGold[n]+e.availableCollectiveGold())("value",e.collectiveGold[n])}}function eI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,tI,2,2,"span",25),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.rewards.collectiveGold"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function nI(o,a){1&o&&t._UZ(0,"span",3),2&o&&t.Q6J("ghs-label","scenario.summary.gold")}function iI(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",36),t._uU(2),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/fh/loot/money.svg",t.LSH),t.xp6(1),t.AsE(" ",n.lootedGold,"/",n.totalGold," ")}}function oI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",37),t._uU(2),t.ALo(3,"ghsValueSign"),t.qZA(),t._uU(4),t.qZA()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,2,(s.success&&s.rewards&&s.rewards.gold?s.rewards.gold:0)+(s.collectiveGold[e]?s.collectiveGold[e]:0)+i.loot*s.gameManager.levelManager.loot())),t.xp6(2),t.hij(" (",i.progress.gold+(s.success&&s.rewards&&s.rewards.gold?s.rewards.gold:0)+(s.collectiveGold[e]?s.collectiveGold[e]:0)+i.loot*s.gameManager.levelManager.loot(),") ")}}function aI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span"),t._uU(2,"/"),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.hij(" (",n.progress.gold,") ")}}function sI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,oI,5,4,"span",14),t.YNc(2,aI,4,1,"span",14),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function rI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",38),t._uU(2),t.ALo(3,"ghsValueSign"),t.qZA(),t._uU(4),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,2,i.lootValue(n,e))),t.xp6(2),t.hij(" (",(n.progress.loot[e]||0)+i.lootValue(n,e),") ")}}function cI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",38),t._uU(2,"/"),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit;t.xp6(3),t.hij(" (",n.progress.loot[e]||0,") ")}}function lI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,rI,5,4,"span",14),t.YNc(2,cI,4,1,"span",14),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function gI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"img",36),t._uU(3),t.qZA(),t.YNc(4,lI,3,2,"ng-container",28),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH),t.xp6(1),t.AsE(" ",i.lootColumnsLooted[e],"/",i.lootColumnsTotal[e]," "),t.xp6(1),t.Q6J("ngForOf",i.characters)}}function dI(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,n.experience)," ")}}function hI(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Oqu(t.lcZ(2,1,n.gameManager.levelManager.experience()))}}function uI(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function _I(o,a){if(1&o&&(t.TgZ(0,"span",34),t.YNc(1,hI,3,3,"span",14),t.YNc(2,uI,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function pI(o,a){if(1&o&&(t.TgZ(0,"span",34),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.hij(" ",t.lcZ(2,1,n.rewards.experience)," ")}}function fI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,pI,3,3,"span",25),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.summary.rewards.experience"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function mI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,_I,3,2,"span",25),t.YNc(4,fI,4,2,"ng-container",14),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.xpBonus"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.success&&n.rewards&&n.rewards.experience)}}function vI(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(1),t.Oqu(t.lcZ(2,1,2*n.challenges))}}function CI(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function MI(o,a){if(1&o&&(t.TgZ(0,"span",34),t.YNc(1,vI,3,3,"span",14),t.YNc(2,CI,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function OI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24),t._UZ(2,"span",3),t.qZA(),t.YNc(3,MI,3,2,"span",25),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.xpChallenges"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function PI(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,(e.rewards&&e.rewards.experience?e.rewards.experience:0)+2*e.challenges+n.experience+(e.rewards&&e.rewards.ignoredBonus&&-1!=e.rewards.ignoredBonus.indexOf("experience")?0:e.gameManager.levelManager.experience())))}}function yI(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,n.experience))}}function bI(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,PI,3,3,"span",39),t.YNc(2,yI,3,3,"span",39),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.success),t.xp6(1),t.Q6J("ngIf",!e.success),t.xp6(1),t.hij(" (",n.progress.experience+2*e.challenges+n.experience+(e.success&&e.rewards&&e.rewards.experience?e.rewards.experience:0)+(!e.success||e.rewards&&e.rewards.ignoredBonus&&-1!=e.rewards.ignoredBonus.indexOf("experience")?0:e.gameManager.levelManager.experience()),") ")}}function xI(o,a){if(1&o&&(t.TgZ(0,"span")(1,"span",40),t._uU(2,"/"),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.hij(" (",n.progress.experience,") ")}}function wI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,bI,4,3,"span",14),t.YNc(2,xI,4,1,"span",14),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.absent),t.xp6(1),t.Q6J("ngIf",n.absent)}}function kI(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function TI(o,a){if(1&o&&t._UZ(0,"ghs-treasure-label",48),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("edition",e.scenario.edition)("index",+(""+n).split(":")[0]-1)("rewardResults",e.treasureRewardsFromString(""+n))}}function ZI(o,a){if(1&o&&(t.TgZ(0,"div",44)(1,"span",45),t.YNc(2,kI,2,0,"span",14),t._uU(3),t.qZA(),t.TgZ(4,"span",46),t.YNc(5,TI,1,3,"ghs-treasure-label",47),t.qZA()()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G")&&+n<10),t.xp6(1),t.hij("",(""+n).startsWith("G-")?"G":(""+n).split(":")[0]," "),t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G-"))}}const or=function(){return[]};function AI(o,a){if(1&o&&(t.TgZ(0,"span",42),t.YNc(1,ZI,6,3,"div",43),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",n.treasures||t.DdM(1,or))}}function SI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",3),t.qZA(),t.YNc(3,AI,2,2,"span",41),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.treasures"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function EI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw(2);return t.KtG(s.openItemDialog(i))}),t.qZA()}if(2&o){const n=t.oxw(2).$implicit;t.Q6J("item",n)("flipped",!0)}}function DI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span"),t.YNc(1,EI,1,2,"ghs-item",50),t.TgZ(2,"input",51),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw().index,O=t.oxw(2);return t.KtG(O.toggleItem(i,l,m))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw().index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",i.items[n]&&-1!=i.items[n].indexOf(e)),t.xp6(1),t.Q6J("disabled",i.itemDistributed(n,e))("checked",i.items[n]&&-1!=i.items[n].indexOf(e))}}const Ji=function(o){return[o]};function II(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",49),t.qZA(),t.YNc(3,DI,3,3,"span",28),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.item")("ghs-label-args",t.VKq(3,Ji,n.name)),t.xp6(1),t.Q6J("ngForOf",e.characters)}}function NI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.openItemDialog(i.randomItem))}),t.qZA()}if(2&o){const n=t.oxw(4);t.Q6J("item",n.randomItem)("flipped",!0)}}function JI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span"),t.YNc(1,NI,1,2,"ghs-item",50),t.TgZ(2,"input",51),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.toggleRandomItem(i,l))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.randomItemIndex==n),t.xp6(1),t.Q6J("disabled",e.randomItemIndex>-1&&e.randomItemIndex!=n)("checked",e.randomItemIndex==n)}}function UI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",49),t.qZA(),t.YNc(3,JI,3,3,"span",28),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.randomItem")("ghs-label-args",t.VKq(3,Ji,n.randomItem.name)),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function LI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openItemDialog(i))}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("item",n)("flipped",!0)}}function QI(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,LI,1,2,"ghs-item",50),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n)}}function RI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",3),t.qZA(),t.YNc(3,QI,2,1,"span",28),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.randomItems"),t.xp6(1),t.Q6J("ngForOf",n.randomItems)}}function FI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",57),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openBattleGoals(i))}),t._UZ(1,"ghs-battlegoal",58),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("identifier",n.battleGoal&&n.battleGoals[0])("flipped",n.battleGoal)}}function qI(o,a){1&o&&t._UZ(0,"input",60),2&o&&t.Q6J("disabled",!0)("checked",!0)}function HI(o,a){if(1&o&&(t.ynx(0),t.YNc(1,qI,1,2,"input",59),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,or),n.rewards.battleGoals))}}function jI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",61),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw(3);return t.KtG(l.toggleBattleGoal(i,s,2))}),t.qZA()}if(2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("checked",e.battleGoals[n]>1)}}function BI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"span",53),t.YNc(2,FI,2,2,"span",54),t.TgZ(3,"span",55),t.YNc(4,HI,3,5,"ng-container",14),t.TgZ(5,"input",51),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.toggleBattleGoal(i,l,1))}),t.qZA(),t.YNc(6,jI,1,1,"input",56),t.qZA()()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.battleGoals&&n.battleGoal&&n.battleGoals.length>0),t.xp6(2),t.Q6J("ngIf",i.rewards&&i.rewards.battleGoals),t.xp6(1),t.Q6J("disabled",n.absent)("checked",!n.absent&&i.battleGoals[e]>0),t.xp6(1),t.Q6J("ngIf",!n.absent&&i.battleGoals[e]>0)}}function zI(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",26),t._UZ(2,"span",3),t.qZA(),t.YNc(3,BI,7,5,"span",28),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","game.battleGoals"),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function GI(o,a){if(1&o&&(t.TgZ(0,"div",21)(1,"span",22),t._UZ(2,"span",3),t.qZA(),t.YNc(3,KD,6,11,"span",23),t.TgZ(4,"span",24),t._UZ(5,"span",3),t.qZA(),t.YNc(6,$D,3,3,"span",25),t.YNc(7,XD,4,2,"ng-container",14),t.YNc(8,eI,4,2,"ng-container",14),t.TgZ(9,"span",26),t.YNc(10,nI,1,1,"span",27),t.YNc(11,iI,3,3,"ng-container",14),t.qZA(),t.YNc(12,sI,3,2,"ng-container",28),t.YNc(13,gI,5,4,"ng-container",28),t.TgZ(14,"span",24),t._UZ(15,"span",3),t.qZA(),t.YNc(16,dI,3,3,"span",25),t.YNc(17,mI,5,3,"ng-container",14),t.YNc(18,OI,4,2,"ng-container",14),t.TgZ(19,"span",26),t._UZ(20,"span",3),t.qZA(),t.YNc(21,wI,3,2,"ng-container",28),t.YNc(22,SI,4,2,"ng-container",14),t.YNc(23,II,4,5,"ng-container",28),t.YNc(24,UI,4,5,"ng-container",14),t.YNc(25,RI,4,2,"ng-container",14),t.YNc(26,zI,4,2,"ng-container",14),t.qZA()),2&o){const n=t.oxw();t.Udp("--ghs-summary-columns",1+n.characters.length),t.xp6(2),t.Q6J("ghs-label","scenario.summary.name"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(2),t.Q6J("ghs-label","scenario.summary.loot"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.success&&n.rewards&&n.rewards.gold),t.xp6(1),t.Q6J("ngIf",n.success&&n.rewards&&n.rewards.collectiveGold),t.xp6(2),t.Q6J("ngIf",!n.totalGold),t.xp6(1),t.Q6J("ngIf",n.totalGold),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngForOf",n.lootColumns),t.xp6(2),t.Q6J("ghs-label","scenario.summary.xpGained"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.success&&(!n.rewards||!n.rewards.ignoredBonus||-1==n.rewards.ignoredBonus.indexOf("experience"))),t.xp6(1),t.Q6J("ngIf",n.success&&n.challenges>0),t.xp6(2),t.Q6J("ghs-label","scenario.summary.xp"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.gameManager.scenarioManager.getTreasures(n.scenario,n.gameManager.game.sections).length>0),t.xp6(1),t.Q6J("ngForOf",n.rewardItems),t.xp6(1),t.Q6J("ngIf",n.randomItem),t.xp6(1),t.Q6J("ngIf",n.randomItems&&n.randomItems.length>0),t.xp6(1),t.Q6J("ngIf",n.success)}}function VI(o,a){1&o&&(t.TgZ(0,"div",65)(1,"span"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.alreadyWarning.hint"))}function YI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",62)(1,"label"),t._UZ(2,"span",3),t.qZA(),t.TgZ(3,"div",63),t.YNc(4,VI,3,1,"div",64),t.TgZ(5,"div",65)(6,"a",66),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.updateState(!i.forceCampaign))}),t._UZ(7,"span",3),t.qZA()()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.summary.alreadyWarning"),t.xp6(2),t.Q6J("ngIf",!n.forceCampaign),t.xp6(3),t.Q6J("ghs-label","scenario.summary.alreadyWarning."+(n.forceCampaign?"reapply":"ignore"))}}function KI(o,a){1&o&&(t.TgZ(0,"div",65)(1,"span"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning.hintFh"))}function $I(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",65)(1,"a",66),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return i.characterProgress=!i.gameManager.fhRules()||!i.characterProgress,t.KtG(i.updateState())}),t._UZ(2,"span",3),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning."+(n.characterProgress||n.forceCampaign?"reapply":"ignore"))}}function WI(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",65)(1,"a",66),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.updateState(!0))}),t._UZ(2,"span",3),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning.campaignRewards"))}function XI(o,a){if(1&o&&(t.TgZ(0,"div",62)(1,"label"),t._UZ(2,"span",3),t.qZA(),t.TgZ(3,"div",63),t.YNc(4,KI,3,1,"div",64),t.YNc(5,$I,3,1,"div",64),t.YNc(6,WI,3,1,"div",64),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.summary.casualWarning"+(n.gameManager.fhRules()?".fh":"")),t.xp6(2),t.Q6J("ngIf",!n.characterProgress&&n.gameManager.fhRules()),t.xp6(1),t.Q6J("ngIf",n.forceCampaign||n.gameManager.fhRules()),t.xp6(1),t.Q6J("ngIf",!n.forceCampaign)}}function t5(o,a){1&o&&(t.TgZ(0,"div",62)(1,"label"),t._UZ(2,"span",3),t.qZA(),t.TgZ(3,"div",63)(4,"div",65),t._UZ(5,"span",69),t.qZA()()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.summary.conclusionWarning"),t.xp6(3),t.Q6J("ghs-label","scenario.summary.conclusionWarning.hint"))}function e5(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function n5(o,a){if(1&o&&(t.TgZ(0,"div",73),t._UZ(1,"span",3)(2,"span",3),t.YNc(3,e5,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);let s;t.xp6(1),t.Q6J("ghs-label","data.scenario."+(null==(s=i.gameManager.scenarioManager.getScenario(n,i.scenario.edition,i.scenario.group))?null:s.name)),t.xp6(1),t.Q6J("ghs-label","%data.scenarioNumber:"+n+"%"),t.xp6(1),t.Q6J("ngIf",i.scenario.unlocks.length>1&&e1||n.rewards&&n.rewards.chooseLocation&&n.rewards.chooseLocation.length>1?"scenario.rewards.locations":"scenario.rewards.location"),t.xp6(1),t.Q6J("ngIf",n.scenario.unlocks),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.chooseLocation)}}function c5(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,","),t.qZA())}function l5(o,a){if(1&o&&(t.TgZ(0,"div",73),t._UZ(1,"span",3)(2,"span",3),t.YNc(3,c5,2,0,"span",14),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);let s;t.xp6(1),t.Q6J("ghs-label","data.scenario."+(null==(s=i.gameManager.scenarioManager.getScenario(n,i.conclusion.edition,i.conclusion.group))?null:s.name)),t.xp6(1),t.Q6J("ghs-label","%data.scenarioNumber:"+n+"%"),t.xp6(1),t.Q6J("ngIf",i.conclusion.unlocks.length>1&&e1?"scenario.rewards.locations":"scenario.rewards.location"),t.xp6(2),t.Q6J("ngForOf",n.conclusion.unlocks)}}function d5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.globalAchievements[n])}}function h5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,d5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.globalAchievements."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.globalAchievements&&i.rewards.hints.globalAchievements[e])}}function u5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,h5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.globalAchievements"),t.xp6(3),t.Q6J("ngForOf",n.rewards.globalAchievements)}}function _5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.lostPartyAchievements[n])}}function p5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,_5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.partyAchievements."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.lostPartyAchievements&&i.rewards.hints.lostPartyAchievements[e])}}function f5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,p5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.lostPartyAchievements"),t.xp6(3),t.Q6J("ngForOf",n.rewards.lostPartyAchievements)}}function m5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.partyAchievements[n])}}function v5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,m5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.partyAchievements."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.partyAchievements&&i.rewards.hints.partyAchievements[e])}}function C5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,v5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.partyAchievements"),t.xp6(3),t.Q6J("ngForOf",n.rewards.partyAchievements)}}function M5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.campaignSticker[n])}}function O5(o,a){if(1&o&&(t.TgZ(0,"div",79)(1,"span"),t._UZ(2,"span",3),t.qZA(),t.YNc(3,M5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","data.campaignSticker."+n),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.campaignSticker&&i.rewards.hints.campaignSticker[e])}}function P5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,O5,4,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.campaignSticker"),t.xp6(3),t.Q6J("ngForOf",n.rewards.campaignSticker)}}function y5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.calendarSection[n])}}const LO=function(o,a,n){return[o,a,n]};function b5(o,a){if(1&o&&(t.TgZ(0,"div",79),t._UZ(1,"span",82),t.YNc(2,y5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.calendarSection.add"+(n.split("-")[1].split(":").length>1?".next":""))("ghs-label-args",t.kEZ(3,LO,n.split("-")[0],n.split("-")[1].split(":").length>1?n.split("-")[1].split(":")[1]:n.split("-")[1],n.split("-")[1].split(":").length>1?n.split("-")[1].split(":")[0]:"")),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.calendarSection&&i.rewards.hints.calendarSection[e])}}function x5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,b5,3,7,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.calendarSection"),t.xp6(3),t.Q6J("ngForOf",n.rewards.calendarSection)}}function w5(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",79),t._UZ(1,"span",69),t.TgZ(2,"input",83),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(3);return t.KtG(m.changeCalendarSectionManual(i,l))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label",n.hint),t.xp6(1),t.Q6J("value",i.calendarSectionManual[e]||-1)}}function k5(o,a){if(1&o&&(t.TgZ(0,"div",77)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,w5,3,2,"div",78),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.calendarSection"),t.xp6(3),t.Q6J("ngForOf",n.rewards.calendarSectionManual)}}function T5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.envelopes[n])}}function Z5(o,a){if(1&o&&(t.TgZ(0,"div",108),t._UZ(1,"span",82),t.YNc(2,T5,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.envelope")("ghs-label-args",t.VKq(3,Ji,n)),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.envelopes&&i.rewards.hints.envelopes[e])}}function A5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.gold)}}function S5(o,a){if(1&o&&(t.TgZ(0,"div",109)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,A5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.gold")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.gold)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.gold)}}function E5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.experience)}}function D5(o,a){if(1&o&&(t.TgZ(0,"div",110)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,E5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.experience")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.experience)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.experience)}}function I5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.collectiveGold)}}function N5(o,a){if(1&o&&(t.TgZ(0,"div",111)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,I5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.collectiveGold")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.collectiveGold)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.collectiveGold)}}const dg=function(o,a){return[o,a]};function J5(o,a){if(1&o&&t._UZ(0,"span",82),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("ghs-label","scenario.rewards.resources"+(e.EntityValueFunction(n.value)<0?"Lose":""))("ghs-label-args",t.WLB(2,dg,""+n.type,""+e.EntityValueFunction(n.value)))}}function U5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(4);t.Q6J("ghs-label",e.rewards.hints.resources[n])}}function L5(o,a){if(1&o&&(t.ynx(0),t.YNc(1,J5,1,5,"span",113),t.YNc(2,U5,1,1,"span",80),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.value),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.resources&&i.rewards.hints.resources[e])}}function Q5(o,a){if(1&o&&(t.TgZ(0,"div",112),t.YNc(1,L5,3,2,"ng-container",28),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.rewards.resources)}}function R5(o,a){if(1&o&&t._UZ(0,"span",82),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("ghs-label","scenario.rewards.collectiveResources"+(e.EntityValueFunction(n.value)<0?"Lose":""))("ghs-label-args",t.WLB(2,dg,""+n.type,""+e.EntityValueFunction(n.value)))}}function F5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(4);t.Q6J("ghs-label",e.rewards.hints.resources[n])}}function q5(o,a){if(1&o&&(t.ynx(0),t.YNc(1,R5,1,5,"span",113),t.YNc(2,F5,1,1,"span",80),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.value),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.resources&&i.rewards.hints.resources[e])}}function H5(o,a){if(1&o&&(t.TgZ(0,"div",114),t.YNc(1,q5,3,2,"ng-container",28),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.rewards.collectiveResources)}}function j5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.reputation)}}function B5(o,a){if(1&o&&(t.TgZ(0,"div",115)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,j5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.reputation")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.rewards.reputation))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.reputation)}}function z5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.prosperity)}}function G5(o,a){if(1&o&&(t.TgZ(0,"div",116)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,z5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.prosperity")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.rewards.prosperity))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.prosperity)}}function V5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.inspiration)}}function Y5(o,a){if(1&o&&(t.TgZ(0,"div",117)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,V5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.inspiration")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.EntityValueFunction(n.rewards.inspiration)))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.inspiration)}}function K5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.morale)}}function $5(o,a){if(1&o&&(t.TgZ(0,"div",118)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA(),t.YNc(4,K5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.morale")("ghs-label-args",t.VKq(5,Ji,""+t.lcZ(3,3,n.EntityValueFunction(n.rewards.morale)))),t.xp6(2),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.morale)}}function W5(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.perks)}}function X5(o,a){if(1&o&&(t.TgZ(0,"div",119)(1,"span"),t._UZ(2,"span",49),t.qZA(),t.YNc(3,W5,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.perks")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.perks)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.perks)}}function t4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(4);t.Q6J("ghs-label",n.rewards.hints.battleGoals)}}function e4(o,a){if(1&o&&(t.TgZ(0,"div",120),t._UZ(1,"span",82),t.YNc(2,t4,1,1,"span",80),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.battleGoals")("ghs-label-args",t.VKq(3,Ji,""+n.rewards.battleGoals)),t.xp6(1),t.Q6J("ngIf",n.rewards.hints&&n.rewards.hints.battleGoals)}}function n4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split(":")[0].split("-")[0],i.split(":")[0].split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(3);let i;t.Q6J("ghs-label","scenario.rewards.items")("ghs-label-args",t.kEZ(2,LO,n.split(":")[0].split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split(":")[0].split("-")[0],n.split(":")[0].split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||"",n.split(":")[1]))}}function i4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split("-")[0],i.split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(3);let i;t.Q6J("ghs-label","scenario.rewards.item")("ghs-label-args",t.WLB(2,dg,n.split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split("-")[0],n.split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||""))}}function o4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.items[n])}}function a4(o,a){if(1&o&&(t.TgZ(0,"div",121),t.YNc(1,n4,1,6,"span",122),t.YNc(2,i4,1,5,"span",122),t.YNc(3,o4,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",-1!=n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",-1==n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.items&&i.rewards.hints.items[e])}}function s4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(5);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split(":")[0].split("-")[0],i.split(":")[0].split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(5);let i;t.Q6J("ghs-label","scenario.rewards.items")("ghs-label-args",t.kEZ(2,LO,n.split(":")[0].split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split(":")[0].split("-")[0],n.split(":")[0].split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||"",n.split(":")[1]))}}function r4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",123),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(5);return t.KtG(s.openItemDialog(s.gameManager.itemManager.getItem(+i.split("-")[0],i.split("-").slice(1).join("-")||s.scenario.edition||"",!0)))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(5);let i;t.Q6J("ghs-label","scenario.rewards.item")("ghs-label-args",t.WLB(2,dg,n.split("-")[0],(null==(i=e.gameManager.itemManager.getItem(+n.split("-")[0],n.split("-").slice(1).join("-")||e.scenario.edition||"",!0))?null:i.name)||""))}}function c4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw(2).index,e=t.oxw(4);t.Q6J("ghs-label",e.rewards.hints.chooseItem[n])}}function l4(o,a){if(1&o&&(t.ynx(0),t.YNc(1,s4,1,6,"span",122),t.YNc(2,r4,1,5,"span",122),t.YNc(3,c4,1,1,"span",80),t.BQk()),2&o){const n=a.$implicit,e=t.oxw().index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",-1!=n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",-1==n.indexOf(":")),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.chooseItem&&i.rewards.hints.chooseItem[e])}}function g4(o,a){1&o&&t._UZ(0,"span",69),2&o&&t.Q6J("ghs-label","or")}function d4(o,a){if(1&o&&(t.ynx(0),t.YNc(1,l4,4,3,"ng-container",28),t.YNc(2,g4,1,1,"span",125),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",n||t.DdM(2,or)),t.xp6(1),t.Q6J("ngIf",e0),t.xp6(1),t.Q6J("ngIf",-1==n),t.xp6(1),t.Q6J("ngIf",e.rewards.hints&&e.rewards.hints.randomItemBlueprint)}}function Z4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.events[n])}}function A4(o,a){if(1&o&&(t.TgZ(0,"div",128),t._UZ(1,"span",82),t.YNc(2,Z4,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.event."+n.split(":")[0])("ghs-label-args",t.VKq(3,Ji,n.split(":")[1])),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.events&&i.rewards.hints.events[e])}}function S4(o,a){if(1&o&&t._UZ(0,"span",81),2&o){const n=t.oxw().index,e=t.oxw(3);t.Q6J("ghs-label",e.rewards.hints.removeEvents[n])}}function E4(o,a){if(1&o&&(t.TgZ(0,"div",128),t._UZ(1,"span",82),t.YNc(2,S4,1,1,"span",80),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","scenario.rewards.removeEvent."+n.split(":")[0])("ghs-label-args",t.VKq(3,Ji,n.split(":")[1])),t.xp6(1),t.Q6J("ngIf",i.rewards.hints&&i.rewards.hints.removeEvents&&i.rewards.hints.removeEvents[e])}}function D4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",133),t.NdJ("change",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(4);return t.KtG(s.selectCharacter(i))}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("value",n)("checked",e.chooseUnlockCharacter==n)}}function I4(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","or"))}const N4=function(o,a){return{unlocked:o,disabled:a}};function J4(o,a){if(1&o&&(t.TgZ(0,"label",131),t.YNc(1,D4,1,2,"input",132),t._UZ(2,"span",82),t.YNc(3,I4,2,1,"span",14),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.Q6J("ngClass",t.WLB(5,N4,i.unlocked(n),!i.settingsManager.settings.automaticUnlocking)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.automaticUnlocking),t.xp6(1),t.Q6J("ghs-label","scenario.rewards.unlockCharacter.box")("ghs-label-args",t.VKq(8,Ji,n)),t.xp6(1),t.Q6J("ngIf",e0),t.xp6(1),t.Q6J("ngForOf",n.rewards.itemDesigns||t.DdM(28,or)),t.xp6(1),t.Q6J("ngForOf",n.rewards.itemBlueprints||t.DdM(29,or)),t.xp6(1),t.Q6J("ngIf",n.rewards.randomItemBlueprints),t.xp6(1),t.Q6J("ngForOf",n.randomItemBlueprints),t.xp6(1),t.Q6J("ngForOf",n.rewards.events||t.DdM(30,or)),t.xp6(1),t.Q6J("ngForOf",n.rewards.removeEvents||t.DdM(31,or)),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.chooseUnlockCharacter&&n.rewards.chooseUnlockCharacter.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.unlockCharacter),t.xp6(1),t.Q6J("ngIf",n.rewards.custom),t.xp6(1),t.Q6J("ngForOf",n.rewards.lootDeckCards||t.DdM(32,or)),t.xp6(1),t.Q6J("ngIf",n.townGuardAMs&&n.townGuardAMs.length>0)}}function B4(o,a){if(1&o&&(t.ynx(0),t.YNc(1,t5,6,2,"div",13),t.YNc(2,r5,5,3,"div",67),t.YNc(3,g5,5,2,"div",67),t.YNc(4,u5,6,2,"div",68),t.YNc(5,f5,6,2,"div",68),t.YNc(6,C5,6,2,"div",68),t.YNc(7,P5,6,2,"div",68),t.YNc(8,x5,6,2,"div",68),t.YNc(9,k5,6,2,"div",68),t.YNc(10,j4,30,33,"div",15),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.conclusionWarning),t.xp6(1),t.Q6J("ngIf",n.success&&(n.scenario.unlocks&&n.scenario.unlocks.length>0||n.rewards&&n.rewards.chooseLocation&&n.rewards.chooseLocation.length>0)),t.xp6(1),t.Q6J("ngIf",n.success&&(!n.scenario.unlocks||0==n.scenario.unlocks.length)&&n.conclusion&&n.conclusion.unlocks&&n.conclusion.unlocks.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.globalAchievements&&n.rewards.globalAchievements.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.lostPartyAchievements&&n.rewards.lostPartyAchievements.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.partyAchievements&&n.rewards.partyAchievements.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.campaignSticker&&n.rewards.campaignSticker.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.calendarSection&&n.rewards.calendarSection.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.rewards.calendarSectionManual&&n.rewards.calendarSectionManual.length>0),t.xp6(1),t.Q6J("ngIf",n.rewards&&n.hasRewards())}}function z4(o,a){if(1&o&&(t.TgZ(0,"div",117)(1,"span"),t._UZ(2,"span",49),t.ALo(3,"ghsValueSign"),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","scenario.rewards.inspiration")("ghs-label-args",t.VKq(4,Ji,""+t.lcZ(3,2,n.EntityValueFunction("4-C"))))}}function G4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",61),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.toggleChallenges(!0))}),t.qZA()}if(2&o){const n=t.oxw(3);t.Q6J("checked",n.challenges>1)}}function V4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",140),t._UZ(1,"span",3),t.TgZ(2,"input",61),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleChallenges())}),t.qZA(),t.YNc(3,G4,1,1,"input",56),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","scenario.summary.challenges."+(n.numberChallenges>1?"completed":"complete")),t.xp6(1),t.Q6J("checked",n.challenges>0),t.xp6(1),t.Q6J("ngIf",n.numberChallenges>1)}}function Y4(o,a){if(1&o&&(t.TgZ(0,"div",84)(1,"label"),t._UZ(2,"span",3),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",63),t.YNc(5,z4,4,6,"div",93),t.YNc(6,V4,4,3,"div",139),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.rewards.bonus"),t.xp6(3),t.Q6J("ngIf",n.gameManager.fhRules()&&n.EntityValueFunction("4-C")),t.xp6(1),t.Q6J("ngIf",n.numberChallenges>0)}}function K4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",149),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.finish(s))}),t._UZ(1,"span",49),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ghs-label","scenario.summary.link")("ghs-label-args",t.VKq(2,Ji,n))}}function $4(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",147),t._UZ(2,"span",3),t.qZA(),t.YNc(3,K4,2,4,"a",148),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.summary.forcedLinks"),t.xp6(1),t.Q6J("ngForOf",n.scenario.forcedLinks)}}function W4(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",151),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.finish(s))}),t._UZ(1,"span",49),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ghs-label","scenario.summary.link")("ghs-label-args",t.VKq(2,Ji,n))}}function X4(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",147),t._UZ(2,"span",3),t.qZA(),t.YNc(3,W4,2,4,"a",150),t.BQk()),2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ghs-label","scenario.summary.links"),t.xp6(1),t.Q6J("ngForOf",n.scenario.links)}}function tN(o,a){if(1&o&&(t.TgZ(0,"span",146),t.YNc(1,$4,4,2,"ng-container",14),t.YNc(2,X4,4,2,"ng-container",14),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.scenario.forcedLinks&&n.scenario.forcedLinks.length>0),t.xp6(1),t.Q6J("ngIf",!n.scenario.forcedLinks||0==n.scenario.forcedLinks.length)}}function eN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",152),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.finish())}),t._UZ(1,"span",3),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",n.conclusionOnly?"scenario.summary.solve":"scenario.summary.apply")}}function nN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",153),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.restart())}),t._UZ(1,"span",3),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",n.lootColumns.length>0?"scenario.summary.restartLoseLoot":"scenario.summary.restart")}}function iN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",141)(1,"a",142),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(2,"span",3),t.qZA(),t.YNc(3,tN,3,2,"span",143),t.YNc(4,eN,2,1,"a",144),t.YNc(5,nN,2,1,"a",145),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(5,nT,n.gameManager.stateManager.permissions&&(!n.gameManager.stateManager.permissions.round||!n.gameManager.stateManager.permissions.scenario||!n.gameManager.stateManager.permissions.characters))),t.xp6(2),t.Q6J("ghs-label","scenario.summary.cancel"),t.xp6(1),t.Q6J("ngIf",n.success&&(n.gameManager.game.party.campaignMode||n.forceCampaign)&&(n.scenario.links&&n.scenario.links.length>0||n.scenario.forcedLinks&&n.scenario.forcedLinks.length>0)),t.xp6(1),t.Q6J("ngIf",!n.success||!n.gameManager.game.party.campaignMode||n.alreadyWarning||n.forceCampaign||!n.scenario.forcedLinks||0==n.scenario.forcedLinks.length),t.xp6(1),t.Q6J("ngIf",!n.success)}}const oN=function(o,a){return{fh:o,modern:a}};let uo=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"scenario",void 0),(0,_.Z)(this,"conclusion",void 0),(0,_.Z)(this,"success",void 0),(0,_.Z)(this,"conclusionWarning",void 0),(0,_.Z)(this,"alreadyWarning",!1),(0,_.Z)(this,"characterProgress",!0),(0,_.Z)(this,"gainRewards",!0),(0,_.Z)(this,"forceCampaign",!1),(0,_.Z)(this,"conclusionOnly",void 0),(0,_.Z)(this,"rewardsOnly",void 0),(0,_.Z)(this,"characters",void 0),(0,_.Z)(this,"battleGoals",[]),(0,_.Z)(this,"collectiveGold",[]),(0,_.Z)(this,"lootColumns",[]),(0,_.Z)(this,"lootColumnsLooted",[]),(0,_.Z)(this,"lootColumnsTotal",[]),(0,_.Z)(this,"lootedGold",0),(0,_.Z)(this,"totalGold",0),(0,_.Z)(this,"rewardItems",[]),(0,_.Z)(this,"rewardItemCount",[]),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"chooseLocation",void 0),(0,_.Z)(this,"chooseUnlockCharacter",void 0),(0,_.Z)(this,"rewards",void 0),(0,_.Z)(this,"challenges",0),(0,_.Z)(this,"numberChallenges",0),(0,_.Z)(this,"calendarSectionManual",[]),(0,_.Z)(this,"randomItem",void 0),(0,_.Z)(this,"randomItemIndex",-1),(0,_.Z)(this,"randomItems",[]),(0,_.Z)(this,"randomItemBlueprints",[]),(0,_.Z)(this,"townGuardAMs",[]),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"waitForClose",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.scenario=e.scenario,this.success=e.success,this.conclusion=e.conclusion,this.conclusionOnly=e.conclusionOnly,this.rewardsOnly=e.rewardsOnly,this.conclusionOnly&&(this.conclusion=this.scenario,this.success=!0),this.conclusionWarning=this.success&&!this.conclusion&&null!=d.v.sectionData(this.scenario.edition).find(l=>l.parent==this.scenario.index&&l.group==this.scenario.group&&l.edition==this.scenario.edition&&l.conclusion),this.characters=d.v.game.figures.filter(l=>l instanceof oe.z).map((l,m)=>(this.battleGoals[m]=0,l)).sort((l,m)=>{if(!l.absent&&m.absent)return-1;if(l.absent&&!m.absent)return 1;const O=l.title.toLowerCase()||R.r.getLabel("data.character."+l.name).toLowerCase(),k=m.title.toLowerCase()||R.r.getLabel("data.character."+m.name).toLowerCase();return O>k?1:OO.lootCards&&O.lootCards.some(k=>d.v.game.lootDeck.cards[k].type==m))&&(this.lootColumns.push(m),this.lootColumnsLooted.push(this.characters.map(O=>this.lootValue(O,m)).reduce((O,k)=>O+k)),this.lootColumnsTotal.push(d.v.lootManager.getTotal(d.v.game.lootDeck,m)))}d.v.game.lootDeck&&d.v.game.lootDeck.cards.length>0&&(this.characters.length>0&&(this.lootedGold=this.characters.map(l=>this.lootValue(l,le.CG.money)+this.lootValue(l,le.CG.special1)+this.lootValue(l,le.CG.special2)).reduce((l,m)=>l+m)),this.totalGold=d.v.lootManager.getTotal(d.v.game.lootDeck,le.CG.money),this.totalGold+=d.v.lootManager.getTotal(d.v.game.lootDeck,le.CG.special1),this.totalGold+=d.v.lootManager.getTotal(d.v.game.lootDeck,le.CG.special2)),this.alreadyWarning=!this.rewardsOnly&&d.v.game.party.campaignMode&&this.success&&(null!=d.v.game.party.scenarios.find(l=>l.index==this.scenario.index&&l.edition==this.scenario.edition&&l.group==this.scenario.group)||this.conclusion&&null!=d.v.game.party.conclusions.find(l=>this.conclusion&&l.index==this.conclusion.index&&l.edition==this.conclusion.edition&&l.group==this.conclusion.group))||!1,this.characterProgress=!this.rewardsOnly&&!this.conclusionOnly&&(d.v.game.party.campaignMode||!d.v.fhRules()),this.gainRewards=d.v.game.party.campaignMode,this.updateState(),d.v.stateManager.scenarioSummary=!0,d.v.game.finish||this.conclusionOnly||this.rewardsOnly?this.loadFinish():(d.v.stateManager.before("finishScenario.dialog",...d.v.scenarioManager.scenarioUndoArgs()),this.updateFinish(),d.v.stateManager.after()),this.dialogRef.closed.subscribe({next:()=>{d.v.stateManager.scenarioSummary&&!this.conclusionOnly&&!this.rewardsOnly&&!this.waitForClose&&(d.v.stateManager.before("finishScenario.close",...d.v.scenarioManager.scenarioUndoArgs()),d.v.stateManager.scenarioSummary=!1,d.v.game.finish=void 0,d.v.stateManager.after())}}),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.conclusionOnly||(d.v.game.finish?this.loadFinish():(d.v.stateManager.scenarioSummary=!1,this.dialogRef.close()))}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}updateFinish(){const e=new At.ZW;e.conclusion=this.conclusion?new ei._b(this.conclusion.index,this.conclusion.edition,this.conclusion.group):void 0,e.success=this.success,e.battleGoals=this.battleGoals,e.challenges=this.challenges,e.chooseLocation=this.chooseLocation,e.chooseUnlockCharacter=this.chooseUnlockCharacter,e.collectiveGold=this.collectiveGold,e.items=this.items,e.calendarSectionManual=this.calendarSectionManual,e.randomItem=this.randomItem?new Vn.xb(""+this.randomItem.id,this.randomItem.edition):void 0,e.randomItemIndex=this.randomItemIndex,e.randomItems=this.randomItems?this.randomItems.map(i=>i?new Vn.xb(""+i.id,i.edition):void 0):[],e.randomItemBlueprints=this.randomItemBlueprints,d.v.game.finish=e}loadFinish(){if(d.v.game.finish){const e=d.v.game.finish;this.conclusion=e.conclusion?d.v.sectionData(e.conclusion.edition).find(i=>e.conclusion&&i.index==e.conclusion.index&&i.group==e.conclusion.group&&i.conclusion):void 0,this.success=e.success,this.battleGoals=e.battleGoals,this.challenges=e.challenges,this.chooseLocation=e.chooseLocation,this.chooseUnlockCharacter=e.chooseUnlockCharacter,this.collectiveGold=e.collectiveGold,this.items=e.items,this.calendarSectionManual=e.calendarSectionManual||e.calenderSectionManual,this.randomItem=e.randomItem?d.v.itemManager.getItem(+e.randomItem.name,e.randomItem.edition,!0):void 0,this.randomItemIndex=e.randomItemIndex,this.randomItems=e.randomItems?e.randomItems.map(i=>i?d.v.itemManager.getItem(+i.name,i.edition,!0):void 0):[],this.randomItemBlueprints=e.randomItemBlueprints}}updateState(e=!1){if(this.forceCampaign=e,this.challenges=0,this.numberChallenges=0,this.rewards=void 0,this.townGuardAMs=[],(d.v.game.party.campaignMode||e)&&this.success){if(this.conclusion&&(this.rewards=this.conclusion.rewards),this.rewards||(this.rewards=this.scenario.rewards),this.rewards=this.scenario.rewards,this.conclusion&&this.conclusion.rewards&&(this.rewards?Object.assign(this.rewards,this.conclusion.rewards):this.rewards=this.conclusion.rewards),this.rewards){if(this.rewards.collectiveGold&&this.characters.forEach((i,s)=>this.collectiveGold[s]=0),this.rewards.items&&(this.characters.forEach((i,s)=>this.items[s]=[]),this.rewards.items.forEach((i,s)=>{const l=d.v.itemManager.getItem(+i.split(":")[0].split("-")[0],i.split(":")[0].split("-").slice(1).join("-")||this.scenario.edition,!0);if(l){if(this.rewardItems.push(l),this.rewardItemCount.push(-1==i.indexOf(":")?1:+i.split(":")[1]),1==this.characters.filter(m=>!m.absent).length){const m=this.characters.find(O=>!O.absent);m&&this.items[this.characters.indexOf(m)].push(s)}}else console.error("Unknown Item '"+i+"' for scenario '"+this.scenario.index+" ("+this.scenario.edition+")")})),this.rewards.chooseItem&&(this.characters.forEach((i,s)=>this.items[s]=[]),this.rewards.chooseItem.forEach(i=>{i.forEach((s,l)=>{const m=d.v.itemManager.getItem(+s.split(":")[0].split("-")[0],s.split(":")[0].split("-").slice(1).join("-")||this.scenario.edition,!0);m?(this.rewardItems.push(m),this.rewardItemCount.push(-1==s.indexOf(":")?1:+s.split(":")[1])):console.error("Unknown Item '"+s+"' for scenario '"+this.scenario.index+" ("+this.scenario.edition+")")})})),this.rewards.chooseLocation&&this.rewards.chooseLocation.length>0&&(this.chooseLocation=this.rewards.chooseLocation[0]),this.rewards.chooseUnlockCharacter&&this.rewards.chooseUnlockCharacter.length>0){let i=0;for(;ithis.calendarSectionManual[s]=0),this.rewards.randomItemBlueprint&&this.randomItemBlueprints.lengths.blueprint&&!d.v.game.party.unlockedItems.find(l=>l.name==""+s.id&&l.edition==s.edition)&&(!s.requiredBuilding||d.v.game.party.buildings.find(l=>l.name==s.requiredBuilding&&l.level>=s.requiredBuildingLevel)));for(let s=this.randomItemBlueprints.length;s0&&d.v.game.party.unlockedItems.find(O=>m&&O.name==m.name&&O.edition==m.edition);)i=i.filter(O=>m&&(O.id+""!=m.name||O.edition!=m.edition)),i.length>0?(l=i[Math.floor(Math.random()*i.length)],m=new Vn.xb(""+l.id,l.edition)):m=void 0;this.randomItemBlueprints.push(m?+m.name:-1)}}if(this.rewards.randomItem&&!this.randomItem){const i=+this.rewards.randomItem.split("-")[0],s=+this.rewards.randomItem.split("-")[1],l=this.rewards.randomItem.split("-").length>2?this.rewards.randomItem.split("-")[2]:this.scenario.edition;let m=d.v.itemManager.getItems(this.scenario.edition,!0).filter(W=>W.id>=i&&W.id<=s&&W.edition==l),O=m[Math.floor(Math.random()*m.length)],k=O?new Vn.xb(""+O.id,O.edition):void 0;for(;m.length>0&&this.characters.flatMap(W=>W.progress.items).filter(W=>k&&W.name==k.name&&W.edition==k.edition).length>=O.count;)m=m.filter(W=>k&&(W.id+""!=k.name||W.edition!=k.edition)),m.length>0?(O=m[Math.floor(Math.random()*m.length)],k=new Vn.xb(""+O.id,O.edition)):k=void 0;k&&O&&(this.randomItem=O)}if(this.rewards.randomItems&&this.randomItems.length1){const i=+this.rewards.randomItems.split("-")[0],s=+this.rewards.randomItems.split("-")[1],l=this.rewards.randomItems.split("-").length>2?this.rewards.randomItems.split("-")[2]:this.scenario.edition;let m=d.v.itemManager.getItems(this.scenario.edition,!0).filter(O=>O.id>=i&&O.id<=s&&O.edition==l);for(let O=this.randomItems.length;O0&&this.characters.flatMap(Ct=>Ct.progress.items).filter(Ct=>ct&&Ct.name==ct.name&&Ct.edition==ct.edition).length>=W.count;)m=m.filter(Ct=>ct&&(Ct.id+""!=ct.name||Ct.edition!=ct.edition)),m.length>0?(W=m[Math.floor(Math.random()*m.length)],ct=new Vn.xb(""+W.id,W.edition)):ct=void 0;for(;m.find(Ct=>!k.progress.items.find(Ot=>Ot.name==Ct.id+""&&Ot.edition==Ct.edition))&&k.progress.items.find(Ct=>ct&&Ct.name==ct.name+""&&Ct.edition==ct.edition);)W=m[Math.floor(Math.random()*m.length)],ct=new Vn.xb(""+W.id,W.edition);k.progress.items.find(Ct=>ct&&Ct.name==ct.name+""&&Ct.edition==ct.edition)&&(ct=void 0),this.randomItems.push(ct&&W?W:void 0)}}}this.rewards.townGuardAm&&(this.townGuardAMs=this.rewards.townGuardAm.map(i=>Lt.Bt.find(s=>s.id==i)))}if(d.v.fhRules()){const i=d.v.game.party.buildings.find(s=>"town-hall"==s.name&&"wrecked"!=s.state);i&&(1==i.level||2==i.level?this.numberChallenges=1:3==i.level&&(this.numberChallenges=2))}}}hasRewards(){const e=this.rewards;return!(!e||!(e.envelopes||e.gold||e.experience||e.collectiveGold||e.resources||e.collectiveResources||e.reputation||e.prosperity||e.inspiration||e.morale||e.perks||e.battleGoals||e.items||e.chooseItem||e.itemDesigns||e.itemBlueprints||e.randomItemBlueprint||e.randomItemBlueprints||e.events||e.chooseUnlockCharacter||e.unlockCharacter||e.custom||e.lootDeckCards||e.townGuardAm))}hasBonus(){return(d.v.game.party.campaignMode||this.forceCampaign)&&this.success&&!this.conclusionOnly&&!this.scenario.solo&&(d.v.fhRules()&&d.v.characterManager.characterCount()<4||this.numberChallenges>0)}availableCollectiveGold(){return this.rewards&&this.rewards.collectiveGold&&this.collectiveGold.length>0&&this.rewards.collectiveGold-this.collectiveGold.reduce((e,i)=>e+i)||0}lootValue(e,i){let s=0;return e.lootCards&&e.lootCards.forEach(l=>{const m=d.v.game.lootDeck.cards[l];m&&m.type==i&&(s+=d.v.lootManager.getValue(m))}),s}treasureRewardsFromString(e){return e.split(":").length<2?[]:e.split(":")[1].split("|").map(i=>i.split("+"))}toggleBattleGoal(e,i,s){const l=this.characters[i];let m;d.v.stateManager.before("finishScenario.battleGoal",l.name,""+s),R.r.settings.battleGoals&&l.battleGoal&&l.battleGoals.length>0&&(m=d.v.battleGoalManager.getBattleGoal(l.battleGoals[0])),e.target.checked&&this.battleGoals[i]s&&(this.battleGoals[i]=m.checks)):this.battleGoals[i]>=s&&(this.battleGoals[i]=s-1,m&&m.checks>s-1&&(this.battleGoals[i]=0)),this.updateFinish(),d.v.stateManager.after()}openBattleGoals(e){this.dialog.open(bw,{panelClass:["dialog"],data:{character:e,cardOnly:e.battleGoal}})}toggleChallenges(e=!1){d.v.stateManager.before("finishScenario.dialog.challenge"+(e?"s":"")),this.challenges=this.challenges>(e?1:0)?e?1:0:e?2:1,this.updateFinish(),d.v.stateManager.after()}itemDistributed(e,i,s=!0){if(this.items[e]||(this.items[e]=[]),s&&this.rewards&&this.rewards.chooseItem){let k=0,W=0,ct=0,Ct=!1;if(this.rewards.chooseItem.forEach(Ot=>{!Ct&&ixt!=i&&(xtW)&&this.characters.some((Gt,se)=>this.itemDistributed(se,xt,!1))))return!0}const l=this.rewardItems[i];if(this.characters[e].progress.items.find(k=>k.name==""+l.id&&k.edition==l.edition))return!0;const m=this.rewardItems[i],O=s?m.count-this.characters.filter(k=>k.progress.items.find(W=>W.name==""+m.id&&W.edition==m.edition)).length:1;return-1==this.items[e].indexOf(i)&&this.items.filter(k=>-1!=k.indexOf(i)).length>=Math.min(this.rewardItemCount[i],O)}toggleItem(e,i,s){d.v.stateManager.before("finishScenario.dialog.item",""+i,""+this.rewardItems[s].id),-1==this.items[i].indexOf(s)?this.items[i].push(s):this.items[i].splice(this.items[i].indexOf(s),1),this.updateFinish(),d.v.stateManager.after()}toggleRandomItem(e,i){d.v.stateManager.before("finishScenario.dialog.item",""+i),this.randomItemIndex=this.randomItemIndex==i?-1:i,this.updateFinish(),d.v.stateManager.after()}openItemDialog(e){e&&this.dialog.open(gg,{data:{item:e}})}changeCollectiveGold(e,i){d.v.stateManager.before("finishScenario.dialog.collectiveGold",""+i,e.target.value),this.collectiveGold[i]=+e.target.value,this.updateFinish(),d.v.stateManager.after()}changeCalendarSectionManual(e,i){d.v.stateManager.before("finishScenario.dialog.calendarSectionManual",""+i,e.target.value),this.calendarSectionManual[i]=+e.target.value,this.updateFinish(),d.v.stateManager.after()}selectLocation(e){d.v.stateManager.before("finishScenario.dialog.chooseLocation",e),this.chooseLocation=e,this.updateFinish(),d.v.stateManager.after()}selectCharacter(e){d.v.stateManager.before("finishScenario.dialog.chooseUnlockCharacter",e),this.chooseUnlockCharacter=e,this.updateFinish(),d.v.stateManager.after()}openCharacterSheet(e){this.dialog.open(IO,{panelClass:["dialog-invert"],data:e})}toggleAbsent(e){d.v.stateManager.before(e.absent?"unsetAbsent":"setAbsent","data.character."+e.name),e.absent=!e.absent,d.v.stateManager.after()}finish(e=void 0){var i=this;return(0,J.Z)(function*(){i.waitForClose=!0;const s=d.v.scenarioData(i.scenario.edition).find(l=>l.group==i.scenario.group&&l.index==e);if(i.conclusionOnly?d.v.stateManager.before("finishConclusion",...d.v.scenarioManager.scenarioUndoArgs(i.scenario)):d.v.stateManager.before(i.success&&s?"finishScenario.linked":"finishScenario."+(i.success?"success":"failure"),...d.v.scenarioManager.scenarioUndoArgs(),e||""),i.success){if(d.v.game.figures.filter(l=>l instanceof oe.z).map(l=>l).sort((l,m)=>{const O=l.title.toLowerCase()||R.r.getLabel("data.character."+l.name).toLowerCase(),k=m.title.toLowerCase()||R.r.getLabel("data.character."+m.name).toLowerCase();return O>k?1:O{if(!l.absent&&(i.battleGoals[m]>0&&(l.progress.battleGoals+=i.battleGoals[m]),i.collectiveGold[m]>0&&(l.progress.gold+=i.collectiveGold[m]),i.rewardItems.forEach((O,k)=>{i.items.every(W=>-1==W.indexOf(k))&&i.items[m].push(k)}),i.items[m]&&i.items[m].length>0&&i.items[m].forEach(O=>{const k=i.rewardItems[O];l.progress.items.push(new Vn.xb(""+k.id,k.edition)),d.v.itemManager.addItemCount(k)}),i.challenges))for(let O=0;O0&&i.randomItemBlueprints.forEach(l=>{-1==l?d.v.game.party.inspiration+=1:d.v.game.party.unlockedItems.push(new Vn.Jc(""+l,i.scenario.edition))}),(i.gainRewards||i.forceCampaign)&&i.rewards&&i.rewards.calendarSectionManual&&i.rewards.calendarSectionManual.forEach((l,m)=>{if(i.calendarSectionManual[m]>=0){const O=d.v.game.party.weeks+i.calendarSectionManual[m];d.v.game.party.weekSections[O]||(d.v.game.party.weekSections[O]=[]),d.v.game.party.weekSections[O]?.push(l.section)}})}i.conclusionOnly?d.v.scenarioManager.finishScenario(i.scenario,!0,i.conclusion,!1,void 0,i.characterProgress||i.forceCampaign,i.gainRewards||i.forceCampaign,!0):d.v.scenarioManager.finishScenario(d.v.game.scenario,i.success,i.conclusion,!1,s?new ei.$4(s):void 0,i.characterProgress||i.forceCampaign,i.gainRewards||i.forceCampaign),yield d.v.stateManager.after(0,R.r.settings.autoBackup>-1&&R.r.settings.autoBackupFinish&&(0==R.r.settings.autoBackup||(d.v.game.revision+d.v.game.revisionOffset)%R.r.settings.autoBackup!=0)),i.dialogRef.close()})()}restart(){this.waitForClose=!0,d.v.stateManager.before("finishScenario.restart",...d.v.scenarioManager.scenarioUndoArgs()),d.v.scenarioManager.finishScenario(this.gameManager.game.scenario,this.success,this.conclusion,!0,void 0,this.characterProgress||this.forceCampaign,this.gainRewards||this.forceCampaign,!1),d.v.stateManager.after(1e3),this.dialogRef.close()}close(){this.dialogRef.close()}unlocked(e){return-1!=d.v.game.unlockedCharacters.indexOf(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-summary"]],decls:19,vars:17,consts:[[1,"scroll-container"],[1,"header"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"text-white",3,"ghs-label"],["class","success",4,"ngIf"],["class","conclusion",4,"ngIf"],["class","casual",4,"ngIf"],["class","failure",4,"ngIf"],[1,"main",3,"ngClass"],["class","table",3,"--ghs-summary-columns",4,"ngIf"],[1,"rewards"],["class","reward warning",4,"ngIf"],[4,"ngIf"],["class","reward",4,"ngIf"],["class","buttons",3,"ngClass",4,"ngIf"],[1,"success"],[1,"conclusion"],[1,"casual"],[1,"failure"],[1,"table"],[1,"head-col","first"],["class","first",4,"ngFor","ngForOf"],[1,"head-col","calc-col"],["class","calc-col",4,"ngFor","ngForOf"],[1,"head-col"],[3,"ghs-label",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"first"],[1,"icon","character-icon",3,"src","click"],[1,"name",3,"ngClass"],[1,"absent-icon-container",3,"ngClass"],[1,"ghs-svg","absent-icon",3,"src","ghs-label","ghs-label-attribute","click"],[1,"calc-col"],["type","number","min","0",3,"max","value","change"],[1,"ghs-svg",3,"src"],[1,"gold"],[1,"loot"],["class","xp",4,"ngIf"],[1,"xp"],["class","treasures",4,"ngFor","ngForOf"],[1,"treasures"],["class","hint-container",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"treasure","hint-trigger"],[1,"hint","above","center"],["class","text placeholder text-white",3,"edition","index","rewardResults",4,"ngIf"],[1,"text","placeholder","text-white",3,"edition","index","rewardResults"],[3,"ghs-label","ghs-label-args"],[3,"item","flipped","click",4,"ngIf"],["type","checkbox",3,"disabled","checked","change"],[3,"item","flipped","click"],[1,"battlegoals"],["class","battlegoal",3,"click",4,"ngIf"],[1,"checkmarks"],["type","checkbox",3,"checked","change",4,"ngIf"],[1,"battlegoal",3,"click"],[3,"identifier","flipped"],["type","checkbox",3,"disabled","checked",4,"ngFor","ngForOf"],["type","checkbox",3,"disabled","checked"],["type","checkbox",3,"checked","change"],[1,"reward","warning"],[1,"list"],["class","item",4,"ngIf"],[1,"item"],[3,"click"],["class","reward locations",4,"ngIf"],["class","reward achievements",4,"ngIf"],[1,"placeholder","text-white",3,"ghs-label"],[1,"reward","locations"],["class","list",4,"ngIf"],["class","item location",4,"ngFor","ngForOf"],[1,"item","location"],["class","item location choose",4,"ngFor","ngForOf"],[1,"item","location","choose"],["type","radio","name","chooseLocation",3,"value","checked","change"],[1,"reward","achievements"],["class","item achievement",4,"ngFor","ngForOf"],[1,"item","achievement"],["class","placeholder text-white hint",3,"ghs-label",4,"ngIf"],[1,"placeholder","text-white","hint",3,"ghs-label"],[1,"placeholder","text-white",3,"ghs-label","ghs-label-args"],["type","number","min","-1",3,"value","change"],[1,"reward"],["class","item envelope",4,"ngFor","ngForOf"],["class","item gold",4,"ngIf"],["class","item experience",4,"ngIf"],["class","item collectiveGold",4,"ngIf"],["class","item resources",4,"ngIf"],["class","item collective-resources",4,"ngIf"],["class","item reputation",4,"ngIf"],["class","item prosperity",4,"ngIf"],["class","item inspiration",4,"ngIf"],["class","item morale",4,"ngIf"],["class","item perks",4,"ngIf"],["class","item battleGoals",4,"ngIf"],["class","item items",4,"ngFor","ngForOf"],["class","item chooseItem",4,"ngIf"],["class","item item-designs",4,"ngFor","ngForOf"],["class","item item-blueprints",4,"ngFor","ngForOf"],["class","item item-blueprints",4,"ngIf"],["class","item events",4,"ngFor","ngForOf"],["class","list-inline unlock-character",4,"ngIf"],["class","item character",4,"ngIf"],["class","item custom",4,"ngIf"],["class","item loot-deck-cards",4,"ngFor","ngForOf"],["class","item town-guard-am",4,"ngIf"],[1,"item","envelope"],[1,"item","gold"],[1,"item","experience"],[1,"item","collectiveGold"],[1,"item","resources"],["class","placeholder text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"item","collective-resources"],[1,"item","reputation"],[1,"item","prosperity"],[1,"item","inspiration"],[1,"item","morale"],[1,"item","perks"],[1,"item","battleGoals"],[1,"item","items"],["class","placeholder text-white",3,"ghs-label","ghs-label-args","click",4,"ngIf"],[1,"placeholder","text-white",3,"ghs-label","ghs-label-args","click"],[1,"item","chooseItem"],["class","placeholder text-white",3,"ghs-label",4,"ngIf"],[1,"item","item-designs"],[1,"item","item-blueprints"],[1,"item","events"],[1,"list-inline","unlock-character"],["class","item character choose",3,"ngClass",4,"ngFor","ngForOf"],[1,"item","character","choose",3,"ngClass"],["type","radio","name","chooseUnlockCharacter",3,"value","checked","change",4,"ngIf"],["type","radio","name","chooseUnlockCharacter",3,"value","checked","change"],[1,"item","character"],[1,"item","custom"],[1,"item","loot-deck-cards"],[1,"item","town-guard-am"],["class","placeholder text-white",3,"ghs-label","ghs-label-args",4,"ngFor","ngForOf"],["class","item challenges",4,"ngIf"],[1,"item","challenges"],[1,"buttons",3,"ngClass"],[1,"cancel",3,"click"],["class","links",4,"ngIf"],["class","apply",3,"click",4,"ngIf"],["class","restart",3,"click",4,"ngIf"],[1,"links"],[1,"text"],["class","apply forced-link",3,"click",4,"ngFor","ngForOf"],[1,"apply","forced-link",3,"click"],["class","link",3,"click",4,"ngFor","ngForOf"],[1,"link",3,"click"],[1,"apply",3,"click"],[1,"restart",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span",2),t._UZ(3,"span",3),t.TgZ(4,"span",4),t._uU(5),t._UZ(6,"span",5),t.qZA()(),t.YNc(7,BD,2,1,"span",6),t.YNc(8,zD,2,1,"span",7),t.YNc(9,GD,2,1,"span",8),t.YNc(10,VD,2,1,"span",9),t.qZA(),t.TgZ(11,"div",10),t.YNc(12,GI,27,23,"div",11),t.TgZ(13,"div",12),t.YNc(14,YI,8,3,"div",13),t.YNc(15,XI,7,4,"div",13),t.YNc(16,B4,11,10,"ng-container",14),t.YNc(17,Y4,7,3,"div",15),t.qZA()(),t.YNc(18,iN,6,7,"div",16),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ghs-label",i.conclusionOnly?"scenario.conclusion":i.rewardsOnly?"scenario.summary.rewards":"scenario.summary"),t.xp6(2),t.hij("#",i.scenario.index," "),t.xp6(1),t.Q6J("ghs-label","data.scenario."+i.scenario.name),t.xp6(1),t.Q6J("ngIf",i.success&&!i.conclusionOnly&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",i.conclusion&&i.conclusion!=i.scenario),t.xp6(1),t.Q6J("ngIf",i.success&&!i.gameManager.game.party.campaignMode&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",!i.success),t.xp6(1),t.Q6J("ngClass",t.WLB(14,oN,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(1),t.Q6J("ngIf",i.characters.length>0&&(i.characterProgress||i.forceCampaign)&&i.settingsManager.settings.characterSheet&&!i.conclusionOnly&&!i.rewardsOnly),t.xp6(2),t.Q6J("ngIf",!i.conclusionOnly&&i.alreadyWarning&&i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ngIf",!i.conclusionOnly&&!i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ngIf",!i.alreadyWarning&&i.gameManager.game.party.campaignMode||i.forceCampaign),t.xp6(1),t.Q6J("ngIf",i.hasBonus()),t.xp6(1),t.Q6J("ngIf",!(i.conclusionOnly&&i.alreadyWarning||i.rewardsOnly)))},dependencies:[x.mk,x.sg,x.O5,$f,Xd,yw,ie,Kd,Ii],styles:['.header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-white);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .failure[_ngcontent-%COMP%]{color:var(--ghs-color-red);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:var(--ghs-color-green);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .casual[_ngcontent-%COMP%]{color:var(--ghs-color-red);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor))}.header[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.main[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap-reverse;height:100%}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-summary-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-summary-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white);overflow:auto}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent-icon[_ngcontent-%COMP%]{cursor:pointer}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .character-icon[_ngcontent-%COMP%]:hover, .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent-icon[_ngcontent-%COMP%]:hover{opacity:.7}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .character-icon.absent-icon[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent-icon.absent-icon[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .absent[_ngcontent-%COMP%]{text-decoration:line-through}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .gold[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .xp[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .gold.gold[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .xp.gold[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot.gold[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .gold.xp[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .xp.xp[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot.xp[_ngcontent-%COMP%]{color:var(--ghs-color-blue)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-image:url(dialog_background.fa4ff388462f6a00.png);position:sticky;left:0;z-index:1}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{flex-grow:1;width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));text-align:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%] .battlegoal[_ngcontent-%COMP%]{display:flex;justify-content:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%] .battlegoal[_ngcontent-%COMP%] ghs-battlegoal[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .battlegoals[_ngcontent-%COMP%] .checkmarks[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);justify-content:center;align-items:center}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;background-image:url(treasure.0792d529e76ec279.png);background-size:contain;background-repeat:no-repeat;background-position:center;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-black);width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.main[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor))}.main.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.main.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.rewards[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;flex-direction:column;min-width:0;max-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-brown);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;width:100%;height:100%;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-text);padding-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background:linear-gradient(180deg,var(--ghs-color-brown) 0%,var(--ghs-color-brown) calc(100% - var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor)),transparent 100%);opacity:.2;filter:brightness(20);border-top-left-radius:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));border-top-right-radius:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));z-index:0}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;z-index:1;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.location[_ngcontent-%COMP%], .rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character[_ngcontent-%COMP%]{flex-direction:row;align-items:flex-end;margin:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{white-space:nowrap}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.choose[_ngcontent-%COMP%]{cursor:pointer;color:var(--ghs-color-white);justify-content:flex-start;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-text)}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.choose[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-normal);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.disabled[_ngcontent-%COMP%], .rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character.unlocked[_ngcontent-%COMP%]{pointer-events:none}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.character.unlocked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:50%;left:0;right:0;height:.1em;background-color:var(--ghs-color-white);transform:translateY(-50%);z-index:2}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .item.challenges[_ngcontent-%COMP%]{flex-direction:row;justify-content:center;align-items:center;margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .location[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{display:flex;justify-content:center;width:1.5em;height:1.5em;font-size:1em;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border-radius:100%;border:2px solid var(--ghs-color-black);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list-inline[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-end;flex-wrap:wrap}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list-inline[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{margin:0 .1em}.rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%] .list-inline[_ngcontent-%COMP%] .choose[_ngcontent-%COMP%]{align-items:flex-end}.rewards[_ngcontent-%COMP%] .reward.warning[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.rewards[_ngcontent-%COMP%] .reward.warning[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.buttons[_ngcontent-%COMP%] .apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.buttons[_ngcontent-%COMP%] .links[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.buttons[_ngcontent-%COMP%] .links[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.buttons.denied[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{pointer-events:initial}']})),a})();function aN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.openConclusions(i))}),t._UZ(1,"img",14)(2,"span",15),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.openConclusion"))}function sN(o,a){if(1&o&&(t.TgZ(0,"span",10),t._UZ(1,"img",11),t._uU(2),t.YNc(3,aN,3,1,"a",12),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/"+(e.isSolved(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," "),t.xp6(1),t.Q6J("ngIf",e.hasConclusions(n))}}function rN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.openConclusions(i))}),t._UZ(1,"img",14)(2,"span",15),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.openConclusion"))}const cN=function(o){return{finish:o}};function lN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",10)(1,"span",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.finishConclusion(s))}),t._UZ(2,"img",11),t._uU(3),t.qZA(),t.YNc(4,rN,3,1,"a",12),t._UZ(5,"span",17),t.TgZ(6,"img",18),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeSection(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(4,cN,e.isConclusion(n))),t.xp6(1),t.Q6J("src","./assets/images/"+(e.isSolved(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," "),t.xp6(1),t.Q6J("ngIf",e.hasConclusions(n))}}const iT=function(o){return[o]};let gN=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"week",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),this.week=e,this.dialog=i}sectionsFixed(){const e=d.v.campaignData();return e.weeks&&e.weeks[this.week]&&e.weeks[this.week]||[]}sections(){return d.v.game.party.weekSections[this.week]||[]}isConclusion(e){return null!=d.v.sectionData(d.v.currentEdition()).find(i=>i.index==e&&!i.group&&i.conclusion)}isSolved(e){return null!=d.v.game.party.conclusions.find(i=>i.edition==d.v.game.edition&&i.index==e)}hasConclusions(e){const i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&1==s.parentSections.length&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e)));return i.length>0&&i.every(s=>!d.v.game.party.conclusions.find(l=>l.edition==s.edition&&l.index==s.index&&l.group==s.group))}finishConclusion(e){const i=d.v.sectionData(d.v.currentEdition()).find(s=>s.index==e&&s.conclusion);if(i){const s=new ei.$4(i);this.dialog.open(uo,{panelClass:"dialog",data:{scenario:s,conclusionOnly:!0}})}}openConclusions(e){let i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&1==s.parentSections.length&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e))).map(s=>(s.name="",s));i.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.sectionData(d.v.game.edition).find(s=>s.index==e&&!s.group)}}).closed.subscribe({next:s=>{if(s){const l=new ei.$4(s);d.v.stateManager.before("finishConclusion",...d.v.scenarioManager.scenarioUndoArgs(l)),d.v.scenarioManager.finishScenario(l,!0,void 0,!1,void 0,!1,d.v.game.party.campaignMode,!0),d.v.game.party.weekSections[this.week]=d.v.game.party.weekSections[this.week]||[],d.v.game.party.weekSections[this.week]?.push(l.index),d.v.stateManager.after(),this.dialog.open(uo,{panelClass:"dialog",data:{scenario:l,conclusionOnly:!0}})}}})}addSection(e){d.v.game.party.weekSections[this.week]||(d.v.game.party.weekSections[this.week]=[]),e.classList.add("error"),-1==d.v.game.party.weekSections[this.week]?.indexOf(e.value)&&(d.v.stateManager.before("addPartyWeekSection",d.v.game.party.name,this.week+"",e.value+""),d.v.game.party.weekSections[this.week]?.push(e.value),e.classList.remove("error"),e.value="",d.v.stateManager.after())}removeSection(e){-1!=d.v.game.party.weekSections[this.week]?.indexOf(e)&&(d.v.stateManager.before("removePartyWeekSection",d.v.game.party.name,this.week+"",e+""),d.v.game.party.weekSections[this.week]?.splice(d.v.game.party.weekSections[this.week]?.indexOf(e)||-1,1),0==d.v.game.party.weekSections[this.week]?.length&&delete d.v.game.party.weekSections[this.week],this.isSolved(e)&&(d.v.game.party.conclusions=d.v.game.party.conclusions.filter(i=>i.edition!=d.v.game.edition||i.index!=e)),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-week-dialog"]],decls:12,vars:14,consts:[[1,"week-dialog"],[1,"title"],[3,"ghs-label","ghs-label-args"],[1,"sub-title"],[1,"sections"],["class","section",4,"ngFor","ngForOf"],[1,"add-section"],[3,"ghs-label","ghs-label-attribute","keyup","keyup.enter"],["scenario",""],["src","./assets/images/plus.svg",1,"button",3,"ghs-label","ghs-label-attribute","click"],[1,"section"],[3,"src"],["class","conclusion",3,"click",4,"ngIf"],[1,"conclusion",3,"click"],["src","./assets/images/hint.svg"],[3,"ghs-label"],[1,"index",3,"ngClass","click"],[1,"spacer"],["src","./assets/images/close.svg",1,"button",3,"click"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"span",2),t.qZA()(),t.TgZ(5,"div",4),t.YNc(6,sN,4,3,"span",5),t.YNc(7,lN,7,6,"span",5),t.qZA(),t.TgZ(8,"div",6)(9,"input",7,8),t.NdJ("keyup",function(){t.CHM(s);const m=t.MAs(10);return m.classList.remove("error"),t.KtG(m.classList.remove("error"))})("keyup.enter",function(){t.CHM(s);const m=t.MAs(10);return t.KtG(i.addSection(m))}),t.qZA(),t.TgZ(11,"img",9),t.NdJ("click",function(){t.CHM(s);const m=t.MAs(10);return t.KtG(i.addSection(m))}),t.qZA()()()}2&e&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections")("ghs-label-args",t.VKq(10,iT,i.week+"")),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.calc")("ghs-label-args",t.VKq(12,iT,i.week-i.gameManager.game.party.weeks+"")),t.xp6(2),t.Q6J("ngForOf",i.sectionsFixed()),t.xp6(1),t.Q6J("ngForOf",i.sections()),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.section")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.weekSections.addSection")("ghs-label-attribute","title"))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".week-dialog[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer}.week-dialog[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.8}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;flex-direction:column}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%], .week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{display:flex;align-items:center}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .finish[_ngcontent-%COMP%]{cursor:pointer}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-black)}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-right:.3em}.week-dialog[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]:hover{opacity:.7}.week-dialog[_ngcontent-%COMP%] .add-section[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.week-dialog[_ngcontent-%COMP%] .add-section[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);outline:none}"]})),a})();const Xc=function(o){return[o]};function dN(o,a){if(1&o&&(t.TgZ(0,"div",10),t._UZ(1,"span",11),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","scenario.requirements.solo")("ghs-label-args",t.VKq(2,Xc,n.solo))}}function hN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.party")("ghs-label-args",t.VKq(2,Xc,n))}}const Tw=function(o,a,n){return[o,a,n]};function uN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.partyCount")("ghs-label-args",t.kEZ(2,Tw,n.name,""+(n.required-n.count),""+n.required))}}function _N(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.partyMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function pN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.global")("ghs-label-args",t.VKq(2,Xc,n))}}function fN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.globalCount")("ghs-label-args",t.kEZ(2,Tw,n.name,""+(n.required-n.count),""+n.required))}}function mN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.globalMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function vN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.campaignStickers")("ghs-label-args",t.VKq(2,Xc,n))}}function CN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.campaignStickersCount")("ghs-label-args",t.kEZ(2,Tw,n.name,""+(n.required-n.count),""+n.required))}}function MN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.campaignStickersMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function ON(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.buildings")("ghs-label-args",t.VKq(2,Xc,n))}}const PN=function(o,a){return[o,a]};function yN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.buildingsLevel")("ghs-label-args",t.WLB(2,PN,n.name,""+n.level))}}function bN(o,a){if(1&o&&t._UZ(0,"div",19),2&o){const n=a.$implicit;t.Q6J("ghs-label","scenario.requirements.buildingsMissing")("ghs-label-args",t.VKq(2,Xc,n))}}function xN(o,a){1&o&&(t.TgZ(0,"span",20),t._UZ(1,"span",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","or"))}function wN(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",12)(2,"div",13),t.YNc(3,hN,1,4,"div",14),t.qZA(),t.TgZ(4,"div",13),t.YNc(5,uN,1,6,"div",14),t.qZA(),t.TgZ(6,"div",13),t.YNc(7,_N,1,4,"div",14),t.qZA(),t.TgZ(8,"div",15),t.YNc(9,pN,1,4,"div",14),t.qZA(),t.TgZ(10,"div",15),t.YNc(11,fN,1,6,"div",14),t.qZA(),t.TgZ(12,"div",15),t.YNc(13,mN,1,4,"div",14),t.qZA(),t.TgZ(14,"div",16),t.YNc(15,vN,1,4,"div",14),t.qZA(),t.TgZ(16,"div",16),t.YNc(17,CN,1,6,"div",14),t.qZA(),t.TgZ(18,"div",16),t.YNc(19,MN,1,4,"div",14),t.qZA(),t.TgZ(20,"div",17),t.YNc(21,ON,1,4,"div",14),t.qZA(),t.TgZ(22,"div",17),t.YNc(23,yN,1,5,"div",14),t.qZA(),t.TgZ(24,"div",17),t.YNc(25,bN,1,4,"div",14),t.qZA()(),t.YNc(26,xN,2,1,"span",18),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(3),t.Q6J("ngForOf",n.partyAchievements),t.xp6(2),t.Q6J("ngForOf",n.partyAchievementsCount),t.xp6(2),t.Q6J("ngForOf",n.partyAchievementsMissing),t.xp6(2),t.Q6J("ngForOf",n.globalAchievements),t.xp6(2),t.Q6J("ngForOf",n.globalAchievementsCount),t.xp6(2),t.Q6J("ngForOf",n.globalAchievementsMissing),t.xp6(2),t.Q6J("ngForOf",n.campaignStickers),t.xp6(2),t.Q6J("ngForOf",n.campaignStickersCount),t.xp6(2),t.Q6J("ngForOf",n.campaignStickersMissing),t.xp6(2),t.Q6J("ngForOf",n.buildings),t.xp6(2),t.Q6J("ngForOf",n.buildingsLevel),t.xp6(2),t.Q6J("ngForOf",n.buildingsMissing),t.xp6(1),t.Q6J("ngIf",e{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"solo",""),(0,_.Z)(this,"missingRequirements",[]),(0,_.Z)(this,"all",!1),(0,_.Z)(this,"scenarioData",void 0),(0,_.Z)(this,"hideMenu",!1),(0,_.Z)(this,"hideAll",!1),this.data=e,this.dialogRef=i,this.scenarioData=e.scenarioData,this.hideMenu=e.hideMenu||!1,this.update()}update(){this.missingRequirements=this.getRequirements(this.all),this.solo="",this.hideAll=!this.all&&JSON.stringify(this.getRequirements(!0))==JSON.stringify(this.missingRequirements)}getRequirements(e=!1){let i=[];return this.scenarioData.solo&&(e||!d.v.game.figures.find(s=>s instanceof oe.z&&s.name==this.scenarioData.solo&&s.level>=5))&&(this.solo=this.scenarioData.solo),this.scenarioData.requirements&&this.scenarioData.requirements.forEach(s=>{let l=!1,m=new ZN;s.global&&s.global.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.globalAchievementsList.find(k=>k.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()))&&(m.globalAchievementsMissing.push(O.substring(1,O.length)),l=!0);else if(-1==O.indexOf(":")||isNaN(+O.split(":")[1]))(e||!d.v.game.party.globalAchievementsList.find(k=>k.toLowerCase().trim()==O.toLowerCase().trim()))&&(m.globalAchievements.push(O),l=!0);else{let k=+O.split(":")[1];d.v.game.party.globalAchievementsList.forEach(W=>{W.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&k--}),(e||k>0)&&(m.globalAchievementsCount.push({name:O.split(":")[0],count:k,required:+O.split(":")[1]}),l=!0)}}),s.party&&s.party.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.achievementsList.find(k=>k.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()))&&(m.partyAchievementsMissing.push(O.substring(1,O.length)),l=!0);else if(-1==O.indexOf(":")||isNaN(+O.split(":")[1]))(e||!d.v.game.party.achievementsList.find(k=>k.toLowerCase().trim()==O.toLowerCase().trim()))&&(m.partyAchievements.push(O),l=!0);else{let k=+O.split(":")[1];d.v.game.party.achievementsList.forEach(W=>{W.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&k--}),k>0&&(m.partyAchievementsCount.push({name:O.split(":")[0],count:k,required:+O.split(":")[1]}),l=!0)}}),s.campaignSticker&&s.campaignSticker.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.campaignStickers.find(k=>k.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()))&&(m.campaignStickersMissing.push(O.substring(1,O.length)),l=!0);else if(-1==O.indexOf(":")||isNaN(+O.split(":")[1]))(e||!d.v.game.party.campaignStickers.find(k=>k.toLowerCase().trim()==O.toLowerCase().trim()))&&(m.campaignStickers.push(O),l=!0);else{let k=+O.split(":")[1];d.v.game.party.campaignStickers.forEach(W=>{W.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&k--}),k>0&&(m.campaignStickersCount.push({name:O.split(":")[0],count:k,required:+O.split(":")[1]}),l=!0)}}),s.buildings&&s.buildings.forEach(O=>{if(O.startsWith("!"))(e||d.v.game.party.buildings.find(k=>k.name.toLowerCase().trim()==O.substring(1,O.length).toLowerCase().trim()&&k.level>0))&&(m.buildingsMissing.push(O.substring(1,O.length)),l=!0);else if(-1!=O.indexOf(":")){let k=+O.split(":")[1];(e||!d.v.game.party.buildings.find(W=>W.name.toLowerCase().trim()==O.split(":")[0].toLowerCase().trim()&&W.level>=k))&&(m.buildingsLevel.push({name:O.split(":")[0],level:k}),l=!0)}else(e||!d.v.game.party.buildings.find(k=>k.name.toLowerCase().trim()==O.toLowerCase().trim()&&k.level>0))&&(m.buildings.push(O),l=!0)}),l&&i.push(m)}),i}startScenario(){d.v.stateManager.before("setScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(this.scenarioData))),d.v.scenarioManager.setScenario(new ei.$4(this.scenarioData)),d.v.stateManager.after(),this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-requirements-dialog"]],decls:12,vars:7,consts:[[1,"requirements-dialog"],[1,"header"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"requirements"],["class","solo",4,"ngIf"],[4,"ngFor","ngForOf"],["class","checkbox",4,"ngIf"],["class","buttons",4,"ngIf"],[1,"solo"],[3,"ghs-label","ghs-label-args"],[1,"requirement"],[1,"party"],["class","achievement",3,"ghs-label","ghs-label-args",4,"ngFor","ngForOf"],[1,"global"],[1,"campaign-stickers"],[1,"buildings"],["class","separator",4,"ngIf"],[1,"achievement",3,"ghs-label","ghs-label-args"],[1,"separator"],[1,"checkbox"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"buttons"],[1,"cancel",3,"click"],[1,"start",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span",2),t._UZ(3,"span",3),t.TgZ(4,"span",4),t._uU(5),t._UZ(6,"span",3),t.qZA()()(),t.TgZ(7,"div",5),t.YNc(8,dN,2,4,"div",6),t.YNc(9,wN,27,13,"ng-container",7),t.YNc(10,kN,3,2,"label",8),t.qZA(),t.YNc(11,TN,5,2,"div",9),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ghs-label","scenario.requirements"),t.xp6(2),t.hij("#",i.scenarioData.index," "),t.xp6(1),t.Q6J("ghs-label","data.scenario."+i.scenarioData.name),t.xp6(2),t.Q6J("ngIf",i.solo),t.xp6(1),t.Q6J("ngForOf",i.missingRequirements),t.xp6(1),t.Q6J("ngIf",!i.hideAll),t.xp6(1),t.Q6J("ngIf",!i.hideMenu))},dependencies:[x.sg,x.O5,va,yi,Si,ie],styles:[".requirements-dialog[_ngcontent-%COMP%]{position:relative;color:var(--ghs-color-white)}.requirements-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column}.requirements-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .requirements[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .requirements[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.requirements-dialog[_ngcontent-%COMP%] .requirements[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));display:flex;align-items:center;font-family:var(--ghs-font-text);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center;margin:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));white-space:nowrap}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.requirements-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .start[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}"]})),a})();var AN=E(8433),QO=E.n(AN);let aT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"worldMap",void 0),(0,_.Z)(this,"scenarios",[]),(0,_.Z)(this,"columns",[]),(0,_.Z)(this,"rows",[]),(0,_.Z)(this,"offsetX",[]),(0,_.Z)(this,"offsetY",[]),(0,_.Z)(this,"success",[]),(0,_.Z)(this,"scale",1),(0,_.Z)(this,"zooming",!1),this.edition=e,this.dialogRef=i;const s=R.r.settings.disablePinchZoom;R.r.settings.disablePinchZoom=!0;const l=d.v.editionData.find(m=>m.edition==this.edition);l&&(this.worldMap=l.worldMap,this.worldMap&&(this.scenarios=d.v.scenarioManager.scenarioData(this.edition).filter(m=>m.coordinates))),this.dialogRef.closed.subscribe({next:()=>{R.r.settings.disablePinchZoom=s}})}ngAfterViewInit(){if(this.worldMap){const s=this.worldMap.width,l=this.worldMap.height;var e=QO().map("map",{crs:QO().CRS.Simple,maxBounds:[[-.5*l,-.5*s],[1.5*l,1.5*s]],minZoom:-4,attributionControl:!1}),i=[[0,0],[l,s]];QO().imageOverlay("./assets/images/world-map/"+this.edition+"/map.jpg",i).addTo(e),e.fitBounds(i),e.zoomIn(),this.scenarios.forEach((m,O)=>{if(d.v.game.party.scenarios.find(k=>k.edition==m.edition&&k.index==m.index&&k.group==m.group)&&(this.success[O]=!0),m.coordinates){let k=m.index;for(;k.length<3;)k="0"+k;let W=QO().imageOverlay("./assets/images/world-map/"+this.edition+"/scenarios/"+m.edition+"-"+k+".png",[[l-m.coordinates.y,m.coordinates.x],[l-m.coordinates.y-m.coordinates.height,m.coordinates.x+m.coordinates.width]],{interactive:!0}).addTo(e);W.getElement()?.classList.add("scenario"),d.v.game.party.scenarios.find(ct=>ct.edition==m.edition&&ct.index==m.index&&ct.group==m.group)&&W.getElement()?.classList.add("success"),d.v.scenarioManager.isBlocked(m)?W.getElement()?.classList.add("blocked"):d.v.scenarioManager.isLocked(m)&&W.getElement()?.classList.add("locked"),W.setZIndex(O+1),W.on("click",()=>{const ct=this.scenarios[O];if(!this.success[O]&&d.v.game.party.campaignMode&&!d.v.scenarioManager.isBlocked(ct)){const Ct=new ei.$4(ct);d.v.stateManager.before("setScenario",...d.v.scenarioManager.scenarioUndoArgs(Ct)),d.v.scenarioManager.setScenario(Ct),this.dialogRef.close(),d.v.stateManager.after()}}),W.on("mouseover",ct=>{ct.target.setZIndex(this.scenarios.length+1)}),W.on("mouseout",ct=>{ct.target.setZIndex(O+1)})}})}}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-world-map"]],decls:3,vars:0,consts:[[1,"world-map-container"],["id","map",1,"world-map"],["map",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"div",1,2),t.qZA())},styles:[".world-map-container{position:absolute;top:0;left:0;width:100vw;height:100vh}.world-map-container .world-map{position:relative;width:100%;height:100%;max-width:100%;max-height:100%;overflow:auto;background:none}.world-map-container .world-map .scenario{z-index:2;filter:brightness(1.2) drop-shadow(4px 4px 4px var(--ghs-color-darkgray)) drop-shadow(-4px -4px 4px var(--ghs-color-darkgray))}.world-map-container .world-map .scenario:hover{cursor:pointer;filter:brightness(1.1);opacity:.9}.world-map-container .world-map .scenario.success{cursor:initial;z-index:2;filter:brightness(.8) hue-rotate(30deg)}.world-map-container .world-map .scenario.success:hover{cursor:initial;filter:none}.world-map-container .world-map .scenario.locked:not(.blocked){cursor:initial;z-index:1;filter:brightness(1)}.world-map-container .world-map .scenario.locked:not(.blocked):hover{cursor:initial;filter:brightness(.8) grayscale(.8)}.world-map-container .world-map .scenario.blocked{cursor:initial;z-index:1;filter:brightness(.7) sepia(2.5) hue-rotate(340deg)}.world-map-container .world-map .scenario.blocked:hover{cursor:initial;filter:brightness(.8) grayscale(.8)}\n"],encapsulation:2})),a})();function SN(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}const EN=function(o,a){return{looted:o,highlight:a}};function DN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",9),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.toggleTreasure(s))}),t.YNc(1,SN,2,0,"span",8),t._uU(2),t._UZ(3,"img",10),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.WLB(3,EN,-1!=i.looted.indexOf(e),e==i.treasureIndex)),t.xp6(1),t.Q6J("ngIf",!(""+n).startsWith("G")&&+n<10),t.xp6(1),t.hij("",n," ")}}function IN(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function NN(o,a){if(1&o&&t._UZ(0,"ghs-treasure-label",19),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("edition",e.edition)("index",+(""+n).split(":")[0]-1)("rewardResults",e.rewardsFromString(""+n))}}function JN(o,a){if(1&o&&(t.TgZ(0,"div",15)(1,"div",16),t.YNc(2,IN,2,0,"span",8),t._uU(3),t.qZA(),t.TgZ(4,"span",17),t.YNc(5,NN,1,3,"ghs-treasure-label",18),t.qZA()()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G")&&+n<10),t.xp6(1),t.hij("",(""+n).startsWith("G-")?"G":(""+n).split(":")[0]," "),t.xp6(2),t.Q6J("ngIf",!(""+n).startsWith("G-"))}}const UN=function(o,a){return{selected:o,disabled:a}};function LN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCharacter(s))}),t._UZ(1,"img",12),t.TgZ(2,"span",13),t._uU(3),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,JN,6,3,"div",14),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.WLB(4,UN,e.character==n,e.treasures.length==e.looted.length)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.hij(" ",e.gameManager.characterManager.characterName(n,!0)," "),t.xp6(2),t.Q6J("ngForOf",n.treasures)}}const QN=function(o,a){return[o,a]};function RN(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"p"),t._UZ(2,"span",20),t.qZA(),t.TgZ(3,"div",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.lootTreasure())}),t._UZ(4,"span",2),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","game.loot.lootTreasure")("ghs-label-args",t.WLB(3,QN,n.character.title||"%data.character."+n.character.name+"%",""+n.treasures[n.treasureIndex])),t.xp6(2),t.Q6J("ghs-label","game.loot.lootTreasure.confirm")}}const Zw=function(o){return[o]};function FN(o,a){if(1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",20),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.loot.lootTreasure.selectTreasure")("ghs-label-args",t.VKq(2,Zw,n.character.title||"%data.character."+n.character.name+"%"))}}function qN(o,a){if(1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",20),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.loot.lootTreasure.selectCharacter")("ghs-label-args",t.VKq(2,Zw,(""+n.treasures[n.treasureIndex]).startsWith("G-")?"G":(""+n.treasures[n.treasureIndex]).split(":")[0]))}}function HN(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.loot.treasures.rewards.goal"))}function jN(o,a){if(1&o&&t._UZ(0,"ghs-treasure-label",23),2&o){const n=t.oxw(2);t.Q6J("edition",n.edition)("index",+n.treasures[n.treasureIndex]-1)("rewardResults",n.rewardResults)("itemCards",!0)}}function BN(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"p"),t._UZ(2,"span",20),t.qZA(),t.YNc(3,HN,2,1,"span",8),t.YNc(4,jN,1,4,"ghs-treasure-label",22),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","game.loot.lootTreasure.looted")("ghs-label-args",t.VKq(4,Zw,n.character.title||"%data.character."+n.character.name+"%")),t.xp6(1),t.Q6J("ngIf","G"==n.treasures[n.treasureIndex]),t.xp6(1),t.Q6J("ngIf","G"!=n.treasures[n.treasureIndex])}}let Aw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"scenario",void 0),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"treasures",[]),(0,_.Z)(this,"treasureIndex",-1),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"looted",[]),(0,_.Z)(this,"rewardResults",[]),(0,_.Z)(this,"init",!0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.data=e,d.v.game.scenario||e.treasures&&e.edition?e&&e.treasures&&e.edition?(this.treasures=e.treasures,this.edition=e.edition):d.v.game.scenario&&(this.scenario=d.v.game.scenario||d.v.scenarioManager.createScenario(),this.edition=this.scenario.edition):i.close()}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.scenario=d.v.game.scenario||d.v.scenarioManager.createScenario(),this.characters=d.v.game.figures.filter(i=>i instanceof oe.z&&!i.absent&&d.v.entityManager.isAlive(i)).map(i=>i),this.scenario&&(!this.data||!this.data.treasures)&&(this.edition=this.scenario.edition,this.treasures=d.v.scenarioManager.getTreasures(this.scenario,d.v.game.sections)),this.looted=[];let e=-1;this.treasures.forEach((i,s)=>{-1==this.looted.indexOf(s)&&(this.characters.find(l=>d.v.lootManager.hasTreasure(l,i,s))||d.v.game.party.treasures.find(l=>l.name==""+i&&l.edition==this.edition))?this.looted.push(s):e=s}),this.init&&this.treasures.length==this.looted.length+1&&this.treasureIndex!=e&&-1==this.looted.indexOf(e)&&(this.treasureIndex=e),!this.character&&this.treasures.length!=this.looted.length&&(this.character=this.characters.find(i=>i.active)||this.characters.length>0&&this.characters[0]||void 0)}toggleCharacter(e){this.character!=e&&this.treasures.length!=this.looted.length?(this.character=e,-1!=this.treasureIndex&&-1!=this.looted.indexOf(this.treasureIndex)&&(this.treasureIndex=-1)):this.character=void 0}toggleTreasure(e){this.treasureIndex=this.treasureIndex!=e?e:-1}removeTreasure(e,i){"number"==typeof i?(d.v.stateManager.before("removeCharTresure",""+i,this.edition,"data.character."+e.name),this.looted.splice(this.treasures.indexOf(i),1)):(d.v.stateManager.before("removeCharTresure","G",this.edition),this.looted.splice(+i.replace("G-",""),1)),e.treasures.splice(e.treasures.indexOf(i),1),d.v.stateManager.after()}lootTreasure(){if(-1!=this.treasureIndex){this.init=!1,this.rewardResults=[];const e=this.treasures[this.treasureIndex];this.character&&e&&-1==this.character.treasures.indexOf("G"==e?"G-"+this.treasureIndex:e)&&(d.v.stateManager.before("lootCharTreasure",""+e,this.edition,"data.character."+this.character.name),this.looted.push(this.treasureIndex),"G"!=e&&R.r.settings.treasuresLoot&&(this.rewardResults=d.v.lootManager.lootTreasure(this.character,e-1,this.edition)),this.character.treasures=this.character.treasures||[],this.character.treasures.push("G"==e?"G-"+this.treasureIndex:this.rewardResults.some(i=>i.length>0)?e+":"+this.rewardResults.map(i=>i.join("+")).join("|"):e),"number"==typeof e&&d.v.game.party.treasures.push(new Vn.xb(""+e,this.edition)),d.v.stateManager.after())}}rewardsFromString(e){return e.split(":").length<2?[]:e.split(":")[1].split("|").map(i=>i.split("+"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-treasures-dialog"]],decls:12,vars:7,consts:[[1,"treasures-popup"],[1,"title"],[3,"ghs-label"],[1,"treasures"],["class","treasure",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"loot"],[4,"ngIf"],[1,"treasure",3,"ngClass","click"],["src","./assets/images/check.svg",1,"overlay","check"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[1,"name"],["class","hint-container",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"treasure","hint-trigger"],[1,"hint","center"],["class","text placeholder text-white",3,"edition","index","rewardResults",4,"ngIf"],[1,"text","placeholder","text-white",3,"edition","index","rewardResults"],[3,"ghs-label","ghs-label-args"],[1,"button",3,"click"],["class","placeholder text-white",3,"edition","index","rewardResults","itemCards",4,"ngIf"],[1,"placeholder","text-white",3,"edition","index","rewardResults","itemCards"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.qZA(),t.TgZ(3,"div",3),t.YNc(4,DN,4,6,"div",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,LN,6,7,"div",6),t.qZA(),t.TgZ(7,"div",7),t.YNc(8,RN,5,6,"ng-container",8),t.YNc(9,FN,2,4,"p",8),t.YNc(10,qN,2,4,"p",8),t.YNc(11,BN,5,6,"ng-container",8),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","game.loot.treasures"),t.xp6(2),t.Q6J("ngForOf",i.treasures),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngIf",i.character&&-1!=i.treasureIndex&&!i.gameManager.lootManager.hasTreasure(i.character,i.treasures[i.treasureIndex],i.treasureIndex)),t.xp6(1),t.Q6J("ngIf",i.character&&-1==i.treasureIndex),t.xp6(1),t.Q6J("ngIf",!i.character&&-1!=i.treasureIndex),t.xp6(1),t.Q6J("ngIf",i.character&&-1!=i.treasureIndex&&i.gameManager.lootManager.hasTreasure(i.character,i.treasures[i.treasureIndex],i.treasureIndex)))},dependencies:[x.mk,x.sg,x.O5,$f,ie],styles:[".treasures-popup[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));min-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;background-image:url(treasure.0792d529e76ec279.png);background-size:contain;background-repeat:no-repeat;background-position:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-black);width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));transition:translate .5s ease-in-out}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:30%;left:50%;transform:translate(-50%);height:50%;width:auto}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay.check[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]:hover{opacity:.8;transform:scale(1.1)}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%]{pointer-events:none;opacity:.4}.treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .treasures-popup[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:block}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin:.25em;padding:.25em;border:1px solid transparent}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.disabled[_ngcontent-%COMP%]{cursor:initial!important;border-color:transparent}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{position:relative}.treasures-popup[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{cursor:help!important;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor))}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:0;margin:0}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));color:var(--ghs-color-green)}.treasures-popup[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.6}"]})),a})();const zN=["treasureIndex"];function GN(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function VN(o,a){if(1&o&&(t.TgZ(0,"span",21),t._UZ(1,"ghs-treasure-label",22),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit;t.xp6(1),t.Q6J("edition",e.edition)("index",n)}}const YN=function(o,a){return{looted:o,highlight:a}};function KN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"div",16),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.toggleTreasure(s))}),t.YNc(2,GN,2,0,"span",17),t._uU(3),t._UZ(4,"img",18)(5,"img",19),t.qZA(),t.YNc(6,VN,2,2,"span",20),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(4,YN,-1!=e.looted.indexOf(n),-1!=e.selected.indexOf(n))),t.xp6(1),t.Q6J("ngIf",n<10),t.xp6(1),t.hij("",n," "),t.xp6(3),t.Q6J("ngIf",-1!=e.looted.indexOf(n))}}function $N(o,a){if(1&o&&(t.TgZ(0,"div",11)(1,"div",2),t._UZ(2,"span",12)(3,"span",12),t.qZA(),t.TgZ(4,"div",13),t.YNc(5,KN,7,7,"div",14),t.qZA()()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label","%data.scenarioNumber:"+n.index+"%"),t.xp6(1),t.Q6J("ghs-label","data.scenario."+n.name),t.xp6(2),t.Q6J("ngForOf",e.treasures[n.index])}}const WN=function(o){return{disabled:o}};function XN(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.apply())}),t._UZ(1,"span",4),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,WN,0==n.selected.length)),t.xp6(1),t.Q6J("ghs-label","party.campaign.treasures.applySelect")}}let tJ=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"treasureIndex",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"scenarios",[]),(0,_.Z)(this,"treasures",{}),(0,_.Z)(this,"looted",[]),(0,_.Z)(this,"selected",[]),(0,_.Z)(this,"select",!0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialogRef=i,this.dialog=s,this.edition=e.edition}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.scenarios=[],this.treasures={},this.looted=[],this.selected=[],d.v.scenarioManager.scenarioData(this.edition).filter(e=>d.v.game.party.scenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)||d.v.game.party.casualScenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)).forEach(e=>{let i=d.v.scenarioManager.getAllTreasures(e).filter(s=>"number"==typeof s).map(s=>+s);this.select||(i=i.filter(s=>!this.hasTreasure(""+s,this.edition))),i.length>0&&(this.scenarios.push(e),this.treasures[e.index]=i,i.forEach(s=>{this.hasTreasure(""+s,this.edition)&&this.looted.push(s)}))})}toggleTreasure(e){this.select?-1==this.selected.indexOf(e)?this.selected.push(e):this.selected.splice(this.selected.indexOf(e),1):-1==this.looted.indexOf(e)&&this.dialog.open(Aw,{panelClass:"dialog",data:{treasures:[e],edition:this.edition}})}hasTreasure(e,i){return d.v.game.party.treasures&&d.v.game.party.treasures.some(s=>s.name==e&&s.edition==i)}apply(){const e=this.selected.filter(s=>-1!=this.looted.indexOf(s)),i=this.selected.filter(s=>-1==this.looted.indexOf(s));e.length>0&&(d.v.stateManager.before("removeTreasures",this.edition,"["+e.join(",")+"]"),d.v.game.party.treasures=d.v.game.party.treasures.filter(s=>s.edition!=this.edition||isNaN(+s.name)||-1==e.indexOf(+s.name)),d.v.stateManager.after()),i.length>0&&(d.v.stateManager.before("addTreasures",this.edition,"["+i.join(",")+"]"),d.v.game.party.treasures.push(...i.map(s=>new Vn.xb(""+s,this.edition))),d.v.stateManager.after()),this.update()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-treasures-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(zN,5),2&e){let s;t.iGM(s=t.CRH())&&(i.treasureIndex=s.first)}},decls:14,vars:6,consts:[[1,"treasures-dialog"],[1,"header"],[1,"title"],["src","./assets/images/scenario/treasure.svg",1,"icon"],[3,"ghs-label"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"scenarios"],["class","scenario",4,"ngFor","ngForOf"],[1,"buttons"],[1,"cancel",3,"click"],["class","apply",3,"ngClass","click",4,"ngIf"],[1,"scenario"],[1,"text-white",3,"ghs-label"],[1,"treasures"],["class","hint-container",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"treasure","hint-trigger",3,"ngClass","click"],[4,"ngIf"],["src","./assets/images/check.svg",1,"overlay","check"],["src","./assets/images/close.svg",1,"overlay","uncheck"],["class","hint center",4,"ngIf"],[1,"hint","center"],[1,"text","placeholder","text-white",3,"edition","index"],[1,"apply",3,"ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"img",3)(4,"span",4),t.qZA(),t.TgZ(5,"label")(6,"input",5),t.NdJ("ngModelChange",function(l){return i.select=l})("change",function(){return i.update()}),t.qZA(),t._UZ(7,"span",4),t.qZA()(),t.TgZ(8,"div",6),t.YNc(9,$N,6,3,"div",7),t.qZA(),t.TgZ(10,"div",8)(11,"a",9),t.NdJ("click",function(){return i.close()}),t._UZ(12,"span",4),t.qZA(),t.YNc(13,XN,2,4,"a",10),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("ghs-label","party.campaign.treasures"),t.xp6(2),t.Q6J("ngModel",i.select),t.xp6(1),t.Q6J("ghs-label","party.campaign.treasures.batchSelect"),t.xp6(2),t.Q6J("ngForOf",i.scenarios),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngIf",i.select))},dependencies:[x.mk,x.sg,x.O5,va,yi,Si,$f,ie],styles:[".treasures-dialog[_ngcontent-%COMP%]{color:var(--ghs-color-white);min-width:25vw}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-yellow)}.treasures-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-white);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:auto;max-height:70vh}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;background-image:url(treasure.0792d529e76ec279.png);background-size:contain;background-repeat:no-repeat;background-position:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-black);width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));transition:translate .5s ease-in-out}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:30%;left:50%;transform:translate(-50%);height:50%;width:auto}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay.check[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .overlay.uncheck[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]:hover{opacity:.8;transform:scale(1.1)}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%]{cursor:initial;opacity:.4}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.looted[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:block}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight.looted[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:none}.treasures-dialog[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure.highlight.looted[_ngcontent-%COMP%] .uncheck[_ngcontent-%COMP%]{display:block}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.treasures-dialog[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}"]})),a})();var eJ=E(1028),nJ=E.n(eJ);class Wf{constructor(a,n="",e=!1,i=""){(0,_.Z)(this,"label",void 0),(0,_.Z)(this,"value",void 0),(0,_.Z)(this,"revelead",void 0),(0,_.Z)(this,"group",void 0),this.label=a,this.value=n,this.revelead=e,this.group=i}}let iJ=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"values",[]),(0,_.Z)(this,"spoiler",!1),(0,_.Z)(this,"emptyLabel",""),(0,_.Z)(this,"select",new t.vpe),this.el=e}ngOnInit(){let e=document.createElement("div");this.el.nativeElement.after(e);const i=this.select;nJ()({input:this.el.nativeElement,container:e,emptyMsg:this.emptyLabel?R.r.getLabel(this.emptyLabel):"",minLength:3,disableAutoSelect:!0,fetch:(s,l)=>{l(this.values.filter(m=>m.label&&m.label.toLowerCase().startsWith(s.toLowerCase())).sort((m,O)=>m.revelead&&!O.revelead?-1:O.revelead&&!m.revelead?1:0))},onSelect:s=>{this.el.nativeElement.value=s.label||"",i.emit(s.label)},render:(s,l,m)=>{const O=document.createElement("div");return O.textContent=s.label,s.revelead&&O.classList.add("revealed"),O},customize:()=>{if(this.spoiler&&(e.children.length>1||this.el.nativeElement.value.length<6))for(let s=0;s{l.classList.contains("spoiler")&&(m.preventDefault(),m.stopPropagation())}),l.addEventListener("touchend",m=>{if(l.classList.contains("spoiler")){m.preventDefault(),m.stopPropagation(),l.classList.remove("spoiler");for(let O=0;O{switch(s.event.key){case"ArrowUp":case"ArrowDown":case"Escape":if(this.spoiler&&(e.children.length>1||this.el.nativeElement.value.length<6))for(let m=0;m{var o;class a{constructor(e){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"total",{}),(0,_.Z)(this,"lootColumns",[le.CG.lumber,le.CG.metal,le.CG.hide,le.CG.arrowvine,le.CG.axenut,le.CG.corpsecap,le.CG.flamefruit,le.CG.rockroot,le.CG.snowthistle]),this.dialogRef=e}ngOnInit(){this.characters=d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e),this.lootColumns.forEach(e=>{this.total[e]=d.v.game.party.loot[e]||0,this.characters.length>0&&(this.total[e]=(this.total[e]||0)+this.characters.map(i=>i.progress.loot[e]||0).reduce((i,s)=>i+s))})}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-resources"]],decls:9,vars:6,consts:[[1,"resources-dialog"],[1,"table"],[1,"head-col","first"],[1,"first"],[3,"ghs-label"],["class","first",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"icon","character-icon",3,"src"],[1,"name"],[1,"head-col"],[1,"ghs-svg",3,"src"],[1,"loot"],[1,"loot",3,"ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"span",4),t.qZA(),t.YNc(5,oJ,4,2,"span",5),t.TgZ(6,"span",3),t._UZ(7,"span",4),t.qZA(),t.YNc(8,rJ,10,7,"ng-container",6),t.qZA()()),2&e&&(t.xp6(1),t.Udp("--ghs-resource-columns",3+i.characters.length),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(1),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.supply.total"),t.xp6(1),t.Q6J("ngForOf",i.lootColumns))},dependencies:[x.mk,x.sg,ie],styles:[".resources-dialog[_ngcontent-%COMP%]{position:relative}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-resource-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-resource-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));overflow:auto}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .loot.total[_ngcontent-%COMP%]{line-height:1em;border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-color:var(--ghs-color-white);position:sticky;left:0;z-index:1}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}"]})),a})();var Sw=E(3281);function lJ(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("(",n.building.data.id,")")}}function gJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.lumber,"")}}function dJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",20),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.metal,"")}}function hJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",21),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.hide,"")}}function uJ(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",22),t._uU(2),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.hij(" ",n.costs.gold,"")}}const sT=function(o){return{force:o}};function _J(o,a){if(1&o&&(t.TgZ(0,"span",16),t.YNc(1,gJ,3,1,"span",17),t.YNc(2,dJ,3,1,"span",17),t.YNc(3,hJ,3,1,"span",17),t.YNc(4,uJ,3,1,"span",17),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(5,sT,n.force)),t.xp6(1),t.Q6J("ngIf",n.costs.lumber),t.xp6(1),t.Q6J("ngIf",n.costs.metal),t.xp6(1),t.Q6J("ngIf",n.costs.hide),t.xp6(1),t.Q6J("ngIf",n.costs.gold)}}const hg=function(o){return[o]};function pJ(o,a){if(1&o&&(t.TgZ(0,"span",16),t._UZ(1,"span",7),t.TgZ(2,"span",18),t._UZ(3,"img",23),t.qZA(),t.TgZ(4,"span",18),t._UZ(5,"img",24),t.qZA(),t.TgZ(6,"span",18),t._UZ(7,"img",25),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(3,sT,n.force)),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.repair.costs")("ghs-label-args",t.VKq(5,hg,""+n.repair))}}function fJ(o,a){1&o&&(t.TgZ(0,"div",26),t._UZ(1,"span",27),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.discount"))}function mJ(o,a){if(1&o&&t._UZ(0,"span",28),2&o){const n=t.oxw();t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.loseMorale")("ghs-label-args",t.VKq(2,hg,""+n.rewards.loseMorale))}}function vJ(o,a){if(1&o&&t._UZ(0,"span",36),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.prosperity")("ghs-label-args",t.VKq(2,hg,""+n.rewards.prosperity))}}function CJ(o,a){if(1&o&&t._UZ(0,"span",37),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.defense")("ghs-label-args",t.VKq(2,hg,""+n.rewards.defense))}}function MJ(o,a){if(1&o&&t._UZ(0,"span",38),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.soldiers")("ghs-label-args",t.VKq(2,hg,""+n.rewards.soldiers))}}function OJ(o,a){if(1&o&&t._UZ(0,"span",39),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.plot"+(n.rewards.plots>0?"s":""))("ghs-label-args",t.VKq(2,hg,""+n.rewards.plots))}}function PJ(o,a){if(1&o&&t._UZ(0,"span",40),2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.campaign.sheet.buildings.rewards.items")("ghs-label-args",n.rewards.items.split("-"))}}const yJ=function(o){return{active:o}};function bJ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",41),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.sectionRewards(i.rewards.section))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(3,yJ,n.rewardsOnly))("ghs-label","party.campaign.sheet.buildings.rewards.section")("ghs-label-args",t.VKq(5,hg,n.rewards.section))}}function xJ(o,a){if(1&o&&(t.TgZ(0,"div",29),t.YNc(1,vJ,1,4,"span",30),t.YNc(2,CJ,1,4,"span",31),t.YNc(3,MJ,1,4,"span",32),t.YNc(4,OJ,1,4,"span",33),t.YNc(5,PJ,1,2,"span",34),t.YNc(6,bJ,1,7,"span",35),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.rewards.prosperity),t.xp6(1),t.Q6J("ngIf",n.rewards.defense),t.xp6(1),t.Q6J("ngIf",n.rewards.soldiers),t.xp6(1),t.Q6J("ngIf",n.rewards.plots),t.xp6(1),t.Q6J("ngIf",n.rewards.items),t.xp6(1),t.Q6J("ngIf",n.rewards.section)}}function wJ(o,a){if(1&o&&(t.TgZ(0,"span",26)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Oqu(n.paidResources||"-"),t.xp6(1),t.hij("/",n.repair||"-"," ")}}function kJ(o,a){1&o&&t._UZ(0,"span",3),2&o&&t.Q6J("ghs-label","party.campaign.sheet.buildings.costs")}const TJ=function(o){return{absent:o}};function ZJ(o,a){if(1&o&&(t.TgZ(0,"span",45),t._UZ(1,"img",48),t.TgZ(2,"span",49),t._uU(3),t.qZA()()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(3,TJ,n.absent)),t.xp6(1),t.hij(" ",e.gameManager.characterManager.characterName(n,n.absent)," ")}}function AJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.gold||"-"),t.xp6(1),t.hij(" / ",n.costs.gold,"")}}const sa=function(o){return{disabled:o}};function SJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("gold",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("gold",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].gold)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].gold||"-"," / ",i.progress.gold," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,0==i.progress.gold||i.progress.gold==s.characterSpent[e].gold||s.spent.gold==s.costs.gold||s.repair&&s.paidResources==s.repair))}}function EJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function DJ(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,SJ,7,10,"ng-container",4),t.YNc(2,EJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.gold),t.xp6(1),t.Q6J("ngIf",!n.progress.gold)}}const RO=function(o,a,n){return{costs:o,some:a,full:n}};function IJ(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",51),t.YNc(3,AJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t._uU(5," - "),t.qZA(),t.YNc(6,DJ,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(4,RO,!n.repair,n.spent.gold,n.spent.gold==n.costs.gold)),t.xp6(1),t.Q6J("src","./assets/images/"+(n.settingsManager.settings.fhStyle?"fh/":"")+"loot.svg",t.LSH),t.xp6(1),t.Q6J("ngIf",!n.repair),t.xp6(3),t.Q6J("ngForOf",n.characters)}}function NJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.lumber||"-"),t.xp6(1),t.hij(" / ",n.costs.lumber,"")}}function JJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("lumber",i.fhSupportSpent,-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("lumber",i.fhSupportSpent,1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==n.fhSupportSpent.lumber)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",n.fhSupportSpent.lumber||"-"," / ",n.gameManager.game.party.loot.lumber||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!n.gameManager.game.party.loot.lumber||n.gameManager.game.party.loot.lumber==n.fhSupportSpent.lumber||n.spent.lumber==n.costs.lumber||n.repair&&n.paidResources==n.repair))}}function UJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function LJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("lumber",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("lumber",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].lumber)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].lumber||"-"," / ",i.progress.loot.lumber||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!i.progress.loot.lumber||i.progress.loot.lumber==s.characterSpent[e].lumber||s.spent.lumber==s.costs.lumber||s.repair&&s.paidResources==s.repair))}}function QJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function RJ(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,LJ,7,10,"ng-container",4),t.YNc(2,QJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.loot.lumber),t.xp6(1),t.Q6J("ngIf",!n.progress.loot.lumber)}}function FJ(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",19),t.YNc(3,NJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t.YNc(5,JJ,7,10,"ng-container",4),t.YNc(6,UJ,2,0,"span",4),t.qZA(),t.YNc(7,RJ,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(5,RO,!n.repair,n.spent.lumber,n.spent.lumber==n.costs.lumber||n.requiredResources-(n.discount?1:0)==n.paidResources)),t.xp6(2),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.party.loot.lumber),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.party.loot.lumber),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function qJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.metal||"-"),t.xp6(1),t.hij(" / ",n.costs.metal,"")}}function HJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("metal",i.fhSupportSpent,-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("metal",i.fhSupportSpent,1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==n.fhSupportSpent.metal)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",n.fhSupportSpent.metal||"-"," / ",n.gameManager.game.party.loot.metal||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!n.gameManager.game.party.loot.metal||n.gameManager.game.party.loot.metal==n.fhSupportSpent.metal||n.spent.metal==n.costs.metal||n.repair&&n.paidResources==n.repair))}}function jJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function BJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("metal",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("metal",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].metal)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].metal||"-"," / ",i.progress.loot.metal||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!i.progress.loot.metal||i.progress.loot.metal==s.characterSpent[e].metal||s.spent.metal==s.costs.metal||s.repair&&s.paidResources==s.repair))}}function zJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function GJ(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,BJ,7,10,"ng-container",4),t.YNc(2,zJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.loot.metal),t.xp6(1),t.Q6J("ngIf",!n.progress.loot.metal)}}function VJ(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",20),t.YNc(3,qJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t.YNc(5,HJ,7,10,"ng-container",4),t.YNc(6,jJ,2,0,"span",4),t.qZA(),t.YNc(7,GJ,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(5,RO,!n.repair,n.spent.metal,n.spent.metal==n.costs.metal||n.requiredResources-(n.discount?1:0)==n.paidResources)),t.xp6(2),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.party.loot.metal),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.party.loot.metal),t.xp6(1),t.Q6J("ngForOf",n.characters)}}function YJ(o,a){if(1&o&&(t.TgZ(0,"span",18)(1,"span",47),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.Oqu(n.spent.hide||"-"),t.xp6(1),t.hij(" / ",n.costs.hide,"")}}function KJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("hide",i.fhSupportSpent,-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.changeValue("hide",i.fhSupportSpent,1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==n.fhSupportSpent.hide)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",n.fhSupportSpent.hide||"-"," / ",n.gameManager.game.party.loot.hide||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!n.gameManager.game.party.loot.hide||n.gameManager.game.party.loot.hide==n.fhSupportSpent.hide||n.spent.hide==n.costs.hide||n.repair&&n.paidResources==n.repair))}}function $J(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function WJ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("hide",s.characterSpent[i],-1))}),t._UZ(2,"img",55),t.qZA(),t.TgZ(3,"span",56),t._uU(4),t.qZA(),t.TgZ(5,"a",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(3);return t.KtG(s.changeValue("hide",s.characterSpent[i],1))}),t._UZ(6,"img",57),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(6,sa,0==s.characterSpent[e].hide)),t.xp6(2),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",s.characterSpent[e].hide||"-"," / ",i.progress.loot.hide||0," "),t.xp6(1),t.Q6J("ngClass",t.VKq(8,sa,!i.progress.loot.hide||i.progress.loot.hide==s.characterSpent[e].hide||s.spent.hide==s.costs.hide||s.repair&&s.paidResources==s.repair))}}function XJ(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function tU(o,a){if(1&o&&(t.TgZ(0,"span",52),t.YNc(1,WJ,7,10,"ng-container",4),t.YNc(2,XJ,2,0,"span",4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.progress.loot.hide),t.xp6(1),t.Q6J("ngIf",!n.progress.loot.hide)}}function eU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",50),t._UZ(2,"img",21),t.YNc(3,YJ,4,2,"span",17),t.qZA(),t.TgZ(4,"span",52),t.YNc(5,KJ,7,10,"ng-container",4),t.YNc(6,$J,2,0,"span",4),t.qZA(),t.YNc(7,tU,3,2,"span",53),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(5,RO,!n.repair,n.spent.hide,n.spent.hide==n.costs.hide||n.requiredResources-(n.discount?1:0)==n.paidResources)),t.xp6(2),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.party.loot.hide),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.party.loot.hide),t.xp6(1),t.Q6J("ngForOf",n.characters)}}const nU=function(o,a,n,e){return{first:o,costs:a,some:n,full:e}};function iU(o,a){if(1&o&&(t.TgZ(0,"div",42)(1,"span",43),t.YNc(2,wJ,4,2,"span",9),t.YNc(3,kJ,1,1,"span",44),t.qZA(),t.TgZ(4,"span",45),t._UZ(5,"span",3),t.qZA(),t.YNc(6,ZJ,4,5,"span",46),t.YNc(7,IJ,7,8,"ng-container",4),t.YNc(8,FJ,8,9,"ng-container",4),t.YNc(9,VJ,8,9,"ng-container",4),t.YNc(10,eU,8,9,"ng-container",4),t.qZA()),2&o){const n=t.oxw();t.Udp("--ghs-summary-columns",2+n.characters.length),t.xp6(1),t.Q6J("ngClass",t.l5B(11,nU,!n.repair,n.repair,n.paidResources,n.requiredResources-(n.discount?1:0)<=n.paidResources)),t.xp6(1),t.Q6J("ngIf",n.repair),t.xp6(1),t.Q6J("ngIf",!n.repair),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(1),t.Q6J("ngForOf",n.characters),t.xp6(1),t.Q6J("ngIf",n.costs.gold),t.xp6(1),t.Q6J("ngIf",n.costs.lumber),t.xp6(1),t.Q6J("ngIf",n.costs.metal),t.xp6(1),t.Q6J("ngIf",n.costs.hide)}}function oU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",58),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,sa,!n.force&&(n.requiredResources-(n.discount?1:0)>n.paidResources||n.costs.gold&&n.costs.gold>n.spent.gold||!1))),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.selectResources.confirm")}}const aU=function(o,a){return{fh:o,modern:a}};class th{constructor(a,n,e){(0,_.Z)(this,"characters",void 0),(0,_.Z)(this,"characterSpent",void 0),(0,_.Z)(this,"fhSupportSpent",void 0),this.characters=a,this.characterSpent=n,this.fhSupportSpent=e}}let FO=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"building",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"costs",void 0),(0,_.Z)(this,"requiredResources",void 0),(0,_.Z)(this,"paidResources",0),(0,_.Z)(this,"repair",void 0),(0,_.Z)(this,"force",void 0),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"characterSpent",[]),(0,_.Z)(this,"fhSupportSpent",{gold:0,hide:0,lumber:0,metal:0,prosperity:0}),(0,_.Z)(this,"spent",{gold:0,hide:0,lumber:0,metal:0,prosperity:0}),(0,_.Z)(this,"rewards",void 0),(0,_.Z)(this,"rewardsOnly",void 0),(0,_.Z)(this,"discount",void 0),this.data=e,this.dialogRef=i,this.dialog=s,this.repair=e.repair||0,this.requiredResources=this.repair,this.building=e.building,this.action=e.action,this.force=e.force||!1,this.rewardsOnly="rewards"==this.action,this.discount=null!=d.v.game.party.buildings.find(l=>"carpenter"==l.name&&l.level>0&&"wrecked"!=l.state)&&!this.repair,this.repair?this.costs={gold:0,hide:this.repair,lumber:this.repair,metal:this.repair,prosperity:0}:(this.costs=e.costs||{gold:0,hide:0,lumber:0,metal:0,prosperity:0},this.costs.gold=this.costs.gold||0,this.costs.hide=this.costs.hide||0,this.costs.lumber=this.costs.lumber||0,this.costs.metal=this.costs.metal||0,this.requiredResources=this.costs.hide+this.costs.lumber+this.costs.metal,this.fhSupportSpent.hide=this.costs.hide,this.fhSupportSpent.hide>(d.v.game.party.loot[le.CG.hide]||0)&&(this.fhSupportSpent.hide=d.v.game.party.loot[le.CG.hide]||0),this.spent[le.CG.hide]=this.fhSupportSpent.hide,this.paidResources+=this.fhSupportSpent.hide,this.fhSupportSpent.lumber=this.costs.lumber,this.fhSupportSpent.lumber>(d.v.game.party.loot[le.CG.lumber]||0)&&(this.fhSupportSpent.lumber=d.v.game.party.loot[le.CG.lumber]||0),this.spent[le.CG.lumber]=this.fhSupportSpent.lumber,this.paidResources+=this.fhSupportSpent.lumber,this.fhSupportSpent.metal=this.costs.metal,this.fhSupportSpent.metal>(d.v.game.party.loot[le.CG.metal]||0)&&(this.fhSupportSpent.metal=d.v.game.party.loot[le.CG.metal]||0),this.spent[le.CG.metal]=this.fhSupportSpent.metal,this.paidResources+=this.fhSupportSpent.metal,("build"==this.action||"upgrade"==this.action)&&this.building.data.rewards&&this.building.data.rewards[this.building.model.level]?this.rewards=this.building.data.rewards[this.building.model.level]:"rewards"==this.action&&this.building.data.rewards&&this.building.data.rewards[this.building.model.level-1]&&(this.rewards=this.building.data.rewards[this.building.model.level-1])),this.characters=d.v.game.figures.filter(l=>l instanceof oe.z).map(l=>l),this.characters.forEach((l,m)=>{this.characterSpent[m]={gold:0,hide:0,lumber:0,metal:0,prosperity:0}})}ngOnInit(){this.force&&!R.r.settings.applyBuildingRewards&&this.dialogRef.close(!0)}changeValue(e,i,s){i[e]+=s,this.spent[e]+=s,"gold"!=e&&"prosperity"!=e&&(this.paidResources+=s)}sectionRewards(e,i=""){const s=d.v.sectionData(i||d.v.currentEdition()).find(l=>l.index==e);if(this.rewardsOnly&&s){const l=d.v.buildingsManager.rewardSection(s),m=d.v.sectionData(s.edition).filter(O=>O.conclusion&&!O.parent&&O.parentSections&&O.parentSections.find(k=>1==k.length&&-1!=k.indexOf(s.index)));if(l||0==m.length){const O=new ei.$4(l||s);this.close(),this.dialog.open(uo,{panelClass:"dialog",data:{scenario:O,success:!0,conclusionOnly:!0,rewardsOnly:null!=l}})}else m.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:m,parent:s}}).closed.subscribe({next:O=>{O&&this.sectionRewards(O.index,O.edition)}})}}confirm(){this.force?this.dialogRef.close(!0):this.paidResources==this.requiredResources-(this.discount?1:0)&&(!this.costs.gold||this.costs.gold==this.spent.gold)&&this.dialogRef.close(new th(this.characters,this.characterSpent,this.fhSupportSpent))}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-buildings-upgrade-dialog"]],decls:18,vars:19,consts:[[1,"move-resources-dialog",3,"ngClass"],[1,"title"],[1,"name"],[3,"ghs-label"],[4,"ngIf"],[1,"building"],[1,"action",3,"src"],[3,"ghs-label","ghs-label-args"],["class","costs",3,"ngClass",4,"ngIf"],["class","costs",4,"ngIf"],["class","lose-morale",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","rewards",4,"ngIf"],["class","table",3,"--ghs-summary-columns",4,"ngIf"],[1,"menu"],[1,"cancel",3,"click"],["class","apply",3,"ngClass","click",4,"ngIf"],[1,"costs",3,"ngClass"],["class","cost",4,"ngIf"],[1,"cost"],["src","./assets/images/fh/loot/lumber.svg",1,"ghs-svg"],["src","./assets/images/fh/loot/metal.svg",1,"ghs-svg"],["src","./assets/images/fh/loot/hide.svg",1,"ghs-svg"],["src","./assets/images/fh/loot.svg",1,"ghs-svg"],["src","./assets/images/fh/loot/lumber.svg"],["src","./assets/images/fh/loot/metal.svg"],["src","./assets/images/fh/loot/hide.svg"],[1,"costs"],[1,"cost",3,"ghs-label"],[1,"lose-morale",3,"ghs-label","ghs-label-args"],[1,"rewards"],["class","text-white prosperity",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white defense",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white soldiers",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white plots",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white items",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","text-white section",3,"ngClass","ghs-label","ghs-label-args","click",4,"ngIf"],[1,"text-white","prosperity",3,"ghs-label","ghs-label-args"],[1,"text-white","defense",3,"ghs-label","ghs-label-args"],[1,"text-white","soldiers",3,"ghs-label","ghs-label-args"],[1,"text-white","plots",3,"ghs-label","ghs-label-args"],[1,"text-white","items",3,"ghs-label","ghs-label-args"],[1,"text-white","section",3,"ngClass","ghs-label","ghs-label-args","click"],[1,"table"],[1,"head-col",3,"ngClass"],[3,"ghs-label",4,"ngIf"],[1,"first"],["class","first",4,"ngFor","ngForOf"],[1,"current"],[1,"icon","character-icon",3,"src"],[1,"name",3,"ngClass"],[1,"head-col","calc-col",3,"ngClass"],[1,"ghs-svg",3,"src"],[1,"calc-col"],["class","calc-col",4,"ngFor","ngForOf"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"value",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"apply",3,"ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1)(2,"span",2),t._UZ(3,"span",3),t.YNc(4,lJ,2,1,"span",4),t.qZA(),t.TgZ(5,"span",5),t._UZ(6,"img",6)(7,"span",7),t.qZA(),t.YNc(8,_J,5,7,"span",8),t.YNc(9,pJ,8,7,"span",8),t.YNc(10,fJ,2,1,"div",9),t.YNc(11,mJ,1,4,"span",10),t.YNc(12,xJ,7,6,"div",11),t.qZA(),t.YNc(13,iU,11,16,"div",12),t.TgZ(14,"div",13)(15,"a",14),t.NdJ("click",function(){return i.close()}),t._UZ(16,"span",3),t.qZA(),t.YNc(17,oU,2,4,"a",15),t.qZA()()),2&e&&(t.Q6J("ngClass",t.WLB(14,aU,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ghs-label","data.buildings."+i.building.data.name),t.xp6(1),t.Q6J("ngIf",i.building.data.id),t.xp6(2),t.Q6J("src","./assets/images/fh/buildings/"+i.action+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings."+i.action+".action")("ghs-label-args",t.VKq(17,hg,""+(i.building.model.level+(i.rewardsOnly?0:1)))),t.xp6(1),t.Q6J("ngIf",!i.repair&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",i.repair&&!i.rewardsOnly),t.xp6(1),t.Q6J("ngIf",i.discount&&!i.force),t.xp6(1),t.Q6J("ngIf",i.rewards&&i.rewards.loseMorale),t.xp6(1),t.Q6J("ngIf",i.rewards),t.xp6(1),t.Q6J("ngIf",(i.costs.gold||i.costs.hide||i.costs.lumber||i.costs.metal)&&!i.force&&!i.rewardsOnly),t.xp6(3),t.Q6J("ghs-label",i.rewardsOnly?"close":"cancel"),t.xp6(1),t.Q6J("ngIf",!i.rewardsOnly))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".move-resources-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em}.move-resources-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .building[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] img.action[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs.force[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{color:var(--ghs-color-gray);text-shadow:none;opacity:.5}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .costs.force[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .lose-morale[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));color:#000;text-shadow:none;padding:.1em 1em;margin-top:.5em;background:radial-gradient(ellipse at center,#98c2c0 0%,#4B9490 75%);clip-path:polygon(100% 0%,93% 50%,100% 100%,0 100%,7% 50%,0 0%)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor));margin-top:.5em;padding-top:.5em;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));border-top:.1em solid var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{cursor:pointer}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-summary-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-summary-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white);overflow:auto}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-image:url(dialog_background.fa4ff388462f6a00.png);position:sticky;left:0;z-index:1}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{white-space:nowrap}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.some[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.some[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.full[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.costs.full[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:0 .15em;white-space:nowrap}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:0 .15em}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important;opacity:.6}.move-resources-dialog.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.move-resources-dialog.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.move-resources-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();function sU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("(",n.data.id,")")}}function rU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",21),t._UZ(2,"img",22),t._uU(3),t.qZA(),t.TgZ(4,"span",21),t._UZ(5,"img",23),t._uU(6),t.qZA(),t.TgZ(7,"span",21),t._UZ(8,"img",24),t._uU(9),t.qZA(),t.TgZ(10,"span",21),t._UZ(11,"img",25),t._uU(12),t.qZA(),t.TgZ(13,"span",21),t._UZ(14,"img",26),t._uU(15),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",n.data.costs.prosperity||"-",""),t.xp6(3),t.hij(" ",n.data.costs.lumber||"-",""),t.xp6(3),t.hij(" ",n.data.costs.metal||"-",""),t.xp6(3),t.hij(" ",n.data.costs.hide||"-",""),t.xp6(3),t.hij(" ",n.data.costs.gold||"-","")}}function cU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",21),t._UZ(2,"img",22),t._uU(3),t.qZA(),t.TgZ(4,"span",21),t._UZ(5,"img",23),t._uU(6),t.qZA(),t.TgZ(7,"span",21),t._UZ(8,"img",24),t._uU(9),t.qZA(),t.TgZ(10,"span",21),t._UZ(11,"img",25),t._uU(12),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].prosperity||"-",""),t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].lumber||"-",""),t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].metal||"-",""),t.xp6(3),t.hij(" ",n.data.upgrades[n.model.level-1].hide||"-","")}}const lU=function(o){return[o]};function gU(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",27),t._UZ(2,"span",28),t.TgZ(3,"span",21),t._UZ(4,"img",23),t.qZA(),t.TgZ(5,"span",21),t._UZ(6,"img",24),t.qZA(),t.TgZ(7,"span",21),t._UZ(8,"img",25),t.qZA()(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.repair.costs")("ghs-label-args",t.VKq(2,lU,""+n.data.repair[n.model.level-1]))}}function dU(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span"),t.TgZ(2,"span",21),t._UZ(3,"img",23),t._uU(4),t.qZA(),t.TgZ(5,"span",21),t._UZ(6,"img",24),t._uU(7),t.qZA(),t.TgZ(8,"span",21),t._UZ(9,"img",25),t._uU(10),t.qZA(),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(4),t.hij(" ",n.data.rebuild[n.model.level-1].lumber||"-",""),t.xp6(3),t.hij(" ",n.data.rebuild[n.model.level-1].metal||"-",""),t.xp6(3),t.hij(" ",n.data.rebuild[n.model.level-1].hide||"-","")}}function hU(o,a){if(1&o&&(t.ynx(0),t.YNc(1,cU,13,4,"ng-container",17),t.YNc(2,gU,9,4,"ng-container",17),t.YNc(3,dU,11,3,"ng-container",17),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf","normal"==n.model.state&&n.model.level0?"upgrade.hint":"build.hint"))("originX","end")("originY","bottom")("overlayX","end"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings."+(n.model.level>0?"upgrade":"build")),t.xp6(1),t.Q6J("src","./assets/images/fh/buildings/"+(n.model.level>0?"upgrade":"build")+".svg",t.LSH)}}function _U(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",29),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.repair(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.repair(i,!0))}),t._UZ(1,"span",3)(2,"img",31),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(6,Xf,!e.upgradeable(n)))("ghs-tooltip","party.campaign.sheet.buildings.repair.hint")("originX","end")("originY","bottom")("overlayX","end"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.repair")}}function pU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",29),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.rebuild(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.rebuild(i,!0))}),t._UZ(1,"span",3)(2,"img",32),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(6,Xf,!e.upgradeable(n)))("ghs-tooltip","party.campaign.sheet.buildings.rebuild.hint")("originX","end")("originY","bottom")("overlayX","end"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.rebuild")}}const fU=function(o){return{buildable:o}};function mU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"span",16),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleState(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleState(s,!0))}),t._UZ(2,"span")(3,"span",3),t.qZA(),t.TgZ(4,"span",10),t.YNc(5,sU,2,1,"span",17),t.qZA(),t.TgZ(6,"span",18),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.rewardsDialog(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.downgrade(s))}),t._uU(7),t.qZA(),t.TgZ(8,"span",19),t.YNc(9,rU,16,5,"ng-container",17),t.YNc(10,hU,4,3,"ng-container",17),t.qZA(),t.TgZ(11,"span",13),t.YNc(12,uU,3,9,"span",20),t.YNc(13,_U,3,8,"span",20),t.YNc(14,pU,3,8,"span",20),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(16,fU,!n.model.level)),t.xp6(1),t.Q6J("ngClass",t.VKq(18,Xf,!n.model.level||!n.data.repair)),t.xp6(1),t.Gre("state ",n.model.state,""),t.xp6(1),t.Q6J("ghs-label","data.buildings."+n.model.name),t.xp6(2),t.Q6J("ngIf",n.data.id),t.xp6(1),t.Q6J("ghs-tooltip","party.campaign.sheet.buildings.level.hint")("originY","bottom"),t.xp6(1),t.Oqu(n.model.level||"-"),t.xp6(1),t.Q6J("ngClass",t.VKq(20,Xf,!e.upgradeable(n))),t.xp6(1),t.Q6J("ngIf",!n.model.level),t.xp6(1),t.Q6J("ngIf",n.model.level>0),t.xp6(2),t.Q6J("ngIf",(n.model.level{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"party",void 0),(0,_.Z)(this,"buildings",[]),this.dialog=e}ngOnInit(){this.updateBuildings(),d.v.uiChange.subscribe({next:()=>{this.party=d.v.game.party,this.updateBuildings()}})}updateBuildings(){this.buildings=[];const e=d.v.campaignData();e.buildings.filter(i=>this.initialBuilding(i)).forEach(i=>{this.party.buildings.find(s=>i.name==s.name)||(this.party.buildings.push(new Sw.Y(i.name,1)),i.rewards[0]&&d.v.buildingsManager.applyRewards(i.rewards[0]))}),e.buildings.filter(i=>i.prosperityUnlock&&i.costs.prosperity<=d.v.prosperityLevel()).forEach(i=>{this.party.buildings.find(s=>i.name==s.name)||(!i.requires||this.party.buildings.find(s=>s.name==i.requires))&&this.party.buildings.push(new Sw.Y(i.name,0))}),this.party.buildings.forEach(i=>{const s=e.buildings.find(l=>l.name==i.name);s&&this.buildings.push({model:i,data:s})}),this.buildings.sort((i,s)=>i.model.level&&!s.model.level?-1:!i.model.level&&s.model.level?1:i.data.id&&s.data.id?i.data.idm.name==i.toLowerCase().replaceAll(" ","-")||m.id==i||!isNaN(+m.id)&&!isNaN(+i)&&+m.id==+i);l&&!this.party.buildings.find(m=>m.name==l.name)&&(d.v.stateManager.before("addBuilding","data.buildings."+l.name),this.party.buildings.push(new Sw.Y(l.name,0)),this.updateBuildings(),e.value="",d.v.stateManager.after())}}upgradeable(e){if(e.data.manualUpgrades>0&&e.data.manualUpgrades>=e.model.level)return!0;let i=e.model.level?e.data.upgrades[e.model.level-1]:e.data.costs;if(e.model.level&&!e.data.repair)return!1;if(e.data.repair&&"damaged"==e.model.state){const l=e.data.repair[e.model.level-1];return this.partyResource(le.CG.lumber)+this.partyResource(le.CG.metal)+this.partyResource(le.CG.hide)>l}let s=null!=d.v.game.party.buildings.find(l=>"carpenter"==l.name&&l.level>0&&"wrecked"!=l.state);if("wrecked"==e.model.state){if(i=e.data.rebuild[e.model.level-1],i.lumber>this.partyResource(le.CG.lumber)){if(!s||i.lumber!=this.partyResource(le.CG.lumber)+1)return!1;s=!1}if(i.metal>this.partyResource(le.CG.metal)){if(!s||i.metal!=this.partyResource(le.CG.metal)+1)return!1;s=!1}if(i.hide>this.partyResource(le.CG.hide)){if(!s||i.hide!=this.partyResource(le.CG.hide)+1)return!1;s=!1}return!0}if(e.model.leveld.v.prosperityLevel())return!1;if((i.lumber||0)>this.partyResource(le.CG.lumber)){if(!s||i.lumber!=this.partyResource(le.CG.lumber)+1)return!1;s=!1}if((i.metal||0)>this.partyResource(le.CG.metal)){if(!s||i.metal!=this.partyResource(le.CG.metal)+1)return!1;s=!1}if((i.hide||0)>this.partyResource(le.CG.hide)){if(!s||i.hide!=this.partyResource(le.CG.hide)+1)return!1;s=!1}return!((i.gold||0)>d.v.game.figures.filter(l=>l instanceof oe.z).map(l=>l.progress.gold).reduce((l,m)=>l+m))}return!1}partyResource(e){return(this.party.loot[e]||0)+(0==d.v.game.figures.filter(i=>i instanceof oe.z).length?0:d.v.game.figures.filter(i=>i instanceof oe.z).map(i=>i.progress.loot[e]||0).reduce((i,s)=>i+s))}upgrade(e,i=!1){(e.model.level0?"upgrade":"build",force:i}}).closed.subscribe({next:l=>{if(i&&1==l||l instanceof th){if(d.v.stateManager.before(e.model.level?"upgradeBuilding":"buildBuilding","data.buildings."+e.model.name,""+(e.model.level+1)),!i&&l instanceof th&&this.applySelectResources(l),e.model.level++,R.r.settings.applyBuildingRewards&&e.data.rewards&&e.data.rewards[e.model.level-1]){const m=e.data.rewards[e.model.level-1];d.v.buildingsManager.applyRewards(m),m.section&&this.openConclusion(m.section)}d.v.stateManager.after()}}})}openConclusion(e){const i=d.v.sectionData(d.v.currentEdition()).find(s=>s.index==e);if(i){const s=new ei.$4(i);this.hasConclusions(s.index)?this.openConclusions(s.index):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:s,conclusionOnly:!0}})}}hasConclusions(e){const i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e)));return i.length>0&&i.every(s=>!d.v.game.party.conclusions.find(l=>l.edition==s.edition&&l.index==s.index&&l.group==s.group))}openConclusions(e){let i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e))).map(s=>s);i.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.sectionData(d.v.game.edition).find(s=>s.index==e&&!s.group)}}).closed.subscribe({next:s=>{if(s){const l=new ei.$4(s);this.openConclusion(l.index)}}})}rebuild(e,i=!1){"wrecked"==e.model.state&&(this.upgradeable(e)||i)&&this.dialog.open(FO,{panelClass:["dialog"],data:{costs:e.data.rebuild[e.model.level-1],building:e,action:"rebuild",force:i}}).closed.subscribe({next:s=>{(i&&1==s||s instanceof th)&&(d.v.stateManager.before("rebuildBuilding","data.buildings."+e.model.name),!i&&s instanceof th&&this.applySelectResources(s),e.model.state="normal",d.v.stateManager.after())}})}repair(e,i=!1){"damaged"==e.model.state&&(this.upgradeable(e)||i)&&this.dialog.open(FO,{panelClass:["dialog"],data:{repair:e.data.repair&&e.data.repair[e.model.level-1],building:e,action:"repair",force:i}}).closed.subscribe({next:s=>{(i&&1==s||s instanceof th)&&(d.v.stateManager.before("repairBuilding","data.buildings."+e.data.name),!i&&s instanceof th&&this.applySelectResources(s),e.model.state="normal",d.v.stateManager.after())}})}rewardsDialog(e){if(e.data.rewards&&e.data.rewards[e.model.level-1]){const i=e.data.rewards[e.model.level-1];(i.defense||i.items||i.loseMorale||i.plots||i.prosperity||i.section||i.soldiers)&&this.dialog.open(FO,{panelClass:["dialog"],data:{building:e,action:"rewards"}})}}applySelectResources(e){e.characters.forEach((i,s)=>{e.characterSpent[s].gold&&(i.progress.gold-=e.characterSpent[s].gold),e.characterSpent[s].hide&&(i.progress.loot[le.CG.hide]=(i.progress.loot[le.CG.hide]||0)-e.characterSpent[s].hide),e.characterSpent[s].lumber&&(i.progress.loot[le.CG.lumber]=(i.progress.loot[le.CG.lumber]||0)-e.characterSpent[s].lumber),e.characterSpent[s].metal&&(i.progress.loot[le.CG.metal]=(i.progress.loot[le.CG.metal]||0)-e.characterSpent[s].metal)}),e.fhSupportSpent.hide&&(d.v.game.party.loot[le.CG.hide]=(d.v.game.party.loot[le.CG.hide]||0)-e.fhSupportSpent.hide),e.fhSupportSpent.lumber&&(d.v.game.party.loot[le.CG.lumber]=(d.v.game.party.loot[le.CG.lumber]||0)-e.fhSupportSpent.lumber),e.fhSupportSpent.metal&&(d.v.game.party.loot[le.CG.metal]=(d.v.game.party.loot[le.CG.metal]||0)-e.fhSupportSpent.metal)}toggleState(e,i=!1){e.data.repair&&e.model.level>0&&("normal"==e.model.state?(d.v.stateManager.before("changeBuildingState",e.model.name,"damaged"),e.model.state="damaged",d.v.stateManager.after()):"damaged"==e.model.state?(d.v.stateManager.before("changeBuildingState",e.model.name,"wrecked"),e.model.state="wrecked",d.v.stateManager.after()):i&&"wrecked"==e.model.state&&(d.v.stateManager.before("changeBuildingState",e.model.name,"normal"),e.model.state="normal",d.v.stateManager.after()))}downgrade(e,i=!1){const s=this.party.buildings.indexOf(e.model);if(-1!=s){if(this.initialBuilding(e.data)||0!=e.model.level&&!i){if(!this.initialBuilding(e.data)||e.model.level>1){if(d.v.stateManager.before("downgradeBuilding",e.model.name,""+(e.model.level-1)),e.model.level--,this.party.campaignMode&&e.data.rewards&&e.data.rewards[e.model.level]&&e.data.rewards[e.model.level].section){const l=d.v.sectionData(d.v.currentEdition()).find(m=>m.index==e.data.rewards[e.model.level].section);if(l){const m=d.v.buildingsManager.rewardSection(l);m&&(this.party.conclusions=this.party.conclusions.filter(O=>O.edition!=m.edition||O.group!=m.group||O.index!=m.index))}}d.v.stateManager.after()}}else{if(d.v.stateManager.before("removeBuilding","data.buildings."+e.model.name),this.party.buildings.splice(s,1),this.party.campaignMode&&e.data.rewards&&e.data.rewards[0]&&e.data.rewards[0].section){const l=d.v.sectionData(d.v.currentEdition()).find(m=>m.index==e.data.rewards[0].section);if(l){const m=d.v.buildingsManager.rewardSection(l);m&&(this.party.conclusions=this.party.conclusions.filter(O=>O.edition!=m.edition||O.group!=m.group||O.index!=m.index))}}d.v.stateManager.after()}this.updateBuildings()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-buildings"]],inputs:{party:"party"},decls:21,vars:9,consts:[[1,"buildings-container"],[1,"header",3,"submit"],["src","./assets/images/fh/buildings/build.svg"],[3,"ghs-label"],["type","text",3,"ghs-label","ghs-label-attribute"],["building",""],["src","./assets/images/plus.svg",3,"click"],[1,"buildings"],[1,"building","head"],[1,"name"],[1,"id"],[1,"level"],[1,"costs"],[1,"action"],["class","building",3,"ngClass",4,"ngFor","ngForOf"],[1,"building",3,"ngClass"],["ghs-pointer-input","",1,"name",3,"ngClass","singleClick","doubleClick"],[4,"ngIf"],["ghs-pointer-input","",1,"level",3,"ghs-tooltip","originY","singleClick","doubleClick"],[1,"costs",3,"ngClass"],["class","button upgrade","ghs-pointer-input","",3,"ngClass","ghs-tooltip","originX","originY","overlayX","singleClick","doubleClick",4,"ngIf"],[1,"cost"],["src","./assets/images/fh/buildings/prosperity.svg"],["src","./assets/images/fh/loot/lumber.svg"],["src","./assets/images/fh/loot/metal.svg"],["src","./assets/images/fh/loot/hide.svg"],["src","./assets/images/fh/loot.svg"],[1,"repair"],[3,"ghs-label","ghs-label-args"],["ghs-pointer-input","",1,"button","upgrade",3,"ngClass","ghs-tooltip","originX","originY","overlayX","singleClick","doubleClick"],[3,"src"],["src","./assets/images/fh/buildings/repair.svg"],["src","./assets/images/fh/buildings/rebuild.svg"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"form",1),t.NdJ("submit",function(){t.CHM(s);const m=t.MAs(6);return t.KtG(i.unlockBuilding(m))}),t.TgZ(2,"label"),t._UZ(3,"img",2)(4,"span",3),t.qZA(),t._UZ(5,"input",4,5),t.TgZ(7,"img",6),t.NdJ("click",function(){t.CHM(s);const m=t.MAs(6);return t.KtG(i.unlockBuilding(m))}),t.qZA()(),t.TgZ(8,"div",7)(9,"div",8)(10,"span",9),t._UZ(11,"span",3),t.qZA(),t.TgZ(12,"span",10),t._UZ(13,"span",3),t.qZA(),t.TgZ(14,"span",11),t._UZ(15,"span",3),t.qZA(),t.TgZ(16,"span",12),t._UZ(17,"span",3),t.qZA(),t.TgZ(18,"span",13),t._UZ(19,"span",3),t.qZA()(),t.YNc(20,mU,15,22,"div",14),t.qZA()()}2&e&&(t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.buildings"),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.buildings.unlock")("ghs-label-attribute","placeholder"),t.xp6(6),t.Q6J("ghs-label","party.campaign.sheet.buildings.name"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.id"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.level"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.costs"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.buildings.action"),t.xp6(1),t.Q6J("ngForOf",i.buildings))},dependencies:[x.mk,x.sg,x.O5,Al,wl,Dr,ie,An,Ba],styles:['.buildings-container[_ngcontent-%COMP%]{flex-direction:column;display:flex}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:.8em;width:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;height:1.2em;width:auto}.buildings-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:0;min-width:initial;max-width:initial;margin:0;color:var(--ghs-color-black);background-color:var(--form-background);border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));flex-grow:1;margin-left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;overflow-y:auto;margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:30% 10% 10% 25% 25%;align-items:center;margin:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) 0}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.buildable[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 2);border-top:solid calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.buildable[_ngcontent-%COMP%] ~ .buildable[_ngcontent-%COMP%]{margin-top:0;border-top:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%]:nth-child(odd):before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-gray);opacity:.35;z-index:-1}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;padding:0 .2em}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{width:0;height:1em;background-size:auto 90%;background-repeat:no-repeat;background-position:center center;display:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .state.normal[_ngcontent-%COMP%]{width:1em;background-image:url(damaged.4f5e0cf68a1b64dd.svg)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .state.damaged[_ngcontent-%COMP%]{width:1em;background-image:url(wrecked.a5fd49fad8c36290.svg)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover{opacity:.7}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover .state[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .name.disabled[_ngcontent-%COMP%]{pointer-events:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .id[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{opacity:.7}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .level.disabled[_ngcontent-%COMP%]{pointer-events:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%]{display:grid;justify-content:end;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor)))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{display:flex;align-items:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:.9em;width:auto;margin:0 calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .repair[_ngcontent-%COMP%]{grid-column:span 5;display:flex;align-items:center;justify-content:center}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%] .repair[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:0 calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs.disabled[_ngcontent-%COMP%]{opacity:.7;color:var(--ghs-color-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .costs.disabled[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade[_ngcontent-%COMP%]:hover{opacity:.7}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade.disabled[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .upgrade.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%]{border-bottom:solid calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{pointer-events:none}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%] .costs[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-right:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor))}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building.head[_ngcontent-%COMP%]:before{opacity:.1}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-red)}.buildings-container[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .building[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.5}']})),a})();var n_=E(2501);function CU(o,a){1&o&&t._UZ(0,"span",4),2&o&&t.Q6J("ghs-label","and")}function MU(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",2),t.YNc(2,CU,1,1,"span",3),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label",n.perk.custom),t.xp6(1),t.Q6J("ngIf",n.perk.type!=n.PerkType.custom)}}function OU(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",5),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.attackModifiers.perks.type."+n.perk.type)("ghs-label-args",n.perkLabel(n.perk))}}let rT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"perk",void 0),(0,_.Z)(this,"PerkType",n_.Ib)}perkLabel(e){let i=[],s=[];if(e.cards){if(e.cards.forEach(l=>{s.push(R.r.getLabel("game.attackModifiers.perks.cardLabel",["game.attackModifiers.perks.cards."+l.count,this.attackModifierHtml(l.attackModifier),l.count>1?"game.attackModifiers.perks.cards":"game.attackModifiers.perks.card"]))}),e.type==n_.Ib.replace){const l=d.v.attackModifierManager.replaceCount(e);if(1==l&&2==s.length)i=s;else{if(l>1){let m="";for(let O=l-1;O>=0;O--)m=m?R.r.getLabel("game.attackModifiers.perks.additional",[s[O],m]):s[O];i.push(m)}else i.push(s[0]);if(s.length-l==1)i.push(s[l]);else{let m="";for(let O=s.length;O>=l;O--)m=m?R.r.getLabel("game.attackModifiers.perks.additional",[s[O],m]):s[O];i.push(m)}}}s.length<2?i=s:s.forEach((l,m,O)=>{m%2==0&&m-'+e.value+"":e.valueType==Lt.tI.multiply?''+e.value+"x":e.type==Lt.kl.plusX?'+X':'+'+e.value+""),e.effects&&(e.effects.length>1&&(i+='"'),e.effects.forEach((s,l)=>{l>0&&(i+=","),i+=this.attackModifierEffectHtml(s,e.effects.length>1)}),e.effects.length>1&&(i+='"')),R.r.settings.fhStyle&&e.rolling&&(i+=''),i+="",i}attackModifierEffectHtml(e,i=!1){let s="",l=!1;switch(e.type){case Lt.US.condition:let m=e.value.split(":")[0];m=m.replace("_x",""),s+=''+(R.r.settings.fhStyle?"":R.r.getLabel("game.condition."+m))+'',e.value.split(":").length>1&&(s+=e.value.split(":")[1]),s+="";break;case Lt.US.element:s+='';break;case Lt.US.elementHalf:const O=e.value.split("|");s+='';break;case Lt.US.elementConsume:return s+='',e.effects&&(s+=":",e.effects.forEach(k=>{s+=this.attackModifierEffectHtml(k,!0)})),i?s:'"'+s+'"';case Lt.US.target:s+=R.r.settings.fhStyle?'+'+e.value+'':''+R.r.getLabel(+e.value<=1?"game.custom.perks.addTarget":"game.custom.perks.addTargets",[e.value+""])+'';break;case Lt.US.specialTarget:e.value.split(":").length>1?s+=''+R.r.getLabel("game.specialTarget."+e.value.split(":")[0],e.value.split(":").slice(1))+"":s+=R.r.settings.fhStyle&&"allyShort"==e.value?''+R.r.getLabel("game.specialTarget.ally")+"":''+R.r.getLabel("game.specialTarget."+e.value)+"";break;case Lt.US.refreshItem:s+=''+R.r.getLabel("game.attackModifiers.perks.effects."+e.type+(R.r.settings.fhStyle?"Fh":""))+"";break;case Lt.US.refreshSpentItem:case Lt.US.recoverRandomDiscard:s+=''+R.r.getLabel("game.attackModifiers.perks.effects."+e.type)+"";break;case Lt.US.custom:s+=e.hint?''+R.r.getLabel(e.hint)+"":''+R.r.getLabel(""+e.value)+"",l=!0;break;case Lt.US.or:return e.effects&&e.effects.forEach((k,W)=>{s+=this.attackModifierEffectHtml(k,!0),W":e.value.startsWith("minus")?s+='-'+e.value.replace("minus","")+"":e.value.startsWith("multiply")&&(s+='x'+e.value.replace("multiply","")+""),e.effects&&e.effects.forEach(k=>{s+=this.attackModifierEffectHtml(k)}),s;default:s+=''+(R.r.settings.fhStyle?"":R.r.getLabel("game.action."+e.type))+''+e.value+"",-1==[Lt.US.pull,Lt.US.push,Lt.US.swing,Lt.US.pierce].indexOf(e.type)&&(l=!0)}return e.effects&&(l=!0,e.effects.forEach(m=>{s+=","+this.attackModifierEffectHtml(m,!0)})),l&&!i&&(s='"'+s+'"'),s}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-perk-label"]],inputs:{perk:"perk"},decls:3,vars:2,consts:[[1,"perk-label","capitalize"],[4,"ngIf"],[3,"ghs-label"],["class","and",3,"ghs-label",4,"ngIf"],[1,"and",3,"ghs-label"],[1,"label",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.TgZ(0,"span",0),t.YNc(1,MU,3,2,"ng-container",1),t.YNc(2,OU,2,2,"ng-container",1),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.perk.custom),t.xp6(1),t.Q6J("ngIf",i.perk.type!=i.PerkType.custom))},dependencies:[x.O5,ie],styles:['.perk-label{display:inline-block;line-height:1em}.perk-label:first-letter{text-transform:uppercase}.perk-label .and{margin:0 calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-container{white-space:nowrap}.perk-label .attack-modifier-container *{white-space:initial}.perk-label .attack-modifier-effect{position:relative;margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect img.action-icon{position:relative;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor));width:auto;vertical-align:middle}.perk-label .attack-modifier-effect img.action-icon.sw{filter:invert(1) contrast(1) grayscale(1) brightness(2.5);filter:none}.perk-label .attack-modifier-effect img.action-icon.circled{border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:100%}.perk-label .attack-modifier-effect.rolling img.action-icon,.perk-label .attack-modifier-effect.condition img.action-icon,.perk-label .attack-modifier-effect.target img.action-icon,.perk-label .attack-modifier-effect.pierce img.action-icon,.perk-label .attack-modifier-effect.pull img.action-icon,.perk-label .attack-modifier-effect.push img.action-icon,.perk-label .attack-modifier-effect.element img.action-icon,.perk-label .attack-modifier-effect.element-half img.action-icon{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect .value{margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect.condition,.perk-label .attack-modifier-effect.target,.perk-label .attack-modifier-effect.pierce{text-transform:uppercase}.perk-label .attack-modifier-effect.element img{margin:0}.perk-label .attack-modifier-effect.element-half-placeholder{display:inline-block;position:relative;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:0}.perk-label .attack-modifier-effect.element-half-placeholder .element-half-container{position:absolute;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -1.6 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect.element-half-placeholder.fh{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect.element-half-placeholder.fh .element-half-container{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -2.5 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-effect .placeholder-action{vertical-align:middle}.perk-label .attack-modifier-icon{position:relative;display:inline-flex;justify-content:center;align-items:center;font-family:ghs-title;font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));vertical-align:middle}.perk-label .attack-modifier-icon.small{font-size:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor))}.perk-label .attack-modifier-icon:before{content:" ";position:absolute;left:0;top:calc(var(--ghs-unit) * -.15 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:100%}\n'],encapsulation:2})),a})();const PU=["itemIndex"],yU=["treasureIndex"];function bU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.name)}}function xU(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t._uU(2),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","party.campaign"),t.xp6(1),t.hij("\xa0",n.id,"")}}function wU(o,a){if(1&o&&(t.TgZ(0,"option",47),t.YNc(1,bU,2,1,"span",20),t.YNc(2,xU,3,2,"span",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.s9C("value",n.id),t.Q6J("selected",n.id==e.party.id)("disabled",n.id==e.party.id),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(1),t.Q6J("ngIf",!n.name)}}function kU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",45),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.selectParty(i))}),t.YNc(1,wU,3,5,"option",46),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","party.change")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngForOf",n.gameManager.game.parties)}}function TU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",48),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openMap())}),t._UZ(1,"img",49)(2,"span",13),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.map"))}function ZU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.removeParty())}),t.qZA()}2&o&&t.Q6J("ghs-label","party.remove")("ghs-label-attribute","title")}function AU(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,ZU,1,2,"img",50),t._UZ(2,"span",16),t.TgZ(3,"img",51),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.newParty())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1),t.xp6(2),t.Q6J("ghs-label","party.new")("ghs-label-attribute","title")}}function SU(o,a){1&o&&(t.ynx(0),t.TgZ(1,"div",53),t._UZ(2,"img",54),t.TgZ(3,"span",55)(4,"span",56),t._UZ(5,"span",13),t.qZA()()(),t.BQk()),2&o&&(t.xp6(5),t.Q6J("ghs-label","party.new.hint"))}function EU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",n.split(":")[1],"x\xa0 ")}}function DU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t.YNc(1,EU,2,1,"span",20),t._UZ(2,"span",13)(3,"span",16),t.TgZ(4,"span",58),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.removeAchievement(s))}),t._UZ(5,"img",59),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.split(":").length>0&&"1"!=n.split(":")[1]),t.xp6(1),t.Q6J("ghs-label","data.partyAchievements."+n.split(":")[0])}}const i_=function(o){return{checked:o}};function IU(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",60),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setReputation(40-s-20))}),t.qZA(),t.TgZ(2,"span",61),t._uU(3),t.ALo(4,"ghsValueSign"),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(4,i_,e.party.reputation==40-n-20)),t.xp6(2),t.Oqu(t.lcZ(4,2,40-n-20))}}function NU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"ghsValueSign"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,-5+n))}}function JU(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","party.shop.none"))}const cT=function(o){return{active:o}};function UU(o,a){if(1&o&&(t.TgZ(0,"div",62),t.YNc(1,NU,3,3,"span",20),t.YNc(2,JU,2,1,"span",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(3,cT,e.priceModifier==-5+n)),t.xp6(1),t.Q6J("ngIf",5!=n),t.xp6(1),t.Q6J("ngIf",5==n)}}const lT=function(o){return{"fh-sheet":o}},ar=function(){return[]};function LU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.campaign=!0)}),t._UZ(5,"img",12)(6,"span",13),t.qZA(),t.TgZ(7,"label",14),t._UZ(8,"span",13),t.qZA(),t.YNc(9,kU,2,3,"select",15),t._UZ(10,"span",16),t.YNc(11,TU,3,1,"span",17),t.qZA(),t.TgZ(12,"div",18)(13,"label"),t._UZ(14,"span",13),t._uU(15,":"),t.qZA(),t.TgZ(16,"input",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setName(i))}),t.qZA(),t.YNc(17,AU,4,3,"ng-container",20),t.YNc(18,SU,6,1,"ng-container",20),t.qZA(),t.TgZ(19,"div",21)(20,"label"),t._UZ(21,"span",13),t._uU(22,":"),t.qZA(),t.TgZ(23,"input",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setLocation(i))}),t.qZA()(),t.TgZ(24,"div",22)(25,"label"),t._UZ(26,"span",13),t._uU(27,":"),t.qZA(),t.TgZ(28,"textarea",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setNotes(i))}),t.qZA()(),t.TgZ(29,"div",23)(30,"label"),t._UZ(31,"span",13),t._uU(32,":"),t.qZA(),t.TgZ(33,"div",24)(34,"div",25),t.YNc(35,DU,6,2,"div",26),t.qZA(),t.TgZ(36,"div",27)(37,"input",28,29),t.NdJ("keyup.enter",function(){t.CHM(n);const i=t.MAs(38),s=t.oxw();return t.KtG(s.addAchievement(i))}),t.qZA(),t.TgZ(39,"a",30),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(38),s=t.oxw();return t.KtG(s.addAchievement(i))}),t._UZ(40,"img",31),t.qZA()()()()(),t.TgZ(41,"div",32)(42,"div",8)(43,"div",33)(44,"label"),t._UZ(45,"span",13),t.qZA(),t.TgZ(46,"div",34),t.YNc(47,IU,5,6,"ng-container",35),t.ALo(48,"ghsRange"),t.qZA()(),t.TgZ(49,"div",36)(50,"label"),t._UZ(51,"span",13),t.qZA(),t.TgZ(52,"div",37),t.YNc(53,UU,3,5,"div",38),t.ALo(54,"ghsRange"),t.qZA()()(),t.TgZ(55,"div",39)(56,"label",40),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.exportParty())}),t._UZ(57,"img",41),t.TgZ(58,"span"),t._UZ(59,"span",13),t.qZA()(),t.TgZ(60,"label",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.ghsInputFullScreenCheck())}),t.TgZ(61,"input",43),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.importParty(i))}),t.qZA(),t._UZ(62,"img",44),t.TgZ(63,"span"),t._UZ(64,"span",13),t.qZA()()()()()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(44,lT,n.fhSheet)),t.xp6(6),t.Q6J("ghs-label","party.campaign"),t.xp6(2),t.Q6J("ghs-label","party.sheet"),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1&&!n.gameManager.game.scenario),t.xp6(2),t.Q6J("ngIf",n.worldMap),t.xp6(3),t.Q6J("ghs-label","party.name"),t.xp6(2),t.Q6J("value",n.party.name)("ghs-label","party.name")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario),t.xp6(3),t.Q6J("ghs-label","party.location"),t.xp6(2),t.Q6J("value",n.party.location)("ghs-label","party.location")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.notes"),t.xp6(2),t.Q6J("value",n.party.notes)("ghs-label","party.notes")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.achievements"),t.xp6(4),t.Q6J("ngForOf",n.partyAchievementsList),t.xp6(2),t.Q6J("autocomplete",n.partyAchievements)("spoiler",!0)("emptyLabel","party.addPartyAchievement.empty")("ghs-label","party.addPartyAchievement")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.addPartyAchievement")("ghs-label-attribute","title"),t.xp6(6),t.Q6J("ghs-label","party.reputation"),t.xp6(2),t.Q6J("ngForOf",t.xi3(48,38,t.DdM(46,ar),41)),t.xp6(4),t.Q6J("ghs-label","party.shop"),t.xp6(2),t.Q6J("ngForOf",t.xi3(54,41,t.DdM(47,ar),11)),t.xp6(3),t.Q6J("ghs-label","party.export")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","party.export"),t.xp6(1),t.Q6J("ghs-label","party.import")("ghs-label-attribute","title"),t.xp6(4),t.Q6J("ghs-label","party.import")}}function QU(o,a){if(1&o&&(t.TgZ(0,"div",131),t._UZ(1,"img",132),t._uU(2),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src","./assets/images/"+(e.hasConclusions(n)?"hint.svg":e.isConclusion(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," ")}}function RU(o,a){if(1&o&&(t.TgZ(0,"div",133),t._UZ(1,"img",132),t._uU(2),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src","./assets/images/"+(e.hasConclusions(n)?"hint.svg":e.isConclusion(n)?"scenario/conclusion.svg":"fh/party/section.svg"),t.LSH),t.xp6(1),t.hij(" ",n," ")}}const FU=function(o,a){return{checked:o,section:a}};function qU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",128),t.NdJ("singleClick",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.setWeek(s+1+80*l.calendarSheet))})("doubleClick",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.setWeekSection(s+1+80*l.calendarSheet))}),t.YNc(1,QU,3,2,"div",129),t.YNc(2,RU,3,2,"div",130),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("ghs-tooltip","party.campaign.sheet.weekSections.hint")("ngClass",t.WLB(4,FU,i.party.weeks>e+80*i.calendarSheet,i.sectionsForWeekFixed(n+80*i.calendarSheet).length>0||i.sectionsForWeek(n+80*i.calendarSheet).length>0)),t.xp6(1),t.Q6J("ngForOf",i.sectionsForWeekFixed(n+80*i.calendarSheet)),t.xp6(1),t.Q6J("ngForOf",i.sectionsForWeek(n+80*i.calendarSheet))}}function HU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",134),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.setWeek(i.party.weeks+1))}),t._UZ(1,"span",13)(2,"img",135),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.nextWeek"))}function jU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",52),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.removeParty())}),t.qZA()}2&o&&t.Q6J("ghs-label","party.remove")("ghs-label-attribute","title")}function BU(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.name)}}function zU(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t._uU(2),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","party.campaign"),t.xp6(1),t.hij("\xa0",n.id,"")}}function GU(o,a){if(1&o&&(t.TgZ(0,"option",47),t.YNc(1,BU,2,1,"span",20),t.YNc(2,zU,3,2,"span",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(4);t.s9C("value",n.id),t.Q6J("selected",n.id==e.party.id)("disabled",n.id==e.party.id),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(1),t.Q6J("ngIf",!n.name)}}function VU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",45),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.selectParty(i))}),t.YNc(1,GU,3,5,"option",46),t.qZA()}if(2&o){const n=t.oxw(3);t.Q6J("ghs-label","party.change")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngForOf",n.gameManager.game.parties)}}function YU(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,jU,1,2,"img",50),t.YNc(2,VU,2,3,"select",15),t.TgZ(3,"img",51),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.newParty())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.parties.length>1&&!n.gameManager.game.scenario),t.xp6(1),t.Q6J("ghs-label","party.new")("ghs-label-attribute","title")}}function KU(o,a){1&o&&(t.ynx(0),t.TgZ(1,"div",53),t._UZ(2,"img",54),t.TgZ(3,"span",55)(4,"span",56),t._UZ(5,"span",13),t.qZA()()(),t.BQk()),2&o&&(t.xp6(5),t.Q6J("ghs-label","party.new.hint"))}function $U(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",139),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.moveResources(s))}),t._UZ(1,"img",132),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH)}}function WU(o,a){if(1&o&&(t.TgZ(0,"div",136)(1,"span",137),t._UZ(2,"span",13),t._uU(3,":"),t.qZA(),t.YNc(4,$U,2,1,"span",138),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","character.progress.resources.move"),t.xp6(2),t.Q6J("ngForOf",n.characters)}}function XU(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",143),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw().$implicit,m=t.oxw(2);return t.KtG(m.setSoldiers(s+(l>0?2+2*l:0)+1))}),t._UZ(1,"img",144)(2,"div",145),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(1,i_,n+(e>0?2+2*e:0)0?2:4))}}function eL(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",60),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setMorale(20-s))}),t.TgZ(2,"span",61),t._uU(3),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(2,i_,e.party.morale==20-n)),t.xp6(2),t.Oqu(20-n)}}function nL(o,a){1&o&&t._UZ(0,"img",146)}function iL(o,a){1&o&&t._UZ(0,"img",146)}function oL(o,a){1&o&&(t.TgZ(0,"span",149),t._UZ(1,"img",150),t._uU(2,":"),t.qZA())}function aL(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,oL,3,0,"span",147),t.TgZ(2,"span",148),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setTownGuardPerks(s+1))}),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n%3==0),t.xp6(1),t.Q6J("ngClass",t.VKq(2,i_,e.party.townGuardPerks>=n+1))}}const sL=function(o,a){return{checked:o,disabled:a}};function rL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",155),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.toggleTownGuardPerkSection(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.toggleTownGuardPerkSection(s,!0))}),t.ALo(1,"ghsFloor"),t._UZ(2,"img",112),t._uU(3),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.WLB(4,sL,-1!=e.party.townGuardPerkSections.indexOf(n),-1==e.party.townGuardPerkSections.indexOf(n)&&e.party.townGuardPerkSections.length>=t.lcZ(1,2,e.party.townGuardPerks/3))),t.xp6(3),t.hij(" ",n," ")}}function cL(o,a){if(1&o&&(t.TgZ(0,"div",151)(1,"div",152),t.YNc(2,rL,4,7,"div",153),t.qZA(),t._UZ(3,"ghs-perk-label",154),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ngForOf",n.sections),t.xp6(1),t.Q6J("perk",n.perk)}}function lL(o,a){1&o&&(t.TgZ(0,"div",156),t._UZ(1,"img",157)(2,"span",13),t.qZA()),2&o&&(t.Q6J("ghs-label","game.attackModifiers.perks.warning")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ghs-label","game.attackModifiers.perks.warning"))}function gL(o,a){if(1&o&&(t.TgZ(0,"span",56),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n)}}function dL(o,a){if(1&o&&t._UZ(0,"img",162),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw(2);t.Q6J("src",s.campaignStickerImage(e,i),t.LSH)("title",e)}}function hL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",158),t.YNc(1,gL,2,1,"span",159),t.YNc(2,dL,1,2,"img",160),t.TgZ(3,"img",161),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeCampaignSticker(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!i.campaignStickerImage(n,e)),t.xp6(1),t.Q6J("ngIf",i.campaignStickerImage(n,e))}}const uL=function(o,a){return{collapsed:o,full:a}};function _L(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",163)(1,"div",164)(2,"ghs-attackmodifier-deck",165),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.beforeTownGuardDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.afterTownGuardDeck(i))}),t.qZA(),t.TgZ(3,"div",166),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleTownGuardDeck())}),t._UZ(4,"span",167),t.qZA()()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(4,cT,n.townGuardDeck.active)),t.xp6(1),t.Q6J("ngClass",t.WLB(6,uL,!n.townGuardDeck.active,n.townGuardDeck.active)),t.xp6(1),t.Q6J("deck",n.townGuardDeck)("townGuard",!0)}}const Vr=function(o){return{highlight:o}};function pL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",63)(1,"div",64)(2,"label",65),t._UZ(3,"img",66)(4,"span",13),t.qZA(),t.TgZ(5,"label",67),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.campaign=!0)}),t._UZ(6,"span",13),t.TgZ(7,"span",68),t._UZ(8,"img",12)(9,"span",13),t.qZA()(),t.TgZ(10,"label",69),t._UZ(11,"span",13)(12,"img",70),t.qZA()(),t.TgZ(13,"div",71),t.YNc(14,qU,3,7,"div",72),t.ALo(15,"ghsRange"),t.YNc(16,HU,3,1,"span",73),t.qZA(),t.TgZ(17,"div",74)(18,"label"),t._UZ(19,"span",13),t._uU(20,":"),t.qZA(),t.TgZ(21,"input",19),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setName(i))}),t.qZA(),t.YNc(22,YU,4,4,"ng-container",20),t.YNc(23,KU,6,1,"ng-container",20),t.qZA(),t.TgZ(24,"div",75)(25,"div",76)(26,"label",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openResources())}),t._UZ(27,"span",13),t._uU(28,":"),t.qZA(),t._UZ(29,"span",16),t.YNc(30,WU,5,2,"div",78),t.qZA(),t.TgZ(31,"div",79)(32,"div",80)(33,"div",81),t._UZ(34,"img",82),t.TgZ(35,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.lumber,i))}),t.qZA()(),t.TgZ(36,"div",84),t._UZ(37,"img",85),t.TgZ(38,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.metal,i))}),t.qZA()(),t.TgZ(39,"div",86),t._UZ(40,"img",87),t.TgZ(41,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.hide,i))}),t.qZA()()(),t.TgZ(42,"div",88)(43,"div",89),t._UZ(44,"img",90),t.TgZ(45,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.arrowvine,i))}),t.qZA()(),t.TgZ(46,"div",91),t._UZ(47,"img",92),t.TgZ(48,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.axenut,i))}),t.qZA()(),t.TgZ(49,"div",93),t._UZ(50,"img",94),t.TgZ(51,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.corpsecap,i))}),t.qZA()(),t.TgZ(52,"div",95),t._UZ(53,"img",96),t.TgZ(54,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.flamefruit,i))}),t.qZA()(),t.TgZ(55,"div",97),t._UZ(56,"img",98),t.TgZ(57,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.rockroot,i))}),t.qZA()(),t.TgZ(58,"div",99),t._UZ(59,"img",100),t.TgZ(60,"input",83),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.snowthistle,i))}),t.qZA()()()()(),t.TgZ(61,"div",101)(62,"label"),t._UZ(63,"span",13),t._uU(64,":"),t.qZA(),t.TgZ(65,"input",102),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setInspiration(i))}),t.qZA()(),t.TgZ(66,"div",103)(67,"label"),t._UZ(68,"span",13),t._uU(69,":"),t.qZA(),t.TgZ(70,"input",102),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setTotalDefense(i))}),t.qZA()(),t.TgZ(71,"div",104)(72,"label"),t._UZ(73,"span",13),t._uU(74,":"),t.qZA(),t.TgZ(75,"div",105),t.YNc(76,tL,9,7,"div",106),t.ALo(77,"ghsRange"),t.qZA()(),t.TgZ(78,"div",107)(79,"label"),t._UZ(80,"span",13),t.qZA(),t.TgZ(81,"div",108),t.YNc(82,eL,4,4,"ng-container",35),t.ALo(83,"ghsRange"),t.qZA()(),t.TgZ(84,"div",109)(85,"label"),t._UZ(86,"span",13),t.qZA(),t.TgZ(87,"div",110)(88,"span",111),t._UZ(89,"img",112),t._uU(90),t.YNc(91,nL,1,0,"img",113),t.qZA(),t.TgZ(92,"span",62),t._uU(93,"+15"),t.qZA(),t.TgZ(94,"span",62),t._uU(95,"+10"),t.qZA(),t.TgZ(96,"span",62),t._uU(97,"+5"),t.qZA(),t.TgZ(98,"span",62),t._uU(99,"0"),t.qZA(),t.TgZ(100,"span",62),t._uU(101,"-5"),t.qZA(),t.TgZ(102,"span",62),t._uU(103,"-10"),t.qZA(),t.TgZ(104,"span",111),t._UZ(105,"img",112),t._uU(106),t.YNc(107,iL,1,0,"img",113),t.qZA()()(),t.TgZ(108,"div",114)(109,"label"),t._UZ(110,"span",13),t.qZA(),t.TgZ(111,"div",115),t.YNc(112,aL,3,4,"ng-container",35),t.ALo(113,"ghsRange"),t.qZA(),t.TgZ(114,"div",116),t.YNc(115,cL,4,2,"div",117),t.qZA(),t.YNc(116,lL,3,3,"div",118),t.ALo(117,"ghsFloor"),t.qZA(),t.TgZ(118,"div",119)(119,"form",120),t.NdJ("submit",function(){t.CHM(n);const i=t.MAs(123),s=t.oxw();return t.KtG(s.addCampaignSticker(i))}),t.TgZ(120,"label"),t._UZ(121,"span",13),t.qZA(),t.TgZ(122,"input",121,122),t.NdJ("keyup.enter",function(){t.CHM(n);const i=t.MAs(123),s=t.oxw();return t.KtG(s.addCampaignSticker(i))}),t.qZA(),t.TgZ(124,"img",123),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(123),s=t.oxw();return t.KtG(s.addCampaignSticker(i))}),t.qZA()(),t.TgZ(125,"div",124),t.YNc(126,hL,4,2,"div",125),t.qZA()(),t._UZ(127,"ghs-party-buildings",126),t.YNc(128,_L,5,9,"div",127),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngClass",t.VKq(76,Vr,n.summer)),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.summer"),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet"),t.xp6(3),t.Q6J("ghs-label","party.campaign.manage"),t.xp6(1),t.Q6J("ngClass",t.VKq(78,Vr,!n.summer)),t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet.winter"),t.xp6(3),t.Q6J("ngForOf",t.xi3(15,62,t.DdM(80,ar),80)),t.xp6(2),t.Q6J("ngIf",n.party.weeks==80+80*n.calendarSheet),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.name"),t.xp6(2),t.Q6J("value",n.party.name)("ghs-label","party.campaign.sheet.name")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario),t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(3),t.Q6J("ngIf",n.characters.length>0),t.xp6(5),t.Q6J("value",n.party.loot.lumber||0),t.xp6(3),t.Q6J("value",n.party.loot.metal||0),t.xp6(3),t.Q6J("value",n.party.loot.hide||0),t.xp6(4),t.Q6J("value",n.party.loot.arrowvine||0),t.xp6(3),t.Q6J("value",n.party.loot.axenut||0),t.xp6(3),t.Q6J("value",n.party.loot.corpsecap||0),t.xp6(3),t.Q6J("value",n.party.loot.flamefruit||0),t.xp6(3),t.Q6J("value",n.party.loot.rockroot||0),t.xp6(3),t.Q6J("value",n.party.loot.snowthistle||0),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.inspiration"),t.xp6(2),t.Q6J("value",n.party.inspiration||0)("ghs-label","party.campaign.sheet.inspiration")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.totalDefense"),t.xp6(2),t.Q6J("value",(n.party.defense||0)+n.moraleDefense)("ghs-label","party.campaign.sheet.totalDefense")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.soldiers"),t.xp6(3),t.Q6J("ngForOf",t.xi3(77,65,t.DdM(81,ar),4)),t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.morale"),t.xp6(2),t.Q6J("ngForOf",t.xi3(83,68,t.DdM(82,ar),21)),t.xp6(4),t.Q6J("ghs-label","party.campaign.sheet.defense"),t.xp6(2),t.Q6J("ngClass",t.VKq(83,Vr,n.party.morale>19)),t.xp6(2),t.hij(" ",n.gameManager.campaignData().highMorale||""," "),t.xp6(1),t.Q6J("ngIf",n.party.morale>19),t.xp6(1),t.Q6J("ngClass",t.VKq(85,Vr,15==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(87,Vr,10==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(89,Vr,5==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(91,Vr,0==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(93,Vr,-5==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(95,Vr,-10==n.moraleDefense)),t.xp6(2),t.Q6J("ngClass",t.VKq(97,Vr,n.party.morale<1)),t.xp6(2),t.hij(" ",n.gameManager.campaignData().lowMorale||""," "),t.xp6(1),t.Q6J("ngIf",n.party.morale<1),t.xp6(3),t.Q6J("ghs-label","party.campaign.sheet.townGuardPerks"),t.xp6(2),t.Q6J("ngForOf",t.xi3(113,71,t.DdM(99,ar),45)),t.xp6(3),t.Q6J("ngForOf",n.gameManager.campaignData().townGuardPerks),t.xp6(1),t.Q6J("ngIf",n.party.townGuardPerkSections.length>t.lcZ(117,74,n.party.townGuardPerks/3)),t.xp6(5),t.Q6J("ghs-label","party.campaign.sheet.campaignStickers"),t.xp6(1),t.Q6J("autocomplete",n.campaignStickers)("emptyLabel","party.campaign.sheet.campaignStickers.empty")("ghs-label","party.campaign.sheet.campaignStickers")("ghs-label-attribute","placeholder"),t.xp6(4),t.Q6J("ngForOf",n.party.campaignStickers),t.xp6(1),t.Q6J("party",n.party),t.xp6(1),t.Q6J("ngIf",n.townGuardDeck&&n.townGuardDeck.cards.length>0)}}function fL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",168),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return i.fhSheet=!i.fhSheet,t.KtG(i.update(!1))}),t._UZ(1,"span",13),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","party.campaign.sheet."+(n.fhSheet?"disable":"enable"))}}function mL(o,a){if(1&o&&(t.TgZ(0,"option",211),t._UZ(1,"span",13),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("selected",n==e.partyEdition)("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function vL(o,a){1&o&&t._UZ(0,"div",220)}function CL(o,a){if(1&o&&(t.TgZ(0,"div",221)(1,"span",222),t._UZ(2,"span",13),t.qZA()()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n)}}function ML(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function OL(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function PL(o,a){if(1&o&&(t.ynx(0),t._uU(1," #"),t.YNc(2,ML,2,0,"span",20),t.YNc(3,OL,2,0,"span",20),t._uU(4),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngIf",i.maxScenario(i.scenarios[e])>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",i.maxScenario(i.scenarios[e])>1&&n.index.length<2),t.xp6(1),t.hij("",n.index," ")}}function yL(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",232),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("src",e.characterIcon(n.solo),t.LSH)}}function bL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.scenario.group."+n.group)}}function xL(o,a){1&o&&t._UZ(0,"img",150)}function wL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",233),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.removeManual(i))}),t._UZ(1,"img",234)(2,"img",235),t.qZA()}2&o&&t.Q6J("ghs-label","party.campaign.scenarios.removeManual")("ghs-label-attribute","title")}function kL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",236),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.scenarioRequirements(i))}),t._UZ(1,"img",157),t.qZA()}2&o&&t.Q6J("ghs-tooltip","scenario.locked")}function TL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",237),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.scenarioRewards(i))}),t._UZ(1,"img",238),t.qZA()}2&o&&t.Q6J("ghs-tooltip","scenario.summary.rewards")}function ZL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",239),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.removeSuccess(i))}),t._UZ(2,"img",240)(3,"img",235),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.removeSuccess")("ghs-label-attribute","title"))}function AL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span")(1,"a",241),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.removeSuccess(i,!0))}),t._UZ(2,"img",240)(3,"img",235),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.removeSuccessCasual")("ghs-label-attribute","title"))}const SL=function(o,a){return{blocked:o,locked:a}},Ew=function(o){return{disabled:o}};function EL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",223)(1,"span"),t.YNc(2,PL,5,3,"ng-container",20),t.YNc(3,yL,2,1,"ng-container",20),t.qZA(),t.TgZ(4,"span"),t.YNc(5,bL,1,1,"span",224),t.qZA(),t.TgZ(6,"span",225),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.scenarioRequirements(s))}),t.YNc(7,xL,1,0,"img",226),t._UZ(8,"span",13),t.qZA(),t.TgZ(9,"span"),t._UZ(10,"span",16),t.YNc(11,wL,3,2,"a",227),t.YNc(12,kL,2,1,"span",228),t.YNc(13,TL,2,1,"span",229),t.YNc(14,ZL,4,2,"span",35),t.ALo(15,"ghsRange"),t.YNc(16,AL,4,2,"span",35),t.ALo(17,"ghsRange"),t.TgZ(18,"a",230),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.addSuccess(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.addSuccess(s,!0))}),t._UZ(19,"img",231),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(2),t.Q6J("ngIf",!n.solo),t.xp6(1),t.Q6J("ngIf",n.solo),t.xp6(2),t.Q6J("ngIf",n.group),t.xp6(1),t.Q6J("ngClass",t.WLB(22,SL,n.isBlocked,!n.isBlocked&&n.isLocked))("ghs-tooltip",n.isBlocked?"scenario.blocked":n.isLocked?"scenario.locked":"")("toggable",!1),t.xp6(1),t.Q6J("ngIf",n.isBlocked||n.isLocked),t.xp6(1),t.Q6J("ghs-label","data.scenario."+n.name),t.xp6(3),t.Q6J("ngIf",e.isManual(n)&&e.countFinished(n)<1),t.xp6(1),t.Q6J("ngIf",n.isLocked),t.xp6(1),t.Q6J("ngIf",e.countFinished(n)),t.xp6(1),t.Q6J("ngForOf",t.xi3(15,16,t.DdM(25,ar),e.countFinished(n))),t.xp6(2),t.Q6J("ngForOf",t.xi3(17,19,t.DdM(26,ar),e.countFinished(n,!0))),t.xp6(2),t.Q6J("ghs-label",n.isBlocked?"scenario.blocked":n.isLocked?"scenario.locked":"party.campaign.scenarios.addSuccess")("ghs-label-attribute","title")("ngClass",t.VKq(27,Ew,n.isBlocked||n.isLocked))}}function DL(o,a){1&o&&t._UZ(0,"div",220)}function IL(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function NL(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function JL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.scenario.group."+n.group)}}function UL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.scenario."+n.name)}}function LL(o,a){if(1&o&&t._UZ(0,"span",13),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%data.scenarioNumber:"+n.parent+"%")}}function QL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",223)(1,"span"),t._uU(2," #"),t.YNc(3,IL,2,0,"span",20),t.YNc(4,NL,2,0,"span",20),t._uU(5),t.qZA(),t.TgZ(6,"span"),t.YNc(7,JL,1,1,"span",224),t.qZA(),t.TgZ(8,"span",242),t.YNc(9,UL,1,1,"span",224),t.YNc(10,LL,1,1,"span",224),t.qZA(),t.TgZ(11,"span"),t._UZ(12,"span",16),t.TgZ(13,"span",237),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.scenarioRewards(s))}),t._UZ(14,"img",238),t.qZA(),t.TgZ(15,"a",239),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2).$implicit,m=t.oxw(2);return t.KtG(m.removeConclusion(s.index,l))}),t._UZ(16,"img",240)(17,"img",235),t.qZA()()()}if(2&o){const n=a.$implicit,e=t.oxw(2).$implicit,i=t.oxw(2);t.xp6(3),t.Q6J("ngIf",i.maxScenario(i.conclusions[e])>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",i.maxScenario(i.conclusions[e])>1&&n.index.length<2),t.xp6(1),t.hij("",n.index," "),t.xp6(2),t.Q6J("ngIf",n.group),t.xp6(2),t.Q6J("ngIf",n.named),t.xp6(1),t.Q6J("ngIf",n.parent),t.xp6(3),t.Q6J("ghs-tooltip","scenario.summary.rewards"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.removeSuccess")("ghs-label-attribute","title")}}function RL(o,a){if(1&o&&(t.ynx(0),t.YNc(1,DL,1,0,"div",212),t.TgZ(2,"div",221)(3,"span",222),t._UZ(4,"span",13),t.qZA()(),t.YNc(5,QL,18,9,"div",214),t.BQk()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(3),t.Q6J("ghs-label","party.campaign.scenarios.conclusions"),t.xp6(1),t.Q6J("ngForOf",s.conclusions[i])}}function FL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",215),t._UZ(1,"img",238),t._uU(2," / "),t._UZ(3,"img",243),t.TgZ(4,"input",216,244),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(5);return t.KtG(i.classList.remove("error"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(5),s=t.oxw(3);return t.KtG(s.selectFinishConclusion(i))}),t.qZA(),t.TgZ(6,"a",30),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(5),s=t.oxw(3);return t.KtG(s.selectFinishConclusion(i))}),t._UZ(7,"span",13),t._uU(8,"\xa0"),t._UZ(9,"img",31),t.qZA()()}2&o&&(t.xp6(4),t.Q6J("ghs-label","party.campaign.scenarios.index")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.addConclusion")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.addConclusion"))}function qL(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.YNc(1,vL,1,0,"div",212),t.YNc(2,CL,3,1,"div",213),t.YNc(3,EL,20,29,"div",214),t.TgZ(4,"div",215)(5,"input",216,217),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(6),s=t.MAs(8);return i.classList.remove("error"),t.KtG(s.classList.remove("error"))})("keyup.enter",function(){const s=t.CHM(n).$implicit,l=t.MAs(6),m=t.MAs(8),O=t.oxw(2);return t.KtG(O.unlockScenario(l,m,s))}),t.qZA(),t.TgZ(7,"input",216,218),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(6),s=t.MAs(8);return i.classList.remove("error"),t.KtG(s.classList.remove("error"))})("keyup.enter",function(){const s=t.CHM(n).$implicit,l=t.MAs(6),m=t.MAs(8),O=t.oxw(2);return t.KtG(O.unlockScenario(l,m,s))}),t.qZA(),t.TgZ(9,"a",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.MAs(6),m=t.MAs(8),O=t.oxw(2);return t.KtG(O.unlockScenario(l,m,s))}),t._UZ(10,"span",13),t._uU(11,"\xa0"),t._UZ(12,"img",31),t.qZA()(),t.YNc(13,RL,6,3,"ng-container",20),t.YNc(14,FL,10,5,"div",219),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(1),t.Q6J("ngIf",i.scenarioEditions.length>1),t.xp6(1),t.Q6J("ngForOf",i.scenarios[n]),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.index")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.group")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.unlock")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","party.campaign.scenarios.unlock"),t.xp6(3),t.Q6J("ngIf",i.conclusions[n]&&i.conclusions[n].length>0),t.xp6(1),t.Q6J("ngIf",i.fhSheet)}}function HL(o,a){1&o&&t._UZ(0,"img",245)}function jL(o,a){1&o&&(t.TgZ(0,"div",246),t._UZ(1,"span",247),t.TgZ(2,"span"),t._uU(3,":"),t.qZA()())}function BL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",251),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.setProsperity(i+1))}),t._uU(1),t.qZA()}if(2&o){const n=t.oxw().index,e=t.oxw(2);t.xp6(1),t.hij(" ",e.prosperitySteps.indexOf(n)+2," ")}}const zL=function(o){return{large:o}},GL=function(o,a){return{checked:o,highlight:a}};function VL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",248),t.YNc(1,BL,2,1,"div",249),t.TgZ(2,"div",250),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.setProsperity(s+1))}),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(2);t.Q6J("autoscroll",e.party.prosperity==n+1||0==e.party.prosperity&&0==n)("ngClass",t.VKq(4,zL,-1!=e.prosperitySteps.indexOf(n))),t.xp6(1),t.Q6J("ngIf",-1!=e.prosperitySteps.indexOf(n)),t.xp6(1),t.Q6J("ngClass",t.WLB(6,GL,e.party.prosperity>n,-1!=e.prosperityHighlightSteps.indexOf(n)))}}function YL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",254)(1,"div",255)(2,"div",250),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(3);return t.KtG(l.setDonations(s+1))}),t.qZA(),t._UZ(3,"img",256),t._uU(4," +10g "),t.qZA()()}if(2&o){const n=a.index,e=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(1,i_,e.party.donations>n))}}function KL(o,a){1&o&&(t.TgZ(0,"div",252)(1,"label"),t._UZ(2,"span",13),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",182),t.YNc(5,YL,5,3,"div",253),t.ALo(6,"ghsRange"),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.donations"),t.xp6(3),t.Q6J("ngForOf",t.xi3(6,2,t.DdM(5,ar),10)))}function $L(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",n.split(":")[1],"x\xa0 ")}}function WL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t.YNc(1,$L,2,1,"span",20),t._UZ(2,"span",13)(3,"span",16),t.TgZ(4,"span",58),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(3);return t.KtG(l.removeGlobalAchievement(s))}),t._UZ(5,"img",59),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.split(":").length>0&&"1"!=n.split(":")[1]),t.xp6(1),t.Q6J("ghs-label","data.globalAchievements."+n.split(":")[0])}}function XL(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",257)(1,"label"),t._UZ(2,"span",13),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",24)(5,"div",25),t.YNc(6,WL,6,2,"div",26),t.qZA(),t.TgZ(7,"div",27)(8,"input",121,258),t.NdJ("keyup.enter",function(){t.CHM(n);const i=t.MAs(9),s=t.oxw(2);return t.KtG(s.addGlobalAchievement(i))}),t.qZA(),t.TgZ(10,"a",30),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(9),s=t.oxw(2);return t.KtG(s.addGlobalAchievement(i))}),t._UZ(11,"img",31),t.qZA()()()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","party.campaign.achievements"),t.xp6(4),t.Q6J("ngForOf",n.globalAchievementsList),t.xp6(2),t.Q6J("autocomplete",n.globalAchievements)("emptyLabel","party.addGlobalAchievement.empty")("ghs-label","party.addGlobalAchievement")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","party.addGlobalAchievement")("ghs-label-attribute","title")}}function tQ(o,a){if(1&o&&(t.TgZ(0,"option",173),t._UZ(1,"span",13),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("value",n)("selected",n==e.itemEdition),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function eQ(o,a){if(1&o&&(t.TgZ(0,"span",270),t._uU(1,"["),t._UZ(2,"span",13),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function nQ(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",260),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.openItem(i))}),t._UZ(2,"img",261),t.TgZ(3,"span",262),t._uU(4),t.qZA()(),t.TgZ(5,"span",263),t._uU(6,":"),t.qZA(),t.TgZ(7,"span",264),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.removeItem(i))}),t._UZ(8,"img",265)(9,"img",266),t.qZA(),t.TgZ(10,"span",267),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.openItem(i))}),t.qZA(),t.TgZ(11,"span",268),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(),s=i.$implicit,l=i.index,m=t.oxw(2);return t.KtG(m.incItemCount(s,m.itemIdentifier[l]))}),t._uU(12),t.qZA(),t.YNc(13,eQ,4,1,"span",269),t.BQk()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw(2);t.xp6(2),t.Q6J("src",e.slot?"./assets/images/items/slots/"+e.slot+".svg":"",t.LSH),t.xp6(2),t.Oqu(e.id),t.xp6(6),t.Q6J("ghs-label","data.items."+e.edition+"-"+e.id),t.xp6(2),t.hij(" ",s.itemIdentifier[i].count>0?s.itemIdentifier[i].count:"-"," "),t.xp6(1),t.Q6J("ngIf",!s.partyEdition||!s.itemEdition)}}const gT=function(o){return{edition:o}};function iQ(o,a){if(1&o&&(t.TgZ(0,"label",259),t.YNc(1,nQ,14,5,"ng-container",20),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(2,gT,!e.partyEdition||!e.itemEdition)),t.xp6(1),t.Q6J("ngIf",n)}}function oQ(o,a){if(1&o&&(t.TgZ(0,"option",173),t._UZ(1,"span",13),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("value",n)("selected",n==e.treasureEdition),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function aQ(o,a){if(1&o&&(t.TgZ(0,"span",56),t._uU(1,"["),t._UZ(2,"span",13),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function sQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",271)(1,"span",272),t._UZ(2,"img",199),t.TgZ(3,"span",262),t._uU(4),t.qZA()(),t.TgZ(5,"span",263),t._uU(6,":"),t.qZA(),t.TgZ(7,"span",264),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeTreasure(s))}),t._UZ(8,"img",265)(9,"img",266),t.qZA(),t.TgZ(10,"span",56),t._UZ(11,"ghs-treasure-label",273),t.qZA(),t._UZ(12,"span"),t.YNc(13,aQ,4,1,"span",159),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(5,gT,!e.treasureEdition)),t.xp6(4),t.Oqu(n.name),t.xp6(7),t.Q6J("edition",n.edition)("index",+n.name-1),t.xp6(2),t.Q6J("ngIf",!e.treasureEdition)}}function rQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",274)(1,"span",262),t._uU(2),t.qZA(),t.TgZ(3,"input",275),t.NdJ("change",function(i){const l=t.CHM(n).index,m=t.oxw(2);return t.KtG(m.changePlayer(i,l))}),t.qZA(),t.TgZ(4,"a",58),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.removePlayer(s))}),t._UZ(5,"img",150),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index;t.xp6(2),t.hij("#",e+1,""),t.xp6(1),t.Q6J("value",n)}}function cQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",204)(1,"div",276)(2,"a",77),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.battleGoalSetup())}),t._UZ(3,"span",13),t.qZA()()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","game.battleGoals.setup"))}function lQ(o,a){1&o&&(t.TgZ(0,"div",185)(1,"label"),t._UZ(2,"span",13),t._uU(3,":"),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements"))}function gQ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",13),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","party.campaign.retirements.masteries"))}function dQ(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"img",240),t.qZA())}function hQ(o,a){if(1&o&&(t.ynx(0),t.YNc(1,dQ,2,0,"span",35),t.BQk()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngForOf",n.progress.masteries)}}function uQ(o,a){if(1&o&&(t.TgZ(0,"span"),t.YNc(1,hQ,2,1,"ng-container",20),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",n.progress)}}function _Q(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",281)(1,"span"),t._uU(2," #"),t.TgZ(3,"input",282),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw(3);return t.KtG(m.setPlayerNumber(l,i))})("keyup",function(i){const l=t.CHM(n).$implicit,m=t.oxw(3);return t.KtG(m.setPlayerNumber(l,i))}),t.qZA()(),t.TgZ(4,"span"),t._uU(5),t.qZA(),t.TgZ(6,"span"),t._UZ(7,"span",13),t.qZA(),t.TgZ(8,"span"),t._uU(9),t.qZA(),t.TgZ(10,"span"),t._uU(11),t.qZA(),t.YNc(12,uQ,2,1,"span",20),t.TgZ(13,"span",283),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.reactivateCharacter(s))}),t._UZ(14,"img",284),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(3),t.Q6J("value",n.number),t.xp6(2),t.Oqu(n.title),t.xp6(2),t.Q6J("ghs-label","data.character."+n.name),t.xp6(2),t.Oqu(n.level),t.xp6(2),t.Oqu(e.characterPerks(n)||"/"),t.xp6(1),t.Q6J("ngIf",e.fhSheet),t.xp6(1),t.Q6J("ghs-label","party.campaign.retirements.reactivate")("ghs-label-attribute","title")}}function pQ(o,a){if(1&o&&(t.TgZ(0,"div",277)(1,"div",278)(2,"div",279)(3,"span"),t._UZ(4,"span",13),t.qZA(),t.TgZ(5,"span"),t._UZ(6,"span",13),t.qZA(),t.TgZ(7,"span"),t._UZ(8,"span",13),t.qZA(),t.TgZ(9,"span"),t._UZ(10,"span",13),t.qZA(),t.TgZ(11,"span"),t._UZ(12,"span",13),t.qZA(),t.YNc(13,gQ,2,1,"span",20),t._UZ(14,"span"),t.qZA(),t.YNc(15,_Q,15,8,"div",280),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(8,lT,n.fhSheet)),t.xp6(3),t.Q6J("ghs-label","party.campaign.retirements.player"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.character"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.class"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.level"),t.xp6(2),t.Q6J("ghs-label","party.campaign.retirements.perks"),t.xp6(1),t.Q6J("ngIf",n.fhSheet),t.xp6(2),t.Q6J("ngForOf",n.party.retirements)}}const fQ=function(o){return{fh:o}};function mQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",169)(1,"div",10)(2,"span",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.campaign=!1)}),t._UZ(3,"img",12)(4,"span",13),t.qZA(),t.TgZ(5,"label",14),t._UZ(6,"span",13),t.qZA(),t.TgZ(7,"span",170),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleCampaignMode())}),t._UZ(8,"span",171)(9,"span",13),t.qZA()(),t.TgZ(10,"div",10)(11,"label",14),t._UZ(12,"span",13),t.qZA(),t.TgZ(13,"select",172),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeEdition(i))}),t.TgZ(14,"option",173),t._UZ(15,"span",13),t.qZA(),t.YNc(16,mL,2,3,"option",174),t.qZA()(),t.TgZ(17,"div",175)(18,"div",176)(19,"span"),t._UZ(20,"span",13),t.qZA(),t.TgZ(21,"span"),t._UZ(22,"span",13),t.qZA(),t.TgZ(23,"span"),t._UZ(24,"span",13),t.qZA(),t.TgZ(25,"span"),t._UZ(26,"span",13),t.qZA()(),t.YNc(27,qL,15,12,"ng-container",35),t.qZA(),t.TgZ(28,"div",177)(29,"div",178),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setProsperity(0))}),t.TgZ(30,"div",179),t._UZ(31,"span",13),t.YNc(32,HL,1,0,"img",180),t._uU(33,":"),t.qZA(),t.YNc(34,jL,4,0,"div",181),t.qZA(),t.TgZ(35,"div",182),t.YNc(36,VL,3,9,"div",183),t.ALo(37,"ghsRange"),t.qZA()(),t.YNc(38,KL,7,6,"div",184),t.TgZ(39,"div",185),t.YNc(40,XL,12,8,"div",186),t.qZA(),t.TgZ(41,"div",185)(42,"div",187)(43,"label"),t._UZ(44,"span",13),t._uU(45,":"),t.qZA(),t.TgZ(46,"div",188)(47,"input",189,190),t.NdJ("focus",function(){t.CHM(n);const i=t.MAs(48);return t.KtG(i.select())})("keyup",function(){t.CHM(n);const i=t.MAs(48);return i.classList.remove("error"),t.KtG(i.classList.remove("warning"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(48),s=t.oxw();return t.KtG(s.addItem(i,s.itemEdition||""))}),t.qZA(),t.TgZ(49,"a",191),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(48),s=t.oxw();return t.KtG(s.addItem(i,s.itemEdition||""))}),t._UZ(50,"img",31),t.qZA(),t.TgZ(51,"select",192),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.itemEdition=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.TgZ(52,"option",193),t._UZ(53,"span",13),t.qZA(),t.YNc(54,tQ,2,3,"option",194),t.qZA()(),t.TgZ(55,"div",195),t.YNc(56,iQ,2,4,"label",196),t.qZA()()(),t.TgZ(57,"div",185)(58,"div",197)(59,"label",198),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.treasuresDialog())}),t._UZ(60,"img",199)(61,"span",13),t._uU(62,":"),t.qZA(),t.TgZ(63,"div",200)(64,"input",189,201),t.NdJ("focus",function(){t.CHM(n);const i=t.MAs(65);return t.KtG(i.select())})("keyup",function(){t.CHM(n);const i=t.MAs(65);return i.classList.remove("error"),t.KtG(i.classList.remove("warning"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(65),s=t.oxw();return t.KtG(s.addTreasure(i,s.treasureEdition))}),t.qZA(),t.TgZ(66,"a",191),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(65),s=t.oxw();return t.KtG(s.addTreasure(i,s.treasureEdition))}),t._UZ(67,"img",31),t.qZA(),t.TgZ(68,"select",192),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.treasureEdition=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.TgZ(69,"option",193),t._UZ(70,"span",13),t.qZA(),t.YNc(71,oQ,2,3,"option",194),t.qZA()(),t.TgZ(72,"div",202),t.YNc(73,sQ,14,7,"label",203),t.qZA()()(),t.TgZ(74,"div",8)(75,"div",204)(76,"div",185)(77,"label"),t._UZ(78,"span",13),t._uU(79,":"),t.qZA()(),t.TgZ(80,"div",205),t.YNc(81,rQ,6,2,"div",206),t.TgZ(82,"a",207),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.party.players[i.party.players.length]="")}),t._UZ(83,"img",31)(84,"span",13),t.qZA()()(),t.YNc(85,cQ,4,1,"div",208),t.qZA(),t.YNc(86,lQ,4,1,"div",209),t.YNc(87,pQ,16,10,"div",210),t.qZA()}if(2&o){const n=t.MAs(48),e=t.MAs(65),i=t.oxw();t.xp6(4),t.Q6J("ghs-label","party.sheet"),t.xp6(2),t.Q6J("ghs-label","party.campaign"),t.xp6(2),t.Q6J("ngClass",t.VKq(44,i_,i.party.campaignMode)),t.xp6(1),t.Q6J("ghs-label","party.campaignMode"),t.xp6(3),t.Q6J("ghs-label","party.campaign.scenarios"),t.xp6(2),t.Q6J("value",void 0)("selected",!i.partyEdition),t.xp6(1),t.Q6J("ghs-label","edition.all"),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(4),t.Q6J("ghs-label","party.campaign.scenarios.index"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.group"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.name"),t.xp6(2),t.Q6J("ghs-label","party.campaign.scenarios.finished"),t.xp6(1),t.Q6J("ngForOf",i.scenarioEditions),t.xp6(1),t.Q6J("ngClass",t.VKq(46,fQ,i.settingsManager.settings.fhStyle)),t.xp6(3),t.Q6J("ghs-label","party.prosperity"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.fhStyle),t.xp6(2),t.Q6J("ngIf",!i.settingsManager.settings.fhStyle),t.xp6(2),t.Q6J("ngForOf",t.xi3(37,41,t.DdM(48,ar),i.prosperitySteps[i.prosperitySteps.length-1]+1)),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(4),t.Q6J("ghs-label","party.campaign.items"),t.xp6(5),t.Q6J("ngClass",t.VKq(49,Ew,!i.itemEdition||!n.value||+n.value<1||i.hasItem(n.value,i.itemEdition))),t.xp6(2),t.Q6J("ngModel",i.itemEdition),t.xp6(1),t.Q6J("selected",!i.itemEdition),t.xp6(1),t.Q6J("ghs-label","edition.all"),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(2),t.Q6J("ngForOf",i.items),t.xp6(5),t.Q6J("ghs-label","party.campaign.treasures"),t.xp6(5),t.Q6J("ngClass",t.VKq(51,Ew,!i.treasureEdition||!e.value||+e.value<1||i.hasTreasure(e.value,i.treasureEdition))),t.xp6(2),t.Q6J("ngModel",i.treasureEdition),t.xp6(1),t.Q6J("selected",!i.treasureEdition),t.xp6(1),t.Q6J("ghs-label","edition.all"),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(2),t.Q6J("ngForOf",i.treasures()),t.xp6(5),t.Q6J("ghs-label","party.campaign.players"),t.xp6(3),t.Q6J("ngForOf",i.party.players),t.xp6(3),t.Q6J("ghs-label","party.campaign.players.add"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.battleGoals),t.xp6(1),t.Q6J("ngIf",i.party.retirements&&i.party.retirements.length>0),t.xp6(1),t.Q6J("ngIf",i.party.retirements&&i.party.retirements.length>0)}}const vQ=function(o){return{denied:o}},CQ=function(o,a){return{"fh-container":o,"campaign-container":a}};let Dw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ghsInputFullScreenCheck",he.lz),(0,_.Z)(this,"party",void 0),(0,_.Z)(this,"prosperitySteps",Wu.Zd),(0,_.Z)(this,"prosperityHighlightSteps",Wu.Zd),(0,_.Z)(this,"priceModifier",0),(0,_.Z)(this,"moraleDefense",0),(0,_.Z)(this,"campaign",!1),(0,_.Z)(this,"partyEdition",""),(0,_.Z)(this,"scenarioEditions",[]),(0,_.Z)(this,"scenarios",{}),(0,_.Z)(this,"conclusions",{}),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"worldMap",!1),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"itemIdentifier",[]),(0,_.Z)(this,"itemEdition",""),(0,_.Z)(this,"treasureEdition",""),(0,_.Z)(this,"partyAchievements",[]),(0,_.Z)(this,"globalAchievements",[]),(0,_.Z)(this,"campaignStickers",[]),(0,_.Z)(this,"partyAchievementsList",[]),(0,_.Z)(this,"globalAchievementsList",[]),(0,_.Z)(this,"fhSheet",!1),(0,_.Z)(this,"csSheet",!1),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"townGuardDeck",void 0),(0,_.Z)(this,"calendarSheet",0),(0,_.Z)(this,"summer",!1),(0,_.Z)(this,"itemIndex",void 0),(0,_.Z)(this,"treasureIndex",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.data=e,this.dialogRef=i,this.dialog=s,this.campaign=e&&e.campaign,this.party=d.v.game.party,d.v.game.edition&&!this.party.edition&&(this.party.edition=d.v.game.edition),this.party.edition&&(this.partyEdition=this.party.edition),this.party.casualScenarios=this.party.casualScenarios||[],this.party.scenarios=this.party.scenarios||[],this.campaign||e&&e.partySheet||"jotl"!=this.partyEdition||(this.campaign=!0),d.v.game.conditions&&!this.party.conditions&&(this.party.conditions=d.v.game.conditions),d.v.game.battleGoalEditions&&!this.party.battleGoalEditions&&(this.party.battleGoalEditions=d.v.game.battleGoalEditions),d.v.game.filteredBattleGoals&&!this.party.filteredBattleGoals&&(this.party.filteredBattleGoals=d.v.game.filteredBattleGoals),d.v.game.unlockedCharacters&&!this.party.unlockedCharacters&&(this.party.unlockedCharacters=d.v.game.unlockedCharacters),d.v.game.lootDeckEnhancements&&!this.party.lootDeckEnhancements&&(this.party.lootDeckEnhancements=d.v.game.lootDeckEnhancements),d.v.game.lootDeckFixed&&!this.party.lootDeckFixed&&(this.party.lootDeckFixed=d.v.game.lootDeckFixed),d.v.game.lootDeckSections&&!this.party.lootDeckSections&&(this.party.lootDeckSections=d.v.game.lootDeckSections),this.itemEdition=this.partyEdition,this.treasureEdition=this.partyEdition}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.party!=d.v.game.party&&(this.party=d.v.game.party,this.update()),this.townGuardDeck&&this.party.townGuardDeck&&d.v.attackModifierManager.fromModel(this.townGuardDeck,this.party.townGuardDeck)}}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}close(){this.dialogRef.close()}toggleCampaignMode(){d.v.stateManager.before(this.party.campaignMode?"disablePartyCampaignMode":"enablePartyCampaignMode"),this.party.campaignMode=!this.party.campaignMode,d.v.stateManager.after(),this.update()}openMap(){this.dialog.open(aT,{backdropClass:"fullscreen-backdrop",panelClass:"fullscreen-panel",data:this.partyEdition}),this.close()}changePlayer(e,i){d.v.stateManager.before("setPlayer",e.target.value,""+(i+1)),this.party.players[i]=e.target.value,d.v.stateManager.after()}removePlayer(e){d.v.stateManager.before("removePlayer",this.party.players[e],""+(e+1)),this.party.players.splice(e,1),d.v.stateManager.after()}unlockScenario(e,i,s){let l=e.value,m=i.value||void 0;const O=d.v.scenarioManager.scenarioData(s,!0).find(k=>k.index==l&&k.group==m);e.classList.add("error"),i.classList.add("error"),O&&!this.scenarios[s].find(k=>k.edition==O.edition&&k.group==O.group&&k.index==O.index)&&!this.party.manualScenarios.some(k=>k.index==O.index&&k.edition==O.edition&&k.group==O.group&&!k.isCustom)&&(d.v.stateManager.before("addManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(O))),d.v.game.party.manualScenarios.push(new ei._b(O.index,O.edition,O.group,!1,"",[])),d.v.stateManager.after(),e.classList.remove("error"),e.value="",i.classList.remove("error"),i.value="",this.update())}setName(e){this.party.name!=e.target.value&&(d.v.stateManager.before("setPartyName",e.target.value),this.party.name=e.target.value,d.v.stateManager.after())}setLocation(e){this.party.location!=e.target.value&&(d.v.stateManager.before("setPartyLocation",e.target.value),this.party.location=e.target.value,d.v.stateManager.after())}setNotes(e){this.party.notes!=e.target.value&&(d.v.stateManager.before("setPartyNotes",e.target.value),this.party.notes=e.target.value,d.v.stateManager.after())}addAchievement(e){if(e.value){let i=e.value;Object.keys(R.r.label.data.partyAchievements).forEach(s=>{R.r.label.data.partyAchievements[s].toLowerCase()==i.toLowerCase()&&(i=s)}),d.v.stateManager.before("addPartyAchievement",i),this.party.achievementsList.push(i),d.v.stateManager.after(),e.value="",this.update()}}removeAchievement(e){d.v.stateManager.before("removePartyAchievement",this.party.achievementsList[e]),this.party.achievementsList.splice(this.party.achievementsList.lastIndexOf(this.party.achievementsList[e]),1),d.v.stateManager.after(),this.update()}addGlobalAchievement(e){if(e.value){let i=e.value;Object.keys(R.r.label.data.globalAchievements).forEach(s=>{R.r.label.data.globalAchievements[s].toLowerCase()==i.toLowerCase()&&(i=s)}),d.v.stateManager.before("addGlobalAchievement",i),this.party.globalAchievementsList.push(i),d.v.stateManager.after(),e.value="",this.update()}}removeGlobalAchievement(e){d.v.stateManager.before("removeGlobalAchievement",this.party.globalAchievementsList[e]),this.party.globalAchievementsList.splice(this.party.globalAchievementsList.lastIndexOf(this.party.globalAchievementsList[e]),1),d.v.stateManager.after(),this.update()}setReputation(e){this.party.reputation!=e&&(d.v.stateManager.before("setPartyReputation",""+e),e>20?e=20:e<-20&&(e=-20),this.party.reputation=e,d.v.stateManager.after(),this.update())}characterPerks(e){return e.progress&&e.progress.perks&&e.progress.perks.length>0?e.progress.perks.reduce((i,s)=>i+s):0}setPlayerNumber(e,i){!isNaN(+i.target.value)&&e.number!=+i.target.value&&+i.target.value>0&&(d.v.stateManager.before("setPlayerNumber","data.character."+e.name,i.target.value),e.number=+i.target.value,d.v.stateManager.after())}reactivateCharacter(e){d.v.stateManager.before("unsetRetired","data.character."+e.name);let i=new oe.z(d.v.getCharacterData(e.name,e.edition),e.level);i.fromModel(e),i.progress.retired=!1,d.v.game.figures.push(i),this.party.retirements.splice(this.party.retirements.indexOf(e),1),d.v.stateManager.after()}removeParty(){d.v.game.parties.length>1&&(d.v.stateManager.before("removeParty",this.party.name||"%party% "+this.party.id),d.v.game.parties.splice(d.v.game.parties.indexOf(this.party),1),this.changeParty(d.v.game.parties[0]),d.v.stateManager.after())}newParty(){let e=new Mw.f;d.v.stateManager.before("addParty",e.name||"%party% "+e.id),this.addParty(e),d.v.stateManager.after()}addParty(e){let i=0;for(;d.v.game.parties.some(s=>s.id==i);)i++;e.id=i,d.v.game.parties.push(e),this.changeParty(e)}selectParty(e){const i=d.v.game.parties.find(s=>s.id==e.target.value);i&&(d.v.stateManager.before("changeParty",i.name||"%party% "+i.id),this.changeParty(i),d.v.stateManager.after())}changeParty(e){d.v.changeParty(e),this.update()}setDonations(e){this.party.donations==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartyDonations",""+e),this.party.donations=e,d.v.stateManager.after()}setProsperity(e){this.party.prosperity==e&&e--,e>(d.v.fhRules()?132:64)?e=d.v.fhRules()?132:64:e<0&&(e=0),d.v.stateManager.before("setPartyProsperity",""+e),this.party.prosperity=e,d.v.stateManager.after()}exportParty(){const e=document.createElement("a");e.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(this.party))),e.setAttribute("download",(this.party.name?this.party.name+"_":"")+"campaign.json"),document.body.appendChild(e),e.click(),document.body.removeChild(e)}importParty(e){const i=e.target.parentElement;i.classList.remove("error");try{const s=new FileReader;s.addEventListener("load",l=>{const m=Object.assign(new Mw.f,JSON.parse(l.target.result));m?(d.v.stateManager.before("importParty"),m.id==this.party.id&&m.name&&m.name==this.party.name?d.v.game.party=m:this.addParty(m),this.party=d.v.game.party,d.v.stateManager.after()):i.classList.add("error")}),s.readAsText(e.target.files[0])}catch(s){console.warn(s),i.classList.add("error")}}countFinished(e,i=!1){return(i?this.party.casualScenarios:this.party.scenarios).filter(s=>e.index==s.index&&e.edition==s.edition&&e.group==s.group).length}isManual(e){return null!=this.party.manualScenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)}addSuccess(e,i=!1){if(!d.v.scenarioManager.isBlocked(e)&&!d.v.scenarioManager.isLocked(e)||i){const s=d.v.sectionData(e.edition).filter(l=>l.edition==e.edition&&l.parent==e.index&&l.group==e.group&&l.conclusion);0==s.length?this.addSuccessIntern(e):this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:s,parent:e}}).closed.subscribe({next:l=>{l&&this.addSuccessIntern(e,l)}})}}addSuccessIntern(e,i=void 0){d.v.stateManager.before("finishScenario.success",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),d.v.scenarioManager.finishScenario(new ei.$4(e),!0,i,!1,void 0,!1,d.v.game.party.campaignMode&&0==this.countFinished(e),!0),d.v.stateManager.after(),this.update()}removeSuccess(e,i=!1){const s=i?this.party.casualScenarios:this.party.scenarios,l=s.find(m=>m.index==e.index&&m.edition==e.edition&&m.group==e.group);l&&(d.v.stateManager.before("finishScenario.remove"+(i?"Casual":""),...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),s.splice(s.indexOf(l),1),d.v.stateManager.after()),this.update()}removeManual(e){const i=this.party.manualScenarios.find(s=>s.index==e.index&&s.edition==e.edition&&s.group==e.group);i&&(d.v.stateManager.before("removeManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),this.party.manualScenarios.splice(this.party.manualScenarios.indexOf(i),1),d.v.stateManager.after()),this.update()}scenarioRewards(e){const i=this.party.conclusions.filter(s=>s.edition==e.edition).map(s=>d.v.sectionData(e.edition).find(l=>l.index==s.index&&l.edition==s.edition&&l.group==s.group)).find(s=>s.parent==e.index&&s.group==e.group);this.dialog.open(uo,{panelClass:"dialog",data:{scenario:new ei.$4(e),conclusion:i,success:!0,rewardsOnly:!0}})}scenarioRequirements(e){d.v.scenarioManager.isLocked(e)&&this.dialog.open(oT,{panelClass:"dialog",data:{scenarioData:e,hideMenu:!0}})}maxScenario(e){return Math.max(...e.map(i=>i.index.length))}changeEdition(e){this.partyEdition="undefined"!=e.target.value&&e.target.value||"",this.itemEdition=this.partyEdition,this.treasureEdition=this.partyEdition,this.update()}update(e=!0){e&&(this.fhSheet=d.v.fhRules(),this.csSheet=!this.fhSheet&&d.v.editionRules("cs"));const i=this.partyEdition&&[this.partyEdition]||d.v.editions();this.scenarioEditions=[],i.forEach(m=>{let O=d.v.scenarioManager.scenarioData(m).filter(k=>!k.spoiler||-1!=R.r.settings.spoilers.indexOf(k.name)||k.solo&&-1!=d.v.game.unlockedCharacters.indexOf(k.solo)).map(k=>new ei.U4(k,this.countFinished(k)>0,d.v.scenarioManager.isBlocked(k),d.v.scenarioManager.isLocked(k)));O.length>0&&(this.scenarios[m]=O.sort((k,W)=>k.group&&!W.group?1:!k.group&&W.group?-1:k.group&&W.group&&k.group!=W.group?k.groupk.edition==m).map(k=>d.v.sectionData(m).find(W=>W.index==k.index&&W.edition==k.edition&&W.group==k.group)).filter(k=>!this.party.scenarios.find(W=>W.edition==k.edition&&W.group==k.group&&W.index==k.parent))}),this.priceModifier=this.party.reputation>=0?-1*Math.ceil((this.party.reputation-2)/4):-1*Math.floor((this.party.reputation+2)/4),this.moraleDefense=this.party.morale<3?-10:this.party.morale<5?-5:this.party.morale<8?0:this.party.morale<11?5:this.party.morale<14?10:15;const s=d.v.campaignData();this.townGuardDeck=d.v.attackModifierManager.buildTownGuardAttackModifierDeck(this.party,s),this.party.townGuardDeck?d.v.attackModifierManager.fromModel(this.townGuardDeck,this.party.townGuardDeck):(d.v.attackModifierManager.shuffleModifiers(this.townGuardDeck),this.townGuardDeck.active=!1,this.party.townGuardDeck=this.townGuardDeck.toModel()),this.calendarSheet=Math.floor(Math.max(this.party.weeks-1,0)/80),this.characters=d.v.game.figures.filter(m=>m instanceof oe.z&&Object.keys(m.progress.loot).some(O=>m.progress.loot[O])).map(m=>m),this.prosperitySteps=this.fhSheet?Wu.K8:Wu.Zd,R.r.settings.fhStyle?(this.prosperityHighlightSteps=[],this.prosperitySteps.forEach((m,O)=>{const k=O>0?this.prosperitySteps[O-1]+1:0;for(let W=k;Wthis.partyEdition&&m.edition==this.partyEdition);l&&(l.worldMap&&(this.worldMap=!0),l.label&&l.label[R.r.settings.locale]&&l.label[R.r.settings.locale].partyAchievements?this.partyAchievements.push(...Object.keys(l.label[R.r.settings.locale].partyAchievements).map(m=>new Wf(l.label[R.r.settings.locale].partyAchievements[m],m,-1!=this.party.achievementsList.indexOf(m)))):l.label&&l.label.en&&l.label.en.partyAchievements&&this.partyAchievements.push(...Object.keys(l.label.en.partyAchievements).map(m=>new Wf(l.label.en.partyAchievements[m],m,-1!=this.party.achievementsList.indexOf(m)))),l.label&&l.label[R.r.settings.locale]&&l.label[R.r.settings.locale].globalAchievements?this.globalAchievements.push(...Object.keys(l.label[R.r.settings.locale].globalAchievements).map(m=>new Wf(l.label[R.r.settings.locale].globalAchievements[m],m,-1!=this.party.globalAchievementsList.indexOf(m)))):l.label&&l.label.en&&l.label.en.globalAchievements&&this.globalAchievements.push(...Object.keys(l.label.en.globalAchievements).map(m=>new Wf(l.label.en.globalAchievements[m],m,-1!=this.party.globalAchievementsList.indexOf(m)))),l.campaign&&l.campaign.campaignStickers&&this.campaignStickers.push(...l.campaign.campaignStickers.map(m=>(m=m.split(":")[0],new Wf(R.r.getLabel("data.campaignSticker."+m),m,-1!=this.party.campaignStickers.indexOf(m)))))),this.partyAchievementsList=this.party.achievementsList.map((m,O,k)=>m+":"+k.filter(W=>W==m).length).filter((m,O,k)=>k.indexOf(m)==O),this.globalAchievementsList=this.party.globalAchievementsList.map((m,O,k)=>m+":"+k.filter(W=>W==m).length).filter((m,O,k)=>k.indexOf(m)==O),this.itemIdentifier=this.party.unlockedItems.filter(m=>!this.itemEdition||m.edition==this.itemEdition).sort((m,O)=>this.partyEdition||m.edition==O.edition?+m.name-+O.name:d.v.editions().indexOf(m.edition)-d.v.editions().indexOf(O.edition)),this.items=this.itemIdentifier.map(m=>d.v.itemManager.getItem(+m.name,m.edition,!0)),this.summer=Math.max(this.party.weeks-1,0)%20<10}characterIcon(e){return d.v.characterManager.characterIcon(e)}addItem(e,i){const s=e.value;if(s&&i)if(this.hasItem(s,i))e.classList.add("warning");else{e.classList.add("error");const l=d.v.itemManager.getItems(i,!0).find(m=>s==""+m.id);l&&(d.v.stateManager.before("addUnlockedItem",i,s,l.name),this.party.unlockedItems=this.party.unlockedItems||[],this.party.unlockedItems.push(new Vn.Jc(s,i)),this.itemIndex.nativeElement.value="",e.classList.remove("error"),d.v.stateManager.after(),this.update())}}hasItem(e,i){return this.party.unlockedItems&&this.party.unlockedItems.some(s=>s.name==e&&s.edition==i)}removeItem(e){const i=this.party.unlockedItems.find(s=>s.name==""+e.id&&s.edition==e.edition);i&&(d.v.stateManager.before("removeUnlockedItem",e.edition,""+e.id,e.name),this.party.unlockedItems.splice(this.party.unlockedItems.indexOf(i),1),d.v.stateManager.after(),this.update())}openItem(e){this.dialog.open(gg,{data:{item:e}})}incItemCount(e,i){d.v.stateManager.before("updateUnlockedItemCount",e.edition,""+e.id,e.name),i.count<0?i.count=1:(i.count+=1,i.count>=e.count&&(i.count=-1)),d.v.stateManager.after()}treasuresDialog(){this.dialog.open(tJ,{panelClass:"dialog",data:{party:this.party,edition:this.treasureEdition}})}treasures(){return this.party.treasures.filter(e=>!this.treasureEdition||e.edition==this.treasureEdition).sort((e,i)=>this.treasureEdition||e.edition==i.edition?+e.name-+i.name:d.v.editions().indexOf(e.edition)-d.v.editions().indexOf(i.edition))}addTreasure(e,i){const s=e.value;if(s&&!isNaN(+s)&&i)if(this.hasTreasure(s,i))e.classList.add("warning");else{e.classList.add("error");const l=d.v.editionData.find(m=>m.edition==i);if(l&&l.treasures){const m=+s-(l.treasureOffset||0);m>=0&&ms.name==e&&s.edition==i)}removeTreasure(e){d.v.stateManager.before("removeTreasure",e.edition,e.name),this.party.treasures.splice(this.party.treasures.indexOf(e),1),d.v.stateManager.after()}sectionsForWeekFixed(e){const i=d.v.campaignData();return i.weeks&&i.weeks[e+1]&&i.weeks[e+1]||[]}sectionsForWeek(e){return this.party.weekSections&&this.party.weekSections[e+1]&&this.party.weekSections[e+1]||[]}isConclusion(e){return null!=this.party.conclusions.find(i=>i.edition==d.v.game.edition&&i.index==e)}hasConclusions(e){const i=d.v.sectionData(d.v.game.edition).filter(s=>s.conclusion&&!s.parent&&s.parentSections&&s.parentSections.find(l=>1==l.length&&-1!=l.indexOf(e)));return i.length>0&&i.every(s=>!d.v.game.party.conclusions.find(l=>l.edition==s.edition&&l.index==s.index&&l.group==s.group))}openConclusions(e,i=-1){let s=d.v.sectionData(d.v.game.edition).filter(l=>l.conclusion&&!l.parent&&l.parentSections&&l.parentSections.find(m=>1==m.length&&-1!=m.indexOf(e))).map(l=>l);s.length>0&&this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:s,parent:d.v.sectionData(d.v.game.edition).find(l=>l.index==e&&!l.group)}}).closed.subscribe({next:l=>{if(l){const m=new ei.$4(l);-1!=i?(d.v.stateManager.before("finishConclusion",...d.v.scenarioManager.scenarioUndoArgs(m)),d.v.scenarioManager.finishScenario(m,!0,m,!1,void 0,!1,d.v.game.party.campaignMode,!0),this.party.weekSections[i]=this.party.weekSections[i]||[],this.party.weekSections[i]?.push(m.index),d.v.stateManager.after(),this.dialog.open(uo,{panelClass:"dialog",data:{scenario:m,conclusionOnly:!0}})):this.finishConclusion(m.index)}}})}selectFinishConclusion(e,i=!1){let s=e.value;e.classList.add("error");const l=d.v.sectionData(this.partyEdition||d.v.currentEdition()).find(m=>m.index==s);l&&(e.classList.remove("error"),i||!this.party.conclusions.find(m=>m.edition==l.edition&&m.group==l.group&&m.index==l.index)?(e.value="",this.finishConclusion(s,i)):e.classList.add("warning"))}finishConclusion(e,i=!1){const s=d.v.sectionData(this.partyEdition||d.v.currentEdition()).find(l=>l.index==e);if(s&&(i||!this.party.conclusions.find(l=>l.edition==s.edition&&l.group==s.group&&l.index==s.index))){const l=new ei.$4(s);this.hasConclusions(l.index)?this.openConclusions(l.index):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:l,conclusionOnly:!0}}).closed.subscribe({next:()=>this.update()})}}removeConclusion(e,i){d.v.stateManager.before("removeConclusion",d.v.game.party.name,e+""),d.v.game.party.conclusions=d.v.game.party.conclusions.filter(s=>s.edition!=i||s.index!=e),d.v.stateManager.after(),this.update()}setWeek(e){this.party.weeks==e&&e--,e<0&&(e=0);let i=[];for(let s=this.party.weeks;s{this.hasConclusions(l)&&i.push(l)}),this.sectionsForWeek(s).forEach(l=>{this.hasConclusions(l)&&i.push(l)}),i.forEach(l=>{this.openConclusions(l,e)});d.v.stateManager.before("setPartyWeeks",""+e);for(let s=this.party.weeks;s{const O=d.v.sectionData(d.v.game.edition).find(k=>k.index==m&&k.conclusion);O&&!d.v.game.party.conclusions.find(k=>k.edition==O.edition&&k.index==O.index&&k.group==O.group)&&d.v.scenarioManager.finishScenario(new ei.$4(O),!0,void 0,!1,void 0,!1,d.v.game.party.campaignMode,!0)});this.party.weeks=e,d.v.stateManager.after(),this.update()}setWeekSection(e){this.dialog.open(gN,{panelClass:["dialog-invert"],data:e})}setResource(e,i){isNaN(+i.target.value)||(d.v.stateManager.before("setPartyResource",this.party.name,"game.loot."+e,i.target.value),this.party.loot[e]=+i.target.value,d.v.stateManager.after())}moveResources(e){this.dialog.open(xw,{panelClass:"dialog",data:{character:e}}).closed.subscribe({next:()=>this.update()})}openResources(){this.dialog.open(cJ,{panelClass:["dialog-invert"]})}setInspiration(e){!isNaN(+e.target.value)&&this.party.inspiration!=+e.target.value&&(d.v.stateManager.before("setPartyInspiration",this.party.name,e.target.value),this.party.inspiration=+e.target.value,d.v.stateManager.after())}setTotalDefense(e){if(!isNaN(+e.target.value)){const i=+e.target.value-this.moraleDefense;this.party.defense!=i&&(d.v.stateManager.before("setPartyTotalDefense",this.party.name,""+i),this.party.defense=i,d.v.stateManager.after())}}setSoldiers(e){this.party.soldiers==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartySoldiers",""+e),this.party.soldiers=e,d.v.stateManager.after()}setMorale(e){this.party.morale==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartyMorale",""+e),this.party.morale=e,d.v.stateManager.after(),this.update()}setTownGuardPerks(e){this.party.townGuardPerks==e&&e--,e<0&&(e=0),d.v.stateManager.before("setPartyTownGuardPerks",""+e),this.party.townGuardPerks=e,d.v.stateManager.after()}toggleTownGuardPerkSection(e,i=!1){this.party.townGuardPerkSections=this.party.townGuardPerkSections||[];const s=this.party.townGuardPerkSections.indexOf(e);if(-1!=s||this.party.townGuardPerkSections.lengthk.startsWith(i.toLowerCase().replaceAll(" ","-")+":"));O&&(s=+O.split(":")[1])}this.party.campaignStickers.filter(O=>O.toLowerCase().replaceAll(" ","-")==i.toLowerCase().replaceAll(" ","-")).lengthk==l||k.startsWith(l));O&&(m=-1!=O.indexOf(":")?+O.split(":")[1]:1)}if(1==m)return"./assets/images/fh/party/campaign-stickers/"+l+".png";if(m>1){const k=this.party.campaignStickers.map((W,ct)=>({sticker:W.toLowerCase().replaceAll(" ","-"),origIndex:ct})).filter(W=>W.sticker==l).map((W,ct)=>({sticker:W.sticker,origIndex:W.origIndex,index:ct+1})).find(W=>W.origIndex==i);if(k)return"./assets/images/fh/party/campaign-stickers/"+l+"-"+k.index+".png"}}beforeTownGuardDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"party.campaign.townGuard",...e.values)}afterTownGuardDeck(e){this.townGuardDeck=e.deck,this.party.townGuardDeck=this.townGuardDeck.toModel(),d.v.stateManager.after()}toggleTownGuardDeck(){this.townGuardDeck&&(this.beforeTownGuardDeck(new xn(this.townGuardDeck,this.townGuardDeck.active&&!d.v.game.lootDeck.active?"amDeckHide":"amDeckShow")),this.townGuardDeck.active=!this.townGuardDeck.active,this.afterTownGuardDeck(new xn(this.townGuardDeck,this.townGuardDeck.active?"amDeckShow":"amDeckHide")))}battleGoalSetup(){this.dialog.open(UO,{panelClass:["dialog"]})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-sheet-dialog"]],viewQuery:function(e,i){if(1&e&&(t.Gf(PU,5),t.Gf(yU,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.itemIndex=s.first),t.iGM(s=t.CRH())&&(i.treasureIndex=s.first)}},decls:7,vars:11,consts:[[1,"light","party-sheet-dialog"],[1,"scroll-container",3,"ngClass"],[1,"container",3,"ngClass"],["class","sheet",3,"ngClass",4,"ngIf"],["class","sheet fh-sheet",4,"ngIf"],["class","toggle-fh-sheet",3,"click",4,"ngIf"],["class","campaign",4,"ngIf"],[1,"sheet",3,"ngClass"],[1,"columns"],[1,"column","column-left"],[1,"row","title"],[1,"campaign-toggle",3,"click"],["src","./assets/images/left.svg"],[3,"ghs-label"],[1,"headline"],["class","select-party",3,"ghs-label","ghs-label-attribute","change",4,"ngIf"],[1,"spacer"],["class","map",3,"click",4,"ngIf"],[1,"row","name"],["type","text",3,"value","ghs-label","ghs-label-attribute","change"],[4,"ngIf"],[1,"row","location"],[1,"row","notes"],[1,"row","achievements"],[1,"achievements-container"],[1,"list"],["class","achievement",4,"ngFor","ngForOf"],[1,"form"],["type","text",3,"autocomplete","spoiler","emptyLabel","ghs-label","ghs-label-attribute","keyup.enter"],["partyAchievementInput",""],[1,"addScenario",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/plus.svg"],[1,"column","column-right"],[1,"column","reputation"],[1,"grid"],[4,"ngFor","ngForOf"],[1,"column","shop"],[1,"table"],["class","value",3,"ngClass",4,"ngFor","ngForOf"],[1,"import-export"],[1,"export",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/export.svg"],[1,"import",3,"ghs-label","ghs-label-attribute","click"],["type","file","accept","application/json",3,"change"],["src","./assets/images/import.svg"],[1,"select-party",3,"ghs-label","ghs-label-attribute","change"],[3,"selected","disabled","value",4,"ngFor","ngForOf"],[3,"selected","disabled","value"],[1,"map",3,"click"],["src","./assets/images/fullscreen.svg"],["class","remove-party","src","./assets/images/minus.svg",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],["src","./assets/images/plus.svg",1,"new-party",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/minus.svg",1,"remove-party",3,"ghs-label","ghs-label-attribute","click"],[1,"hint-container","new-party-hint"],["src","./assets/images/plus.svg",1,"hint-trigger","ghs-svg"],[1,"hint"],[1,"text"],[1,"achievement"],[1,"remove",3,"click"],["src","./assets/images/close.svg",1,"ghs-svg"],[1,"value",3,"ngClass","click"],[1,"key"],[1,"value",3,"ngClass"],[1,"sheet","fh-sheet"],[1,"title"],[1,"summer",3,"ngClass"],["src","./assets/images/fh/party/summer.svg"],[1,"headline",3,"click"],[1,"management"],[1,"winter",3,"ngClass"],["src","./assets/images/fh/party/winter.svg"],[1,"weeks"],["class","week","ghs-pointer-input","",3,"ghs-tooltip","ngClass","singleClick","doubleClick",4,"ngFor","ngForOf"],["class","next",3,"click",4,"ngIf"],[1,"name"],[1,"resources"],[1,"header"],[3,"click"],["class","move-resources",4,"ngIf"],[1,"resource-table"],[1,"materials"],[1,"resource","lumber"],["src","./assets/images/fh/loot/lumber.svg"],["type","number","min","0",3,"value","change"],[1,"resource","metal"],["src","./assets/images/fh/loot/metal.svg"],[1,"resource","hide"],["src","./assets/images/fh/loot/hide.svg"],[1,"herbs"],[1,"resource","arrowvine"],["src","./assets/images/fh/loot/arrowvine.svg"],[1,"resource","axenut"],["src","./assets/images/fh/loot/axenut.svg"],[1,"resource","corpsecap"],["src","./assets/images/fh/loot/corpsecap.svg"],[1,"resource","flamefruit"],["src","./assets/images/fh/loot/flamefruit.svg"],[1,"resource","rockroot"],["src","./assets/images/fh/loot/rockroot.svg"],[1,"resource","snowthistle"],["src","./assets/images/fh/loot/snowthistle.svg"],[1,"inspiration"],["type","number",3,"value","ghs-label","ghs-label-attribute","change"],[1,"total-defense"],[1,"soldiers"],[1,"soldier-table"],["class","line",4,"ngFor","ngForOf"],[1,"morale"],[1,"grid","morale-grid"],[1,"defense"],[1,"grid","defense-grid"],[1,"section",3,"ngClass"],["src","./assets/images/fh/party/section.svg"],["src","./assets/images/checkmark.svg",4,"ngIf"],[1,"town-guard-perks"],[1,"town-guard-perks-grid"],[1,"perk-list"],["class","perk",4,"ngFor","ngForOf"],["class","warning",3,"ghs-label","ghs-label-attribute",4,"ngIf"],[1,"campaign-stickers"],[1,"header",3,"submit"],["type","text",3,"autocomplete","emptyLabel","ghs-label","ghs-label-attribute","keyup.enter"],["campaignSticker",""],["src","./assets/images/plus.svg",3,"click"],[1,"stickers"],["class","sticker",4,"ngFor","ngForOf"],[3,"party"],["class","town-guard-deck-container",3,"ngClass",4,"ngIf"],["ghs-pointer-input","",1,"week",3,"ghs-tooltip","ngClass","singleClick","doubleClick"],["class","section",4,"ngFor","ngForOf"],["class","section manual",4,"ngFor","ngForOf"],[1,"section"],[3,"src"],[1,"section","manual"],[1,"next",3,"click"],["src","./assets/images/right.svg"],[1,"move-resources"],[1,"label"],["class","character",3,"click",4,"ngFor","ngForOf"],[1,"character",3,"click"],[1,"line"],[1,"soldiers-line"],["class","soldier",3,"click",4,"ngFor","ngForOf"],[1,"soldier",3,"click"],["src","./assets/images/fh/party/soldier.svg"],[1,"check",3,"ngClass"],["src","./assets/images/checkmark.svg"],["class","checkmark",4,"ngIf"],[1,"townguard-perk","checkbox",3,"ngClass","click"],[1,"checkmark"],["src","./assets/images/close.svg"],[1,"perk"],[1,"sections"],["class","section","ghs-pointer-input","",3,"ngClass","singleClick","doubleClick",4,"ngFor","ngForOf"],[3,"perk"],["ghs-pointer-input","",1,"section",3,"ngClass","singleClick","doubleClick"],[1,"warning",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/warning.svg",1,"ghs-svg"],[1,"sticker"],["class","text",4,"ngIf"],["class","image",3,"src","title",4,"ngIf"],["src","./assets/images/minus.svg",1,"remove",3,"click"],[1,"image",3,"src","title"],[1,"town-guard-deck-container",3,"ngClass"],[1,"town-guard-deck",3,"ngClass"],[3,"deck","townGuard","before","after"],[1,"active-toggle",3,"click"],[1,"numeration"],[1,"toggle-fh-sheet",3,"click"],[1,"campaign"],[1,"campaign-mode",3,"click"],[1,"checkbox",3,"ngClass"],[3,"change"],[3,"value","selected"],[3,"selected","value",4,"ngFor","ngForOf"],[1,"row","scenarios"],[1,"scenario","header","legend","seperator"],[1,"prosperity",3,"ngClass"],[1,"legend",3,"click"],[1,"level"],["src","./assets/images/fh/prosperity.svg",4,"ngIf"],["class","check",4,"ngIf"],[1,"checklist"],["class","tick",3,"autoscroll","ngClass",4,"ngFor","ngForOf"],["class","row donations",4,"ngIf"],[1,"row"],["class","achievements",4,"ngIf"],[1,"items"],[1,"item-add"],["min","1","type","number","value","",3,"focus","keyup","keyup.enter"],["itemIndex",""],[3,"ngClass","click"],[3,"ngModel","ngModelChange","change"],["value","",3,"selected"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"item-list"],["class","item",3,"ngClass",4,"ngFor","ngForOf"],[1,"treasures"],[1,"treasures-title",3,"click"],["src","./assets/images/scenario/treasure.svg",1,"icon"],[1,"treasure-add"],["treasureIndex",""],[1,"treasure-list"],["class","treasure",3,"ngClass",4,"ngFor","ngForOf"],[1,"column"],[1,"row","players"],["class","player",4,"ngFor","ngForOf"],[1,"add",3,"click"],["class","column",4,"ngIf"],["class","row",4,"ngIf"],["class","row retirements",4,"ngIf"],[3,"selected","value"],["class","scenario seperator",4,"ngIf"],["class","scenario header",4,"ngIf"],["class","scenario",4,"ngFor","ngForOf"],[1,"scenario","unlock"],[3,"ghs-label","ghs-label-attribute","keyup","keyup.enter"],["unlockScenarioIndex",""],["unlockScenarioGroup",""],["class","scenario unlock",4,"ngIf"],[1,"scenario","seperator"],[1,"scenario","header"],[1,"span"],[1,"scenario"],[3,"ghs-label",4,"ngIf"],[1,"scenario-title",3,"ngClass","ghs-tooltip","toggable","click"],["src","./assets/images/close.svg",4,"ngIf"],["class","toggle-manual",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],["class","locked",3,"ghs-tooltip","click",4,"ngIf"],["class","rewards",3,"ghs-tooltip","click",4,"ngIf"],["ghs-pointer-input","",1,"add-success",3,"ghs-label","ghs-label-attribute","ngClass","singleClick","doubleClick"],["src","./assets/images/check.svg"],[1,"ghs-svg","solo",3,"src"],[1,"toggle-manual",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/hint.svg",1,"manual"],["src","./assets/images/close.svg",1,"remove"],[1,"locked",3,"ghs-tooltip","click"],[1,"rewards",3,"ghs-tooltip","click"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"],[1,"toggle-success",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/check.svg",1,"success"],[1,"toggle-success","casual",3,"ghs-label","ghs-label-attribute","click"],[1,"scenario-title"],["src","./assets/images/fh/puzzle.svg",1,"ghs-svg"],["unlockConclusionIndex",""],["src","./assets/images/fh/prosperity.svg"],[1,"check"],[1,"checkbox","checked","disabled"],[1,"tick",3,"autoscroll","ngClass"],["class","level",3,"click",4,"ngIf"],[1,"checkbox",3,"ngClass","click"],[1,"level",3,"click"],[1,"row","donations"],["class","tick",4,"ngFor","ngForOf"],[1,"tick"],[1,"donation"],["src","./assets/images/coin.png"],[1,"achievements"],["globalAchievementInput",""],[1,"item",3,"ngClass"],[1,"item-index","open-item",3,"click"],[1,"icon",3,"src"],[1,"index"],[1,"separator"],[1,"checkbox",3,"click"],["src","./assets/images/check.svg",1,"check"],["src","./assets/images/close.svg",1,"close"],[1,"text","open-item",3,"ghs-label","click"],[1,"count",3,"click"],["class","text edition",4,"ngIf"],[1,"text","edition"],[1,"treasure",3,"ngClass"],[1,"treasure-index"],[3,"edition","index"],[1,"player"],["type","text",3,"value","change"],[1,"row","battle-goals"],[1,"row","retirements"],[1,"list",3,"ngClass"],[1,"character","header","legend","seperator"],["class","character",4,"ngFor","ngForOf"],[1,"character"],["type","number","min","1",3,"value","change","keyup"],[1,"reactivate",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/long-rest.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,LU,65,48,"div",3),t.YNc(4,pL,129,100,"div",4),t.YNc(5,fL,2,1,"span",5),t.YNc(6,mQ,88,53,"div",6),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.VKq(6,vQ,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.party)),t.xp6(1),t.Q6J("ngClass",t.WLB(8,CQ,!i.campaign&&i.fhSheet,i.campaign)),t.xp6(1),t.Q6J("ngIf",!i.campaign&&!i.fhSheet),t.xp6(1),t.Q6J("ngIf",!i.campaign&&i.fhSheet),t.xp6(1),t.Q6J("ngIf",!i.campaign),t.xp6(1),t.Q6J("ngIf",i.campaign))},dependencies:[x.mk,x.sg,x.O5,Al,wo,ko,Ca,yi,wl,Si,Dr,vU,Kf,$f,rT,ie,An,iJ,Kt,Ba,Kd,Ii,X1],styles:['.party-sheet-dialog[_ngcontent-%COMP%]{position:relative;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .map[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));justify-content:center;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{z-index:99}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));height:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] label.headline[_ngcontent-%COMP%]{width:100%;justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] img.new-party[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] img.remove-party[_ngcontent-%COMP%]{cursor:pointer;height:1.2em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] select.select-party[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:20px;-webkit-appearance:none;appearance:none;color:transparent;border:none;background:transparent url(select-arrow.ed190f6187dac3c2.svg) no-repeat right center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));box-shadow:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor)) var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:before{content:" ";position:absolute;left:50%;top:50%;width:110%;height:110%;transform:scale(0);transform-origin:top left;transition:.12s transform ease-in-out;z-index:1;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.checked[_ngcontent-%COMP%]:before{transform:scale(1) translate(-50%,-50%)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.check[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));box-shadow:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor)) var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.check[_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));background-image:url(check.9a2e06a3b28f9de1.svg);transform-origin:bottom left}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.checked.check[_ngcontent-%COMP%]:before{transform:scale(1)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.highlight[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .checkbox.disabled[_ngcontent-%COMP%]{pointer-events:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{margin:0;color:var(--ghs-color-black);background-color:transparent;border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{margin:0;color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:100%;height:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{display:flex;border:none;background:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 24 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));overflow:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0;border:none;outline:none;flex-shrink:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .achievement[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{position:relative;display:flex;font-family:var(--ghs-font-text);align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);width:100%;min-width:0;margin:0}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-green);width:auto;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 76 * var(--ghs-dialog-factor));background-image:url(party-sheet.44d63853d27ff30a.svg);background-position:top center;background-repeat:no-repeat;background-size:contain;padding-left:calc(var(--ghs-unit) * 1.2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.column-left[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.column-right[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 17 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .location[_ngcontent-%COMP%]{display:flex;height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .notes[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 5.6 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .01 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(2,calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor)))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .key[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .key[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;justify-content:center;position:relative;font-family:var(--ghs-font-normal);height:calc(var(--ghs-unit) * 1.635 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2.1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.reputation[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;filter:var(--ghs-filter-red);z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:100%;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(1), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(1){height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6){height:calc(var(--ghs-unit) * 8.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(11), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(11){height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .reputation.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value.active[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .shop.shop[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value.active[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;height:calc(var(--ghs-unit) * 73 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));background:linear-gradient(transparent 0%,var(--ghs-color-darkgray) 100%);opacity:.2;z-index:0}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%]{display:flex;justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{width:0;height:0;margin:0;padding:0;visibility:hidden}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%] .import-export[_ngcontent-%COMP%] label.error[_ngcontent-%COMP%]{animation:shake .5s linear;color:var(--ghs-color-red)!important}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 120.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 98.5 * var(--ghs-dialog-factor));background-image:url(party-sheet.ed8405ba1054f2ed.svg)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .checkbox.checked[_ngcontent-%COMP%]:before{clip-path:none;background-color:transparent;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-top:0;display:flex;position:absolute;justify-content:space-between;top:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));left:0;width:calc(var(--ghs-unit) * 120.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-left:calc(var(--ghs-unit) * -4 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));text-transform:uppercase;flex-grow:initial}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%] .management[_ngcontent-%COMP%]{display:flex;align-items:center;font-family:var(--ghs-font-text)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%] .management[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * -1.8 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.2em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.summer[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.summer[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.summer.highlight[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.summer.highlight[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.summer.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.summer.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.winter[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.winter[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.winter.highlight[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.winter.highlight[_ngcontent-%COMP%]{color:var(--ghs-color-blue)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .summer.winter.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .winter.winter.highlight[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-blue)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 6.3 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 118.9 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 18.7 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(20,1fr)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%]{position:relative;cursor:pointer;width:calc(var(--ghs-unit) * 5.9 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.6 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week.checked[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:10%;left:10%;width:80%;height:80%;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week.section.checked[_ngcontent-%COMP%]:after{top:initial;bottom:0;left:20%;width:60%;height:60%;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));z-index:2;color:var(--ghs-color-darkgray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.2em;width:auto;margin-right:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section.manual[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);color:var(--ghs-color-black)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .week[_ngcontent-%COMP%] .section.manual[_ngcontent-%COMP%] .manual-icon[_ngcontent-%COMP%]{height:.9em;width:auto;margin-right:0;margin-left:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;right:0;top:calc(var(--ghs-unit) * -3.5 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .next[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-left:.2em}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 26.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 59 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-top:0;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex:1 1 auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 32 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 61 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .move-resources[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%]{display:flex;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));min-width:0;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .materials[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr;padding-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-table[_ngcontent-%COMP%] .herbs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 51 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 20 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21 * var(--ghs-dialog-factor));margin-top:0;display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center;align-self:center;font-size:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration.total-defense[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense.total-defense[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 24 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .inspiration.total-defense[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .total-defense.total-defense[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 51 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 46 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 15 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21 * var(--ghs-dialog-factor));margin-top:0;display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * -.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;flex-direction:column;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) dashed var(--ghs-color-black);border-radius:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .soldiers[_ngcontent-%COMP%] .soldier-table[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .soldiers-line[_ngcontent-%COMP%] .soldier[_ngcontent-%COMP%] .check.checked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:10%;left:10%;width:80%;height:80%;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 26.5 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 64 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 10.8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 43.2 * var(--ghs-dialog-factor));display:flex;flex-direction:column;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale.defense[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense.defense[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 75.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:relative;cursor:pointer;display:flex;justify-content:center;align-items:center;width:100%;height:calc(var(--ghs-unit) * 1.92 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.morale-grid[_ngcontent-%COMP%] .value.checked[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * -.2 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));background-image:url(checkmark.437dd8c56b3be0e8.svg);z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;width:100%;height:calc(var(--ghs-unit) * 1.92 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:calc(var(--ghs-unit) * 5.7 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(2), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(2){height:calc(var(--ghs-unit) * 11.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(7), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid.defense-grid[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]:nth-child(7){height:calc(var(--ghs-unit) * 3.9 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .morale[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .highlight[_ngcontent-%COMP%]:after, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .defense[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .highlight[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;opacity:.3;background-color:var(--ghs-color-gray);z-index:-1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 26.2 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 90 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 72 * var(--ghs-dialog-factor));flex-direction:column;display:flex;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(12,1fr);align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%] .town-guard-perk[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .town-guard-perks-grid[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 54.5 * var(--ghs-dialog-factor));overflow-y:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%]{display:grid;grid-template-columns:calc(var(--ghs-unit) * 6.2 * var(--ghs-dialog-factor)) auto;margin-bottom:calc(var(--ghs-unit) * .57 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;margin-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.4 * var(--ghs-dialog-factor));background-color:var(--ghs-color-white)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:.9em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover{background-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.disabled[_ngcontent-%COMP%]{pointer-events:initial;cursor:not-allowed;border-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.disabled[_ngcontent-%COMP%]:hover{background-color:transparent}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-perks[_ngcontent-%COMP%] .perk-list[_ngcontent-%COMP%] .perk[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.checked[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:10%;left:calc(var(--ghs-unit) * -1.2 * var(--ghs-dialog-factor));width:80%;height:80%;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 70.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 86.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor));flex-direction:column;display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;height:1.2em;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:0;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;width:100%;height:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor));overflow-y:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%]{position:relative;height:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{height:100%;width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:0;right:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .campaign-stickers[_ngcontent-%COMP%] .stickers[_ngcontent-%COMP%] .sticker[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.5}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%]{position:absolute;z-index:3;left:calc(var(--ghs-unit) * 115 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));height:0;transition:top .5s ease-in-out,width .5s ease-in-out,left .5s ease-in-out;overflow:visible}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%]:before{content:" ";position:sticky;display:block;top:0;left:0;width:calc(var(--ghs-unit) * 119.5 * var(--ghs-dialog-factor));height:0;background-color:var(--ghs-color-darkgray);opacity:0;transition:opacity .5s ease-in-out,height .5s ease-in-out;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container.active[_ngcontent-%COMP%]{z-index:3;top:calc(var(--ghs-unit) * 6.3 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 119.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));overflow:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container.active[_ngcontent-%COMP%]:before{height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));opacity:.5}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 37.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));transition:transform .5s ease-in-out;z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * -2.5 * var(--ghs-dialog-factor));bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);border-radius:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{position:relative;z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck.full[_ngcontent-%COMP%]{transform:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck.collapsed[_ngcontent-%COMP%]{transform:translate(123%)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]{cursor:pointer;position:absolute;left:calc(var(--ghs-unit) * -5.5 * var(--ghs-dialog-factor) * var(--ghs-barsize));top:50%;transform:translateY(-50%);width:13%;height:50%;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:hover{filter:brightness(.7) grayscale(.3)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:active, .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:focus{filter:none}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] .town-guard-deck-container[_ngcontent-%COMP%] .town-guard-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%] .numeration[_ngcontent-%COMP%]{font-family:ghs-title;display:flex;justify-content:center;position:absolute;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor) * var(--ghs-barsize));line-height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor) * var(--ghs-barsize));width:100%;height:100%;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(icon.5a11343c46ebf913.png)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .sheet.fh-sheet[_ngcontent-%COMP%] ghs-party-buildings[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * 101.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 118.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.fh-container[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 120.5 * var(--ghs-dialog-factor));overflow-x:hidden}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .toggle-fh-sheet[_ngcontent-%COMP%]{cursor:pointer;position:relative;bottom:0;left:49%;transform:translate(-50%);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;height:100%;color:var(--ghs-color-red);flex-basis:0}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip.warning[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning.warning[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .wip.warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .warning.warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%]{width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{justify-content:space-between}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .campaign-mode[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .campaign-mode[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow-y:auto;max-height:30vh}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:.3fr .7fr 2fr 1fr;text-align:left;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.header[_ngcontent-%COMP%]{font-weight:700;border-bottom:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.header.legend[_ngcontent-%COMP%]{position:sticky;top:0;background-color:var(--ghs-color-white);z-index:1;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.header.legend[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(4){justify-content:flex-start}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]:not(.header):nth-child(odd):before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ghs-color-gray);opacity:.35;z-index:-1}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1/span 4;text-align:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .scenario-title[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .blocked[_ngcontent-%COMP%]{text-decoration:line-through}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .blocked[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.seperator[_ngcontent-%COMP%]{border-bottom:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] img.ghs-svg.solo[_ngcontent-%COMP%]{filter:none;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%] img.manual[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%] img.remove[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow);height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%]:hover img.remove[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-manual[_ngcontent-%COMP%]:hover img.manual[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .locked[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto;filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%] img.success[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));filter:var(--ghs-filter-green)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%] img.remove[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red) var(--ghs-filter-shadow);display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success.casual[_ngcontent-%COMP%] img.success[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success.casual[_ngcontent-%COMP%] img.remove[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%]:hover img.remove[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .toggle-success[_ngcontent-%COMP%]:hover img.success[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success[_ngcontent-%COMP%]{position:relative;cursor:pointer;border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none;position:absolute}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success.disabled[_ngcontent-%COMP%]{pointer-events:initial;cursor:not-allowed;border-color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .add-success.disabled[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%]{display:flex;align-items:center;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.4 * var(--ghs-dialog-factor));width:auto;margin:0 calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);outline:none;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:0;flex-grow:1}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .addScenario[_ngcontent-%COMP%]{color:var(--ghs-color-black);cursor:pointer;display:flex;justify-content:flex-end;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .addScenario[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .scenarios[_ngcontent-%COMP%] .scenario.unlock[_ngcontent-%COMP%] .addScenario[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%]{display:flex;flex-direction:column}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{padding-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));border-right:2px solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex-grow:1;font-size:1em;line-height:.7em;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .player[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-black);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .add[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .players[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .battle-goals[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-black);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow-y:auto;max-height:30vh}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:1fr 2fr 1.8fr 1fr 1fr .5fr;text-align:left;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.header[_ngcontent-%COMP%]{font-weight:700;border-bottom:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.header.legend[_ngcontent-%COMP%]{position:sticky;top:0;background-color:var(--ghs-color-white);z-index:1;padding:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.header.legend[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1/span 4;text-align:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center;border:none;outline:none;min-width:0}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character.seperator[_ngcontent-%COMP%]{border-bottom:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;align-items:center;padding:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:not(.separator) > span[_ngcontent-%COMP%]{border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);border-right:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:none;height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(5), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(6), .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(7){justify-content:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .reactivate[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .retirements[_ngcontent-%COMP%] .list.fh-sheet[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{grid-template-columns:1fr 2fr 1.8fr 1fr 1fr 1.4fr .5fr}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{height:auto;display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasures-title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%]{height:auto;width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .achievements[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .achievements-container[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{width:initial}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:grid;grid-template-columns:.5fr .2fr 2fr;border-bottom:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);width:100%;min-width:0;margin:0;text-align:right}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-green);width:auto;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-add[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%]{overflow-y:auto;font-size:.9em}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{display:grid;grid-template-columns:.3fr .2fr .2fr 2fr .2fr;align-items:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item.edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure.edition[_ngcontent-%COMP%]{grid-template-columns:.3fr .2fr .2fr 2fr .2fr 1fr}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:.9em;justify-self:end}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;justify-self:initial}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .item-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .treasure-index.treasure-index[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]{cursor:pointer}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .open-item[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{cursor:crosshair;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));text-align:center}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]:hover{opacity:.7}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{text-align:right}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:.9em;justify-self:start}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;justify-self:start;position:relative;border:calc(var(--ghs-unit) * .05 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{top:0;left:calc(var(--ghs-unit) * -.8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red);display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover, .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover{border:none;box-shadow:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .check[_ngcontent-%COMP%]{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]:hover .close[_ngcontent-%COMP%]{display:inline-block}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .treasure-list[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:.9em;justify-self:start;white-space:nowrap;overflow-x:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));max-width:100%;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;width:calc(var(--ghs-unit) * 12 * var(--ghs-dialog-factor));height:100%;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{display:flex;height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]{display:flex;align-items:flex-end;height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-start}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .legend[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%]{position:relative}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%]:not(:first-child){margin-left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);box-shadow:none;z-index:1}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));font-family:var(--ghs-font-normal);position:absolute;top:0;left:0;right:0;z-index:2}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick.large[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .prosperity.fh[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .tick.large[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{margin-bottom:calc(var(--ghs-unit) * -.3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .donation[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 6.2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6.2 * var(--ghs-dialog-factor));overflow:hidden}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .donation[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{position:absolute;left:0;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .container.campaign-container[_ngcontent-%COMP%] .campaign[_ngcontent-%COMP%] .donations[_ngcontent-%COMP%] .checklist[_ngcontent-%COMP%] .donation[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor));width:100%;height:100%;z-index:-1}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100%}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin-left:calc(var(--ghs-unit) * -4 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.4 * var(--ghs-dialog-factor));text-transform:uppercase;flex-basis:initial}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.party-sheet-dialog[_ngcontent-%COMP%] .buildings[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .campaign-toggle[_ngcontent-%COMP%] *[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .export[_ngcontent-%COMP%], .party-sheet-dialog[_ngcontent-%COMP%] .scroll-container.denied[_ngcontent-%COMP%] .export[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{pointer-events:initial}']})),a})();function MQ(o,a){1&o&&t._UZ(0,"span",16),2&o&&t.Q6J("ghs-label","game.items.shop")}const Iw=function(o,a){return[o,a]};function OQ(o,a){if(1&o&&t._UZ(0,"span",17),2&o){const n=t.oxw();t.Q6J("ghs-label","game.items.shop.character")("ghs-label-args",t.WLB(2,Iw,n.character.name,n.gameManager.characterManager.characterName(n.character)))}}function PQ(o,a){if(1&o&&(t.TgZ(0,"span",32),t._UZ(1,"img",33),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.lumber," ")}}function yQ(o,a){if(1&o&&(t.TgZ(0,"span",34),t._UZ(1,"img",35),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.metal," ")}}function bQ(o,a){if(1&o&&(t.TgZ(0,"span",36),t._UZ(1,"img",37),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.hide," ")}}function xQ(o,a){if(1&o&&(t.TgZ(0,"span",38),t._UZ(1,"img",39),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.arrowvine," ")}}function wQ(o,a){if(1&o&&(t.TgZ(0,"span",40),t._UZ(1,"img",41),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.axenut," ")}}function kQ(o,a){if(1&o&&(t.TgZ(0,"span",42),t._UZ(1,"img",43),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.corpsecap," ")}}function TQ(o,a){if(1&o&&(t.TgZ(0,"span",44),t._UZ(1,"img",45),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.flamefruit," ")}}function ZQ(o,a){if(1&o&&(t.TgZ(0,"span",46),t._UZ(1,"img",47),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.rockroot," ")}}function AQ(o,a){if(1&o&&(t.TgZ(0,"span",48),t._UZ(1,"img",49),t._uU(2),t.qZA()),2&o){const n=t.oxw(3);t.xp6(2),t.hij(" ",n.character.progress.loot.snowthistle," ")}}function SQ(o,a){if(1&o&&(t.TgZ(0,"div",22),t.YNc(1,PQ,3,1,"span",23),t.YNc(2,yQ,3,1,"span",24),t.YNc(3,bQ,3,1,"span",25),t.YNc(4,xQ,3,1,"span",26),t.YNc(5,wQ,3,1,"span",27),t.YNc(6,kQ,3,1,"span",28),t.YNc(7,TQ,3,1,"span",29),t.YNc(8,ZQ,3,1,"span",30),t.YNc(9,AQ,3,1,"span",31),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.lumber),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.metal),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.hide),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.arrowvine),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.axenut),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.corpsecap),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.flamefruit),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.rockroot),t.xp6(1),t.Q6J("ngIf",n.character.progress.loot.snowthistle)}}function EQ(o,a){if(1&o&&(t.TgZ(0,"div",18)(1,"span",19),t._UZ(2,"img",20),t._uU(3),t.qZA(),t.YNc(4,SQ,10,9,"div",21),t.qZA()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("src","./assets/images/"+(n.settingsManager.settings.fhStyle?"fh/":"")+"loot.svg",t.LSH),t.xp6(1),t.Oqu(n.character.progress.gold),t.xp6(1),t.Q6J("ngIf",n.gameManager.fhRules())}}function DQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",9),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.affordable=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update(!0))}),t.qZA(),t._UZ(2,"span",10),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.affordable),t.xp6(1),t.Q6J("ghs-label","game.items.filter.affordable")}}function IQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",9),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.sorted=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update(!0))}),t.qZA(),t._UZ(2,"span",10),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.sorted),t.xp6(1),t.Q6J("ghs-label","game.items.filter.sorted")}}const dT=function(o){return{disabled:o}};function NQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",52)(1,"input",53),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setEdition(s))}),t.qZA(),t._UZ(2,"span",10),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(3,dT,e.currentEdition==n)),t.xp6(1),t.Q6J("checked",e.currentEdition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function JQ(o,a){if(1&o&&(t.TgZ(0,"div",50),t.YNc(1,NQ,3,5,"label",51),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.editions)}}const hT=function(o){return[o]},uT=function(){return[]};function UQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.addItem(i.selected,!0))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items.add")("ghs-label-args",n.selected?t.VKq(2,hT,n.selected.name):t.DdM(4,uT))}}function LQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",60),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(!!i.selected&&(i.selected.cost?i.buyItem(i.selected):i.craftItem(i.selected)))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(3,dT,!n.selected||!n.gameManager.itemManager.canBuy(n.selected,n.character)&&!n.gameManager.itemManager.canCraft(n.selected,n.character)))("ghs-label","game.items."+(n.selected?n.selected.cost?"buy":"craft":"choose"))("ghs-label-args",n.selected?t.WLB(5,Iw,n.selected.name,""+(n.selected.cost+n.gameManager.itemManager.pricerModifier())):t.DdM(8,uT))}}function QQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.removeItem(i.selected))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items.remove")("ghs-label-args",t.VKq(2,hT,n.selected.name))}}function RQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",61),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.sellItem(i.selected))}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items.sell")("ghs-label-args",t.WLB(2,Iw,n.selected.name,""+n.gameManager.itemManager.itemSellValue(n.selected)))}}function FQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",54)(1,"a",55),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t.qZA(),t.YNc(2,UQ,1,5,"a",56),t.YNc(3,LQ,1,9,"a",57),t.YNc(4,QQ,1,4,"a",56),t.YNc(5,RQ,1,5,"a",58),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngIf",n.selected&&!n.gameManager.itemManager.owned(n.selected,n.character)),t.xp6(1),t.Q6J("ngIf",!n.selected||!n.gameManager.itemManager.owned(n.selected,n.character)),t.xp6(1),t.Q6J("ngIf",n.selected&&n.gameManager.itemManager.owned(n.selected,n.character)),t.xp6(1),t.Q6J("ngIf",n.selected&&n.gameManager.itemManager.owned(n.selected,n.character))}}function qQ(o,a){1&o&&(t.TgZ(0,"div",14)(1,"div",62),t._UZ(2,"span",10),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","game.items.empty"))}const HQ=function(o,a,n,e,i){return{selected:o,disabled:a,filtered:n,unavailable:e,owned:i}};function jQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-item",68),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.select(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.select(i,!0))}),t.qZA()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.Q6J("item",e)("flipped",!0)("count",s.character?s.itemsMeta[i].countAvailable<1?"-":s.itemsMeta[i].assigned+1:1)("editionLabel",s.currentEdition)("ngClass",t.qbA(5,HQ,e==s.selected,!s.character,!s.itemsMeta[i].canAdd,!s.itemsMeta[i].canBuy&&!s.itemsMeta[i].canCraft,s.itemsMeta[i].owned))}}function BQ(o,a){if(1&o&&t._UZ(0,"ghs-item",69),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.Q6J("item",e)("flipped",!0)("count",s.character?s.itemsMeta[i].countAvailable<1?"-":s.itemsMeta[i].assigned+1:1)("editionLabel",s.currentEdition)}}function zQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",70),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.removeUnlocked(i))}),t._UZ(1,"img",71),t.qZA()}}const GQ=function(o){return{equipped:o}};function VQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",72),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEquippedItem(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEquippedItem(i,!0))}),t._UZ(1,"img",73),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(1,GQ,e.gameManager.itemManager.isEquipped(n,e.character)))}}function YQ(o,a){if(1&o&&(t.TgZ(0,"div",63),t.YNc(1,jQ,1,11,"ghs-item",64),t.YNc(2,BQ,1,4,"ghs-item",65),t.YNc(3,zQ,2,0,"a",66),t.YNc(4,VQ,2,3,"a",67),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.character),t.xp6(1),t.Q6J("ngIf",!e.character||!e.select),t.xp6(1),t.Q6J("ngIf",!e.all&&e.unlocked(n)),t.xp6(1),t.Q6J("ngIf",e.character&&e.gameManager.itemManager.owned(n,e.character))}}function KQ(o,a){1&o&&t._UZ(0,"span",76),2&o&&t.Q6J("ghs-label","game.items.unlock")}function $Q(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",70),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.removeUnlocked(i))}),t._UZ(1,"img",71),t.qZA()}}function WQ(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",63)(1,"ghs-item",74),t.NdJ("revealed",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.unlockItemReveal(l,i))}),t.qZA(),t.YNc(2,KQ,1,1,"span",75),t.YNc(3,$Q,2,0,"a",66),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("item",n)("reveal",!0)("flipped",e.unlocked(n))("editionLabel",e.currentEdition),t.xp6(1),t.Q6J("ngIf",!e.unlocked(n)),t.xp6(1),t.Q6J("ngIf",!e.all&&e.unlocked(n))}}const XQ=function(o,a){return{fh:o,modern:a}};let tm=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"currentEdition",void 0),(0,_.Z)(this,"editions",void 0),(0,_.Z)(this,"editionItems",[]),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"itemsMeta",[]),(0,_.Z)(this,"selected",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"filter",""),(0,_.Z)(this,"all",!1),(0,_.Z)(this,"affordable",!1),(0,_.Z)(this,"sorted",!1),(0,_.Z)(this,"unlocks",[]),(0,_.Z)(this,"campaignMode",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.data=e,this.dialogRef=i,this.selected=void 0,this.character=e.select,this.sorted=null!=this.character&&this.character.progress.items.length>0,this.edition=e.edition,this.affordable=e.affordable||!1,this.campaignMode=this.edition&&d.v.game.party.campaignMode||!1,this.editions=this.edition?d.v.itemManager.itemEditions(this.edition):d.v.itemManager.itemEditions(),this.all=null==this.edition,this.currentEdition=this.edition||this.editions[0]}ngOnInit(){this.updateEditionItems(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}setEdition(e){this.currentEdition=e,this.updateEditionItems()}updateEditionItems(){this.editions=this.all?d.v.itemManager.itemEditions():this.edition&&!this.campaignMode?d.v.itemManager.itemEditions(this.edition):[],-1==this.editions.indexOf(this.currentEdition)&&(this.currentEdition=this.edition||this.editions[0]),this.editionItems=this.edition&&this.campaignMode&&!this.all?d.v.itemManager.getItems(this.edition):d.v.itemManager.getItems(this.currentEdition,this.all).filter(e=>e.edition==this.currentEdition),this.all&&(this.sorted=!1),this.update()}update(e=!1){this.unlocks=[],this.selected=void 0,this.items=this.editionItems.filter(i=>!this.affordable||d.v.itemManager.assigned(i)!this.affordable||this.character&&d.v.itemManager.canAdd(i,this.character)&&(d.v.itemManager.canBuy(i,this.character)||d.v.itemManager.canCraft(i,this.character))),this.character&&this.edition&&this.campaignMode&&!this.all&&!this.affordable&&this.character.progress.items.forEach(i=>{if(i.edition==this.edition&&!this.items.find(s=>s.id==+i.name&&s.edition==i.edition)){const s=d.v.itemManager.getItem(+i.name,i.edition,!0);s&&this.items.push(s)}}),this.items=this.items.filter(i=>!this.filter||(0,he.eL)(i.name,this.filter)||(0,he.eL)((i.id<100?"0":"")+(i.id<10?"0":"")+i.id,this.filter)),this.campaignMode&&this.edition&&!this.all&&!this.affordable&&(this.unlocks=d.v.itemManager.getItems(this.edition,!0).filter(i=>(""+i.id==this.filter||"0"+i.id==this.filter||"00"+i.id==this.filter)&&!this.items.find(s=>s.id==i.id&&s.edition==i.edition))),!e&&this.affordable&&0==this.items.length?(this.affordable=!1,this.sorted=null!=this.character&&this.character.progress.items.length>0,this.update()):this.items.sort((i,s)=>{if(this.sorted){if(this.character){if(d.v.itemManager.owned(i,this.character)&&!d.v.itemManager.owned(s,this.character))return-1;if(d.v.itemManager.owned(s,this.character)&&!d.v.itemManager.owned(i,this.character))return 1;if((d.v.itemManager.canBuy(i,this.character)||d.v.itemManager.canCraft(i,this.character))&&!d.v.itemManager.canBuy(s,this.character)&&!d.v.itemManager.canCraft(s,this.character))return-1;if((d.v.itemManager.canBuy(s,this.character)||d.v.itemManager.canCraft(s,this.character))&&!d.v.itemManager.canBuy(i,this.character)&&!d.v.itemManager.canCraft(i,this.character))return 1;if(d.v.itemManager.canAdd(i,this.character)&&!d.v.itemManager.canAdd(s,this.character))return-1;if(d.v.itemManager.canAdd(s,this.character)&&!d.v.itemManager.canAdd(i,this.character))return 1;if(i.slot&&!s.slot)return-1;if(s.slot&&!i.slot)return 1}return i.slot&&s.slot?Object.values(Ni.SE).indexOf(i.slot)-Object.values(Ni.SE).indexOf(s.slot):0}return i.edition!=s.edition?i.edition==this.currentEdition?-1:1:i.id-s.id}),this.character&&(this.itemsMeta=[],this.items.forEach(i=>{this.character&&this.itemsMeta.push({canAdd:d.v.itemManager.canAdd(i,this.character),canBuy:d.v.itemManager.canBuy(i,this.character),canCraft:d.v.itemManager.canCraft(i,this.character),owned:d.v.itemManager.owned(i,this.character),assigned:d.v.itemManager.assigned(i),countAvailable:d.v.itemManager.countAvailable(i)})}))}select(e,i=!1){this.data.select&&(this.selected=this.selected!=e&&(i||this.character&&(d.v.itemManager.owned(e,this.character)||d.v.itemManager.canAdd(e,this.character)&&(d.v.itemManager.canBuy(e,this.character)||d.v.itemManager.canCraft(e,this.character))))?e:void 0)}unlocked(e){return d.v.game.party.unlockedItems&&null!=d.v.game.party.unlockedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}unlockItemReveal(e,i){-1!=this.unlocks.indexOf(e)&&i&&(d.v.game.party.unlockedItems=d.v.game.party.unlockedItems||[],this.unlocked(e)||(d.v.stateManager.before("addUnlockedItem",e.edition,""+e.id,e.name),d.v.game.party.unlockedItems.push(new Vn.Jc(""+e.id,e.edition)),d.v.stateManager.after(),this.updateEditionItems()))}removeUnlocked(e){this.unlocked(e)&&(d.v.stateManager.before("removeUnlockedItem",e.edition,""+e.id,e.name),d.v.game.party.unlockedItems=d.v.game.party.unlockedItems||[],d.v.game.party.unlockedItems=d.v.game.party.unlockedItems.filter(i=>i.name!=""+e.id||i.edition!=e.edition),d.v.stateManager.after(),this.updateEditionItems())}addItem(e,i=!1){this.character&&(d.v.itemManager.canAdd(e,this.character)||i)&&(d.v.stateManager.before("addItem","data.character."+this.character.name,e.id+"",e.edition),d.v.itemManager.addItem(e,this.character),d.v.stateManager.after(),this.update())}buyItem(e){this.character&&d.v.itemManager.canBuy(e,this.character)&&(d.v.stateManager.before("buyItem","data.character."+this.character.name,e.id+"",e.edition),d.v.itemManager.buyItem(e,this.character),d.v.stateManager.after(),this.update())}craftItem(e){this.character&&d.v.itemManager.canCraft(e,this.character)&&(d.v.stateManager.before("craftItem","data.character."+this.character.name,e.id+"",e.edition),d.v.itemManager.craftItem(e,this.character),d.v.stateManager.after(),this.update())}removeItem(e){const i=this.character&&this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(i&&this.character){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("removeItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),d.v.itemManager.removeItem(e,this.character),d.v.stateManager.after(),this.update()}}sellItem(e){const i=this.character&&this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(this.character&&i&&d.v.itemManager.itemSellValue(e)){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("sellItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),d.v.itemManager.sellItem(e,this.character),d.v.stateManager.after(),this.update()}}toggleEquippedItem(e,i=!1){if(this.character&&(!(d.v.game.state!=ge.D2.draw||d.v.game.round>0)||i)){const m=this.character.progress.equippedItems.map(O=>this.items.find(k=>O.name==""+k.id&&k.edition==O.edition)).filter(O=>O).map(O=>O).indexOf(e);d.v.stateManager.before(-1!=m?"unequipItem":"equipItem","data.character."+this.character.name,e.name,e.edition),d.v.itemManager.toggleEquippedItem(e,this.character,i),d.v.stateManager.after()}}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-items-dialog"]],decls:21,vars:19,consts:[[1,"items-dialog",3,"ngClass"],[1,"scroll-container"],[1,"header"],["class","title",3,"ghs-label",4,"ngIf"],["class","title",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","resources",4,"ngIf"],[1,"filter"],["type","text",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","keyup"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange","change"],[3,"ghs-label"],["class","editions",4,"ngIf"],["class","menu",4,"ngIf"],["class","item-list",4,"ngIf"],[1,"item-list"],["class","item",4,"ngFor","ngForOf"],[1,"title",3,"ghs-label"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"resources"],[1,"resource","gold"],[3,"src"],["class","resource-grid",4,"ngIf"],[1,"resource-grid"],["class","resource lumber",4,"ngIf"],["class","resource metal",4,"ngIf"],["class","resource hide",4,"ngIf"],["class","resource arrowvine",4,"ngIf"],["class","resource axenut",4,"ngIf"],["class","resource corpsecap",4,"ngIf"],["class","resource flamefruit",4,"ngIf"],["class","resource rockroot",4,"ngIf"],["class","resource snowthistle",4,"ngIf"],[1,"resource","lumber"],["src","./assets/images/fh/loot/lumber.svg"],[1,"resource","metal"],["src","./assets/images/fh/loot/metal.svg"],[1,"resource","hide"],["src","./assets/images/fh/loot/hide.svg"],[1,"resource","arrowvine"],["src","./assets/images/fh/loot/arrowvine.svg"],[1,"resource","axenut"],["src","./assets/images/fh/loot/axenut.svg"],[1,"resource","corpsecap"],["src","./assets/images/fh/loot/corpsecap.svg"],[1,"resource","flamefruit"],["src","./assets/images/fh/loot/flamefruit.svg"],[1,"resource","rockroot"],["src","./assets/images/fh/loot/rockroot.svg"],[1,"resource","snowthistle"],["src","./assets/images/fh/loot/snowthistle.svg"],[1,"editions"],["class","edition",3,"ngClass",4,"ngFor","ngForOf"],[1,"edition",3,"ngClass"],["type","checkbox",3,"checked","change"],[1,"menu"],[1,"cancel",3,"ghs-label","click"],["class","secondary",3,"ghs-label","ghs-label-args","click",4,"ngIf"],["class","primary",3,"ngClass","ghs-label","ghs-label-args","click",4,"ngIf"],["class","primary",3,"ghs-label","ghs-label-args","click",4,"ngIf"],[1,"secondary",3,"ghs-label","ghs-label-args","click"],[1,"primary",3,"ngClass","ghs-label","ghs-label-args","click"],[1,"primary",3,"ghs-label","ghs-label-args","click"],[1,"empty"],[1,"item"],["ghs-pointer-input","",3,"item","flipped","count","editionLabel","ngClass","singleClick","doubleClick",4,"ngIf"],[3,"item","flipped","count","editionLabel",4,"ngIf"],["class","button-remove",3,"click",4,"ngIf"],["class","button-equip","ghs-pointer-input","",3,"ngClass","singleClick","doubleClick",4,"ngIf"],["ghs-pointer-input","",3,"item","flipped","count","editionLabel","ngClass","singleClick","doubleClick"],[3,"item","flipped","count","editionLabel"],[1,"button-remove",3,"click"],["src","./assets/images/minus.svg",1,"ghs-svg"],["ghs-pointer-input","",1,"button-equip",3,"ngClass","singleClick","doubleClick"],["src","./assets/images/check.svg",1,"ghs-svg"],[3,"item","reveal","flipped","editionLabel","revealed"],["class","overlay-text",3,"ghs-label",4,"ngIf"],[1,"overlay-text",3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,MQ,1,1,"span",3),t.YNc(4,OQ,1,5,"span",4),t.YNc(5,EQ,5,3,"div",5),t.TgZ(6,"div",6)(7,"input",7),t.NdJ("ngModelChange",function(l){return i.filter=l})("keyup",function(){return i.update()}),t.qZA(),t.YNc(8,DQ,3,2,"label",8),t.YNc(9,IQ,3,2,"label",8),t.TgZ(10,"label")(11,"input",9),t.NdJ("ngModelChange",function(l){return i.all=l})("change",function(){return i.updateEditionItems()}),t.qZA(),t._uU(12," <"),t._UZ(13,"span",10),t._uU(14,"(!)> "),t.qZA()(),t.YNc(15,JQ,2,1,"div",11),t.qZA(),t.YNc(16,FQ,6,5,"div",12),t.YNc(17,qQ,3,1,"div",13),t.TgZ(18,"div",14),t.YNc(19,YQ,5,4,"div",15),t.YNc(20,WQ,4,6,"div",15),t.qZA()()()),2&e&&(t.Q6J("ngClass",t.WLB(16,XQ,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ngIf",!i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(2),t.Q6J("ngModel",i.filter)("ghs-label","game.items.filter")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(2),t.Q6J("ngModel",i.all),t.xp6(2),t.Q6J("ghs-label","game.items.filter.all"),t.xp6(2),t.Q6J("ngIf",i.editions&&i.editions.length>1),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",0==i.items.length&&0==i.unlocks.length),t.xp6(2),t.Q6J("ngForOf",i.items),t.xp6(1),t.Q6J("ngForOf",i.unlocks))},dependencies:[x.mk,x.sg,x.O5,Ho,va,yi,Si,Xd,ie,An],styles:[".items-dialog[_ngcontent-%COMP%]{position:relative}.items-dialog[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{overflow-x:hidden;max-height:calc(90vh - var(--ghs-unit) * 6)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-white);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:.25em;height:1.2em;width:auto;filter:var(--ghs-filter-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource.gold[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .resources[_ngcontent-%COMP%] .resource-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center;z-index:1}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{max-width:100%;min-width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-white);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition.disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{position:sticky;top:0;left:0;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));max-width:100%;display:flex;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:center;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:10}.items-dialog[_ngcontent-%COMP%] .menu.small[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor)) 0;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center;margin:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.primary[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.secondary[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}@media (max-width: 600px),(orientation: portrait){.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{flex-direction:column-reverse;height:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{min-width:initial}}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{position:relative;display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;border:calc(var(--ghs-unit) * .35 * var(--ghs-dialog-factor)) solid transparent;border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));overflow:hidden;cursor:pointer}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.disabled[_ngcontent-%COMP%]{cursor:initial;opacity:.5}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.unavailable[_ngcontent-%COMP%]{cursor:not-allowed;border-color:var(--ghs-color-red)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.filtered[_ngcontent-%COMP%]{cursor:initial;border-color:var(--ghs-color-darkgray);filter:grayscale(.3)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.owned[_ngcontent-%COMP%]{border-color:var(--ghs-color-blue)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item.selected[_ngcontent-%COMP%]{border-color:var(--ghs-color-green)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .overlay-text[_ngcontent-%COMP%]{cursor:pointer;z-index:1;position:absolute;display:flex;justify-content:center;align-items:center;top:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));width:100%;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-darkgray)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;bottom:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * 11.8 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));opacity:.6}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:100%;height:auto;filter:var(--ghs-filter-white)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip.equipped[_ngcontent-%COMP%]{opacity:1}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip.equipped[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]:hover{opacity:.6}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .button-equip[_ngcontent-%COMP%]:hover.equipped .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red)}@media (max-width: 600px),(orientation: portrait){.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.items-dialog.fh[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.items-dialog.modern[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}"]})),a})();const qO=function(o){return{disabled:o}};function tR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"label",17)(2,"input",2),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setEdition(s))}),t.qZA(),t._UZ(3,"span",3),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(3,qO,e.gameManager.game.edition==n)),t.xp6(1),t.Q6J("checked",e.gameManager.game.edition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function eR(o,a){1&o&&(t.TgZ(0,"div",10)(1,"label"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","campaign"))}function nR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openPartySheet())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.party"))}function iR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openCampaignSheet())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.sheet"))}function oR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openMap())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.map"))}function aR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openItems())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.items"))}function sR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openBattleGoalsSetup())}),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("ghs-label","campaign.battleGoals"))}function rR(o,a){1&o&&(t.TgZ(0,"div",10)(1,"label"),t._UZ(2,"span",3),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","campaign.character"))}function cR(o,a){if(1&o&&(t.TgZ(0,"span",22),t._uU(1,"\xa0 "),t.TgZ(2,"span"),t._uU(3,"["),t.qZA(),t._UZ(4,"span",3),t.TgZ(5,"span"),t._uU(6,"]"),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(4),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function lR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"a",19),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.openCharacterSheet(s))}),t._UZ(2,"img",20),t.TgZ(3,"span"),t._uU(4),t.qZA(),t.YNc(5,cR,7,1,"span",21),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Oqu(e.gameManager.characterManager.characterName(n,!0)),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function gR(o,a){if(1&o&&(t.ynx(0),t.YNc(1,lR,6,3,"div",4),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.characters)}}const _T=function(o,a){return{disabled:o,active:a}};function dR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",23)(1,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s.name))}),t._UZ(2,"img",25),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.WLB(7,_T,-1!=e.editionConditions.indexOf(n.name),-1==e.editionConditions.indexOf(n.name)&&-1!=e.gameManager.game.conditions.indexOf(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH)}}function hR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",23)(1,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCondition(s.name))}),t._UZ(2,"img",25),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-tooltip","game.condition."+n.name+".hint")("originX","center")("overlayX","center")("originY","top")("overlayY","bottom")("ngClass",t.WLB(7,_T,-1!=e.editionConditions.indexOf(n.name),-1==e.editionConditions.indexOf(n.name)&&-1!=e.gameManager.game.conditions.indexOf(n.name))),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH)}}function uR(o,a){1&o&&(t.ynx(0),t._UZ(1,"img",26),t.TgZ(2,"span",27),t._UZ(3,"span",28),t.qZA(),t.BQk()),2&o&&(t.xp6(3),t.Q6J("ghs-label","campaign.campaignManagement.hint"))}function _R(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Oqu(n.name)}}function pR(o,a){if(1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",3),t._uU(2),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ghs-label","party.campaign"),t.xp6(1),t.hij("\xa0",n.id,"")}}function fR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",17)(1,"input",2),t.NdJ("change",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.changeParty(i))}),t.qZA(),t.YNc(2,_R,2,1,"span",9),t.YNc(3,pR,3,2,"span",9),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(4,qO,1==e.gameManager.game.parties.length||e.gameManager.game.scenario)),t.xp6(1),t.Q6J("checked",e.gameManager.game.party==n),t.xp6(1),t.Q6J("ngIf",n.name),t.xp6(1),t.Q6J("ngIf",!n.name)}}const mR=function(o){return[o]};function vR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label"),t._UZ(1,"input",32),t.TgZ(2,"input",33),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setName(i))}),t.qZA()()}if(2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("value",n.name)("ghs-label","campaign.campaignManagement.name")("ghs-label-args",t.VKq(4,mR,""+n.id))("ghs-label-attribute","placeholder")}}const CR=function(o,a){return{disabled:o,confirm:a}};function MR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11),t.YNc(1,fR,4,6,"label",29),t.YNc(2,vR,3,6,"label",9),t._UZ(3,"span",30),t.TgZ(4,"a",31),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeParty(s))})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelRemoveParty())}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.gameManager.game.party!=n),t.xp6(1),t.Q6J("ngIf",e.gameManager.game.party==n),t.xp6(2),t.Q6J("ngClass",t.WLB(3,CR,1==e.gameManager.game.parties.length||e.gameManager.game.scenario,e.confirmPartyDelete==n.id))}}let OR=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"close",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"conditions",[]),(0,_.Z)(this,"amConditions",[]),(0,_.Z)(this,"editionConditions",[]),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"confirmPartyDelete",-1),(0,_.Z)(this,"worldMap",!1),this.dialog=e}ngOnInit(){this.update()}update(){this.characters=d.v.game.figures.filter(i=>i instanceof oe.z).map(i=>i).sort((i,s)=>{const l=i.title.toLowerCase()||R.r.getLabel("data.character."+i.name).toLowerCase(),m=s.title.toLowerCase()||R.r.getLabel("data.character."+s.name).toLowerCase();return l>m?1:lnew re.gP(i)).filter(i=>-1==i.types.indexOf(re.CP.hidden)),this.amConditions=Object.values(re.fT).map(i=>new re.gP(i)).filter(i=>-1!=i.types.indexOf(re.CP.amDeck)),this.editionConditions=d.v.conditions(d.v.game.edition,!0).map(i=>i.name);const e=d.v.editionData.find(i=>i.edition==d.v.game.edition);e&&e.worldMap&&(this.worldMap=!0)}setEdition(e=void 0){d.v.stateManager.before("setEdition","data.edition."+e),R.r.settings.automaticTheme&&R.r.setFhStyle("fh"==e),d.v.game.edition=e,d.v.game.party.edition=e,this.editionConditions=d.v.conditions(d.v.game.edition,!0).map(i=>i.name),d.v.stateManager.after()}toggleCampaignMode(){d.v.stateManager.before(d.v.game.party.campaignMode?"disablePartyCampaignMode":"enablePartyCampaignMode"),d.v.game.party.campaignMode=!d.v.game.party.campaignMode,d.v.stateManager.after()}toggleCondition(e){-1==this.editionConditions.indexOf(e)&&(d.v.stateManager.before(-1==d.v.game.conditions.indexOf(e)?"addGameCondition":"removeGameCondition",e),-1==d.v.game.conditions.indexOf(e)?d.v.game.conditions.push(e):d.v.game.conditions=d.v.game.conditions.filter(i=>e!=i),d.v.stateManager.after())}openCharacterSheet(e){this.dialog.open(IO,{panelClass:["dialog-invert"],data:e}),this.close.emit()}openPartySheet(){this.dialog.open(Dw,{panelClass:["dialog-invert"],data:{partySheet:!0}}),this.close.emit()}openCampaignSheet(){this.dialog.open(Dw,{panelClass:["dialog-invert"],data:{campaign:!0}}),this.close.emit()}openMap(){this.dialog.open(aT,{backdropClass:"fullscreen-backdrop",panelClass:"fullscreen-panel",data:d.v.game.edition}),this.close.emit()}openBattleGoalsSetup(){this.dialog.open(UO,{panelClass:["dialog"]}),this.close.emit()}openItems(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition}}),this.close.emit()}addParty(){let e=new Mw.f,i=0;for(;d.v.game.parties.some(s=>s.id==i);)i++;e.id=i,d.v.stateManager.before("addParty",e.name||"%party% "+e.id),d.v.game.parties.push(e),d.v.changeParty(e),this.update(),d.v.stateManager.after()}changeParty(e){d.v.stateManager.before("changeParty",e.name||"%party% "+e.id),d.v.changeParty(e),this.update(),d.v.stateManager.after()}removeParty(e){d.v.game.parties.length>1&&(this.confirmPartyDelete!=e.id?this.confirmPartyDelete=e.id:(d.v.stateManager.before("removeParty",e.name||"%party% "+e.id),d.v.game.parties.splice(d.v.game.parties.indexOf(e),1),d.v.game.party.id==e.id&&d.v.changeParty(d.v.game.parties[0]),this.update(),d.v.stateManager.after(),this.cancelRemoveParty()))}cancelRemoveParty(){this.confirmPartyDelete=-1}setName(e){d.v.game.party.name!=e.target.value&&(d.v.stateManager.before("setPartyName",e.target.value),d.v.game.party.name=e.target.value,d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-campaign-menu"]],outputs:{close:"close"},decls:37,vars:26,consts:[[1,"menu-container","two-column","sheets"],[1,"line","span",3,"ngClass"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","line",4,"ngFor","ngForOf"],[1,"line","separator"],["class","line title span",4,"ngIf"],["class","line span",4,"ngIf"],["class","line",4,"ngIf"],[4,"ngIf"],[1,"line","title","span"],[1,"line"],[1,"conditions"],["class","item",4,"ngFor","ngForOf"],[1,"hint-container"],[1,"line","span"],[3,"ghs-label","ngClass","click"],[3,"ngClass"],[3,"ghs-label","click"],[3,"click"],[1,"icon",3,"src"],["class","edition",4,"ngIf"],[1,"edition"],[1,"item"],[1,"condition",3,"ghs-tooltip","originX","overlayX","originY","overlayY","ngClass","click"],[3,"src"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg"],[1,"hint"],[1,"text",3,"ghs-label"],[3,"ngClass",4,"ngIf"],[1,"spacer"],[1,"remove",3,"ngClass","click","mouseleave"],["type","checkbox","checked","true","disabled","disabled"],["type","text",3,"value","ghs-label","ghs-label-args","ghs-label-attribute","change"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"label")(3,"input",2),t.NdJ("change",function(){return i.setEdition()}),t.qZA(),t._uU(4," <"),t._UZ(5,"span",3),t._uU(6,"> "),t.qZA()(),t.YNc(7,tR,4,5,"div",4),t.TgZ(8,"div",5)(9,"label")(10,"input",2),t.NdJ("change",function(){return i.toggleCampaignMode()}),t.qZA(),t._UZ(11,"span",3),t.qZA()(),t.YNc(12,eR,3,1,"div",6),t.YNc(13,nR,2,1,"div",7),t.YNc(14,iR,2,1,"div",7),t.YNc(15,oR,2,1,"div",8),t.YNc(16,aR,2,1,"div",7),t.YNc(17,sR,2,1,"div",8),t.YNc(18,rR,3,1,"div",6),t.YNc(19,gR,2,1,"ng-container",9),t.TgZ(20,"div",10)(21,"label"),t._UZ(22,"span",3),t.qZA()(),t.TgZ(23,"div",11)(24,"div",12),t.YNc(25,dR,3,10,"span",13),t.qZA()(),t.TgZ(26,"div",11)(27,"div",12),t.YNc(28,hR,3,10,"span",13),t.qZA()(),t.TgZ(29,"div",10)(30,"div",14)(31,"label"),t._UZ(32,"span",3),t.qZA(),t.YNc(33,uR,4,1,"ng-container",9),t.qZA()(),t.YNc(34,MR,5,6,"div",4),t.TgZ(35,"div",15)(36,"a",16),t.NdJ("click",function(){return i.addParty()}),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.VKq(22,qO,!i.gameManager.game.edition)),t.xp6(2),t.Q6J("checked",!i.gameManager.game.edition),t.xp6(2),t.Q6J("ghs-label","edition.all"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions()),t.xp6(3),t.Q6J("checked",i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ghs-label","party.campaignMode"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.partySheet||i.settingsManager.settings.characterSheet||i.settingsManager.settings.characterItems),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.partySheet),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.partySheet),t.xp6(1),t.Q6J("ngIf",i.worldMap),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterSheet||i.settingsManager.settings.characterItems),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.battleGoals),t.xp6(1),t.Q6J("ngIf",i.characters.length>0&&i.settingsManager.settings.characterSheet),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterSheet),t.xp6(3),t.Q6J("ghs-label","edition.conditions"),t.xp6(3),t.Q6J("ngForOf",i.conditions),t.xp6(3),t.Q6J("ngForOf",i.amConditions),t.xp6(4),t.Q6J("ghs-label","campaign.campaignManagement"),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.parties),t.xp6(2),t.Q6J("ghs-label","campaign.campaignManagement.add")("ngClass",t.VKq(24,qO,i.gameManager.game.scenario)))},dependencies:[x.mk,x.sg,x.O5,ie,Ba],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}','.conditions[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));align-items:center;justify-items:center;margin-bottom:auto}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{cursor:initial;position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{cursor:pointer;display:flex;position:relative;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:after{pointer-events:none;content:" ";height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);position:absolute;bottom:0;left:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));transform:translate(-50%)}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value.stack[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor))}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]:after{border:calc(var(--ghs-unit) / 4) var(--ghs-color-darkgray) solid;border-radius:100%}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-green) solid;border-radius:100%}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-green) solid;border-radius:100%}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.active[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 5) var(--ghs-color-red) solid}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]{pointer-events:initial;cursor:initial}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{opacity:.7}.conditions[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .condition.disabled[_ngcontent-%COMP%]:hover:after{border:calc(var(--ghs-unit) / 4) var(--ghs-color-darkgray) solid}.remove[_ngcontent-%COMP%]{cursor:pointer!important;display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.remove[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 80%,30% 50%,0 20%,20% 0,50% 30%,80% 0,100% 20%,70% 50%,100% 80%,80% 100%,50% 70%,20% 100%);background-color:var(--ghs-color-gray)}.remove[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.remove.confirm[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-red)}.remove.disabled[_ngcontent-%COMP%]{pointer-events:none}.remove.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-darkgray)!important}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}.conditions[_ngcontent-%COMP%]{grid-template-columns:repeat(4,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)))}}']})),a})();var pT=E(3329);const PR=["inputEditionDataUrl"],yR=["inputSpoiler"],bR=["inputUnlock"];function xR(o,a){1&o&&t._UZ(0,"img",27)}const em=function(o){return{hidden:o}};function wR(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",3)(2,"div",28)(3,"label",29),t._UZ(4,"span",5),t.TgZ(5,"input",30,31),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(6),s=t.oxw();return t.KtG(s.settingsManager.setAutoBackup(+i.value))}),t.qZA()(),t._UZ(7,"img",32),t.TgZ(8,"div",33)(9,"div",34),t._UZ(10,"div",5),t.qZA()()()(),t.TgZ(11,"div",3)(12,"label")(13,"input",11),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAutoBackupFinish(!i.settingsManager.settings.autoBackupFinish))}),t.qZA(),t._UZ(14,"span",5),t.qZA()(),t.TgZ(15,"div",3)(16,"div",35)(17,"label",29),t._UZ(18,"span",5),t.qZA(),t.TgZ(19,"input",36,37),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(21,"img",32),t.TgZ(22,"div",33)(23,"div",34),t._UZ(24,"div",5),t.qZA()()()(),t.TgZ(25,"div",9)(26,"div",35)(27,"label",29),t._UZ(28,"span",5),t.qZA(),t.TgZ(29,"select",38,39),t.NdJ("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.TgZ(31,"option",40),t._UZ(32,"span",5),t.qZA(),t.TgZ(33,"option",41),t._UZ(34,"span",5),t.qZA(),t.TgZ(35,"option",42),t._UZ(36,"span",5),t.qZA()(),t._UZ(37,"img",32),t.TgZ(38,"div",33)(39,"div",34),t._UZ(40,"div",5),t.qZA()()()(),t.TgZ(41,"div",9)(42,"div",35)(43,"label",29)(44,"input",11,43),t.NdJ("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(46,"span",5),t.qZA(),t._UZ(47,"img",32),t.TgZ(48,"div",33)(49,"div",34),t._UZ(50,"div",5),t.qZA()()()(),t.TgZ(51,"div",9)(52,"div",35)(53,"label",29),t._UZ(54,"span",5),t.qZA(),t.TgZ(55,"input",36,44),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(57,"img",32),t.TgZ(58,"div",33)(59,"div",34),t._UZ(60,"div",5),t.qZA()()()(),t.TgZ(61,"div",9)(62,"div",35)(63,"label",29),t._UZ(64,"span",5),t.qZA(),t.TgZ(65,"input",36,45),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(67,"img",32),t.TgZ(68,"div",33)(69,"div",34),t._UZ(70,"div",5),t.qZA()()()(),t.TgZ(71,"div",9)(72,"div",35)(73,"label",29),t._UZ(74,"span",5),t.qZA(),t.TgZ(75,"input",36,46),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(20),s=t.MAs(30),l=t.MAs(45),m=t.MAs(66),O=t.MAs(76),k=t.MAs(56),W=t.oxw();return t.KtG(W.settingsManager.setAutoBackupUrl({url:i.value,method:s.value,fileUpload:l.checked,username:m.value,password:O.value,authorization:k.value}))}),t.qZA(),t._UZ(77,"img",32),t.TgZ(78,"div",33)(79,"div",34),t._UZ(80,"div",5),t.qZA()()()(),t.BQk()}if(2&o){const n=t.MAs(6),e=t.MAs(20),i=t.oxw();t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.count"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.autoBackup)("size",n.value.length)("ghs-label","datamanagement.backup.auto.count")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.countHint"),t.xp6(3),t.Q6J("checked",i.settingsManager.settings.autoBackupFinish),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.auto.onFinish"),t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.url)("ghs-label","datamanagement.backup.auto.uploadUrl")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(42,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.method),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.post"),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.put"),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.get"),t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlMethod.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(44,em,!e.value)),t.xp6(3),t.Q6J("checked",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.fileUpload),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlFileUpload"),t.xp6(4),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlFileUpload.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(46,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlAuthorization"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.authorization)("ghs-label","datamanagement.backup.auto.uploadUrlAuthorization")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlAuthorization.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(48,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlUsername"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.username)("ghs-label","datamanagement.backup.auto.uploadUrlUsername")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlUsername.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(50,em,!e.value)),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlPassword"),t.xp6(1),t.Q6J("value",null==i.settingsManager.settings.autoBackupUrl?null:i.settingsManager.settings.autoBackupUrl.password)("ghs-label","datamanagement.backup.auto.uploadUrlPassword")("ghs-label-attribute","placeholder"),t.xp6(5),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrlPassword.hint")}}function kR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",47),t._uU(1),t._UZ(2,"span",21),t.TgZ(3,"span",48),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeUnlock(s))}),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",n," "),t.xp6(2),t.Q6J("ghs-label","datamanagement.removeUnlock")("ghs-label-attribute","title")}}function TR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.removeAllUnlocks())}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","datamanagement.removeAllUnlocks"))}function ZR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",47),t._uU(1),t._UZ(2,"span",21),t.TgZ(3,"span",48),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeSpoiler(s))}),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.hij(" ",n," "),t.xp6(2),t.Q6J("ghs-label","datamanagement.removeSpoiler")("ghs-label-attribute","title")}}function AR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.removeAllSpoilers())}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","datamanagement.removeAllSpoilers"))}function SR(o,a){if(1&o&&(t.TgZ(0,"span",53),t._UZ(1,"img",54),t.TgZ(2,"span",55),t._uU(3),t.qZA()()),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","datamanagement.editionDataUrls.custom")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(n.url)}}function ER(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",50)(1,"label",51)(2,"input",11),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEdition(s))}),t.qZA(),t._UZ(3,"span",5),t.qZA(),t.YNc(4,SR,4,3,"span",52),t._UZ(5,"span",21),t.TgZ(6,"span",48),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeEditionDataUrl(s.url))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-label",-1!=e.settingsManager.settings.editions.indexOf(n.edition)?"datamanagement.editionDataUrls.disable":"datamanagement.editionDataUrls.enable")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("checked",-1!=e.settingsManager.settings.editions.indexOf(n.edition)),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.Q6J("ngIf",-1==e.settingsManager.defaultEditionDataUrls.indexOf(n.url)),t.xp6(2),t.Q6J("ghs-label","datamanagement.editionDataUrls.remove")("ghs-label-attribute","title")}}function DR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.restoreDefaultEditionDataUrls())}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","datamanagement.restoreEditionDataUrls"))}const IR=function(o){return[o]};function NR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3)(1,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.exportAllBackups())}),t._UZ(2,"span",58),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.all")("ghs-label-args",t.VKq(2,IR,""+n.backups))}}const eh=function(o){return{"confirm-delete":o}};function JR(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",56)(2,"label"),t._UZ(3,"span",5),t.qZA()(),t.TgZ(4,"div",3)(5,"a",4),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.exportLatestBackup())}),t._UZ(6,"span",5),t.qZA()(),t.YNc(7,NR,3,4,"div",57),t.TgZ(8,"div",3)(9,"a",8),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deleteBackups())})("mouseleave",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.cancelConfirm())}),t._uU(10,"<"),t._UZ(11,"span",5),t._uU(12,"(!)>"),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label","datamanagement.backup"),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.latest"),t.xp6(1),t.Q6J("ngIf",n.backups>1),t.xp6(2),t.Q6J("ngClass",t.VKq(5,eh,"deleteBackups"==n.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.backup.delete")}}const nh=function(o){return{disabled:o}},Nw=function(o,a){return{fh:o,modern:a}};let UR=(()=>{var o;class a{constructor(){(0,_.Z)(this,"editionDataUrlElement",void 0),(0,_.Z)(this,"spoilerElement",void 0),(0,_.Z)(this,"unlockElement",void 0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"backups",0),(0,_.Z)(this,"ghsInputFullScreenCheck",he.lz),(0,_.Z)(this,"confirm",""),(0,_.Z)(this,"working","")}ngOnInit(){var e=this;return(0,J.Z)(function*(){try{const i=yield Pt.j.readAll("game-backup");i&&i.length>0&&(e.backups=i.length)}catch{e.backups=0}})()}addEditionDataUrl(){var e=this;return(0,J.Z)(function*(){e.editionDataUrlElement.nativeElement.value&&(e.editionDataUrlElement.nativeElement.classList.remove("error"),e.editionDataUrlElement.nativeElement.disabled=!0,(yield R.r.addEditionDataUrl(e.editionDataUrlElement.nativeElement.value))?(e.editionDataUrlElement.nativeElement.value="",e.editionDataUrlElement.nativeElement.disabled=!1):(e.editionDataUrlElement.nativeElement.classList.add("error"),e.editionDataUrlElement.nativeElement.disabled=!1))})()}removeEditionDataUrl(e){e&&R.r.removeEditionDataUrl(e)}toggleEdition(e){var i=this;return(0,J.Z)(function*(){-1!=i.settingsManager.settings.editions.indexOf(e.edition)?i.settingsManager.removeEdition(e.edition):(i.settingsManager.addEdition(e.edition),yield i.settingsManager.loadEditionData(e.url,!0),d.v.uiChange.emit())})()}drop(e){Fn(R.r.settings.editionDataUrls,e.previousIndex,e.currentIndex),Fn(d.v.editionData,e.previousIndex,e.currentIndex),R.r.storeSettings()}hasDefaultEditionData(){return this.settingsManager.defaultEditionDataUrls.every(e=>-1!=R.r.settings.editionDataUrls.indexOf(e))}addSpoiler(){this.spoilerElement.nativeElement.value&&(R.r.addSpoiler(this.spoilerElement.nativeElement.value),this.spoilerElement.nativeElement.value="")}removeSpoiler(e){e&&R.r.removeSpoiler(e)}addUnlock(){const e=this.unlockElement.nativeElement.value;e&&(-1==d.v.game.unlockedCharacters.indexOf(e)&&d.v.charactersData(void 0).find(i=>i.spoiler&&i.name==e)&&(d.v.stateManager.before("unlockChar","data.character."+e),d.v.game.unlockedCharacters.push(e),d.v.stateManager.after()),this.unlockElement.nativeElement.value="")}removeUnlock(e){e&&-1!=d.v.game.unlockedCharacters.indexOf(e)&&(d.v.stateManager.before("unlockChar","data.character."+e),d.v.game.unlockedCharacters.splice(d.v.game.unlockedCharacters.indexOf(e),1),d.v.stateManager.after())}removeAllUnlocks(){d.v.stateManager.before("removeAllUnlocks"),d.v.game.unlockedCharacters=[],d.v.stateManager.after()}cancelConfirm(){this.confirm=""}exportGame(){return(0,J.Z)(function*(){try{const e=yield Pt.j.readGameModel();if(e){const i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-game"+(e.party.name?"_"+e.party.name:"")+".json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}}catch{console.warn("No game found")}})()}exportLatestBackup(){return(0,J.Z)(function*(){try{const e=yield Pt.j.readAll("game-backup");if(e&&e.length>0){const i=e[e.length-1],s=document.createElement("a");s.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(i))),s.setAttribute("download","ghs-game"+(i.party.name?"_"+i.party.name:"")+"-rev"+i.revision+".json"),document.body.appendChild(s),s.click(),document.body.removeChild(s)}}catch{console.warn("No backup found")}})()}exportAllBackups(){return(0,J.Z)(function*(){try{const e=yield Pt.j.readAll("game-backup");e&&e.length>0&&e.forEach(i=>{const s=document.createElement("a");s.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(i))),s.setAttribute("download","ghs-game"+(i.party.name?"_"+i.party.name:"")+"-rev"+i.revision+".json"),document.body.appendChild(s),s.click(),document.body.removeChild(s)})}catch{console.warn("No backups found")}})()}deleteBackups(){"deleteBackups"!=this.confirm?this.confirm="deleteBackups":(Pt.j.clear("game-backup"),this.backups=0)}importGameCheck(){"importGame"!=this.confirm?setTimeout(()=>{this.confirm="importGame"},100):(0,he.lz)()}importGame(e){e.target.parentElement.classList.remove("error");try{const i=new FileReader;i.addEventListener("load",s=>{d.v.stateManager.before("loadGameFromFile");const l=Object.assign(new ge.i4,JSON.parse(s.target.result));l.revision0&&(i.readAsText(e.target.files[0]),e.target.value="")}catch(i){console.warn(i),e.target.parentElement.classList.add("error")}}resetGame(){"resetGame"!=this.confirm?this.confirm="resetGame":(d.v.stateManager.reset(),d.v.stateManager.after(),window.location.reload())}exportSettings(){return(0,J.Z)(function*(){try{const e=yield Pt.j.read("settings","default");if(e){const i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-settings.json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}}catch{console.warn("No settings found")}})()}importSettingsCheck(){"importSettings"!=this.confirm?setTimeout(()=>{this.confirm="importSettings"},100):(0,he.lz)()}importSettings(e){e.target.parentElement.classList.remove("error");try{const i=new FileReader;i.addEventListener("load",function(){var s=(0,J.Z)(function*(l){const m=Object.assign(new pT.Z,JSON.parse(l.target.result));R.r.settings=m,yield Pt.j.write("settings","default",R.r.settings)});return function(l){return s.apply(this,arguments)}}()),i.readAsText(e.target.files[0])}catch(i){console.warn(i),e.target.parentElement.classList.add("error")}}resetSettings(){"resetSettings"!=this.confirm?this.confirm="resetSettings":(R.r.reset(),window.location.reload())}exportDataDump(){return(0,J.Z)(function*(){yield d.v.stateManager.autoBackup("ghs-data-dump.json",!0)})()}importDataDumpCheck(){"importDataDump"!=this.confirm?setTimeout(()=>{this.confirm="importDataDump"},100):(0,he.lz)()}importDataDump(e){var i=this;e.target.parentElement.classList.remove("error");try{this.working="importDataDump";const s=new FileReader;s.addEventListener("load",function(){var l=(0,J.Z)(function*(m){const O=JSON.parse(m.target.result);d.v.stateManager.errorLog=O.errorLog||[];let k=!1;const W=Object.keys(O);for(let ct=0;ct "),t.qZA()(),t.TgZ(12,"div",3)(13,"a",8),t.NdJ("click",function(){return i.resetGame()})("mouseleave",function(){return i.cancelConfirm()}),t._uU(14,"<"),t._UZ(15,"span",5),t._uU(16,"(!)>"),t.qZA()()(),t.TgZ(17,"div",2)(18,"div",3)(19,"a",4),t.NdJ("click",function(){return i.exportSettings()}),t._UZ(20,"span",5),t.qZA()(),t.TgZ(21,"div",3)(22,"label",6),t.NdJ("click",function(){return i.importSettingsCheck()})("mouseleave",function(){return i.cancelConfirm()}),t.TgZ(23,"input",7),t.NdJ("change",function(m){return i.importSettings(m)}),t.qZA(),t._uU(24," <"),t._UZ(25,"span",5),t._uU(26,"(!)> "),t.qZA()(),t.TgZ(27,"div",3)(28,"a",8),t.NdJ("click",function(){return i.resetSettings()})("mouseleave",function(){return i.cancelConfirm()}),t._uU(29,"<"),t._UZ(30,"span",5),t._uU(31,"(!)>"),t.qZA()()(),t.TgZ(32,"div",2)(33,"div",3)(34,"a",4),t.NdJ("click",function(){return i.exportDataDump()}),t._UZ(35,"span",5),t.qZA()(),t.TgZ(36,"div",9)(37,"label",6),t.NdJ("click",function(){return i.importDataDumpCheck()})("mouseleave",function(){return i.cancelConfirm()}),t.TgZ(38,"input",7),t.NdJ("change",function(m){return i.importDataDump(m)}),t.qZA(),t._uU(39," <"),t._UZ(40,"span",5),t._uU(41,"(!)> "),t.YNc(42,xR,1,0,"img",10),t.qZA()(),t.TgZ(43,"div",3)(44,"a",8),t.NdJ("click",function(){return i.clearAllData()})("mouseleave",function(){return i.cancelConfirm()}),t._uU(45,"<"),t._UZ(46,"span",5),t._uU(47,"(!)>"),t.qZA()(),t.TgZ(48,"div",3)(49,"label")(50,"input",11),t.NdJ("change",function(){return i.settingsManager.settings.autoBackup=-1==i.settingsManager.settings.autoBackup?25:-1}),t.qZA(),t._UZ(51,"span",5),t.qZA()(),t.YNc(52,wR,81,52,"ng-container",12),t.qZA()(),t._UZ(53,"div",13),t.TgZ(54,"div",1)(55,"div",2)(56,"div",14)(57,"label"),t._UZ(58,"span",5),t.qZA()(),t.TgZ(59,"div",3)(60,"span",15)(61,"input",16,17),t.NdJ("keyup.enter",function(){return i.addUnlock()})("keyup",function(){return 0}),t.qZA(),t.TgZ(63,"span",18),t.NdJ("click",function(){return i.addUnlock()}),t.qZA()()(),t.TgZ(64,"div",19),t.YNc(65,kR,4,3,"a",20),t.qZA(),t._UZ(66,"div",21),t.YNc(67,TR,3,1,"div",22),t.TgZ(68,"div",14)(69,"label"),t._UZ(70,"span",5),t.qZA()(),t.TgZ(71,"div",3)(72,"span",15)(73,"input",16,23),t.NdJ("keyup.enter",function(){return i.addSpoiler()})("keyup",function(){return 0}),t.qZA(),t.TgZ(75,"span",18),t.NdJ("click",function(){return i.addSpoiler()}),t.qZA()()(),t.TgZ(76,"div",19),t.YNc(77,ZR,4,3,"a",20),t.qZA(),t._UZ(78,"div",21),t.YNc(79,AR,3,1,"div",22),t.qZA(),t.TgZ(80,"div",2)(81,"div",14)(82,"label"),t._UZ(83,"span",5),t.qZA()(),t.TgZ(84,"div",3)(85,"span",15)(86,"input",16,24),t.NdJ("keyup.enter",function(){return i.addEditionDataUrl()})("keyup",function(){t.CHM(s);const m=t.MAs(87);return t.KtG(m.classList.remove("error"))}),t.qZA(),t.TgZ(88,"span",18),t.NdJ("click",function(){return i.addEditionDataUrl()}),t.qZA()()(),t.TgZ(89,"div",25),t.NdJ("cdkDropListDropped",function(m){return i.drop(m)}),t.YNc(90,ER,7,7,"a",26),t.qZA(),t._UZ(91,"div",21),t.YNc(92,DR,3,1,"div",22),t.qZA(),t.TgZ(93,"div",2),t.YNc(94,JR,13,7,"ng-container",12),t.qZA()()()}if(2&e){const s=t.MAs(62),l=t.MAs(74),m=t.MAs(87);t.xp6(5),t.Q6J("ghs-label","datamanagement.exportGame"),t.xp6(2),t.Q6J("ngClass",t.VKq(48,eh,"importGame"==i.confirm)),t.xp6(1),t.Q6J("ngClass",t.VKq(50,nh,"importGame"!=i.confirm))("disabled","importGame"!=i.confirm),t.xp6(2),t.Q6J("ghs-label","datamanagement.importGame"),t.xp6(3),t.Q6J("ngClass",t.VKq(52,eh,"resetGame"==i.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.resetGame"),t.xp6(5),t.Q6J("ghs-label","datamanagement.exportSettings"),t.xp6(2),t.Q6J("ngClass",t.VKq(54,eh,"importSettings"==i.confirm)),t.xp6(1),t.Q6J("ngClass",t.VKq(56,nh,"importSettings"!=i.confirm))("disabled","importSettings"!=i.confirm),t.xp6(2),t.Q6J("ghs-label","datamanagement.importSettings"),t.xp6(3),t.Q6J("ngClass",t.VKq(58,eh,"resetSettings"==i.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.resetSettings"),t.xp6(5),t.Q6J("ghs-label","datamanagement.exportDataDump"),t.xp6(1),t.Q6J("ngClass",t.VKq(60,nh,i.working)),t.xp6(1),t.Q6J("ngClass",t.VKq(62,eh,"importDataDump"==i.confirm)),t.xp6(1),t.Q6J("ngClass",t.VKq(64,nh,"importDataDump"!=i.confirm))("disabled","importDataDump"!=i.confirm),t.xp6(2),t.Q6J("ghs-label","datamanagement.importDataDump"),t.xp6(2),t.Q6J("ngIf","importDataDump"==i.working),t.xp6(2),t.Q6J("ngClass",t.VKq(66,eh,"clearAllData"==i.confirm)),t.xp6(2),t.Q6J("ghs-label","datamanagement.clearAll"),t.xp6(4),t.Q6J("checked",-1!=i.settingsManager.settings.autoBackup),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.auto"),t.xp6(1),t.Q6J("ngIf",-1!=i.settingsManager.settings.autoBackup),t.xp6(4),t.Q6J("ngClass",t.WLB(68,Nw,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","datamanagement.unlocks"),t.xp6(3),t.Q6J("ghs-label","datamanagement.addUnlock")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(71,nh,!s.value)),t.xp6(2),t.Q6J("ngForOf",i.gameManager.game.unlockedCharacters),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.unlockedCharacters.length>0),t.xp6(1),t.Q6J("ngClass",t.WLB(73,Nw,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","datamanagement.spoilers"),t.xp6(3),t.Q6J("ghs-label","datamanagement.addSpoiler")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(76,nh,!l.value)),t.xp6(2),t.Q6J("ngForOf",i.settingsManager.settings.spoilers),t.xp6(2),t.Q6J("ngIf",i.settingsManager.settings.spoilers.length>0),t.xp6(2),t.Q6J("ngClass",t.WLB(78,Nw,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","datamanagement.editionDataUrls"),t.xp6(3),t.Q6J("ghs-label","datamanagement.addEditionDataUrl")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(81,nh,!m.value)),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editionData),t.xp6(2),t.Q6J("ngIf",!i.hasDefaultEditionData()),t.xp6(2),t.Q6J("ngIf",i.backups>0)}},dependencies:[x.mk,x.sg,x.O5,wo,ko,Bs,Ms,ie],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}','.editions[_ngcontent-%COMP%], .spoilers[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start!important;justify-content:center!important}.edition[_ngcontent-%COMP%], .spoiler-item[_ngcontent-%COMP%]{display:flex;align-items:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0}.edition[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%], .spoiler-item[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{cursor:pointer!important;display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.edition[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%]:after, .spoiler-item[_ngcontent-%COMP%]:hover .remove[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 80%,30% 50%,0 20%,20% 0,50% 30%,80% 0,100% 20%,70% 50%,100% 80%,80% 100%,50% 70%,20% 100%);background-color:var(--ghs-color-white)}.spoiler-item[_ngcontent-%COMP%]{cursor:initial!important}.working[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray);animation:ghs-spinning 1.5s linear infinite;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.edition[_ngcontent-%COMP%]{cursor:grab!important;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0}.edition[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%]{display:flex;align-items:center;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.edition[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{display:none;font-family:var(--ghs-font-normal);align-self:flex-end;font-size:.8em;margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));flex:1 1 auto;text-shadow:none}.edition[_ngcontent-%COMP%]:hover .custom[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{display:inline-block}.line[_ngcontent-%COMP%] .input-file[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{width:0;height:0;margin:0;padding:0;visibility:hidden}.line[_ngcontent-%COMP%] .input-file[_ngcontent-%COMP%] input[type=file].disabled[_ngcontent-%COMP%]{pointer-events:none}.line[_ngcontent-%COMP%] .input-file.error[_ngcontent-%COMP%]{animation:shake .5s linear;color:var(--ghs-color-red)!important}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}}']})),a})();class fT{constructor(a){(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"spoiler",!0),this.name=a}}function LR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"input",16),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.customScenarioName(i))}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("value",n.gameManager.game.scenario.name)("ghs-label","scenario.title")("ghs-label-attribute","placeholder")}}function QR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",17)(1,"div",15)(2,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.resetScenario())}),t._uU(3,"<"),t._UZ(4,"span",5),t._uU(5,"!>"),t.qZA()()()}2&o&&(t.xp6(4),t.Q6J("ghs-label","scenario.reset"))}function RR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",19),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.edition=s)}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("value",n)("checked",e.edition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function FR(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",4),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setShowOnlyUnfinishedScenarios(!i.settingsManager.settings.showOnlyUnfinishedScenarios))}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.settingsManager.settings.showOnlyUnfinishedScenarios),t.xp6(1),t.Q6J("ghs-label","scenario.filterSuccess")}}function qR(o,a){if(1&o&&(t.TgZ(0,"div",23)(1,"label"),t._UZ(2,"span",5),t.qZA()()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.scenario.group."+n)}}function HR(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function jR(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function BR(o,a){if(1&o&&(t.ynx(0),t.YNc(1,HR,2,0,"span",14),t.YNc(2,jR,2,0,"span",14),t.TgZ(3,"span",29),t._uU(4),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw().$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngIf",i.maxScenario(e)>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",i.maxScenario(e)>1&&n.index.length<2),t.xp6(2),t.Oqu(n.index)}}function zR(o,a){1&o&&t._UZ(0,"img",33)}function GR(o,a){1&o&&t._UZ(0,"img",34)}const mT=function(){return[]};function VR(o,a){if(1&o&&(t.TgZ(0,"span",30),t.YNc(1,zR,1,0,"img",31),t.ALo(2,"ghsRange"),t.YNc(3,GR,1,0,"img",32),t.ALo(4,"ghsRange"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,2,t.DdM(8,mT),n.complexity)),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,5,t.DdM(9,mT),3-n.complexity))}}function YR(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"img",35),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",e.gameManager.characterManager.characterIcon(n.solo),t.LSH)}}function KR(o,a){1&o&&(t.TgZ(0,"span",36),t._UZ(1,"img",37),t.qZA())}function $R(o,a){1&o&&(t.TgZ(0,"span",38),t._UZ(1,"img",39),t.qZA())}function WR(o,a){1&o&&(t.TgZ(0,"span",40),t._UZ(1,"img",39),t.qZA())}const XR=function(o,a,n){return{current:o,blocked:a,locked:n}},tF=function(o){return[o]};function eF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.setScenario(s))}),t.YNc(1,BR,5,3,"ng-container",14),t.YNc(2,VR,5,10,"span",25),t.YNc(3,YR,2,1,"ng-container",14),t.YNc(4,KR,2,0,"span",26),t.YNc(5,$R,2,0,"span",27),t.YNc(6,WR,2,0,"span",28),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.kEZ(9,XR,e.hasScenario(n),n.isBlocked,n.isLocked))("ghs-tooltip","scenario.tooltip"+(n.isBlocked?".blocked":n.isLocked?".locked":""))("ghs-label-args",t.VKq(13,tF,"data.scenario."+n.name)),t.xp6(1),t.Q6J("ngIf",!n.solo),t.xp6(1),t.Q6J("ngIf",n.complexity),t.xp6(1),t.Q6J("ngIf",n.solo),t.xp6(1),t.Q6J("ngIf",e.scenarioSuccess(n)),t.xp6(1),t.Q6J("ngIf",n.isBlocked),t.xp6(1),t.Q6J("ngIf",!n.isBlocked&&n.isLocked)}}function nF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"a",18),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.settingsManager.addSpoilers(s.notSpoiled(i)))}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","spoiler.all"))}const iF=function(o){return{disabled:o}};function oF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",23)(2,"label"),t._UZ(3,"span",5),t.qZA()(),t.TgZ(4,"div",15)(5,"span",41)(6,"input",42,43),t.NdJ("keyup",function(){t.CHM(n);const i=t.MAs(7);return t.KtG(i.classList.remove("error"))})("keyup.enter",function(){t.CHM(n);const i=t.MAs(7),s=t.oxw().$implicit,l=t.oxw();return t.KtG(l.manualScenario(i,s))}),t.qZA(),t.TgZ(8,"span",44),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(7),s=t.oxw().$implicit,l=t.oxw();return t.KtG(l.manualScenario(i,s))}),t.qZA()()(),t.BQk()}if(2&o){const n=t.MAs(7);t.xp6(3),t.Q6J("ghs-label","scenario.manual.add"),t.xp6(3),t.Q6J("ghs-label","scenario.manual.index")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","scenario.manual.add")("ghs-label-attribute","title")("ngClass",t.VKq(6,iF,!n.value||n.classList.contains("error")))}}function aF(o,a){if(1&o&&(t.ynx(0),t.YNc(1,qR,3,1,"div",20),t.TgZ(2,"div",21),t.YNc(3,eF,7,15,"span",22),t.ALo(4,"ghsScenarioSearch"),t.qZA(),t.YNc(5,nF,3,1,"div",6),t.YNc(6,oF,9,8,"ng-container",14),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(),i=t.MAs(15);t.xp6(1),t.Q6J("ngIf",n),t.xp6(2),t.Q6J("ngForOf",t.xi3(4,4,e.scenarios(n,e.settingsManager.settings.showOnlyUnfinishedScenarios),i.value)),t.xp6(2),t.Q6J("ngIf",e.hasSpoilers(n)),t.xp6(1),t.Q6J("ngIf",e.gameManager.game.party.campaignMode&&e.scenarios(n).length{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"close",new t.vpe),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"scenarioCache",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.edition=d.v.game.scenario&&!d.v.game.scenario.custom&&d.v.game.scenario.edition||!d.v.game.edition&&(!d.v.game.scenario||!d.v.game.scenario.custom)&&d.v.game.party.scenarios.length>0&&d.v.game.party.scenarios[d.v.game.party.scenarios.length-1].edition||d.v.currentEdition(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.scenarioCache=[]}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}editions(){return d.v.game.edition?[d.v.game.edition,...d.v.editionExtensions(d.v.game.edition)]:d.v.editionData.filter(e=>e.scenarios&&e.scenarios.filter(i=>i.edition==e.edition&&-1!=R.r.settings.editions.indexOf(i.edition)).length>0).map(e=>e.edition)}setEdition(e){this.edition=e}groups(){if(!this.edition)return[];let e=d.v.scenarioManager.scenarioData(this.edition).map(i=>i.group).filter((i,s,l)=>i&&l.indexOf(i)===s).sort((i,s)=>i&&s&&(i.toLowerCase()O.edition==this.edition&&O.group==e&&O.filterSuccess==i&&O.includeSpoiler==s&&O.all==l);return m||(m={edition:this.edition,group:e,filterSuccess:i,includeSpoiler:s,all:l,scenarios:[]},m.scenarios=d.v.scenarioManager.scenarioData(this.edition,l).filter(O=>O.group==e&&(s||!O.spoiler||-1!=d.v.game.unlockedCharacters.indexOf(O.name)||O.solo&&-1!=d.v.game.unlockedCharacters.indexOf(O.solo))&&(!i||!this.scenarioSuccess(O)&&!d.v.scenarioManager.isBlocked(O))).sort(d.v.scenarioManager.sortScenarios).map(O=>new ei.U4(O,this.scenarioSuccess(O),d.v.scenarioManager.isBlocked(O),d.v.scenarioManager.isLocked(O))),this.scenarioCache.push(m)),m.scenarios}scenarioSuccess(e){return d.v.game.party.scenarios&&null!=d.v.game.party.scenarios.find(i=>e.index==i.index&&e.edition==i.edition&&e.group==i.group)}maxScenario(e){return Math.max(...this.scenarios(e).map(i=>i.index.length))}hasScenario(e){return null!=d.v.game.scenario&&d.v.game.scenario.edition==e.edition&&d.v.game.scenario.index==e.index&&d.v.game.scenario.group==e.group&&d.v.game.scenario.solo==e.solo}setScenario(e){this.hasScenario(e)||(d.v.scenarioManager.isLocked(e)?this.dialog.open(oT,{panelClass:"dialog",data:{scenarioData:e}}):(d.v.stateManager.before("setScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(e))),d.v.scenarioManager.setScenario(e),d.v.stateManager.after()),this.close.emit())}resetScenario(){d.v.game.scenario&&(d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.scenarioManager.setScenario(d.v.game.scenario),this.close.emit(),d.v.stateManager.after())}customScenario(){d.v.game.scenario&&d.v.game.scenario.custom?(d.v.stateManager.before("unsetCustomScenario"),d.v.scenarioManager.setScenario(void 0),this.edition=d.v.game.edition||d.v.editions()[0],d.v.stateManager.after()):(d.v.stateManager.before("setCustomScenario"),d.v.scenarioManager.setScenario(d.v.scenarioManager.createScenario()),d.v.stateManager.after())}customScenarioName(e){d.v.game.scenario&&d.v.game.scenario.custom&&(d.v.stateManager.before("changeCustomScenario",e.target.value),d.v.game.scenario.name=e.target.value,d.v.stateManager.after())}manualScenario(e,i){const s=d.v.editionData.find(l=>l.edition==this.edition);if(e.classList.add("error"),s){let l=e.value.split(",");l.forEach(m=>m.trim()),e.value.split(",").forEach(m=>{const O=s.scenarios.find(k=>k.index==m.trim()&&k.group==i);O?(this.scenarios(i).find(k=>k.edition==O.edition&&k.group==O.group&&k.index==O.index)||(d.v.stateManager.before("addManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(O))),d.v.game.party.manualScenarios.push(new ei._b(O.index,O.edition,O.group,!1,"",[])),d.v.stateManager.after()),l=l.filter(k=>k.trim()!=m)):s.scenarios.find(k=>k.index.substring(0,k.index.length-1)==m.trim()&&k.index.substring(k.index.length-1).match(/[A-B]/)&&k.group==i)&&(s.scenarios.filter(k=>k.index.substring(0,k.index.length-1)==m.trim()&&k.index.substring(k.index.length-1).match(/[A-B]/)&&k.group==i).forEach(k=>{this.scenarios(i).find(W=>W.edition==k.edition&&W.group==k.group&&W.index==k.index)||(d.v.stateManager.before("addManualScenario",...d.v.scenarioManager.scenarioUndoArgs(new ei.$4(k))),d.v.game.party.manualScenarios.push(new ei._b(k.index,k.edition,k.group,!1,"",[])),d.v.stateManager.after())}),l=l.filter(k=>k.trim()!=m))}),0==l.length?(e.classList.remove("error"),e.value=""):e.value=l.join(","),this.scenarioCache=[]}}hasSpoilers(e){return this.scenarios(e,!0).some(i=>i.spoiler&&(!i.solo&&-1==d.v.game.unlockedCharacters.indexOf(i.name)||i.solo&&-1==d.v.game.unlockedCharacters.indexOf(i.solo)))}notSpoiled(e){return this.scenarios(e,!0).filter(i=>i.spoiler&&(-1==d.v.game.unlockedCharacters.indexOf(i.name)||i.solo&&-1==d.v.game.unlockedCharacters.indexOf(i.solo))).map(i=>i.solo&&new fT(i.solo)||new fT(i.name))}toggleCampaignMode(){d.v.stateManager.before(d.v.game.party.campaignMode?"disablePartyCampaignMode":"enablePartyCampaignMode"),d.v.game.party.campaignMode=!d.v.game.party.campaignMode,this.scenarioCache=[],d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-menu"]],outputs:{close:"close"},decls:22,vars:11,consts:[[1,"menu-container","scenario"],[1,"columns"],[1,"column","custom-container"],[1,"line","custom-check"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","line",4,"ngIf"],["class","column",4,"ngIf"],[1,"line","editions"],[4,"ngFor","ngForOf"],[1,"line","search"],["type","text",3,"ghs-label","ghs-label-attribute"],["search",""],[1,"line","campaign"],[4,"ngIf"],[1,"line"],["type","text",3,"value","ghs-label","ghs-label-attribute","change"],[1,"column"],[3,"click"],["type","radio","name","radio",3,"value","checked","change"],["class","line title",4,"ngIf"],[1,"line","scenarios"],["class","scenario",3,"ngClass","ghs-tooltip","ghs-label-args","click",4,"ngFor","ngForOf"],[1,"line","title"],[1,"scenario",3,"ngClass","ghs-tooltip","ghs-label-args","click"],["class","complexity",4,"ngIf"],["class","state success",4,"ngIf"],["class","state blocked",4,"ngIf"],["class","state locked",4,"ngIf"],[1,"index"],[1,"complexity"],["src","./assets/images/scenario/complexity-full.svg",4,"ngFor","ngForOf"],["src","./assets/images/scenario/complexity.svg",4,"ngFor","ngForOf"],["src","./assets/images/scenario/complexity-full.svg"],["src","./assets/images/scenario/complexity.svg"],[1,"ghs-svg","solo",3,"src"],[1,"state","success"],["src","./assets/images/check.svg"],[1,"state","blocked"],["src","./assets/images/close.svg"],[1,"state","locked"],[1,"input-button"],["type","text",3,"ghs-label","ghs-label-attribute","keyup","keyup.enter"],["manualScenarioIndex",""],[1,"add-button",3,"ghs-label","ghs-label-attribute","ngClass","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"label")(5,"input",4),t.NdJ("change",function(){return i.customScenario()}),t.qZA(),t._uU(6," <"),t._UZ(7,"span",5),t._uU(8,"> "),t.qZA()(),t.YNc(9,LR,2,3,"div",6),t.qZA(),t.YNc(10,QR,6,1,"div",7),t.qZA(),t.TgZ(11,"div",8),t.YNc(12,RR,3,3,"label",9),t.qZA(),t.TgZ(13,"div",10),t._UZ(14,"input",11,12),t.qZA(),t.TgZ(16,"div",13),t.YNc(17,FR,3,2,"label",14),t.TgZ(18,"label")(19,"input",4),t.NdJ("change",function(){return i.toggleCampaignMode()}),t.qZA(),t._UZ(20,"span",5),t.qZA()(),t.YNc(21,aF,7,7,"ng-container",9),t.qZA()),2&e&&(t.xp6(5),t.Q6J("checked",i.gameManager.game.scenario&&i.gameManager.game.scenario.custom),t.xp6(2),t.Q6J("ghs-label","scenario.custom"),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.scenario&&i.gameManager.game.scenario.custom),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario&&!i.gameManager.game.scenario.custom),t.xp6(2),t.Q6J("ngForOf",i.editions()),t.xp6(2),t.Q6J("ghs-label","scenario.filter")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ngIf",i.gameManager.game.party.campaignMode),t.xp6(2),t.Q6J("checked",i.gameManager.game.party.campaignMode),t.xp6(1),t.Q6J("ghs-label","party.campaignMode"),t.xp6(1),t.Q6J("ngForOf",i.groups()))},dependencies:[x.mk,x.sg,x.O5,ie,Ba,Ii,Ax],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".custom-container[_ngcontent-%COMP%]{display:flex}.custom-container[_ngcontent-%COMP%] .custom-check[_ngcontent-%COMP%]{flex-basis:0}.editions[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:1fr 1fr}.line.campaign[_ngcontent-%COMP%]{display:flex}.line.campaign[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.scenarios[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:repeat(6,1fr);column-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);border-radius:100%;border:calc(var(--ghs-unit) / 5) transparent solid}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;color:var(--ghs-color-white)}.scenarios[_ngcontent-%COMP%] .scenario.current[_ngcontent-%COMP%]{cursor:initial;border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;color:var(--ghs-color-disabled)}.scenarios[_ngcontent-%COMP%] .scenario.blocked[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.scenarios[_ngcontent-%COMP%] .scenario.blocked[_ngcontent-%COMP%]:hover{border-color:var(--ghs-color-darkred)}.scenarios[_ngcontent-%COMP%] .scenario.locked[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.scenarios[_ngcontent-%COMP%] .scenario.locked[_ngcontent-%COMP%]:hover{border-color:var(--ghs-color-yellow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] img.solo[_ngcontent-%COMP%]{filter:none}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;position:absolute;top:50%;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:translateY(-50%)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state.success[_ngcontent-%COMP%]{left:0;filter:var(--ghs-filter-green) var(--ghs-filter-shadow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state.blocked[_ngcontent-%COMP%]{right:0;filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state.locked[_ngcontent-%COMP%]{right:0;filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .complexity[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;bottom:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor))}.scenarios[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .complexity[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray)}.input-button[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.editions[_ngcontent-%COMP%]{grid-template-columns:1fr}.scenarios[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}"]})),a})();var HO=E(7484),Jw=E(4004);function rF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connected"))}function cF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connecting"))}function lF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.closing"))}function gF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.closed"))}function dF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.disconnected"))}function hF(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.undefined"))}function uF(o,a){if(1&o&&(t.TgZ(0,"option",37),t._uU(1),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("value",e)("selected",i.selectedServerIndex==e),t.xp6(1),t.AsE(" ",n.url,":",n.port," ")}}function _F(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",34)(1,"select",35),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.selectServer(i))}),t.TgZ(2,"option"),t._UZ(3,"span",6),t.qZA(),t.YNc(4,uF,2,4,"option",36),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label","server.list."+(-1==n.selectedServerIndex?"select":"deselect")),t.xp6(1),t.Q6J("ngForOf",n.publicServer)}}function pF(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"span",6),t.qZA(),t.TgZ(3,"p")(4,"a",40),t._uU(5),t.qZA()(),t.BQk()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ghs-label","server.info."+n.key),t.xp6(2),t.Q6J("href",n.value,t.LSH),t.xp6(1),t.Oqu(n.value.replace("http://","").replace("https://",""))}}function fF(o,a){if(1&o&&(t.TgZ(0,"div",38),t.YNc(1,pF,6,3,"ng-container",39),t.ALo(2,"keyvalue"),t.TgZ(3,"label"),t._UZ(4,"span",6),t.qZA(),t.TgZ(5,"p"),t._uU(6),t.qZA(),t.TgZ(7,"label"),t._UZ(8,"span",6),t.qZA(),t.TgZ(9,"p"),t._uU(10),t.qZA()()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,5,n.publicServer[n.selectedServerIndex].urls)),t.xp6(3),t.Q6J("ghs-label","server.info.description"),t.xp6(2),t.Oqu(n.publicServer[n.selectedServerIndex].description),t.xp6(2),t.Q6J("ghs-label","server.info.location"),t.xp6(2),t.Oqu(n.publicServer[n.selectedServerIndex].location)}}function mF(o,a){1&o&&(t.TgZ(0,"div",4)(1,"a",41),t._UZ(2,"span",6),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","server.how-to-run"))}function vF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.createUUID())}),t._UZ(1,"span",6),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","server.password.uuid"))}function CF(o,a){if(1&o&&(t.TgZ(0,"div",1)(1,"div",4)(2,"a",40),t._UZ(3,"span",6),t.qZA()()()),2&o){const n=t.oxw(),e=t.MAs(30),i=t.MAs(35);t.xp6(2),t.Q6J("href",n.gameManager.stateManager.buildWsUrl("https://",e.value,i.value),t.LSH),t.xp6(1),t.Q6J("ghs-label","server.wss.accept")}}function MF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",1)(1,"div",4)(2,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.disconnect())}),t._UZ(3,"span",6),t.qZA()()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","server.disconnect"))}function OF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",43)(2,"label"),t._UZ(3,"span",6),t.qZA()(),t.TgZ(4,"div",4)(5,"p"),t._UZ(6,"span",6),t.qZA()(),t.TgZ(7,"div",4)(8,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.createPermissions=!i.createPermissions)}),t._UZ(9,"span",6),t.qZA()(),t.BQk()}2&o&&(t.xp6(3),t.Q6J("ghs-label","permissions"),t.xp6(3),t.Q6J("ghs-label","permissions.hasAll"),t.xp6(3),t.Q6J("ghs-label","permissions.create"))}function PF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",4)(2,"div",7)(3,"label")(4,"input",5),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.permissionsAll(i))}),t.qZA(),t._UZ(5,"span",6),t.qZA(),t._UZ(6,"img",8),t.TgZ(7,"span",9)(8,"span",44),t._UZ(9,"span",6),t.qZA()()()(),t.TgZ(10,"div",4)(11,"div",7)(12,"label")(13,"input",5),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.permissionsCustom(i))}),t.qZA(),t._UZ(14,"span",6),t.qZA(),t._UZ(15,"img",8),t.TgZ(16,"span",9)(17,"span",44),t._UZ(18,"span",6),t.qZA()()()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(4),t.Q6J("checked",!n.permissions),t.xp6(1),t.Q6J("ghs-label","permissions.all"),t.xp6(4),t.Q6J("ghs-label","permissions.all.hint"),t.xp6(4),t.Q6J("checked",n.permissions),t.xp6(1),t.Q6J("ghs-label","permissions.custom"),t.xp6(4),t.Q6J("ghs-label","permissions.custom.hint")}}function yF(o,a){if(1&o&&(t.TgZ(0,"span",50),t._uU(1,"\xa0["),t._UZ(2,"span",6),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.xp6(2),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}const za=function(o){return{disabled:o}};function bF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label",45)(2,"input",5),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.toggleCharacter(s))}),t.qZA(),t._uU(3),t.YNc(4,yF,4,1,"span",49),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(4);t.xp6(1),t.Q6J("ngClass",t.VKq(4,za,e.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",e.hasCharacter(n)),t.xp6(1),t.hij(" ",e.gameManager.characterManager.characterName(n,!0)," "),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function xF(o,a){if(1&o&&(t.TgZ(0,"div",48),t.YNc(1,bF,5,6,"ng-container",39),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.characters())}}function wF(o,a){1&o&&(t.TgZ(0,"span",54),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function kF(o,a){1&o&&(t.TgZ(0,"span",55),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function TF(o,a){if(1&o&&(t.TgZ(0,"span",50),t._uU(1,"\xa0["),t._UZ(2,"span",6),t._uU(3,"]"),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.xp6(2),t.Q6J("ghs-label","data.edition."+e.gameManager.getEdition(n))}}function ZF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label",45)(2,"input",5),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw(4);return t.KtG(l.toggleMonster(s))}),t.qZA(),t._UZ(3,"span",6),t.YNc(4,wF,2,1,"span",52),t.YNc(5,kF,2,1,"span",53),t.YNc(6,TF,4,1,"span",49),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(4);t.xp6(1),t.Q6J("ngClass",t.VKq(6,za,e.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",e.hasMonster(n)),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",n.isAlly),t.xp6(1),t.Q6J("ngIf",n.isAllied),t.xp6(1),t.Q6J("ngIf",e.gameManager.getEdition(n))}}function AF(o,a){if(1&o&&(t.TgZ(0,"div",51),t.YNc(1,ZF,7,8,"ng-container",39),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.monsters())}}const vT=function(o){return{separator:o}};function SF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",21)(2,"div",7)(3,"label",45)(4,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.characters=!i.permissions.characters)}),t.qZA(),t._UZ(5,"span",6),t.qZA(),t._UZ(6,"img",8),t.TgZ(7,"span",9)(8,"span",44),t._UZ(9,"span",6),t.qZA()()()(),t.YNc(10,xF,2,1,"div",46),t.TgZ(11,"div",4)(12,"div",7)(13,"label",45)(14,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.monsters=!i.permissions.monsters)}),t.qZA(),t._UZ(15,"span",6),t.qZA(),t._UZ(16,"img",8),t.TgZ(17,"span",9)(18,"span",44),t._UZ(19,"span",6),t.qZA()()()(),t.YNc(20,AF,2,1,"div",47),t.TgZ(21,"div",4)(22,"div",7)(23,"label",45)(24,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.scenario=!i.permissions.scenario)}),t.qZA(),t._UZ(25,"span",6),t.qZA(),t._UZ(26,"img",8),t.TgZ(27,"span",9)(28,"span",44),t._UZ(29,"span",6),t.qZA()()()(),t.TgZ(30,"div",4)(31,"div",7)(32,"label",45)(33,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.party=!i.permissions.party)}),t.qZA(),t._UZ(34,"span",6),t.qZA(),t._UZ(35,"img",8),t.TgZ(36,"span",9)(37,"span",44),t._UZ(38,"span",6),t.qZA()()()(),t.TgZ(39,"div",4)(40,"div",7)(41,"label",45)(42,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.elements=!i.permissions.elements)}),t.qZA(),t._UZ(43,"span",6),t.qZA(),t._UZ(44,"img",8),t.TgZ(45,"span",9)(46,"span",44),t._UZ(47,"span",6),t.qZA()()()(),t.TgZ(48,"div",4)(49,"div",7)(50,"label",45)(51,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.round=!i.permissions.round)}),t.qZA(),t._UZ(52,"span",6),t.qZA(),t._UZ(53,"img",8),t.TgZ(54,"span",9)(55,"span",44),t._UZ(56,"span",6),t.qZA()()()(),t.TgZ(57,"div",4)(58,"div",7)(59,"label",45)(60,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.level=!i.permissions.level)}),t.qZA(),t._UZ(61,"span",6),t.qZA(),t._UZ(62,"img",8),t.TgZ(63,"span",9)(64,"span",44),t._UZ(65,"span",6),t.qZA()()()(),t.TgZ(66,"div",4)(67,"div",7)(68,"label",45)(69,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.attackModifiers=!i.permissions.attackModifiers)}),t.qZA(),t._UZ(70,"span",6),t.qZA(),t._UZ(71,"img",8),t.TgZ(72,"span",9)(73,"span",44),t._UZ(74,"span",6),t.qZA()()()(),t.TgZ(75,"div",4)(76,"div",7)(77,"label",45)(78,"input",5),t.NdJ("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.permissions.lootDeck=!i.permissions.lootDeck)}),t.qZA(),t._UZ(79,"span",6),t.qZA(),t._UZ(80,"img",8),t.TgZ(81,"span",9)(82,"span",44),t._UZ(83,"span",6),t.qZA()()()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(39,vT,!n.gameManager.stateManager.permissions)),t.xp6(2),t.Q6J("ngClass",t.VKq(41,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.characters),t.xp6(1),t.Q6J("ghs-label","permissions.characters"),t.xp6(4),t.Q6J("ghs-label","permissions.characters.hint"),t.xp6(1),t.Q6J("ngIf",!n.permissions.characters),t.xp6(3),t.Q6J("ngClass",t.VKq(43,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.monsters),t.xp6(1),t.Q6J("ghs-label","permissions.monsters"),t.xp6(4),t.Q6J("ghs-label","permissions.monsters.hint"),t.xp6(1),t.Q6J("ngIf",!n.permissions.monsters),t.xp6(3),t.Q6J("ngClass",t.VKq(45,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.scenario),t.xp6(1),t.Q6J("ghs-label","permissions.scenario"),t.xp6(4),t.Q6J("ghs-label","permissions.scenario.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(47,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.party),t.xp6(1),t.Q6J("ghs-label","permissions.party"),t.xp6(4),t.Q6J("ghs-label","permissions.party.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(49,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.elements),t.xp6(1),t.Q6J("ghs-label","permissions.elements"),t.xp6(4),t.Q6J("ghs-label","permissions.elements.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(51,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.round),t.xp6(1),t.Q6J("ghs-label","permissions.round"),t.xp6(4),t.Q6J("ghs-label","permissions.round.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(53,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.level),t.xp6(1),t.Q6J("ghs-label","permissions.level"),t.xp6(4),t.Q6J("ghs-label","permissions.level.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(55,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.attackModifiers),t.xp6(1),t.Q6J("ghs-label","permissions.attackModifiers"),t.xp6(4),t.Q6J("ghs-label","permissions.attackModifiers.hint"),t.xp6(3),t.Q6J("ngClass",t.VKq(57,za,n.gameManager.stateManager.permissions)),t.xp6(1),t.Q6J("checked",n.permissions.lootDeck),t.xp6(1),t.Q6J("ghs-label","permissions.lootDeck"),t.xp6(4),t.Q6J("ghs-label","permissions.lootDeck.hint")}}function EF(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",4)(2,"label",18),t._UZ(3,"span",6),t.qZA(),t.TgZ(4,"input",19),t.NdJ("keyup",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setPermissionsPassword(i))})("change",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setPermissionsPassword(i))}),t.qZA()(),t.TgZ(5,"div",4)(6,"a",32),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.savePermissions())}),t._UZ(7,"span",6),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(2);t.xp6(3),t.Q6J("ghs-label","permissions.password"),t.xp6(1),t.Q6J("value",n.password)("ghs-label","permissions.password")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(6,za,!n.password)),t.xp6(1),t.Q6J("ghs-label","permissions.save")}}function DF(o,a){if(1&o&&(t.TgZ(0,"div",1)(1,"div",43)(2,"label"),t._UZ(3,"span",6),t.qZA()(),t.YNc(4,PF,19,6,"ng-container",33),t.YNc(5,SF,84,59,"ng-container",33),t.YNc(6,EF,8,8,"ng-container",33),t.qZA()),2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label",n.gameManager.stateManager.permissions?"permissions":"permissions.create"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.stateManager.permissions),t.xp6(1),t.Q6J("ngIf",n.getPermissions()&&n.permissions),t.xp6(1),t.Q6J("ngIf",!n.gameManager.stateManager.permissions)}}const Uw=function(o){return{hidden:o}};let IF=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"tryConnect",!1),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"permissions",new HO.P),(0,_.Z)(this,"publicServer",[]),(0,_.Z)(this,"selectedServerIndex",-1),(0,_.Z)(this,"password",""),(0,_.Z)(this,"createPermissions",!1)}ngOnInit(){var e=this;return(0,J.Z)(function*(){try{yield fetch("./assets/server.json").then(i=>{if(!i.ok)throw Error();return i.json()}).then(i=>{e.publicServer=i})}catch{e.publicServer=[]}e.updateServer()})()}connect(e,i,s){e&&!isNaN(+i)&&s&&(R.r.setServer(e,+i,s),d.v.stateManager.connect(),this.tryConnect=!0)}getPermissions(){return d.v.stateManager.permissions&&(this.permissions=d.v.stateManager.permissions),this.permissions}createUUID(){R.r.settings.serverPassword=(0,Jw.Z)()}disconnect(){d.v.stateManager.disconnect(),this.permissions=d.v.stateManager.permissions}reconnect(){this.disconnect(),d.v.stateManager.connect(),this.tryConnect=!0}selectServer(e){if(this.selectedServerIndex=-1,!isNaN(+e.target.value)&&(this.selectedServerIndex=+e.target.value,this.selectedServerIndex>-1&&this.selectedServerIndex{R.r.settings.serverUrl!=e.url||R.r.settings.serverPort!=e.port||R.r.settings.serverWss!=e.secure||(this.selectedServerIndex=i)})}setServerUrl(e){this.tryConnect=!1,R.r.settings.serverUrl=e.target.value,R.r.storeSettings(),this.updateServer()}setServerPort(e){this.tryConnect=!1,R.r.settings.serverPort=e.target.value,R.r.storeSettings(),this.updateServer()}setServerPassword(e){this.tryConnect=!1,R.r.settings.serverPassword=e.target.value,R.r.storeSettings(),this.updateServer()}permissionsAll(e){this.permissions=e.target.checked?void 0:new HO.P}permissionsCustom(e){this.permissions=e.target.checked?new HO.P:void 0}characters(){return d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e)}hasCharacter(e){return null!=this.permissions&&this.permissions.character.some(i=>i.name==e.name&&i.edition==e.edition)}toggleCharacter(e){if(this.permissions){const i=this.permissions.character.find(s=>s.name==e.name&&s.edition==e.edition);i?this.permissions.character.splice(this.permissions.character.indexOf(i,1)):this.permissions.character.push(new Vn.xb(e.name,e.edition))}}monsters(){return d.v.game.figures.filter(e=>e instanceof Ze.Q).map(e=>e)}hasMonster(e){return null!=this.permissions&&this.permissions.monster.some(i=>i.name==e.name&&i.edition==e.edition)}toggleMonster(e){if(this.permissions){const i=this.permissions.monster.find(s=>s.name==e.name&&s.edition==e.edition);i?this.permissions.monster.splice(this.permissions.monster.indexOf(i,1)):this.permissions.monster.push(new Vn.xb(e.name,e.edition))}}setPermissionsPassword(e){this.password=e.target.value}savePermissions(){d.v.stateManager.savePermissions(this.password,this.permissions),this.password="",this.permissions=new HO.P}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-server-menu"]],decls:64,vars:50,consts:[[1,"menu-container","two-column","server"],[1,"column"],[3,"ngSubmit"],["serverFrom",""],[1,"line"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],[1,"hint-container"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg"],[1,"hint"],[1,"text",3,"ghs-label"],[1,"line",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","line separator",4,"ngIf"],["class","server-info",4,"ngIf"],["class","line",4,"ngIf"],[1,"line","separator",3,"ngClass"],[1,"label"],["type","text",3,"value","ghs-label","ghs-label-attribute","keyup","change"],["serverUrl",""],[1,"line",3,"ngClass"],["type","number",3,"value","ghs-label","ghs-label-attribute","keyup","change"],["serverPort",""],[1,"password-container"],[1,"spacer"],[3,"click",4,"ngIf"],["type","text",3,"value","ghs-label","ghs-label-attribute","keyup","keydown.enter","change"],["serverPassword",""],[1,"columns",3,"ngClass"],["class","column",4,"ngIf"],[1,"columns"],[3,"ngClass","click"],[4,"ngIf"],[1,"line","separator"],[3,"change"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"value","selected"],[1,"server-info"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["href","https://github.com/Lurkars/ghs-server#how-to-run","target","_blank",1,"server-run"],[3,"click"],[1,"line","title"],[1,"text"],[3,"ngClass"],["class","line characters",4,"ngIf"],["class","line monsters",4,"ngIf"],[1,"line","characters"],["class","edition",4,"ngIf"],[1,"edition"],[1,"line","monsters"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],[1,"ally"],[1,"allied"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1)(2,"form",2,3),t.NdJ("ngSubmit",function(){t.CHM(s);const m=t.MAs(30),O=t.MAs(35),k=t.MAs(45);return t.KtG(i.connect(m.value,O.value,k.value))}),t.TgZ(4,"div",4)(5,"label")(6,"input",5),t.NdJ("change",function(){return i.settingsManager.setServerAutoconnect(!i.settingsManager.settings.serverAutoconnect)}),t.qZA(),t._UZ(7,"span",6),t.qZA()(),t.TgZ(8,"div",4)(9,"label")(10,"div",7)(11,"input",5),t.NdJ("change",function(){return i.settingsManager.setServerSettings(!i.settingsManager.settings.serverSettings)}),t.qZA(),t._UZ(12,"span",6)(13,"img",8),t.TgZ(14,"span",9),t._UZ(15,"span",10),t.qZA()()()(),t.TgZ(16,"div",11),t.YNc(17,rF,2,1,"p",12),t.YNc(18,cF,2,1,"p",12),t.YNc(19,lF,2,1,"p",12),t.YNc(20,gF,2,1,"p",12),t.YNc(21,dF,2,1,"p",12),t.YNc(22,hF,2,1,"p",13),t.qZA(),t.YNc(23,_F,5,2,"div",14),t.YNc(24,fF,11,7,"div",15),t.YNc(25,mF,3,1,"div",16),t.TgZ(26,"div",17)(27,"label",18),t._UZ(28,"span",6),t.qZA(),t.TgZ(29,"input",19,20),t.NdJ("keyup",function(){return 0})("change",function(m){return i.setServerUrl(m)}),t.qZA()(),t.TgZ(31,"div",21)(32,"label",18),t._UZ(33,"span",6),t.qZA(),t.TgZ(34,"input",22,23),t.NdJ("keyup",function(){return 0})("change",function(m){return i.setServerPort(m)}),t.qZA()(),t.TgZ(36,"div",21)(37,"div",24)(38,"label",18),t._UZ(39,"span",6),t.qZA(),t._UZ(40,"span",25),t.YNc(41,vF,2,1,"a",26),t.qZA()(),t.TgZ(42,"div",4)(43,"div",7)(44,"input",27,28),t.NdJ("keyup",function(){return 0})("keydown.enter",function(){t.CHM(s);const m=t.MAs(3);return t.KtG(m.submit())})("change",function(m){return i.setServerPassword(m)}),t.qZA(),t._UZ(46,"img",8),t.TgZ(47,"span",9),t._UZ(48,"span",10),t.qZA()()(),t.TgZ(49,"div",29)(50,"div",1)(51,"div",4)(52,"label")(53,"input",5),t.NdJ("change",function(){return i.settingsManager.setServerWss(!i.settingsManager.settings.serverWss),i.updateServer()}),t.qZA(),t._UZ(54,"span",6),t.qZA()()(),t.YNc(55,CF,4,2,"div",30),t.qZA(),t.TgZ(56,"div",31)(57,"div",1)(58,"div",4)(59,"a",32),t.NdJ("click",function(){return i.reconnect()}),t._UZ(60,"span",6),t.qZA()()(),t.YNc(61,MF,4,1,"div",30),t.qZA()(),t.YNc(62,OF,10,3,"ng-container",33),t.qZA(),t.YNc(63,DF,7,4,"div",30),t.qZA()}if(2&e){const s=t.MAs(30),l=t.MAs(35),m=t.MAs(45);t.xp6(6),t.Q6J("checked",i.settingsManager.settings.serverAutoconnect),t.xp6(1),t.Q6J("ghs-label","server.autoconnect"),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.serverSettings),t.xp6(1),t.Q6J("ghs-label","server.settings"),t.xp6(3),t.Q6J("ghs-label","server.settings.hint"),t.xp6(1),t.Q6J("ngSwitch",i.gameManager.stateManager.wsState()),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.OPEN),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.CONNECTING),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.CLOSING),t.xp6(1),t.Q6J("ngSwitchCase",i.WebSocket.CLOSED),t.xp6(1),t.Q6J("ngSwitchCase",-1),t.xp6(2),t.Q6J("ngIf",i.publicServer),t.xp6(1),t.Q6J("ngIf",-1!=i.selectedServerIndex),t.xp6(1),t.Q6J("ngIf",-1!=i.selectedServerIndex||i.gameManager.stateManager.wsState()!=i.WebSocket.OPEN&&i.gameManager.stateManager.wsState()==i.WebSocket.CONNECTING),t.xp6(1),t.Q6J("ngClass",t.VKq(40,Uw,-1!=i.selectedServerIndex)),t.xp6(2),t.Q6J("ghs-label","server.url"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.serverUrl||"")("ghs-label","server.url")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(42,Uw,-1!=i.selectedServerIndex)),t.xp6(2),t.Q6J("ghs-label","server.port"),t.xp6(1),t.Q6J("value",i.settingsManager.settings.serverPort||"")("ghs-label","server.port")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngClass",t.VKq(44,vT,-1!=i.selectedServerIndex)),t.xp6(3),t.Q6J("ghs-label","server.password"),t.xp6(2),t.Q6J("ngIf",!i.settingsManager.settings.serverPassword),t.xp6(3),t.Q6J("value",i.settingsManager.settings.serverPassword||"")("ghs-label","server.password")("ghs-label-attribute","placeholder"),t.xp6(4),t.Q6J("ghs-label","server.password.hint"),t.xp6(1),t.Q6J("ngClass",t.VKq(46,Uw,-1!=i.selectedServerIndex)),t.xp6(4),t.Q6J("checked",i.settingsManager.settings.serverWss),t.xp6(1),t.Q6J("ghs-label","server.wss"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.serverWss&&s.value&&l.value&&m.value&&i.tryConnect&&i.gameManager.stateManager.wsState()!=i.WebSocket.OPEN),t.xp6(4),t.Q6J("ngClass",t.VKq(48,za,!s.value||!l.value||!m.value)),t.xp6(1),t.Q6J("ghs-label",i.gameManager.stateManager.wsState()==i.WebSocket.OPEN?"server.reconnect":"server.connect"),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.wsState()==i.WebSocket.OPEN),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.wsState()==i.WebSocket.OPEN&&!i.gameManager.stateManager.permissions),t.xp6(1),t.Q6J("ngIf",i.createPermissions||i.gameManager.stateManager.permissions)}},dependencies:[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,Al,wo,ko,wl,Dr,ie,x.Nd],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;row-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));column-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled);align-self:center;padding:0;margin:0}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--ghs-color-gray);align-self:center;padding:0;margin:0}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:underline;color:var(--ghs-color-gray);align-self:center;justify-self:center;padding:0;margin:0}.server[_ngcontent-%COMP%] .server-info[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.server[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)!important;pointer-events:none}.server[_ngcontent-%COMP%] .line.characters[_ngcontent-%COMP%], .server[_ngcontent-%COMP%] .line.monsters[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));flex-direction:column;align-items:flex-start}.server[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .server-run[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.server[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .password-container[_ngcontent-%COMP%]{display:flex;width:100%}.server[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{display:none!important}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:1 span}}"]})),a})();function NF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",7),t.NdJ("change",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.edition=s)}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("value",n)("checked",e.edition==n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function JF(o,a){if(1&o&&(t.TgZ(0,"div",10),t._UZ(1,"label",5),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","data.scenario.group."+n)}}function UF(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function LF(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}const QF=function(o,a){return{disabled:o,available:a}},CT=function(o){return[o]};function RF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",13),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.addSection(s))}),t.YNc(1,UF,2,0,"span",14),t.YNc(2,LF,2,0,"span",14),t._uU(3),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.WLB(6,QF,n.isLocked,e.settingsManager.settings.showAllSections&&n.parent&&e.gameManager.game.scenario&&n.parent==e.gameManager.game.scenario.index&&n.group==e.gameManager.game.scenario.group&&n.edition==e.gameManager.game.scenario.edition))("ghs-tooltip","scenario.tooltip")("ghs-label-args",t.VKq(9,CT,"data.section."+n.name)),t.xp6(1),t.Q6J("ngIf",e.maxSection()>2&&n.index.length<3),t.xp6(1),t.Q6J("ngIf",e.maxSection()>1&&n.index.length<2),t.xp6(1),t.hij(" ",n.index," ")}}function FF(o,a){if(1&o&&(t.TgZ(0,"div",11),t.YNc(1,RF,4,11,"span",12),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.sections(n))}}function qF(o,a){if(1&o&&(t.ynx(0),t.YNc(1,JF,2,1,"div",8),t.YNc(2,FF,2,1,"div",9),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",n&&e.sections(n).length>0),t.xp6(1),t.Q6J("ngIf",e.sections(n).length>0)}}function HF(o,a){1&o&&(t.TgZ(0,"div",15)(1,"label"),t._UZ(2,"span",5),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","monster.filter.noResult"))}let jF=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edition",""),(0,_.Z)(this,"sectionCache",[]),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.edition=d.v.game.scenario&&!d.v.game.scenario.custom&&d.v.game.scenario.edition||!d.v.game.edition&&(!d.v.game.scenario||!d.v.game.scenario.custom)&&d.v.game.party.scenarios.length>0&&d.v.game.party.scenarios[d.v.game.party.scenarios.length-1].edition||d.v.currentEdition(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.sectionCache=[]}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}editions(){return d.v.editionData.filter(e=>e.sections&&e.sections.filter(i=>i.edition==e.edition&&-1!=R.r.settings.editions.indexOf(i.edition)).length>0).map(e=>e.edition)}groups(){return this.edition?d.v.sectionData().filter(e=>e.edition==this.edition).map(e=>e.group).filter((e,i,s)=>s.indexOf(e)===i):[]}sections(e=void 0){if(!this.edition)return[];let i=this.sectionCache.find(s=>s.edition==this.edition&&s.group==e&&s.all==R.r.settings.showAllSections);return i||(i={edition:this.edition,group:e,all:R.r.settings.showAllSections,sections:[]},i.sections=d.v.sectionData().filter(s=>(R.r.settings.showAllSections||!s.parent&&(!d.v.game.scenario||d.v.game.scenario.custom)||d.v.game.scenario&&-1!=d.v.scenarioManager.availableSections(!1,!0).indexOf(s))&&s.edition==this.edition&&s.group==e&&!s.conclusion).sort(d.v.scenarioManager.sortScenarios).map(s=>new ei.U4(s,!1,!1,this.hasSection(s))),this.sectionCache.push(i)),i.sections}noResults(){return this.sectionCache.filter(e=>e.edition==this.edition).every(e=>0==e.sections.length)}maxSection(){return Math.max(...this.sections().map(e=>e.index.length))}hasSection(e){return d.v.game.sections&&d.v.game.sections.some(i=>i.edition==e.edition&&i.index==e.index&&i.group==e.group)}addSection(e){d.v.stateManager.before("addSection",e.index,"data.scenario."+e.name,"data.edition."+e.edition),d.v.scenarioManager.addSection(e),d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-section-menu"]],decls:9,vars:7,consts:[[1,"menu-container","scenario"],[1,"line","editions"],[4,"ngFor","ngForOf"],[1,"line"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","line disabled",4,"ngIf"],["type","radio","name","radio",3,"value","checked","change"],["class","line title",4,"ngIf"],["class","line sections",4,"ngIf"],[1,"line","title"],[1,"line","sections"],["class","section",3,"ngClass","ghs-tooltip","ghs-label-args","click",4,"ngFor","ngForOf"],[1,"section",3,"ngClass","ghs-tooltip","ghs-label-args","click"],[4,"ngIf"],[1,"line","disabled"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,NF,3,3,"label",2),t.qZA(),t.TgZ(3,"div",3)(4,"label")(5,"input",4),t.NdJ("change",function(){return i.settingsManager.setShowAllSections(!i.settingsManager.settings.showAllSections)}),t.qZA(),t._UZ(6,"span",5),t.qZA()(),t.YNc(7,qF,3,2,"ng-container",2),t.YNc(8,HF,3,1,"div",6),t.qZA()),2&e&&(t.xp6(2),t.Q6J("ngForOf",i.gameManager.game.edition?t.VKq(5,CT,i.gameManager.game.edition):i.editions()),t.xp6(3),t.Q6J("checked",i.settingsManager.settings.showAllSections),t.xp6(1),t.Q6J("ghs-label","scenario.showAllSections"),t.xp6(1),t.Q6J("ngForOf",i.groups()),t.xp6(1),t.Q6J("ngIf",i.noResults()))},dependencies:[x.mk,x.sg,x.O5,ie,Ba],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".custom-container[_ngcontent-%COMP%]{display:flex}.custom-container[_ngcontent-%COMP%] .custom-check[_ngcontent-%COMP%]{flex-basis:0}.editions[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:1fr 1fr}.sections[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:repeat(6,1fr);column-gap:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));row-gap:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);border-radius:100%}.sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;color:var(--ghs-color-white)}.sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-disabled) solid}.sections[_ngcontent-%COMP%] .section.disabled[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;color:var(--ghs-color-disabled)}@media (max-width: 600px),(orientation: portrait){.editions[_ngcontent-%COMP%]{grid-template-columns:1fr}.sections[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}"]})),a})();function BF(o,a){1&o&&(t.TgZ(0,"div",22),t._UZ(1,"span",4),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.eventEffects.hint"))}function zF(o,a){1&o&&t._UZ(0,"img",26)}const GF=function(o){return{inactive:o}};function VF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleCharacter(s))}),t._UZ(1,"img",24),t.YNc(2,zF,1,0,"img",25),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(3,GF,-1==e.activeCharacters.indexOf(n))),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",n.absent)}}const o_=function(o,a){return{"negative-value":o,"positive-value":a}};function YF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"span",13)(2,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeHealth(-1))}),t._UZ(3,"img",15),t.qZA()(),t.TgZ(4,"span",16),t._UZ(5,"img",27),t.TgZ(6,"span",18),t._uU(7),t.ALo(8,"ghsValueSign"),t.qZA()(),t.TgZ(9,"span",13)(10,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeHealth(1))}),t._UZ(11,"img",19),t.qZA()(),t.TgZ(12,"span",13)(13,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(-1))}),t._UZ(14,"img",15),t.qZA()(),t.TgZ(15,"span",16),t._UZ(16,"img",28),t.TgZ(17,"span",18),t._uU(18),t.ALo(19,"ghsValueSign"),t.qZA()(),t.TgZ(20,"span",13)(21,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeBless(1))}),t._UZ(22,"img",19),t.qZA()(),t.TgZ(23,"span",13)(24,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(-1))}),t._UZ(25,"img",15),t.qZA()(),t.TgZ(26,"span",16),t._UZ(27,"img",29),t.TgZ(28,"span",18),t._uU(29),t.ALo(30,"ghsValueSign"),t.qZA()(),t.TgZ(31,"span",13)(32,"ghs-pointer-input",14),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCurse(1))}),t._UZ(33,"img",19),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(24,o_,n.minHealth()<0,n.maxHealth()>0)),t.xp6(1),t.Oqu(t.lcZ(8,18,n.minHealth()<0?n.minHealth():n.maxHealth())),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.bless")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(27,o_,n.bless<0,n.bless>0)),t.xp6(1),t.Oqu(t.lcZ(19,20,n.bless)),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.curse")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(30,o_,n.curse<0,n.curse>0)),t.xp6(1),t.Oqu(t.lcZ(30,22,n.curse)),t.xp6(3),t.Q6J("repeat",!0)}}function KF(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-conditions",30),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeConditions(i))}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("entities",n.activeCharacters)("entityConditions",n.entityConditions)("immunities",n.newImmunities)("type","character")}}let Lw=(()=>{var o;class a{constructor(e=!1,i){(0,_.Z)(this,"menu",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"activeCharacters",[]),(0,_.Z)(this,"entityConditions",[]),(0,_.Z)(this,"immunities",[]),(0,_.Z)(this,"newImmunities",[]),(0,_.Z)(this,"health",[]),(0,_.Z)(this,"experience",[]),(0,_.Z)(this,"gold",[]),(0,_.Z)(this,"battleGoals",[]),(0,_.Z)(this,"bless",0),(0,_.Z)(this,"curse",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.menu=e,this.dialogRef=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.close(),this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.characters=d.v.game.figures.filter(e=>e instanceof oe.z).map(e=>e),this.activeCharacters=this.characters.filter(e=>!e.absent&&!e.exhausted),this.activeCharacters.forEach((e,i,s)=>{e.entityConditions.forEach(l=>{!this.entityConditions.find(m=>m.name==l.name)&&s.every(m=>m.entityConditions.find(O=>O.name==l.name&&O.state==l.state))&&this.entityConditions.push(JSON.parse(JSON.stringify(l)))}),e.immunities.forEach(l=>{!this.immunities.find(m=>m==l)&&s.every(m=>m.immunities.find(O=>O==l))&&(this.immunities.push(l),this.newImmunities.push(l))})})}toggleCharacter(e){-1==this.activeCharacters.indexOf(e)?this.activeCharacters.push(e):this.activeCharacters.splice(this.activeCharacters.indexOf(e),1)}changeHealth(e){this.activeCharacters.forEach((i,s)=>{this.health[s]=this.health[s]||0,this.health[s]+=e,i.health+this.health[s]>i.maxHealth?this.health[s]=(0,ae.j9)(i.maxHealth)-i.health:i.health+this.health[s]<0&&(this.health[s]=-i.health)})}minHealth(){return 0==this.health.length&&(this.health[0]=0),this.health.reduce((e,i)=>Math.min(e,i))}maxHealth(){return 0==this.health.length&&(this.health[0]=0),this.health.reduce((e,i)=>Math.max(e,i))}changeExperience(e){this.activeCharacters.forEach((i,s)=>{this.experience[s]=this.experience[s]||0,this.experience[s]+=e,i.progress.experience+this.experience[s]<0&&(this.experience[s]=-i.progress.experience)})}minExperience(){return 0==this.experience.length&&(this.experience[0]=0),this.experience.reduce((e,i)=>Math.min(e,i))}maxExperience(){return 0==this.experience.length&&(this.experience[0]=0),this.experience.reduce((e,i)=>Math.max(e,i))}changeGold(e){this.activeCharacters.forEach((i,s)=>{this.gold[s]=this.gold[s]||0,this.gold[s]+=e,i.progress.gold+this.gold[s]<0&&(this.gold[s]=-i.progress.gold)})}minGold(){return 0==this.gold.length&&(this.gold[0]=0),this.gold.reduce((e,i)=>Math.min(e,i))}maxGold(){return 0==this.gold.length&&(this.gold[0]=0),this.gold.reduce((e,i)=>Math.max(e,i))}changeBattleGoals(e){this.activeCharacters.forEach((i,s)=>{this.battleGoals[s]=this.battleGoals[s]||0,this.battleGoals[s]+=e,i.progress.battleGoals+this.battleGoals[s]<0&&(this.battleGoals[s]=-i.progress.battleGoals),this.battleGoals[s]<-i.progress.battleGoals%3&&(this.battleGoals[s]=-i.progress.battleGoals%3)})}minBattleGoals(){return 0==this.battleGoals.length&&(this.battleGoals[0]=0),this.battleGoals.reduce((e,i)=>Math.min(e,i))}maxBattleGoals(){return 0==this.battleGoals.length&&(this.battleGoals[0]=0),this.battleGoals.reduce((e,i)=>Math.max(e,i))}changeBless(e){this.bless+=e;const i=d.v.attackModifierManager.countUpcomingBlesses();i+this.bless<0?this.bless=-i:i+this.bless>10&&(this.bless=10-i)}changeCurse(e){this.curse+=e;const i=d.v.attackModifierManager.countUpcomingCurses(!1);i+this.curse<0?this.curse=-i:i+this.curse>10&&(this.curse=10-i)}changeConditions(e){this.entityConditions=e}close(){if(this.entityConditions.filter(e=>e.state==re.tT.new||e.state==re.tT.removed).forEach(e=>{d.v.stateManager.before(e.state==re.tT.removed?"removeCondition":"addCondition",e.name,"allCharacters"),this.activeCharacters.find(i=>{e.state==re.tT.removed?d.v.entityManager.removeCondition(i,e,e.permanent):d.v.entityManager.addCondition(i,e,i.active,i.off,e.permanent)}),d.v.stateManager.after()}),this.entityConditions.forEach(e=>{this.activeCharacters.find(i=>i.entityConditions.find(s=>s.name==e.name&&!s.expired&&s.value!=e.value))&&(d.v.stateManager.before("setConditionValue",e.name,""+e.value,"allCharacters"),this.activeCharacters.find(i=>{const s=i.entityConditions.find(l=>l.name==e.name&&!l.expired);s&&s.value!=e.value&&(s.value=e.value)}),d.v.stateManager.after())}),this.immunities.forEach(e=>{-1==this.newImmunities.indexOf(e)&&(d.v.stateManager.before("removeImmunity",e,"allCharacters"),this.activeCharacters.find(i=>{i.immunities=i.immunities.filter(s=>s!=e)}),d.v.stateManager.after())}),this.newImmunities.forEach(e=>{-1==this.immunities.indexOf(e)&&(d.v.stateManager.before("addImmunity",e,"allCharacters"),this.activeCharacters.find(i=>{i.immunities.push(e)}),d.v.stateManager.after())}),(0!=this.minHealth()||0!=this.maxHealth())&&(d.v.stateManager.before("changeCharacterHP",(0,he.uZ)(0!=this.minHealth()?this.minHealth():this.maxHealth())),this.activeCharacters.forEach((e,i)=>{this.health[i]&&0!=this.health[i]&&(d.v.entityManager.changeHealth(e,e,this.health[i]),this.health[i]=0),(e.maxHealth>0&&e.health<=0||e.exhausted)&&(e.exhausted=!0)}),d.v.stateManager.after()),(0!=this.minExperience()||0!=this.maxExperience())&&(d.v.stateManager.before("changeCharacterXP",(0,he.uZ)(0!=this.minExperience()?this.minExperience():this.maxExperience())),this.activeCharacters.forEach((e,i)=>{this.experience[i]&&0!=this.experience[i]&&(e.progress.experience+=this.experience[i],this.experience[i]=0)}),d.v.stateManager.after()),(0!=this.minGold()||0!=this.maxGold())&&(d.v.stateManager.before("changeCharacterGold",(0,he.uZ)(0!=this.minGold()?this.minGold():this.maxGold())),this.activeCharacters.forEach((e,i)=>{this.gold[i]&&0!=this.gold[i]&&(e.progress.gold+=this.gold[i],this.gold[i]=0)}),d.v.stateManager.after()),(0!=this.minBattleGoals()||0!=this.maxBattleGoals())&&(d.v.stateManager.before("changeCharacterBattleGoals",(0,he.uZ)(0!=this.minBattleGoals()?this.minBattleGoals():this.maxBattleGoals())),this.activeCharacters.forEach((e,i)=>{this.battleGoals[i]&&0!=this.battleGoals[i]&&(e.progress.battleGoals+=this.battleGoals[i],this.battleGoals[i]=0)}),d.v.stateManager.after()),0!=this.bless){d.v.stateManager.before("changeCharacterBless",(0,he.uZ)(this.bless));let e=Math.abs(this.bless),i=0;for(;e>0;){const s=this.activeCharacters[i%this.activeCharacters.length];if(this.bless<0){let l=s.attackModifierDeck.cards.find((m,O)=>m.type==Lt.kl.bless&&O>s.attackModifierDeck.current);l&&(s.attackModifierDeck.cards.splice(s.attackModifierDeck.cards.indexOf(l),1),e--)}else d.v.attackModifierManager.addModifier(s.attackModifierDeck,new Lt.YY(Lt.kl.bless)),e--;i++}d.v.stateManager.after()}if(0!=this.curse){d.v.stateManager.before("changeCharacterCurse",(0,he.uZ)(this.curse));let e=Math.abs(this.curse),i=0;for(;e>0;){const s=this.activeCharacters[i%this.activeCharacters.length];if(this.curse<0){let l=s.attackModifierDeck.cards.find((m,O)=>m.type==Lt.kl.curse&&O>s.attackModifierDeck.current);l&&(s.attackModifierDeck.cards.splice(s.attackModifierDeck.cards.indexOf(l),1),e--)}else d.v.attackModifierManager.addModifier(s.attackModifierDeck,new Lt.YY(Lt.kl.curse)),e--;i++}d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-effects"]],decls:47,vars:40,consts:[[1,"event-effects-dialog"],[1,"header"],[1,"name"],[1,"ghs-svg",3,"src"],[3,"ghs-label"],["class","text",4,"ngIf"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"scroll-container","container"],["class","entity-container",4,"ngIf"],[3,"entities","entityConditions","immunities","type","change",4,"ngIf"],[1,"entity-container"],[1,"progress"],[1,"item"],[1,"button",3,"repeat","singleClick"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/experience.svg"],[1,"badge",3,"ngClass"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/loot.svg",1,"gold"],["type","checkbox","disabled","true","checked","true"],[1,"text"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],["class","absent","src","./assets/images/status/absent.svg",4,"ngIf"],["src","./assets/images/status/absent.svg",1,"absent"],["src","./assets/images/status/health.svg"],["src","./assets/images/status/bless.svg"],["src","./assets/images/status/curse.svg"],[3,"entities","entityConditions","immunities","type","change"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"img",3)(4,"span",4),t.qZA(),t.YNc(5,BF,2,1,"div",5),t.TgZ(6,"div",6),t.YNc(7,VF,3,5,"a",7),t.qZA()(),t.TgZ(8,"div",8),t.YNc(9,YF,34,33,"div",9),t.YNc(10,KF,1,4,"ghs-conditions",10),t.TgZ(11,"div",11)(12,"span",12),t._UZ(13,"span",4),t.qZA(),t.TgZ(14,"span",13)(15,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeExperience(-1)}),t._UZ(16,"img",15),t.qZA()(),t.TgZ(17,"span",16),t._UZ(18,"img",17),t.TgZ(19,"span",18),t._uU(20),t.ALo(21,"ghsValueSign"),t.qZA()(),t.TgZ(22,"span",13)(23,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeExperience(1)}),t._UZ(24,"img",19),t.qZA()(),t.TgZ(25,"span",13)(26,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeGold(-1)}),t._UZ(27,"img",15),t.qZA()(),t.TgZ(28,"span",16),t._UZ(29,"img",20),t.TgZ(30,"span",18),t._uU(31),t.ALo(32,"ghsValueSign"),t.qZA()(),t.TgZ(33,"span",13)(34,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeGold(1)}),t._UZ(35,"img",19),t.qZA()(),t.TgZ(36,"span",13)(37,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeBattleGoals(-1)}),t._UZ(38,"img",15),t.qZA()(),t.TgZ(39,"span",16),t._UZ(40,"input",21),t.TgZ(41,"span",18),t._uU(42),t.ALo(43,"ghsValueSign"),t.qZA()(),t.TgZ(44,"span",13)(45,"ghs-pointer-input",14),t.NdJ("singleClick",function(){return i.changeBattleGoals(1)}),t._UZ(46,"img",19),t.qZA()()()()()),2&e&&(t.xp6(3),t.Q6J("src","./assets/images/event"+(i.menu?"-effects":"")+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","scenario.eventEffects"+(i.menu?".hint":"")),t.xp6(1),t.Q6J("ngIf",!i.menu),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(3),t.Q6J("ghs-label","scenario.eventEffects.progress"),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.experience")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(31,o_,i.minExperience()<0,i.maxExperience()>0)),t.xp6(1),t.Oqu(t.lcZ(21,25,i.minExperience()<0?i.minExperience():i.maxExperience())),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.character.progress.gold")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(34,o_,i.minGold()<0,i.maxGold()>0)),t.xp6(1),t.Oqu(t.lcZ(32,27,i.minGold()<0?i.minGold():i.maxGold())),t.xp6(3),t.Q6J("repeat",!0),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.character.progress.battleGoals")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(37,o_,i.minBattleGoals()<0,i.maxBattleGoals()>0)),t.xp6(1),t.Oqu(t.lcZ(43,29,i.minBattleGoals()<0?i.minBattleGoals():i.maxBattleGoals())),t.xp6(3),t.Q6J("repeat",!0))},dependencies:[x.mk,x.sg,x.O5,zu,ie,An,Kd],styles:[".event-effects-dialog[_ngcontent-%COMP%]{position:relative}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor)) 0}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{position:relative;cursor:pointer;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-radius:100%}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .absent[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));width:auto;filter:var(--ghs-filter-white)}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.inactive[_ngcontent-%COMP%]{filter:grayscale(.7);border-color:transparent}.event-effects-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{filter:none;opacity:.7;border-color:var(--ghs-color-gray)}.event-effects-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));align-content:start;margin:0 auto}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%] img.gold[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%]:hover, .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]:hover{opacity:.4}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline);text-align:center}.event-effects-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{display:flex;justify-content:center;grid-column:span 3;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}"]})),a})();const $F=function(o,a,n,e,i,s){return{new:o,full:a,half:n,inert:e,always:i,consumed:s}};let MT=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"sanitizer",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"ElementState",Gn.fq),(0,_.Z)(this,"svg",""),this.sanitizer=e}ngOnInit(){this.type&&!this.element&&(this.element=new Gn.G3(this.type),this.element.state=Gn.fq.strong),fetch("./assets/images/element/"+this.element.type+".svg").then(e=>e.text()).then(e=>{this.svg=this.sanitizer.bypassSecurityTrustHtml(e)}).catch(e=>{console.error("Invalid src: ./assets/images/element/"+this.element.type+".svg")})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(sr))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-element-icon"]],inputs:{type:"type",element:"element"},decls:1,vars:13,consts:[[1,"element-svg",3,"innerHTML","ghs-label","ghs-label-attribute","ngClass"]],template:function(e,i){1&e&&t._UZ(0,"span",0),2&e&&(t.Tol(i.element.type),t.Q6J("innerHTML",i.svg,t.oJD)("ghs-label","game.element."+i.element.type)("ghs-label-attribute","title")("ngClass",t.HTZ(6,$F,i.element.state==i.ElementState.new,i.element.state==i.ElementState.strong,i.element.state==i.ElementState.waning,i.element.state==i.ElementState.inert,i.element.state==i.ElementState.always,i.element.state==i.ElementState.consumed)))},dependencies:[x.mk,ie],styles:[".element-svg{width:100%;height:100%}.element-svg svg{width:100%;height:100%}.element-svg #bg{transition:clip-path 1s}.element-svg.inert #bg{clip-path:inset(100% 0px 0px 0px)}.element-svg.full #bg,.element-svg.always #bg,.element-svg.new #bg{clip-path:inset(0% 0px 0px 0px)}.element-svg.new{opacity:.7}.element-svg.consumed #bg{opacity:.3!important}.element-svg.half #bg{clip-path:inset(50% 0px 0px 0px)}\n"],encapsulation:2})),a})();const WF=function(o,a){return{consume:o,fh:a}};let XF=(()=>{var o;class a{constructor(){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ElementState",Gn.fq)}toggleElement(e=!1){const i=d.v.nextElementState(this.element,e);d.v.stateManager.before("updateElement","game.element."+this.element.type,"game.element.state."+i),this.element.state=i,d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-element"]],inputs:{element:"element"},decls:3,vars:5,consts:[[1,"element",3,"ngClass"],[3,"element"],[3,"singleClick","doubleClick"]],template:function(e,i){1&e&&(t.TgZ(0,"span",0),t._UZ(1,"ghs-element-icon",1),t.TgZ(2,"ghs-pointer-input",2),t.NdJ("singleClick",function(){return i.toggleElement()})("doubleClick",function(){return i.toggleElement(!0)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.WLB(2,WF,i.element.state==i.ElementState.consumed,i.settingsManager.settings.fhStyle)),t.xp6(1),t.Q6J("element",i.element))},dependencies:[x.mk,MT,An],styles:["ghs-element .element{display:block;position:relative;width:calc(var(--ghs-unit) * 6.4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 6.4 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * .75)}ghs-element .element:hover{width:calc(var(--ghs-unit) * 7.4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 7.4 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * .25)}ghs-element .element ghs-pointer-input{position:absolute;top:0;left:0;width:100%;height:100%}ghs-element .element ghs-element-icon{position:absolute;top:0;left:0;width:100%;height:100%}ghs-element .element .element-svg #outline{display:none}ghs-element .element .element-svg #outline path,ghs-element .element .element-svg #symbol path{fill:var(--ghs-color-gray)!important}ghs-element .element .element-svg.dark #bg{fill:#203184!important}ghs-element .element:hover .element-svg #outline,ghs-element .element:hover .element-svg #symbol,ghs-element .element .element-svg.new #outline,ghs-element .element .element-svg.new #symbol,ghs-element .element .element-svg.full #outline,ghs-element .element .element-svg.full #symbol,ghs-element .element .element-svg.always #outline,ghs-element .element .element-svg.always #symbol,ghs-element .element .element-svg.half #outline,ghs-element .element .element-svg.half #symbol{display:inherit}ghs-element .element:hover .element-svg #outline path,ghs-element .element:hover .element-svg #symbol path,ghs-element .element .element-svg.new #outline path,ghs-element .element .element-svg.new #symbol path,ghs-element .element .element-svg.full #outline path,ghs-element .element .element-svg.full #symbol path,ghs-element .element .element-svg.always #outline path,ghs-element .element .element-svg.always #symbol path,ghs-element .element .element-svg.half #outline path,ghs-element .element .element-svg.half #symbol path{fill:var(--ghs-color-white)!important}ghs-element .element:hover .element-svg.new #outline,ghs-element .element .element-svg.new.new #outline,ghs-element .element .element-svg.full.new #outline,ghs-element .element .element-svg.always.new #outline,ghs-element .element .element-svg.half.new #outline{display:none}ghs-element .element:hover .element-svg{opacity:1!important}ghs-element .element:hover .element-svg #bg{opacity:1!important}ghs-element .element.consume:before{opacity:.3}ghs-element .element.consume.fh:before{left:55%;top:55%;width:50%;height:50%}\n"],encapsulation:2})),a})(),tq=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),this.dialog=e}open(){this.dialog.open(Dw,{panelClass:["dialog-invert"]})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-party-sheet"]],decls:2,vars:3,consts:[[1,"button",3,"ghs-label","ghs-label-attribute","click"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"a",0),t.NdJ("click",function(){return i.open()}),t._UZ(1,"span",1),t.qZA()),2&e&&(t.Q6J("ghs-label","party.sheet")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label",i.gameManager.game.party.name||"party.sheet"))},dependencies:[ie],styles:[".button[_ngcontent-%COMP%]{cursor:pointer;height:100%;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-small-text-factor) * var(--ghs-barsize));text-shadow:var(--ghs-outline)}.button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}"]})),a})();const eq=["mainMenuButton"];function nq(o,a){1&o&&t._UZ(0,"img",18),2&o&&t.Q6J("ghs-label","server.error")("ghs-label-attribute","title")}function iq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openMenu(i,s.SubMenu.server))}),t._UZ(1,"img",20),t.qZA()}2&o&&(t.Q6J("ghs-label","server.connected")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.connected")("ghs-label-attribute","title"))}function oq(o,a){1&o&&t._UZ(0,"img",21),2&o&&t.Q6J("ghs-label","server.connecting")("ghs-label-attribute","title")}function aq(o,a){1&o&&t._UZ(0,"img",22),2&o&&t.Q6J("ghs-label","server.closing")("ghs-label-attribute","title")}function sq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.settingsManager.settings.serverAutoconnect?s.gameManager.stateManager.connect():s.openMenu(i,s.SubMenu.server))}),t._UZ(1,"img",18)(2,"img",23),t.qZA()}2&o&&(t.Q6J("ghs-label","server.reconnected")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.closed")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.closed")("ghs-label-attribute","title"))}function rq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.settingsManager.settings.serverAutoconnect?s.gameManager.stateManager.connect():s.openMenu(i,s.SubMenu.server))}),t._UZ(1,"img",24),t.qZA()}2&o&&(t.Q6J("ghs-label","server.reconnected")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","server.disconnected")("ghs-label-attribute","title"))}function cq(o,a){1&o&&t._UZ(0,"img",25)}function lq(o,a){1&o&&(t.TgZ(0,"span",26),t._uU(1,"\xb0"),t.qZA())}const nm=function(o){return{denied:o}};function gq(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",30),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.character_add))}),t._UZ(2,"span",31),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(2,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.characters))("ghs-label","hints.addCharacters")}}function dq(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",32)(2,"span",33),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.scenario))}),t.qZA()(),t._UZ(3,"span",34),t.TgZ(4,"a",32)(5,"span",33),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.monster_add))}),t.qZA()(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngClass",t.VKq(5,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.scenario)),t.xp6(1),t.Q6J("ghs-label","hints.setScenario"),t.xp6(1),t.Q6J("ghs-label","or"),t.xp6(1),t.Q6J("ngClass",t.VKq(7,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters)),t.xp6(1),t.Q6J("ghs-label","hints.addMonsters")}}function hq(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",30),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openMenu(i,s.SubMenu.monster_add))}),t._UZ(2,"span",31),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3);t.xp6(2),t.Q6J("ngClass",t.VKq(2,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.monsters))("ghs-label","hints.addMonsters")}}function uq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",34),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","hints."+n.hintState)}}const _q=function(o){return{visible:o}};function pq(o,a){if(1&o&&(t.TgZ(0,"div",27),t.ynx(1,7),t.YNc(2,gq,3,4,"ng-container",28),t.YNc(3,dq,6,9,"ng-container",28),t.YNc(4,hq,3,4,"ng-container",28),t.YNc(5,uq,2,1,"ng-container",29),t.BQk(),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(5,_q,n.init)),t.xp6(1),t.Q6J("ngSwitch",n.hintState),t.xp6(1),t.Q6J("ngSwitchCase","characters"),t.xp6(1),t.Q6J("ngSwitchCase","scenario"),t.xp6(1),t.Q6J("ngSwitchCase","monsters")}}function fq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",35),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openEventEffects())}),t._UZ(1,"img",36),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images/event"+(n.gameManager.game.round>0||n.gameManager.game.state==n.GameState.next?"-effects":"")+".svg",t.LSH)}}function mq(o,a){1&o&&t._UZ(0,"ghs-party-sheet")}function vq(o,a){1&o&&t._UZ(0,"ghs-element",37),2&o&&t.Q6J("element",a.$implicit)}function Cq(o,a){if(1&o&&(t.ynx(0),t.YNc(1,nq,1,2,"img",6),t.ynx(2,7),t.YNc(3,iq,2,4,"a",8),t.YNc(4,oq,1,2,"img",9),t.YNc(5,aq,1,2,"img",10),t.YNc(6,sq,3,6,"a",8),t.YNc(7,rq,2,4,"a",8),t.BQk(),t.YNc(8,cq,1,0,"img",11),t.YNc(9,lq,2,0,"span",12),t.YNc(10,pq,6,7,"div",13),t._UZ(11,"span",14),t.YNc(12,fq,2,1,"div",15),t.YNc(13,mq,1,0,"ghs-party-sheet",5),t._UZ(14,"span",14),t.TgZ(15,"div",16),t.YNc(16,vq,1,1,"ghs-element",17),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.serverError),t.xp6(1),t.Q6J("ngSwitch",n.gameManager.stateManager.wsState()),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.OPEN),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CONNECTING),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CLOSING),t.xp6(1),t.Q6J("ngSwitchCase",n.WebSocket.CLOSED),t.xp6(1),t.Q6J("ngSwitchCase",-1),t.xp6(1),t.Q6J("ngIf",n.syncing()),t.xp6(1),t.Q6J("ngIf",!n.syncing()&&-99!=n.gameManager.stateManager.wsState()&&n.gameManager.game.server),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.hints),t.xp6(2),t.Q6J("ngIf",n.gameManager.game.scenario&&n.gameManager.characterManager.characterCount()>0),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.partySheet),t.xp6(2),t.Q6J("ngClass",t.VKq(14,nm,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.elements)),t.xp6(1),t.Q6J("ngForOf",n.gameManager.game.elementBoard)}}let Yr=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"mainMenuButton",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"WebSocket",WebSocket),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"menuState",cg.main),(0,_.Z)(this,"elements",[Gn.W_.fire,Gn.W_.ice,Gn.W_.air,Gn.W_.earth,Gn.W_.light,Gn.W_.dark]),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"hintState",""),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){setTimeout(()=>{this.init=!0},R.r.settings.disableAnimations?0:1500),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.hintStateValue()!=this.hintState&&(this.init=!1,setTimeout(()=>{this.hintState=this.hintStateValue(),this.init=!0},R.r.settings.disableAnimations?0:500))}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}syncing(){return window.document.body.classList.contains("server-sync")}hintStateValue(){return d.v.game.playerCount<1&&d.v.game.figures.every(e=>!(e instanceof oe.z||e instanceof Ze.Q))?"characters":!d.v.game.scenario&&d.v.game.figures.every(e=>!(e instanceof Ze.Q))?"scenario":d.v.game.figures.every(e=>!(e instanceof Ze.Q))?"monsters":d.v.game.figures.every(e=>!(e instanceof Ze.Q)||0==e.entities.length)?"addMonsterEntities":d.v.game.figures.some(e=>e.active)?d.v.game.round<3?"active-full":"active":d.v.game.state==ge.D2.draw?d.v.game.figures.some(e=>e instanceof oe.z&&!e.absent&&d.v.entityManager.isAlive(e)&&R.r.settings.initiativeRequired&&e.initiative<=0)?d.v.game.round<3?"draw-full":"draw-short":"draw":d.v.game.state==ge.D2.next?"next":""}openMenu(e,i=void 0){this.dialog.open(z6,{panelClass:"dialog",data:{subMenu:null!=i&&i|cg.main,standalone:this.standalone},maxWidth:"90vw",positionStrategy:this.overlay.position().flexibleConnectedTo(this.mainMenuButton).withPositions([new ti.tR({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"})]).withDefaultOffsetX(10)})}openEventEffects(){this.dialog.open(Lw,{panelClass:"dialog",data:d.v.game.round>0||d.v.game.state==ge.D2.next})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-header"]],viewQuery:function(e,i){if(1&e&&t.Gf(eq,5),2&e){let s;t.iGM(s=t.CRH())&&(i.mainMenuButton=s.first)}},inputs:{standalone:"standalone"},decls:6,vars:4,consts:[[3,"ngClass"],[1,"main-menu"],[1,"menu-button","active-outline",3,"ghs-label","ghs-label-attribute","click"],["mainMenuButton",""],["src","./assets/images/menu.svg",1,"ghs-svg"],[4,"ngIf"],["src","./assets/images/warning.svg","class","ghs-svg server-connection closed",3,"ghs-label","ghs-label-attribute",4,"ngIf"],[3,"ngSwitch"],["class","server-connection-status",3,"ghs-label","ghs-label-attribute","click",4,"ngSwitchCase"],["src","./assets/images/server-connection.svg","class","ghs-svg server-connection connecting",3,"ghs-label","ghs-label-attribute",4,"ngSwitchCase"],["src","./assets/images/server-connection.svg","class","ghs-svg server-connection closing",3,"ghs-label","ghs-label-attribute",4,"ngSwitchCase"],["src","./assets/images/shuffle.svg","class","server-connection syncing",4,"ngIf"],["class","game-server",4,"ngIf"],["class","hints",3,"ngClass",4,"ngIf"],[1,"spacer"],["class","event-effects",3,"click",4,"ngIf"],[1,"elements",3,"ngClass"],[3,"element",4,"ngFor","ngForOf"],["src","./assets/images/warning.svg",1,"ghs-svg","server-connection","closed",3,"ghs-label","ghs-label-attribute"],[1,"server-connection-status",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","connected",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","connecting",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","closing",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","closed",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/server-connection.svg",1,"ghs-svg","server-connection","disconnected",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/shuffle.svg",1,"server-connection","syncing"],[1,"game-server"],[1,"hints",3,"ngClass"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"menu-hint",3,"click"],[3,"ngClass","ghs-label"],[1,"menu-hint",3,"ngClass"],[3,"ghs-label","click"],[3,"ghs-label"],[1,"event-effects",3,"click"],[1,"ghs-svg",3,"src"],[3,"element"]],template:function(e,i){1&e&&(t.TgZ(0,"header",0)(1,"div",1)(2,"a",2,3),t.NdJ("click",function(l){return i.openMenu(l)}),t._UZ(4,"img",4),t.qZA()(),t.YNc(5,Cq,17,16,"ng-container",5),t.qZA()),2&e&&(t.Q6J("ngClass",i.settingsManager.settings.theme),t.xp6(2),t.Q6J("ghs-label","menu.main")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ngIf",!i.standalone))},dependencies:[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,XF,tq,ie],styles:['header[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;position:relative;overflow:hidden}header[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-image:url(bar.e331a4ef847b1c19.jpg);background-size:100% 105%;background-position:bottom left;background-repeat:no-repeat;z-index:-1}header.fh[_ngcontent-%COMP%]:before{background-image:url(bar.56898105bfacea25.jpg)}header.modern[_ngcontent-%COMP%]:before{background-image:url(dialog_background_modern.c233015926c13e5e.png)}header.modern[_ngcontent-%COMP%]:after{content:" ";position:absolute;bottom:0;left:0;width:100%;height:4%;background:linear-gradient(90deg,var(--ghs-color-darkgray) 0%,var(--ghs-color-white) 35%,var(--ghs-color-white) 65%,var(--ghs-color-darkgray) 100%);opacity:.2}header[_ngcontent-%COMP%] .menu-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;position:relative;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor) * var(--ghs-barsize));text-shadow:var(--ghs-outline);color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));margin:calc(var(--ghs-unit) * 2.2 * var(--ghs-text-factor) * var(--ghs-barsize));cursor:pointer}header[_ngcontent-%COMP%] .menu-button[_ngcontent-%COMP%]:hover, header[_ngcontent-%COMP%] .menu-button.active-button[_ngcontent-%COMP%]{color:var(--ghs-color-white);filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] a.server-connection-status[_ngcontent-%COMP%]{display:flex;cursor:pointer}header[_ngcontent-%COMP%] .game-server[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));align-self:center;margin-top:calc(var(--ghs-unit) * -.75 * var(--ghs-text-factor) * var(--ghs-barsize));margin-left:calc(var(--ghs-unit) * -1.2 * var(--ghs-text-factor) * var(--ghs-barsize));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor) * var(--ghs-barsize))}header[_ngcontent-%COMP%] .server-connection[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));margin-right:calc(var(--ghs-unit) * 1);align-self:center}header[_ngcontent-%COMP%] .server-connection.connected[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.connecting[_ngcontent-%COMP%]{filter:var(--ghs-filter-blue) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.closing[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.closed[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.disconnected[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .server-connection.syncing[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);animation:ghs-spinning 1.5s linear infinite}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-small-text-factor) * var(--ghs-barsize));opacity:0;transition:opacity .5s ease-in-out}header[_ngcontent-%COMP%] .hints.visible[_ngcontent-%COMP%]{opacity:1}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize))}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%] .menu-hint[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-small-text-factor) * var(--ghs-barsize));text-shadow:var(--ghs-outline)}header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%] .menu-hint[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}@media (max-width: 600px),(orientation: portrait){header[_ngcontent-%COMP%] .hints[_ngcontent-%COMP%]{flex-direction:column;justify-content:center}}header[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:100%;margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize))}header[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray);height:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize));width:auto}header[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}header[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center}header[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));cursor:pointer}header[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:100%;width:100%}']})),a})();function Mq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.empty"))}function Oq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.missingInitiative"))}function Pq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.active"))}function yq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirm"))}function bq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.next())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmTurns"))}function xq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.finish"))}function wq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.finishScenario(!0))}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmFinish"))}function kq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.failed"))}function Tq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.finishScenario(!1))}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmFailed"))}function Zq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.resetScenario())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirmReset"))}function Aq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",5),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label",n.gameManager.game.state==n.GameState.next?"round.hint.continueNext":"round.hint.continueDraw")}}function Sq(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",5),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.battleGoals"))}function Eq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.confirm())}),t._UZ(1,"span",5),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","round.hint.confirm"))}let Dq=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"GameState",ge.D2),this.dialogRef=e,this.dialog=i}confirm(){d.v.game.figures.find(i=>i.active)&&(d.v.stateManager.before("endAllTurns"),d.v.game.figures.forEach(i=>d.v.roundManager.afterTurn(i)),d.v.stateManager.after()),this.next()}next(){this.dialogRef.close(!0)}finishScenario(e){if(d.v.game.scenario){const i=d.v.sectionData(d.v.game.scenario.edition).filter(s=>!!d.v.game.scenario&&s.edition==d.v.game.scenario.edition&&s.parent==d.v.game.scenario.index&&s.group==d.v.game.scenario.group&&s.conclusion);0!=i.length&&e?this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.game.scenario}}).closed.subscribe({next:s=>{s&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,conclusion:s,success:e}})}}):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:e}})}}resetScenario(){d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.stateManager.after(1e3)}empty(){return 0==d.v.game.figures.length}missingInitiative(){return d.v.game.figures.some(e=>R.r.settings.initiativeRequired&&(e instanceof oe.z&&d.v.entityManager.isAlive(e)&&!e.absent||e instanceof Nn.k)&&e.getInitiative()<1)}active(){return null!=d.v.game.figures.find(e=>e.active&&!e.off)}battleGoals(){return!this.missingInitiative()&&R.r.settings.battleGoals&&R.r.settings.battleGoalsReminder&&null!=d.v.game.scenario&&d.v.roundManager.firstRound&&!d.v.game.figures.every(e=>!(e instanceof oe.z)||e.battleGoal||e.absent)}finish(){return!1}failed(){return!this.active()&&!this.empty()&&d.v.game.figures.some(e=>e instanceof oe.z)&&d.v.game.figures.every(e=>!(e instanceof oe.z)||e instanceof oe.z&&(!d.v.entityManager.isAlive(e)||e.absent))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-hint-dialog"]],decls:15,vars:13,consts:[[1,"hint-dialog"],[1,"hint"],[4,"ngIf"],[3,"click",4,"ngIf"],["class","small",3,"click",4,"ngIf"],[3,"ghs-label"],[3,"click"],[1,"small",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,Mq,2,1,"p",2),t.YNc(3,Oq,2,1,"p",2),t.YNc(4,Pq,2,1,"p",2),t.YNc(5,yq,2,1,"a",3),t.YNc(6,bq,2,1,"a",4),t.YNc(7,xq,2,1,"p",2),t.YNc(8,wq,2,1,"a",3),t.YNc(9,kq,2,1,"p",2),t.YNc(10,Tq,2,1,"a",3),t.YNc(11,Zq,2,1,"a",3),t.YNc(12,Aq,2,1,"a",3),t.YNc(13,Sq,2,1,"p",2),t.YNc(14,Eq,2,1,"a",3),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngIf",i.empty()),t.xp6(1),t.Q6J("ngIf",i.missingInitiative()),t.xp6(1),t.Q6J("ngIf",i.active()),t.xp6(1),t.Q6J("ngIf",i.active()),t.xp6(1),t.Q6J("ngIf",i.active()),t.xp6(1),t.Q6J("ngIf",i.finish()),t.xp6(1),t.Q6J("ngIf",i.finish()),t.xp6(1),t.Q6J("ngIf",i.failed()),t.xp6(1),t.Q6J("ngIf",i.failed()),t.xp6(1),t.Q6J("ngIf",i.failed()),t.xp6(1),t.Q6J("ngIf",i.finish()||i.failed()),t.xp6(1),t.Q6J("ngIf",i.battleGoals()),t.xp6(1),t.Q6J("ngIf",i.battleGoals()))},dependencies:[x.O5,ie],styles:[".hint-dialog[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);text-align:center}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;min-height:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor))}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor))}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-gray);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.hint-dialog[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] a.small[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));font-style:italic}"]})),a})();const Iq=function(o){return{selected:o}};function Nq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",6),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleSelect(s.name))}),t._UZ(1,"img",7),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(3,Iq,n.name==e.selected)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Oqu(e.gameManager.characterManager.characterName(n,!0))}}const Jq=function(o,a){return{disabled:o,remove:a}},Uq=function(o){return[o]};function Lq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",8),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(1,"span",0),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,Jq,!(n.selected||n.edit&&n.data.selected),n.edit&&!n.selected&&n.data.selected)),t.xp6(1),t.Q6J("ghs-label",n.edit&&!n.selected&&n.data.selected?"game.loot.remove":n.edit&&n.data.selected&&n.selected==n.data.selected?"game.loot.keep":"game.loot.apply")("ghs-label-args",t.VKq(6,Uq,n.selected||n.data.selected||""))}}function Qq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",9),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.close())}),t._UZ(1,"span",10),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","cancel"))}const Rq=function(o,a){return[o,a]};let OT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"selected",void 0),(0,_.Z)(this,"loot",void 0),(0,_.Z)(this,"edit",!1),this.data=e,this.dialogRef=i,this.loot=e.loot,this.selected=e.selected||"",this.edit=e.edit||!1,this.characters=d.v.game.figures.filter(s=>s instanceof oe.z&&!s.absent&&d.v.entityManager.isAlive(s)).map(s=>s)}toggleSelect(e){this.selected=this.selected==e?"":e}close(){this.dialogRef.close(this.selected)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-apply-dialog"]],decls:7,vars:8,consts:[[3,"ghs-label","ghs-label-args"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"menu"],[3,"ngClass","click",4,"ngIf"],["class","cancel",3,"click",4,"ngIf"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[3,"ngClass","click"],[1,"cancel",3,"click"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"p"),t._UZ(1,"span",0),t.qZA(),t.TgZ(2,"div",1),t.YNc(3,Nq,4,5,"div",2),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,Lq,2,8,"a",4),t.YNc(6,Qq,2,1,"a",5),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ghs-label","game.loot.chooseCharacter")("ghs-label-args",t.WLB(5,Rq,""+i.gameManager.lootManager.getValue(i.loot),"game.loot."+i.loot.type)),t.xp6(2),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngIf",i.selected||i.data.selected),t.xp6(1),t.Q6J("ngIf",!i.selected&&!i.data.selected))},dependencies:[x.mk,x.sg,x.O5,ie],styles:["p[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-align:center}.characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:.25em;padding:.25em;border:1px solid transparent}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.menu[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;color:var(--ghs-color-green)}.menu[_ngcontent-%COMP%] a.remove[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray)}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5;color:var(--ghs-color-gray)}"]})),a})();const Fq=function(o,a){return{fh:o,modern:a}},qq=function(o,a){return[o,a]},Hq=function(o){return{autosell:o}};let Qw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"loot",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"autoSell",!1),this.data=e,this.dialogRef=i,this.dialog=s,this.item=e.item,this.loot=e.loot,this.character=e.character,this.autoSell=null!=this.character.progress.items.find(l=>l.name==""+this.item.id&&l.edition==this.item.edition)}close(){this.dialogRef.close()}openDialog(){this.dialog.open(gg,{data:{item:this.item}})}apply(){this.dialogRef.close(this.item)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-random-item-dialog"]],decls:10,vars:17,consts:[[1,"random-item-dialog",3,"ngClass"],[1,"scroll-container"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"item",3,"ngClass"],[3,"item","flipped","editionLabel","click"],[1,"menu"],[1,"cancel",3,"click"],[3,"ghs-label"],[1,"apply",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"div",3)(4,"ghs-item",4),t.NdJ("click",function(){return i.openDialog()}),t.qZA()(),t.TgZ(5,"div",5)(6,"a",6),t.NdJ("click",function(){return i.close()}),t._UZ(7,"span",7),t.qZA(),t.TgZ(8,"a",8),t.NdJ("click",function(){return i.apply()}),t._UZ(9,"span",7),t.qZA()()()()),2&e&&(t.Q6J("ngClass",t.WLB(9,Fq,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","game.loot.random_item.draw")("ghs-label-args",t.WLB(12,qq,i.character.name,i.gameManager.characterManager.characterName(i.character))),t.xp6(1),t.Q6J("ngClass",t.VKq(15,Hq,i.autoSell)),t.xp6(1),t.Q6J("item",i.item)("flipped",!0)("editionLabel",i.gameManager.currentEdition()),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(2),t.Q6J("ghs-label","game.loot.random_item.apply"))},dependencies:[x.mk,Xd,ie],styles:[".random-item-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:block;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.random-item-dialog.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.random-item-dialog.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.random-item-dialog[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%}.random-item-dialog[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{display:block;width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:auto}.random-item-dialog[_ngcontent-%COMP%] .item.autosell[_ngcontent-%COMP%]{cursor:not-allowed;border-color:var(--ghs-color-darkgray);filter:grayscale(.7)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.random-item-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();function jq(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(n.loot.value4P>0?""+n.loot.value4P:"")}}const ih=function(o,a){return{value:o,"value-highlight":a}};function Bq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",15),t._uU(2,"/ "),t._UZ(3,"span",15),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(4,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()>2))("ghs-label","%game.loot.player.3-4% +"+n.loot.value4P),t.xp6(2),t.Q6J("ngClass",t.WLB(7,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()<=2))("ghs-label","%game.loot.player.2% +"+n.loot.value2P)}}function zq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",15),t._uU(2,"/ "),t._UZ(3,"span",15),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(4,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()>=4))("ghs-label","%game.loot.player.4% +"+n.loot.value4P),t.xp6(2),t.Q6J("ngClass",t.WLB(7,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()<=3))("ghs-label","%game.loot.player.2-3% +"+n.loot.value2P)}}function Gq(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",15),t._uU(2,"/ "),t._UZ(3,"span",15),t._uU(4,"/ "),t._UZ(5,"span",15),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(6,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()>3))("ghs-label","%game.loot.player.4% +"+n.loot.value4P),t.xp6(2),t.Q6J("ngClass",t.WLB(9,ih,n.highlight,n.highlight&&3==n.gameManager.characterManager.characterCount()))("ghs-label","%game.loot.player.3% +"+n.loot.value3P),t.xp6(2),t.Q6J("ngClass",t.WLB(12,ih,n.highlight,n.highlight&&n.gameManager.characterManager.characterCount()<3))("ghs-label","%game.loot.player.2% +"+n.loot.value2P)}}function Vq(o,a){if(1&o&&(t.TgZ(0,"span",13),t.YNc(1,jq,2,1,"span",14),t.YNc(2,Bq,4,10,"ng-container",14),t.YNc(3,zq,4,10,"ng-container",14),t.YNc(4,Gq,6,15,"ng-container",14),t._uU(5," \xa0"),t._UZ(6,"span",4),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.loot.value2P==n.loot.value3P&&n.loot.value3P==n.loot.value4P),t.xp6(1),t.Q6J("ngIf",n.loot.value4P==n.loot.value3P&&n.loot.value3P!=n.loot.value2P),t.xp6(1),t.Q6J("ngIf",n.loot.value4P!=n.loot.value3P&&n.loot.value3P==n.loot.value2P),t.xp6(1),t.Q6J("ngIf",n.loot.value4P!=n.loot.value3P&&n.loot.value3P!=n.loot.value2P),t.xp6(2),t.Q6J("ghs-label","game.loot."+n.loot.type)}}function Yq(o,a){if(1&o&&t._UZ(0,"img",19),2&o){const n=t.oxw(2);t.Q6J("src",n.gameManager.characterManager.characterIcon(n.character),t.LSH)}}function Kq(o,a){1&o&&t._UZ(0,"img",20)}const $q=function(o,a){return{"with-header":o,edit:a}};function Wq(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",16),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeCharacter(i))}),t.YNc(1,Yq,1,1,"img",17),t.YNc(2,Kq,1,0,"img",18),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,$q,n.loot.type!=n.LootType.money&&n.loot.type!=n.LootType.special1&&n.loot.type!=n.LootType.special2,n.edit&&n.settingsManager.settings.applyLoot)),t.xp6(1),t.Q6J("ngIf",n.character),t.xp6(1),t.Q6J("ngIf",!n.character&&n.settingsManager.settings.applyLoot&&n.apply)}}function Xq(o,a){1&o&&t._UZ(0,"img",21)}const t7=function(o,a){return{flipped:o,"no-animations":a}},e7=function(){return[]};let jO=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"loot",void 0),(0,_.Z)(this,"index",-1),(0,_.Z)(this,"disableFlip",!1),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"looted",!1),(0,_.Z)(this,"highlight",!0),(0,_.Z)(this,"apply",!0),(0,_.Z)(this,"character",""),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"revealed",!1),(0,_.Z)(this,"animate",!1),this.dialog=e}ngOnInit(){this.animate=!this.disableFlip}onChange(e){this.revealed=e}ngOnChanges(e){const i=e.flipped;i&&!this.disableFlip&&i.currentValue&&i.currentValue!=i.previousValue&&(this.animate=!0)}changeCharacter(e){R.r.settings.applyLoot&&(this.edit||!this.character)&&(e.preventDefault(),e.stopPropagation(),this.dialog.open(OT,{panelClass:"dialog",data:{loot:this.loot,selected:this.character,edit:this.edit}}).closed.subscribe({next:s=>{if("string"==typeof s){const l=d.v.game.figures.find(O=>O instanceof oe.z&&O.name==this.character);let m;if(l instanceof oe.z&&l.name!=s&&(this.loot.type==le.CG.random_item&&s?m=l.progress.equippedItems.find(O=>"loot-random-item"==O.marker):(d.v.stateManager.before("removeLootCard","data.character."+l.name,"game.loot."+this.loot.type,d.v.lootManager.getValue(this.loot)+""),l.lootCards=l.lootCards.filter(O=>O!=this.index),(this.loot.type==le.CG.money||this.loot.type==le.CG.special1||this.loot.type==le.CG.special2)&&(l.loot-=d.v.lootManager.getValue(this.loot)),this.loot.type==le.CG.random_item&&(m=l.progress.equippedItems.find(O=>"loot-random-item"==O.marker),m&&(l.progress.items=l.progress.items.filter(O=>m&&(O.edition!=m.edition||O.name!=m.name)),l.progress.equippedItems=l.progress.equippedItems.filter(O=>m&&(O.edition!=m.edition||O.name!=m.name)))),d.v.stateManager.after())),s&&(!l||l.name!=s)){const O=d.v.game.figures.find(k=>k instanceof oe.z&&k.name==s);if(O instanceof oe.z)if(this.loot.type!=le.CG.random_item)d.v.stateManager.before("addLootCard","data.character."+O.name,"game.loot."+this.loot.type,d.v.lootManager.getValue(this.loot)+""),d.v.lootManager.applyLoot(this.loot,O,this.index),d.v.stateManager.after();else{let k=m?d.v.itemManager.getItem(+m.name,m.edition,!0):void 0;k||(k=d.v.lootManager.applyLoot(this.loot,O,this.index)),k&&this.dialog.open(Qw,{panelClass:"dialog",data:{item:k,loot:this.loot,index:this.index,character:O}}).closed.subscribe({next:W=>{if(W){const ct=W;d.v.stateManager.before("selectRandomItemLoot");let Ct=new Vn.xb(""+ct.id,ct.edition);d.v.itemManager.addItemCount(ct),-1==O.lootCards.indexOf(this.index)&&(O.lootCards.push(this.index),O.lootCards.sort((Ot,xt)=>Ot-xt)),null!=O.progress.items.find(Ot=>Ot.name==""+ct.id&&Ot.edition==ct.edition)?O.progress.gold+=d.v.itemManager.itemSellValue(ct):(O.progress.items.push(Ct),O.progress.equippedItems.push(new Vn.VY(Ct.name,Ct.edition,void 0,"loot-random-item"))),m&&l instanceof oe.z&&(l.lootCards=l.lootCards.filter(Ot=>Ot!=this.index),l.progress.items=l.progress.items.filter(Ot=>m&&(Ot.edition!=m.edition||Ot.name!=m.name)),l.progress.equippedItems=l.progress.equippedItems.filter(Ot=>"loot-random-item"!=Ot.marker)),d.v.stateManager.after()}else O.lootCards=O.lootCards.filter(ct=>ct!=this.index)}})}}}}}))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot"]],inputs:{loot:"loot",index:"index",disableFlip:"disableFlip",flipped:"flipped",reveal:"reveal",edit:"edit",looted:"looted",highlight:"highlight",apply:"apply",character:"character"},features:[t.TTD],decls:16,vars:23,consts:[["card-reveal","",1,"card",3,"ngClass","disabled","change"],["card",""],[1,"card-back","back"],[1,"revealed"],[3,"ghs-label"],[1,"card-front","front"],["class","header",4,"ngIf"],["class","character",3,"ngClass","click",4,"ngIf"],[1,"enhancements"],["class","icon","src","./assets/images/fh/loot/plus1.svg",4,"ngFor","ngForOf"],[1,"card-id"],[1,"footer"],[1,"icon"],[1,"header"],[4,"ngIf"],[3,"ngClass","ghs-label"],[1,"character",3,"ngClass","click"],[3,"src",4,"ngIf"],["class","warning","src","./assets/images/warning.svg",4,"ngIf"],[3,"src"],["src","./assets/images/warning.svg",1,"warning"],["src","./assets/images/fh/loot/plus1.svg",1,"icon"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div")(1,"div",0,1),t.NdJ("change",function(l){return i.onChange(l)}),t.TgZ(3,"div",2)(4,"span",3),t._UZ(5,"span",4),t.qZA()(),t.TgZ(6,"div",5),t.YNc(7,Vq,7,5,"span",6),t.YNc(8,Wq,3,6,"span",7),t.TgZ(9,"span",8),t.YNc(10,Xq,1,0,"img",9),t.ALo(11,"ghsRange"),t.qZA(),t.TgZ(12,"span",10),t._uU(13),t.qZA(),t.TgZ(14,"span",11),t._UZ(15,"span",12),t.qZA()()()()),2&e){const s=t.MAs(2);t.Gre("loot ",i.loot.type,""),t.xp6(1),t.Udp("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.WLB(19,t7,i.flipped||i.revealed,!i.animate))("disabled",!i.reveal),t.xp6(4),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(1),t.Udp("background-image","url(./assets/images/fh/loot/loot-"+i.loot.type+(i.loot.type==i.LootType.money?i.gameManager.lootManager.getValue(i.loot,!1):"")+".png)"),t.xp6(1),t.Q6J("ngIf",i.loot.type!=i.LootType.money&&i.loot.type!=i.LootType.special1&&i.loot.type!=i.LootType.special2),t.xp6(1),t.Q6J("ngIf",i.looted||i.character),t.xp6(2),t.Q6J("ngForOf",t.xi3(11,16,t.DdM(22,e7),i.loot.enhancements)),t.xp6(3),t.hij(" ",i.loot.cardId," * "),t.xp6(2),t.Udp("background-image","url(./assets/images/fh/loot/"+(i.loot.type==i.LootType.special1||i.loot.type==i.LootType.special2?i.LootType.money:i.loot.type)+".svg)")}},dependencies:[x.mk,x.sg,x.O5,Yf,ie,Ii],styles:[".loot[_ngcontent-%COMP%]{position:absolute;inset:0;display:block}.loot[_ngcontent-%COMP%] .back[_ngcontent-%COMP%]{background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(loot-back.b3962872f80142fe.png);border-radius:5%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%]{display:flex;position:relative;top:0;left:0;width:100%;height:100%;border-radius:5%;background-position:center;background-size:100% auto;background-repeat:no-repeat}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:10%;font-size:1.3em;text-align:center;white-space:nowrap}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:.7em;opacity:.7}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .value.value-highlight[_ngcontent-%COMP%]{opacity:1;font-size:1.1em}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:20%;display:flex;justify-content:center;align-items:center;z-index:2}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character.with-header[_ngcontent-%COMP%]{top:10%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character.edit[_ngcontent-%COMP%]{cursor:pointer}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto;filter:var(--ghs-filter-outline)}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img.warning[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-outline);height:60%;margin-left:5%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%]{position:absolute;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;top:50%;left:50%;height:50%;width:100%;transform:translate(-50%,-50%);z-index:1}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:20%;height:auto;margin:5%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;font-size:.8em;width:20%;height:5%;display:flex;justify-content:center;align-content:center}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;bottom:0%;left:50%;height:12%;width:20%;transform:translate(-50%);border-top-left-radius:25%;border-top-right-radius:25%}.loot[_ngcontent-%COMP%] .front[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:80%;height:80%;background-size:contain;background-position:center center;background-repeat:no-repeat}.loot[_ngcontent-%COMP%] .confirm[_ngcontent-%COMP%] .revealed[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:1.3em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black))}"]})),a})();const n7=["menu"];function i7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return i.configuration=!i.configuration,t.KtG(i.enhancements=!1)}),t._UZ(1,"img",15)(2,"span",7),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","game.loot.config."+(n.configuration?"hide":"show"))}}function o7(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.reveal=(i.reveal+1)%3)}),t._UZ(2,"span",7),t.qZA(),t.TgZ(3,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.shuffle())}),t._UZ(4,"span",7),t.qZA(),t.TgZ(5,"label")(6,"input",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleEdit())}),t.qZA(),t._UZ(7,"span",7),t.qZA(),t.YNc(8,i7,3,1,"a",13),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label",2==n.reveal?"game.cards.coverAll":0==n.reveal?"game.cards.revealAll":"game.cards.revealAllConfirm"),t.xp6(2),t.Q6J("ghs-label","game.cards.shuffle"),t.xp6(2),t.Q6J("checked",n.edit),t.xp6(1),t.Q6J("ghs-label","game.cards.edit"),t.xp6(1),t.Q6J("ngIf",n.edit)}}const Rw=function(o){return{disabled:o}};function a7(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"img",6)(3,"span",7),t.qZA(),t.TgZ(4,"a",22),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.changeType(s,-1))}),t._UZ(5,"img",23),t.qZA(),t.TgZ(6,"span",24),t._uU(7),t.qZA(),t.TgZ(8,"a",22),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.changeType(s,1))}),t._UZ(9,"img",25),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("src","./assets/images/fh/loot/"+(n==e.LootType.special1||n==e.LootType.special2?e.LootType.money:n)+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","game.loot."+n),t.xp6(1),t.Q6J("ngClass",t.VKq(7,Rw,!e.lootDeckConfig[n]||n==e.LootType.random_item&&e.gameManager.lootManager.randomItemLooted())),t.xp6(2),t.Q6J("ghs-label","game.loot."+n)("ghs-label-attribute","title"),t.xp6(1),t.hij(" ",e.lootDeckConfig[n]&&"x"+e.lootDeckConfig[n]||"-"," "),t.xp6(1),t.Q6J("ngClass",t.VKq(9,Rw,e.lootDeckConfig[n]==e.maxValue(n)||n==e.LootType.random_item&&e.gameManager.lootManager.randomItemLooted()))}}function s7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.currentConfig())}),t._UZ(1,"span",7),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.loot.config.discard"))}function r7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._UZ(2,"span",7),t.qZA(),t.TgZ(3,"div",18),t.YNc(4,a7,10,11,"ng-container",19),t.qZA(),t.TgZ(5,"div",20),t.YNc(6,s7,2,1,"a",21),t.TgZ(7,"a",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.applyConfig())}),t._UZ(8,"span",7),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","game.loot.config"),t.xp6(2),t.Q6J("ngForOf",n.types),t.xp6(2),t.Q6J("ngIf",n.deck.cards.length>0),t.xp6(2),t.Q6J("ghs-label","game.loot.config."+(0==n.deck.cards.length?"create":"apply"))}}function c7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",35),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw(2);return t.KtG(s.unenhanceCard(i))}),t.qZA()}2&o&&t.Q6J("ghs-label","game.loot.enhancements.remove")("ghs-label-attribute","title")}const l7=function(){return[]};function g7(o,a){if(1&o&&(t.TgZ(0,"div",33),t.YNc(1,c7,1,2,"img",34),t.ALo(2,"ghsRange"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,l7),n.enhancements))}}function d7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",28),t._UZ(1,"ghs-loot",29),t.TgZ(2,"a",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.enhanceCard(s))}),t._UZ(3,"img",31),t.qZA(),t.YNc(4,g7,3,5,"div",32),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("loot",n)("flipped",!0)("highlight",!1)("apply",e.apply),t.xp6(1),t.Q6J("ghs-label","game.loot.enhancements.add")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngIf",n.enhancements>0)}}function h7(o,a){if(1&o&&(t.TgZ(0,"div",26),t.YNc(1,d7,5,7,"div",27),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.enhancementDeck)}}function u7(o,a){1&o&&t._UZ(0,"div",43)}function _7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.remove(i+s.deck.current+1))}),t._UZ(1,"img",23),t.qZA()}}function p7(o,a){1&o&&t._UZ(0,"div",49)}function f7(o,a){if(1&o&&(t.TgZ(0,"div",44),t._UZ(1,"ghs-loot",45),t.YNc(2,_7,2,0,"a",46),t.YNc(3,p7,1,0,"div",47),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("loot",n)("reveal",!0)("flipped",2==i.reveal)("index",i.deck.current+e+1)("character",i.getCharacter(i.deck.current+e+1))("apply",i.apply),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit)}}function m7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.remove(s.deck.current-i))}),t._UZ(1,"img",23),t.qZA()}}function v7(o,a){1&o&&t._UZ(0,"div",49)}function C7(o,a){if(1&o&&(t.TgZ(0,"div",44),t._UZ(1,"ghs-loot",50),t.YNc(2,m7,2,0,"a",46),t.YNc(3,v7,1,0,"div",47),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("loot",n)("flipped",!0)("index",i.deck.current-e)("character",i.getCharacter(i.deck.current-e))("edit",i.edit)("looted",!0)("apply",i.apply),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit)}}function M7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",36)(1,"div",37,38),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dropUpcoming(i))}),t.YNc(3,u7,1,0,"div",39),t.YNc(4,f7,4,8,"div",40),t.qZA(),t.TgZ(5,"div",41,42),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dropDisgarded(i))}),t._UZ(7,"div",43),t.YNc(8,C7,4,9,"div",40),t.qZA()()}if(2&o){const n=t.MAs(2),e=t.MAs(6),i=t.oxw();t.Udp("max-height",i.maxHeight),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",e)("cdkDropListAutoScrollStep",20),t.xp6(2),t.Q6J("ngIf",0==i.upcomingCards().length),t.xp6(1),t.Q6J("ngForOf",i.upcomingCards()),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",n)("cdkDropListAutoScrollStep",20),t.xp6(3),t.Q6J("ngForOf",i.disgardedCards())}}let PT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"apply",!0),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),(0,_.Z)(this,"types",Object.values(le.CG)),(0,_.Z)(this,"lootDeckConfig",{}),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"type",le.CG.money),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"configuration",!1),(0,_.Z)(this,"enhancements",!1),(0,_.Z)(this,"characters",!0),(0,_.Z)(this,"enhancementDeck",[]),this.data=e,this.dialogRef=i,this.deck=e.deck,this.characters=e.characters,this.before=e.before,this.after=e.after,this.apply=e.apply}ngOnInit(){this.currentConfig(),setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},R.r.settings.disableAnimations?0:250),0==this.deck.cards.length&&(this.edit=!0,this.configuration=!0),d.v.game.scenario||(this.enhancements=!0,this.configuration=!1),this.dialogRef.closed.subscribe({next:()=>{const e=0==this.deck.cards.length;let i=new le._8;d.v.lootManager.apply(i,this.lootDeckConfig),e&&i.cards.length>0&&this.applyConfig()}}),this.enhancementDeck=d.v.lootManager.fullLootDeck().filter(e=>-1!=le.Qq.indexOf(e.type)).sort((e,i)=>e.cardId-i.cardId)}enhanceCard(e){this.before.emit(new _o(this.deck,"lootDeckAddEnhancement",e.type,d.v.lootManager.valueLabel(e))),e.enhancements++,d.v.game.lootDeckEnhancements=this.enhancementDeck.filter(i=>i.enhancements>0),this.after.emit(new _o(this.deck,"lootDeckAddEnhancement",e.type,d.v.lootManager.valueLabel(e)))}unenhanceCard(e){e.enhancements>0&&(this.before.emit(new _o(this.deck,"lootDeckRemoveEnhancement",e.type,d.v.lootManager.valueLabel(e))),e.enhancements--,d.v.game.lootDeckEnhancements=this.enhancementDeck.filter(i=>i.enhancements>0),this.after.emit(new _o(this.deck,"lootDeckRemoveEnhancement",e.type,d.v.lootManager.valueLabel(e))))}toggleEdit(){this.edit=!this.edit,this.edit||(this.configuration=!1,this.enhancements=!1),setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}toggleEnhancements(){this.enhancements=!this.enhancements,this.edit=!1,this.configuration=!1,!this.enhancements&&0==this.deck.cards.length&&(this.edit=!0,this.configuration=!0)}maxValue(e){return d.v.lootManager.fullLootDeck().filter(i=>i.type==e).length}currentConfig(){this.types.forEach(e=>{const i=this.deck.cards.filter(s=>s.type==e).length;this.lootDeckConfig[e]=i>0?i:void 0})}applyConfig(){const e=0==this.deck.cards.length;(Object.values(this.lootDeckConfig).reduce((i,s)=>(i||0)+(s||0))>0||!e)&&(this.before.emit(new _o(this.deck,"lootDeckChangeConfig")),d.v.lootManager.apply(this.deck,this.lootDeckConfig),d.v.lootManager.shuffleDeck(this.deck),this.types.forEach(i=>{0==this.lootDeckConfig[i]&&(this.lootDeckConfig[i]=void 0)}),this.after.emit(new _o(this.deck,"lootDeckChangeConfig")),this.deck.cards.length>0&&(e?this.dialogRef.close():this.toggleEdit()))}changeType(e,i){this.lootDeckConfig[e]=(this.lootDeckConfig[e]||0)+i,0==this.lootDeckConfig[e]&&(this.lootDeckConfig[e]=void 0)}upcomingCards(){return this.deck.cards.filter((e,i)=>i>this.deck.current)}disgardedCards(){return this.deck.cards.filter((e,i)=>i<=this.deck.current).reverse()}shuffle(){this.before.emit(new _o(this.deck,"lootDeckShuffle")),d.v.lootManager.shuffleDeck(this.deck),d.v.game.figures.forEach(e=>{e instanceof oe.z&&(e.lootCards=[])}),this.after.emit(new _o(this.deck,"lootDeckShuffle"))}dropUpcoming(e){this.before.emit(new _o(this.deck,"lootDeckReorder"));let i=0,s=0,l=0;e.container==e.previousContainer?(i=this.deck.current+1,s=e.previousIndex+i,l=e.currentIndex+i,Fn(this.deck.cards,s,l)):(i=this.deck.current,s=i-e.previousIndex,l=e.currentIndex+i,Fn(this.deck.cards,s,l),this.deck.current=this.deck.current-1),d.v.game.figures.forEach(m=>{m instanceof oe.z&&m.lootCards&&(m.lootCards=m.lootCards.map(O=>(ss&&O<=l?O--:s>l&&O>=l&&OO-k))}),d.v.game.figures.forEach(m=>{m instanceof oe.z&&(m.lootCards=m.lootCards.filter(O=>O<=this.deck.current))}),this.after.emit(new _o(this.deck,"lootDeckReorder"))}dropDisgarded(e){this.before.emit(new _o(this.deck,"lootDeckReorder"));let i=0,s=0,l=0;e.container==e.previousContainer?(i=this.deck.current,s=i-e.previousIndex,l=i-e.currentIndex,Fn(this.deck.cards,s,l)):(this.deck.current=this.deck.current+1,i=this.deck.current,s=i+e.previousIndex,l=i-e.currentIndex,Fn(this.deck.cards,s,l)),d.v.game.figures.forEach(m=>{m instanceof oe.z&&m.lootCards&&(m.lootCards=m.lootCards.map(O=>(ss&&O<=l?O--:s>l&&O>=l&&OO-k))}),this.after.emit(new _o(this.deck,"lootDeckReorder"))}remove(e){this.before.emit(new _o(this.deck,"lootDeckRemoveCard",""+e)),e<=this.deck.current&&(this.deck.current--,this.current=this.deck.current),this.deck.cards.splice(e,1),this.after.emit(new _o(this.deck,"lootDeckRemoveCard",""+e))}countLoot(e){return this.deck.cards.filter(i=>i.type==e).length}countDrawnLoot(e){return this.deck.cards.filter((i,s)=>i.type==e&&s<=this.deck.current).length}countUpcomingLoot(e){return this.deck.cards.filter((i,s)=>i.type==e&&s>this.deck.current).length}getCharacter(e){if(this.characters){const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.lootCards&&-1!=s.lootCards.indexOf(e));if(i)return i.name}return""}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(n7,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},decls:11,vars:9,consts:[[1,"loot-deck-dialog"],[1,"scroll-container"],[1,"menu"],["menu",""],[4,"ngIf"],[1,"toggle-enhancements",3,"ngClass","click"],[1,"ghs-svg",3,"src"],[3,"ghs-label"],["class","config",4,"ngIf"],["class","enhancements",4,"ngIf"],["class","loot-deck-container",3,"maxHeight",4,"ngIf"],[3,"click"],["type","checkbox",3,"checked","click"],["class","toggle-config",3,"click",4,"ngIf"],[1,"toggle-config",3,"click"],["src","./assets/images/settings.svg",1,"ghs-svg"],[1,"config"],[1,"title"],[1,"values"],[4,"ngFor","ngForOf"],[1,"config-menu"],[3,"click",4,"ngIf"],[1,"button",3,"ngClass","click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"value",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"enhancements"],["class","loot-container",4,"ngFor","ngForOf"],[1,"loot-container"],[1,"drag-hidden",3,"loot","flipped","highlight","apply"],[1,"button-enhance",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/fh/loot/plus1.svg",1,"ghs-svg"],["class","remove-enhancements",4,"ngIf"],[1,"remove-enhancements"],["class","ghs-svg","src","./assets/images/fh/loot/plus1.svg",3,"ghs-label","ghs-label-attribute","click",4,"ngFor","ngForOf"],["src","./assets/images/fh/loot/plus1.svg",1,"ghs-svg",3,"ghs-label","ghs-label-attribute","click"],[1,"loot-deck-container"],["cdkDropList","",1,"upcoming","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["upcomingList","cdkDropList"],["class","empty",4,"ngIf"],["class","loot-container","cdkDrag","",4,"ngFor","ngForOf"],["cdkDropList","",1,"disgarded","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["disgardedList","cdkDropList"],[1,"empty"],["cdkDrag","",1,"loot-container"],[1,"drag-hidden",3,"loot","reveal","flipped","index","character","apply"],["class","button-remove",3,"click",4,"ngIf"],["cdkDragHandle","","class","drag-handle",4,"ngIf"],[1,"button-remove",3,"click"],["cdkDragHandle","",1,"drag-handle"],[1,"drag-hidden",3,"loot","flipped","index","character","edit","looted","apply"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3),t.YNc(4,o7,9,5,"ng-container",4),t.TgZ(5,"a",5),t.NdJ("click",function(){return i.toggleEnhancements()}),t._UZ(6,"img",6)(7,"span",7),t.qZA()(),t.YNc(8,r7,9,4,"div",8),t.YNc(9,h7,2,1,"div",9),t.YNc(10,M7,9,11,"div",10),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("ngIf",i.deck.cards.length>0),t.xp6(1),t.Q6J("ngClass",t.VKq(7,Rw,!i.gameManager.game.scenario)),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+(i.enhancements?"money":"plus1")+".svg",t.LSH),t.xp6(1),t.Q6J("ghs-label","game.loot."+(i.enhancements&&i.gameManager.game.scenario?"deck":"enhancements")),t.xp6(1),t.Q6J("ngIf",i.configuration),t.xp6(1),t.Q6J("ngIf",i.enhancements),t.xp6(1),t.Q6J("ngIf",!i.configuration&&!i.enhancements))},dependencies:[x.mk,x.sg,x.O5,Bs,Ms,Zr,jO,ie,Ii],styles:['.loot-deck-dialog[_ngcontent-%COMP%]{position:relative}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap;max-width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%]{pointer-events:none}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.loot-deck-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.loot-deck-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%]{margin-bottom:5%;padding:2em;min-height:500px}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto auto auto;font-size:2em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:flex-start;align-items:center;white-space:nowrap}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);margin-right:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .button.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .config-menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.loot-deck-dialog[_ngcontent-%COMP%] .config[_ngcontent-%COMP%] .config-menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-evenly;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 57 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 38.25 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%;z-index:1}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .button-enhance[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:2}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .button-enhance[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));height:auto}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .button-enhance[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-gray) brightness(1.5)}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .remove-enhancements[_ngcontent-%COMP%]{position:absolute;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;top:50%;left:50%;height:50%;width:100%;transform:translate(-50%,-50%);z-index:2}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .remove-enhancements[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{cursor:pointer;width:20%;height:auto;margin:5%;transition:all .1s ease-in-out;filter:none}.loot-deck-dialog[_ngcontent-%COMP%] .enhancements[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] .remove-enhancements[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-red);opacity:.6}.loot-deck-dialog[_ngcontent-%COMP%] .drop-list[_ngcontent-%COMP%]{position:relative}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor));overflow:auto}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 30 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 38.25 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .8 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .7 * var(--ghs-dialog-factor));display:block;border-style:dashed;border-width:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));border-color:var(--ghs-color-white);width:calc(var(--ghs-unit) * 25.1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 37 * var(--ghs-dialog-factor));border-radius:5%}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:100%;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .loot-deck-dialog[_ngcontent-%COMP%] .loot-deck-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;left:50%;top:65%;width:60%;height:70%;transform:translate(-50%,-50%)}.cdk-drag-preview[_ngcontent-%COMP%]{opacity:0;cursor:grabbing;z-index:999}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.5;cursor:grabbing}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}']})),a})();const O7=function(o){return{vertical:o}};let yT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"configuration",!1),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"before",void 0),(0,_.Z)(this,"after",void 0),this.data=e,this.dialogRef=i,this.deck=e.deck,this.before=e.before,this.after=e.after}ngOnInit(){0==this.deck.cards.length&&(this.configuration=!0)}vertical(){return window.innerWidth<800}beforeLootDeck(e){this.before.emit(e)}afterLootDeck(e){this.after.emit(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck-fullscreen"]],decls:4,vars:6,consts:[[1,"loot-deck-fullscreen",3,"ngClass"],[3,"deck","fullscreen","vertical","before","after"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"ghs-loot-deck",1),t.NdJ("before",function(l){return i.beforeLootDeck(l)})("after",function(l){return i.afterLootDeck(l)}),t.qZA(),t.TgZ(2,"div",2),t.NdJ("click",function(){return i.dialogRef&&i.dialogRef.close()}),t.qZA()(),t.TgZ(3,"div",2),t.NdJ("click",function(){return i.dialogRef&&i.dialogRef.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(4,O7,i.vertical())),t.xp6(1),t.Q6J("deck",i.deck)("fullscreen",!1)("vertical",i.vertical()))},styles:[".loot-deck-fullscreen[_ngcontent-%COMP%]{width:100vw;height:100vh;overflow-x:auto;overflow-y:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:3}.loot-deck-fullscreen[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:600px;height:100vw;max-height:420px;z-index:4;margin-top:2em;margin-left:1%}.loot-deck-fullscreen.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden}.loot-deck-fullscreen.vertical[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:132vw;max-height:800px;transform:none}.loot-deck-fullscreen[_ngcontent-%COMP%] .close-container[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;display:flex;width:100%;height:100%;z-index:2;top:0;left:0}"]})),a})();const P7=function(o,a){return{vertical:o,minimize:a}};function y7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",8),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openFullscreen(i))}),t._UZ(1,"img",9),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.fullscreen")("ghs-label-attribute","title")("ngClass",t.WLB(3,P7,n.vertical,!n.deck.active))}}const b7=function(o,a,n){return{vertical:o,"without-fullscreen":a,minimize:n}};function x7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",10),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.open(i))}),t._UZ(1,"img",11),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ghs-label","game.cards.openDialog")("ghs-label-attribute","title")("ngClass",t.kEZ(3,b7,n.vertical,!n.fullscreen,!n.deck.active))}}const w7=function(o,a,n,e){return{disgarded:o,current:a,last:n,bottom:e}},bT=function(o){return{disabled:o}};function k7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",13),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw();return t.KtG(l.clickCard(s,i))}),t._UZ(1,"ghs-loot",14),t.qZA()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw();t.Udp("z-index",e>s.current?s.deck.cards.length-e:s.deck.cards.length+e+1),t.Q6J("ngClass",t.l5B(11,w7,ee.current-3)}}const Z7=function(o,a,n){return{disabled:o,vertical:a,denied:n}};class _o{constructor(a,n,...e){(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"values",void 0),this.deck=a,this.type=n,this.values=e}}let Fw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"bottom",!1),(0,_.Z)(this,"characters",!0),(0,_.Z)(this,"fullscreen",!0),(0,_.Z)(this,"vertical",!1),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"before",new t.vpe),(0,_.Z)(this,"after",new t.vpe),(0,_.Z)(this,"initTimeout",1500),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"lootManager",d.v.lootManager),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"internalDraw",-99),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"drawTimeout",null),(0,_.Z)(this,"queue",0),(0,_.Z)(this,"queueTimeout",null),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"initServer",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.element.nativeElement.addEventListener("click",s=>{let l=document.elementsFromPoint(s.clientX,s.clientY);l[0].classList.contains("deck")&&l.length>2&&l[2].click()})}ngOnInit(){this.current=this.deck.current,this.internalDraw=-99,this.compact=this.deck.cards.length>0&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400),this.disabled=!this.standalone&&d.v.game.state==ge.D2.draw,this.init||(this.drawTimeout=setTimeout(()=>{this.current=this.deck.current,this.drawTimeout=null,this.init=!0},R.r.settings.disableAnimations?0:this.initTimeout)),this.uiChangeSubscription=d.v.uiChange.subscribe({next:e=>{this.update(e)}}),window.addEventListener("resize",e=>{this.compact=this.deck.cards.length>0&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)}),window.addEventListener("fullscreenchange",e=>{this.compact=this.deck.cards.length>0&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){e.deck&&this.update()}update(e=!1){this.disabled=!this.standalone&&d.v.game.state==ge.D2.draw,this.initServer&&d.v.stateManager.wsState()!=WebSocket.OPEN&&(this.initServer=!1),this.deck.active?!this.init||e&&!this.initServer?(this.current=this.deck.current,e&&!this.initServer&&(this.initServer=!0)):this.current{this.drawing=!1,this.queueTimeout=null;const i=this.current,s=this.deck.cards[i];this.queue>0?(this.queue--,this.current++,this.drawQueue(e)):(this.element.nativeElement.getElementsByClassName("deck")[0].classList.remove("drawing"),this.queue<0&&(this.queue=0)),!e&&s&&null!=le.k.indexOf(s.type)&&R.r.settings.applyLoot&&!this.standalone&&d.v.game.figures.find(l=>l instanceof oe.z&&d.v.gameplayFigure(l))&&(!d.v.game.figures.find(l=>l instanceof oe.z&&l.active)||R.r.settings.alwaysLootApplyDialog)&&this.dialog.open(OT,{panelClass:"dialog",data:{loot:s}}).closed.subscribe({next:m=>{if(m){const O=d.v.game.figures.find(k=>k instanceof oe.z&&k.name==m);if(O instanceof oe.z){d.v.stateManager.before(s.type==le.CG.random_item?"lootRandomItem":"addResource","data.character."+O.name,"game.loot."+s.type,this.lootManager.getValue(s)+"");const k=d.v.lootManager.applyLoot(s,O,i);d.v.stateManager.after(),k&&this.dialog.open(Qw,{panelClass:"dialog",data:{item:k,loot:this.deck.cards[i],index:i,character:O}}).closed.subscribe({next:W=>{if(W){const ct=W;d.v.stateManager.before("selectRandomItemLoot");let Ct=new Vn.xb(""+ct.id,ct.edition);d.v.itemManager.addItemCount(ct),-1==O.lootCards.indexOf(i)&&(O.lootCards.push(i),O.lootCards.sort((Ot,xt)=>Ot-xt)),null!=O.progress.items.find(Ot=>Ot.name==""+ct.id&&Ot.edition==ct.edition)?O.progress.gold+=d.v.itemManager.itemSellValue(ct):(O.progress.items.push(Ct),O.progress.equippedItems.push(new Vn.VY(Ct.name,Ct.edition,void 0,"loot-random-item"))),d.v.stateManager.after()}else O.lootCards=O.lootCards.filter(ct=>ct!=i)}})}}}})},R.r.settings.disableAnimations?0:this.vertical?1050:1850)}draw(e){if(this.compact&&this.fullscreen)this.openFullscreen(e);else if(!this.disabled&&this.deck.cards.length>0){if(!this.drawTimeout&&this.deck.currents instanceof oe.z&&s.active);this.drawTimeout=setTimeout(()=>{if(this.before.emit(new _o(this.deck,"lootDeckDraw")),!R.r.settings.alwaysLootApplyDialog&&i instanceof oe.z){const s=d.v.lootManager.drawCard(this.deck,i);s&&setTimeout(()=>{this.dialog.open(Qw,{panelClass:"dialog",data:{item:s,loot:this.deck.cards[this.current],index:this.current,character:i}}).closed.subscribe({next:l=>{if(l){const m=l;d.v.stateManager.before("selectRandomItemLoot");let O=new Vn.xb(""+m.id,m.edition);d.v.itemManager.addItemCount(m),-1==i.lootCards.indexOf(this.current)&&(i.lootCards.push(this.current),i.lootCards.sort((k,W)=>k-W)),null!=i.progress.items.find(k=>k.name==""+m.id&&k.edition==m.edition)?i.progress.gold+=d.v.itemManager.itemSellValue(m):(i.progress.items.push(O),i.progress.equippedItems.push(new Vn.VY(O.name,O.edition,void 0,"loot-random-item"))),d.v.stateManager.after()}else i.lootCards=i.lootCards.filter(m=>m!=this.current)}})},R.r.settings.disableAnimations?0:this.vertical?1050:1850)}else d.v.lootManager.drawCard(this.deck,void 0);this.after.emit(new _o(this.deck,"lootDeckDraw")),this.drawTimeout=null},R.r.settings.disableAnimations?0:150)}}else this.dialog.open(PT,{panelClass:"dialog",data:{deck:this.deck,characters:this.characters,before:this.before,after:this.after,apply:!this.standalone}})}openFullscreen(e){this.fullscreen&&(this.dialog.open(yT,{backdropClass:"fullscreen-backdrop",data:{deck:this.deck,before:this.before,after:this.after}}),e.preventDefault(),e.stopPropagation())}clickCard(e,i){(!this.drawing||e>this.current)&&this.open(i)}getCharacter(e){if(this.characters){const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.lootCards&&-1!=s.lootCards.indexOf(e));if(i)return i.name}return""}open(e){this.deck.cards.length>0&&d.v.game.state==ge.D2.next&&this.fullscreen&&R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)?this.openFullscreen(e):this.dialog.open(PT,{panelClass:"dialog",data:{deck:this.deck,characters:this.characters,before:this.before,after:this.after,apply:!this.standalone}}),e.preventDefault(),e.stopPropagation()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck"]],inputs:{deck:"deck",bottom:"bottom",characters:"characters",fullscreen:"fullscreen",vertical:"vertical",standalone:"standalone",initTimeout:"initTimeout"},outputs:{before:"before",after:"after"},features:[t.TTD],decls:9,vars:16,consts:[[1,"deck",3,"ngClass"],[1,"loot-container","draw"],[1,"loot-card",3,"ngClass","click"],["card",""],[1,"number"],["class","fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],["class","settings",3,"ghs-label","ghs-label-attribute","ngClass","click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"fullscreen",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/fullscreen.svg"],[1,"settings",3,"ghs-label","ghs-label-attribute","ngClass","click"],["src","./assets/images/settings.svg",1,"ghs-svg"],["class","loot-container",3,"z-index","ngClass","click",4,"ngIf"],[1,"loot-container",3,"ngClass","click"],[1,"loot-card",3,"loot","flipped","looted","index","disableFlip","character","apply","ngClass"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3),t.NdJ("click",function(l){return i.draw(l)}),t.TgZ(4,"span",4),t._uU(5),t.qZA()(),t.YNc(6,y7,2,6,"span",5),t.YNc(7,x7,2,7,"span",6),t.qZA(),t.YNc(8,T7,2,1,"ng-container",7),t.qZA()),2&e){const s=t.MAs(3);t.Q6J("ngClass",t.kEZ(10,Z7,!i.standalone&&i.gameManager.game.state==i.GameState.draw,i.vertical,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.lootDeck)),t.xp6(1),t.Udp("z-index",i.deck.cards.length+1),t.xp6(1),t.Udp("font-size",.08*s.offsetWidth+"px"),t.Q6J("ngClass",t.VKq(14,bT,i.disabled)),t.xp6(3),t.Oqu(i.deck.current0),t.xp6(1),t.Q6J("ghs-label","scenario.rules.spawn"+(n.marker?"Marker":""))("ghs-label-args",t.l5B(4,D7,n.monster.name,s.spawnType(n.monster)||"",n.count?s.spawnCount(i.rule,n)+" ":"",n.marker)),t.xp6(1),t.Q6J("ngIf",n.manual)}}function N7(o,a){if(1&o&&(t.TgZ(0,"div",18),t.YNc(1,I7,4,9,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.spawns(n.rule))}}function J7(o,a){1&o&&t._UZ(0,"span",22),2&o&&t.Q6J("ghs-label","and")}function U7(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",26),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit;return t.KtG(s.count=i)}),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(4);t.Q6J("ngModel",n.count)("min",n.manualMin||0)("max",n.manualMax||"")("value",e.EntityValueFunction(n.count||1))}}const qw=function(o,a,n){return[o,a,n]};function L7(o,a){if(1&o&&(t.ynx(0),t.YNc(1,J7,1,1,"span",19),t._UZ(2,"span",20),t.YNc(3,U7,1,4,"input",25),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(1),t.Q6J("ghs-label","scenario.rules.spawnObjective"+(i.EntityValueFunction(n.count||1)>1?"s":"")+(n.objective.escort?"Escort":"")+(n.marker?"Marker":""))("ghs-label-args",t.kEZ(4,qw,n.objective.name?"data.objective."+n.objective.name:"",i.EntityValueFunction(n.count||1)+" ",n.marker)),t.xp6(1),t.Q6J("ngIf",n.manual)}}function Q7(o,a){if(1&o&&(t.TgZ(0,"div",24),t.YNc(1,L7,4,8,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngForOf",n.rule.objectiveSpawns)}}function R7(o,a){1&o&&(t.TgZ(0,"span",31),t._uU(1,","),t.qZA())}function F7(o,a){if(1&o&&(t.ynx(0),t.YNc(1,R7,2,0,"span",28),t.TgZ(2,"span",29),t._UZ(3,"ghs-element-icon",30),t.TgZ(4,"span"),t._UZ(5,"span",6),t.qZA(),t.TgZ(6,"span"),t._UZ(7,"span",6),t.qZA()(),t.BQk()),2&o){const n=a.$implicit,e=a.index;t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(2),t.Q6J("element",n),t.xp6(2),t.Q6J("ghs-label","game.element."+n.type),t.xp6(2),t.Q6J("ghs-label","game.element.state."+n.state)}}function q7(o,a){if(1&o&&(t.TgZ(0,"div",27),t.YNc(1,F7,8,4,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngForOf",n.rule.elements)}}const H7=function(o){return[o]};function j7(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",33),t._UZ(2,"img",34)(3,"span",35),t.qZA(),t.BQk()),2&o){const n=a.$implicit;t.xp6(3),t.Q6J("ghs-label",n.marker?"scenario.rules.openRoomMarker":"scenario.rules.openRoom")("ghs-label-args",t.VKq(2,H7,n.marker||""))}}function B7(o,a){if(1&o&&(t.TgZ(0,"div",32),t.YNc(1,j7,4,4,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).index,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.rooms(n))}}function z7(o,a){1&o&&(t.TgZ(0,"span",31),t._uU(1,","),t.qZA())}function G7(o,a){if(1&o&&t._UZ(0,"span",35),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label",(n.marker?"scenario.rules.addSectionMarker":"scenario.rules.addSection")+(n.hideIndex?"":"Index"))("ghs-label-args",t.kEZ(2,qw,n.index,"data.section."+n.name,n.marker||""))}}function V7(o,a){if(1&o&&t._UZ(0,"span",35),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","scenario.rules.finishWithConclusion")("ghs-label-args",t.kEZ(2,qw,n.index,"data.section."+n.name,n.marker||""))}}function Y7(o,a){if(1&o&&(t.ynx(0),t.YNc(1,z7,2,0,"span",28),t.TgZ(2,"span",37),t._UZ(3,"img",38),t.YNc(4,G7,1,6,"span",39),t.YNc(5,V7,1,6,"span",39),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=a.index;t.xp6(1),t.Q6J("ngIf",e>0),t.xp6(3),t.Q6J("ngIf",!n.conclusion),t.xp6(1),t.Q6J("ngIf",n.conclusion)}}function K7(o,a){if(1&o&&(t.TgZ(0,"div",36),t.YNc(1,Y7,6,3,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).index,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.sections(n))}}function $7(o,a){1&o&&(t.TgZ(0,"span",43),t._UZ(1,"span",6),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","scenario.rules.figures.scenarioEffect"))}const W7=function(o,a,n,e,i){return[o,a,n,e,i]};function X7(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",41),t._UZ(2,"span",35),t.YNc(3,$7,2,1,"span",42),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(2),t.Q6J("ghs-label","scenario.rules.figures."+n.type)("ghs-label-args",t.qbA(3,W7,i.figureNames(n,e.rule),n.value||"",i.settingsManager.settings.calculate&&("damage"==n.type&&n.value&&-1==n.value.indexOf("H")||("setHp"==n.type||"heal"==n.type)&&n.value&&-1==n.value.indexOf("H"))?""+i.EntityValueFunction(n.value||""):n.value||"","amAdd"==n.type||"amRemove"==n.type?n.value.split(":")[0]:"","amAdd"==n.type||"amRemove"==n.type||"transfer"==n.type&&n.value&&n.value.split(":").length>1?n.value.split(":")[1]:"")),t.xp6(1),t.Q6J("ngIf",n.scenarioEffect)}}function t8(o,a){if(1&o&&(t.TgZ(0,"div",40),t.YNc(1,X7,4,9,"ng-container",1),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.figureRules(n.rule))}}function e8(o,a){if(1&o&&t._UZ(0,"p",17),2&o){const n=t.oxw(2).$implicit;t.Q6J("ghs-label","scenario.rules."+n.rule.finish)}}function n8(o,a){if(1&o&&t._UZ(0,"p",17),2&o){const n=t.oxw(2).$implicit;t.Q6J("ghs-label",n.rule.note)}}function i8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",44)(1,"a",45),t.NdJ("click",function(){t.CHM(n),t.oxw();const i=t.MAs(1),s=t.oxw().index,l=t.oxw();return t.KtG(l.applyRule(i,s))}),t._UZ(2,"span",6)(3,"img",46),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.rules.apply"))}function o8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",3,4)(2,"div",5),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(1),s=t.oxw().index,l=t.oxw();return t.KtG(l.hideRule(i,s))}),t._UZ(3,"span",6)(4,"img",7),t.qZA(),t.YNc(5,A7,1,1,"p",8),t.YNc(6,N7,2,1,"div",9),t.YNc(7,Q7,2,1,"div",10),t.YNc(8,q7,2,1,"div",11),t.YNc(9,B7,2,1,"div",12),t.YNc(10,K7,2,1,"div",13),t.YNc(11,t8,2,1,"div",14),t.YNc(12,e8,1,1,"p",8),t.YNc(13,n8,1,1,"p",8),t.YNc(14,i8,4,1,"div",15),t.TgZ(15,"div",16),t.NdJ("click",function(){t.CHM(n);const i=t.MAs(1),s=t.oxw().index,l=t.oxw();return t.KtG(l.close(i,s))}),t.qZA()()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.xp6(3),t.Q6J("ghs-label","scenario.rules.hide"),t.xp6(2),t.Q6J("ngIf",e.rule.noteTop),t.xp6(1),t.Q6J("ngIf",s.spawns(e.rule).length>0),t.xp6(1),t.Q6J("ngIf",e.rule.objectiveSpawns&&e.rule.objectiveSpawns.length>0),t.xp6(1),t.Q6J("ngIf",e.rule.elements&&e.rule.elements.length>0),t.xp6(1),t.Q6J("ngIf",s.rooms(i).length>0),t.xp6(1),t.Q6J("ngIf",s.sections(i).length>0),t.xp6(1),t.Q6J("ngIf",s.figureRules(e.rule).length>0),t.xp6(1),t.Q6J("ngIf",e.rule.finish),t.xp6(1),t.Q6J("ngIf",e.rule.note),t.xp6(1),t.Q6J("ngIf",s.apply(e.rule)),t.xp6(1),t.Q6J("ghs-label","scenario.rules.dismiss")("ghs-label-attribute","title")}}function a8(o,a){if(1&o&&(t.ynx(0),t.YNc(1,o8,16,13,"div",2),t.BQk()),2&o){const n=a.index,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.visible(n))}}const s8=function(o){return{denied:o}};let r8=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"EntityValueFunction",ae.j9),this.dialog=e}spawns(e){return e.spawns&&e.spawns.filter(i=>this.spawnType(i.monster))||[]}spawnType(e){let i=e.type;if(!i){const s=Math.max(2,d.v.characterManager.characterCount());i=s<3?e.player2:3==s?e.player3:e.player4}return i}spawnCount(e,i){let s=i.count,l=0;if(s&&e.figures){const m=e.figures.find(O=>"present"==O.type||"dead"==O.type);if(m){const O=d.v.scenarioRulesManager.entitiesByFigureRule(m,e).filter(W=>d.v.entityManager.isAlive(W)&&(!(W instanceof In.g)||!m.identifier?.marker||W instanceof In.g&&W.marker==m.identifier?.marker)),k=m.value&&m.value.split(":").length>1?(0,ae.j9)(m.value.split(":")[1]):0;l="present"==m.type?O.length:Math.max(0,k-O.length)}}for(;"string"==typeof s&&-1!=s.indexOf("F");)s=s.replace("F",""+l);return(0,ae.j9)(s||(i.manual?0:1))}prevent(e){e.preventDefault(),e.stopPropagation()}sections(e){if(d.v.game.scenarioRules[e]){const i=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[e].identifier).scenario;if(i){const s=d.v.game.scenarioRules[e].rule;if(s&&s.sections)return d.v.sectionData(i.edition).filter(l=>!d.v.game.sections.find(m=>m.edition==l.edition&&m.group==l.group&&m.index==l.index)&&-1!=s.sections.indexOf(l.index))}}return[]}rooms(e){let i=[];if(d.v.game.scenarioRules[e]){const s=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[e].identifier).scenario;if(s){const l=d.v.game.scenarioRules[e].rule;l&&l.rooms&&l.rooms.forEach(m=>{const O=s.rooms.find(k=>k.roomNumber==m);O&&d.v.game.scenario&&-1==d.v.game.scenario.revealedRooms.indexOf(m)&&i.push(O)})}}return i}figureRules(e){return e.figures&&e.figures.filter(i=>{if("present"==i.type||"dead"==i.type||"killed"==i.type)return!1;const s=d.v.scenarioRulesManager.figuresByFigureRule(i,e);return 0!=s.length&&("gainCondition"==i.type||"permanentCondition"==i.type||"loseCondition"==i.type?s.some(l=>{if("gainCondition"==i.type){let m=d.v.entityManager.entities(l),O=new re.gP(i.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O)))return!1}else if("permanentCondition"==i.type){let m=d.v.entityManager.entities(l),O=new re.gP(i.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O,!0)))return!1}else if("loseCondition"==i.type){let m=d.v.entityManager.entities(l),O=new re.gP(i.value);if(m.every(k=>!d.v.entityManager.hasCondition(k,O)))return!1}return!0}):"toggleOn"!=i.type&&"toggleOff"!=i.type||s.some(l=>l.off==("toggleOn"==i.type)))})||[]}figureNames(e,i){let s="";return e.identifier&&(s="all"==e.identifier.type?R.r.getLabel("scenario.rules.figures.all"):d.v.scenarioRulesManager.figuresByFigureRule(e,i).filter(l=>{if("gainCondition"==e.type){let m=d.v.entityManager.entities(l),O=new re.gP(e.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O)))return!1}else if("permanentCondition"==e.type){let m=d.v.entityManager.entities(l),O=new re.gP(e.value);if(m.every(k=>d.v.entityManager.hasCondition(k,O,!0)))return!1}else if("loseCondition"==e.type){let m=d.v.entityManager.entities(l),O=new re.gP(e.value);if(m.every(k=>!d.v.entityManager.hasCondition(k,O)))return!1}else if("toggleOn"==e.type||"toggleOff"==e.type)return l.off==("toggleOn"==e.type);return!0}).map(l=>l instanceof oe.z?R.r.getLabel("%game.characterIconColored."+l.name+"%")+d.v.characterManager.characterName(l):l instanceof qe.CH||l instanceof Nn.k?(l.title||R.r.getLabel("data.objective."+l.name))+(l.marker?" %game.mapMarker."+l.marker+"%":""):l instanceof Ze.Q?"removeEntity"==e.type?R.r.getLabel("data.monster."+l.name)+" ["+d.v.scenarioRulesManager.entitiesByFigureRule(e,i).filter(m=>m instanceof In.g&&-1!=l.entities.indexOf(m)).map(m=>""+m.number).join(", ")+"]":R.r.getLabel("data.monster."+l.name):l.name).join(", ")),s}visible(e){if(d.v.game.scenarioRules[e]){const i=d.v.game.scenarioRules[e].rule;if(i.disablingRules&&i.disablingRules.length>0&&i.disablingRules.some(s=>d.v.game.scenarioRules.find((l,m)=>e!=m&&s.edition==l.identifier.edition&&s.group==l.identifier.group&&(s.index==l.identifier.index||-1==s.index)&&s.scenario==l.identifier.scenario&&s.section==l.identifier.section&&this.visible(m))))return!1;if(this.spawns(i).length>0||i.objectiveSpawns&&i.objectiveSpawns.length>0||i.elements&&i.elements.length>0&&i.elements.some(s=>d.v.game.elementBoard.find(l=>l.type==s.type)?.state!=s.state)||this.sections(e).length>0||this.rooms(e).length>0||this.figureRules(i).length>0||i.note||i.finish)return!0}return!1}apply(e){return this.spawns(e).length>0||e.objectiveSpawns&&e.objectiveSpawns.length>0||e.elements&&e.elements.length>0||e.finish||R.r.settings.scenarioRooms&&e.rooms&&e.rooms.length>0||e.sections&&e.sections.length>0||e.figures&&e.figures.length>0&&e.figures.some(i=>"present"!=i.type&&"dead"!=i.type&&"killed"!=i.type)}applyRule(e,i){if(d.v.game.scenarioRules[i]){const s=d.v.game.scenarioRules[i].rule,l=d.v.game.scenarioRules[i].identifier,m=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[i].identifier).scenario,O=d.v.scenarioRulesManager.getScenarioForRule(d.v.game.scenarioRules[i].identifier).section;if(m){if(d.v.stateManager.before("applyScenarioRule"),s.figures&&s.figures.filter(k=>"remove"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{ct instanceof qe.CH?d.v.characterManager.removeObjective(ct):ct instanceof Nn.k?d.v.objectiveManager.removeObjective(ct):ct instanceof Ze.Q&&d.v.monsterManager.removeMonster(ct)})}),s.spawns){let k=[];s.spawns.forEach(W=>{const ct=this.spawnType(W.monster);if(ct&&m){const Ct=d.v.monsterManager.addMonsterByName(W.monster.name,m.edition);if(Ct)for(let Ot=0;Ot0)&&d.v.addEntityCount(Ct,xt))}}})}s.objectiveSpawns&&s.objectiveSpawns.forEach(k=>{const W={edition:m.edition,scenario:m.index,group:m.group,section:O,index:k.objective.index-1},ct=d.v.objectiveDataByScenarioObjectiveIdentifier(W);if(ct&&0!=k.count){const Ct=(0,ae.j9)(k.count||1)-1;let Ot=d.v.objectiveManager.addObjective(ct,ct.name,W);Ot&&k.objective.marker&&(Ot.marker=k.objective.marker);for(let xt=0;xt0)&&d.v.addEntityCount(Ot)}}}),s.elements&&s.elements.forEach(k=>{d.v.game.elementBoard.forEach(W=>{k&&W.type==k.type&&(W.state=k.state)})}),s.rooms&&this.rooms(i).forEach(k=>{d.v.scenarioManager.openRoom(k,m,d.v.game.scenarioRules[i].identifier.section)}),s.sections&&this.sections(i).forEach(k=>{k.conclusion?this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:!0,conclusion:k}}):d.v.scenarioManager.addSection(k)}),s.figures&&(s.figures.filter(k=>"gainCondition"==k.type||"permanentCondition"==k.type||"loseCondition"==k.type||"damage"==k.type||"heal"==k.type||"setHp"==k.type||"dormant"==k.type||"activate"==k.type||"removeEntity"==k.type).forEach(k=>{let W=d.v.scenarioRulesManager.figuresByFigureRule(k,s),ct=d.v.scenarioRulesManager.entitiesByFigureRule(k,s);W.forEach(Ct=>{d.v.entityManager.entities(Ct).filter(xt=>-1!=ct.indexOf(xt)).forEach(xt=>{switch(k.type){case"gainCondition":let Gt=new re.gP(k.value);d.v.entityManager.hasCondition(xt,Gt)||d.v.entityManager.addCondition(xt,Gt,Ct.active,Ct.off);break;case"permanentCondition":let se=new re.gP(k.value);d.v.entityManager.hasCondition(xt,se,!0)||d.v.entityManager.addCondition(xt,se,Ct.active,Ct.off,!0);break;case"loseCondition":let De=new re.gP(k.value);d.v.entityManager.hasCondition(xt,De)&&d.v.entityManager.removeCondition(xt,De);break;case"damage":let un=0;un=isNaN(+k.value)&&-1!=k.value.indexOf("H")?+(0,ae.j9)(k.value.replaceAll("HP",""+xt.health).replaceAll("H",""+(0,ae.j9)(xt.maxHealth))):+(0,ae.j9)(k.value),un<0?un=0:un>(0,ae.j9)(xt.maxHealth)&&(un=(0,ae.j9)(xt.maxHealth)),d.v.entityManager.changeHealth(xt,Ct,-un);break;case"heal":let vn=0;vn=isNaN(+k.value)&&-1!=k.value.indexOf("H")?+(0,ae.j9)(k.value.replaceAll("HP",""+xt.health).replaceAll("H",""+(0,ae.j9)(xt.maxHealth))):+(0,ae.j9)(k.value),vn<0&&(vn=0),xt.health+=vn,d.v.entityManager.addCondition(xt,new re.gP(re.fT.heal,vn),Ct.active,Ct.off),d.v.entityManager.applyCondition(xt,Ct,re.fT.heal,!0);break;case"setHp":let Rn=0;Rn=isNaN(+k.value)&&-1!=k.value.indexOf("H")?+(0,ae.j9)(k.value.replaceAll("HP",""+xt.health).replaceAll("H",""+(0,ae.j9)(xt.maxHealth))):+(0,ae.j9)(k.value),Rn<0?Rn=0:Rn>(0,ae.j9)(xt.maxHealth)&&(Rn=(0,ae.j9)(xt.maxHealth)),xt.health=Rn;break;case"dormant":xt instanceof In.g&&(xt.dormant=!0,xt.revealed=!1);break;case"activate":xt instanceof In.g&&(xt.dormant=!1);break;case"removeEntity":xt.tags.push("ignore-kill"),xt instanceof oe.z?d.v.characterManager.removeCharacter(xt):Ct instanceof Ze.Q&&xt instanceof In.g?d.v.monsterManager.removeMonsterEntity(Ct,xt):xt instanceof qe.CH&&d.v.characterManager.removeObjective(xt),k.identifier&&d.v.entityCounters(k.identifier).forEach(_g=>{_g.total-=1})}})})}),s.figures.filter(k=>"toggleOff"==k.type||"toggleOn"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{ct.off="toggleOff"==k.type,ct instanceof Ze.Q&&ct.entities.forEach(Ct=>{Ct.dormant="toggleOff"==k.type})})}),s.figures.filter(k=>"transfer"==k.type).forEach(k=>{const W=d.v.scenarioRulesManager.figuresByFigureRule(k,s);if(1==W.length&&W[0]instanceof Ze.Q){const ct=W[0],Ct=d.v.monsterManager.addMonsterByName(k.value,m.edition);Ct&&(-1==k.value.indexOf(":")&&(Ct.level=ct.level),Ct.off=ct.off,Ct.active=ct.active,Ct.drawExtra=ct.drawExtra,Ct.lastDraw=ct.lastDraw,Ct.ability=ct.ability,Ct.isAlly=ct.isAlly,Ct.isAllied=ct.isAllied,Ct.entities=ct.entities,Ct.entities.forEach(Ot=>{const xt=ct.stats.find(se=>se.level==ct.level&&se.type==Ot.type),Gt=Ct.stats.find(se=>se.level==Ct.level&&se.type==Ot.type);Gt?(Ot.stat=Gt,xt&&Ot.maxHealth==(0,ae.j9)(xt.health)&&(Ot.maxHealth=(0,ae.j9)(Gt.health))):(Ct.errors=Ct.errors||[],!Ct.errors.find(se=>se.type==ug.r.unknown)&&!Ct.errors.find(se=>se.type==ug.r.stat)&&(console.error("Could not find '"+Ot.type+"' stats for monster: "+Ct.name+" level: "+Ct.level),Ct.errors.push(new ug.o(ug.r.stat,"monster",Ct.name,Ct.edition,Ot.type,""+Ct.level)))),(Ot.health>Ot.maxHealth||0==Ot.maxHealth&&Ot.health>0)&&(Ot.health=Ot.maxHealth)}),Ct!=ct&&d.v.monsterManager.removeMonster(ct),d.v.sortFigures(Ct))}else if(1==W.length&&W[0]instanceof qe.CH){const ct=W[0],Ot=d.v.characterManager.addObjective(m.objectives[+k.value-1],void 0,{edition:m.edition,scenario:m.index,group:m.group,section:O,index:+k.value-1});Ot.id=ct.id,Ot.marker=ct.marker,Ot.title=ct.title,Ot.exhausted=ct.exhausted,Ot.off=ct.off,Ot.active=ct.active,Ot.health=ct.health,Ot.health>(0,ae.j9)(Ot.maxHealth)&&(Ot.health=(0,ae.j9)(Ot.maxHealth)),Ot.entityConditions=ct.entityConditions,d.v.characterManager.removeObjective(ct)}else if(1==W.length&&W[0]instanceof Nn.k){const ct=W[0],Ot=m.objectives[+k.value-1];let xt=d.v.objectiveManager.addObjective(Ot,void 0,{edition:m.edition,scenario:m.index,group:m.group,section:O,index:+k.value-1});xt.entities=ct.entities,xt.entities.forEach(Gt=>{Gt.maxHealth=(0,ae.j9)(ct.health),Gt.health>Gt.maxHealth&&(Gt.health=Gt.maxHealth),Ot&&(Ot.tags&&(Gt.tags=Ot.tags),Ot.marker&&(Gt.marker=Ot.marker))}),d.v.objectiveManager.removeObjective(ct)}}),s.figures.filter(k=>"amAdd"==k.type||"amRemove"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{const Ct=d.v.attackModifierManager.byFigure(ct),Ot=k.value.split(":")[0];let xt=+k.value.split(":")[1];if("amAdd"==k.type)for(let Gt=0;Gt=10)return;if(Ot==Lt.kl.curse&&d.v.attackModifierManager.countUpcomingCurses(ct instanceof Ze.Q&&!ct.isAlly&&!ct.isAllied)>=10)return;if(Ot==Lt.kl.minus1&&d.v.attackModifierManager.countExtraMinus1()>=15)return;d.v.attackModifierManager.addModifier(Ct,new Lt.YY(Ot))}else{let Gt=Ct.cards.find((se,De)=>se.type==Ot&&De>Ct.current);for(;Gt&&xt>0;)Ct.cards.splice(Ct.cards.indexOf(Gt),1),Gt=Ct.cards.find((se,De)=>se.type==Ot&&De>Ct.current),xt--;if(xt>0){let se=Ct.cards.find(De=>De.type==Ot);for(;se&&xt<0;)Ct.cards.splice(Ct.cards.indexOf(se),1),se=Ct.cards.find(De=>De.type==Ot),xt--}}})}),s.figures.filter(k=>"setAbility"==k.type||"drawAbility"==k.type||"discardAbilityToBottom"==k.type).forEach(k=>{d.v.scenarioRulesManager.figuresByFigureRule(k,s).forEach(ct=>{if(ct instanceof Ze.Q)if("setAbility"==k.type){const Ct=d.v.abilities(ct).find(Ot=>isNaN(+k.value)?Ot.name==k.value:Ot.cardId==+k.value);if(Ct){const Ot=d.v.abilities(ct).indexOf(Ct);-1!=Ot&&(ct.abilities=ct.abilities.filter(xt=>xt!=Ot),ct.abilities.unshift(Ot),ct.ability=d.v.game.state==ge.D2.draw?-1:0)}}else"drawAbility"==k.type?d.v.monsterManager.drawAbility(ct):"discardAbilityToBottom"==k.type&&Fn(ct.abilities,ct.ability,0)})})),s.finish&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:m,success:"won"==s.finish}}),e.classList.add("closed"),setTimeout(()=>{s.once&&d.v.game.disgardedScenarioRules.push(l),d.v.game.scenarioRules.splice(i,1),d.v.stateManager.after()},R.r.settings.disableAnimations?0:100)}}}hideRule(e,i){e.classList.add("closed"),setTimeout(()=>{d.v.stateManager.before("hideScenarioRule");const s=d.v.game.scenarioRules.splice(i,1)[0];d.v.game.disgardedScenarioRules.push(s.identifier),d.v.stateManager.after()},R.r.settings.disableAnimations?0:100)}close(e,i){e.classList.add("closed"),setTimeout(()=>{d.v.stateManager.before("removeScenarioRule");const s=d.v.game.scenarioRules.splice(i,1)[0];s.rule.once&&d.v.game.disgardedScenarioRules.push(s.identifier),d.v.stateManager.after()},R.r.settings.disableAnimations?0:100)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-rules"]],decls:2,vars:4,consts:[[1,"rules-dialog",3,"ngClass"],[4,"ngFor","ngForOf"],["class","rule dialog",4,"ngIf"],[1,"rule","dialog"],["ruleElement",""],[1,"hide",3,"click"],[3,"ghs-label"],["src","./assets/images/close.svg"],["class","text-white",3,"ghs-label",4,"ngIf"],["class","spawns",4,"ngIf"],["class","objective-spawns",4,"ngIf"],["class","elements",4,"ngIf"],["class","sections rooms",4,"ngIf"],["class","sections",4,"ngIf"],["class","figures",4,"ngIf"],["class","menu",4,"ngIf"],[1,"close",3,"ghs-label","ghs-label-attribute","click"],[1,"text-white",3,"ghs-label"],[1,"spawns"],["class","and",3,"ghs-label",4,"ngIf"],[1,"text-white","text",3,"ghs-label","ghs-label-args"],["type","number",3,"ngModel","min","max","ngModelChange",4,"ngIf"],[1,"and",3,"ghs-label"],["type","number",3,"ngModel","min","max","ngModelChange"],[1,"objective-spawns"],["type","number",3,"ngModel","min","max","value","ngModelChange",4,"ngIf"],["type","number",3,"ngModel","min","max","value","ngModelChange"],[1,"elements"],["class","and",4,"ngIf"],[1,"element"],[3,"element"],[1,"and"],[1,"sections","rooms"],[1,"section","room"],["src","./assets/images/scenario/door.svg",1,"ghs-svg"],[1,"text-white",3,"ghs-label","ghs-label-args"],[1,"sections"],[1,"section"],["src","./assets/images/scenario/lock.svg",1,"ghs-svg"],["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"figures"],[1,"figure"],["class","text-white",4,"ngIf"],[1,"text-white"],[1,"menu"],[1,"apply",3,"click"],["src","./assets/images/check.svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,a8,2,1,"ng-container",1),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(2,s8,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.scenario)),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.scenarioRules))},dependencies:[x.mk,x.sg,x.O5,Ho,Ir,yi,Jc,id,Si,MT,ie],styles:[".rules-dialog[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));color:var(--ghs-color-gray);font-family:var(--ghs-font-text);text-align:center}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-darkgray);cursor:pointer;display:flex;justify-content:flex-end;align-items:center;z-index:1;margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .2em;filter:var(--ghs-filter-darkgray)}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%]:hover{color:var(--ghs-color-gray)}.rules-dialog[_ngcontent-%COMP%] .hide[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;min-height:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));transition:all .1s ease-in-out;overflow:hidden;width:100%}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .and[_ngcontent-%COMP%]{margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .spawns[_ngcontent-%COMP%], .rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .objective-spawns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;padding:.5em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .spawns[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .objective-spawns[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:nowrap}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .spawns[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .objective-spawns[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));font-family:var(--ghs-font-text);width:2em;background-color:transparent;z-index:1;margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] > .element[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] > .element[_ngcontent-%COMP%] ghs-element-icon[_ngcontent-%COMP%]{width:2em;height:2em;margin-right:.15em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%] > .element[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:inline-flex}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-left:calc(var(--ghs-unit) * .1 * var(--ghs-barsize)) solid var(--ghs-color-white)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .figures[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 .1em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor))}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;z-index:1;flex-grow:1}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));height:auto;margin:0 .2em}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.rules-dialog[_ngcontent-%COMP%] .rule[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:0;cursor:zoom-out}.rules-dialog[_ngcontent-%COMP%] .rule.closed[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;height:0;min-height:initial;width:100%}"]})),a})();function c8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",11),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setLevelCalculation(!i.gameManager.game.levelCalculation))}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.gameManager.game.levelCalculation),t.xp6(1),t.Q6J("ghs-label","settings.levelCalculation")}}function l8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label"),t._UZ(1,"span",3),t.TgZ(2,"input",4,26),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(3),s=t.oxw();return t.KtG(s.setLevelAdjustment(+i.value))}),t.qZA()()}if(2&o){const n=t.MAs(3),e=t.oxw();t.xp6(1),t.Q6J("ghs-label","settings.levelAdjustment"),t.xp6(1),t.Q6J("value",e.gameManager.game.levelAdjustment)("size",n.value.length)("ghs-label","settings.levelAdjustment")("ghs-label-attribute","placeholder")}}function g8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",11),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.setGe5Player(!i.gameManager.game.ge5Player))}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.gameManager.game.ge5Player),t.xp6(1),t.Q6J("ghs-label","settings.ge5Player")}}const d8=function(o,a){return{active:o,scenariolevel:a}};function h8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",7)(1,"a",27),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s))}),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(2,d8,n==e.gameManager.game.level,e.gameManager.game.playerCount<1&&n==e.gameManager.levelManager.scenarioLevel())),t.xp6(1),t.Oqu(n)}}function u8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",28,29),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(n);const i=t.MAs(1),s=t.oxw();return t.KtG(s.setPlayerCount(+i.value))}),t.qZA()}if(2&o){const n=t.MAs(1),e=t.oxw();t.Q6J("value",e.gameManager.game.playerCount)("size",n.value.length)("ghs-label","settings.playerCount")("ghs-label-attribute","placeholder")}}const _8=function(o){return{denied:o}},p8=function(o){return{disabled:o}};let f8=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"trap",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"hazardousTerrain",0),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.calculateValues()}}),this.calculateValues()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}setLevelCalculation(e){d.v.stateManager.before(e?"enableAutomaticLevel":"disabledAutomaticLevel"),d.v.game.levelCalculation=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setLevelAdjustment(e){d.v.stateManager.before("updateLevelAdjustment",(0,he.uZ)(e)),d.v.game.levelAdjustment=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setBonusAdjustment(e){d.v.stateManager.before("updateBonusAdjustment",(0,he.uZ)(e)),d.v.game.bonusAdjustment=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setGe5Player(e){d.v.stateManager.before(e?"enabledGe5Player":"disabledGe5Player"),d.v.game.ge5Player=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}ge5Player(){return d.v.game.playerCount<1&&d.v.characterManager.characterCount()>4}togglePlayerCount(e){d.v.stateManager.before(e.target.checked?"enabledManualPlayerCount":"disabledManualPlayerCount"),d.v.game.playerCount=e.target.checked?2:-1,e.target.checked?d.v.game.levelCalculation=!1:d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setPlayerCount(e){d.v.stateManager.before("updateManualPlayerCount",""+e),d.v.game.playerCount=e,d.v.game.levelCalculation&&d.v.levelManager.calculateScenarioLevel(),d.v.stateManager.after()}setLevel(e){d.v.stateManager.before("setScenarioLevel",""+e),d.v.levelManager.setLevel(e),d.v.game.levelCalculation=!1,d.v.stateManager.after()}setSolo(e){d.v.stateManager.before(e?"enableSolo":"disableSolo"),d.v.game.solo=e,d.v.stateManager.after()}calculateValues(){this.trap=d.v.levelManager.trap(),this.experience=d.v.levelManager.experience(),this.loot=d.v.levelManager.loot(),this.hazardousTerrain=d.v.levelManager.terrain()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-level-dialog"]],decls:54,vars:29,consts:[[1,"level-dialog",3,"ngClass"],[1,"menu"],[4,"ngIf"],[3,"ghs-label"],["type","number","min","-6","max","6",3,"value","size","ghs-label","ghs-label-attribute","keyup","change"],["bonusAdjustment",""],[1,"level-container",3,"ngClass"],[1,"item"],["src","./assets/images/level.svg"],["class","item",4,"ngFor","ngForOf"],[1,"solo"],["type","checkbox",3,"checked","change"],[1,"values"],[1,"loot"],[1,"icon"],[1,"ghs-svg",3,"src"],[1,"value"],[1,"hint"],[1,"trap"],["src","./assets/images/trap.svg",1,"ghs-svg"],[1,"experience"],["src","./assets/images/experience.svg",1,"ghs-svg"],[1,"terrain"],["src","./assets/images/terrain.svg",1,"ghs-svg"],[1,"player-count"],["type","number","min","1",3,"value","size","ghs-label","ghs-label-attribute","keyup","change",4,"ngIf"],["levelAdjustment",""],[1,"level",3,"ngClass","click"],["type","number","min","1",3,"value","size","ghs-label","ghs-label-attribute","keyup","change"],["playerCount",""]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,c8,3,2,"label",2),t.YNc(3,l8,4,5,"label",2),t.TgZ(4,"label"),t._UZ(5,"span",3),t.TgZ(6,"input",4,5),t.NdJ("keyup",function(){return 0})("change",function(){t.CHM(s);const m=t.MAs(7);return t.KtG(i.setBonusAdjustment(+m.value))}),t.qZA()(),t.YNc(8,g8,3,2,"label",2),t.qZA(),t.TgZ(9,"div",6)(10,"span",7),t._UZ(11,"img",8),t.qZA(),t.YNc(12,h8,3,5,"span",9),t.TgZ(13,"div",10)(14,"label")(15,"input",11),t.NdJ("change",function(){return i.setSolo(!i.gameManager.game.solo)}),t.qZA(),t._UZ(16,"span",3),t.qZA()()(),t.TgZ(17,"div",12)(18,"div",13)(19,"span",14),t._UZ(20,"img",15),t._uU(21,":"),t.qZA(),t.TgZ(22,"span",16),t._uU(23),t.qZA(),t.TgZ(24,"span",17),t._UZ(25,"span",3),t.qZA()(),t.TgZ(26,"div",18)(27,"span",14),t._UZ(28,"img",19),t._uU(29,":"),t.qZA(),t.TgZ(30,"span",16),t._uU(31),t.qZA(),t.TgZ(32,"span",17),t._UZ(33,"span",3),t.qZA()(),t.TgZ(34,"div",20)(35,"span",14),t._UZ(36,"img",21),t._uU(37,":"),t.qZA(),t.TgZ(38,"span",16),t._uU(39),t.qZA(),t.TgZ(40,"span",17),t._UZ(41,"span",3),t.qZA()(),t.TgZ(42,"div",22)(43,"span",14),t._UZ(44,"img",23),t._uU(45,":"),t.qZA(),t.TgZ(46,"span",16),t._uU(47),t.qZA(),t.TgZ(48,"span",17),t._UZ(49,"span",3),t.qZA()()(),t.TgZ(50,"label",24)(51,"input",11),t.NdJ("change",function(m){return i.togglePlayerCount(m)}),t.qZA(),t._UZ(52,"span",3),t.YNc(53,u8,2,4,"input",25),t.qZA()()}if(2&e){const s=t.MAs(7);t.Q6J("ngClass",t.VKq(25,_8,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.level)),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.playerCount<1),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.levelCalculation),t.xp6(2),t.Q6J("ghs-label","settings.bonusAdjustment"),t.xp6(1),t.Q6J("value",i.gameManager.game.bonusAdjustment)("size",s.value.length)("ghs-label","settings.bonusAdjustment")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngIf",i.ge5Player()),t.xp6(1),t.Q6J("ngClass",t.VKq(27,p8,i.gameManager.game.levelCalculation)),t.xp6(3),t.Q6J("ngForOf",i.levels),t.xp6(3),t.Q6J("checked",i.gameManager.game.solo),t.xp6(1),t.Q6J("ghs-label","game.solo"),t.xp6(4),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/loot.svg",t.LSH),t.xp6(3),t.hij("x",i.loot,""),t.xp6(2),t.Q6J("ghs-label","game.level.loot"),t.xp6(6),t.Oqu(i.trap),t.xp6(2),t.Q6J("ghs-label","game.level.trap"),t.xp6(6),t.hij("+",i.experience,""),t.xp6(2),t.Q6J("ghs-label","game.level.experience"),t.xp6(6),t.Oqu(i.hazardousTerrain),t.xp6(2),t.Q6J("ghs-label","game.level.hazardousTerrain"),t.xp6(2),t.Q6J("checked",i.gameManager.game.playerCount>0),t.xp6(1),t.Q6J("ghs-label","settings.playerCount"),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.playerCount>0)}},dependencies:[x.mk,x.sg,x.O5,ie],styles:['.level-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column}.level-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{width:2em}.level-dialog[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.level-dialog[_ngcontent-%COMP%] label.player-count[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.3 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) auto}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.scenariolevel[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-darkgray) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.level-dialog[_ngcontent-%COMP%] .level-container.disabled[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.level-dialog[_ngcontent-%COMP%] .level-container.disabled[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{pointer-events:none}.level-dialog[_ngcontent-%COMP%] .level-container.disabled[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:not(.active){color:var(--ghs-color-darkgray)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.level-dialog[_ngcontent-%COMP%] .solo[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--ghs-color-gray);font-size:1.6em;font-family:var(--ghs-font-normal)}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;grid-template-columns:.2fr .2fr 1fr;align-items:center;justify-content:center;margin-bottom:.2em}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{text-align:center}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{text-align:left}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.level-dialog[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:1.3em;height:auto;filter:var(--ghs-filter-gray)}']})),a})();const m8=["levelButton"];let v8=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"levelButton",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"trap",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"hazardousTerrain",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.calculateValues()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}open(e){const i=[new ti.tR({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),new ti.tR({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),new ti.tR({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"})];this.dialog.open(f8,{panelClass:"dialog",positionStrategy:this.overlay.position().flexibleConnectedTo(this.levelButton).withPositions(i).withDefaultOffsetY(-10)})}calculateValues(){this.trap=d.v.levelManager.trap(),this.experience=d.v.levelManager.experience(),this.loot=d.v.levelManager.loot(),this.hazardousTerrain=d.v.levelManager.terrain()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-level"]],viewQuery:function(e,i){if(1&e&&t.Gf(m8,5),2&e){let s;t.iGM(s=t.CRH())&&(i.levelButton=s.first)}},decls:19,vars:16,consts:[[1,"level-status"],["levelButton",""],[1,"values",3,"click"],[1,"level",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/level.svg",1,"ghs-svg"],[1,"loot",3,"ghs-label","ghs-label-attribute"],[1,"ghs-svg",3,"src"],[1,"trap",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/trap.svg",1,"ghs-svg"],[1,"experience",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/experience.svg",1,"ghs-svg"],[1,"terrain",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/terrain.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0,1)(2,"div",2),t.NdJ("click",function(l){return i.open(l)}),t.TgZ(3,"span",3),t._UZ(4,"img",4),t._uU(5),t.qZA(),t.TgZ(6,"span",5),t._UZ(7,"img",6),t._uU(8),t.qZA(),t.TgZ(9,"span",7),t._UZ(10,"img",8),t._uU(11),t.qZA(),t.TgZ(12,"span",9),t._UZ(13,"img",10),t._uU(14),t.qZA(),t.TgZ(15,"span",11),t._UZ(16,"img",12),t.TgZ(17,"span"),t._uU(18),t.qZA()()()()),2&e&&(t.xp6(3),t.Q6J("ghs-label","game.level")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",i.gameManager.game.level,""),t.xp6(1),t.Q6J("ghs-label","game.level.loot")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/loot.svg",t.LSH),t.xp6(1),t.hij(" x",i.loot,""),t.xp6(1),t.Q6J("ghs-label","game.level.trap")("ghs-label-attribute","title"),t.xp6(2),t.hij(" ",i.trap,""),t.xp6(1),t.Q6J("ghs-label","game.level.experience")("ghs-label-attribute","title"),t.xp6(2),t.hij(" +",i.experience,""),t.xp6(1),t.Q6J("ghs-label","game.level.hazardousTerrain")("ghs-label-attribute","title"),t.xp6(3),t.Oqu(i.hazardousTerrain))},dependencies:[ie],styles:[".level-status[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;align-items:center;flex-direction:column;justify-content:space-evenly;text-align:center}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;width:100%;justify-content:center}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-barsize));color:var(--ghs-color-gray);margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-barsize));text-shadow:var(--ghs-outline-thin)}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%] span[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-barsize));width:calc(var(--ghs-unit) * 3 * var(--ghs-barsize));height:auto;display:inline-block;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.level-status[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}"]})),a})();const C8=function(o,a){return[o,a]};function M8(o,a){if(1&o&&t._UZ(0,"p",7),2&o){const n=t.oxw();t.Q6J("ghs-label",(n.sectionData.marker?"scenario.section.addMarker":"scenario.section.add")+(n.sectionData.hideIndex?"":"Index"))("ghs-label-args",t.WLB(2,C8,n.sectionData.index,n.sectionData.marker||""))}}const O8=function(o){return[o]};function P8(o,a){if(1&o&&t._UZ(0,"p",7),2&o){const n=t.oxw();t.Q6J("ghs-label","scenario.section.conclusion")("ghs-label-args",t.VKq(2,O8,n.sectionData.name?"data.section."+n.sectionData.name:"%scenario.section% #"+n.sectionData.index))}}let xT=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"sectionData",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),this.sectionData=e,this.dialog=i,this.dialogRef=s}addSection(){this.sectionData.conclusion?(this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:!0,conclusion:this.sectionData}}),this.dialogRef.close(!0)):(d.v.stateManager.before("addSection",this.sectionData.index,"data.section."+this.sectionData.name,"data.edition."+this.sectionData.edition),d.v.scenarioManager.addSection(this.sectionData),d.v.stateManager.after(),this.dialogRef.close(!0))}cancel(){this.dialogRef.close(!1)}confirm(e){"Enter"===e.key&&(this.addSection(),e.preventDefault(),e.stopPropagation())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(Te),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-section-dialog"]],hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(l){return i.confirm(l)},!1,t.evT)},decls:9,vars:4,consts:[[1,"section-popup"],[3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"buttons"],[1,"cancel",3,"click"],[3,"ghs-label"],[1,"spacer"],[1,"add",3,"click"],[3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,M8,1,5,"p",1),t.YNc(2,P8,1,4,"p",1),t.TgZ(3,"div",2)(4,"a",3),t.NdJ("click",function(){return i.cancel()}),t._UZ(5,"span",4),t.qZA(),t._UZ(6,"span",5),t.TgZ(7,"a",6),t.NdJ("click",function(){return i.addSection()}),t._UZ(8,"span",4),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("ngIf",!i.sectionData.conclusion),t.xp6(1),t.Q6J("ngIf",i.sectionData.conclusion),t.xp6(3),t.Q6J("ghs-label","scenario.section.cancel"),t.xp6(3),t.Q6J("ghs-label","scenario.section.confirm"))},dependencies:[x.O5,ie],styles:[".section-popup[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.section-popup[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{color:var(--ghs-color-green)}"]})),a})();function y8(o,a){if(1&o&&(t.TgZ(0,"span",11),t._UZ(1,"span",6),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.monster."+n.monster.name)}}function b8(o,a){if(1&o&&(t.TgZ(0,"span",11),t._UZ(1,"span",6),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.character."+n.character.name)}}function x8(o,a){if(1&o&&(t.TgZ(0,"span",12),t._UZ(1,"img",13),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH)}}function w8(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function k8(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",22)(2,"span",23),t._uU(3),t.qZA()(),t.TgZ(4,"div",24),t._UZ(5,"ghs-actions",16),t.qZA(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(3),t.Oqu(n.ability.level||0),t.xp6(2),t.Q6J("actions",n.ability.bottomActions)("monster",n.monster)("hint",n.ability.hint)("statsCalculation",n.statsCalculation)("relative",n.relative)("highlightElements",n.highlightElements)}}function T8(o,a){1&o&&(t.TgZ(0,"div",25),t._UZ(1,"img",26),t.qZA())}function Z8(o,a){1&o&&(t.TgZ(0,"div",27),t._UZ(1,"img",26),t.qZA())}function A8(o,a){if(1&o&&(t.TgZ(0,"span",28),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("[",n.abilityIndex+1,"]")}}function S8(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function E8(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function D8(o,a){if(1&o&&(t.TgZ(0,"span",28),t.YNc(1,S8,2,0,"span",10),t.YNc(2,E8,2,0,"span",10),t.TgZ(3,"span"),t._uU(4),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.character&&n.ability.cardId<100),t.xp6(1),t.Q6J("ngIf",n.character&&n.ability.cardId<10),t.xp6(2),t.Oqu(n.ability.cardId)}}function I8(o,a){if(1&o&&(t.TgZ(0,"span",12),t._UZ(1,"img",13),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH)}}function N8(o,a){1&o&&(t.TgZ(0,"span",29),t._UZ(1,"img",30)(2,"img",31),t.qZA())}function J8(o,a){1&o&&(t.TgZ(0,"span",32),t._UZ(1,"img",30)(2,"img",31),t.qZA())}function U8(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",14),t.YNc(2,w8,2,0,"span",10),t._uU(3),t.qZA(),t.TgZ(4,"span",11),t._uU(5),t.qZA(),t.TgZ(6,"div",15),t._UZ(7,"ghs-actions",16),t.qZA(),t.YNc(8,k8,6,7,"ng-container",10),t.YNc(9,T8,2,0,"div",17),t.YNc(10,Z8,2,0,"div",18),t.YNc(11,A8,2,1,"span",19),t.YNc(12,D8,5,3,"span",19),t.YNc(13,I8,2,1,"span",8),t.YNc(14,N8,3,0,"span",20),t.YNc(15,J8,3,0,"span",21),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.ability.initiative<10),t.xp6(1),t.Oqu(n.ability.initiative),t.xp6(2),t.Oqu(n.abilityLabel),t.xp6(2),t.Q6J("actions",n.ability.actions)("monster",n.monster)("hint",n.ability.hint)("statsCalculation",n.statsCalculation)("relative",n.relative)("highlightElements",n.highlightElements),t.xp6(1),t.Q6J("ngIf",n.ability.bottomActions&&n.ability.bottomActions.length>0||n.character),t.xp6(1),t.Q6J("ngIf",n.ability.shuffle),t.xp6(1),t.Q6J("ngIf",n.ability.bottomShuffle),t.xp6(1),t.Q6J("ngIf",!n.ability.cardId&&n.settingsManager.settings.abilityNumbers),t.xp6(1),t.Q6J("ngIf",n.ability.cardId&&n.settingsManager.settings.abilityNumbers),t.xp6(1),t.Q6J("ngIf",n.character),t.xp6(1),t.Q6J("ngIf",n.ability.lost),t.xp6(1),t.Q6J("ngIf",n.ability.bottomLost)}}const L8=function(o,a){return{fh:o,expand:a}},Q8=function(o){return{flipped:o}},wT=function(o,a){return{"bottom-actions":o,"character-actions":a}};let a_=(()=>{var o;class a{constructor(){(0,_.Z)(this,"ability",void 0),(0,_.Z)(this,"abilities",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"reveal",!1),(0,_.Z)(this,"relative",!1),(0,_.Z)(this,"highlightElements",!1),(0,_.Z)(this,"statsCalculation",!0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"abilityIndex",-1),(0,_.Z)(this,"abilityLabel",""),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.update(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){this.update()}update(){this.abilityIndex=-1,this.abilityLabel="",this.ability&&(this.abilityIndex=this.getAbilityIndex(this.ability),this.abilityLabel=this.getAbilityLabel(this.ability))}getAbilityIndex(e){return this.abilities&&this.abilities.length>0?this.abilities.indexOf(e):this.monster?d.v.abilities(this.monster).indexOf(e):-1}getAbilityLabel(e){let i=e.name||"";return i?i="data.ability."+i:this.monster&&this.monster.deck&&this.monster.deck!=this.monster.name?(i="data.deck."+this.monster.deck,i.split(".")[i.split(".").length-1]===ja(R.r.getLabel(i))&&this.monster.deck&&(i="data.monster."+this.monster.deck)):this.monster&&(i="data.monster."+this.monster.name),ja(R.r.getLabel(i))}onChange(e){this.ability&&(this.ability.revealed=e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-ability"]],inputs:{ability:"ability",abilities:"abilities",monster:"monster",character:"character",flipped:"flipped",reveal:"reveal",relative:"relative",highlightElements:"highlightElements",statsCalculation:"statsCalculation"},features:[t.TTD],decls:12,vars:25,consts:[[1,"card-container","ability",3,"ngClass"],["card-reveal","",1,"card",3,"ngClass","disabled","change"],["card",""],[1,"card-back","ability-back",3,"ngClass"],[1,"touch"],[1,"revealed"],[3,"ghs-label"],["class","name",4,"ngIf"],["class","logo",4,"ngIf"],[1,"card-front","ability-front",3,"ngClass"],[4,"ngIf"],[1,"name"],[1,"logo"],[3,"src"],[1,"initiative"],[1,"ability-actions"],[3,"actions","monster","hint","statsCalculation","relative","highlightElements"],["class","shuffle",4,"ngIf"],["class","bottom-shuffle",4,"ngIf"],["class","index",4,"ngIf"],["class","lost",4,"ngIf"],["class","lost bottom",4,"ngIf"],[1,"level"],[1,"text"],[1,"ability-actions","ability-bottom-actions"],[1,"shuffle"],["src","./assets/images/shuffle.svg"],[1,"bottom-shuffle"],[1,"index"],[1,"lost"],["src","./assets/images/action/card/lost.svg"],["src","./assets/images/action/card/overlay/lost.svg",1,"overlay"],[1,"lost","bottom"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1,2),t.NdJ("change",function(l){return i.onChange(l)}),t.TgZ(3,"div",3),t._UZ(4,"div",4),t.TgZ(5,"span",5),t._UZ(6,"span",6),t.qZA(),t.YNc(7,y8,2,1,"span",7),t.YNc(8,b8,2,1,"span",7),t.YNc(9,x8,2,1,"span",8),t.qZA(),t.TgZ(10,"div",9),t.YNc(11,U8,16,17,"ng-container",10),t.qZA()()()),2&e){const s=t.MAs(2);t.Udp("--ghs-ability-color",i.character&&i.character.color),t.Q6J("ngClass",t.WLB(14,L8,i.settingsManager.settings.fhStyle,i.flipped||i.ability&&i.ability.revealed)),t.xp6(1),t.Udp("font-size",.04*s.offsetWidth+"px"),t.Q6J("ngClass",t.VKq(17,Q8,i.flipped||i.ability&&i.ability.revealed))("disabled",!i.reveal||!i.ability),t.xp6(2),t.Q6J("ngClass",t.WLB(19,wT,i.ability&&i.ability.bottomActions&&i.ability.bottomActions.length>0&&!i.character,i.character)),t.xp6(3),t.Q6J("ghs-label","game.cards.confirmReveal"),t.xp6(1),t.Q6J("ngIf",i.monster),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngClass",t.WLB(22,wT,i.ability&&i.ability.bottomActions&&i.ability.bottomActions.length>0&&!i.character,i.character)),t.xp6(1),t.Q6J("ngIf",i.ability)}},dependencies:[x.mk,x.O5,ag,Yf,ie],styles:['.ability[_ngcontent-%COMP%]{width:100%;height:100%;color:var(--ghs-color-white);--ghs-ability-color: var(--ghs-color-red)}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]{min-height:16em;display:flex;flex-direction:column;justify-content:center;text-align:center;border-radius:3.5%}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]{position:relative;z-index:1}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:before{content:" ";position:absolute;width:100%;height:100%;background-image:url(monster-ability-front.6630d6e4791f6c50.png);background-position:0em -.9em;background-size:100% auto;background-repeat:no-repeat;z-index:0}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:after{content:" ";position:absolute;width:100%;height:100%;background-image:url(monster-ability-front-repeat.90ec2bf17a27d884.png);background-position:0em -2.9em;background-size:100% auto;background-repeat:repeat-y;z-index:-1}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%]{position:relative;margin-top:2em;padding-bottom:.4em;width:100%;min-height:7.4em;font-size:1.7em;z-index:1;display:flex;align-items:center;overflow:auto}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%] ghs-actions[_ngcontent-%COMP%]{font-size:calc(1em * var(--ghs-fontsize));position:relative;width:100%;height:100%}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block;position:absolute;top:.2em;left:0;width:100%;font-family:var(--ghs-font-title);font-size:1.7em;filter:var(--ghs-filter-shadow);text-align:center}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{position:absolute;font-family:var(--ghs-font-title);font-size:2.4em;filter:var(--ghs-filter-shadow);top:1em;left:.5em;text-align:center;width:1em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]{position:absolute;bottom:1em;right:.5em;z-index:0;filter:var(--ghs-filter-white) var(--ghs-filter-shadow);width:2em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{position:absolute;font-size:1em;filter:var(--ghs-filter-shadow-thin);bottom:.5em;left:.5em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%]{position:absolute;bottom:16.5em;right:3.3em;height:2em}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;top:0;left:0;height:100%;width:auto}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1){filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2){position:absolute}.ability[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .lost.bottom[_ngcontent-%COMP%]{right:4.6em;bottom:3em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%]{background-position:top;background-attachment:local;height:100%;overflow-x:unset;overflow-y:auto}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.bottom-actions[_ngcontent-%COMP%]:before, .ability[_ngcontent-%COMP%] .ability-front.character-actions.bottom-actions[_ngcontent-%COMP%]:before{background-position:top;background-image:url(monster-ability-front-bottom.43963667f697d866.png)}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.character-actions[_ngcontent-%COMP%]:before, .ability[_ngcontent-%COMP%] .ability-front.character-actions.character-actions[_ngcontent-%COMP%]:before{background-position:top;background-color:var(--ghs-ability-color);background-image:url(character-ability-front.78d3032ed2ab477f.png),url(character-ability-front-blend.7ab7f92ad3df07cf.png);background-blend-mode:screen,luminosity}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{position:absolute;bottom:1.2em;left:50%;width:1.8em;height:auto;transform:translate(-50%);z-index:1}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;filter:drop-shadow(.5em .5em .5em var(--ghs-color-black))}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:.8em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{top:7em;left:5.2em;transform:translate(-50%)}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{position:absolute;top:3.1em;left:9.4em;width:2.1em;height:1.6em;font-size:1.2em;font-family:var(--ghs-font-title);display:flex;justify-content:center;align-items:center;background-color:var(--ghs-ability-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-size:115% 170%;-webkit-mask-size:115% 170%;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:60% 66%;-webkit-mask-position:60% 66%}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{background:inherit;-webkit-background-clip:text;background-clip:text;color:transparent;filter:invert(1) grayscale(1) contrast(100)}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%]{top:15.5em;right:3.5em;bottom:initial}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]{bottom:2.3em;right:4.8em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .index[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{left:14.7em;bottom:2.2em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .ability-actions[_ngcontent-%COMP%]{left:1.6em;width:11.5em;min-height:6.4em;max-height:6.4em;margin-top:1.8em}.ability[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%] .ability-actions.ability-bottom-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-front.character-actions[_ngcontent-%COMP%] .ability-actions.ability-bottom-actions[_ngcontent-%COMP%]{top:1.5em;margin-top:0;margin-bottom:2.2em;padding-top:.2em;padding-bottom:0}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%]{background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(monster-ability-back.1b996f6c655437aa.png);z-index:1}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%] .touch[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1;overflow:auto}.ability[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{position:absolute;top:50%;left:0;width:100%;font-family:var(--ghs-font-title);font-size:1.4em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));text-align:center;transform:translateY(2.9em)}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:50%;height:auto;transform:translate(-50%,-50%);z-index:1}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;filter:drop-shadow(.5em .5em .5em var(--ghs-color-black))}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.bottom-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.bottom-actions[_ngcontent-%COMP%]{background-image:url(monster-ability-back-botton.5146fd83ee4567f9.png)}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:57.5%}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.character-actions[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.character-actions[_ngcontent-%COMP%]{background-color:var(--ghs-ability-color);background-image:url(character-ability-back.2421cfa27a5519f7.png),url(character-ability-back-blend.deb865dbb87b8a00.png);background-blend-mode:screen,luminosity}.ability[_ngcontent-%COMP%] .ability-back.bottom-actions.character-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .ability[_ngcontent-%COMP%] .ability-back.character-actions.character-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:3%;bottom:initial;font-size:2em}.ability[_ngcontent-%COMP%] .confirm[_ngcontent-%COMP%] .revealed[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:var(--ghs-color-white);font-size:2.3em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));z-index:2}.ability.fh[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:before{background-image:url(monster-ability-front.bae377edfe8630cc.png)}.ability.fh[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%]:after{background-image:url(monster-ability-front-repeat.21d351b34ecd76d1.png)}.ability.fh[_ngcontent-%COMP%] .ability-front.bottom-actions[_ngcontent-%COMP%]:before{background-image:url(monster-ability-front-bottom.43963667f697d866.png)}.ability.fh[_ngcontent-%COMP%] .ability-front[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{bottom:.5em;left:.5em}.ability.fh[_ngcontent-%COMP%] .ability-back[_ngcontent-%COMP%]{background-image:url(monster-ability-back.7df0db1b0ed7e94a.png)}.ability.fh[_ngcontent-%COMP%] .ability-back.bottom-actions[_ngcontent-%COMP%]{background-image:url(monster-ability-back-botton.5146fd83ee4567f9.png)}']})),a})();const R8=function(o,a){return{closed:o,opened:a}},F8=function(o){return{"bottom-actions":o}};let kT=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"ability",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"relative",void 0),(0,_.Z)(this,"opened",!1),(0,_.Z)(this,"gameManager",d.v),this.dialogRef=i,this.ability=e.ability,this.monster=e.monster,this.relative=e.relative}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},1e3)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-ability-dialog"]],decls:4,vars:11,consts:[[1,"ability-dialog",3,"ngClass","click"],[1,"ability-container",3,"ngClass"],[3,"ability","monster","flipped","relative"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(){return i.close()}),t.TgZ(1,"div",1),t._UZ(2,"ghs-ability",2),t.qZA()(),t.TgZ(3,"div",3),t.NdJ("click",function(){return i.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.WLB(6,R8,!i.opened,i.opened)),t.xp6(1),t.Q6J("ngClass",t.VKq(9,F8,i.ability&&i.ability.bottomActions&&i.ability.bottomActions.length>0||!1)),t.xp6(1),t.Q6J("ability",i.ability)("monster",i.monster)("flipped",i.opened)("relative",i.relative))},dependencies:[x.mk,a_],styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.ability-dialog[_ngcontent-%COMP%]{position:relative;width:100vw;height:100vh;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0);z-index:2;overflow:auto;display:flex;justify-content:center;align-items:center;-ms-overflow-style:none;scrollbar-width:none}.ability-dialog[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.ability-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.ability-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.8s}.ability-dialog[_ngcontent-%COMP%] .ability-container[_ngcontent-%COMP%]{overflow:visible;width:100vw;max-width:600px;max-height:100vh}.ability-dialog[_ngcontent-%COMP%] .ability-container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{display:block;margin:1vh 0}.ability-dialog[_ngcontent-%COMP%] .ability-container.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:135vw;max-height:810px}.close-container[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1}"]})),a})();function q8(o,a){if(1&o&&t._UZ(0,"img",16),2&o){const n=t.oxw();t.Q6J("src",n.gameManager.monsterManager.monsterThumbnail(n.monster),t.LSH)}}function H8(o,a){1&o&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA())}function j8(o,a){1&o&&(t.TgZ(0,"span",19),t._uU(1,"*"),t.qZA())}const B8=function(o){return{"bottom-actions":o}};function z8(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",20),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.dialogRef.close())})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.openAbility(s))}),t._UZ(2,"ghs-ability",21),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(7,B8,e.gameManager.hasBottomAbility(n))),t.xp6(1),t.Q6J("ability",n)("monster",e.monster)("flipped",!0)("reveal",!0)("relative",!0)("statsCalculation",!1)}}const G8=function(o,a){return{fh:o,modern:a}};let V8=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),this.monster=e,this.dialogRef=i,this.dialog=s}openAbility(e){this.dialog.open(kT,{panelClass:"fullscreen-panel",data:{ability:e,monster:this.monster,relative:!0}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-stats-list"]],decls:16,vars:11,consts:[[1,"stats-dialog"],[1,"scroll-container"],[1,"header",3,"ngClass"],[1,"image"],[1,"outer-border"],[1,"inner-border"],[1,"image-container"],[3,"src",4,"ngIf"],["class","boss",4,"ngIf"],["class","custom",4,"ngIf"],[1,"name"],[3,"ghs-label"],[1,"container"],[1,"stats"],[3,"monster","forceStats"],[4,"ngFor","ngForOf"],[3,"src"],[1,"boss"],["src","./assets/images/monster/enemy.png"],[1,"custom"],["ghs-pointer-input","",1,"ability",3,"ngClass","singleClick","doubleClick"],[3,"ability","monster","flipped","reveal","relative","statsCalculation"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),t.YNc(7,q8,1,1,"img",7),t.qZA()()(),t.YNc(8,H8,2,0,"span",8),t.YNc(9,j8,2,0,"span",9),t.qZA(),t.TgZ(10,"div",10),t._UZ(11,"span",11),t.qZA()(),t.TgZ(12,"div",12)(13,"div",13),t._UZ(14,"ghs-monster-stats",14),t.qZA(),t.YNc(15,z8,3,9,"ng-container",15),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngClass",t.WLB(8,G8,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(5),t.Q6J("ngIf",!i.monster.noThumbnail&&!i.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ngIf",i.monster.boss||-1!=i.monster.tags.indexOf("boss")),t.xp6(1),t.Q6J("ngIf",i.monster.standeeShare),t.xp6(2),t.Q6J("ghs-label","data.monster."+i.monster.name),t.xp6(3),t.Q6J("monster",i.monster)("forceStats",!0),t.xp6(1),t.Q6J("ngForOf",i.gameManager.abilities(i.monster)))},dependencies:[x.mk,x.sg,x.O5,T,a_,ie,An],styles:[".stats-dialog[_ngcontent-%COMP%]{position:relative}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{position:sticky;top:0;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;z-index:999;background-image:url(dialog_background.fa4ff388462f6a00.png)}.stats-dialog[_ngcontent-%COMP%] .header.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.stats-dialog[_ngcontent-%COMP%] .header.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 11 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 11 * var(--ghs-dialog-factor));background-color:var(--ghs-color-white);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 10.3 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 10.3 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));height:auto}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));background-color:var(--ghs-color-darkred);border:2px solid var(--ghs-color-gray);border-radius:100%}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor));height:auto}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%]{display:flex;justify-content:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));font-family:ghs-title;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border:2px solid var(--ghs-color-gray);border-radius:100%}.stats-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:calc(var(--ghs-unit) * 42 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:top left}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%]{cursor:pointer!important;position:relative;width:calc(var(--ghs-unit) * 33.55 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));flex-shrink:0;flex-grow:0}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 49.95 * var(--ghs-dialog-factor))}.stats-dialog[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{pointer-events:none;width:100%;height:100%}"]})),a})();function Y8(o,a){if(1&o&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("#",n.scenario.index,"")}}function K8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openTreasures(i))}),t._UZ(1,"img",25),t.qZA()}}function $8(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",28)(1,"input",35),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.spoiler=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.updateMonster())}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngModel",n.spoiler),t.xp6(1),t.Q6J("ghs-label","scenario.setup.spoiler")}}function W8(o,a){if(1&o&&(t.TgZ(0,"div",39),t._UZ(1,"img",40),t.TgZ(2,"span",41),t._uU(3,"x"),t.qZA(),t._uU(4),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n.type+".svg",t.LSH),t.xp6(3),t.hij("",n.value," ")}}function X8(o,a){if(1&o&&(t.TgZ(0,"div",36),t._UZ(1,"div",37),t.YNc(2,W8,5,2,"div",38),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.loot"),t.xp6(1),t.Q6J("ngForOf",n.lootConfig)}}function tH(o,a){if(1&o&&t._UZ(0,"img",51),2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.Q6J("src",e.gameManager.monsterManager.monsterThumbnail(n),t.LSH)}}function eH(o,a){1&o&&(t.TgZ(0,"span",52),t._UZ(1,"img",53),t.qZA())}function nH(o,a){1&o&&(t.TgZ(0,"span",54),t._uU(1,"*"),t.qZA())}function iH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.openStats(s))}),t.TgZ(1,"div",44)(2,"div",45)(3,"div",46)(4,"div",47),t.YNc(5,tH,1,1,"img",48),t.qZA()()(),t.YNc(6,eH,2,0,"span",49),t.YNc(7,nH,2,0,"span",50),t.qZA(),t.TgZ(8,"div",4),t._UZ(9,"span",5),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(5),t.Q6J("ngIf",!n.noThumbnail||e.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ngIf",n.boss||-1!=n.tags.indexOf("boss")),t.xp6(1),t.Q6J("ngIf",n.standeeShare),t.xp6(2),t.Q6J("ghs-label","data.monster."+n.name)}}function oH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,iH,10,4,"div",42),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.monsters)}}function aH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.openStats(s))}),t._UZ(1,"ghs-monster-stats",55),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("monster",e.toMonster(n))("forceStats",!0)("noClick",!0)("disablePoup",!0)}}function sH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,aH,2,4,"div",42),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.monsters)}}const rH=function(o){return{detailed:o}};function cH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",26)(1,"span",2)(2,"span"),t._UZ(3,"span",5),t.qZA()(),t.TgZ(4,"div",27)(5,"label",28)(6,"input",29),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.detailed=i)}),t.qZA(),t._UZ(7,"span",5),t.qZA(),t.YNc(8,$8,3,2,"label",30),t.qZA(),t.TgZ(9,"div",31),t.YNc(10,X8,3,2,"div",32),t.TgZ(11,"div",33),t.YNc(12,oH,2,1,"ng-container",34),t.YNc(13,sH,2,1,"ng-container",34),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ghs-label","scenario.setup"),t.xp6(3),t.Q6J("ngModel",n.detailed),t.xp6(1),t.Q6J("ghs-label","scenario.setup.detailed"),t.xp6(1),t.Q6J("ngIf",n.hasSpoiler||n.spoiler),t.xp6(1),t.Q6J("ngClass",t.VKq(8,rH,n.detailed)),t.xp6(1),t.Q6J("ngIf",n.lootConfig.length>0),t.xp6(2),t.Q6J("ngIf",!n.detailed),t.xp6(1),t.Q6J("ngIf",n.detailed)}}function lH(o,a){if(1&o&&t._UZ(0,"span",59),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function gH(o,a){if(1&o&&(t.TgZ(0,"span",56),t._UZ(1,"img",57),t._uU(2),t.YNc(3,lH,1,1,"span",58),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.hij(" ",n.ref," "),t.xp6(1),t.Q6J("ngIf",n.marker)}}function dH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," \xa0"),t._UZ(2,"span",5),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function hH(o,a){if(1&o&&t._UZ(0,"span",59),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function uH(o,a){if(1&o&&(t.TgZ(0,"span",60),t._uU(1),t.YNc(2,dH,3,1,"span",34),t.YNc(3,hH,1,1,"span",58),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.hij(" #",n.index," "),t.xp6(1),t.Q6J("ngIf",!e.scenario||n.name!=e.scenario.name),t.xp6(1),t.Q6J("ngIf",n.marker)}}const _H=function(o,a){return[o,a]};function pH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",61),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.openRoom(s))}),t._UZ(1,"img",62)(2,"span",63),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ghs-label",n.marker?"scenario.openRoomMarker":"scenario.openRoom")("ghs-label-args",t.WLB(2,_H,n.ref,n.marker||""))}}function fH(o,a){1&o&&t._UZ(0,"img",68)}function mH(o,a){1&o&&t._UZ(0,"img",69)}function vH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("#",n.index,"")}}function CH(o,a){if(1&o&&t._UZ(0,"span",59),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function MH(o,a){if(1&o&&(t.TgZ(0,"span",4),t._uU(1," \xa0"),t._UZ(2,"span",5),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function OH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",64),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addSection(s))}),t.YNc(1,fH,1,0,"img",65),t.YNc(2,mH,1,0,"img",66),t.YNc(3,vH,2,1,"span",34),t.YNc(4,CH,1,1,"span",58),t.YNc(5,MH,3,1,"span",67),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.conclusion),t.xp6(1),t.Q6J("ngIf",n.conclusion),t.xp6(1),t.Q6J("ngIf",!n.conclusion||!n.name),t.xp6(1),t.Q6J("ngIf",n.marker),t.xp6(1),t.Q6J("ngIf",n.conclusion&&n.name)}}function PH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",70)(1,"input",35),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setup=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.updateMonster())}),t.qZA(),t._UZ(2,"span",5),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.setup),t.xp6(1),t.Q6J("ghs-label","scenario.setup")}}function yH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",71)(1,"a",21),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEventEffects(i))}),t._UZ(2,"img",72)(3,"span",5),t.qZA()()}2&o&&(t.xp6(3),t.Q6J("ghs-label","scenario.eventEffects"))}const bH=function(o){return{denied:o}};let xH=(()=>{var o;class a{constructor(e,i,s){if((0,_.Z)(this,"scenario",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"monsters",[]),(0,_.Z)(this,"lootConfig",[]),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"hasSpoiler",!1),(0,_.Z)(this,"spoiler",!1),(0,_.Z)(this,"detailed",!1),this.scenario=e,this.dialogRef=i,this.dialog=s,this.updateMonster(),e.lootDeckConfig)for(let l in le.CG)e.lootDeckConfig[l]&&this.lootConfig.push({type:l,value:e.lootDeckConfig[l]||0})}updateMonster(){this.monsters=[],this.hasSpoiler=!1,d.v.scenarioManager.getMonsters(this.scenario).forEach(e=>{if(this.spoiler||!e.standeeShare||d.v.scenarioManager.openRooms().find(i=>i.initial&&i.monster.find(s=>s.name.split(":")[0]==e.name))||d.v.game.figures.some(i=>i instanceof Ze.Q&&i.name==e.name&&i.edition==e.edition))-1==this.monsters.indexOf(e)&&(e.tags=[],this.monsters.push(e));else{const i=d.v.monstersData().find(s=>s.name==e.standeeShare&&s.edition==(e.standeeShareEdition||e.edition));if(i){const s=JSON.parse(JSON.stringify(i));s.tags=s.tags||[],d.v.editionRules("cs")&&e.boss&&s.tags.push("boss");const l=this.monsters.find(m=>m.name==s.name&&m.edition==s.edition);l?!this.spoiler&&d.v.editionRules("cs")&&(l.tags=l.tags||[],e.boss&&(this.hasSpoiler=!0,l.tags.push("boss"))):(this.hasSpoiler=!0,this.monsters.push(s))}}}),this.monsters=this.monsters.filter((e,i,s)=>!s.find(l=>e.standeeShare==l.edition&&e.standeeShareEdition==l.name)).sort((e,i)=>R.r.getLabel("data.monster."+e.name).toLowerCase()s.edition==this.scenario.edition&&s.parent==this.scenario.index&&s.group==this.scenario.group&&s.conclusion);i.length<2||!e?this.dialog.open(uo,{panelClass:"dialog",data:{scenario:this.scenario,conclusion:1==i.length?i[0]:void 0,success:e}}):this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:this.scenario}}).closed.subscribe({next:s=>{s&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:this.scenario,conclusion:s,success:e}})}})}resetScenario(){this.dialogRef.close(),d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.scenarioManager.setScenario(this.scenario),d.v.stateManager.after()}cancelScenario(){this.dialogRef.close(),d.v.stateManager.before("cancelScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.scenarioManager.setScenario(void 0),d.v.stateManager.after(1e3)}openTreasures(e){this.dialog.open(Aw,{panelClass:"dialog"})}openEventEffects(e){this.dialog.open(Lw,{panelClass:"dialog"}),this.dialogRef.close()}openRoom(e){d.v.editionData.find(s=>s.edition==this.scenario.edition)?(d.v.stateManager.before(e.marker?"openRoomMarker":"openRoom",this.scenario.index,"data.scenario."+this.scenario.name,""+e.ref,e.marker||""),d.v.scenarioManager.openRoom(e,this.scenario,!1),d.v.stateManager.after(),this.updateMonster()):console.error("Could not find edition data!")}addSection(e){this.dialog.open(xT,{panelClass:"dialog",data:e}).closed.subscribe({next:i=>{i&&this.dialogRef.close()}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario-dialog"]],decls:30,vars:18,consts:[[1,"scenario-popup",3,"ngClass"],[1,"scroll-container"],[1,"title"],["class","index",4,"ngIf"],[1,"name"],[3,"ghs-label"],["class","treasures",3,"click",4,"ngIf"],["class","setup",4,"ngIf"],[1,"sections"],["class","section room",4,"ngFor","ngForOf"],["class","section",4,"ngFor","ngForOf"],[1,"open-sections"],["class","section room available",3,"click",4,"ngFor","ngForOf"],["class","section available",3,"click",4,"ngFor","ngForOf"],["class","setup-checkbox",4,"ngIf"],[1,"menu"],[1,"buttons"],[1,"failure",3,"click"],[1,"spacer"],[1,"success",3,"click"],[1,"cancel"],[3,"click"],["class","event-effects",4,"ngIf"],[1,"index"],[1,"treasures",3,"click"],["src","./assets/images/scenario/treasure.svg",1,"ghs-svg"],[1,"setup"],[1,"setup-container"],[1,"checkbox"],["type","checkbox",3,"ngModel","ngModelChange"],["class","checkbox",4,"ngIf"],[1,"setup-container",3,"ngClass"],["class","loot-config",4,"ngIf"],[1,"monsters"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"loot-config"],[1,"title",3,"ghs-label"],["class","loot",4,"ngFor","ngForOf"],[1,"loot"],[1,"ghs-svg",3,"src"],[1,"sign"],["class","monster",3,"click",4,"ngFor","ngForOf"],[1,"monster",3,"click"],[1,"image"],[1,"outer-border"],[1,"inner-border"],[1,"image-container"],[3,"src",4,"ngIf"],["class","boss",4,"ngIf"],["class","custom",4,"ngIf"],[3,"src"],[1,"boss"],["src","./assets/images/monster/enemy.png"],[1,"custom"],[3,"monster","forceStats","noClick","disablePoup"],[1,"section","room"],["src","./assets/images/scenario/door-open.svg",1,"ghs-svg"],["class","marker",3,"ghs-label",4,"ngIf"],[1,"marker",3,"ghs-label"],[1,"section"],[1,"section","room","available",3,"click"],["src","./assets/images/scenario/door.svg",1,"ghs-svg"],[3,"ghs-label","ghs-label-args"],[1,"section","available",3,"click"],["class","ghs-svg","src","./assets/images/scenario/lock.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/scenario/conclusion.svg",4,"ngIf"],["class","name",4,"ngIf"],["src","./assets/images/scenario/lock.svg",1,"ghs-svg"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"],[1,"setup-checkbox"],[1,"event-effects"],["src","./assets/images/event.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,Y8,2,1,"span",3),t.TgZ(4,"span",4),t._UZ(5,"span",5),t.qZA(),t.YNc(6,K8,2,0,"span",6),t.qZA(),t.YNc(7,cH,14,10,"div",7),t.TgZ(8,"div",8),t.YNc(9,gH,4,2,"span",9),t.YNc(10,uH,4,3,"span",10),t.qZA(),t.TgZ(11,"div",11),t.YNc(12,pH,3,5,"span",12),t.YNc(13,OH,6,5,"span",13),t.qZA(),t.YNc(14,PH,3,2,"label",14),t.TgZ(15,"div",15)(16,"label"),t._UZ(17,"span",5),t.qZA(),t.TgZ(18,"div",16)(19,"a",17),t.NdJ("click",function(){return i.finishScenario(!1)}),t._UZ(20,"span",5),t.qZA(),t._UZ(21,"span",18),t.TgZ(22,"a",19),t.NdJ("click",function(){return i.finishScenario(!0)}),t._UZ(23,"span",5),t.qZA()(),t.TgZ(24,"div",20)(25,"a",21),t.NdJ("click",function(){return i.cancelScenario()}),t._UZ(26,"span",5),t.qZA(),t.TgZ(27,"a",21),t.NdJ("click",function(){return i.resetScenario()}),t._UZ(28,"span",5),t.qZA()()(),t.YNc(29,yH,4,1,"div",22),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(16,bH,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.scenario)),t.xp6(3),t.Q6J("ngIf",i.scenario.index),t.xp6(2),t.Q6J("ghs-label",i.scenario.name?"data.scenario."+i.scenario.name:i.scenario.custom?"scenario.custom":"scenario"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.scenarioRooms&&i.settingsManager.settings.treasures&&i.gameManager.scenarioManager.getTreasures(i.scenario,i.gameManager.game.sections).length>0),t.xp6(1),t.Q6J("ngIf",i.setup||i.gameManager.game.round<1),t.xp6(2),t.Q6J("ngForOf",i.gameManager.scenarioManager.openRooms()),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.sections),t.xp6(2),t.Q6J("ngForOf",i.gameManager.scenarioManager.closedRooms()),t.xp6(1),t.Q6J("ngForOf",i.gameManager.scenarioManager.availableSections()),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.round>0),t.xp6(3),t.Q6J("ghs-label","scenario.finish"),t.xp6(3),t.Q6J("ghs-label","scenario.finish.failure"),t.xp6(3),t.Q6J("ghs-label","scenario.finish.success"),t.xp6(3),t.Q6J("ghs-label","scenario.cancel"),t.xp6(2),t.Q6J("ghs-label","scenario.reset"),t.xp6(1),t.Q6J("ngIf",i.setup||i.gameManager.game.round<1))},dependencies:[x.mk,x.sg,x.O5,va,yi,Si,T,ie],styles:[".scenario-popup[_ngcontent-%COMP%]{position:relative;text-align:center;color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;height:1em;width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-barsize))}.scenario-popup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow);height:.8em;width:auto}.scenario-popup[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{cursor:pointer;display:flex;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:var(--ghs-color-gray);margin-right:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));border-top-left-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));border-top-right-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));border-bottom-left-radius:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));border-bottom-right-radius:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));padding-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;color:var(--ghs-color-white);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);padding:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));border-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) solid var(--ghs-color-black);border-top-left-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));border-top-right-radius:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-black);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] .sign[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .loot-config[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.3em;width:auto;filter:var(--ghs-filter-black);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start;flex-wrap:wrap;height:100%}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 13 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]:hover{opacity:.7}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 11 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 11 * var(--ghs-dialog-factor));background-color:var(--ghs-color-white);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 10.3 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 10.3 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9 * .866025 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));background-color:var(--ghs-color-red);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .outer-border[_ngcontent-%COMP%] .inner-border[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor));height:auto}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));background-color:var(--ghs-color-darkred);border:2px solid var(--ghs-color-gray);border-radius:100%}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .boss[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor));height:auto}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%]{display:flex;justify-content:center;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));position:absolute;bottom:calc(var(--ghs-unit) * -.5 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor));font-family:ghs-title;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border:2px solid var(--ghs-color-gray);border-radius:100%}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:center;color:var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .setup-container[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));display:flex;align-items:center}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .setup-container.detailed[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor))}.scenario-popup[_ngcontent-%COMP%] .setup[_ngcontent-%COMP%] .setup-container.detailed[_ngcontent-%COMP%] .monsters[_ngcontent-%COMP%] .monster[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 21.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.scenario-popup[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.scenario-popup[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));display:flex;justify-content:center;flex-wrap:wrap}.scenario-popup[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-left:calc(var(--ghs-unit) * .1 * var(--ghs-barsize)) solid var(--ghs-color-white)}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover{cursor:pointer;color:var(--ghs-color-white);text-shadow:var(--ghs-outline-thin)}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.scenario-popup[_ngcontent-%COMP%] .open-sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:hover .marker[_ngcontent-%COMP%]{filter:grayscale(.3)}.scenario-popup[_ngcontent-%COMP%] .setup-checkbox[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .setup-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * -.25 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .2 * var(--ghs-barsize)) solid var(--ghs-color-white);margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .failure[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:not(:first-child){margin-left:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.scenario-popup[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-barsize));padding-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-barsize));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-barsize)) solid var(--ghs-color-white)}.scenario-popup[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.scenario-popup[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}"]})),a})();function wH(o,a){if(1&o&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("#",n.gameManager.game.scenario.index,"")}}function kH(o,a){if(1&o&&(t.TgZ(0,"span",13),t._UZ(1,"span",14),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label",n.gameManager.game.scenario.name?"data.scenario."+n.gameManager.game.scenario.name:n.gameManager.game.scenario.custom?"scenario.custom":"scenario.set")}}const TH=function(o){return{unlooted:o}};function ZH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",15),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openTreasures(i))}),t._UZ(1,"img",16),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(1,TH,n.gameManager.scenarioManager.getTreasures(n.gameManager.game.scenario,n.gameManager.game.sections,!0).length>0))}}function AH(o,a){if(1&o&&(t.TgZ(0,"div",8),t.YNc(1,wH,2,1,"span",9),t.YNc(2,kH,2,1,"span",10),t.YNc(3,ZH,2,3,"span",11),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario.index),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.scenarioRooms&&n.settingsManager.settings.treasures&&n.gameManager.scenarioManager.getTreasures(n.gameManager.game.scenario,n.gameManager.game.sections).length>0)}}function SH(o,a){1&o&&(t.TgZ(0,"div",17),t._UZ(1,"img",18)(2,"span",14),t.qZA()),2&o&&(t.xp6(2),t.Q6J("ghs-label","scenario.eventEffects"))}function EH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function DH(o,a){if(1&o&&(t.TgZ(0,"span",20),t._UZ(1,"img",21),t._uU(2),t.YNc(3,EH,1,1,"span",22),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.hij(" ",n.ref," "),t.xp6(1),t.Q6J("ngIf",n.marker)}}function IH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,DH,4,2,"span",19),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.gameManager.scenarioManager.openRooms())}}function NH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("#",n.index,"")}}function JH(o,a){if(1&o&&(t.TgZ(0,"span",13),t._uU(1," \xa0"),t._UZ(2,"span",14),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function UH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function LH(o,a){if(1&o&&(t.TgZ(0,"span",24),t._UZ(1,"img",25),t.YNc(2,NH,2,1,"span",5),t.YNc(3,JH,3,1,"span",10),t.YNc(4,UH,1,1,"span",22),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Q6J("ngIf",!n.hideIndex),t.xp6(1),t.Q6J("ngIf",!e.gameManager.game.scenario||n.name!=e.gameManager.game.scenario.name),t.xp6(1),t.Q6J("ngIf",n.marker)}}function QH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}const RH=function(o,a){return[o,a]};function FH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",27),t.NdJ("click",function(i){const l=t.CHM(n).$implicit,m=t.oxw(2);return t.KtG(m.openRoom(l,i))}),t._UZ(1,"img",28),t.TgZ(2,"span",29),t._uU(3),t.qZA(),t.YNc(4,QH,1,1,"span",22),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-tooltip",(n.marker?"scenario.openRoomMarker":"scenario.openRoom")+(n.ref?"Ref":""))("ghs-label-args",t.WLB(8,RH,n.ref||"",n.marker||""))("originX","center")("overlayY","center")("originY","top")("overlayY","bottom"),t.xp6(3),t.Oqu(n.ref),t.xp6(1),t.Q6J("ngIf",n.marker)}}function qH(o,a){if(1&o&&(t.ynx(0),t.YNc(1,FH,5,11,"span",26),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.gameManager.scenarioManager.closedRooms())}}function HH(o,a){1&o&&t._UZ(0,"img",33)}function jH(o,a){1&o&&t._UZ(0,"img",34)}function BH(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("#",n.index,"")}}function zH(o,a){if(1&o&&t._UZ(0,"span",23),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function GH(o,a){if(1&o&&(t.TgZ(0,"span",13),t._uU(1," \xa0"),t._UZ(2,"span",14),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.section."+n.name)}}function VH(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",30),t.NdJ("click",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.addSection(l,i))}),t.YNc(1,HH,1,0,"img",31),t.YNc(2,jH,1,0,"img",32),t.YNc(3,BH,2,1,"span",5),t.YNc(4,zH,1,1,"span",22),t.YNc(5,GH,3,1,"span",10),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",!n.conclusion),t.xp6(1),t.Q6J("ngIf",n.conclusion),t.xp6(1),t.Q6J("ngIf",!(n.conclusion&&n.name||n.hideIndex)),t.xp6(1),t.Q6J("ngIf",n.marker),t.xp6(1),t.Q6J("ngIf",(n.conclusion||n.named)&&n.name)}}const YH=function(o){return{setup:o}},KH=function(o){return{denied:o}};let $H=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{if(d.v.game.scenario&&d.v.game.finish&&!d.v.stateManager.scenarioSummary){const e=d.v.game.finish.conclusion?d.v.sectionData(d.v.game.finish.conclusion.edition).find(i=>d.v.game.finish&&d.v.game.finish.conclusion&&i.index==d.v.game.finish.conclusion.index&&i.group==d.v.game.finish.conclusion.group&&i.conclusion):void 0;this.dialog.open(uo,{panelClass:"dialog",disableClose:!0,data:{scenario:d.v.game.scenario,conclusion:e,success:d.v.game.finish.success}})}}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}open(e){d.v.game.scenario?this.dialog.open(xH,{data:d.v.game.scenario,panelClass:"dialog"}):this.dialog.open(Lw,{panelClass:"dialog"})}openTreasures(e){e.preventDefault(),e.stopPropagation(),d.v.game.scenario&&this.dialog.open(Aw,{panelClass:"dialog"})}availableSections(){return d.v.scenarioManager.availableSections().sort((e,i)=>e.marker&&i.marker&&!e.marker.startsWith("element")&&!i.marker.startsWith("element")?e.markerd.v.game.scenario&&m.edition==d.v.game.scenario.edition))return void console.error("Could not find edition data!");d.v.stateManager.before(e.marker?"openRoomMarker":"openRoom",s.index,"data.scenario."+s.name,""+e.ref,e.marker||""),d.v.scenarioManager.openRoom(e,s,!1),d.v.stateManager.after()}}addSection(e,i){i.preventDefault(),i.stopPropagation(),d.v.roundManager.firstRound?this.open(i):this.dialog.open(xT,{panelClass:"dialog",data:e})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-scenario"]],decls:9,vars:12,consts:[[1,"scenario-container",3,"ngClass"],[1,"button",3,"click"],["class","scenario",4,"ngIf"],["class","event-effects",4,"ngIf"],[1,"sections","rooms",3,"ngClass","click"],[4,"ngIf"],["class","section",4,"ngFor","ngForOf"],["class","section available",3,"click",4,"ngFor","ngForOf"],[1,"scenario"],["class","index",4,"ngIf"],["class","name",4,"ngIf"],["class","treasures",3,"ngClass","click",4,"ngIf"],[1,"index"],[1,"name"],[3,"ghs-label"],[1,"treasures",3,"ngClass","click"],["src","./assets/images/scenario/treasure.svg",1,"ghs-svg"],[1,"event-effects"],["src","./assets/images/event.svg",1,"ghs-svg"],["class","section room",4,"ngFor","ngForOf"],[1,"section","room"],["src","./assets/images/scenario/door-open.svg",1,"ghs-svg"],["class","marker",3,"ghs-label",4,"ngIf"],[1,"marker",3,"ghs-label"],[1,"section"],["src","./assets/images/scenario/lock-open.svg",1,"ghs-svg"],["class","section room available",3,"ghs-tooltip","ghs-label-args","originX","overlayY","originY","click",4,"ngFor","ngForOf"],[1,"section","room","available",3,"ghs-tooltip","ghs-label-args","originX","overlayY","originY","click"],["src","./assets/images/scenario/door.svg",1,"ghs-svg"],[1,"ref"],[1,"section","available",3,"click"],["class","ghs-svg","src","./assets/images/scenario/lock.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/scenario/conclusion.svg",4,"ngIf"],["src","./assets/images/scenario/lock.svg",1,"ghs-svg"],["src","./assets/images/scenario/conclusion.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.NdJ("click",function(l){return i.open(l)}),t.YNc(2,AH,4,3,"div",2),t.YNc(3,SH,3,1,"div",3),t.qZA(),t.TgZ(4,"div",4),t.NdJ("click",function(l){return i.open(l)}),t.YNc(5,IH,2,1,"ng-container",5),t.YNc(6,LH,5,3,"span",6),t.YNc(7,qH,2,1,"ng-container",5),t.YNc(8,VH,6,5,"span",7),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(8,YH,i.gameManager.game.round<1)),t.xp6(2),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(1),t.Q6J("ngIf",!i.gameManager.game.scenario&&i.gameManager.characterManager.characterCount()>0),t.xp6(1),t.Q6J("ngClass",t.VKq(10,KH,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.scenario)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ngForOf",i.gameManager.game.sections),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.scenarioRooms),t.xp6(1),t.Q6J("ngForOf",i.availableSections()))},dependencies:[x.mk,x.sg,x.O5,ie,Ba],styles:[".scenario-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-barsize));margin-bottom:calc(var(--ghs-unit) * -1 * var(--ghs-barsize));color:var(--ghs-color-gray)}.scenario-container[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.8 * var(--ghs-barsize) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 2.3 * var(--ghs-barsize) * var(--ghs-text-factor));text-shadow:var(--ghs-outline-thin)}.scenario-container[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;height:1em;width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .treasures[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray);height:.8em;width:auto}.scenario-container[_ngcontent-%COMP%] .scenario[_ngcontent-%COMP%] .treasures.unlooted[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow)}.scenario-container[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.scenario-container[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .event-effects[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-barsize) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 2.2 * var(--ghs-barsize) * var(--ghs-text-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline-thin);max-height:calc(var(--ghs-unit) * 3 * var(--ghs-barsize) * var(--ghs-text-factor));overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-left:calc(var(--ghs-unit) * .1 * var(--ghs-barsize)) solid var(--ghs-color-gray)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(.available) .marker[_ngcontent-%COMP%]{filter:grayscale(.9);opacity:.8}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);text-shadow:var(--ghs-outline-thin)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section.available[_ngcontent-%COMP%]:hover .marker[_ngcontent-%COMP%]{filter:grayscale(.3)}@media (max-width: 791px){.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%]{max-height:calc(var(--ghs-unit) * 7 * var(--ghs-barsize))}.scenario-container[_ngcontent-%COMP%] .sections[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:none}}"]})),a})();const WH=["nextButton"],XH=["footer"],tj=["monsterDeck"];function ej(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.round())}}function nj(o,a){if(1&o&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij("\xa0(",n.totalRounds(),")")}}function ij(o,a){if(1&o&&(t.TgZ(0,"span",21),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.currentTime)}}function oj(o,a){1&o&&t._UZ(0,"ghs-scenario-rules")}const Hw=function(o,a,n,e){return{collapsed:o,initial:a,partial:n,full:e}},jw=function(o){return{inactive:o}};function aj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",22)(1,"ghs-attackmodifier-deck",23),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.beforeAllyAttackModifierDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.afterAllyAttackModifierDeck(i))}),t.qZA(),t.TgZ(2,"div",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleActiveAllyAttackModifierDeck())}),t.TgZ(3,"span",18),t._uU(4,"A"),t.qZA()()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.l5B(5,Hw,!n.gameManager.game.allyAttackModifierDeck.active||n.compact&&n.gameManager.game.lootDeck.active,n.gameManager.game.allyAttackModifierDeck.active&&n.gameManager.game.allyAttackModifierDeck.current<0,n.gameManager.game.allyAttackModifierDeck.active&&0==n.gameManager.game.allyAttackModifierDeck.current,n.gameManager.game.allyAttackModifierDeck.active&&n.gameManager.game.allyAttackModifierDeck.current>0)),t.xp6(1),t.Q6J("deck",n.gameManager.game.allyAttackModifierDeck)("ally",!0)("bottom",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(10,jw,!n.gameManager.game.allyAttackModifierDeck.active))}}function sj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",24)(1,"ghs-loot-deck",25),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.beforeLootDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.afterLootDeck(i))}),t.qZA(),t.TgZ(2,"div",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleLootDeck())}),t.TgZ(3,"span",18),t._UZ(4,"img",26),t.qZA()()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.l5B(4,Hw,!n.gameManager.game.lootDeck.active,n.gameManager.game.lootDeck.active&&n.gameManager.game.lootDeck.current<0,n.gameManager.game.lootDeck.active&&0==n.gameManager.game.lootDeck.current,n.gameManager.game.lootDeck.active&&n.gameManager.game.lootDeck.current>0)),t.xp6(1),t.Q6J("deck",n.gameManager.game.lootDeck)("bottom",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(9,jw,!n.gameManager.game.lootDeck.active))}}const rj=function(o){return{compact:o}},cj=function(o){return{denied:o}},lj=function(o){return{disabled:o}};let gj=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"nextButton",void 0),(0,_.Z)(this,"footer",void 0),(0,_.Z)(this,"monsterDeck",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"currentTime",""),(0,_.Z)(this,"hasAllyAttackModifierDeck",!1),(0,_.Z)(this,"lootDeck",!1),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"nextHint",!1),this.dialog=e,this.overlay=i}ngOnInit(){this.hasAllyAttackModifierDeck=R.r.settings.allyAttackModifierDeck&&(R.r.settings.alwaysAllyAttackModifierDeck||d.v.fhRules()&&d.v.game.figures.some(e=>e instanceof Ze.Q&&(e.isAlly||e.isAllied)||(e instanceof qe.CH||e instanceof Nn.k)&&e.objectiveId&&d.v.objectiveDataByScenarioObjectiveIdentifier(e.objectiveId)?.allyDeck)||d.v.game.scenario&&d.v.game.scenario.allyDeck)||!1,this.lootDeck=R.r.settings.lootDeck&&Object.keys(d.v.game.lootDeck.cards).length>0,d.v.uiChange.subscribe({next:()=>{this.hasAllyAttackModifierDeck=R.r.settings.allyAttackModifierDeck&&(R.r.settings.alwaysAllyAttackModifierDeck||d.v.fhRules()&&d.v.game.figures.some(e=>e instanceof Ze.Q&&(e.isAlly||e.isAllied)||(e instanceof qe.CH||e instanceof Nn.k)&&e.objectiveId&&d.v.objectiveDataByScenarioObjectiveIdentifier(e.objectiveId)?.allyDeck)||d.v.game.scenario&&d.v.game.scenario.allyDeck)||!1,this.lootDeck=R.r.settings.lootDeck&&Object.keys(d.v.game.lootDeck.cards).length>0}}),setInterval(()=>{d.v.game.playSeconds++;let e=d.v.game.playSeconds;this.currentTime="",e/3600>=1&&(this.currentTime+=Math.floor(e/3600)+"h ",e%=3600),e/60>=1&&(this.currentTime+=(this.currentTime&&this.currentTime&&Math.floor(e/60)<10?"0":"")+Math.floor(e/60)+"m ",e%=60),this.currentTime+=(this.currentTime&&e<10?"0":"")+Math.floor(e)+"s",(new Date).getTime()/1e3-d.v.stateManager.lastSaveTimestamp/1e3>30&&d.v.stateManager.saveLocal()},1e3),setTimeout(()=>{this.compact=this.monsterDeck.nativeElement.clientWidth>.3*this.footer.nativeElement.clientWidth},100),window.addEventListener("resize",e=>{this.compact=this.monsterDeck.nativeElement.clientWidth>.3*this.footer.nativeElement.clientWidth})}next(e=!1){!e&&this.disabled()?(this.nextHint=!0,this.dialog.open(Dq,{panelClass:"dialog",positionStrategy:this.overlay.position().flexibleConnectedTo(this.nextButton).withPositions([new ti.tR({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"})]).withDefaultOffsetX(10).withDefaultOffsetY(-10)}).closed.subscribe({next:s=>{this.nextHint=!1,s&&this.nextState()}})):this.nextState()}nextState(){var e=this;return(0,J.Z)(function*(){if(d.v.stateManager.before(d.v.game.state==ge.D2.next?"nextRound":"draw"),d.v.game.state==ge.D2.next)if(R.r.settings.disabledTurnConfirmation){let i=d.v.game.figures.find(s=>d.v.gameplayFigure(s)&&!s.off);for(;i;)d.v.roundManager.toggleFigure(i),i=d.v.game.figures.find(s=>d.v.gameplayFigure(s)&&!s.off)}else{const i=d.v.game.figures.find(s=>s.active&&!s.off);!e.activeHint()&&i&&d.v.roundManager.afterTurn(i)}d.v.roundManager.nextGameState(),d.v.stateManager.after(1e3)})()}beforeMonsterAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"monster",...e.values)}afterMonsterAttackModifierDeck(e){d.v.game.monsterAttackModifierDeck=e.deck,d.v.stateManager.after()}beforeAllyAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"ally",...e.values)}afterAllyAttackModifierDeck(e){d.v.game.allyAttackModifierDeck=e.deck,d.v.stateManager.after()}beforeLootDeck(e){d.v.stateManager.before(e.type,...e.values)}afterLootDeck(e){d.v.game.lootDeck=e.deck,d.v.stateManager.after()}confirmTurns(){d.v.game.figures.forEach(e=>d.v.roundManager.afterTurn(e)),this.next(!0)}finishScenario(e){if(d.v.game.scenario){const i=d.v.sectionData(d.v.game.scenario.edition).filter(s=>!!d.v.game.scenario&&s.edition==d.v.game.scenario.edition&&s.parent==d.v.game.scenario.index&&s.group==d.v.game.scenario.group&&s.conclusion);0!=i.length&&e?this.dialog.open(lg,{panelClass:["dialog"],data:{conclusions:i,parent:d.v.game.scenario}}).closed.subscribe({next:s=>{s&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,conclusion:s,success:e}})}}):this.dialog.open(uo,{panelClass:"dialog",data:{scenario:d.v.game.scenario,success:e}})}}resetScenario(){d.v.stateManager.before("resetScenario",...d.v.scenarioManager.scenarioUndoArgs()),d.v.roundManager.resetScenario(),d.v.stateManager.after(1e3)}empty(){return 0==d.v.game.figures.length}round(){const e=(d.v.game.round>0||d.v.game.roundResets.length>0||d.v.game.roundResetsHidden.length>0)&&d.v.game.state==ge.D2.draw?1:0;return 0==d.v.game.roundResetsHidden.length?d.v.game.round+e:d.v.game.round+e+d.v.game.roundResetsHidden.reduce((i,s)=>(i||0)+(s||0))}totalRounds(){return 0==d.v.game.roundResets.length?0:d.v.game.roundResets.reduce((e,i)=>(e||0)+(i||0))+this.round()}missingInitiative(){return d.v.game.figures.some(e=>R.r.settings.initiativeRequired&&(e instanceof oe.z&&d.v.entityManager.isAlive(e)&&!e.absent||e instanceof Nn.k)&&e.getInitiative()<1)}active(){return null!=d.v.game.figures.find(e=>e.active&&!e.off&&(!(e instanceof oe.z)||!e.absent))}battleGoals(){return!this.missingInitiative()&&R.r.settings.battleGoals&&R.r.settings.battleGoalsReminder&&null!=d.v.game.scenario&&d.v.roundManager.firstRound&&!d.v.game.figures.every(e=>!(e instanceof oe.z)||e.battleGoal||e.absent)}activeHint(){return this.active()&&!R.r.settings.disabledTurnConfirmation&&(R.r.settings.expireConditions||R.r.settings.applyConditions)}finish(){return!1}failed(){return!this.active()&&!this.empty()&&d.v.game.figures.some(e=>e instanceof oe.z)&&d.v.game.figures.every(e=>!(e instanceof oe.z)||e instanceof oe.z&&(e.exhausted||e.health<=0||e.absent))}disabled(){return d.v.game.state==ge.D2.draw&&this.drawDisabled()||d.v.game.state==ge.D2.next&&this.nextDisabled()}drawDisabled(){return this.empty()||this.missingInitiative()||this.battleGoals()||this.finish()||this.failed()}nextDisabled(){return this.activeHint()||this.finish()||this.failed()}toggleActiveAllyAttackModifierDeck(){this.beforeAllyAttackModifierDeck(new xn(d.v.game.allyAttackModifierDeck,!d.v.game.allyAttackModifierDeck.active||this.compact&&d.v.game.lootDeck.active?"amDeckShow":"amDeckHide")),this.compact&&d.v.game.lootDeck.active?(d.v.game.lootDeck.active=!1,d.v.game.allyAttackModifierDeck.active=!0):d.v.game.allyAttackModifierDeck.active=!d.v.game.allyAttackModifierDeck.active,this.afterAllyAttackModifierDeck(new xn(d.v.game.allyAttackModifierDeck,d.v.game.allyAttackModifierDeck.active?"amDeckShow":"amDeckHide"))}toggleActiveMonsterAttackModifierDeck(){this.beforeMonsterAttackModifierDeck(new xn(d.v.game.monsterAttackModifierDeck,!d.v.game.monsterAttackModifierDeck.active||this.compact&&d.v.game.lootDeck.active?"amDeckShow":"amDeckHide")),this.compact&&d.v.game.lootDeck.active?(d.v.game.lootDeck.active=!1,d.v.game.monsterAttackModifierDeck.active=!0):d.v.game.monsterAttackModifierDeck.active=!d.v.game.monsterAttackModifierDeck.active,this.afterMonsterAttackModifierDeck(new xn(d.v.game.monsterAttackModifierDeck,d.v.game.monsterAttackModifierDeck.active?"amDeckShow":"amDeckHide"))}toggleLootDeck(){this.beforeLootDeck(new _o(d.v.game.lootDeck,d.v.game.lootDeck.active?"lootDeckHide":"lootDeckShow")),d.v.game.lootDeck.active=!d.v.game.lootDeck.active,this.afterLootDeck(new _o(d.v.game.lootDeck,d.v.game.lootDeck.active?"lootDeckShow":"lootDeckHide"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-footer"]],viewQuery:function(e,i){if(1&e&&(t.Gf(WH,5),t.Gf(XH,5),t.Gf(tj,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.nextButton=s.first),t.iGM(s=t.CRH())&&(i.footer=s.first),t.iGM(s=t.CRH())&&(i.monsterDeck=s.first)}},decls:28,vars:30,consts:[[3,"ngClass"],["footer",""],[1,"round-container",3,"ngClass","click"],["nextButton",""],[3,"ghs-label"],[1,"round"],[4,"ngIf"],["class","total-rounds",4,"ngIf"],["class","time",4,"ngIf"],["button",""],[1,"flex-shrink"],[1,"level-container"],[1,"attack-modifier-spacer"],["class","deck am-deck ally-deck",3,"ngClass",4,"ngIf"],[1,"deck","am-deck","monster-deck",3,"ngClass"],["monsterDeck",""],["numeration","m",3,"deck","bottom","before","after"],[1,"active-toggle",3,"ngClass","click"],[1,"numeration"],["class","deck loot-deck",3,"ngClass",4,"ngIf"],[1,"total-rounds"],[1,"time"],[1,"deck","am-deck","ally-deck",3,"ngClass"],["numeration","A",3,"deck","ally","bottom","before","after"],[1,"deck","loot-deck",3,"ngClass"],[3,"deck","bottom","before","after"],["src","./assets/images/fh/loot-token.png"]],template:function(e,i){1&e&&(t.TgZ(0,"footer",0,1)(2,"div",0)(3,"div",2,3),t.NdJ("click",function(){return i.next()}),t.TgZ(5,"a"),t._UZ(6,"span",4),t.qZA(),t.TgZ(7,"span",5),t.YNc(8,ej,2,1,"span",6),t.YNc(9,nj,2,1,"span",7),t.qZA(),t.YNc(10,ij,2,1,"span",8),t._UZ(11,"span",null,9),t.qZA()(),t._UZ(13,"div",10),t.TgZ(14,"div",11),t._UZ(15,"ghs-scenario")(16,"ghs-level"),t.qZA(),t.YNc(17,oj,1,0,"ghs-scenario-rules",6),t._UZ(18,"div",10)(19,"div",12),t.YNc(20,aj,5,12,"div",13),t.TgZ(21,"div",14,15)(23,"ghs-attackmodifier-deck",16),t.NdJ("before",function(l){return i.beforeMonsterAttackModifierDeck(l)})("after",function(l){return i.afterMonsterAttackModifierDeck(l)}),t.qZA(),t.TgZ(24,"div",17),t.NdJ("click",function(){return i.toggleActiveMonsterAttackModifierDeck()}),t.TgZ(25,"span",18),t._uU(26,"m"),t.qZA()()(),t.YNc(27,sj,5,11,"div",19),t.qZA()),2&e&&(t.Tol(i.settingsManager.settings.theme),t.Q6J("ngClass",t.VKq(17,rj,i.compact)),t.xp6(2),t.Q6J("ngClass",t.VKq(19,cj,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("ngClass",t.VKq(21,lj,i.disabled())),t.xp6(3),t.Q6J("ghs-label",i.gameManager.game.state==i.GameState.next?"round.next":"round.draw"),t.xp6(2),t.Q6J("ngIf",i.round()>0),t.xp6(1),t.Q6J("ngIf",i.totalRounds()>0),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.scenario),t.xp6(7),t.Q6J("ngIf",i.settingsManager.settings.scenarioRules),t.xp6(3),t.Q6J("ngIf",i.hasAllyAttackModifierDeck),t.xp6(1),t.Q6J("ngClass",t.l5B(23,Hw,!i.gameManager.game.monsterAttackModifierDeck.active||i.compact&&i.gameManager.game.lootDeck.active,i.gameManager.game.monsterAttackModifierDeck.active&&i.gameManager.game.monsterAttackModifierDeck.current<0,i.gameManager.game.monsterAttackModifierDeck.active&&0==i.gameManager.game.monsterAttackModifierDeck.current,i.gameManager.game.monsterAttackModifierDeck.active&&i.gameManager.game.monsterAttackModifierDeck.current>0)),t.xp6(2),t.Q6J("deck",i.gameManager.game.monsterAttackModifierDeck)("bottom",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(28,jw,!i.gameManager.game.monsterAttackModifierDeck.active)),t.xp6(3),t.Q6J("ngIf",i.settingsManager.settings.lootDeck&&(i.lootDeck||i.settingsManager.settings.alwaysLootDeck||i.gameManager.fhRules())))},dependencies:[x.mk,x.O5,Fw,r8,Kf,v8,$H,ie],styles:['footer[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;position:relative}footer[_ngcontent-%COMP%] .flex-shrink[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:1}footer[_ngcontent-%COMP%] .attack-modifier-spacer[_ngcontent-%COMP%]{height:100%;width:calc(var(--ghs-unit) * 38 * var(--ghs-text-factor) * var(--ghs-barsize));flex-shrink:0}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%]{transition:transform .5s ease-in-out}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize));left:calc(var(--ghs-unit) * -2.5 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize));right:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize));border:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor) * var(--ghs-barsize)) solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);border-radius:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .deck.initial[_ngcontent-%COMP%]{transform:translate(59%)}footer[_ngcontent-%COMP%] .deck.partial[_ngcontent-%COMP%]{transform:translate(17%)}footer[_ngcontent-%COMP%] .deck.full[_ngcontent-%COMP%]{transform:none}footer[_ngcontent-%COMP%] .deck.collapsed[_ngcontent-%COMP%]{transform:translate(100%)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]{cursor:pointer;position:absolute;left:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize));top:50%;width:13%;height:50%;z-index:1;transition:transform .5s ease-in-out;transform:translateY(-50%) scale(1)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle.inactive[_ngcontent-%COMP%]{transform:translateY(-50%) scale(1.3)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:hover{filter:brightness(.7) grayscale(.3)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:active, footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]:focus{filter:none}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%] .numeration[_ngcontent-%COMP%]{font-family:ghs-title;display:flex;justify-content:center;position:absolute;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor) * var(--ghs-barsize));line-height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor) * var(--ghs-barsize));width:100%;height:100%;background-position:center;background-size:100% auto;background-repeat:no-repeat;background-image:url(am-character-icon.83c1ab396221d56b.png)}footer[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%] .numeration[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:60%;width:auto;align-self:center}footer[_ngcontent-%COMP%] .ally-deck[_ngcontent-%COMP%]{position:fixed;right:0;width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:1}footer[_ngcontent-%COMP%] .monster-deck[_ngcontent-%COMP%]{position:fixed;right:0;width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:2}footer[_ngcontent-%COMP%] .loot-deck[_ngcontent-%COMP%]{position:fixed;left:0;width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor) * var(--ghs-barsize));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 12.5 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:2}footer[_ngcontent-%COMP%] .loot-deck[_ngcontent-%COMP%]:before{right:calc(var(--ghs-unit) * -2.5 * var(--ghs-text-factor) * var(--ghs-barsize));left:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .loot-deck.initial[_ngcontent-%COMP%]{transform:translate(-59%)}footer[_ngcontent-%COMP%] .loot-deck.partial[_ngcontent-%COMP%]{transform:translate(-17%)}footer[_ngcontent-%COMP%] .loot-deck.fully[_ngcontent-%COMP%]{transform:none}footer[_ngcontent-%COMP%] .loot-deck.collapsed[_ngcontent-%COMP%]{transform:translate(-100%)}footer[_ngcontent-%COMP%] .loot-deck[_ngcontent-%COMP%] .active-toggle[_ngcontent-%COMP%]{left:initial;right:calc(var(--ghs-unit) * -5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], footer[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{position:relative;z-index:2}footer[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:0;left:0;width:100%;height:100%;background-image:url(bar.e331a4ef847b1c19.jpg);background-size:100% 105%;background-position:bottom right;background-repeat:no-repeat;transform:scale(-1);z-index:-1}footer.fh[_ngcontent-%COMP%]:before{background-image:url(bar.56898105bfacea25.jpg)}footer.modern[_ngcontent-%COMP%]:before{background-image:url(dialog_background_modern.c233015926c13e5e.png)}footer.modern[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:0;left:0;width:100%;height:4%;background:linear-gradient(90deg,var(--ghs-color-darkgray) 0%,var(--ghs-color-white) 35%,var(--ghs-color-white) 65%,var(--ghs-color-darkgray) 100%);opacity:.2}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor) * var(--ghs-barsize));word-wrap:break-word;text-align:center}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));line-height:calc(var(--ghs-unit) * 3.4 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));width:calc(var(--ghs-unit) * 12 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);position:absolute;font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor) * var(--ghs-barsize));left:50%;transform:translate(-50%);bottom:calc(var(--ghs-unit) * .2 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);position:absolute;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor) * var(--ghs-barsize));left:calc(var(--ghs-unit) * 12 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:0}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%] .round[_ngcontent-%COMP%] .total-rounds[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%]:hover a[_ngcontent-%COMP%], footer[_ngcontent-%COMP%] .round-container[_ngcontent-%COMP%]:hover .round[_ngcontent-%COMP%]{color:var(--ghs-color-white)}footer[_ngcontent-%COMP%] .round-container.disabled[_ngcontent-%COMP%]{cursor:help}footer[_ngcontent-%COMP%] ghs-scenario-rules[_ngcontent-%COMP%]{position:absolute;left:50%;bottom:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));transform:translate(-50%);z-index:3}footer[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-shrink:0;max-width:calc(100% - var(--ghs-unit) * 15 * var(--ghs-text-factor) * var(--ghs-barsize) - var(--ghs-unit) * 38 * var(--ghs-text-factor) * var(--ghs-barsize))}footer[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] ghs-scenario[_ngcontent-%COMP%]{height:100%}footer[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%] ghs-level[_ngcontent-%COMP%]{height:100%;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] .attack-modifier-spacer[_ngcontent-%COMP%]{display:none}footer.compact[_ngcontent-%COMP%] .monster-deck[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * 12.5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] .ally-deck[_ngcontent-%COMP%]{bottom:calc(var(--ghs-unit) * 26 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] ghs-scenario-rules[_ngcontent-%COMP%]{width:100%}footer.compact[_ngcontent-%COMP%] .level-container[_ngcontent-%COMP%]{--ghs-text-factor: 1.6;max-width:initial;flex-grow:1;max-width:calc(100% - var(--ghs-unit) * 12.5 * var(--ghs-text-factor) * var(--ghs-barsize))}footer.compact[_ngcontent-%COMP%] .flex-shrink[_ngcontent-%COMP%]{flex-basis:0}']})),a})();const dj=function(o){return{"random-item":o}};function hj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.randomItem(s)&&l.randomItemDialog(s))}),t._UZ(1,"ghs-loot",9),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(4,dj,e.randomItem(n))),t.xp6(1),t.Q6J("loot",n)("flipped",!0)("disableFlip",!0)}}function uj(o,a){if(1&o&&(t.TgZ(0,"div",6),t.YNc(1,hj,2,6,"div",7),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.lootCards)}}let _j=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"lootCards",[]),(0,_.Z)(this,"sorted",!1),this.character=e,this.dialogRef=i,this.dialog=s,this.character.lootCards&&this.character.lootCards.forEach(l=>this.lootCards.push(d.v.game.lootDeck.cards[l]))}sort(){this.sorted?(this.sorted=!1,this.lootCards=[],this.character.lootCards&&this.character.lootCards.forEach(e=>this.lootCards.push(d.v.game.lootDeck.cards[e]))):(this.sorted=!0,this.lootCards.sort((e,i)=>e.cardId-i.cardId))}randomItem(e){if(e.type==le.CG.random_item){const i=this.character.progress.equippedItems.find(s=>"loot-random-item"==s.marker);if(i)return d.v.itemManager.getItem(+i.name,i.edition,!0)}}randomItemDialog(e){const i=this.randomItem(e);i&&this.dialog.open(gg,{data:{item:i}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-loot-cards"]],decls:6,vars:2,consts:[[1,"loot-cards-dialog"],[1,"scroll-container"],[1,"menu"],[3,"click"],[3,"ghs-label"],["class","loot-cards",4,"ngIf"],[1,"loot-cards"],["class","loot-container",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"loot-container",3,"ngClass","click"],[3,"loot","flipped","disableFlip"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"a",3),t.NdJ("click",function(){return i.sort()}),t._UZ(4,"span",4),t.qZA()(),t.YNc(5,uj,2,1,"div",5),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("ghs-label",i.sorted?"character.lootCards.drawn":"character.lootCards.sort"),t.xp6(1),t.Q6J("ngIf",i.character.lootCards))},dependencies:[x.mk,x.sg,x.O5,jO,ie],styles:[".loot-cards-dialog[_ngcontent-%COMP%]{position:relative}.loot-cards-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap;max-width:calc(var(--ghs-unit) * 60 * var(--ghs-dialog-factor))}.loot-cards-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.loot-cards-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-evenly;align-items:center;overflow-y:auto;overflow-x:hidden;width:calc(var(--ghs-unit) * 57 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%]{position:relative;display:flex;transition:none;width:calc(var(--ghs-unit) * 25.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 38.25 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0;flex-shrink:0;flex-grow:0}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-container.random-item[_ngcontent-%COMP%]{cursor:pointer}.loot-cards-dialog[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-container[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;left:0;width:100%;height:100%;z-index:1}"]})),a})();const pj=function(o){return{active:o}};function fj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",12),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.selectColor(s))}),t.TgZ(1,"span",13),t._UZ(2,"img",14),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("ngClass",t.VKq(2,pj,n==e.summonColor)),t.xp6(2),t.MGl("src","./assets/images/summons/",n,".png",t.LSH)}}function mj(o,a){if(1&o&&(t.ynx(0),t.YNc(1,fj,3,4,"span",11),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.summonColors)}}const BO=function(o){return{disabled:o}};function vj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",15),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.pickNumber(s+1))}),t.TgZ(1,"span",16),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(2,BO,e.summonNumber==n+1)),t.xp6(2),t.Oqu(n+1)}}function Cj(o,a){1&o&&t._UZ(0,"img",22)}function Mj(o,a){if(1&o&&t._UZ(0,"img",14),2&o){const n=t.oxw(2);t.MGl("src","./assets/images/summons/",n.summonColor,".png",t.LSH)}}function Oj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"("),t._UZ(2,"span",3),t._uU(3),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","character.summon.level"),t.xp6(1),t.hij(" ",n.level,")")}}function Pj(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",23),t.TgZ(2,"span",24),t._UZ(3,"img",14),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.Q6J("src",n.thumbnailUrl?n.thumbnailUrl:"./assets/images/summons/thumbnail/"+n.edition+"-"+n.name+".png",t.LSH)}}function yj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",17),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addSummon(s))}),t.TgZ(1,"span",18)(2,"span",13),t.YNc(3,Cj,1,0,"img",19),t.YNc(4,Mj,1,1,"img",20),t.TgZ(5,"span",21),t._uU(6),t.qZA()()(),t.TgZ(7,"label"),t._UZ(8,"span",3),t.YNc(9,Oj,4,2,"span",6),t.qZA(),t.YNc(10,Pj,4,1,"ng-container",6),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(7,BO,!e.available(n))),t.xp6(3),t.Q6J("ngIf",n.special),t.xp6(1),t.Q6J("ngIf",!n.special),t.xp6(2),t.Oqu(e.summonNumber),t.xp6(2),t.Q6J("ghs-label","data.summon."+n.name),t.xp6(1),t.Q6J("ngIf",e.showLevel(n)),t.xp6(1),t.Q6J("ngIf",n.thumbnail&&!n.noThumbnail||n.thumbnailUrl)}}function bj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",25)(1,"span",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addCustomSummon())}),t.TgZ(2,"span",13),t._UZ(3,"img",14),t.TgZ(4,"span",21),t._uU(5),t.qZA()()(),t.TgZ(6,"input",26),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setSummonName(i))})("keyup",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setSummonName(i))}),t.qZA(),t.TgZ(7,"span",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.addCustomSummon())}),t._UZ(8,"img",28),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(7,BO,n.customDisabled())),t.xp6(2),t.MGl("src","./assets/images/summons/",n.summonColor,".png",t.LSH),t.xp6(2),t.Oqu(n.summonNumber),t.xp6(1),t.Q6J("value",n.summonName)("ghs-label","summon.name")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngClass",t.VKq(9,BO,n.customDisabled()))}}const xj=function(){return[]};let wj=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"summonColors",Object.values(Ee.mp).filter(s=>s!=Ee.mp.custom&&s!=Ee.mp.fh)),(0,_.Z)(this,"summonColor",Ee.mp.blue),(0,_.Z)(this,"summonNumber",1),(0,_.Z)(this,"summonName",""),(0,_.Z)(this,"summonFilter",void 0),(0,_.Z)(this,"fhSummon",!1),this.character=e,this.dialogRef=i,this.summonFilter="";for(let s=2;s<9;s++)this.summonData().filter(l=>this.available(l,s))>this.summonData().filter(l=>this.available(l,s-1))&&(this.summonNumber=s);this.fhSummon="fh"===this.character.edition||-1!=d.v.editionExtensions(this.character.edition).indexOf("fh"),this.fhSummon=!1,this.fhSummon&&(this.summonColor=Ee.mp.fh)}pickNumber(e){this.summonNumber=e}selectColor(e){this.summonColor=e}available(e,i=this.summonNumber){return this.summonColor!=Ee.mp.custom&&0!=i&&this.character.summons.every(s=>s.dead||s.name!=e.name||(e.special?0!=s.number:s.number!=i)||(e.special?s.color!=Ee.mp.custom:s.color!=this.summonColor))&&(e.count||1)>this.character.summons.filter(s=>s.name==e.name&&s.cardId==e.cardId&&d.v.entityManager.isAlive(s)).length}customDisabled(){return this.character.summons.some(e=>d.v.entityManager.isAlive(e)&&e.name==this.summonName&&e.number==this.summonNumber&&e.color==this.summonColor)}showLevel(e){return this.summonData().some(i=>i.name==e.name&&i.cardId!=e.cardId)}summonData(){let e=[];if(e.push(...this.character.availableSummons.filter(i=>!i.level||i.level<=this.character.level)),this.character.progress&&this.character.progress.items)for(let i of this.character.progress.items){const s=d.v.itemManager.getItem(+i.name,i.edition,!0);s&&s.summon&&(s.summon.name||(s.summon.name=s.name),s.summon.count||(s.summon.count=1),e.push(s.summon))}return e.filter(i=>!this.summonFilter||i.cardId==this.summonFilter)}setSummonName(e){this.summonName=e.target.value}addCustomSummon(){d.v.stateManager.before("addCustomSummon","data.character."+this.character.name,""+this.summonNumber,this.summonColor);let e=new Ee.eU((0,Jw.Z)(),this.summonName,"",this.character.level,this.summonNumber,this.summonColor);e.state=Ee.HY.new,d.v.characterManager.addSummon(this.character,e),this.dialogRef.close(),d.v.stateManager.after()}addSummon(e){if(-1!=this.summonData().indexOf(e)){d.v.stateManager.before("addSummon","data.character."+this.character.name,"data.summon."+e.name);let i=new Ee.eU((0,Jw.Z)(),e.name,e.cardId,this.character.level,e.special?0:this.summonNumber,e.special?Ee.mp.custom:this.summonColor,e);i.state=e.special?Ee.HY.true:Ee.HY.new,i.init=!1,d.v.characterManager.addSummon(this.character,i),e.count&&this.character.summons.filter(s=>s.name==e.name&&s.cardId==e.cardId).length!=e.count?(this.summonFilter=e.cardId,this.summonNumber++,this.summonNumber>4&&(this.summonNumber=1)):this.dialogRef.close(),d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-summondialog"]],decls:14,vars:11,consts:[[1,"summon-dialog"],[1,"title"],[1,"icon",3,"src"],[3,"ghs-label"],[1,"container"],[1,"color-container"],[4,"ngIf"],["class","number-button",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"scroll-container","summons"],["class","summon",3,"ngClass","click",4,"ngFor","ngForOf"],["class","summon",4,"ngIf"],["class","summon-button",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"summon-button",3,"ngClass","click"],[1,"image"],[3,"src"],[1,"number-button",3,"ngClass","click"],[1,"number"],[1,"summon",3,"ngClass","click"],[1,"summon-button"],["src","./assets/images/summons/custom.png",4,"ngIf"],[3,"src",4,"ngIf"],[1,"summon-number"],["src","./assets/images/summons/custom.png"],[1,"spacer"],[1,"thumbnail"],[1,"summon"],["type","text",3,"value","ghs-label","ghs-label-attribute","change","keyup"],[1,"add-summon-button",3,"ngClass","click"],["src","./assets/images/plus.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"small"),t._UZ(3,"img",2),t._uU(4),t.qZA(),t._UZ(5,"span",3),t.qZA(),t.TgZ(6,"div",4)(7,"div",5),t.YNc(8,mj,2,1,"ng-container",6),t.YNc(9,vj,3,4,"span",7),t.ALo(10,"ghsRange"),t.qZA(),t.TgZ(11,"div",8),t.YNc(12,yj,11,9,"span",9),t.YNc(13,bj,9,11,"span",10),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",i.gameManager.characterManager.characterName(i.character)," "),t.xp6(1),t.Q6J("ghs-label","summon"),t.xp6(3),t.Q6J("ngIf",!i.fhSummon),t.xp6(1),t.Q6J("ngForOf",t.xi3(10,7,t.DdM(10,xj),8)),t.xp6(3),t.Q6J("ngForOf",i.summonData()),t.xp6(1),t.Q6J("ngIf",!i.summonFilter))},dependencies:[x.mk,x.sg,x.O5,ie,Ii],styles:[".title[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex-basis:100%;flex-shrink:0;display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.title[_ngcontent-%COMP%] small[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summon-button.add-summon-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.add-summon-button[_ngcontent-%COMP%]{position:relative;border:none!important}.container[_ngcontent-%COMP%] .summon-button.add-summon-button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.add-summon-button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.container[_ngcontent-%COMP%] .summon-button.add-summon-button[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.add-summon-button[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:calc(var(--ghs-unit) * -.1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));border-bottom-left-radius:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));z-index:1;opacity:.9}.container[_ngcontent-%COMP%] .summon-button.active[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .add-summon-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.container[_ngcontent-%COMP%] .summon-button.disabled[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .add-summon-button.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}.container[_ngcontent-%COMP%] .summon-button.disabled[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .add-summon-button.disabled[_ngcontent-%COMP%]:hover{border:none}.container[_ngcontent-%COMP%] .thumbnail[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .thumbnail[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));height:auto}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,calc(var(--ghs-unit) * 7.5 * var(--ghs-dialog-factor)));row-gap:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6.5 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.container[_ngcontent-%COMP%] .color-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]:hover{border:none}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:calc(var(--ghs-unit) * 50 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover .summon-button[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover .summon-button.disabled[_ngcontent-%COMP%]{pointer-events:none!important;border:none}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover label[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{margin:0;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);background-color:transparent;border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * 1);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon.disabled[_ngcontent-%COMP%]{pointer-events:none!important}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon.disabled[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]{opacity:.5}.container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%] .summon.disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray)}"]})),a})();function kj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0("),t._UZ(2,"span",3),t._uU(3,")"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.character."+n.character.name)}}function Tj(o,a){if(1&o&&(t.TgZ(0,"span",10),t._UZ(1,"img",11),t._uU(2),t.YNc(3,kj,4,1,"span",12),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",n.gameManager.characterManager.characterName(n.character)," "),t.xp6(1),t.Q6J("ngIf",n.character.title)}}function Zj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.objective.title,"")}}function Aj(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function Sj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t._UZ(2,"span",3),t.qZA()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label",n.objective.escort?"escort":"objective")}}function Ej(o,a){if(1&o&&(t.TgZ(0,"span",10),t._UZ(1,"img",11),t.YNc(2,Zj,2,1,"span",12),t.YNc(3,Aj,1,1,"span",13),t.YNc(4,Sj,3,1,"span",12),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",n.objective.title),t.xp6(1),t.Q6J("ngIf",!n.objective.title),t.xp6(1),t.Q6J("ngIf",n.objective.title)}}function Dj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",7),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.pickNumber(s))}),t.TgZ(1,"span",8),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(2),t.Oqu(n)}}const Ij=function(o){return{active:o}};function Nj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.longRest())}),t._UZ(1,"img",15)(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,Ij,n.character.longRest)),t.xp6(2),t.Q6J("ghs-label","game.figure.longRest"+(n.character.longRest?"Off":""))}}const Jj=function(){return[1,2,3,4,5,6,7,8,9]};let zO=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"value","__"),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"objective",void 0),this.figure=e,this.dialogRef=i,this.figure instanceof oe.z?this.character=this.figure:(this.figure instanceof qe.CH||this.figure instanceof Nn.k)&&(this.objective=this.figure),i.closed.subscribe({next:()=>{-1!=this.value.indexOf("_")&&!isNaN(+this.value.replace("_",""))&&this.updateInitiative(+this.value.replace("_",""))}})}onKeyPress(e){e.key in["0","1","2","3","4","5","6","7","8","9"]&&(this.pickNumber(+e.key),e.preventDefault(),e.stopPropagation())}pickNumber(e){this.value=(this.value+""+e).substring(1,3),-1==this.value.indexOf("_")&&(this.updateInitiative(+this.value),this.dialogRef.close())}updateInitiative(e){this.figure.initiative!=e&&(d.v.stateManager.before("setInitiative",(this.character?"data.character.":"data.objective.")+this.figure.name,""+(e>0&&e<100?e:0)),e>0&&e<100?this.setInitiative(e):d.v.game.state==ge.D2.draw&&(this.figure.initiative=0),d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after())}setInitiative(e){((d.v.game.state==ge.D2.draw||!R.r.settings.initiativeRequired)&&e>=0||e>0)&&e<100&&e!=this.figure.initiative&&(this.figure.initiative=e,this.character&&(this.character.initiativeVisible=!0))}longRest(){this.character&&(this.character.longRest&&99==this.character.initiative?(d.v.stateManager.before("setInitiative","data.character."+this.figure.name,"99"),this.character.longRest=!1,d.v.stateManager.after()):(d.v.stateManager.before("characterLongRest","data.character."+this.character.name),99==this.character.initiative?this.character.longRest=!0:(this.setInitiative(99),this.character.longRest=!0,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character)),d.v.stateManager.after()),this.dialogRef.close())}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-initiative-dialog"]],hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(l){return i.onKeyPress(l)},!1,t.evT)},decls:17,vars:7,consts:[[1,"initiative-dialog"],[1,"title"],["class","character",4,"ngIf"],[3,"ghs-label"],[1,"number-container"],[1,"value"],["class","number-button",3,"click",4,"ngFor","ngForOf"],[1,"number-button",3,"click"],[1,"number"],["class","long-rest-button",3,"ngClass","click",4,"ngIf"],[1,"character"],[1,"icon",3,"src"],[4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"long-rest-button",3,"ngClass","click"],["src","./assets/images/long-rest.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,Tj,4,3,"span",2),t.YNc(3,Ej,5,4,"span",2),t._UZ(4,"span",3),t.qZA(),t.TgZ(5,"div",4),t._UZ(6,"span"),t.TgZ(7,"span",5),t._uU(8),t.qZA(),t._UZ(9,"span"),t.YNc(10,Dj,3,1,"span",6),t._UZ(11,"span"),t.TgZ(12,"span",7),t.NdJ("click",function(){return i.pickNumber(0)}),t.TgZ(13,"span",8),t._uU(14,"0"),t.qZA()(),t._UZ(15,"span"),t.qZA(),t.YNc(16,Nj,3,4,"span",9),t.qZA()),2&e&&(t.xp6(2),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.objective),t.xp6(1),t.Q6J("ghs-label","game.figure.setInitiative"),t.xp6(4),t.Oqu(i.value),t.xp6(2),t.Q6J("ngForOf",t.DdM(6,Jj)),t.xp6(6),t.Q6J("ngIf",i.character))},dependencies:[x.mk,x.sg,x.O5,ie],styles:[".initiative-dialog[_ngcontent-%COMP%]{position:relative}.initiative-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.initiative-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)))}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.initiative-dialog[_ngcontent-%COMP%] .number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray)}.initiative-dialog[_ngcontent-%COMP%] .long-rest-button.active[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)}"]})),a})();function Uj(o,a){1&o&&(t.TgZ(0,"div",6)(1,"div",7),t._UZ(2,"span",8),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("ghs-label","game.items.empty"))}const Lj=function(o){return{spent:o}};function Qj(o,a){if(1&o&&t._UZ(0,"ghs-character-item",10),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("character",e.character)("item",n)("setup",e.setup)("ngClass",t.VKq(4,Lj,!e.setup&&e.countFlag(n,e.ItemFlags.spent)))}}function Rj(o,a){if(1&o&&(t.TgZ(0,"div",6),t.YNc(1,Qj,1,6,"ghs-character-item",9),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.items)}}const Fj=function(o,a){return{fh:o,modern:a}},qj=function(o,a){return[o,a]};let Hj=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"items",void 0),(0,_.Z)(this,"ItemFlags",Ni.CT),(0,_.Z)(this,"GameState",ge.D2),this.character=e,this.dialogRef=i,this.dialog=s,this.setup=d.v.game.state==ge.D2.draw&&d.v.roundManager.firstRound,this.items=this.character.progress.items.map(l=>d.v.itemManager.getItem(+l.name,l.edition,!0)).filter(l=>l).map(l=>l).sort((l,m)=>{if(!this.setup){if(this.equipped(l)&&!this.equipped(m))return-1;if(this.equipped(m)&&!this.equipped(l))return 1}return l.slot&&!m.slot?-1:m.slot&&!l.slot?1:l.slot&&m.slot?Object.values(Ni.SE).indexOf(l.slot)-Object.values(Ni.SE).indexOf(m.slot):0})}equipped(e){return this.character.progress.equippedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}countFlag(e,i){const s=this.equipped(e);return s&&s.tags&&s.tags.filter(l=>l==i).length||0}openShop(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character,affordable:!0}}),this.close()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-items-character-dialog"]],decls:7,vars:12,consts:[[1,"items-dialog",3,"ngClass"],[1,"scroll-container"],[1,"header"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"shop",3,"ghs-label","click"],["class","item-list",4,"ngIf"],[1,"item-list"],[1,"empty"],[3,"ghs-label"],[3,"character","item","setup","ngClass",4,"ngFor","ngForOf"],[3,"character","item","setup","ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"span",3),t.TgZ(4,"a",4),t.NdJ("click",function(){return i.openShop()}),t.qZA()(),t.YNc(5,Uj,3,1,"div",5),t.YNc(6,Rj,2,1,"div",5),t.qZA()()),2&e&&(t.Q6J("ngClass",t.WLB(6,Fj,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ghs-label","game.items.character")("ghs-label-args",t.WLB(9,qj,i.character.name,i.gameManager.characterManager.characterName(i.character))),t.xp6(1),t.Q6J("ghs-label","game.items.character.shop"),t.xp6(1),t.Q6J("ngIf",0==i.items.length),t.xp6(1),t.Q6J("ngIf",i.items.length>0))},dependencies:[x.mk,x.sg,x.O5,kw,ie],styles:[".items-dialog[_ngcontent-%COMP%]{position:relative}.items-dialog[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{overflow-x:hidden;max-height:calc(90vh - var(--ghs-unit) * 6)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.items-dialog[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .shop[_ngcontent-%COMP%]:hover{opacity:.7}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));min-height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] ghs-character-item[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor));transition:all .5s ease-in-out}.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%] ghs-character-item.spent[_ngcontent-%COMP%]{transform:rotate(90deg);margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 7.25 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.items-dialog[_ngcontent-%COMP%] .item-list[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.items-dialog.fh[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.items-dialog.modern[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}"]})),a})();function jj(o,a){if(1&o&&t._UZ(0,"img",24),2&o){const n=t.oxw(2);t.Q6J("src",n.gameManager.monsterManager.monsterThumbnail(n.monster),t.LSH)}}function Bj(o,a){1&o&&(t.TgZ(0,"span",25),t._UZ(1,"span",20),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.ally"))}function zj(o,a){1&o&&(t.TgZ(0,"span",26),t._UZ(1,"span",20),t._uU(2,"\xa0"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.allied"))}function Gj(o,a){if(1&o&&t._UZ(0,"span",27),2&o){const n=t.oxw(2);t.Q6J("ghs-label","(%game.monsterType."+n.data.type+"%)")}}function Vj(o,a){if(1&o&&(t.TgZ(0,"div",18),t.YNc(1,jj,1,1,"img",19),t._UZ(2,"span",20),t._uU(3,"\xa0 "),t.YNc(4,Bj,3,1,"span",21),t.YNc(5,zj,3,1,"span",22),t.YNc(6,Gj,1,1,"span",23),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",!n.monster.noThumbnail&&!n.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.monster.name),t.xp6(2),t.Q6J("ngIf",n.monster.isAlly),t.xp6(1),t.Q6J("ngIf",n.monster.isAllied),t.xp6(1),t.Q6J("ngIf",n.data.type)}}function Yj(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",28),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(2),t.Oqu(n.gameManager.characterManager.characterName(n.character,!0))}}const TT=function(o){return{inactive:o}};function Kj(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEntity(i))}),t._uU(1),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Gre("entity ",e.gameManager.toMonsterEntity(n).type,""),t.Q6J("ngClass",t.VKq(5,TT,-1==e.entities.indexOf(n))),t.xp6(1),t.Oqu(n.number)}}function $j(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Wj(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Oqu(e.gameManager.toSummon(n).number)}}const Xj=function(o,a,n){return{active:o,new:a,center:n}};function t9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",32),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleEntity(i))}),t.TgZ(1,"span",33),t._UZ(2,"img",34),t.TgZ(3,"span",35),t.YNc(4,$j,2,0,"span",36),t.YNc(5,Wj,2,1,"span",36),t.qZA()()()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(5,TT,-1==e.entities.indexOf(n))),t.xp6(1),t.Q6J("ngClass",t.kEZ(7,Xj,e.gameManager.toSummon(n).state==e.SummonState.true,e.gameManager.toSummon(n).state==e.SummonState.new,e.gameManager.toSummon(n).entityConditions.length%2==0)),t.xp6(1),t.MGl("src","./assets/images/summons/",e.gameManager.toSummon(n).color,".png",t.LSH),t.xp6(2),t.Q6J("ngIf",0==e.gameManager.toSummon(n).number),t.xp6(1),t.Q6J("ngIf",e.gameManager.toSummon(n).number>0)}}function e9(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Kj,2,7,"div",29),t.YNc(2,t9,6,11,"div",30),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.monster),t.xp6(1),t.Q6J("ngIf",n.character)}}function n9(o,a){if(1&o&&t._UZ(0,"ghs-conditions",37),2&o){const n=t.oxw();t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entities",n.entities)("figure",n.monster)("type","monster")("columns",4)}}function i9(o,a){if(1&o&&t._UZ(0,"ghs-conditions",37),2&o){const n=t.oxw();t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entities",n.entities)("figure",n.character)("type","monster")("columns",4)}}function o9(o,a){if(1&o&&t._UZ(0,"ghs-conditions",37),2&o){const n=t.oxw();t.Q6J("entityConditions",n.entityConditions)("immunities",n.entityImmunities)("entities",n.entities)("figure",n.objective)("type","character")("columns",4)}}function a9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",38),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleType())}),t._UZ(1,"span",20)(2,"img",39)(3,"span",20),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","%game.monsterType.normal%"),t.xp6(2),t.Q6J("ghs-label","%game.monsterType.elite%"))}const ZT=function(o,a){return{"negative-value":o,"positive-value":a}};let Bw=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"health",0),(0,_.Z)(this,"maxHealth",0),(0,_.Z)(this,"ConditionName",re.fT),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"entities",void 0),(0,_.Z)(this,"allEntities",[]),(0,_.Z)(this,"entityConditions",[]),(0,_.Z)(this,"initialImmunities",[]),(0,_.Z)(this,"entityImmunities",[]),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"EntityValueFunction",ae.j9),this.data=e,this.dialogRef=i,this.data.monster?(this.monster=this.data.monster,this.allEntities=this.monster.entities.filter(s=>!e.type||s.type==e.type)):this.data.character?(this.character=this.data.character,this.allEntities=this.character.summons):this.data.objective&&(this.objective=this.data.objective,this.allEntities=this.objective.entities),this.dialogRef.closed.subscribe({next:s=>{s||this.close()}}),this.entities=[],this.allEntities.forEach(s=>this.entities.push(s)),this.update()}update(){this.entityConditions=[],this.entities.forEach((e,i,s)=>{e.entityConditions.forEach(l=>{!this.entityConditions.find(m=>m.name==l.name)&&s.every(m=>m.entityConditions.find(O=>O.name==l.name&&O.state==l.state))&&this.entityConditions.push(JSON.parse(JSON.stringify(l)))}),e.immunities.forEach(l=>{!this.entityImmunities.find(m=>m==l)&&s.every(m=>m.immunities.find(O=>O==l))&&(this.entityImmunities.push(l),this.initialImmunities.push(l))})})}toggleEntity(e){-1==this.entities.indexOf(e)?this.entities.push(e):this.entities.splice(this.entities.indexOf(e),1),this.update()}changeHealth(e){this.health+=e}changeMaxHealth(e){this.maxHealth+=e}toggleType(){if(this.monster){const e=this.monster.stats.find(s=>this.monster&&s.level==this.monster.level&&s.type==ee.M.normal),i=this.monster.stats.find(s=>this.monster&&s.level==this.monster.level&&s.type==ee.M.elite);e&&i?(d.v.stateManager.before("toggleTypeAll","monster."+this.monster.name),this.entities.forEach(s=>{this.monster&&d.v.entityManager.isAlive(s)&&s instanceof In.g&&(s.type=s.type==ee.M.elite?ee.M.normal:ee.M.elite,s.maxHealth=(0,ae.j9)(s.type==ee.M.normal?e.health:i.health,this.monster.level),(s.health>s.maxHealth||s.health{e.dead=!0}),setTimeout(()=>{this.entities.forEach(e=>{(d.v.game.state==ge.D2.draw||0==e.entityConditions.length||e.entityConditions.every(i=>-1==i.types.indexOf(re.CP.turn)&&-1==i.types.indexOf(re.CP.apply)))&&(this.monster&&e instanceof In.g?d.v.monsterManager.removeMonsterEntity(this.monster,e):this.character&&e instanceof Ee.eU?d.v.characterManager.removeSummon(this.character,e):this.objective&&e instanceof oa.W&&d.v.objectiveManager.removeObjectiveEntity(this.objective,e))}),this.entities.every(e=>!d.v.entityManager.isAlive(e))&&this.monster&&this.monster.active&&d.v.roundManager.toggleFigure(this.monster),d.v.stateManager.after(),d.v.uiChange.emit()},R.r.settings.disableAnimations?0:1500),this.dialogRef.close(!0)}close(){if(this.entityConditions.filter(e=>e.state==re.tT.new||e.state==re.tT.removed).forEach(e=>{this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,e.state==re.tT.removed?"removeCondition":"addCondition"),e.name,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,e.state==re.tT.removed?"removeConditionSummons":"addConditionSummons"),e.name):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,e.state==re.tT.removed?"removeConditionObjectives":"addConditionObjectives"),e.name),this.entities.forEach(i=>{e.expired=e.state==re.tT.new,e.state==re.tT.removed?d.v.entityManager.removeCondition(i,e,e.permanent):this.monster&&!d.v.entityManager.isImmune(i,this.monster,e.name)?d.v.entityManager.addCondition(i,e,this.monster.active,this.monster.off,e.permanent):this.character?d.v.entityManager.addCondition(i,e,i.active,this.character.off,e.permanent):this.objective&&d.v.entityManager.addCondition(i,e,i.active,this.objective.off,e.permanent)}),d.v.stateManager.after()}),this.entityConditions.forEach(e=>{this.entities.find(i=>i.entityConditions.find(s=>s.name==e.name&&!s.expired&&s.value!=e.value))&&(this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,"setConditionValue"),e.name,""+e.value,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,"setConditionValueSummons"),e.name,""+e.value):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,"setConditionValueObjectives"),e.name,""+e.value),this.entities.forEach(i=>{const s=i.entityConditions.find(l=>l.name==e.name&&!l.expired);s&&s.value!=e.value&&(s.value=e.value)}),d.v.stateManager.after())}),this.initialImmunities.forEach(e=>{-1==this.entityImmunities.indexOf(e)&&(this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,"removeImmunity"),e,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,"removeImmunitySummon"),e):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,"removeImmunityObjectives"),e),this.entities.forEach(i=>{i.immunities=i.immunities.filter(s=>s!=e)}),d.v.stateManager.after())}),this.entityImmunities.forEach(e=>{-1==this.initialImmunities.indexOf(e)&&(this.monster?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.monster,"setImmunity"),e,this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.character,"setImmunitySummon"),e):this.objective&&d.v.stateManager.before(...d.v.entityManager.undoInfos(void 0,this.objective,"setImmunityObjectives"),e),this.entities.forEach(i=>{i.immunities.push(e)}),d.v.stateManager.after())}),0!=this.health){this.monster?d.v.stateManager.before("changeMonsterHP","monster."+this.monster.name,(0,he.uZ)(this.health),this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before("changeSummonsHP","character."+this.character.name,(0,he.uZ)(this.health)):this.objective&&d.v.stateManager.before("changeObjectivesHP",this.objective.title||"data.objective."+this.objective.name,(0,he.uZ)(this.health));let e=[];this.entities.forEach(i=>{0!=this.health&&(this.monster?d.v.entityManager.changeHealth(i,this.monster,this.health):this.character?d.v.entityManager.changeHealth(i,this.character,this.health):this.objective&&d.v.entityManager.changeHealth(i,this.objective,this.health)),(i.maxHealth>0&&i.health<=0||i.dead)&&(i.dead=0==i.entityConditions.length||i.entityConditions.every(s=>!s.highlight||-1==s.types.indexOf(re.CP.turn)&&-1==s.types.indexOf(re.CP.apply)),e.push(i))}),this.health=0,e.length>0?setTimeout(()=>{e.forEach(i=>{i.dead&&(this.monster&&i instanceof In.g?d.v.monsterManager.removeMonsterEntity(this.monster,i):this.character&&i instanceof Ee.eU?d.v.characterManager.removeSummon(this.character,i):this.objective&&i instanceof oa.W&&d.v.objectiveManager.removeObjectiveEntity(this.objective,i))}),this.entities.every(i=>!d.v.entityManager.isAlive(i))&&(this.monster&&this.monster.active&&d.v.roundManager.toggleFigure(this.monster),this.objective&&d.v.objectiveManager.removeObjective(this.objective)),this.objective&&0==this.objective.entities.length&&d.v.objectiveManager.removeObjective(this.objective),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500):d.v.stateManager.after()}0!=this.maxHealth&&(this.monster?d.v.stateManager.before("changeMonsterMaxHP","monster."+this.monster.name,(0,he.uZ)(this.health),this.data.type?"monster."+this.data.type+" ":""):this.character?d.v.stateManager.before("changeSummonsMaxHP","character."+this.character.name,(0,he.uZ)(this.health)):this.objective&&(d.v.stateManager.before("changeObjectivesMaxHP",this.objective.title||"data.objective."+this.objective.name,(0,he.uZ)(this.health)),this.objective.health=(0,he.uZ)(this.health)),this.entities.forEach(e=>{e.health==e.maxHealth&&(e.health+=this.maxHealth),e.maxHealth+=this.maxHealth,e.health>e.maxHealth&&(e.health=e.maxHealth)}),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-entities-menu-dialog"]],decls:34,vars:31,consts:[[1,"entity-menu-dialog"],["class","name",4,"ngIf"],[1,"entities"],[4,"ngFor","ngForOf"],[1,"entity-container"],[1,"item"],[1,"button",3,"repeat","singleClick"],["src","./assets/images/minus.svg",1,"ghs-svg"],[1,"item",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/status/health.svg"],[1,"badge","health-count",3,"ngClass"],["src","./assets/images/plus.svg",1,"ghs-svg"],[3,"entityConditions","immunities","entities","figure","type","columns",4,"ngIf"],[1,"button",3,"click"],["src","./assets/images/status/dead.svg"],[1,"item","max-health-container"],["src","./assets/images/status/health.svg",3,"ghs-label","ghs-label-attribute"],["class","toggle-type",3,"click",4,"ngIf"],[1,"name"],["class","standee",3,"src",4,"ngIf"],[3,"ghs-label"],["class","ally",4,"ngIf"],["class","allied",4,"ngIf"],["class","monster-type",3,"ghs-label",4,"ngIf"],[1,"standee",3,"src"],[1,"ally"],[1,"allied"],[1,"monster-type",3,"ghs-label"],[1,"icon","character-icon",3,"src"],[3,"class","ngClass","click",4,"ngIf"],["class","entity",3,"ngClass","click",4,"ngIf"],[3,"ngClass","click"],[1,"entity",3,"ngClass","click"],[1,"summon-image",3,"ngClass"],[3,"src"],[1,"summon-number"],[4,"ngIf"],[3,"entityConditions","immunities","entities","figure","type","columns"],[1,"toggle-type",3,"click"],["src","./assets/images/switch.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Vj,7,5,"div",1),t.YNc(2,Yj,4,2,"span",1),t.TgZ(3,"div",2),t.YNc(4,e9,3,2,"ng-container",3),t.qZA(),t.TgZ(5,"div",4)(6,"span",5)(7,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeHealth(-1)}),t._UZ(8,"img",7),t.qZA()(),t.TgZ(9,"span",8),t._UZ(10,"img",9),t.TgZ(11,"span",10),t._uU(12),t.ALo(13,"ghsValueSign"),t.qZA()(),t.TgZ(14,"span",5)(15,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeHealth(1)}),t._UZ(16,"img",11),t.qZA()()(),t.YNc(17,n9,1,6,"ghs-conditions",12),t.YNc(18,i9,1,6,"ghs-conditions",12),t.YNc(19,o9,1,6,"ghs-conditions",12),t.TgZ(20,"div",4)(21,"span",8)(22,"a",13),t.NdJ("click",function(){return i.toggleDead()}),t._UZ(23,"img",14),t.qZA()(),t.TgZ(24,"span",15)(25,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeMaxHealth(-1)}),t._UZ(26,"img",7),t.qZA(),t._UZ(27,"img",16),t.TgZ(28,"span",10),t._uU(29),t.ALo(30,"ghsValueSign"),t.qZA(),t.TgZ(31,"ghs-pointer-input",6),t.NdJ("singleClick",function(){return i.changeMaxHealth(1)}),t._UZ(32,"img",11),t.qZA()()(),t.YNc(33,a9,4,2,"span",17),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.monster),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(2),t.Q6J("ngForOf",i.allEntities),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.WLB(25,ZT,i.health<0,i.health>0)),t.xp6(1),t.Oqu(t.lcZ(13,21,i.health)),t.xp6(3),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngIf",i.monster),t.xp6(1),t.Q6J("ngIf",i.character),t.xp6(1),t.Q6J("ngIf",i.objective&&i.objective.escort),t.xp6(2),t.Q6J("ghs-label","game.dead")("ghs-label-attribute","title"),t.xp6(4),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ghs-label","game.maxHealth")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngClass",t.WLB(28,ZT,i.maxHealth<0,i.maxHealth>0)),t.xp6(1),t.Oqu(t.lcZ(30,23,i.maxHealth)),t.xp6(2),t.Q6J("repeat",!0),t.xp6(2),t.Q6J("ngIf",i.monster))},dependencies:[x.mk,x.sg,x.O5,zu,ie,An,Kd],styles:['.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.standee[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top-left-radius:30%;border-top-right-radius:30%;height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;margin:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor)) auto;max-width:calc(var(--ghs-unit) * 28 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]{position:relative;cursor:pointer;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-radius:100%;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.normal[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity.inactive[_ngcontent-%COMP%]{filter:none;opacity:.7;border-color:transparent}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]:hover{filter:none;opacity:.7;border-color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);transition:top .5s ease-out,left .5s ease-out}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image.new[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);background-image:url(minus.97c98a810771fceb.svg);background-size:cover;z-index:2}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.entity-menu-dialog[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .summon-image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:calc(var(--ghs-unit) * -.1);height:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 2);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4);border-bottom-left-radius:calc(var(--ghs-unit) * 4);z-index:3;opacity:.9}.entity-menu-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor)));align-content:space-between}.entity-menu-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-evenly;grid-column:2 span;width:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] .entity-container[_ngcontent-%COMP%] .max-health-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)}.entity-menu-dialog[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.entity-menu-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.entity-menu-dialog[_ngcontent-%COMP%] a.button[_ngcontent-%COMP%]:hover, .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.button[_ngcontent-%COMP%]:hover{opacity:.4}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.entity-menu-dialog[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .entity-menu-dialog[_ngcontent-%COMP%] ghs-pointer-input.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}.entity-menu-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.entity-menu-dialog[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));text-shadow:var(--ghs-outline);text-align:center}.toggle-type[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}']})),a})();const s9=["drawCard"];function r9(o,a){if(1&o&&(t.TgZ(0,"div",3),t._UZ(1,"ghs-attackmodifier",4),t.qZA()),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw();t.xp6(1),t.Q6J("attackModifier",e)("numeration",s.numeration)("characterIcon",s.characterIcon)("flipped",i==s.current)("newStyle",s.newStyle)}}function c9(o,a){if(1&o&&(t.ynx(0),t.YNc(1,r9,2,5,"div",2),t.BQk()),2&o){const n=a.index,e=t.oxw();t.xp6(1),t.Q6J("ngIf",n==e.current)}}const l9=function(o){return{character:o}};let g9=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"drawingEmitter",new t.vpe),(0,_.Z)(this,"initTimeout",1500),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"deck",void 0),(0,_.Z)(this,"numeration",""),(0,_.Z)(this,"characterIcon",""),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"current",-1),(0,_.Z)(this,"drawing",!1),(0,_.Z)(this,"drawTimeout",null),(0,_.Z)(this,"queue",0),(0,_.Z)(this,"queueTimeout",null),(0,_.Z)(this,"newStyle",!1),(0,_.Z)(this,"drawCard",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.element.nativeElement.addEventListener("click",i=>{let s=document.elementsFromPoint(i.clientX,i.clientY);s[0].classList.contains("attack-modifiers")&&s.length>2&&s[2].click()})}ngOnInit(){this.character&&(this.deck=this.character.attackModifierDeck,this.characterIcon=this.character.iconUrl,this.numeration=""+this.character.number,this.newStyle=d.v.newAmStyle(this.character.edition)),R.r.settings.fhStyle&&(this.newStyle=!0),this.current=this.deck.current,this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){e.deck&&this.update()}update(){this.character&&this.deck!=this.character.attackModifierDeck&&(this.deck=this.character.attackModifierDeck),this.current{this.drawing=!1,this.drawingEmitter.emit(!1),this.queueTimeout=null,this.queue>0?(this.queue--,this.current++,this.drawQueue()):(this.element.nativeElement.getElementsByClassName("attack-modifier-draw")[0].classList.remove("drawing"),this.queue<0&&(this.queue=0))},R.r.settings.disableAnimations?0:2500)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-draw"]],viewQuery:function(e,i){if(1&e&&t.Gf(s9,5),2&e){let s;t.iGM(s=t.CRH())&&(i.drawCard=s.first)}},inputs:{character:"character",initTimeout:"initTimeout"},outputs:{drawingEmitter:"drawing"},features:[t.TTD],decls:2,vars:4,consts:[[1,"attack-modifier-draw",3,"ngClass"],[4,"ngFor","ngForOf"],["class","am-container",4,"ngIf"],[1,"am-container"],[1,"am",3,"attackModifier","numeration","characterIcon","flipped","newStyle"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,c9,2,1,"ng-container",1),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(2,l9,i.character)),t.xp6(1),t.Q6J("ngForOf",i.deck.cards))},dependencies:[x.mk,x.sg,x.O5,JO],styles:[".attack-modifier-draw[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;overflow:visible}.attack-modifier-draw[_ngcontent-%COMP%] .am-container[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;left:0;transition:filter 1s ease-in-out;transform:scale(0)}.attack-modifier-draw[_ngcontent-%COMP%] .am-container[_ngcontent-%COMP%] .am[_ngcontent-%COMP%]{display:block;position:absolute;inset:0}@keyframes _ngcontent-%COMP%_attackmodifier-draw{0%{transform:scale(0) translate(-152%,-16.5%)}35%,70%{transform:scale(1) translate(-50%,-50%)}to{transform:scale(0) translate(0)}}.attack-modifier-draw.drawing[_ngcontent-%COMP%] .am-container[_ngcontent-%COMP%]{cursor:wait!important;animation:_ngcontent-%COMP%_attackmodifier-draw 2.5s ease-in-out;animation-iteration-count:1;transform-origin:top left}"]})),a})();function d9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",10),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.declineApplyCondition(s.name,i))}),t._UZ(1,"img",11),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("conditionHighlight",n)}}function h9(o,a){if(1&o&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.value)}}function u9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",13),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.applyCondition(s.name,i,!0))}),t._UZ(1,"img",6),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("conditionHighlight",n),t.xp6(1),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/attackmodifier/icons/double.png",t.LSH)}}function _9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",14),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.applyCondition(s.name,i))}),t._UZ(1,"img",15),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("conditionHighlight",n)}}const p9=function(o,a){return{apply:o,double:a}};function f9(o,a){if(1&o&&(t.TgZ(0,"span",3),t.YNc(1,d9,2,1,"a",4),t.TgZ(2,"span",5),t._UZ(3,"img",6),t.YNc(4,h9,2,1,"span",7),t.qZA(),t.YNc(5,u9,2,2,"a",8),t.YNc(6,_9,2,1,"a",9),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("conditionHighlight",n)("ngClass",t.WLB(7,p9,e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply),-1!=n.types.indexOf(e.ConditionType.double))),t.xp6(1),t.Q6J("ngIf",e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply)),t.xp6(2),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(e.ConditionType.value)),t.xp6(1),t.Q6J("ngIf",e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply)&&-1!=n.types.indexOf(e.ConditionType.double)),t.xp6(1),t.Q6J("ngIf",e.settingsManager.settings.applyConditions&&e.settingsManager.settings.activeApplyConditions&&-1==e.settingsManager.settings.activeApplyConditionsExcludes.indexOf(n.name)&&-1!=n.types.indexOf(e.ConditionType.apply))}}function m9(o,a){if(1&o&&(t.TgZ(0,"div",1),t.YNc(1,f9,7,10,"span",2),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.gameManager.entityManager.highlightedConditions(n.entity))}}let s_=(()=>{var o;class a{constructor(){(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ConditionType",re.CP)}applyCondition(e,i,s=!1){i.stopPropagation(),d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.figure,"applyCondition"),e),d.v.entityManager.applyCondition(this.entity,this.figure,e),s&&d.v.entityManager.applyCondition(this.entity,this.figure,e),this.after()}declineApplyCondition(e,i){i.stopPropagation(),d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.figure,"declineApplyCondition"),e),d.v.entityManager.declineApplyCondition(this.entity,this.figure,e),this.after()}after(){d.v.entityManager.checkHealth(this.entity,this.figure),this.figure instanceof Ze.Q&&this.entity instanceof In.g&&this.entity.dead&&(0==this.entity.entityConditions.length||this.entity.entityConditions.every(e=>!e.highlight||-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))?setTimeout(()=>{this.figure instanceof Ze.Q&&this.entity instanceof In.g&&(d.v.monsterManager.removeMonsterEntity(this.figure,this.entity),this.figure.entities.every(e=>!d.v.entityManager.isAlive(e))&&this.figure.active&&d.v.roundManager.toggleFigure(this.figure)),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500):d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-highlight-conditions"]],inputs:{entity:"entity",figure:"figure"},decls:1,vars:1,consts:[["class","highlight-conditions",4,"ngIf"],[1,"highlight-conditions"],["class","condition",3,"conditionHighlight","ngClass",4,"ngFor","ngForOf"],[1,"condition",3,"conditionHighlight","ngClass"],["class","close","ghs-pointer-input","",3,"conditionHighlight","singleClick",4,"ngIf"],[1,"condition-image"],[3,"src"],["class","value",4,"ngIf"],["class","double","ghs-pointer-input","",3,"conditionHighlight","singleClick",4,"ngIf"],["class","check","ghs-pointer-input","",3,"conditionHighlight","singleClick",4,"ngIf"],["ghs-pointer-input","",1,"close",3,"conditionHighlight","singleClick"],["src","./assets/images/close_dialog.svg",1,"ghs-svg"],[1,"value"],["ghs-pointer-input","",1,"double",3,"conditionHighlight","singleClick"],["ghs-pointer-input","",1,"check",3,"conditionHighlight","singleClick"],["src","./assets/images/check.svg",1,"ghs-svg"]],template:function(e,i){1&e&&t.YNc(0,m9,2,1,"div",0),2&e&&t.Q6J("ngIf",i.gameManager.entityManager.highlightedConditions(i.entity).length>0)},dependencies:function(){return[x.mk,x.sg,x.O5,v9,An]},styles:['.highlight-conditions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;transform:scale(0);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}@keyframes _ngcontent-%COMP%_condition-highlight{0%{transform:scale(0) translateY(0)}25%,60%{transform:scale(1) translateY(-70%)}to{transform:scale(0) translateY(0)}}.highlight-conditions[_ngcontent-%COMP%] .condition.animation[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_condition-highlight 1s ease-in-out}.highlight-conditions[_ngcontent-%COMP%] .condition.apply[_ngcontent-%COMP%]{transform:scale(1)}.highlight-conditions[_ngcontent-%COMP%] .condition.apply[_ngcontent-%COMP%]:not(.animation):before{content:" ";position:absolute;top:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));bottom:0;left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:30%;opacity:.5}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%]{position:relative;z-index:1}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));width:auto}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .condition-image[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:none;transform:translate(-50%)}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:auto;z-index:2;margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close.animation[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check.animation[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double.animation[_ngcontent-%COMP%]{animation:hide-animation .95s ease-in-out}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover, .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]:hover, .highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%]:hover{transition:all .1s;transform:scale(1.2)}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .double[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -7 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 4.7 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow);margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-shadow);margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition.double[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor))}.highlight-conditions[_ngcontent-%COMP%] .condition.double[_ngcontent-%COMP%]:not(.animation):before{top:calc(var(--ghs-unit) * -5.5 * var(--ghs-text-factor))}']})),a})(),v9=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"condition",void 0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.el=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.condition.highlight&&(!R.r.settings.applyConditions||!R.r.settings.activeApplyConditions||-1!=R.r.settings.activeApplyConditionsExcludes.indexOf(this.condition.name))&&this.playAnimation()}}),this.playAnimation()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}playAnimation(){this.el.nativeElement.classList.add("animation"),setTimeout(()=>{this.el.nativeElement.classList.remove("animation"),(-1!=this.condition.types.indexOf(re.CP.turn)||!R.r.settings.applyConditions||!R.r.settings.activeApplyConditions||-1!=R.r.settings.activeApplyConditionsExcludes.indexOf(this.condition.name))&&(this.condition.highlight=!1,d.v.stateManager.saveLocal())},R.r.settings.disableAnimations?0:1100)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","conditionHighlight",""]],inputs:{condition:["conditionHighlight","condition"]}})),a})();const C9=function(o){return{critical:o}};let GO=(()=>{var o;class a{constructor(){(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"diff",0)}maxHealth(){return(0,ae.j9)(this.entity.maxHealth)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-healthbar"]],inputs:{entity:"entity",diff:"diff"},decls:2,vars:5,consts:[[1,"health-bar",3,"ngClass"],[1,"health-bar-value"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"div",1),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(3,C9,(i.entity.health+i.diff)/i.maxHealth()<.35)),t.xp6(1),t.Udp("width",(i.entity.health+i.diff)/i.maxHealth()*100+"%"))},dependencies:[x.mk],styles:[".health-bar[_ngcontent-%COMP%]{width:100%;height:100%;border:none;background-color:transparent}.health-bar[_ngcontent-%COMP%] .health-bar-value[_ngcontent-%COMP%]{height:100%;max-width:1000%;transition:width .5s;background-color:var(--ghs-color-lightgreen)}.health-bar.critical[_ngcontent-%COMP%] .health-bar-value[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}"]})),a})();const M9=function(o,a,n,e,i){return{"active-border":o,disabled:a,off:n,"no-artwork":e,modern:i}};let AT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-image"]],inputs:{character:"character"},decls:3,vars:13,consts:[[1,"image-container",3,"ngClass","ghs-label","ghs-label-attribute"],[1,"image",3,"src"],[3,"entity"]],template:function(e,i){1&e&&(t.TgZ(0,"a",0),t._UZ(1,"img",1)(2,"ghs-healthbar",2),t.qZA()),2&e&&(t.Udp("--ghs-character-color",i.character.color),t.Q6J("ngClass",t.qbA(7,M9,i.character.active,i.character.absent,i.character.off||i.character.exhausted||i.character.health<=0,i.character.noThumbnail||i.settingsManager.settings.disableArtwork,"modern"==i.settingsManager.settings.theme))("ghs-label",i.gameManager.game.state==i.GameState.next?i.character.active?"game.figure.endTurn":"game.figure.startTurn":"game.figure.setInitiative")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",i.character.noThumbnail||i.settingsManager.settings.disableArtwork?i.character.iconUrl:i.characterManager.characterThumbnail(i.character),t.LSH),t.xp6(1),t.Q6J("entity",i.character))},dependencies:[x.mk,GO,ie],styles:[".image-container[_ngcontent-%COMP%]{position:relative;display:block;width:100%;height:100%;cursor:pointer;border-radius:calc(var(--ghs-unit) * 1);overflow:hidden;transition:box-shadow .1s ease-in-out}.image-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.image-container[_ngcontent-%COMP%]:not(.active-border){border:calc(var(--ghs-unit) * .01) solid transparent;box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.image-container.no-artwork[_ngcontent-%COMP%]{background-color:var(--ghs-color-darkgray);border-color:var(--ghs-character-color)}.image-container[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{width:auto;height:100%}.image-container[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;height:5%;left:0}.image-container.off[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{filter:grayscale(.7)}.image-container.modern[_ngcontent-%COMP%]{border-radius:0;-webkit-mask:url(char-image-mask.be960a101527d144.png);mask:url(char-image-mask.be960a101527d144.png);-webkit-mask-size:100% 100%;mask-size:100% 100%}.image-container.modern.active-border[_ngcontent-%COMP%]{border:none!important;box-shadow:none}.number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 8))}.number-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 7);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 7);cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}"]})),a})();const O9=["initativeInput"];function P9(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"??"),t.qZA())}function y9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"img",6),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.longRestOff(i))}),t.qZA()}2&o&&t.Q6J("ghs-label","game.figure.longRestOff")("ghs-label-attribute","title")}const b9=function(o){return{empty:o}},x9=function(o){return{hidden:o}};let VO=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"initiativeInput",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"objectiveContainer",void 0),this.dialog=e,this.overlay=i,this.elementRef=s}ngOnInit(){this.figure instanceof oe.z?this.character=this.figure:this.figure instanceof qe.CH?this.objective=this.figure:this.figure instanceof Nn.k&&(this.objectiveContainer=this.figure)}ngAfterViewInit(){this.initiativeInput&&this.initiativeInput.nativeElement.addEventListener("keydown",e=>{if("Tab"===e.key&&d.v.game.state==ge.D2.draw){const i=this.tabindex();let s=e.shiftKey?i-1:i+1,l=document.getElementById("initiative-input-"+s);if(!l&&i>0)l=document.getElementById("initiative-input-0");else if(!l&&s<0)for(s=d.v.game.figures.filter(m=>m instanceof oe.z&&!m.absent).length-1,l=document.getElementById("initiative-input-"+s);!l&&s>0;)s--,l=document.getElementById("initiative-input-"+s);l&&l.focus(),e.preventDefault(),e.stopPropagation()}})}initiativeHidden(){return d.v.game.state==ge.D2.draw&&this.figure instanceof oe.z&&!this.figure.initiativeVisible}updateInitiative(e){const i=isNaN(+e.target.value)?0:+e.target.value;((d.v.game.state==ge.D2.draw||!R.r.settings.initiativeRequired)&&i>=0||i>0)&&i<100?this.setInitiative(i):e.target.value=(this.figure.initiative<10?"0":"")+this.figure.initiative}setInitiative(e){((d.v.game.state==ge.D2.draw||!R.r.settings.initiativeRequired)&&e>=0||e>0)&&e<100&&e!=this.figure.initiative&&(this.character?(d.v.stateManager.before("setInitiative","data.character."+this.figure.name,""+e),this.character.initiativeVisible=!0,this.character.longRest=!1,99==e&&(this.character.longRest=!0)):this.objective&&d.v.stateManager.before("setInitiative","data.objective."+this.figure.name,""+e),this.figure.initiative=e,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after())}longRestOff(e){this.character&&this.character.longRest&&(d.v.stateManager.before("characterLongRestOff","data.character."+this.character.name),this.character.longRest=!1,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after(),e.preventDefault())}open(e){this.dialog.open(zO,{panelClass:"dialog",data:this.figure,positionStrategy:this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions((0,he.sm)())})}tabindex(){return d.v.game.figures.filter(e=>e instanceof oe.z&&!e.absent).indexOf(this.figure)}focusNext(e){}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV),t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-initiative"]],viewQuery:function(e,i){if(1&e&&t.Gf(O9,5),2&e){let s;t.iGM(s=t.CRH())&&(i.initiativeInput=s.first)}},inputs:{figure:"figure"},decls:6,vars:13,consts:[[1,"initiative",3,"ngClass","ghs-label","ghs-label-attribute"],["src","./assets/images/initiative.svg",1,"ghs-svg",3,"click"],["type","number","max","99","maxlength","2",3,"ngClass","value","min","id","change","focus"],["initativeInput",""],[4,"ngIf"],["class","ghs-svg long-rest","src","./assets/images/long-rest.svg",3,"ghs-label","ghs-label-attribute","click",4,"ngIf"],["src","./assets/images/long-rest.svg",1,"ghs-svg","long-rest",3,"ghs-label","ghs-label-attribute","click"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"div",0)(1,"img",1),t.NdJ("click",function(m){return i.open(m)}),t.qZA(),t.TgZ(2,"input",2,3),t.NdJ("change",function(m){return i.updateInitiative(m)})("focus",function(){t.CHM(s);const m=t.MAs(3);return t.KtG(m.select())}),t.qZA(),t.YNc(4,P9,2,0,"span",4),t.YNc(5,y9,1,2,"img",5),t.qZA()}2&e&&(t.Q6J("ngClass",t.VKq(9,b9,i.figure.initiative<=0&&(!i.settingsManager.settings.initiativeRequired||i.character&&i.character.exhausted||i.objective&&i.objective.exhausted)))("ghs-label","game.figure.setInitiative")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngClass",t.VKq(11,x9,i.figure.initiative>0&&i.initiativeHidden()))("value",i.figure.initiative>0&&(i.figure.initiative<10&&i.figure.initiative>0?"0"+i.figure.initiative:i.figure.initiative)||"")("min",i.gameManager.game.state==i.GameState.draw?0:1)("id","initiative-input-"+i.tabindex()),t.xp6(2),t.Q6J("ngIf",i.figure.initiative>0&&i.initiativeHidden()),t.xp6(1),t.Q6J("ngIf",i.character&&!i.initiativeHidden()&&i.character.longRest))},dependencies:[x.mk,x.O5,ie],styles:[".initiative[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;flex-direction:column;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);transition:width .5s ease-in-out;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.initiative[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;width:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.initiative[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.initiative[_ngcontent-%COMP%] img.long-rest[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));position:absolute;bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer;text-align:center;border:none;background:none;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * -.7 * var(--ghs-text-factor));padding:0;font-family:var(--ghs-font-title);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));-moz-appearance:textfield}.initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:active, .initiative[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:hover{border:none;outline:none!important}.initiative[_ngcontent-%COMP%] input.hidden[_ngcontent-%COMP%]{display:none}.initiative.empty[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.initiative.empty[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .initiative.empty[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden;opacity:0;transition:opacity .5s ease-in-out}.initiative.empty[_ngcontent-%COMP%]:hover{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.initiative.empty[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%], .initiative.empty[_ngcontent-%COMP%]:hover input[_ngcontent-%COMP%]{visibility:visible;opacity:1}"]})),a})();function w9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openShop())}),t._UZ(1,"img",11)(2,"span",12),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/items/item-back-fh.png":"./assets/images/items/item-back.png",t.LSH),t.xp6(1),t.Q6J("ghs-label","game.items.character.empty")}}const k9=function(o){return{spent:o}};function T9(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",13),t._UZ(1,"ghs-character-item",14),t.TgZ(2,"a",15),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.openItemDialog(s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(4,k9,!e.setup&&e.countFlag(n,e.ItemFlags.spent))),t.xp6(1),t.Q6J("character",e.character)("item",n)("setup",e.setup)}}const Z9=function(o,a){return{active:o,disabled:a}},A9=function(o){return{active:o}},ST=function(o){return{disabled:o}};let S9=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"setup",!1),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"ItemFlags",Ni.CT),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.setup=d.v.game.state==ge.D2.draw&&d.v.roundManager.firstRound,this.items=this.character.progress.items.map(e=>d.v.itemManager.getItem(+e.name,e.edition,!0)).filter(e=>e&&(this.setup||!R.r.settings.characterItemsPermanentEquipped||this.equipped(e))).map(e=>e).sort((e,i)=>{if(!R.r.settings.characterItemsPermanentSorted)return 0;if(!this.setup){if(this.equipped(e)&&!this.equipped(i))return-1;if(this.equipped(i)&&!this.equipped(e)||this.countFlag(e,Ni.CT.consumed)&&!this.countFlag(i,Ni.CT.consumed))return 1;if(this.countFlag(i,Ni.CT.consumed)&&!this.countFlag(e,Ni.CT.consumed))return-1}return e.slot&&!i.slot?-1:i.slot&&!e.slot?1:e.slot&&i.slot?Object.values(Ni.SE).indexOf(e.slot)-Object.values(Ni.SE).indexOf(i.slot):0})}equipped(e){return this.character.progress.equippedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}countFlag(e,i){const s=this.equipped(e);return s&&s.tags&&s.tags.filter(l=>l==i).length||0}toggleEquipped(){R.r.settings.characterItemsPermanentEquipped=!R.r.settings.characterItemsPermanentEquipped,R.r.storeSettings()}toggleSorted(){R.r.settings.characterItemsPermanentSorted=!R.r.settings.characterItemsPermanentSorted,R.r.storeSettings()}zoom(e){R.r.settings.characterItemsPermanentZoom+=e,R.r.settings.characterItemsPermanentZoom<.5?R.r.settings.characterItemsPermanentZoom=.5:R.r.settings.characterItemsPermanentZoom>1.5&&(R.r.settings.characterItemsPermanentZoom=1.5),R.r.storeSettings(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500)}resetZoom(){R.r.settings.characterItemsPermanentZoom=1,R.r.storeSettings(),R.r.settings.disableAnimations||setTimeout(()=>{d.v.uiChange.emit()},500)}openShop(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character,affordable:!0}})}openItemDialog(e){this.dialog.open(gg,{panelClass:["fullscreen-panel"],data:{item:e,character:this.character,setup:this.setup}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-item-list"]],inputs:{character:"character"},decls:12,vars:23,consts:[[1,"item-list"],["class","empty",3,"click",4,"ngIf"],["class","item-container",3,"ngClass",4,"ngFor","ngForOf"],[1,"menu"],[3,"ngClass","ghs-tooltip","overlayX","overlayY","click"],["src","./assets/images/check.svg",1,"toggle","ghs-svg"],["src","./assets/images/sort.svg",1,"toggle","ghs-svg"],["ghs-pointer-input","",3,"ngClass","singleClick","doubleClick"],["src","./assets/images/zoom-in.svg",1,"ghs-svg"],["src","./assets/images/zoom-out.svg",1,"ghs-svg"],[1,"empty",3,"click"],[3,"src"],[1,"text",3,"ghs-label"],[1,"item-container",3,"ngClass"],[3,"character","item","setup"],[1,"open-dialog",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,w9,3,2,"div",1),t.YNc(2,T9,3,6,"div",2),t.TgZ(3,"div",3)(4,"a",4),t.NdJ("click",function(){return i.toggleEquipped()}),t._UZ(5,"img",5),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return i.toggleSorted()}),t._UZ(7,"img",6),t.qZA(),t.TgZ(8,"a",7),t.NdJ("singleClick",function(){return i.zoom(.075)})("doubleClick",function(){return i.resetZoom()}),t._UZ(9,"img",8),t.qZA(),t.TgZ(10,"a",7),t.NdJ("singleClick",function(){return i.zoom(-.075)})("doubleClick",function(){return i.resetZoom()}),t._UZ(11,"img",9),t.qZA()()()),2&e&&(t.Udp("--ghs-item-list-zoom",i.settingsManager.settings.characterItemsPermanentZoom),t.xp6(1),t.Q6J("ngIf",0==i.items.length),t.xp6(1),t.Q6J("ngForOf",i.items),t.xp6(2),t.Q6J("ngClass",t.WLB(14,Z9,i.settingsManager.settings.characterItemsPermanentEquipped,i.setup))("ghs-tooltip","game.items.character.toggleEquipped")("overlayX","end")("overlayY","bottom"),t.xp6(2),t.Q6J("ngClass",t.VKq(17,A9,i.settingsManager.settings.characterItemsPermanentSorted))("ghs-tooltip","game.items.character.toggleSorted")("overlayX","end")("overlayY","bottom"),t.xp6(2),t.Q6J("ngClass",t.VKq(19,ST,i.settingsManager.settings.characterItemsPermanentZoom>=1.5)),t.xp6(2),t.Q6J("ngClass",t.VKq(21,ST,i.settingsManager.settings.characterItemsPermanentZoom<=.5)))},dependencies:[x.mk,x.sg,x.O5,kw,ie,An,Ba],styles:[".item-list[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;flex-wrap:wrap;padding-right:calc(var(--ghs-unit) * 4.5);--ghs-item-list-zoom: 1;min-height:calc(var(--ghs-unit) * 18 * var(--ghs-item-list-zoom))}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;margin:calc(var(--ghs-unit) * .5);margin-bottom:0;width:calc(var(--ghs-unit) * 12 * var(--ghs-item-list-zoom));height:calc(var(--ghs-unit) * 18 * var(--ghs-item-list-zoom));border-radius:calc(var(--ghs-unit) * 1 * var(--ghs-item-list-zoom));overflow:hidden}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;filter:grayscale(.7)}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center;font-size:calc(var(--ghs-unit) * 2.6 * var(--ghs-item-list-zoom));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.item-list[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]:hover{opacity:.7}.item-list[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5);margin-bottom:0;width:calc(var(--ghs-unit) * 12 * var(--ghs-item-list-zoom));height:calc(var(--ghs-unit) * 18 * var(--ghs-item-list-zoom));transition:all .5s ease-in-out}.item-list[_ngcontent-%COMP%] .item-container.spent[_ngcontent-%COMP%]{transform:rotate(90deg);transform-origin:center center;margin:0 calc(var(--ghs-unit) * 3 * var(--ghs-item-list-zoom));margin-bottom:0}.item-list[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] ghs-character-item[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.item-list[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .open-dialog[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 12 * var(--ghs-item-list-zoom));height:calc(var(--ghs-unit) * 8 * var(--ghs-item-list-zoom))}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:0;z-index:2;display:flex;flex-direction:column;flex-wrap:wrap-reverse;justify-content:flex-start;align-items:flex-end;margin-top:calc(var(--ghs-unit) * 1)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;margin:0 calc(var(--ghs-unit) * 1);color:var(--ghs-color-darkgray)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.5);height:calc(var(--ghs-unit) * 2.5);filter:var(--ghs-filter-darkgray)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg.toggle[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-outline)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{filter:var(--ghs-filter-green) var(--ghs-filter-outline)}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.7}.item-list[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)}.item-list[_ngcontent-%COMP%] .zoom-bar[_ngcontent-%COMP%]{z-index:1;position:absolute;display:block;height:calc(var(--ghs-unit) * 8 * var(--ghs-item-list-zoom));top:0;left:0;right:0}"]})),a})();function E9(o,a){if(1&o&&(t.TgZ(0,"span",19),t._UZ(1,"span",20),t._uU(2,"\xa0"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Akn(n.style),t.Q6J("ghs-label","game.action.summon")}}const ET=function(o){return{"text-white":o}};function D9(o,a){if(1&o&&(t.TgZ(0,"span",21),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,ET,!n.right)),t.xp6(1),t.Oqu(n.summon.title)}}function I9(o,a){if(1&o&&t._UZ(0,"span",22),2&o){const n=t.oxw(2);t.Akn(n.style),t.Q6J("ghs-label","data.summon."+n.summon.name)("ngClass",t.VKq(4,ET,!n.right))}}function N9(o,a){if(1&o&&(t.TgZ(0,"span",23),t._UZ(1,"img",24),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("src","./assets/images"+(n.fhStyle?"/fh":"")+"/action/fly.svg",t.LSH)}}function J9(o,a){if(1&o&&t._UZ(0,"ghs-action",25),2&o){const n=t.oxw(2);t.Q6J("action",n.summon.action)}}function U9(o,a){if(1&o&&t._UZ(0,"span",20),2&o){const n=t.oxw(2);t.Akn(n.style),t.Q6J("ghs-label",""+n.summon.attack)}}function L9(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Q9(o,a){if(1&o&&(t.TgZ(0,"span",26),t._UZ(1,"ghs-action",25),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("action",n.summon.additionalAction)}}const R9=function(o,a,n,e){return{action:o,additional:a,item:n,fh:e}};function F9(o,a){if(1&o&&(t.TgZ(0,"div",1)(1,"span",2),t.YNc(2,E9,3,3,"span",3),t.YNc(3,D9,2,4,"span",4),t.YNc(4,I9,1,6,"span",5),t.YNc(5,N9,2,1,"span",6),t.qZA(),t.TgZ(6,"div",7)(7,"span",8),t._UZ(8,"img",9),t.TgZ(9,"span"),t._uU(10,":"),t.qZA(),t._UZ(11,"span",10),t.qZA(),t.TgZ(12,"span",11),t._UZ(13,"img",9),t.TgZ(14,"span"),t._uU(15,":"),t.qZA(),t._UZ(16,"span",10),t.qZA(),t.TgZ(17,"span",12),t.YNc(18,J9,1,1,"ghs-action",13),t.qZA(),t.TgZ(19,"span",14),t._UZ(20,"img",9),t.TgZ(21,"span"),t._uU(22,":"),t.qZA(),t.YNc(23,U9,1,3,"span",15),t.YNc(24,L9,2,0,"span",16),t.qZA(),t.TgZ(25,"span",17),t._UZ(26,"img",9),t.TgZ(27,"span"),t._uU(28,":"),t.qZA(),t._UZ(29,"span",10),t.qZA(),t.YNc(30,Q9,2,1,"span",18),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.l5B(19,R9,n.summon.action,n.summon.additionalAction||n.additional,n.item,n.fhStyle)),t.xp6(2),t.Q6J("ngIf",n.action),t.xp6(1),t.Q6J("ngIf",n.summon.title),t.xp6(1),t.Q6J("ngIf",!n.summon.title),t.xp6(1),t.Q6J("ngIf",n.summon.flying),t.xp6(3),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/heal.svg",t.LSH),t.xp6(3),t.Q6J("value-calc",n.summon.maxHealth)("empty",!0),t.xp6(2),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/move.svg",t.LSH),t.xp6(3),t.Q6J("value-calc",n.summon.movement)("empty",!0),t.xp6(2),t.Q6J("ngIf",n.summon.action),t.xp6(2),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/attack.svg",t.LSH),t.xp6(3),t.Q6J("ngIf",0!=n.summon.attack),t.xp6(1),t.Q6J("ngIf",0==n.summon.attack),t.xp6(2),t.Q6J("src","./assets/images/"+(n.fhStyle?"fh/":"")+"action/range.svg",t.LSH),t.xp6(3),t.Q6J("value-calc",n.summon.range)("empty",!0),t.xp6(1),t.Q6J("ngIf",n.summon.additionalAction)}}let DT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"summon",void 0),(0,_.Z)(this,"action",!1),(0,_.Z)(this,"additional",!1),(0,_.Z)(this,"item",!1),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"fhStyle",!1),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"uiChangeSubscription",void 0)}ngOnInit(){this.fhStyle=R.r.settings.fhStyle&&!this.style||"fh"==this.style,this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.fhStyle=R.r.settings.fhStyle&&!this.style||"fh"==this.style}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-summon-sheet"]],inputs:{summon:"summon",action:"action",additional:"additional",item:"item",right:"right",style:"style"},decls:1,vars:1,consts:[["class","summon-container",3,"ngClass",4,"ngIf"],[1,"summon-container",3,"ngClass"],[1,"name"],["class","summon-label",4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"ghs-label","style","ngClass",4,"ngIf"],["class","flying",4,"ngIf"],[1,"grid"],[1,"item","health"],[1,"ghs-svg",3,"src"],[3,"value-calc","empty"],[1,"item","move"],[1,"action"],[3,"action",4,"ngIf"],[1,"item","attack"],[3,"ghs-label","style",4,"ngIf"],[4,"ngIf"],[1,"item","range"],["class","additionalAction",4,"ngIf"],[1,"summon-label"],[3,"ghs-label"],[3,"ngClass"],[3,"ghs-label","ngClass"],[1,"flying"],[3,"src"],[3,"action"],[1,"additionalAction"]],template:function(e,i){1&e&&t.YNc(0,F9,31,24,"div",0),2&e&&t.Q6J("ngIf",i.summon)},dependencies:[x.mk,x.O5,Gr,ie,ng],styles:[".summon-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-top:38%;background-image:url(character-ability-summon1.6652de7b772cb310.png);background-size:contain;background-repeat:no-repeat;text-shadow:none}.summon-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:1.3em;position:absolute;top:0;left:10%;width:90%;height:34%;display:flex;justify-content:center;align-items:center}.summon-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:auto;margin-left:calc(var(--ghs-unit) * .5)}.summon-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .flying[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.summon-container[_ngcontent-%COMP%] .summon-label[_ngcontent-%COMP%]{font-family:var(--ghs-font-text)}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:45% 25% 30%;grid-template-rows:50% 50%;position:absolute;top:34%;left:0;width:100%;height:60%}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr .5fr 1.5fr;justify-content:flex-start;align-items:center}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(1){justify-self:end}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(2){justify-self:center}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(3){justify-self:start}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .health[_ngcontent-%COMP%], .summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .attack[_ngcontent-%COMP%]{padding-left:3em}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%], .summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .additionalAction[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{grid-row:2 span}.summon-container[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:.9em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.summon-container.additional[_ngcontent-%COMP%]{background-image:url(character-ability-summon2.01e34f17184b79db.png)}.summon-container.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{grid-row:1 span}.summon-container.item[_ngcontent-%COMP%]{background-image:url(summon-item.1142452805cc7730.png)}.summon-container.item[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:1em}.summon-container.item[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{grid-template-columns:65% 25% 0%}.summon-container.item[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{grid-row:1 span}.summon-container.fh[_ngcontent-%COMP%]{background-image:url(character-ability-summon1.087db978155a9f1c.png)}.summon-container.fh[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{top:38%;grid-template-columns:60% 40% 0%}.summon-container.fh[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .health[_ngcontent-%COMP%], .summon-container.fh[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .attack[_ngcontent-%COMP%]{padding-left:5em}.summon-container.fh.action[_ngcontent-%COMP%]{background-image:url(character-ability-summon2.52aae50ce5366dbc.png)}.summon-container.fh.action[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{grid-template-columns:55% 20% 25%}.summon-container.fh.additional[_ngcontent-%COMP%]{background-image:url(character-ability-summon3.137fcec726831188.png)}.summon-container.fh.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{grid-template-columns:45% 20% 35%}.summon-container.fh.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .health[_ngcontent-%COMP%], .summon-container.fh.additional[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .attack[_ngcontent-%COMP%]{padding-left:4.5em}"]})),a})(),im=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"el",void 0),(0,_.Z)(this,"entityAnimation",void 0),this.el=e}ngOnChanges(e){if(e&&e.entityAnimation){const i=e.entityAnimation;i.currentValue!=i.previousValue&&(i.currentValue?(this.el.nativeElement.classList.add("entity-dead"),setTimeout(()=>{this.el.nativeElement.classList.remove("entity-dead")},R.r.settings.disableAnimations?0:1500)):i.currentValue||(this.el.nativeElement.classList.add("entity-alive"),setTimeout(()=>{this.el.nativeElement.classList.remove("entity-alive")},R.r.settings.disableAnimations?0:1500)))}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","entityAnimation",""]],inputs:{entityAnimation:"entityAnimation"},features:[t.TTD]})),a})();const q9=["standee"];function H9(o,a){if(1&o&&t._UZ(0,"ghs-summon-sheet",20),2&o){const n=t.oxw();t.Q6J("summon",n.summon)}}function j9(o,a){if(1&o&&(t.TgZ(0,"div",21),t._UZ(1,"div",22),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Udp("background-image",n.summon.thumbnailUrl?"url("+n.summon.thumbnailUrl+")":"url(./assets/images/summons/thumbnail/"+n.summon.thumbnail+".png)")}}function B9(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function z9(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.summon.number)}}function G9(o,a){if(1&o&&(t.TgZ(0,"span",23),t._UZ(1,"img",8),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function V9(o,a){if(1&o&&t._UZ(0,"img",30),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw();t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const Y9=function(){return[]};function K9(o,a){if(1&o&&(t.ynx(0),t.YNc(1,V9,1,3,"img",29),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,Y9),n.value-1))}}function $9(o,a){if(1&o&&(t.TgZ(0,"span",31),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function W9(o,a){if(1&o&&t._UZ(0,"span",32),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function X9(o,a){if(1&o&&t._UZ(0,"span",33),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}const tB=function(o,a){return{expired:o,center:a}};function eB(o,a){if(1&o&&(t.TgZ(0,"span",24)(1,"span",25),t._UZ(2,"img",8),t.YNc(3,K9,3,5,"ng-container",10),t.YNc(4,$9,2,3,"span",26),t.YNc(5,W9,1,2,"span",27),t.YNc(6,X9,1,2,"span",28),t.qZA()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.WLB(8,tB,n.expired,i.activeConditions.length%2==1&&i.activeConditions.length==e+1)),t.xp6(2),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.summon.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}const nB=function(o,a,n,e){return{dead:o,off:a,active:n,fh:e}},iB=function(o,a,n){return{active:o,new:a,center:n}};let IT=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"standee",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"summon",void 0),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"health",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"attack",0),(0,_.Z)(this,"movement",0),(0,_.Z)(this,"range",0),(0,_.Z)(this,"levelDialog",!1),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.overlay=s}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.summon.init&&setTimeout(()=>{this.open()},R.r.settings.disableAnimations?0:500),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.activeConditions=d.v.entityManager.activeConditions(this.summon,!0),this.summon.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))})}dragHpMove(e){this.health=e,this.summon.health+this.health>this.summon.maxHealth&&(this.health=(0,ae.j9)(this.summon.maxHealth)-this.summon.health)}dragHpEnd(e){0!=this.health&&(d.v.stateManager.before("changeSummonHp","data.character."+this.character.name,"data.summon."+this.summon.name,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.summon,this.character,this.health),(this.summon.health<=0||this.summon.dead&&this.health>=0&&this.summon.health>0)&&this.dead(),this.health=0,d.v.stateManager.after())}dragHpCancel(e){this.health=0}dead(){d.v.stateManager.before("summonDead","data.character."+this.character.name,"data.summon."+this.summon.name),this.summon.dead=!0,(d.v.game.state==ge.D2.draw||0==this.summon.entityConditions.length||this.summon.entityConditions.every(e=>-1==e.types.indexOf(re.CP.turn)&&-1==e.types.indexOf(re.CP.apply)))&&setTimeout(()=>{d.v.characterManager.removeSummon(this.character,this.summon),d.v.stateManager.after()},R.r.settings.disableAnimations?0:1500),d.v.stateManager.after()}singleClick(){this.summon.active?this.toggleActive():this.open()}doubleClick(){this.summon.active?this.open():this.toggleActive()}open(){this.dialog.open($c,{panelClass:"dialog",data:{entity:this.summon,figure:this.character},positionStrategy:this.overlay.position().flexibleConnectedTo(this.standee).withPositions((0,he.sm)())}).closed.subscribe({next:()=>{this.summon.dead&&(this.summon.active&&R.r.settings.activeSummons&&this.toggleActive(),this.element.nativeElement.classList.add("dead"))}})}toggleActive(){if(this.summon.active)d.v.stateManager.before("summonInactive","data.character."+this.character.name,"data.summon."+this.summon.name),R.r.settings.activeSummons&&this.character.active?d.v.roundManager.toggleFigure(this.character):this.summon.active=!1,d.v.stateManager.after();else{d.v.stateManager.before("summonActive","data.character."+this.character.name,"data.summon."+this.summon.name);const e=this.character.summons.find(i=>i.active);if(R.r.settings.activeSummons&&this.character.active&&d.v.entityManager.isAlive(this.summon,!0)&&(!e||this.character.summons.indexOf(e)i.active=!1),this.summon.active=!0;d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-summon-entity"]],viewQuery:function(e,i){if(1&e&&t.Gf(q9,5),2&e){let s;t.iGM(s=t.CRH())&&(i.standee=s.first)}},inputs:{character:"character",summon:"summon"},decls:23,vars:31,consts:[[1,"summon-border",3,"ngClass","entityAnimation"],[1,"summon"],[1,"standee"],["standee",""],[1,"sheet"],[3,"summon",4,"ngIf"],["class","background-image-container",4,"ngIf"],[1,"image",3,"ngClass"],[3,"src"],[1,"summon-number"],[4,"ngIf"],[1,"health"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"markers"],["class","marker",4,"ngFor","ngForOf"],[3,"entity","figure"],[1,"conditions"],["class","condition-container",3,"ngClass",4,"ngFor","ngForOf"],[3,"entity","diff"],[1,"drag-hp",3,"relative","screenWidth","singleClick","doubleClick","dragMove","dragEnd","dragCancel"],[3,"summon"],[1,"background-image-container"],[1,"background-image"],[1,"marker"],[1,"condition-container",3,"ngClass"],[1,"condition"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"div",4),t.YNc(5,H9,1,1,"ghs-summon-sheet",5),t.YNc(6,j9,2,2,"div",6),t.qZA(),t.TgZ(7,"span",7),t._UZ(8,"img",8),t.TgZ(9,"span",9),t.YNc(10,B9,2,0,"span",10),t.YNc(11,z9,2,1,"span",10),t.qZA()(),t.TgZ(12,"span",11),t._uU(13),t.ALo(14,"ghsMinZero"),t._UZ(15,"span",12),t.qZA()(),t.TgZ(16,"div",13),t.YNc(17,G9,2,1,"span",14),t.qZA(),t._UZ(18,"ghs-highlight-conditions",15),t.TgZ(19,"div",16),t.YNc(20,eB,7,11,"span",17),t.qZA(),t._UZ(21,"ghs-healthbar",18),t.qZA(),t.TgZ(22,"ghs-pointer-input",19),t.NdJ("singleClick",function(){return i.open()})("doubleClick",function(){return i.toggleActive()})("dragMove",function(l){return i.dragHpMove(l)})("dragEnd",function(l){return i.dragHpEnd(l)})("dragCancel",function(l){return i.dragHpCancel(l)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.l5B(22,nB,i.summon.dead,i.character.off,i.summon.active,i.settingsManager.settings.fhStyle))("entityAnimation",i.summon.dead),t.xp6(5),t.Q6J("ngIf",i.summon.active),t.xp6(1),t.Q6J("ngIf",!i.settingsManager.settings.disableArtwork&&(i.summon.thumbnail&&!i.summon.noThumbnail||i.summon.thumbnailUrl)),t.xp6(1),t.Q6J("ngClass",t.kEZ(27,iB,i.summon.state==i.SummonState.true,i.summon.state==i.SummonState.new,i.summon.entityConditions.length%2==0)),t.xp6(1),t.MGl("src","./assets/images/summons/",i.summon.color,".png",t.LSH),t.xp6(2),t.Q6J("ngIf",0==i.summon.number),t.xp6(1),t.Q6J("ngIf",i.summon.number>0),t.xp6(2),t.hij("",t.lcZ(14,20,i.summon.health+i.health)," "),t.xp6(2),t.Q6J("value-sign",i.health)("hideEmpty",!0)("container",!0),t.xp6(2),t.Q6J("ngForOf",i.summon.markers),t.xp6(1),t.Q6J("entity",i.summon)("figure",i.character),t.xp6(2),t.Q6J("ngForOf",i.activeConditions),t.xp6(1),t.Q6J("entity",i.summon)("diff",i.health),t.xp6(1),t.Q6J("relative",!0)("screenWidth",!0))},dependencies:[x.mk,x.sg,x.O5,s_,GO,DT,im,An,aa,Ii,sg],styles:['.summon-border[_ngcontent-%COMP%]{position:relative;height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:calc(var(--ghs-unit) * 1.4 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * 1.8 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * .7)}.summon-border[_ngcontent-%COMP%]:not(.dead){opacity:1;transform:translate(0)}.summon-border.dead[_ngcontent-%COMP%]{opacity:0;max-width:0;transform:translateY(100%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{position:relative;display:flex;cursor:pointer;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor));text-align:center;color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:100%;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));transition:height .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) solid var(--ghs-color-black);border-bottom-width:calc(var(--ghs-unit) * .35 * var(--ghs-text-factor));border-top-left-radius:25%;border-top-right-radius:25%;filter:var(--ghs-filter-outline);transition:width .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;border-top-left-radius:25%;border-top-right-radius:25%;overflow:hidden;z-index:0;transition:height .5s ease-out,width .5s ease-out,top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -1.3 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * -.8 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor));height:150%;background-size:100% AUTO;background-repeat:no-repeat;filter:brightness(70%);transition:height .5s ease-out,width .5s ease-out,top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:calc(var(--ghs-unit) * 5.5 * var(--ghs-text-factor));transition:height .5s ease-out,width .5s ease-out;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));justify-content:center;align-items:center;font-family:ghs-normal;flex-shrink:0;z-index:1}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * .5);left:0;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);transition:top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image.new[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 4);height:calc(var(--ghs-unit) * 4);background-image:url(minus.97c98a810771fceb.svg);background-size:cover;z-index:2}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .summon-number[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:calc(var(--ghs-unit) * -.1);height:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 2);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-top-left-radius:calc(var(--ghs-unit) * 4);border-bottom-left-radius:calc(var(--ghs-unit) * 4);z-index:3;opacity:.9}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));position:absolute;top:calc(var(--ghs-unit) * 1.2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));transition:top .5s ease-out,left .5s ease-out}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]:before{content:" ";position:absolute;left:50%;top:calc(var(--ghs-unit) * -.9 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));background-image:url(health.8d6a842a197d29d3.svg);background-size:contain;background-repeat:no-repeat;transform:translate(-50%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));bottom:calc(var(--ghs-unit) * -3 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));z-index:1000}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;bottom:0;width:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;height:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.expired[_ngcontent-%COMP%]{opacity:.6}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));overflow:visible}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));margin:0}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.2 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:48%;left:calc(var(--ghs-unit) * 1.3 * var(--ghs-text-factor));text-shadow:none;transform:translate(-50%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform-origin:center center;z-index:999}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .condition[_ngcontent-%COMP%]:hover, .summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(-25%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .condition[_ngcontent-%COMP%]:hover, .summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(25%)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%]{grid-row:span 2}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{transform:scale(2)}.summon-border[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * .2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * .4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 8.2 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * .75 * var(--ghs-text-factor));z-index:0;border-radius:15%;overflow:hidden;transition:width .5s ease-out}.summon-border[_ngcontent-%COMP%] ghs-pointer-input.drag-hp[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor));height:100%;z-index:4}.summon-border.active[_ngcontent-%COMP%]{z-index:15}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 12 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{top:5%;left:0;height:75%;width:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{top:8%;left:-35%;width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] ghs-summon-sheet[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * -1);left:calc(var(--ghs-unit) * -2)}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.5 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 1)}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{left:100%;bottom:calc(var(--ghs-unit) * .6);z-index:1000}.summon-border.active[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * .4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 29.2 * var(--ghs-text-factor))}.summon-border.active[_ngcontent-%COMP%] ghs-pointer-input.drag-hp[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor))}.summon-border.active.fh[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{top:25%;height:85%;width:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor))}.summon-border.active.fh[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{top:0;left:-10%;width:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor))}.summon-border.active.fh[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 2)}.summon-border.off[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{opacity:.7}']})),a})();function oB(o,a){1&o&&(t.TgZ(0,"a"),t._UZ(1,"img",2),t.qZA())}function aB(o,a){if(1&o&&(t.TgZ(0,"div",3)(1,"span",4),t._UZ(2,"span",5),t.qZA(),t._UZ(3,"span",6),t.qZA()),2&o){const n=a.$implicit;t.xp6(2),t.Q6J("ghs-label","game.figure.error."+n.type),t.xp6(1),t.Q6J("ghs-label","game.figure.error."+n.type+".hint")("ghs-label-args",n.args)("ghs-label-args-replace",!1)}}const sB=function(){return[]};let NT=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"figure",void 0),this.dialog=e}ngOnInit(){this.figure.errors||(this.figure.errors=[])}open(e){this.dialog.open(rB,{panelClass:"dialog",data:this.figure})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-figure-errors"]],inputs:{figure:"figure"},decls:2,vars:3,consts:[[1,"button",3,"click"],[4,"ngIf"],["src","./assets/images/warning.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(l){return i.open(l)}),t.YNc(1,oB,2,0,"a",1),t.qZA()),2&e&&(t.Udp("display",i.figure.errors&&i.figure.errors.length>0?"":"none"),t.xp6(1),t.Q6J("ngIf",i.figure.errors&&i.figure.errors.length>0))},dependencies:[x.O5],styles:[".button[_ngcontent-%COMP%]{cursor:pointer;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}.button[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}"]})),a})(),rB=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"figure",void 0),this.figure=e}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-figure-errors-dialog"]],decls:3,vars:2,consts:[[1,"figure-errors-dialog"],[1,"figure-errors"],["class","figure-error",4,"ngFor","ngForOf"],[1,"figure-error"],[1,"error"],[3,"ghs-label"],[1,"hint",3,"ghs-label","ghs-label-args","ghs-label-args-replace"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,aB,4,4,"div",2),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngForOf",i.figure.errors||t.DdM(1,sB)))},dependencies:[x.sg,ie],styles:[".figure-errors[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center}.figure-errors[_ngcontent-%COMP%] .figure-error[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) 0}.figure-errors[_ngcontent-%COMP%] .figure-error[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-red)}.figure-errors[_ngcontent-%COMP%] .figure-error[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-white)}"]})),a})();const cB=["charactertitle"],lB=["characterName"],gB=["summonButton"];function dB(o,a){if(1&o&&t._UZ(0,"ghs-summon-entity",22),2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("character",e.character)("summon",n)}}function hB(o,a){if(1&o&&(t.TgZ(0,"div",20),t.YNc(1,dB,1,2,"ghs-summon-entity",21),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.character.summons)}}const uB=function(o,a){return{empty:o,off:a}},_B=function(o,a){return{empty:o,disabled:a}};function pB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15),t._UZ(1,"span",6),t.TgZ(2,"span",16),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntitiesMenu(i))}),t._UZ(3,"img",17)(4,"img",18),t.qZA(),t.YNc(5,hB,2,1,"div",19),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(5,uB,0==n.summonCount,n.character.off||n.character.exhausted||n.character.health<=0)),t.xp6(2),t.Q6J("ngClass",t.WLB(8,_B,0==n.summonCount,n.summonCount<2))("entityAnimation",0==n.summonCount),t.xp6(1),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(2),t.Q6J("ngIf",n.summonCount)}}const JT=function(o){return{active:o}};function fB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",28)(1,"div",29)(2,"ghs-attackmodifier-deck",30),t.NdJ("before",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.beforeAttackModifierDeck(i))})("after",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.afterAttackModifierDeck(i))}),t.qZA()(),t.TgZ(3,"div",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleAttackModifierDeckVisible())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,JT,n.character.attackModifierDeckVisible)),t.xp6(2),t.Q6J("character",n.character)}}function mB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",36),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.openLootDeckDialog())}),t._UZ(1,"ghs-loot",37),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("loot",e.gameManager.game.lootDeck.cards[n])("flipped",!0)("disableFlip",!0)}}function vB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",32)(1,"div",29)(2,"div",33),t.YNc(3,mB,2,3,"div",34),t.qZA()(),t.TgZ(4,"div",35),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleLootCardsVisible())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",n.character.lootCards)}}const CB=function(o){return{"outer-denied":o}};function MB(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"ghs-pointer-input",23),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.gameManager.stateManager.characterPermissions[s.character.name+"|"+s.character.edition]&&s.dragInitiativeMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.gameManager.stateManager.characterPermissions[s.character.name+"|"+s.character.edition]&&s.dragInitiativeEnd(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.toggleFigure(i))})("doubleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.gameManager.stateManager.characterPermissions[s.character.name+"|"+s.character.edition]&&s.initiativeDoubleClick(i))}),t.qZA(),t._UZ(2,"ghs-character-initiative",24)(3,"ghs-highlight-conditions",25),t.YNc(4,fB,4,4,"div",26),t.YNc(5,vB,5,1,"div",27),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(6,CB,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.permissions.round&&!n.gameManager.stateManager.characterPermissions[n.character.name+"|"+n.character.edition])),t.xp6(1),t.Q6J("figure",n.character),t.xp6(1),t.Q6J("entity",n.character)("figure",n.character),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterAttackModifierDeck&&!n.settingsManager.settings.characterAttackModifierDeckPermanent),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.lootDeck&&n.character.lootCardsVisible)}}function OB(o,a){if(1&o&&t._UZ(0,"ghs-character-initiative",12),2&o){const n=t.oxw(2);t.Q6J("figure",n.character)}}function PB(o,a){1&o&&t._UZ(0,"img",60)}function yB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",61),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragTokenMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragTokenEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.nextIdentity(i))}),t._uU(1,">"),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","%data.characterToken."+n.character.name+"%")("relative",!0)("screenWidth",!0)}}function bB(o,a){if(1&o&&(t.TgZ(0,"span",62)(1,"span"),t._uU(2),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.hij("x",n.character.token+(n.character.primaryToken<0?n.token:0),"")}}function xB(o,a){if(1&o&&t._UZ(0,"span",64),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("ghs-label","%data.characterToken."+e.character.name+"."+n+"%")}}function wB(o,a){if(1&o&&(t.TgZ(0,"span",62)(1,"span"),t._uU(2),t.qZA()()),2&o){const n=t.oxw().index,e=t.oxw(2);t.xp6(2),t.hij("x",e.character.tokenValues[n]+(e.character.primaryToken==n?e.token:0),"")}}function kB(o,a){if(1&o&&(t.ynx(0),t.YNc(1,xB,1,1,"span",63),t.YNc(2,wB,3,1,"span",50),t.BQk()),2&o){const n=a.index,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.character.tokenValues[n]+(e.character.primaryToken==n?e.token:0)>0),t.xp6(1),t.Q6J("ngIf",e.character.tokenValues[n]+(e.character.primaryToken==n?e.token:0)>1)}}function TB(o,a){if(1&o&&(t.TgZ(0,"span",65),t._UZ(1,"img",8),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function ZB(o,a){if(1&o&&t._UZ(0,"img",71),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw(2);t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const AB=function(){return[]};function SB(o,a){if(1&o&&(t.ynx(0),t.YNc(1,ZB,1,3,"img",70),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,AB),n.value-1))}}function EB(o,a){if(1&o&&(t.TgZ(0,"span",72),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function DB(o,a){if(1&o&&t._UZ(0,"span",73),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function IB(o,a){if(1&o&&t._UZ(0,"span",74),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}function NB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",66),t.NdJ("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.removeCondition(s))}),t._UZ(1,"img",8),t.YNc(2,SB,3,5,"ng-container",4),t.YNc(3,EB,2,3,"span",67),t.YNc(4,DB,1,2,"span",68),t.YNc(5,IB,1,2,"span",69),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.character.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}const JB=function(o){return{identities:o}};function UB(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(2,"div",39)(3,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(4,"span",40)(5,"span",41,42)(7,"span",43),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragTokenMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragTokenEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.nextIdentity(i))}),t._UZ(8,"img",44),t.qZA(),t.YNc(9,OB,1,1,"ghs-character-initiative",45),t.TgZ(10,"span",46),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t._uU(11),t.YNc(12,PB,1,0,"img",47),t.qZA()(),t.TgZ(13,"span",48),t.YNc(14,yB,2,3,"span",49),t.YNc(15,bB,3,1,"span",50),t.YNc(16,kB,3,2,"ng-container",51),t.qZA()(),t.TgZ(17,"div",52)(18,"div",53),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t._UZ(19,"img",54),t._uU(20),t.ALo(21,"ghsMinZero"),t._UZ(22,"span",55),t.qZA(),t.TgZ(23,"div",56),t.YNc(24,TB,2,1,"span",57),t.qZA(),t.TgZ(25,"div",58),t.YNc(26,NB,6,7,"span",59),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(7),t.Q6J("relative",!0)("screenWidth",!0),t.xp6(1),t.Q6J("ngClass",t.VKq(23,JB,n.settingsManager.settings.characterIdentities&&n.character.identities&&n.character.identities.length>1))("src",0!=n.character.identities.length&&n.settingsManager.settings.characterIdentities?n.gameManager.characterManager.characterIdentityIcon(n.character.name,n.character.identity):n.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",n.compact),t.xp6(2),t.hij(" ",n.characterTitle," "),t.xp6(1),t.Q6J("ngIf",n.character.exhausted),t.xp6(2),t.Q6J("ngIf",n.character.token+(n.character.primaryToken<0?n.token:0)>0),t.xp6(1),t.Q6J("ngIf",n.character.token+(n.character.primaryToken<0?n.token:0)>1),t.xp6(1),t.Q6J("ngForOf",n.character.tokens),t.xp6(2),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title")("relative",!0)("screenWidth",!0),t.xp6(2),t.AsE(" ",t.lcZ(21,21,n.character.health+n.health),"/",n.character.maxHealth," "),t.xp6(2),t.Q6J("value-sign",n.health)("hideEmpty",!0)("container",!0),t.xp6(2),t.Q6J("ngForOf",n.character.markers),t.xp6(2),t.Q6J("ngForOf",n.activeConditions)}}function LB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",78),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA()}}function QB(o,a){1&o&&t._UZ(0,"img",60)}function RB(o,a){if(1&o&&(t.ynx(0),t.YNc(1,LB,1,0,"div",75),t.TgZ(2,"div",76,42)(4,"span",77),t._UZ(5,"img",8),t.qZA(),t._uU(6),t.YNc(7,QB,1,0,"img",47),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.character.absent),t.xp6(4),t.Q6J("src",n.character.iconUrl,t.LSH),t.xp6(1),t.hij(" ",n.gameManager.characterManager.characterName(n.character,n.character.absent)," "),t.xp6(1),t.Q6J("ngIf",n.character.exhausted)}}const FB=function(o){return{disabled:o}};function qB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",93),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleLootCardsVisible())}),t._UZ(1,"img",94),t.TgZ(2,"span",95),t._uU(3),t.qZA()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,FB,n.character.lootCardsVisible)),t.xp6(3),t.Oqu(n.character.lootCards.length)}}function HB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",96),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.toggleAttackModifierDeckVisible())}),t._UZ(1,"img",97),t.qZA()}2&o&&t.Q6J("ghs-label","game.attackModifiers")("ghs-label-attribute","title")}const jB=function(o){return{drawing:o}};function BB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",98)(1,"ghs-attackmodifier-draw",99),t.NdJ("drawing",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.amAnimationDrawing=i)}),t.qZA()()}if(2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,jB,n.amAnimationDrawing)),t.xp6(1),t.Q6J("character",n.character)}}function zB(o,a){1&o&&t._UZ(0,"img",102)}function GB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",100),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openBattleGoals())}),t._UZ(1,"img",8),t.YNc(2,zB,1,0,"img",101),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.battleGoals")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/battlegoals/battle-goal-back-fh.png":"./assets/images/battlegoals/battle-goal-back.png",t.LSH),t.xp6(1),t.Q6J("ngIf",n.character.battleGoal&&n.character.battleGoals.length>0)}}function VB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",103),t.NdJ("singleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openItems())})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.openItems(!0))}),t._UZ(1,"img",8),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.items")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("src",n.settingsManager.settings.fhStyle?"./assets/images/fh/items/item-back-fh.png":"./assets/images/items/item-back.png",t.LSH)}}function YB(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",104),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragLootMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragLootEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.compact&&i.openCharacterSheet())}),t._uU(1),t._UZ(2,"img",105)(3,"span",55),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("ghs-label","game.loot")("ghs-label-attribute","title")("relative",!0)("screenWidth",!0),t.xp6(1),t.hij(" ",n.character.loot+n.loot," "),t.xp6(2),t.Q6J("value-sign",n.loot)("hideEmpty",!0)("container",!0)}}function KB(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",79),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.YNc(2,qB,4,4,"div",80),t.YNc(3,HB,2,2,"span",81),t.YNc(4,BB,2,4,"span",82),t.YNc(5,GB,3,4,"div",83),t.YNc(6,VB,2,3,"div",84),t.TgZ(7,"div",85)(8,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(9,"a",86,87),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openSummonDialog(i))}),t._UZ(11,"img",88),t.qZA()(),t.TgZ(12,"div",89)(13,"div",38),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t.qZA(),t.TgZ(14,"span",90),t.NdJ("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragXpMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragXpEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragCancel(i))})("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("doubleClick",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.compact&&i.openCharacterSheet())}),t._uU(15),t._UZ(16,"img",91)(17,"span",55),t.qZA(),t.YNc(18,YB,4,8,"span",92),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.settingsManager.settings.lootDeck&&n.character.lootCards&&n.character.lootCards.length>0),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterAttackModifierDeck),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterAttackModifierDeck&&n.settingsManager.settings.characterAttackModifierAnimate&&!n.character.attackModifierDeckVisible&&(!n.settingsManager.settings.characterAttackModifierDeckPermanentActive||!n.character.active)),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.scenario&&n.settingsManager.settings.battleGoals&&(n.gameManager.roundManager.firstRound||n.settingsManager.settings.battleGoalsCharacter||!n.settingsManager.settings.characterAttackModifierDeck)),t.xp6(1),t.Q6J("ngIf",n.settingsManager.settings.characterItems),t.xp6(3),t.Q6J("ghs-label","summon")("ghs-label-attribute","title"),t.xp6(5),t.Q6J("ghs-label","game.experience")("ghs-label-attribute","title")("relative",!0)("screenWidth",!0),t.xp6(1),t.hij(" ",n.character.experience+n.experience," "),t.xp6(2),t.Q6J("value-sign",n.experience)("hideEmpty",!0)("container",!0),t.xp6(1),t.Q6J("ngIf",!n.settingsManager.settings.lootDeck||!n.settingsManager.settings.alwaysLootDeck&&!n.gameManager.fhRules())}}function $B(o,a){if(1&o&&(t.TgZ(0,"div",106),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij(" ",n.character.handSize," ")}}function WB(o,a){if(1&o&&(t.TgZ(0,"div",107),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij(" ",n.character.level," ")}}function XB(o,a){1&o&&t._UZ(0,"span",112)}function tz(o,a){1&o&&(t.TgZ(0,"span",112),t._uU(1,"|"),t.qZA())}function ez(o,a){1&o&&t._UZ(0,"span",112)}function nz(o,a){if(1&o&&(t.ynx(0),t.YNc(1,XB,1,0,"span",110),t._UZ(2,"span",111),t.YNc(3,tz,2,0,"span",110),t.YNc(4,ez,1,0,"span",110),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(1),t.Q6J("ghs-label","data.character.traits."+n),t.xp6(1),t.Q6J("ngIf",e{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"characterName",void 0),(0,_.Z)(this,"summonButton",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"levelDialog",!1),(0,_.Z)(this,"characterTitle",""),(0,_.Z)(this,"initiative",-1),(0,_.Z)(this,"health",0),(0,_.Z)(this,"experience",0),(0,_.Z)(this,"loot",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"token",0),(0,_.Z)(this,"amAnimationDrawing",!1),(0,_.Z)(this,"compact",!1),(0,_.Z)(this,"summonCount",0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.characterTitle=d.v.characterManager.characterName(this.character),this.summonCount=this.character.summons.filter(e=>d.v.entityManager.isAlive(e)).length,this.activeConditions=d.v.entityManager.activeConditions(this.character),this.character.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))}),R.r.settings.characterAttackModifierDeckPermanent&&R.r.settings.characterAttackModifierDeckPermanentActive&&d.v.game.state==ge.D2.next&&this.character.active&&(this.character.attackModifierDeck.active=!0),this.compact=R.r.settings.characterCompact&&"modern"!=R.r.settings.theme}beforeAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"data.character."+this.character.name,...e.values)}afterAttackModifierDeck(e){this.character.attackModifierDeck=e.deck,d.v.stateManager.after()}exhausted(){this.character.exhausted=!this.character.exhausted,this.character.exhausted?(this.character.off=!0,this.character.active=!1):this.character.off=!1,d.v.sortFigures(this.character)}dragInitiativeMove(e){e>99?e=99:e<0&&(e=0),d.v.game.state==ge.D2.next&&0==e&&R.r.settings.initiativeRequired&&(e=1),-1==this.initiative&&(this.initiative=this.character.initiative),this.character.initiative=e,this.character.initiativeVisible=!0,this.character.longRest=!1,99==e&&(this.character.longRest=!0)}dragInitiativeEnd(e){e>99?e=99:e<0&&(e=0),d.v.game.state==ge.D2.next&&0==e&&R.r.settings.initiativeRequired&&(e=1),this.character.initiative!=this.initiative&&(this.character.initiative=this.initiative,d.v.stateManager.before("setInitiative","data.character."+this.character.name,""+e),this.character.initiative=e,this.character.longRest=!1,99==e&&(this.character.longRest=!0),this.initiative=-1,this.character instanceof oe.z&&(this.character.initiativeVisible=!0),d.v.game.state==ge.D2.next&&d.v.sortFigures(this.character),d.v.stateManager.after())}toggleFigure(e){if(!this.character.absent)if(d.v.game.state!=ge.D2.next||this.character.exhausted||R.r.settings.initiativeRequired&&!(this.character.initiative>0))(R.r.settings.initiativeRequired&&this.character.initiative<=0||d.v.game.state==ge.D2.draw)&&this.openInitiativeDialog(e);else{const i=this.character.summons.find(s=>s.active);R.r.settings.activeSummons&&this.character.active&&i?d.v.stateManager.before("summonInactive","data.character."+this.character.name,"data.summon."+i.name):d.v.stateManager.before(this.character.active?"unsetActive":"setActive","data.character."+this.character.name),d.v.roundManager.toggleFigure(this.character),d.v.stateManager.after()}}nextIdentity(e){R.r.settings.characterIdentities&&this.character.identities&&this.character.identities.length>1?(d.v.stateManager.before("nextIdentity","data.character."+this.character.name),this.character.identity++,this.character.identity>=this.character.identities.length&&(this.character.identity=0),d.v.stateManager.after(),e.preventDefault()):this.openEntityMenu(e)}openInitiativeDialog(e){this.dialog.open(zO,{panelClass:"dialog",data:this.character,positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}initiativeDoubleClick(e){this.character.active&&this.character.summons.filter(i=>d.v.entityManager.isAlive(i)&&i.state!=Ee.HY.new).find((i,s,l)=>i.active&&si.active=!1):this.openInitiativeDialog(e)}dragHpMove(e){this.health=e,this.character.health+this.health>this.character.maxHealth&&(this.health=this.character.maxHealth-this.character.health)}dragHpEnd(e){0!=this.health&&(d.v.stateManager.before("changeHP","data.character."+this.character.name,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.character,this.character,this.health),this.health=0,d.v.stateManager.after())}dragXpMove(e){this.experience=e,this.character.experience+this.experience<0&&(this.experience=-this.character.experience)}dragXpEnd(e){0!=this.experience&&(d.v.stateManager.before("changeXP","data.character."+this.character.name,(0,he.uZ)(this.experience)),this.character.experience+=this.experience,this.experience=0,d.v.stateManager.after())}dragTokenMove(e){this.token=e,this.character.primaryToken<0&&this.character.token+this.token<0?this.token=-this.character.token:this.character.primaryToken>=0&&this.character.tokenValues[this.character.primaryToken]+this.token<0&&(this.token=-this.character.tokenValues[this.character.primaryToken])}dragTokenEnd(e){0!=this.token&&(this.character.primaryToken<0?(d.v.stateManager.before("setCharacterToken","data.character."+this.character.name,""+(this.character.token+this.token)),this.character.token+=this.token,this.token=0,d.v.stateManager.after()):(d.v.stateManager.before("setCharacterTokenValue","data.character."+this.character.name,this.character.tokens[this.character.primaryToken],""+(this.character.token+this.token)),this.character.tokenValues[this.character.primaryToken]+=this.token,this.token=0,d.v.stateManager.after()))}dragLootMove(e){this.loot=e,this.character.loot+this.loot<0&&(this.loot=-this.character.loot)}dragLootEnd(e){0!=this.loot&&(d.v.stateManager.before("changeLoot","data.character."+this.character.name,(0,he.uZ)(this.loot)),this.character.loot+=this.loot,this.loot=0,d.v.stateManager.after())}dragCancel(e){this.health=0,this.experience=0,this.loot=0,this.token=0}openEntityMenu(e){this.dialog.open($c,{panelClass:"dialog",data:{entity:this.character,figure:this.character},positionStrategy:this.overlay.position().flexibleConnectedTo(this.characterName).withPositions((0,he.sm)())})}openEntitiesMenu(e){this.dialog.open(Bw,{panelClass:"dialog",data:{character:this.character},positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}openSummonDialog(e){this.dialog.open(wj,{panelClass:"dialog",data:this.character,positionStrategy:this.overlay.position().flexibleConnectedTo(this.summonButton).withPositions((0,he.sm)("left"))})}openCharacterSheet(){this.dialog.open(IO,{panelClass:["dialog-invert"],data:this.character})}removeCondition(e){d.v.stateManager.before(...d.v.entityManager.undoInfos(this.character,this.character,"removeCondition"),e.name),d.v.entityManager.removeCondition(this.character,e,e.permanent),d.v.stateManager.after()}openBattleGoals(){this.dialog.open(bw,{panelClass:["dialog"],data:{character:this.character,draw:!this.character.battleGoals||0==this.character.battleGoals.length}})}openItems(e=!1){R.r.settings.characterItemsPermanent&&!e?(this.character.itemsVisible=!this.character.itemsVisible,d.v.stateManager.saveLocal(),d.v.uiChange.emit()):0==this.character.progress.items.length?this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character,affordable:!0}}):this.dialog.open(Hj,{panelClass:["dialog"],data:this.character})}characterFullView(){d.v.game.figures.forEach(e=>{e instanceof oe.z&&(e.fullview=!1)}),this.character.fullview=!0,d.v.stateManager.saveLocal(),d.v.uiChange.emit()}toggleAttackModifierDeckVisible(){if(!this.character.attackModifierDeckVisible||R.r.settings.characterAttackModifierDeckPermanent&&R.r.settings.characterAttackModifierDeckPermanentActive&&this.character.active)if(R.r.settings.characterAttackModifierDeckPermanent)this.character.attackModifierDeck.active=!0,this.character.attackModifierDeckVisible=!0,this.character.lootCardsVisible=!1;else if(R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)){this.character.lootCardsVisible=!1;const e=new t.vpe,i=new t.vpe;e.subscribe({next:l=>this.beforeAttackModifierDeck(l)}),i.subscribe({next:l=>this.afterAttackModifierDeck(l)}),this.dialog.open(Pw,{backdropClass:"fullscreen-backdrop",data:{deck:this.character.attackModifierDeck,character:this.character,ally:!1,numeration:""+this.character.number,before:e,after:i}}).closed.subscribe({next:()=>{e.unsubscribe(),i.unsubscribe()}})}else this.character.attackModifierDeck.active=!0,this.character.attackModifierDeckVisible=!0,this.character.lootCardsVisible=!1;else this.character.attackModifierDeck.active=!1,this.character.attackModifierDeckVisible=!1;d.v.stateManager.saveLocal(),d.v.uiChange.emit()}toggleLootCardsVisible(){this.character.lootCardsVisible?this.character.lootCardsVisible=!1:R.r.settings.automaticAttackModifierFullscreen&&R.r.settings.portraitMode&&(window.innerWidth<800||window.innerHeight<400)?(this.character.lootCardsVisible=!1,this.openLootDeckDialog()):(this.character.lootCardsVisible=!0,this.character.attackModifierDeck.active=!1,this.character.attackModifierDeckVisible=!1),d.v.stateManager.saveLocal()}openLootDeckDialog(){this.dialog.open(_j,{panelClass:"dialog",data:this.character})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character"]],viewQuery:function(e,i){if(1&e&&(t.Gf(cB,5),t.Gf(lB,5),t.Gf(gB,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first),t.iGM(s=t.CRH())&&(i.characterName=s.first),t.iGM(s=t.CRH())&&(i.summonButton=s.first)}},inputs:{character:"character"},decls:18,vars:31,consts:[["class","summons-container",3,"ngClass",4,"ngIf"],[1,"character",3,"ngClass"],[3,"entity"],[3,"character"],[4,"ngIf"],[1,"stats"],[1,"spacer"],["ghs-pointer-input","",1,"character-sheet-button",3,"ghs-label","ghs-label-attribute","ngClass","singleClick","doubleClick"],[3,"src"],["class","hand-size",4,"ngIf"],["class","character-level",4,"ngIf"],["class","character-traits","ghs-pointer-input","",3,"singleClick","doubleClick",4,"ngIf"],[3,"figure"],["class","items-container-permanent",4,"ngIf"],["class","attack-modifierdeck-container permanent",3,"ngClass",4,"ngIf"],[1,"summons-container",3,"ngClass"],[1,"entities-menu",3,"ngClass","entityAnimation","click"],[1,"icon",3,"src"],["src","./assets/images/up.svg",1,"menu"],["class","summons",4,"ngIf"],[1,"summons"],[3,"character","summon",4,"ngFor","ngForOf"],[3,"character","summon"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[1,"initiative",3,"figure"],[3,"entity","figure"],["class","attack-modifierdeck-container",3,"ngClass",4,"ngIf"],["class","loot-cards-container",4,"ngIf"],[1,"attack-modifierdeck-container",3,"ngClass"],[1,"scroll-container"],[3,"character","before","after"],[1,"attack-modifierdeck-close",3,"click"],[1,"loot-cards-container"],[1,"loot-cards"],["class","loot-card",3,"click",4,"ngFor","ngForOf"],[1,"loot-cards-close",3,"click"],[1,"loot-card",3,"click"],[3,"loot","flipped","disableFlip"],["ghs-pointer-input","",1,"entity-menu-container",3,"singleClick","doubleClick"],[1,"column","col-1"],[1,"title-bar"],[1,"title"],["characterName",""],["ghs-pointer-input","",1,"icon",3,"relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick"],[3,"ngClass","src"],[3,"figure",4,"ngIf"],["ghs-pointer-input","",1,"name",3,"singleClick","doubleClick"],["class","ghs-svg exhausted","src","./assets/images/status/exhausted.svg",4,"ngIf"],[1,"token-container"],["class","token","ghs-pointer-input","",3,"ghs-label","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick",4,"ngIf"],["class","token value",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"status-bar"],["ghs-pointer-input","",1,"health",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],["src","./assets/images/status/health.svg"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"markers"],["class","marker",4,"ngFor","ngForOf"],[1,"conditions"],["class","condition","ghs-pointer-input","",3,"doubleClick",4,"ngFor","ngForOf"],["src","./assets/images/status/exhausted.svg",1,"ghs-svg","exhausted"],["ghs-pointer-input","",1,"token",3,"ghs-label","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick"],[1,"token","value"],["class","token",3,"ghs-label",4,"ngIf"],[1,"token",3,"ghs-label"],[1,"marker"],["ghs-pointer-input","",1,"condition",3,"doubleClick"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],["class","absent-menu","ghs-pointer-input","",3,"singleClick","doubleClick",4,"ngIf"],[1,"title","absent"],[1,"icon"],["ghs-pointer-input","",1,"absent-menu",3,"singleClick","doubleClick"],["ghs-pointer-input","",1,"spacer",3,"singleClick","doubleClick"],["class","loot-cards-button","ghs-pointer-input","",3,"ngClass","singleClick",4,"ngIf"],["class","attack-modifier-button","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","singleClick",4,"ngIf"],["class","attack-modifier-draw",3,"ngClass",4,"ngIf"],["class","battlegoals-button","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","singleClick",4,"ngIf"],["class","items-button","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","singleClick","doubleClick",4,"ngIf"],[1,"summon-dialog"],["ghs-pointer-input","",1,"summon-dialog-button",3,"ghs-label","ghs-label-attribute","singleClick"],["summonButton",""],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"column","col-2"],["ghs-pointer-input","",1,"experience",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],["src","./assets/images/status/experience.svg"],["class","loot","ghs-pointer-input","",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick",4,"ngIf"],["ghs-pointer-input","",1,"loot-cards-button",3,"ngClass","singleClick"],["src","./assets/images/fh/loot-token.png"],[1,"badge"],["ghs-pointer-input","",1,"attack-modifier-button",3,"ghs-label","ghs-label-attribute","singleClick"],["src","./assets/images/attackmodifier/icon.png"],[1,"attack-modifier-draw",3,"ngClass"],[3,"character","drawing"],["ghs-pointer-input","",1,"battlegoals-button",3,"ghs-label","ghs-label-attribute","singleClick"],["class","check","src","./assets/images/check.svg",4,"ngIf"],["src","./assets/images/check.svg",1,"check"],["ghs-pointer-input","",1,"items-button",3,"ghs-label","ghs-label-attribute","singleClick","doubleClick"],["ghs-pointer-input","",1,"loot",3,"ghs-label","ghs-label-attribute","relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],["src","./assets/images/status/loot.svg"],[1,"hand-size"],[1,"character-level"],["ghs-pointer-input","",1,"character-traits",3,"singleClick","doubleClick"],["src","./assets/images/fh/character/traits/trait.svg",1,"ghs-svg"],["class","divider",4,"ngIf"],[1,"trait",3,"ghs-label"],[1,"divider"],[1,"items-container-permanent"],[1,"attack-modifierdeck-container","permanent",3,"ngClass"]],template:function(e,i){1&e&&(t.YNc(0,pB,6,11,"div",0),t.TgZ(1,"div",1),t._UZ(2,"ghs-entity-index-key",2)(3,"ghs-character-image",3),t.YNc(4,MB,6,8,"ng-container",4),t.TgZ(5,"div",5),t.YNc(6,UB,27,25,"ng-container",4),t.YNc(7,RB,8,4,"ng-container",4),t._UZ(8,"span",6),t.YNc(9,KB,19,16,"ng-container",4),t.TgZ(10,"a",7),t.NdJ("singleClick",function(l){return i.settingsManager.settings.characterSheet?i.openCharacterSheet():i.openEntityMenu(l)})("doubleClick",function(){return i.characterFullView()}),t._UZ(11,"img",8),t.qZA(),t.YNc(12,$B,2,1,"div",9),t.YNc(13,WB,2,1,"div",10),t.YNc(14,iz,4,1,"div",11),t.qZA(),t._UZ(15,"ghs-figure-errors",12),t.qZA(),t.YNc(16,oz,2,1,"div",13),t.YNc(17,az,3,4,"div",14)),2&e&&(t.Q6J("ngIf",!i.character.absent),t.xp6(1),t.Udp("--ghs-character-color",i.character.color),t.Q6J("ngClass",t.qlk(20,sz,i.character.off||i.character.exhausted||i.character.health<=0||i.character.absent,!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition],i.character.absent,i.settingsManager.settings.characterAttackModifierDeck&&i.character.attackModifierDeckVisible&&!i.settingsManager.settings.characterAttackModifierDeckPermanent||i.settingsManager.settings.lootDeck&&i.settingsManager.settings.applyLoot&&i.character.lootCardsVisible,i.compact,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme,i.character.active&&("modern"==i.settingsManager.settings.theme||i.compact))),t.xp6(1),t.Q6J("entity",i.character),t.xp6(1),t.Q6J("character",i.character),t.xp6(1),t.Q6J("ngIf",!i.character.absent),t.xp6(2),t.Q6J("ngIf",!i.character.absent),t.xp6(1),t.Q6J("ngIf",i.character.absent),t.xp6(2),t.Q6J("ngIf",!i.character.absent),t.xp6(1),t.Q6J("ghs-label","character.progress")("ghs-label-attribute","title")("ngClass",t.VKq(29,rz,i.settingsManager.settings.characterHandSize)),t.xp6(1),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterHandSize&&!i.character.absent),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterHandSize&&!i.character.absent),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterTraits&&!i.character.absent&&i.character.traits.length>0),t.xp6(1),t.Q6J("figure",i.character),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterItems&&i.settingsManager.settings.characterItemsPermanent&&(i.character.itemsVisible||i.settingsManager.settings.characterItemsPermanentActive&&i.character.active&&i.character.progress.items.length>0)),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.characterAttackModifierDeck&&i.settingsManager.settings.characterAttackModifierDeckPermanent))},dependencies:[x.mk,x.sg,x.O5,jO,Kf,g9,s_,AT,VO,S9,IT,NT,Gu,im,ie,An,aa,Ii,sg],styles:['.attack-modifierdeck-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:5;width:0;height:0;visibility:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;overflow-x:auto;overflow-y:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * 1.5 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));z-index:5}.attack-modifierdeck-container.active[_ngcontent-%COMP%], .attack-modifierdeck-container.loot-cards-container[_ngcontent-%COMP%], .loot-cards-container.active[_ngcontent-%COMP%], .loot-cards-container.loot-cards-container[_ngcontent-%COMP%]{visibility:visible;width:100%;height:100%}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor))}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 17 * var(--ghs-text-factor));-ms-overflow-style:none;scrollbar-width:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar, .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 17)}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);z-index:3}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 8.6666666667 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;inset:0;display:block}.attack-modifierdeck-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%]{display:inline-block;position:relative;cursor:zoom-out;top:0;left:0;z-index:2;width:100%;height:100%}.summons-container[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;align-items:center;transition:max-height 2s ease-out;max-height:100%;min-width:calc(var(--ghs-unit) * 7);max-width:calc(var(--ghs-unit) * 96)}.summons-container.empty[_ngcontent-%COMP%]{max-height:0}.summons-container[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:none;width:calc(var(--ghs-unit) * 10.5);height:100%}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:block;width:auto;height:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:100%;width:auto;filter:var(--ghs-filter-shadow)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{position:absolute;top:50%;left:calc(var(--ghs-unit) * -4);transform:translateY(-50%);width:calc(var(--ghs-unit) * 3.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-darkgray);opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:not(.empty){opacity:1;transform:translate(0)}.summons-container[_ngcontent-%COMP%] .entities-menu.empty[_ngcontent-%COMP%]{opacity:0;max-width:0;height:0;transform:translateY(100%)}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%]{cursor:initial;pointer-events:none}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{display:none}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.icon[_ngcontent-%COMP%]{opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.menu[_ngcontent-%COMP%]{opacity:1}.summons-container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;max-width:calc(var(--ghs-unit) * 77.5)}.summons-container.off[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:grayscale(100%)}.character[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-character-color);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;--ghs-character-color: #000;border-radius:calc(var(--ghs-unit) * .5);filter:var(--ghs-filter-outline);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.character.dimmed[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.dimmed[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{filter:grayscale(.15);opacity:.5}.character[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 5);left:calc(var(--ghs-unit) * 3.2);z-index:6}.character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);left:calc(var(--ghs-unit) * 2.4)}.character[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{z-index:2}.character[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.1);left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);z-index:4}.character[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0!important;width:100%!important}.character[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5);z-index:5}.character[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer;margin-left:calc(var(--ghs-unit) * 1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{max-width:calc(var(--ghs-unit) * 10);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center;white-space:nowrap}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:calc(var(--ghs-unit) * 5.5);margin-left:calc(var(--ghs-unit) * -1.1);margin-right:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.exhausted[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1);height:calc(var(--ghs-unit) * 4);width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-white);font-family:var(--ghs-font-text);margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7);margin:0 calc(var(--ghs-unit) * .1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token.placeholder[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));z-index:1000}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%]{position:relative;z-index:999;width:0;height:0;top:50%;left:calc(var(--ghs-unit) * -3);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{position:absolute;width:0;height:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw.drawing[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18);height:calc(var(--ghs-unit) * 12)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;align-self:center;z-index:1}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor) * var(--ghs-text-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]:hover{opacity:.7}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.disabled[_ngcontent-%COMP%]{pointer-events:none}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * -1.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));color:var(--ghs-color-white)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));border-radius:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-70%,-50%);width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-green) var(--ghs-filter-outline)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.experience[_ngcontent-%COMP%]{color:var(--ghs-color-blue);margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.loot[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.absent[_ngcontent-%COMP%]{cursor:initial;opacity:.6}.character.absent[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:initial}.character[_ngcontent-%COMP%] .absent-menu[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 82);height:calc(var(--ghs-unit) * 14);cursor:pointer;z-index:2}.character[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));cursor:pointer;font-size:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 1.5)}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);filter:var(--ghs-filter-white)}.character[_ngcontent-%COMP%] ghs-figure-errors[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 14.5);top:50%;transform:translateY(-50%);z-index:99}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{position:relative;cursor:pointer;height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.character[_ngcontent-%COMP%] .character-sheet-button.hand-size-margin[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto;filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 14);top:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(hand-size-mask.5857c02745e3d418.svg);mask-image:url(hand-size-mask.5857c02745e3d418.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.6);z-index:-1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 13.3);top:calc(var(--ghs-unit) * 10);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:0;left:calc(var(--ghs-unit) * -.5);bottom:0;right:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:-1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 24.5);top:calc(var(--ghs-unit) * .5);width:calc(var(--ghs-unit) * 33);height:calc(var(--ghs-unit) * 2.64);display:flex;justify-content:space-evenly;align-items:center}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(outer-mask.f0af43cfab648186.svg);mask-image:url(outer-mask.f0af43cfab648186.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:0}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(inner-mask.f2d18d4a7559b09e.svg);mask-image:url(inner-mask.f2d18d4a7559b09e.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(.5);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .trait[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5);color:var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.8);height:calc(var(--ghs-unit) * 1.8);left:0;top:50%;transform:translateY(-45%) rotate(45deg);border:calc(var(--ghs-unit) * .2) solid var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:110%;width:auto;filter:var(--ghs-filter-white);transform:rotate(-45deg);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);z-index:0;filter:brightness(.5)}.character[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%]:before{transition:filter .15s ease-in-out}.character.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%]:before{filter:grayscale(1)!important}.character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] *[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}.character.fh[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10.25);background-image:url(char-mat_compact.b0d0dd33f05dffe7.png)}.character.compact[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3.1)}.character.compact[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.compact[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{display:none}.character.compact[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.5);left:calc(var(--ghs-unit) * 6.5);width:calc(var(--ghs-unit) * 5);height:calc(var(--ghs-unit) * 5)}.character.compact[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 1 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 13);width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 8)}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{flex-direction:row;justify-content:flex-start;align-items:center}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);margin-left:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12);margin-right:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%]{margin-bottom:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{margin-top:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 13.5);height:calc(var(--ghs-unit) * 9)}.character.compact[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2.7);right:calc(var(--ghs-unit) * 1.2)}.character.compact[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.3);right:calc(var(--ghs-unit) * 1)}.character.compact[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 11)}.character.compact[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{display:none}.character.modern[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 16);border-top-left-radius:calc(var(--ghs-unit) * 13);border-top-right-radius:calc(var(--ghs-unit) * 12);border-bottom-right-radius:calc(var(--ghs-unit) * 12);background-image:url(char-mat_modern.2238b82519930f08.png);background-blend-mode:hard-light;filter:none;overflow:hidden}.character.modern.dimmed[_ngcontent-%COMP%]{background-image:url(char-mat_modern.2238b82519930f08.png)}.character.modern[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 13.7)}.character.modern[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{top:0;left:0;width:calc(var(--ghs-unit) * 16);height:calc(var(--ghs-unit) * 16);margin:0}.character.modern[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:grayscale(1) brightness(.3)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 2.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -2.7 / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5);filter:grayscale(1) brightness(.3);margin-left:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 3.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 5.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 13.9);top:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 18);top:initial;bottom:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor))}']})),a})();const om=function(o){return[o]};function cz(o,a){if(1&o&&t._UZ(0,"div",15),2&o){const n=t.oxw();t.Q6J("ghs-label","character.progress.retirement.events")("ghs-label-args",t.VKq(2,om,n.character.retireEvent))}}function lz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",16)(1,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openConclusion())}),t._UZ(2,"span",18),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.conclusion")("ghs-label-args",t.VKq(2,om,n.conclusion.index))}}function gz(o,a){if(1&o&&t._UZ(0,"div",18),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.unlockCharacter")("ghs-label-args",t.VKq(2,om,n.personalQuest.unlockCharacter))}}function dz(o,a){if(1&o&&t._UZ(0,"div",18),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.openEnvelope")("ghs-label-args",t.VKq(2,om,n.personalQuest.openEnvelope))}}function hz(o,a){if(1&o&&(t.TgZ(0,"div",19),t.YNc(1,gz,1,4,"div",20),t.YNc(2,dz,1,4,"div",20),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.personalQuest.unlockCharacter),t.xp6(1),t.Q6J("ngIf",n.personalQuest.openEnvelope)}}function uz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",21)(1,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moveResources())}),t._UZ(2,"span",2),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.moveSupply"))}let _z=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"conclusion",void 0),(0,_.Z)(this,"personalQuest",void 0),this.character=e,this.dialogRef=i,this.dialog=s,this.conclusion=d.v.sectionData(this.character.edition).find(l=>l.retirement==this.character.name&&l.conclusion),this.character.progress.personalQuest&&(this.personalQuest=d.v.characterManager.personalQuestByCard(d.v.currentEdition(),this.character.progress.personalQuest))}openConclusion(){this.conclusion&&this.dialog.open(uo,{panelClass:"dialog",data:{scenario:this.conclusion,conclusionOnly:!0,rewardsOnly:null!=d.v.game.party.conclusions.find(e=>this.conclusion&&e.edition==this.conclusion.edition&&e.group==this.conclusion.group&&e.index==this.conclusion.index)}})}moveResources(){this.dialog.open(xw,{panelClass:"dialog",data:{character:this.character,all:!0}})}apply(){this.dialogRef.close(!0),this.personalQuest&&this.personalQuest.unlockCharacter&&R.r.settings.automaticUnlocking&&-1==d.v.game.unlockedCharacters.indexOf(this.personalQuest.unlockCharacter)&&d.v.game.unlockedCharacters.push(this.personalQuest.unlockCharacter),this.conclusion&&!d.v.game.party.conclusions.find(e=>this.conclusion&&e.edition==this.conclusion.edition&&e.group==this.conclusion.group&&e.index==this.conclusion.index)&&this.openConclusion()}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-retirement-dialog"]],decls:18,vars:13,consts:[[1,"retirement-dialog"],[1,"title"],[3,"ghs-label"],[1,"name"],[1,"icon","character-icon",3,"src"],[1,"character-title"],[1,"rewards"],[3,"ghs-label","ghs-label-args"],["class","event text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","conclusion",4,"ngIf"],["class","personal-quest",4,"ngIf"],["class","additional",4,"ngIf"],[1,"menu"],[1,"cancel",3,"click"],[1,"apply",3,"click"],[1,"event","text-white",3,"ghs-label","ghs-label-args"],[1,"conclusion"],[3,"click"],[1,"text-white",3,"ghs-label","ghs-label-args"],[1,"personal-quest"],["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"additional"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"img",4),t.TgZ(5,"span",5),t._uU(6),t.qZA()()(),t.TgZ(7,"div",6),t._UZ(8,"span",7),t.qZA(),t.YNc(9,cz,1,4,"div",8),t.YNc(10,lz,3,4,"div",9),t.YNc(11,hz,3,2,"div",10),t.YNc(12,uz,3,1,"div",11),t.TgZ(13,"div",12)(14,"a",13),t.NdJ("click",function(){return i.close()}),t._UZ(15,"span",2),t.qZA(),t.TgZ(16,"a",14),t.NdJ("click",function(){return i.apply()}),t._UZ(17,"span",2),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","character.progress.retirement"),t.xp6(2),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(2),t.Oqu(i.gameManager.characterManager.characterName(i.character,!0)),t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.prosperity")("ghs-label-args",t.VKq(11,om,i.gameManager.fhRules()?"2":"1")),t.xp6(1),t.Q6J("ngIf",i.character.retireEvent),t.xp6(1),t.Q6J("ngIf",i.conclusion),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.gameManager.fhRules()),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(2),t.Q6J("ghs-label","character.progress.retirement.apply"))},dependencies:[x.O5,ie],styles:[".retirement-dialog[_ngcontent-%COMP%]{padding:.5em;color:var(--ghs-color-white)}.retirement-dialog[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em;filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin:0 calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);min-width:calc(var(--ghs-unit) * 44 * var(--ghs-dialog-factor))}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5 * var(--ghs-dialog-factor));width:auto;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title[_ngcontent-%COMP%]{display:flex;align-items:center}.retirement-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .character-title.absent[_ngcontent-%COMP%]{text-decoration:line-through}.retirement-dialog[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:calc(var(--ghs-unit) * 35 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.retirement-dialog[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{cursor:pointer}.retirement-dialog[_ngcontent-%COMP%] .event[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:1.5em}.retirement-dialog[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;flex-direction:column;justify-content:center;align-items:center}.retirement-dialog[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:1.5em;padding:.2em}.retirement-dialog[_ngcontent-%COMP%] .conclusion[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.retirement-dialog[_ngcontent-%COMP%] .personal-quest[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.retirement-dialog[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));padding-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.retirement-dialog[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:1.5em;padding:.2em}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.retirement-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}"]})),a})();function pz(o,a){if(1&o&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.hij("",n+1,".")}}const zw=function(o,a,n){return{active:o,disabled:a,spent:n}};function fz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return t.KtG(s.toggleHerb(i,2))}),t._UZ(1,"img",22),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.kEZ(2,zw,e.receipe.length>2&&e.receipe[2]==n,e.receipe[2]!=n&&0==(e.character.progress.loot[n]||0)&&0==(e.gameManager.game.party.loot[n]||0),e.receipe[2]!=n&&((e.characterSpent[n]||0)>0||(e.fhSupportSpent[n]||0)>0)&&(e.character.progress.loot[n]||0)<=(e.characterSpent[n]||0)&&(e.gameManager.game.party.loot[n]||0)<=(e.fhSupportSpent[n]||0))),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH)}}function mz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.moveHerb(i,s.characterSpent,s.fhSupportSpent))}),t._UZ(1,"img",28),t.qZA()}}function vz(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",25),t._uU(2),t.qZA(),t.YNc(3,mz,2,0,"a",26),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",e.characterSpent[n]||"-"," / ",e.character.progress.loot[n]||0," "),t.xp6(1),t.Q6J("ngIf",e.characterSpent[n]&&(e.gameManager.game.party.loot[n]||0)>(e.fhSupportSpent[n]||0))}}function Cz(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function Mz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.moveHerb(i,s.fhSupportSpent,s.characterSpent))}),t._UZ(1,"img",29),t.qZA()}}function Oz(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Mz,2,0,"a",26),t.TgZ(2,"span",25),t._uU(3),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.fhSupportSpent[n]&&(e.character.progress.loot[n]||0)>(e.characterSpent[n]||0)),t.xp6(1),t.Q6J("ghs-label","game.loot.")("ghs-label-attribute","title"),t.xp6(1),t.AsE(" ",e.fhSupportSpent[n]||"-"," / ",e.gameManager.game.party.loot[n]||0," ")}}function Pz(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function yz(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",21),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleHerb(s,0))}),t._UZ(2,"img",22),t.qZA(),t.TgZ(3,"span",21),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleHerb(s,1))}),t._UZ(4,"img",22),t.qZA(),t.YNc(5,fz,2,6,"span",23),t.TgZ(6,"span",24),t.YNc(7,vz,4,5,"ng-container",11),t.YNc(8,Cz,2,0,"span",11),t.qZA(),t.TgZ(9,"span",24),t.YNc(10,Oz,4,5,"ng-container",11),t.YNc(11,Pz,2,0,"span",11),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.kEZ(9,zw,e.receipe.length>0&&e.receipe[0]==n,e.receipe[0]!=n&&0==(e.character.progress.loot[n]||0)&&0==(e.gameManager.game.party.loot[n]||0),e.receipe[0]!=n&&((e.characterSpent[n]||0)>0||(e.fhSupportSpent[n]||0)>0)&&(e.character.progress.loot[n]||0)<=(e.characterSpent[n]||0)&&(e.gameManager.game.party.loot[n]||0)<=(e.fhSupportSpent[n]||0))),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.kEZ(13,zw,e.receipe.length>1&&e.receipe[1]==n,e.receipe[1]!=n&&0==(e.character.progress.loot[n]||0)&&0==(e.gameManager.game.party.loot[n]||0),e.receipe[1]!=n&&((e.characterSpent[n]||0)>0||(e.fhSupportSpent[n]||0)>0)&&(e.character.progress.loot[n]||0)<=(e.characterSpent[n]||0)&&(e.gameManager.game.party.loot[n]||0)<=(e.fhSupportSpent[n]||0))),t.xp6(1),t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",3==e.brewing),t.xp6(2),t.Q6J("ngIf",e.character.progress.loot[n]),t.xp6(1),t.Q6J("ngIf",!e.character.progress.loot[n]),t.xp6(2),t.Q6J("ngIf",e.gameManager.game.party.loot[n]),t.xp6(1),t.Q6J("ngIf",!e.gameManager.game.party.loot[n])}}function bz(o,a){if(1&o&&t._UZ(0,"img",22),2&o){const n=t.oxw().$implicit;t.Q6J("src","./assets/images/fh/loot/"+n+".svg",t.LSH)}}function xz(o,a){1&o&&t._UZ(0,"img",33)}function wz(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"+"),t.qZA())}function kz(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",30),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeHerb(s,!1))}),t.YNc(2,bz,1,1,"img",31),t.YNc(3,xz,1,0,"img",32),t.YNc(4,wz,2,0,"span",11),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(2),t.Q6J("ngIf",n),t.xp6(1),t.Q6J("ngIf",!n),t.xp6(1),t.Q6J("ngIf",e{var o;class a{constructor(e,i,s){if((0,_.Z)(this,"character",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"herbs",[le.CG.arrowvine,le.CG.axenut,le.CG.corpsecap,le.CG.flamefruit,le.CG.rockroot,le.CG.snowthistle]),(0,_.Z)(this,"brewing",void 0),(0,_.Z)(this,"characterSpent",{}),(0,_.Z)(this,"fhSupportSpent",{}),(0,_.Z)(this,"receipe",[void 0,void 0]),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"brewed",void 0),(0,_.Z)(this,"otherCharacters",[]),(0,_.Z)(this,"otherCharacter",void 0),(0,_.Z)(this,"noChar",!1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.character=e,this.dialogRef=i,this.dialog=s,this.brewing=0,d.v.fhRules()&&d.v.game.party.campaignMode&&d.v.game.party.buildings){const l=d.v.game.party.buildings.find(m=>"alchemist"==m.name&&"wrecked"!=m.state);l&&l.level&&(this.brewing=l.level<3?2:3)}}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.updateItem()}),this.updateItem()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}updateItem(){const e=this.getItem();this.item=e&&d.v.game.party.unlockedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)&&e,this.brewed=void 0,this.otherCharacters=[],this.otherCharacter=void 0,this.noChar=!1}addHerb(e,i,s=-1){e&&(i||(this.character.progress.loot[e]&&(this.character.progress.loot[e]||0)>(this.characterSpent[e]||0)?i=this.characterSpent:d.v.game.party.loot[e]&&(d.v.game.party.loot[e]||0)>(this.fhSupportSpent[e]||0)&&(i=this.fhSupportSpent)),i&&(i[e]=(i[e]||0)+1,this.receipe[s>-1?s:this.receipe.length]=e)),this.updateItem()}removeHerb(e,i,s=-1){this.receipe[s>-1?s:this.receipe.indexOf(e)]=void 0,2==s&&this.receipe.splice(2,1),e&&(i||(i=this.fhSupportSpent[e]?this.fhSupportSpent:this.characterSpent),i[e]=(i[e]||1)-1),this.updateItem()}toggleHerb(e,i){const s=this.receipe[i]!=e;this.receipe[i]&&this.removeHerb(this.receipe[i],!1,i),s&&((this.character.progress.loot[e]||0)<=(this.characterSpent[e]||0)&&(d.v.game.party.loot[e]||0)<=(this.fhSupportSpent[e]||0)&&this.removeHerb(e,!1),this.addHerb(e,!1,i))}moveHerb(e,i,s){i[e]=(i[e]||1)-1,s[e]=(s[e]||0)+1}brew(){this.brewed=this.getItem(),this.brewed&&(this.otherCharacter?this.brewInternal(this.otherCharacter,this.brewed):this.character.progress.items.find(e=>this.brewed&&e.name==""+this.brewed.id&&e.edition==this.brewed.edition)?(this.otherCharacters=d.v.game.figures.filter(e=>e instanceof oe.z&&e!=this.character&&!e.progress.items.find(i=>this.brewed&&i.name==""+this.brewed.id&&i.edition==this.brewed.edition)).map(e=>e),this.noChar=0==this.otherCharacters.length,1==this.otherCharacters.length&&(this.otherCharacter=this.otherCharacters[0])):(this.brewInternal(this.character,this.brewed),this.otherCharacters=[],this.otherCharacter=void 0,this.noChar=!1))}brewInternal(e,i){this.otherCharacter=e!=this.character?e:void 0,d.v.stateManager.before(this.otherCharacter?"brewPotionOther":"brewPotion",this.character.name,""+i.id,i.name,e.name),this.herbs.forEach(s=>{this.fhSupportSpent[s]&&(d.v.game.party.loot[s]=(d.v.game.party.loot[s]||0)-(this.fhSupportSpent[s]||0)),this.characterSpent[s]&&(this.character.progress.loot[s]=(this.character.progress.loot[s]||0)-(this.characterSpent[s]||0))}),d.v.game.party.unlockedItems.find(s=>s.name==""+i.id&&s.edition==i.edition)||d.v.game.party.unlockedItems.push(new Vn.Jc(""+i.id,i.edition)),e.progress.items.push(new Vn.xb(""+i.id,i.edition)),d.v.stateManager.after(),this.brewed=i,this.otherCharacter=e!=this.character?e:void 0}getItem(){if(this.receipe[0]&&this.receipe[1])return this.receipe.filter((e,i,s)=>e&&s.indexOf(e)==i).length!=this.receipe.filter(e=>e).length?d.v.itemManager.getItems(d.v.currentEdition(),!0).find(e=>!(e.requiredItems&&e.requiredItems.length||"alchemist"!=e.requiredBuilding||!(this.receipe[2]?e.requiredBuildingLevel>=3:e.requiredBuildingLevel<3)||e.resources)):d.v.itemManager.getItems(d.v.currentEdition(),!0).find(e=>(!e.requiredItems||!e.requiredItems.length)&&"alchemist"==e.requiredBuilding&&(this.receipe[2]?e.requiredBuildingLevel>=3:e.requiredBuildingLevel<3)&&e.resources&&this.herbs.every(i=>e.resources&&this.receipe.filter(s=>s==i).length==(e.resources[i]||0)))}openItemDialog(){this.dialog.open(gg,{data:{item:this.brewed||this.item}})}close(){this.dialogRef.close()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He),t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-items-brew"]],decls:29,vars:36,consts:[[1,"items-brew-dialog",3,"ngClass"],[1,"scroll-container"],[1,"title"],[3,"ghs-label"],[1,"table"],["class","head-col first",4,"ngFor","ngForOf"],[1,"first"],[1,"icon","character-icon",3,"src"],[1,"name",3,"ngClass"],[4,"ngFor","ngForOf"],[1,"receipe"],[4,"ngIf"],["class","placeholder text-white item",3,"ghs-label","ghs-label-args",4,"ngIf"],["class","herb",4,"ngIf"],["class","receipe",4,"ngIf"],["class","brewed",4,"ngIf"],[1,"menu"],[1,"cancel",3,"click"],[1,"apply",3,"ngClass","click"],[3,"ghs-label","ghs-label-args"],[1,"head-col","first"],[1,"head-col","calc-col","toggle",3,"ngClass","click"],[1,"ghs-svg",3,"src"],["class","head-col calc-col toggle",3,"ngClass","click",4,"ngIf"],[1,"calc-col"],[1,"value",3,"ghs-label","ghs-label-attribute"],["class","button",3,"click",4,"ngIf"],[1,"button",3,"click"],["src","./assets/images/right.svg",1,"ghs-svg"],["src","./assets/images/left.svg",1,"ghs-svg"],[1,"herb",3,"click"],["class","ghs-svg",3,"src",4,"ngIf"],["class","ghs-svg","src","./assets/images/fh/loot/unknown.svg",4,"ngIf"],["src","./assets/images/fh/loot/unknown.svg",1,"ghs-svg"],[1,"placeholder","text-white","item",3,"ghs-label","ghs-label-args"],[1,"herb"],[1,"placeholder","text-white","item",3,"ghs-label"],[1,"characters"],["class","character",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"character",3,"ngClass","click"],[1,"icon",3,"src"],[1,"name"],[1,"placeholder","item","already",3,"ghs-label"],[1,"brewed"],[3,"item","flipped","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"label",2),t._UZ(3,"span",3),t.qZA(),t.TgZ(4,"div",4),t.YNc(5,pz,2,1,"span",5),t.ALo(6,"ghsRange"),t.TgZ(7,"span",6),t._UZ(8,"img",7),t.TgZ(9,"span",8),t._uU(10),t.qZA()(),t.TgZ(11,"span",6),t._UZ(12,"span",3),t.qZA(),t.YNc(13,yz,12,17,"ng-container",9),t.qZA(),t.TgZ(14,"div",10),t.YNc(15,kz,5,3,"ng-container",9),t.YNc(16,Tz,2,0,"span",11),t.YNc(17,Zz,1,5,"span",12),t.YNc(18,Az,1,5,"span",12),t.YNc(19,Sz,2,0,"span",13),t.qZA(),t.YNc(20,Dz,2,7,"div",14),t.YNc(21,Jz,5,2,"ng-container",11),t.YNc(22,Uz,2,1,"div",14),t.YNc(23,Lz,2,2,"div",15),t.TgZ(24,"div",16)(25,"a",17),t.NdJ("click",function(){return i.close()}),t._UZ(26,"span",3),t.qZA(),t.TgZ(27,"a",18),t.NdJ("click",function(){return i.brew()}),t._UZ(28,"span",19),t.qZA()()()()),2&e&&(t.Q6J("ngClass",t.WLB(26,Qz,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ghs-label","game.items.brewing"),t.xp6(1),t.Udp("--ghs-summary-columns",2+i.brewing),t.xp6(1),t.Q6J("ngForOf",t.xi3(6,23,t.DdM(29,Rz),i.brewing)),t.xp6(3),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(30,Fz,i.character.absent)),t.xp6(1),t.hij(" ",i.gameManager.characterManager.characterName(i.character)," "),t.xp6(2),t.Q6J("ghs-label","party.campaign.sheet.supply"),t.xp6(1),t.Q6J("ngForOf",i.herbs),t.xp6(2),t.Q6J("ngForOf",i.receipe),t.xp6(1),t.Q6J("ngIf",!i.brewed||i.otherCharacters.length>0||i.noChar),t.xp6(1),t.Q6J("ngIf",i.item&&(!i.brewed||i.noChar)),t.xp6(1),t.Q6J("ngIf",i.brewed&&i.otherCharacters.length>0),t.xp6(1),t.Q6J("ngIf",!i.item&&!i.brewed),t.xp6(1),t.Q6J("ngIf",i.brewed&&0==i.otherCharacters.length&&!i.noChar),t.xp6(1),t.Q6J("ngIf",i.brewed&&i.otherCharacters.length>0),t.xp6(1),t.Q6J("ngIf",i.noChar),t.xp6(1),t.Q6J("ngIf",i.brewed||i.item),t.xp6(3),t.Q6J("ghs-label","cancel"),t.xp6(1),t.Q6J("ngClass",t.VKq(32,qz,i.noChar||i.brewed&&(0==i.otherCharacters.length||!i.otherCharacter)||i.receipe.length<2||!i.receipe[0]||!i.receipe[1])),t.xp6(1),t.Q6J("ghs-label","game.items.brewing.brew"+(i.otherCharacter?"For":""))("ghs-label-args",t.VKq(34,Hz,i.otherCharacter?i.gameManager.characterManager.characterName(i.otherCharacter,!0):"")))},dependencies:[x.mk,x.sg,x.O5,Xd,ie,Ii],styles:[".items-brew-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1em;width:auto;margin:0 .3em}.items-brew-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}.items-brew-dialog[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{--ghs-summary-columns: 5;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));display:grid;grid-template-columns:repeat(var(--ghs-summary-columns),auto);padding-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-white);overflow:auto}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-white)}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center;padding:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));border-bottom:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-white);border-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-darkgray)}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-weight:700;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));flex-direction:row;justify-content:flex-end;background-image:url(dialog_background.fa4ff388462f6a00.png);position:sticky;left:0;z-index:1}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col.calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{cursor:pointer}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray);opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.active[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-green)}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.spent[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow);opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.disabled[_ngcontent-%COMP%]{pointer-events:none}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .toggle.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);opacity:.4}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .calc-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .first[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);border-top:none}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--ghs-color-white);display:flex;justify-content:center;align-items:center;padding:0 .15em;white-space:nowrap}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:0 .15em}.items-brew-dialog[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto}.items-brew-dialog.fh[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.items-brew-dialog.modern[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] .head-col[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white)}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .herb[_ngcontent-%COMP%]{display:flex;align-items:center}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .herb[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));filter:var(--ghs-filter-white)}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{margin-left:.5em}.items-brew-dialog[_ngcontent-%COMP%] .receipe[_ngcontent-%COMP%] .already[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100%}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;margin:.25em;padding:.25em;border:1px solid transparent}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5em;height:auto;margin-right:.2em;filter:grayscale(.7)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray);border-color:var(--ghs-color-darkgray)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]:hover .icon[_ngcontent-%COMP%]{filter:grayscale(.3)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%]{color:var(--ghs-color-white);border-color:var(--ghs-color-gray)}.items-brew-dialog[_ngcontent-%COMP%] .characters[_ngcontent-%COMP%] .character.selected[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:none}.items-brew-dialog[_ngcontent-%COMP%] .brewed[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%}.items-brew-dialog[_ngcontent-%COMP%] .brewed[_ngcontent-%COMP%] ghs-item[_ngcontent-%COMP%]{position:relative;margin:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 40.5 * var(--ghs-dialog-factor))}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;font-size:2em;padding:.3em}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.cancel[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.apply[_ngcontent-%COMP%]{color:var(--ghs-color-green)}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray)}.items-brew-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray)!important}"]})),a})();function Bz(o,a){if(1&o&&t._UZ(0,"img",23),2&o){const n=t.oxw().$implicit;t.Q6J("src","./assets/images/items/slots/"+n.slot+".svg",t.LSH)}}function zz(o,a){if(1&o&&t._UZ(0,"span",24),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","%game.itemFh."+n.id+"%")}}function Gz(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0("),t._UZ(2,"span",1),t._uU(3,")"),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition)}}function Vz(o,a){1&o&&(t.TgZ(0,"span",25),t._UZ(1,"img",26),t.qZA())}function Yz(o,a){1&o&&(t.TgZ(0,"div",27),t._UZ(1,"img",28),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-tooltip","game.items.effect")("hint",!0))}const Kz=function(o){return{ignore:o}};function $z(o,a){if(1&o&&(t.TgZ(0,"span",29),t._UZ(1,"img",30),t._uU(2),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(2,Kz,e.gameManager.characterManager.ignoreNegativeItemEffects(e.character))),t.xp6(2),t.hij(" x",n.minusOne," ")}}const Wz=function(o){return{disabled:o}};function Xz(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",8)(1,"span",9),t.YNc(2,Bz,1,1,"img",10),t.YNc(3,zz,1,1,"span",11),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.qZA(),t.TgZ(6,"span",13),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEquippedItem(s))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.toggleEquippedItem(s,!0))}),t.TgZ(7,"span"),t._uU(8),t.qZA(),t.YNc(9,Gz,4,1,"span",14),t.qZA(),t._UZ(10,"span",15),t.YNc(11,Vz,2,0,"span",16),t.YNc(12,Yz,2,2,"div",17),t.YNc(13,$z,3,4,"span",18),t.TgZ(14,"a",19),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.sellItem(s))}),t._UZ(15,"img",20),t._uU(16),t.qZA(),t.TgZ(17,"a",21),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeItem(s))}),t._UZ(18,"img",22),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Q6J("ngIf",n.slot),t.xp6(1),t.Q6J("ngIf",!n.slot),t.xp6(2),t.hij("",n.id,"."),t.xp6(1),t.Q6J("ngClass",t.VKq(10,Wz,e.gameManager.game.state!=e.GameState.draw||e.gameManager.game.round>0)),t.xp6(2),t.Oqu(n.name),t.xp6(1),t.Q6J("ngIf",n.edition!=e.itemEdition),t.xp6(2),t.Q6J("ngIf",e.isEquipped(n)),t.xp6(1),t.Q6J("ngIf",e.gameManager.characterManager.itemEffect(n)),t.xp6(1),t.Q6J("ngIf",e.isEquipped(n)&&n.minusOne),t.xp6(3),t.hij(" ",e.gameManager.itemManager.itemSellValue(n)," ")}}function tG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.brewDialog())}),t._UZ(1,"img",32)(2,"span",1),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","game.items.brewing"))}let eG=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"item",void 0),(0,_.Z)(this,"itemIndex",1),(0,_.Z)(this,"itemEdition",""),(0,_.Z)(this,"brewing",0),(0,_.Z)(this,"herbs",[le.CG.rockroot,le.CG.snowthistle,le.CG.axenut,le.CG.flamefruit,le.CG.corpsecap,le.CG.arrowvine]),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.updateItems(),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.updateItems()}}),this.itemEdition||(this.itemEdition=d.v.currentEdition(this.character.edition)),this.editionChange()}ngOnDestroy(){this.itemEdition&&(this.itemEdition=d.v.currentEdition(this.character.edition)),this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}updateItems(){if(this.items=[],this.character.progress.items&&(this.character.progress.items.forEach(e=>{const i=d.v.itemManager.getItem(+e.name,e.edition,!0);i?this.items.push(i):console.warn("Unknown Item for edition '"+e.edition+"': "+e.name)}),this.items.sort((e,i)=>e.id-i.id)),this.brewing=0,d.v.fhRules()&&d.v.game.party.campaignMode&&d.v.game.party.buildings){const e=d.v.game.party.buildings.find(i=>"alchemist"==i.name&&"wrecked"!=i.state);e&&e.level&&(this.brewing=e.level<3?2:3)}}brewDialog(){this.dialog.open(jz,{panelClass:["dialog"],data:this.character})}itemDialog(){this.dialog.open(tm,{panelClass:["dialog"],data:{edition:d.v.game.edition,select:this.character}})}itemChange(e=0){setTimeout(()=>{if(0!=e){const i=d.v.itemManager.maxItemIndex(this.itemEdition||this.character.edition);for(this.itemIndex+=e,this.itemIndex<1&&(this.itemIndex=i),this.item=d.v.itemManager.getItem(this.itemIndex,this.itemEdition&&this.itemEdition||this.character.edition,!1);!this.item&&this.itemIndex>0&&this.itemIndexi&&(this.itemIndex=1,this.item=d.v.itemManager.getItem(this.itemIndex,this.itemEdition||this.character.edition,!1))}else this.item=d.v.itemManager.getItem(this.itemIndex,this.itemEdition||this.character.edition,!1)})}editionChange(){if(this.itemIndex=1,this.itemEdition){const e=d.v.editionData.find(i=>i.edition==this.itemEdition);e&&e.items&&(this.itemIndex=Math.min(...e.items.map(i=>i.id)))}this.itemChange()}canAdd(e){if(e){const i=this.assigned(e);if(e.count&&ie&&s.name==""+e.id&&s.edition==e.edition))return!0}return!1}assigned(e){return d.v.game.figures.filter(i=>i instanceof oe.z&&i.progress&&i.progress.items).map(i=>i).map(i=>i.progress&&i.progress.items).reduce((i,s)=>i&&s&&i.concat(s)).filter(i=>e&&i.name==""+e.id&&i.edition==e.edition).length}canBuy(e,i=0){return e&&e.cost&&e.cost+d.v.itemManager.pricerModifier()+i<=this.character.progress.gold&&this.canAdd(e)||!1}canCraft(e,i={}){if(e){let s=!0;return e.resources&&Object.keys(e.resources).forEach(l=>{const m=l,O=(e.resources[m]||0)+(i[m]||0);s=(0,le.tH)(m)==le.XA.herb_resources?s&&((this.character.progress.loot[m]||0)>=O||(d.v.game.party.loot[m]||0)>=O):s&&(this.character.progress.loot[m]||0)>=O}),e.requiredItems&&e.requiredItems.forEach(l=>{if(l!=e.id){const m=d.v.itemManager.getItem(l,e.edition,!0);m?this.items.find(O=>O.id==m.id&&O.edition==m.edition)||(s=s&&(this.canCraft(m,e.resources||{})||this.canBuy(m,e.cost))):console.error("Missing required item '"+l+"' for item '"+e.id+"' ("+e.name+")")}}),s}return!1}addItem(e,i=!1){e&&(this.canAdd(e)||i)&&(d.v.stateManager.before("addItem","data.character."+this.character.name,e.id+"",e.edition),this.character.progress.items.push(new Vn.xb(e.id+"",e.edition)),this.items.push(e),this.items.sort((s,l)=>s.id-l.id),d.v.stateManager.after(),this.itemChange())}buyItem(e){e&&this.canBuy(e)&&(d.v.stateManager.before("buyItem","data.character."+this.character.name,e.id+"",e.edition),this.character.progress.gold-=e.cost+d.v.itemManager.pricerModifier(),this.character.progress.items.push(new Vn.xb(e.id+"",e.edition)),this.items.push(e),this.items.sort((i,s)=>i.id-s.id),d.v.stateManager.after(),this.itemChange())}craftItemResources(e){this.canCraft(e)&&(e.resources&&Object.keys(e.resources).forEach(i=>{const s=i,l=e.resources[s]||0;(0,le.tH)(s)==le.XA.herb_resources?(this.character.progress.loot[s]||0)>=l?this.character.progress.loot[s]=(this.character.progress.loot[s]||0)-l:d.v.game.party.loot[s]=(d.v.game.party.loot[s]||0)-l:this.character.progress.loot[s]=(this.character.progress.loot[s]||0)-l}),e.requiredItems&&e.requiredItems.forEach(i=>{if(i!=e.id){const s=d.v.itemManager.getItem(i,e.edition,!0);if(s)if(this.items.find(l=>l.id==s.id&&l.edition==s.edition)){const l=this.character.progress.items.find(m=>m.name==""+s.id&&m.edition==s.edition);if(l){const m=this.character.progress.items.indexOf(l);this.character.progress.items.splice(m,1),this.character.progress.equippedItems=this.character.progress.equippedItems.filter(O=>O.name!=""+s.id||O.edition!=s.edition),this.items.splice(m,1)}}else this.canBuy(s)?this.character.progress.gold-=e.cost+d.v.itemManager.pricerModifier():this.craftItemResources(s);else console.error("Missing required item '"+i+"' for item '"+e.id+"' ("+e.name+")")}}))}craftItem(e){e&&this.canCraft(e)&&(d.v.stateManager.before("craftItem","data.character."+this.character.name,e.id+"",e.edition),this.craftItemResources(e),this.character.progress.items.push(new Vn.xb(e.id+"",e.edition)),this.items.push(e),this.items.sort((i,s)=>i.id-s.id),d.v.stateManager.after(),this.itemChange())}removeItem(e){const i=this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(i){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("removeItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),this.character.progress.items.splice(s,1),this.character.progress.equippedItems=this.character.progress.equippedItems.filter(l=>l.name!=""+e.id||l.edition!=e.edition),this.items.splice(s,1),d.v.stateManager.after(),this.itemChange()}}sellItem(e){const i=this.character.progress.items.find(s=>s.name==""+e.id&&s.edition==e.edition);if(i&&d.v.itemManager.itemSellValue(e)){const s=this.character.progress.items.indexOf(i);d.v.stateManager.before("sellItem","data.character."+this.character.name,this.character.progress.items[s].name,this.character.progress.items[s].edition),this.character.progress.gold+=d.v.itemManager.itemSellValue(e),this.character.progress.items.splice(s,1),this.character.progress.equippedItems=this.character.progress.equippedItems.filter(l=>l.name!=""+e.id||l.edition!=e.edition),this.items.splice(s,1),d.v.stateManager.after(),this.itemChange()}}isEquipped(e){return this.character.progress.equippedItems.find(i=>i.name==""+e.id&&i.edition==e.edition)}toggleEquippedItem(e,i=!1){(!(d.v.game.state!=ge.D2.draw||d.v.game.round>0)||i)&&null!=this.character.progress.items.find(l=>l.name==""+e.id&&l.edition==e.edition)&&(d.v.stateManager.before(d.v.itemManager.isEquipped(e,this.character)?"unequipItem":"equipItem","data.character."+this.character.name,""+e.id,e.edition),d.v.itemManager.toggleEquippedItem(e,this.character,i),d.v.stateManager.after())}setItemNotes(e){this.character.progress.itemNotes!=e.target.value&&(d.v.stateManager.before("setItems","data.character."+this.character.name,e.target.value),this.character.progress.itemNotes=e.target.value,d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-items"]],inputs:{character:"character"},decls:11,vars:4,consts:[[1,"items"],[3,"ghs-label"],[1,"item-list"],["class","item-entry",4,"ngFor","ngForOf"],[1,"item-form"],[1,"shop",3,"click"],["src","./assets/images/items/item.svg"],[3,"click",4,"ngIf"],[1,"item-entry"],[1,"icon"],[3,"src",4,"ngIf"],["class","item placeholder",3,"ghs-label",4,"ngIf"],[1,"id"],["ghs-pointer-input","",1,"name",3,"ngClass","singleClick","doubleClick"],[4,"ngIf"],[1,"spacer"],["class","equipped",4,"ngIf"],["class","effect hint-container",4,"ngIf"],["class","minus-one",3,"ngClass",4,"ngIf"],[1,"button","loot",3,"click"],["src","./assets/images/loot.svg"],[1,"button","remove",3,"click"],["src","./assets/images/close.svg"],[3,"src"],[1,"item","placeholder",3,"ghs-label"],[1,"equipped"],["src","./assets/images/check.svg"],[1,"effect","hint-container"],["src","./assets/images/hint.svg",1,"hint-trigger","ghs-svg",3,"ghs-tooltip","hint"],[1,"minus-one",3,"ngClass"],["src","./assets/images/action/card/minus1.svg"],[3,"click"],["src","./assets/images/fh/brewing.svg"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label"),t._UZ(2,"span",1),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",2),t.YNc(5,Xz,19,12,"div",3),t.qZA(),t.TgZ(6,"div",4)(7,"a",5),t.NdJ("click",function(){return i.itemDialog()}),t._UZ(8,"img",6)(9,"span",1),t.qZA(),t.YNc(10,tG,3,1,"a",7),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","game.items"),t.xp6(3),t.Q6J("ngForOf",i.items),t.xp6(4),t.Q6J("ghs-label","game.items.character.shop"),t.xp6(1),t.Q6J("ngIf",i.brewing))},dependencies:[x.mk,x.sg,x.O5,ie,An,Ba],styles:[".items{display:flex;flex-direction:column}.items img{width:auto;height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .button{cursor:pointer;display:flex;align-items:center}.items .button.add img{filter:var(--ghs-filter-green)}.items .button.remove img{filter:var(--ghs-filter-red)}.items .button.loot{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow)}.items .button.loot img{filter:var(--ghs-filter-yellow);width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .button.craft{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));color:var(--ghs-color-black)}.items .button.craft .resource{display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .button.craft .resource img{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .button.craft .item{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .button.disabled{color:var(--ghs-color-darkgray)!important}.items .button.disabled img{filter:var(--ghs-filter-darkgray)!important}.items .button.disabled .item,.items .button.disabled .resource img{opacity:.6}.items .button:hover{opacity:.8}.items .item-list{font-family:var(--ghs-font-text);display:flex;flex-direction:column;overflow:visible}.items .item-list .item-entry{display:flex;align-items:center;margin:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor))}.items .item-list .item-entry .icon{display:flex;justify-content:center;align-items:center;position:relative;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .id{text-align:right;margin-right:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .id{display:flex;justify-content:flex-end;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .item-list .item-entry .name{cursor:pointer;display:inline-block;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.items .item-list .item-entry .name.disabled{cursor:initial}.items .item-list .item-entry .edition{font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .action-icon{width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center}.items .item-list .item-entry .action-icon img{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.items .item-list .item-entry .loot{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .equipped{display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .equipped img{filter:var(--ghs-filter-green);height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:auto}.items .item-list .item-entry .effect.hint-container .hint-trigger.ghs-svg{filter:var(--ghs-filter-gray)}.items .item-list .item-entry .effect.hint-container .hint{left:initial;right:0}.items .item-list .item-entry .minus-one{font-family:var(--ghs-font-title);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.items .item-list .item-entry .minus-one img{margin-right:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.items .item-list .item-entry .minus-one.ignore{opacity:.5}.items .item-form{display:flex;justify-content:space-evenly;align-items:center;max-width:calc(var(--ghs-unit) * 33 * var(--ghs-dialog-factor))}.items .item-form a{cursor:pointer;color:var(--ghs-color-black);display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.items .item-form a img{height:1em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}\n"],encapsulation:2})),a})();const nG=["charactertitle"];function iG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"input",63,64),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.titleChange())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("value",n.character.title)}}function oG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t._UZ(1,"img",5),t.TgZ(2,"input",63),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw(2);return t.KtG(m.setTitle(i,l))}),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("src",e.gameManager.characterManager.characterIdentityIcon(e.character.name,n),t.LSH),t.xp6(1),t.Q6J("value",e.titles[n])}}const r_=function(){return[]};function aG(o,a){if(1&o&&(t.ynx(0),t.YNc(1,oG,3,2,"ng-container",19),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,r_),n.character.identities.length))}}const c_=function(o){return{checked:o}};function sG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",65),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s+1))}),t._uU(2),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,c_,e.character.level>n)),t.xp6(1),t.Oqu(n+1)}}function rG(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",66),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.setLevel(s+1))}),t._uU(2),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,c_,e.character.progress.experience>=e.gameManager.characterManager.xpMap[n])),t.xp6(1),t.hij(" ",e.gameManager.characterManager.xpMap[n]," ")}}function cG(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",12),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.notes"))}function lG(o,a){1&o&&(t.TgZ(0,"label"),t._UZ(1,"span",12),t._uU(2,":"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.gold-notes"))}function gG(o,a){1&o&&(t.TgZ(0,"label"),t._UZ(1,"span",12)(2,"img",67),t._uU(3,":"),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.gold"))}const Gw=function(o){return[o]};function dG(o,a){if(1&o&&(t.TgZ(0,"span",68),t._UZ(1,"span",8),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","character.progress.donations")("ghs-label-args",t.VKq(2,Gw,""+n.character.progress.donations))}}const QT=function(o){return{disabled:o}};function hG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",69),t._UZ(1,"span",12),t._uU(2,": "),t.TgZ(3,"a",70),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.donate())}),t.TgZ(4,"span",71),t._UZ(5,"img",72),t._uU(6),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","character.progress.donate"),t.xp6(2),t.Q6J("ngClass",t.VKq(3,QT,n.character.progress.gold<(n.fhSheet?5:10)||n.gameManager.game.round>0)),t.xp6(3),t.Oqu(n.fhSheet?5:10)}}function uG(o,a){1&o&&t._UZ(0,"hr",28)}function _G(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",73)(1,"label"),t._UZ(2,"span",12),t._uU(3,":"),t.qZA(),t.TgZ(4,"a",74),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.moveResources())}),t._UZ(5,"span",12),t.qZA(),t.TgZ(6,"div",75)(7,"div",76)(8,"div",77),t._UZ(9,"img",78),t.TgZ(10,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.lumber,i))}),t.qZA()(),t.TgZ(11,"div",79),t._UZ(12,"img",80),t.TgZ(13,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.metal,i))}),t.qZA()(),t.TgZ(14,"div",81),t._UZ(15,"img",82),t.TgZ(16,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.hide,i))}),t.qZA()()(),t.TgZ(17,"div",83)(18,"div",84),t._UZ(19,"img",85),t.TgZ(20,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.arrowvine,i))}),t.qZA()(),t.TgZ(21,"div",86),t._UZ(22,"img",87),t.TgZ(23,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.axenut,i))}),t.qZA()(),t.TgZ(24,"div",88),t._UZ(25,"img",89),t.TgZ(26,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.corpsecap,i))}),t.qZA()(),t.TgZ(27,"div",90),t._UZ(28,"img",91),t.TgZ(29,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.flamefruit,i))}),t.qZA()(),t.TgZ(30,"div",92),t._UZ(31,"img",93),t.TgZ(32,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.rockroot,i))}),t.qZA()(),t.TgZ(33,"div",94),t._UZ(34,"img",95),t.TgZ(35,"input",22),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setResource(s.LootType.snowthistle,i))}),t.qZA()()()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","character.progress.resources"),t.xp6(3),t.Q6J("ghs-label","character.progress.resources.move"),t.xp6(5),t.Q6J("value",n.character.progress.loot.lumber),t.xp6(3),t.Q6J("value",n.character.progress.loot.metal),t.xp6(3),t.Q6J("value",n.character.progress.loot.hide),t.xp6(4),t.Q6J("value",n.character.progress.loot.arrowvine),t.xp6(3),t.Q6J("value",n.character.progress.loot.axenut),t.xp6(3),t.Q6J("value",n.character.progress.loot.corpsecap),t.xp6(3),t.Q6J("value",n.character.progress.loot.flamefruit),t.xp6(3),t.Q6J("value",n.character.progress.loot.rockroot),t.xp6(3),t.Q6J("value",n.character.progress.loot.snowthistle)}}function pG(o,a){1&o&&(t.TgZ(0,"span",104),t._uU(1,"-"),t.qZA())}function fG(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"span",102),t.YNc(2,pG,2,0,"span",103),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ghs-label","data.character.traits."+n),t.xp6(1),t.Q6J("ngIf",e0),t.xp6(1),t.Q6J("value",n.character.progress.notes)("ghs-label","character.progress.notes")("ghs-label-attribute","placeholder")}}function CG(o,a){if(1&o&&t._UZ(0,"ghs-character-items",105),2&o){const n=t.oxw();t.Q6J("character",n.character)}}function MG(o,a){1&o&&t._UZ(0,"hr",28)}function OG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",109)(1,"span",110),t._UZ(2,"img",111),t._uU(3,":"),t.qZA(),t.TgZ(4,"span",112),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.toggleMastery(s))}),t.qZA(),t._UZ(5,"span",113),t.qZA()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(4),t.Q6J("ngClass",t.VKq(2,c_,-1!=i.character.progress.masteries.indexOf(e))),t.xp6(1),t.Q6J("ghs-label",n)}}function PG(o,a){if(1&o&&(t.TgZ(0,"div",106)(1,"label"),t._UZ(2,"span",12),t._uU(3,":"),t.qZA(),t.TgZ(4,"div",107),t.YNc(5,OG,6,4,"div",108),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","character.progress.masteries"),t.xp6(3),t.Q6J("ngForOf",n.character.masteries)}}function yG(o,a){1&o&&t._UZ(0,"hr",28)}function bG(o,a){1&o&&(t.TgZ(0,"label",114),t._UZ(1,"span",12),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","game.attackModifiers.perks"))}const xG=function(o,a){return{checked:o,disabled:a}};function wG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",119),t.NdJ("singleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw().index,m=t.oxw();return t.KtG(m.addPerk(l,s+1))})("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw().index,m=t.oxw();return t.KtG(m.addPerk(l,s+1,!0))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw().index,i=t.oxw();t.Q6J("ngClass",t.WLB(1,xG,i.character.progress.perks[e]&&i.character.progress.perks[e]>n,i.gameManager.game.state!=i.GameState.draw||i.gameManager.game.round>0||i.character.progress.perks[e]<=n&&i.availablePerks=n+1))}}function NG(o,a){1&o&&t._UZ(0,"hr",28)}function JG(o,a){1&o&&(t.TgZ(0,"label",114),t._UZ(1,"span",12),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","character.progress.notes"))}function UG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"textarea",98),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.setNotes(i))}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("value",n.character.progress.notes)("ghs-label","character.progress.notes")("ghs-label-attribute","placeholder")}}function LG(o,a){if(1&o&&t._UZ(0,"ghs-character-items",125),2&o){const n=t.oxw();t.Q6J("character",n.character)}}function QG(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"/"),t.qZA())}function RG(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Oqu(n.gameManager.game.party.players[n.character.number-1])}}function FG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",126),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleRetired())}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(3,c_,n.retired))("ghs-label","character.progress.retired")("ghs-label-attribute","title")}}function qG(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij("\xa0(",n.personalQuest.altId,")")}}function HG(o,a){if(1&o&&(t.TgZ(0,"span",127),t._UZ(1,"span",12),t.YNc(2,qG,2,1,"span",13),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","data.personalQuest."+n.personalQuest.cardId),t.xp6(1),t.Q6J("ngIf",n.personalQuest.altId)}}function jG(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.xp6(1),t.AsE("\xa0",s.character.progress.personalQuestProgress[e]||0,"/",s.EntityValueFunction(i.counter),"")}}function BG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",135),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2).index,m=t.oxw(2);return t.KtG(m.setPersonalQuestProgress(l,s+1))}),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw(2).index,i=t.oxw(2);t.Q6J("ngClass",t.VKq(3,c_,i.character.progress.personalQuestProgress[e]>n))("ghs-label","character.progress.personalQuest.counter")("ghs-label-attribute","title")}}function zG(o,a){if(1&o&&(t.ynx(0),t.YNc(1,BG,1,5,"span",134),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,r_),e.EntityValueFunction(n.counter)))}}function GG(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",136),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw().index,l=t.oxw(2);return t.KtG(l.setPersonalQuestProgress(s,i))}),t.qZA()}if(2&o){const n=t.oxw(),e=n.index,i=n.$implicit,s=t.oxw(2);t.Q6J("value",s.character.progress.personalQuestProgress[e])("max",s.EntityValueFunction(i.counter))}}function VG(o,a){if(1&o&&(t.TgZ(0,"div",130)(1,"span",131),t._UZ(2,"span",12),t._uU(3,":"),t.YNc(4,jG,2,2,"span",13),t.qZA(),t.TgZ(5,"span",132),t.YNc(6,zG,3,5,"ng-container",13),t.YNc(7,GG,1,2,"input",133),t.qZA()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("ngClass",t.VKq(5,QT,n.requires&&n.requires.length>0&&!i.personalQuestRequirementUnlocked(e))),t.xp6(2),t.Q6J("ghs-label",n.name),t.xp6(2),t.Q6J("ngIf",i.EntityValueFunction(n.counter)>1),t.xp6(2),t.Q6J("ngIf",i.EntityValueFunction(n.counter)<11),t.xp6(1),t.Q6J("ngIf",i.EntityValueFunction(n.counter)>10)}}function YG(o,a){if(1&o&&(t.TgZ(0,"div",128),t.YNc(1,VG,8,7,"div",129),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.personalQuest.requirements)}}function KG(o,a){if(1&o&&t._UZ(0,"div",139),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.unlockCharacter")("ghs-label-args",t.VKq(2,Gw,n.personalQuest.unlockCharacter))}}function $G(o,a){if(1&o&&t._UZ(0,"div",139),2&o){const n=t.oxw(2);t.Q6J("ghs-label","character.progress.personalQuest.openEnvelope")("ghs-label-args",t.VKq(2,Gw,n.personalQuest.openEnvelope))}}function WG(o,a){if(1&o&&(t.TgZ(0,"div",137),t.YNc(1,KG,1,4,"div",138),t.YNc(2,$G,1,4,"div",138),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.personalQuest.unlockCharacter),t.xp6(1),t.Q6J("ngIf",n.personalQuest.openEnvelope)}}const XG=function(o,a,n){return{"cs-sheet":o,"fh-sheet":a,compact:n}},tV=function(o){return{denied:o}},eV=function(o){return{absent:o}},nV=function(o,a){return[o,a]};let RT=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"standalone",!1),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"ghsInputFullScreenCheck",he.lz),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"PerkType",n_.Ib),(0,_.Z)(this,"LootType",le.CG),(0,_.Z)(this,"availablePerks",0),(0,_.Z)(this,"perksWip",!0),(0,_.Z)(this,"retired",!1),(0,_.Z)(this,"personalQuest",void 0),(0,_.Z)(this,"goldTimeout",null),(0,_.Z)(this,"xpTimeout",null),(0,_.Z)(this,"fhSheet",!1),(0,_.Z)(this,"csSheet",!1),(0,_.Z)(this,"donations",!0),(0,_.Z)(this,"titles",[]),this.dialog=e}ngOnInit(){if(this.retired=this.character.progress.retired,this.character.identities&&this.character.identities.length>1&&R.r.settings.characterIdentities){if(this.titles=this.character.title.split("|"),this.titles.length"temple"==e.name&&e.level>0&&"wrecked"!=e.state)&&(this.donations=!0)}this.character.progress.experience0?this.character.progress.perks.reduce((e,i)=>e+i):0)-1+this.character.progress.extraPerks+this.character.progress.retirements+this.character.progress.masteries.length,this.perksWip=0==this.character.perks.length||this.character.perks.map(e=>e.count).reduce((e,i)=>e+i)!=("fh"==this.character.edition?18:15),this.character.progress.personalQuest&&(this.personalQuest=d.v.characterManager.personalQuestByCard(d.v.currentEdition(),this.character.progress.personalQuest),this.character.progress.personalQuestProgress||(this.character.progress.personalQuestProgress=[])),d.v.uiChange.subscribe({next:()=>{this.availablePerks=this.character.level+Math.floor(this.character.progress.battleGoals/3)-(this.character.progress.perks&&this.character.progress.perks.length>0?this.character.progress.perks.reduce((e,i)=>e+i):0)-1+this.character.progress.extraPerks+this.character.progress.retirements+this.character.progress.masteries.length;for(let e=0;e<15;e++)this.character.progress.perks[e]||(this.character.progress.perks[e]=0);this.personalQuest&&(this.retired=this.personalQuest.requirements.every((e,i)=>this.character.progress.personalQuestProgress[i]>=(0,ae.j9)(e.counter)))}})}applyValues(){let e="";if(this.titleInput&&(e=this.titleInput.nativeElement.value),this.titles.length>0){for(let i=0;i{i&&(d.v.stateManager.before("setRetired","data.character."+this.character.name),this.character.progress.retired=this.retired,d.v.game.party.retirements.push(this.character.toModel()),d.v.characterManager.removeCharacter(this.character,!0),d.v.stateManager.after())}}):(d.v.stateManager.before(this.character.progress.retired?"setRetired":"unsetRetired","data.character."+this.character.name),this.character.progress.retired=this.retired,this.retired&&d.v.game.party.campaignMode&&(d.v.game.party.retirements.push(this.character.toModel()),d.v.characterManager.removeCharacter(this.character)),d.v.stateManager.after()))}titleChange(){this.standalone&&this.applyValues()}toggleRetired(){this.retired=!this.retired,this.standalone&&this.applyValues()}ngAfterViewInit(){this.titleInput&&(this.titleInput.nativeElement.value=this.character.title||R.r.getLabel("data.character."+this.character.name.toLowerCase()))}toggleCharacterAbsent(){(this.character.absent||d.v.characterManager.characterCount()>1)&&(d.v.stateManager.before(this.character.absent?"unsetAbsent":"setAbsent","data.character."+this.character.name),this.character.absent=!this.character.absent,this.character.absent&&this.character.active&&d.v.roundManager.toggleFigure(this.character),d.v.stateManager.after())}setTitle(e,i){this.titles[i]=e.target.value,this.titleChange()}setLevel(e){this.character.level==e&&e--,e<1?e=1:e>9&&(e=9),d.v.stateManager.before("setLevel","data.character."+this.character.name,""+e),d.v.characterManager.setLevel(this.character,e),d.v.stateManager.after()}setXP(e){!isNaN(+e.target.value)&&this.character.progress.experience!=+e.target.value&&(this.xpTimeout&&(clearTimeout(this.xpTimeout),this.xpTimeout=null),this.xpTimeout=setTimeout(()=>{d.v.stateManager.before("setXP","data.character."+this.character.name,(0,he.uZ)(+e.target.value-this.character.progress.experience)),d.v.characterManager.addXP(this.character,e.target.value-this.character.progress.experience,!d.v.game.scenario&&d.v.roundManager.firstRound),d.v.stateManager.after(),this.xpTimeout=null},500))}setGold(e){!isNaN(+e.target.value)&&this.character.progress.gold!=+e.target.value&&(this.goldTimeout&&(clearTimeout(this.goldTimeout),this.goldTimeout=null),this.goldTimeout=setTimeout(()=>{d.v.stateManager.before("setGold","data.character."+this.character.name,e.target.value),this.character.progress.gold=+e.target.value,d.v.stateManager.after(),this.goldTimeout=null},500))}setResource(e,i){isNaN(+i.target.value)||(d.v.stateManager.before("setResource","data.character."+this.character.name,"game.loot."+e,i.target.value),this.character.progress.loot[e]=+i.target.value,d.v.stateManager.after())}donate(){d.v.game.round<1&&this.character.progress.gold>9&&(d.v.stateManager.before("donate","data.character."+this.character.name),this.character.progress.donations+=1,this.character.donations+=1,d.v.game.party.donations+=1,this.character.progress.gold-=this.fhSheet?5:10,d.v.stateManager.after())}setPersonalQuest(e){this.character.progress.personalQuest!=e.target.value&&(d.v.stateManager.before("setPQ","data.character."+this.character.name,e.target.value),this.character.progress.personalQuest=e.target.value,this.character.progress.personalQuestProgress=[],this.personalQuest=d.v.characterManager.personalQuestByCard(d.v.currentEdition(),this.character.progress.personalQuest),this.personalQuest&&this.character.progress.personalQuest!=this.personalQuest.cardId&&(this.character.progress.personalQuest=this.personalQuest.cardId),d.v.stateManager.after())}setPersonalQuestProgress(e,i){this.character.progress.personalQuestProgress[e]||(this.character.progress.personalQuestProgress[e]=0);let s=0;s="number"==typeof i?i:+i.target.value,this.character.progress.personalQuestProgress[e]==s&&s--,d.v.stateManager.before("setPQProgress","data.character."+this.character.name,""+(e+1),""+s),this.character.progress.personalQuestProgress[e]=s,d.v.stateManager.after()}personalQuestRequirementUnlocked(e){return null!=this.personalQuest&&null!=this.personalQuest.requirements[e]&&this.personalQuest.requirements[e].requires&&this.personalQuest.requirements[e].requires.every(i=>this.personalQuest&&this.character.progress.personalQuestProgress[i-1]>=(0,ae.j9)(this.personalQuest.requirements[i-1].counter))}setExtraPerks(e){!isNaN(+e.target.value)&&this.character.progress.extraPerks!=+e.target.value&&(d.v.stateManager.before("setExtraPerks","data.character."+this.character.name,e.target.value),this.character.progress.extraPerks=+e.target.value,d.v.stateManager.after())}setRetirements(e){!isNaN(+e.target.value)&&this.character.progress.retirements!=+e.target.value&&(d.v.stateManager.before("setRetirements","data.character."+this.character.name,e.target.value),this.character.progress.retirements=+e.target.value,d.v.stateManager.after())}setPlayerNumber(e){if(!isNaN(+e.target.value)&&this.character.number!=+e.target.value&&+e.target.value>0){d.v.stateManager.before("setPlayerNumber","data.character."+this.character.name,e.target.value);const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.number==+e.target.value);i&&(i.number=this.character.number),this.character.number=+e.target.value,d.v.stateManager.after()}}setBattleGoals(e){this.character.progress.battleGoals==e&&e--,e<0?e=0:e>18&&(e=18),this.character.progress.battleGoals!=e&&(d.v.stateManager.before("setBG","data.character."+this.character.name,""+e),this.character.progress.battleGoals=e,d.v.stateManager.after())}setNotes(e){this.character.progress.notes!=e.target.value&&(d.v.stateManager.before("setNotes","data.character."+this.character.name,e.target.value),this.character.progress.notes=e.target.value,d.v.stateManager.after())}toggleMastery(e){this.character.progress.masteries||(this.character.progress.masteries=[]),-1==this.character.progress.masteries.indexOf(e)?(d.v.stateManager.before("addMastery","data.character."+this.character.name,""+e),this.character.progress.masteries.push(e)):(d.v.stateManager.before("removeMastery","data.character."+this.character.name,""+e),this.character.progress.masteries.splice(this.character.progress.masteries.indexOf(e),1)),d.v.stateManager.after()}addPerk(e,i,s=!1){(!(d.v.game.state!=ge.D2.draw||d.v.game.round>0||this.character.progress.perks[e]{const m=Object.assign(new oe.z(this.character,this.character.level).toModel(),JSON.parse(l.target.result));m.name!=this.character.name||m.edition!=this.character.edition?i.classList.add("error"):(d.v.stateManager.before("importCharacter","data.character."+this.character.name),this.character.fromModel(m),d.v.stateManager.after())}),s.readAsText(e.target.files[0])}catch(s){console.warn(s),i.classList.add("error")}}toggleFhSheet(){this.fhSheet=!this.fhSheet,this.csSheet=!this.fhSheet&&("cs"==this.character.edition||-1!=d.v.editionExtensions(this.character.edition).indexOf("cs"))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-sheet"]],viewQuery:function(e,i){if(1&e&&t.Gf(nG,5),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first)}},inputs:{character:"character",standalone:"standalone"},decls:117,vars:88,consts:[[1,"light","character-sheet",3,"ngClass"],[1,"container",3,"ngClass"],[1,"columns"],[1,"column","column-left"],[1,"row","title"],[3,"src"],[1,"headline",3,"ngClass","ghs-label","ghs-label-attribute","click"],[1,"character-title"],[3,"ghs-label","ghs-label-args"],[1,"absent",3,"src","ghs-label","ghs-label-attribute"],[1,"row","base"],[1,"name"],[3,"ghs-label"],[4,"ngIf"],[1,"level"],[1,"column"],["src","./assets/images/level.svg"],["src","./assets/images/experience.svg"],[1,"level-grid"],[4,"ngFor","ngForOf"],[1,"xp-gold-container"],[1,"row","xp-notes"],["type","number","min","0",3,"value","change"],[1,"row","gold-notes"],["class","donations",4,"ngIf"],["class","donate",4,"ngIf"],["class","compact-separator",4,"ngIf"],["class","row resources",4,"ngIf"],[1,"compact-separator"],["class","row notes",4,"ngIf"],["class","row",3,"character",4,"ngIf"],["class","row masteries",4,"ngIf"],[1,"column","column-right"],[1,"row","perks"],["class","headline",4,"ngIf"],[1,"list"],["class","perk",4,"ngFor","ngForOf"],["class","warning",3,"ghs-label","ghs-label-attribute",4,"ngIf"],["class","wip",3,"ghs-label","ghs-label-attribute",4,"ngIf"],[1,"row","battlegoals"],[1,"battlegoals-grid"],[1,"additional"],[3,"value","ghs-label","ghs-label-attribute","change",4,"ngIf"],[3,"character",4,"ngIf"],[1,"player-number"],["type","number","min","1",3,"value","change","keyup"],[1,"personal-quest"],[1,"personal-quest-card"],["type","text",1,"card-id",3,"value","change"],["class","retired checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click",4,"ngIf"],["class","personal-quest-name",4,"ngIf"],["class","requirements",4,"ngIf"],["class","rewards",4,"ngIf"],[1,"retirements"],["type","number","min","0",3,"value","change","keyup"],[1,"extra-perks"],[1,"import-export"],[1,"export",3,"ghs-label","ghs-label-attribute","click"],["src","./assets/images/export.svg"],[1,"import",3,"ghs-label","ghs-label-attribute","click"],["type","file","accept","application/json",3,"change"],["src","./assets/images/import.svg"],[1,"toggle-fh-sheet",3,"click"],["type","text",3,"value","change"],["charactertitle",""],[1,"checkbox","level-item",3,"ngClass","click"],[1,"xp-item",3,"ngClass","click"],["src","./assets/images/fh/loot.svg"],[1,"donations"],[1,"donate"],[3,"ngClass","click"],[1,"price"],["src","./assets/images/loot.svg"],[1,"row","resources"],[1,"move",3,"click"],[1,"resource-table"],[1,"materials"],[1,"resource","lumber"],["src","./assets/images/fh/loot/lumber.svg"],[1,"resource","metal"],["src","./assets/images/fh/loot/metal.svg"],[1,"resource","hide"],["src","./assets/images/fh/loot/hide.svg"],[1,"herbs"],[1,"resource","arrowvine"],["src","./assets/images/fh/loot/arrowvine.svg"],[1,"resource","axenut"],["src","./assets/images/fh/loot/axenut.svg"],[1,"resource","corpsecap"],["src","./assets/images/fh/loot/corpsecap.svg"],[1,"resource","flamefruit"],["src","./assets/images/fh/loot/flamefruit.svg"],[1,"resource","rockroot"],["src","./assets/images/fh/loot/rockroot.svg"],[1,"resource","snowthistle"],["src","./assets/images/fh/loot/snowthistle.svg"],[1,"row","notes"],["class","traits",4,"ngIf"],[3,"value","ghs-label","ghs-label-attribute","change"],[1,"traits"],[1,"icon"],["src","./assets/images/fh/character/traits/trait.svg",1,"ghs-svg"],[1,"trait",3,"ghs-label"],["class","divider",4,"ngIf"],[1,"divider"],[1,"row",3,"character"],[1,"row","masteries"],[1,"masteries-list"],["class","mastery",4,"ngFor","ngForOf"],[1,"mastery"],[1,"checkmark"],["src","./assets/images/check.svg"],[1,"mastery-check","checkbox",3,"ngClass","click"],[1,"placeholder","text",3,"ghs-label"],[1,"headline"],[1,"perk"],[1,"checkboxes",3,"ngClass"],["class","checkbox","ghs-pointer-input","",3,"ngClass","singleClick","doubleClick",4,"ngFor","ngForOf"],[3,"perk"],["ghs-pointer-input","",1,"checkbox",3,"ngClass","singleClick","doubleClick"],[1,"warning",3,"ghs-label","ghs-label-attribute"],["src","./assets/images/warning.svg",1,"ghs-svg"],[1,"wip",3,"ghs-label","ghs-label-attribute"],["class","checkmark",4,"ngIf"],[1,"battlegoal","checkbox",3,"ngClass","click"],[3,"character"],[1,"retired","checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click"],[1,"personal-quest-name"],[1,"requirements"],["class","requirement",3,"ngClass",4,"ngFor","ngForOf"],[1,"requirement",3,"ngClass"],[1,"requirement-name"],[1,"counter"],["type","number","min","0",3,"value","max","change",4,"ngIf"],["class","checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click",4,"ngFor","ngForOf"],[1,"checkbox",3,"ngClass","ghs-label","ghs-label-attribute","click"],["type","number","min","0",3,"value","max","change"],[1,"rewards"],["class","reward",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"reward",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"img",5),t.TgZ(6,"label",6),t.NdJ("click",function(){return i.toggleCharacterAbsent()}),t.TgZ(7,"div",7),t._UZ(8,"span",8),t.qZA(),t._UZ(9,"img",9),t.qZA()(),t.TgZ(10,"div",10)(11,"div",11)(12,"label"),t._UZ(13,"span",12),t._uU(14,":"),t.qZA(),t.YNc(15,iG,3,1,"ng-container",13),t.YNc(16,aG,3,5,"ng-container",13),t.qZA(),t.TgZ(17,"div",14)(18,"div",2)(19,"div",15)(20,"label"),t._UZ(21,"span",12)(22,"img",16),t._uU(23,":"),t.qZA(),t.TgZ(24,"label"),t._UZ(25,"span",12)(26,"img",17),t._uU(27,":"),t.qZA()(),t.TgZ(28,"div",15)(29,"div",18),t.YNc(30,sG,3,4,"ng-container",19),t.ALo(31,"ghsRange"),t.YNc(32,rG,3,4,"ng-container",19),t.ALo(33,"ghsRange"),t.qZA()()()()(),t.TgZ(34,"div",20)(35,"div",21)(36,"label"),t._UZ(37,"span",12)(38,"img",17),t.YNc(39,cG,2,1,"span",13),t._uU(40,":"),t.qZA(),t.TgZ(41,"input",22),t.NdJ("change",function(l){return i.setXP(l)}),t.qZA()(),t.TgZ(42,"div",23),t.YNc(43,lG,3,1,"label",13),t.YNc(44,gG,4,1,"label",13),t.TgZ(45,"input",22),t.NdJ("change",function(l){return i.setGold(l)}),t.qZA(),t.YNc(46,dG,2,4,"span",24),t.YNc(47,hG,7,5,"span",25),t.qZA()(),t.YNc(48,uG,1,0,"hr",26),t.YNc(49,_G,36,11,"div",27),t._UZ(50,"hr",28),t.YNc(51,vG,6,5,"div",29),t.YNc(52,CG,1,1,"ghs-character-items",30),t.YNc(53,MG,1,0,"hr",26),t.YNc(54,PG,6,2,"div",31),t.qZA(),t.TgZ(55,"div",32),t.YNc(56,yG,1,0,"hr",26),t.TgZ(57,"div",33),t.YNc(58,bG,2,1,"label",34),t.TgZ(59,"div",35),t.YNc(60,TG,5,9,"div",36),t.qZA(),t.YNc(61,ZG,3,3,"div",37),t.YNc(62,AG,3,3,"div",38),t.qZA(),t.TgZ(63,"div",39),t.YNc(64,SG,2,1,"label",34),t.YNc(65,EG,2,1,"label",34),t.TgZ(66,"div",40),t.YNc(67,IG,3,4,"ng-container",19),t.ALo(68,"ghsRange"),t.qZA()(),t.YNc(69,NG,1,0,"hr",26),t.qZA()(),t.TgZ(70,"div",41),t._UZ(71,"hr",28),t.YNc(72,JG,2,1,"label",34),t.TgZ(73,"div",2)(74,"div",3),t.YNc(75,UG,1,3,"textarea",42),t.YNc(76,LG,1,1,"ghs-character-items",43),t.qZA(),t.TgZ(77,"div",32)(78,"div",11),t.YNc(79,QG,2,0,"span",13),t.YNc(80,RG,2,1,"span",13),t.qZA(),t.TgZ(81,"div",44)(82,"label"),t._UZ(83,"span",12),t._uU(84,":"),t.qZA(),t.TgZ(85,"input",45),t.NdJ("change",function(l){return i.setPlayerNumber(l)})("keyup",function(l){return i.setPlayerNumber(l)}),t.qZA()(),t.TgZ(86,"div",46)(87,"label"),t._UZ(88,"span",12),t._uU(89,":"),t.qZA(),t.TgZ(90,"div",47)(91,"input",48),t.NdJ("change",function(l){return i.setPersonalQuest(l)}),t.qZA(),t.YNc(92,FG,1,5,"span",49),t.YNc(93,HG,3,2,"span",50),t.qZA(),t.YNc(94,YG,2,1,"div",51),t.YNc(95,WG,3,2,"div",52),t.qZA(),t.TgZ(96,"div",53)(97,"label"),t._UZ(98,"span",12),t._uU(99,":"),t.qZA(),t.TgZ(100,"input",54),t.NdJ("change",function(l){return i.setRetirements(l)})("keyup",function(l){return i.setRetirements(l)}),t.qZA()(),t.TgZ(101,"div",55)(102,"label"),t._UZ(103,"span",12),t._uU(104,":"),t.qZA(),t.TgZ(105,"input",54),t.NdJ("change",function(l){return i.setExtraPerks(l)})("keyup",function(l){return i.setExtraPerks(l)}),t.qZA()(),t._UZ(106,"hr",28),t.TgZ(107,"div",56)(108,"label",57),t.NdJ("click",function(){return i.exportCharacter()}),t._UZ(109,"img",58)(110,"span",12),t.qZA(),t.TgZ(111,"label",59),t.NdJ("click",function(){return i.ghsInputFullScreenCheck()}),t.TgZ(112,"input",60),t.NdJ("change",function(l){return i.importCharacter(l)}),t.qZA(),t._UZ(113,"img",61)(114,"span",12),t.qZA()(),t.TgZ(115,"span",62),t.NdJ("click",function(){return i.toggleFhSheet()}),t._UZ(116,"span",12),t.qZA()()()()()()),2&e&&(t.Q6J("ngClass",t.kEZ(74,XG,i.csSheet,i.fhSheet,i.settingsManager.settings.characterSheetCompact)),t.xp6(1),t.Q6J("ngClass",t.VKq(78,tV,!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition])),t.xp6(4),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(80,eV,i.character.absent))("ghs-label",i.character.absent?"character.absent":"character.present")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ghs-label","character.progress.title")("ghs-label-args",t.WLB(82,nV,"data.character."+i.character.name,i.character.characterClass?"character.class."+(i.character.gender?i.character.gender+".":"")+i.character.characterClass:"")),t.xp6(1),t.Q6J("src","./assets/images/status/"+(i.character.absent?"absent":"present")+".svg",t.LSH)("ghs-label",i.character.absent?"character.present":"character.absent")("ghs-label-attribute","title"),t.xp6(4),t.Q6J("ghs-label","character.progress.name"),t.xp6(2),t.Q6J("ngIf",0==i.titles.length||!i.settingsManager.settings.characterIdentities),t.xp6(1),t.Q6J("ngIf",i.titles.length>0&&i.settingsManager.settings.characterIdentities),t.xp6(5),t.Q6J("ghs-label","character.progress.level"),t.xp6(4),t.Q6J("ghs-label","character.progress.xp"),t.xp6(5),t.Q6J("ngForOf",t.xi3(31,65,t.DdM(85,r_),9)),t.xp6(2),t.Q6J("ngForOf",t.xi3(33,68,t.DdM(86,r_),9)),t.xp6(5),t.Q6J("ghs-label","character.progress.xp"),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("value",i.character.progress.experience),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("value",i.character.progress.gold),t.xp6(1),t.Q6J("ngIf",i.donations),t.xp6(1),t.Q6J("ngIf",i.donations),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(2),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("ngIf",!i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("ngIf",!i.fhSheet),t.xp6(2),t.Q6J("ngForOf",i.character.perks),t.xp6(1),t.Q6J("ngIf",i.availablePerks<0),t.xp6(1),t.Q6J("ngIf",i.perksWip),t.xp6(2),t.Q6J("ngIf",!i.fhSheet&&!i.csSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(2),t.Q6J("ngForOf",t.xi3(68,71,t.DdM(87,r_),18)),t.xp6(2),t.Q6J("ngIf",i.fhSheet),t.xp6(3),t.Q6J("ngIf",!i.settingsManager.settings.characterSheetCompact||!i.fhSheet),t.xp6(3),t.Q6J("ngIf",!i.fhSheet),t.xp6(1),t.Q6J("ngIf",i.fhSheet),t.xp6(3),t.Q6J("ngIf",0==i.character.number||i.character.number>i.gameManager.game.party.players.length||!i.gameManager.game.party.players[i.character.number-1]),t.xp6(1),t.Q6J("ngIf",i.character.number>0&&i.character.number<=i.gameManager.game.party.players.length&&i.gameManager.game.party.players[i.character.number-1]),t.xp6(3),t.Q6J("ghs-label","character.playerNumber"),t.xp6(2),t.Q6J("value",i.character.number),t.xp6(3),t.Q6J("ghs-label","character.progress.personalQuest"),t.xp6(3),t.Q6J("value",i.character.progress.personalQuest),t.xp6(1),t.Q6J("ngIf",!i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(1),t.Q6J("ngIf",i.personalQuest),t.xp6(3),t.Q6J("ghs-label","character.progress.retirements"),t.xp6(2),t.Q6J("value",i.character.progress.retirements),t.xp6(3),t.Q6J("ghs-label","character.progress.perks.extra"),t.xp6(2),t.Q6J("value",i.character.progress.extraPerks),t.xp6(3),t.Q6J("ghs-label","character.progress.export")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ghs-label","character.progress.export"),t.xp6(1),t.Q6J("ghs-label","character.progress.import")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("ghs-label","character.progress.import"),t.xp6(2),t.Q6J("ghs-label","character.progress.fh."+(i.fhSheet?"disable":"enable")))},dependencies:[x.mk,x.sg,x.O5,rT,eG,ie,An,Ii],styles:['.character-sheet{position:relative;background-color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet .container{width:calc(var(--ghs-unit) * 62 * var(--ghs-dialog-factor));height:100%;background-image:url(character-sheet.70b336945f4b7a49.svg);background-position:top center;background-repeat:no-repeat;background-size:contain;padding-left:calc(var(--ghs-unit) * 1.2 * var(--ghs-dialog-factor))}.character-sheet .container .compact-separator{display:none}.character-sheet .container .columns{display:flex}.character-sheet .container .columns .column{display:flex;flex-direction:column}.character-sheet .container .columns .column.column-left{width:calc(var(--ghs-unit) * 32 * var(--ghs-dialog-factor))}.character-sheet .container .columns .column.column-right{margin-left:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 25 * var(--ghs-dialog-factor))}.character-sheet .container .columns .column .row{display:flex}.character-sheet .container label{display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));white-space:nowrap}.character-sheet .container label img{width:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));height:auto;margin:0 calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.character-sheet .container label.headline{width:100%;justify-content:center}.character-sheet .container label.headline.absent{text-decoration:line-through}.character-sheet .container .title{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor))}.character-sheet .container .title img{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto}.character-sheet .container .title label{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));padding-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));overflow:hidden}.character-sheet .container .title label .character-title{display:table;align-self:center;cursor:pointer}.character-sheet .container .title label .absent{cursor:pointer}.character-sheet .container .base{flex-direction:column;height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.character-sheet .container .base .level-grid{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(9,1fr)}.character-sheet .container .base .level-grid .level-item{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));z-index:2}.character-sheet .container .base .level-grid .level-item.checked:before{opacity:.8}.character-sheet .container .base .level-grid .xp-item{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:flex-end;width:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));border-right:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);margin-top:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor))}.character-sheet .container .base .level-grid .xp-item:last-child{border-right:none}.character-sheet .container .base .level-grid .xp-item:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));background-image:url(initiative.a7663b57012bb669.svg);background-position:center;background-repeat:no-repeat;background-size:contain}.character-sheet .container .base .level-grid .xp-item.checked:after{content:" ";position:absolute;top:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));clip-path:polygon(10% 100%,25% 100%,85% 0,70% 0);background-color:var(--ghs-color-black)}.character-sheet .container .xp-gold-container{display:flex;flex-direction:column}.character-sheet .container .xp-notes,.character-sheet .container .gold-notes{flex-direction:column;height:calc(var(--ghs-unit) * 10 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donations{display:flex;align-items:center;line-height:.5em;margin-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donate{display:flex;align-items:center}.character-sheet .container .gold-notes .donate a{display:flex;align-items:center;cursor:pointer;color:var(--ghs-color-darkgray);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donate a:hover{color:var(--ghs-color-black)}.character-sheet .container .gold-notes .donate a.disabled{pointer-events:none;color:var(--ghs-color-gray)}.character-sheet .container .gold-notes .donate a .price{display:flex;align-items:center;color:var(--ghs-color-yellow);margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .gold-notes .donate a .price img{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));filter:var(--ghs-filter-yellow);width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet .container .notes,.character-sheet .container ghs-character-items{height:calc(var(--ghs-unit) * 34 * var(--ghs-dialog-factor));width:100%;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container .notes .items,.character-sheet .container ghs-character-items .items{width:100%}.character-sheet .container .notes .item-list,.character-sheet .container ghs-character-items .item-list{height:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));max-height:calc(var(--ghs-unit) * 27 * var(--ghs-dialog-factor));overflow:auto}.character-sheet .container .perks{flex-direction:column;height:calc(var(--ghs-unit) * 67 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .perks .list{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 63.5 * var(--ghs-dialog-factor));overflow-y:auto}.character-sheet .container .perks .list .perk{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 1.9 * var(--ghs-dialog-factor) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));display:flex}.character-sheet .container .perks .list .perk .checkboxes{display:flex}.character-sheet .container .perks .list .perk .checkboxes .checkbox{margin-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor) * var(--ghs-text-factor))}.character-sheet .container .perks .list .perk .checkboxes .checkbox.disabled{pointer-events:initial;cursor:not-allowed}.character-sheet .container .perks .list .perk .checkboxes.combined{flex-direction:column;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .perks .list .perk .checkboxes.combined .checkbox{border-top-style:dashed;border-bottom-style:dashed;margin:0}.character-sheet .container .perks .list .perk .checkboxes.combined .checkbox:nth-child(1){border-top-style:solid}.character-sheet .container .perks .list .perk .checkboxes.combined .checkbox:nth-last-child(1){border-bottom-style:solid}.character-sheet .container .perks .wip,.character-sheet .container .perks .warning{flex-basis:0}.character-sheet .container .battlegoals{flex-direction:column;height:calc(var(--ghs-unit) * 9 * var(--ghs-dialog-factor))}.character-sheet .container .battlegoals .battlegoals-grid{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:grid;grid-template-columns:repeat(12,1fr);align-items:center}.character-sheet .container .battlegoals .battlegoals-grid img{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.character-sheet .container .battlegoals .battlegoals-grid .battlegoal{width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor))}.character-sheet .container .battlegoals .battlegoals-grid .checkmark{height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;align-items:center}.character-sheet .container .personal-quest .personal-quest-card{display:flex;align-items:center}.character-sheet .container .personal-quest .personal-quest-card .card-id{text-align:right;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor) * var(--ghs-text-factor));min-width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet .container .personal-quest .personal-quest-card .personal-quest-name{font-family:var(--ghs-font-title)}.character-sheet .container .personal-quest .requirements{display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container .personal-quest .requirements .requirement{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.character-sheet .container .personal-quest .requirements .requirement.disabled{pointer-events:none;opacity:.7}.character-sheet .container .personal-quest .requirements .requirement .counter{display:flex;align-items:center;flex-grow:1}.character-sheet .container .personal-quest .requirements .requirement .counter .checkbox{margin:0 calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .container .personal-quest .requirements .requirement .counter input[type=number]{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));min-width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));flex-grow:1;text-align:right;border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray)}.character-sheet .container .personal-quest .rewards{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) solid var(--ghs-color-black)}.character-sheet .container .notes{display:flex;flex-direction:column;height:calc(var(--ghs-unit) * 15 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .25 * var(--ghs-dialog-factor))}.character-sheet .container .notes .columns{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));flex-grow:1}.character-sheet .container .notes .column-right{justify-content:space-between}.character-sheet .container .notes .personal-quest,.character-sheet .container .notes .extra-perks,.character-sheet .container .notes .retirements,.character-sheet .container .notes .player-number{margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-bottom:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));display:flex;align-items:center}.character-sheet .container .notes .personal-quest label,.character-sheet .container .notes .extra-perks label,.character-sheet .container .notes .retirements label,.character-sheet .container .notes .player-number label{flex-shrink:0;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet .container .notes .personal-quest input[type=number],.character-sheet .container .notes .extra-perks input[type=number],.character-sheet .container .notes .retirements input[type=number],.character-sheet .container .notes .player-number input[type=number]{flex-grow:1;flex-basis:0;min-width:auto}.character-sheet .container .notes .personal-quest .checkbox,.character-sheet .container .notes .extra-perks .checkbox,.character-sheet .container .notes .retirements .checkbox,.character-sheet .container .notes .player-number .checkbox{flex-shrink:0;margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor))}.character-sheet .container .import-export{display:flex;justify-content:space-around}.character-sheet .container .import-export label{cursor:pointer}.character-sheet .container .import-export label input[type=file]{width:0;height:0;margin:0;padding:0;visibility:hidden}.character-sheet .container .wip,.character-sheet .container .warning{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));display:flex;justify-content:center;align-items:center;color:var(--ghs-color-red)}.character-sheet .container .wip.warning,.character-sheet .container .warning.warning{color:var(--ghs-color-yellow)}.character-sheet .container .wip img,.character-sheet .container .warning img{width:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-red)}.character-sheet .container .wip.warning img,.character-sheet .container .warning.warning img{filter:var(--ghs-filter-yellow)}.character-sheet .container .checkbox{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));border:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor)) solid var(--ghs-color-black);border-radius:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));box-shadow:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor)) var(--ghs-color-gray);z-index:2}.character-sheet .container .checkbox:before{content:" ";position:absolute;left:50%;top:50%;width:115%;height:115%;transform:scale(0);transform-origin:top left;transition:.12s transform ease-in-out;z-index:1;background-image:url(checkmark.437dd8c56b3be0e8.svg);background-size:contain;background-repeat:no-repeat;background-position:center;filter:var(--ghs-filter-darkgray)}.character-sheet .container .checkbox.checked:before{transform:scale(1) translate(-50%,-50%)}.character-sheet .container .checkbox.checked.check:before{transform:scale(1)}.character-sheet .container .checkbox.disabled{top:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));left:calc(var(--ghs-unit) * .15 * var(--ghs-dialog-factor));pointer-events:none;border-color:var(--ghs-color-gray);box-shadow:none}.character-sheet .container input[type=text]{margin:0;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-black);background-color:transparent;border:none;border-bottom-width:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor));border-bottom-style:solid;border-bottom-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet .container input[type=number]{margin:0;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}.character-sheet .container textarea{color:var(--ghs-color-black);background-color:transparent;border:none;user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));width:100%;height:100%}.character-sheet .container .name{display:flex;align-items:center}.character-sheet .container .name img{height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));width:auto}.character-sheet .container .name input[type=text]{min-width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet.cs-sheet .container{background-image:url(character-sheet.00b73de5eb36d58f.svg)}.character-sheet.cs-sheet .columns .column.column-right .perks{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 70 * var(--ghs-dialog-factor))}.character-sheet.cs-sheet .columns .column.column-right .perks .list{height:calc(var(--ghs-unit) * 69.5 * var(--ghs-dialog-factor))}.character-sheet .additional{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet .additional .headline{margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .container{background-image:url(character-sheet.546b1024f4246598.svg)}.character-sheet.fh-sheet .xp-gold-container{display:grid;grid-template-columns:1fr 1fr;column-gap:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .xp-gold-container .xp-notes,.character-sheet.fh-sheet .xp-gold-container .gold-notes{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes{position:relative;height:calc(var(--ghs-unit) * 11 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes .traits{position:relative;display:flex;justify-content:space-evenly;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor));flex-grow:1}.character-sheet.fh-sheet .notes .traits .icon{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes .traits .icon .ghs-svg{height:100%;width:auto}.character-sheet.fh-sheet ghs-character-items{margin-top:0;height:auto}.character-sheet.fh-sheet ghs-character-items .item-list{height:auto!important}.character-sheet.fh-sheet .resources{position:relative;height:calc(var(--ghs-unit) * 19 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));flex-direction:column}.character-sheet.fh-sheet .resources .move{cursor:pointer;position:absolute;top:0;right:0;color:var(--ghs-color-black)}.character-sheet.fh-sheet .resources .move:hover{opacity:.5}.character-sheet.fh-sheet .resources .resource-table{display:flex;flex-direction:column;margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .resources .resource-table .resource{display:flex;padding:calc(var(--ghs-unit) * .3 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .resources .resource-table .resource img{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:auto}.character-sheet.fh-sheet .resources .resource-table .resource input{min-width:0;flex-grow:1}.character-sheet.fh-sheet .resources .resource-table .materials{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 11.1 * var(--ghs-dialog-factor)))}.character-sheet.fh-sheet .resources .resource-table .materials .resource{flex-direction:column;height:calc(var(--ghs-unit) * 5.5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .resources .resource-table .materials .resource input{width:100%;margin-left:0}.character-sheet.fh-sheet .resources .resource-table .herbs{display:grid;grid-template-columns:repeat(3,calc(var(--ghs-unit) * 11.1 * var(--ghs-dialog-factor)))}.character-sheet.fh-sheet .resources .resource-table .herbs .resource{height:calc(var(--ghs-unit) * 4.7 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .masteries{height:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));display:flex;flex-direction:column}.character-sheet.fh-sheet .masteries .mastery{display:flex;align-items:center}.character-sheet.fh-sheet .masteries .mastery .mastery-check{flex-shrink:0;width:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 1.6 * var(--ghs-dialog-factor));margin-top:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor));margin-left:calc(var(--ghs-unit) * .2 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .masteries .mastery .checkmark{flex-shrink:0;height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));display:flex;align-items:center}.character-sheet.fh-sheet .masteries .mastery .checkmark img{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.character-sheet.fh-sheet .masteries .mastery .text{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 1.9 * var(--ghs-dialog-factor));line-height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .columns .column.column-right{flex-direction:column-reverse}.character-sheet.fh-sheet .columns .column.column-right .battlegoals{margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .columns .column.column-right .perks{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 65 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .columns .column.column-right .perks .list{height:calc(var(--ghs-unit) * 65 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes,.character-sheet.fh-sheet .additional{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.character-sheet.fh-sheet .notes .columns .column.column-right,.character-sheet.fh-sheet .additional .columns .column.column-right{flex-direction:column;justify-content:flex-start}.character-sheet.compact .container{background-image:none;width:initial;max-width:calc(var(--ghs-unit) * 50 * var(--ghs-dialog-factor))}.character-sheet.compact .container .compact-separator{display:block;width:100%;margin:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor)) 0}.character-sheet.compact .container label.headline{justify-content:flex-start}.character-sheet.compact .container .checkbox{width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))!important;height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))!important}.character-sheet.compact .container input[type=number],.character-sheet.compact .container input[type=text]{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .container .columns{flex-direction:column}.character-sheet.compact .container .columns .column{width:auto!important;justify-content:center}.character-sheet.compact .container .columns .column.column-right{margin-left:0!important}.character-sheet.compact .container .columns .column .xp-gold-container{display:flex;flex-direction:column}.character-sheet.compact .container .columns .column .xp-gold-container .row{flex-direction:row}.character-sheet.compact .container .columns .column .xp-gold-container .row .donate{margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.character-sheet.compact .container .columns .column .row{height:auto!important;margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))!important}.character-sheet.compact .container .columns .column .row.perks .list{height:auto!important;overflow-y:initial}.character-sheet.compact .container .columns .column .row.perks .list .perk{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .container .columns .column .row label.headline{width:auto!important}.character-sheet.compact .container .columns .column .row .resource-table .materials,.character-sheet.compact .container .columns .column .row .resource-table .herbs{grid-template-columns:repeat(3,1fr)}.character-sheet.compact .container .columns .column .row .resource-table .materials .resource,.character-sheet.compact .container .columns .column .row .resource-table .herbs .resource{display:grid;grid-template-columns:.3fr 1fr;align-items:center}.character-sheet.compact .container .columns .column .row .resource-table .materials .resource input,.character-sheet.compact .container .columns .column .row .resource-table .herbs .resource input{width:100%;margin-left:0}.character-sheet.compact .container .columns .column ghs-character-items .item-list{height:auto!important}.character-sheet.compact .level .columns{flex-direction:row}.character-sheet.compact .level .columns .column{width:auto!important}.character-sheet.compact .level .columns .column .level-item{width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor) * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * .4 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .level .columns .column .xp-item{width:calc(var(--ghs-unit) * 2.8 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor) * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));border-right-width:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor) * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * -1 * var(--ghs-dialog-factor) / var(--ghs-text-factor))}.character-sheet.compact .level .columns .column .xp-item:before{top:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .level .columns .column .xp-item.checked:after{top:calc(var(--ghs-unit) * 2.2 * var(--ghs-dialog-factor) * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet.compact .battlegoals .battlegoals-grid{grid-template-columns:repeat(12,calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor)))}.character-sheet.compact .masteries .mastery .text{font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor) * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor) * var(--ghs-text-factor))}.character-sheet .scroll-container.denied .export,.character-sheet .scroll-container.denied .export *{pointer-events:initial}.character-sheet .toggle-fh-sheet{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));cursor:pointer;display:flex;justify-content:flex-end;width:100%;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}\n'],encapsulation:2})),a})();function iV(o,a){if(1&o&&t._UZ(0,"ghs-summon-entity",21),2&o){const n=a.$implicit,e=t.oxw();t.Q6J("character",e.character)("summon",n)}}function oV(o,a){if(1&o&&t._UZ(0,"img",26),2&o){const n=a.$implicit,e=t.oxw(2).$implicit,i=t.oxw();t.Udp("z-index",e.value-n-1),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+e.name+".svg",t.LSH)}}const aV=function(){return[]};function sV(o,a){if(1&o&&(t.ynx(0),t.YNc(1,oV,1,3,"img",25),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,aV),n.value-1))}}function rV(o,a){if(1&o&&(t.TgZ(0,"span",27),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.value)}}function cV(o,a){if(1&o&&(t.TgZ(0,"span",22),t._UZ(1,"img",4),t.YNc(2,sV,3,5,"ng-container",23),t.YNc(3,rV,2,1,"span",24),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Udp("z-index",n.value),t.Q6J("src","./assets/images"+(e.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(e.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(e.ConditionType.value))}}const lV=function(o,a){return{empty:o,off:a}},gV=function(o){return{empty:o}},dV=function(o){return{denied:o}},hV=function(o){return{"outer-denied":o}};let uV=(()=>{var o;class a extends UT{cancel(){this.character.fullview=!1,d.v.stateManager.saveLocal(),d.v.uiChange.emit()}}return o=a,(0,_.Z)(a,"\u0275fac",function(){let n;return function(i){return(n||(n=t.n5z(o)))(i||o)}}()),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-fullview"]],features:[t.qOj],decls:26,vars:30,consts:[[1,"container"],[1,"summons-container",3,"ngClass"],[1,"spacer"],[1,"icon",3,"ngClass","entityAnimation"],[3,"src"],[1,"summons"],[3,"character","summon",4,"ngFor","ngForOf"],[1,"fullview"],[1,"row"],[3,"character","ngClass"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[3,"figure"],[3,"entity","figure"],[1,"conditions"],["class","condition",4,"ngFor","ngForOf"],["type","character",1,"dialog",3,"entity","figure","entityConditions","immunities","columns"],[1,"row","sheet"],[3,"character","standalone"],[1,"wip",3,"click"],["src","./assets/images/warning.svg",1,"ghs-svg"],[3,"ghs-label"],[3,"character","summon"],[1,"condition"],[4,"ngIf"],["class","value",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"span",2),t.TgZ(3,"span",3),t._UZ(4,"img",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,iV,1,2,"ghs-summon-entity",6),t.qZA()(),t.TgZ(7,"div",7)(8,"div",8),t._UZ(9,"ghs-character-image",9),t.TgZ(10,"ghs-pointer-input",10),t.NdJ("dragMove",function(l){return i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]&&i.dragInitiativeMove(l)})("dragEnd",function(l){return i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]&&i.dragInitiativeEnd(l)})("singleClick",function(l){return i.toggleFigure(l)})("doubleClick",function(l){return i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition]&&i.initiativeDoubleClick(l)}),t.qZA(),t._UZ(11,"ghs-character-initiative",11)(12,"ghs-highlight-conditions",12),t.qZA(),t.TgZ(13,"div",8)(14,"div",13),t.YNc(15,cV,4,5,"span",14),t.qZA()(),t.TgZ(16,"div",8),t._UZ(17,"ghs-conditions",15),t.qZA(),t.TgZ(18,"div",16),t._UZ(19,"ghs-character-sheet",17),t.qZA()(),t.TgZ(20,"a",18),t.NdJ("click",function(){return i.cancel()}),t._UZ(21,"img",19)(22,"span",20),t._uU(23,"!\xa0"),t._UZ(24,"span",20),t._uU(25,"! "),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.WLB(21,lV,0==i.summonCount,i.character.off||i.character.exhausted||i.character.health<=0)),t.xp6(2),t.Q6J("ngClass",t.VKq(24,gV,0==i.summonCount))("entityAnimation",0==i.summonCount),t.xp6(1),t.Q6J("src",i.character.iconUrl,t.LSH),t.xp6(2),t.Q6J("ngForOf",i.character.summons),t.xp6(3),t.Q6J("character",i.character)("ngClass",t.VKq(26,dV,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("ngClass",t.VKq(28,hV,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round&&!i.gameManager.stateManager.characterPermissions[i.character.name+"|"+i.character.edition])),t.xp6(1),t.Q6J("figure",i.character),t.xp6(1),t.Q6J("entity",i.character)("figure",i.character),t.xp6(3),t.Q6J("ngForOf",i.activeConditions),t.xp6(2),t.Q6J("entity",i.character)("figure",i.character)("entityConditions",i.character.entityConditions)("immunities",i.character.immunities)("columns",6),t.xp6(2),t.Q6J("character",i.character)("standalone",!0),t.xp6(3),t.Q6J("ghs-label","wip"),t.xp6(2),t.Q6J("ghs-label","cancel"))},dependencies:[x.mk,x.sg,x.O5,zu,s_,AT,VO,RT,IT,im,ie,An,Ii],styles:['.attack-modifierdeck-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:5;width:0;height:0;visibility:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;overflow-x:auto;overflow-y:hidden}.attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * 1.5 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);width:calc(var(--ghs-unit) * 37.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));z-index:5}.attack-modifierdeck-container.active[_ngcontent-%COMP%], .attack-modifierdeck-container.loot-cards-container[_ngcontent-%COMP%], .loot-cards-container.active[_ngcontent-%COMP%], .loot-cards-container.loot-cards-container[_ngcontent-%COMP%]{visibility:visible;width:100%;height:100%}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor))}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 17 * var(--ghs-text-factor));-ms-overflow-style:none;scrollbar-width:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar, .loot-cards-container.permanent.active[_ngcontent-%COMP%] .scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.attack-modifierdeck-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%], .loot-cards-container.permanent.active[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 17)}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{position:absolute;display:flex;top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 21.5);z-index:3}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 8.6666666667 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 13 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%] ghs-loot[_ngcontent-%COMP%]{position:absolute;inset:0;display:block}.attack-modifierdeck-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .attack-modifierdeck-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .loot-cards-container[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%]{display:inline-block;position:relative;cursor:zoom-out;top:0;left:0;z-index:2;width:100%;height:100%}.summons-container[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;align-items:center;transition:max-height 2s ease-out;max-height:100%;min-width:calc(var(--ghs-unit) * 7);max-width:calc(var(--ghs-unit) * 96)}.summons-container.empty[_ngcontent-%COMP%]{max-height:0}.summons-container[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:none;width:calc(var(--ghs-unit) * 10.5);height:100%}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:block;width:auto;height:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:100%;width:auto;filter:var(--ghs-filter-shadow)}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{position:absolute;top:50%;left:calc(var(--ghs-unit) * -4);transform:translateY(-50%);width:calc(var(--ghs-unit) * 3.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-darkgray);opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:not(.empty){opacity:1;transform:translate(0)}.summons-container[_ngcontent-%COMP%] .entities-menu.empty[_ngcontent-%COMP%]{opacity:0;max-width:0;height:0;transform:translateY(100%)}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%]{cursor:initial;pointer-events:none}.summons-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{display:none}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.icon[_ngcontent-%COMP%]{opacity:.5}.summons-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.menu[_ngcontent-%COMP%]{opacity:1}.summons-container[_ngcontent-%COMP%] .summons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;max-width:calc(var(--ghs-unit) * 77.5)}.summons-container.off[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{filter:grayscale(100%)}.character[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-character-color);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;--ghs-character-color: #000;border-radius:calc(var(--ghs-unit) * .5);filter:var(--ghs-filter-outline);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.character.dimmed[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.dimmed[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.dimmed[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{filter:grayscale(.15);opacity:.5}.character[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 5);left:calc(var(--ghs-unit) * 3.2);z-index:6}.character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);left:calc(var(--ghs-unit) * 2.4)}.character[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{z-index:2}.character[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.1);left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);z-index:4}.character[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0!important;width:100%!important}.character[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5);z-index:5}.character[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer;margin-left:calc(var(--ghs-unit) * 1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{max-width:calc(var(--ghs-unit) * 10);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center;white-space:nowrap}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:calc(var(--ghs-unit) * 5.5);margin-left:calc(var(--ghs-unit) * -1.1);margin-right:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.exhausted[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1);height:calc(var(--ghs-unit) * 4);width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--ghs-color-white);font-family:var(--ghs-font-text);margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7);margin:0 calc(var(--ghs-unit) * .1)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .token-container[_ngcontent-%COMP%] .token.placeholder[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -.5)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));z-index:1000}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding:0 calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 2.7 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%]{position:relative;z-index:999;width:0;height:0;top:50%;left:calc(var(--ghs-unit) * -3);overflow:visible}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{position:absolute;width:0;height:0}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw.drawing[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18);height:calc(var(--ghs-unit) * 12)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;align-self:center;z-index:1}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor) * var(--ghs-text-factor));height:auto;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%]:hover, .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]:hover{opacity:.7}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.disabled[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.disabled[_ngcontent-%COMP%]{pointer-events:none}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.loot-cards-button[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * -1.5 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));color:var(--ghs-color-white)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));border-radius:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.battlegoals-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button.items-button[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-70%,-50%);width:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-green) var(--ghs-filter-outline)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.experience[_ngcontent-%COMP%]{color:var(--ghs-color-blue);margin-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .experience.loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot.loot[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);margin-top:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.absent[_ngcontent-%COMP%]{cursor:initial;opacity:.6}.character.absent[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{cursor:initial}.character[_ngcontent-%COMP%] .absent-menu[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 82);height:calc(var(--ghs-unit) * 14);cursor:pointer;z-index:2}.character[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));cursor:pointer;font-size:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 1.5)}.character[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);filter:var(--ghs-filter-white)}.character[_ngcontent-%COMP%] ghs-figure-errors[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 14.5);top:50%;transform:translateY(-50%);z-index:99}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{position:relative;cursor:pointer;height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.character[_ngcontent-%COMP%] .character-sheet-button.hand-size-margin[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * .5)}.character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto;filter:var(--ghs-filter-shadow)}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 14);top:calc(var(--ghs-unit) * 4);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(hand-size-mask.5857c02745e3d418.svg);mask-image:url(hand-size-mask.5857c02745e3d418.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.6);z-index:-1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{position:absolute;right:calc(var(--ghs-unit) * 13.3);top:calc(var(--ghs-unit) * 10);width:calc(var(--ghs-unit) * 4.2);height:calc(var(--ghs-unit) * 5);display:flex;justify-content:center;align-items:center;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2.4);padding-right:calc(var(--ghs-unit) * .4);z-index:1}.character[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:0;left:calc(var(--ghs-unit) * -.5);bottom:0;right:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:-1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 24.5);top:calc(var(--ghs-unit) * .5);width:calc(var(--ghs-unit) * 33);height:calc(var(--ghs-unit) * 2.64);display:flex;justify-content:space-evenly;align-items:center}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(outer-mask.f0af43cfab648186.svg);mask-image:url(outer-mask.f0af43cfab648186.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;z-index:0}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);-webkit-mask-image:url(inner-mask.f2d18d4a7559b09e.svg);mask-image:url(inner-mask.f2d18d4a7559b09e.svg);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(.5);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .trait[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5);color:var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 1.8);height:calc(var(--ghs-unit) * 1.8);left:0;top:50%;transform:translateY(-45%) rotate(45deg);border:calc(var(--ghs-unit) * .2) solid var(--ghs-character-color);z-index:2}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:110%;width:auto;filter:var(--ghs-filter-white);transform:rotate(-45deg);z-index:1}.character[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:before{content:" ";position:absolute;inset:0;background-color:var(--ghs-character-color);z-index:0;filter:brightness(.5)}.character[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character[_ngcontent-%COMP%]:before{transition:filter .15s ease-in-out}.character.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.character.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .summon-dialog[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%], .character.off[_ngcontent-%COMP%]:before{filter:grayscale(1)!important}.character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] *[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .attack-modifierdeck-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .loot-cards-close[_ngcontent-%COMP%], .character.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}.character.fh[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10.25);background-image:url(char-mat_compact.b0d0dd33f05dffe7.png)}.character.compact[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3.1)}.character.compact[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.compact[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{display:none}.character.compact[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 2.5);left:calc(var(--ghs-unit) * 6.5);width:calc(var(--ghs-unit) * 5);height:calc(var(--ghs-unit) * 5)}.character.compact[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 1 / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 13);width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor));left:calc(var(--ghs-unit) * 8)}.character.compact[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{flex-direction:row;justify-content:flex-start;align-items:center}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);margin-left:calc(var(--ghs-unit) * -.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 12);margin-right:calc(var(--ghs-unit) * 7)}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .experience[_ngcontent-%COMP%]{margin-bottom:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .loot[_ngcontent-%COMP%]{margin-top:0;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.character.compact[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-draw[_ngcontent-%COMP%] ghs-attackmodifier-draw[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 13.5);height:calc(var(--ghs-unit) * 9)}.character.compact[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 2.7);right:calc(var(--ghs-unit) * 1.2)}.character.compact[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.3);right:calc(var(--ghs-unit) * 1)}.character.compact[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 11)}.character.compact[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%]{display:none}.character.modern[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 16);border-top-left-radius:calc(var(--ghs-unit) * 13);border-top-right-radius:calc(var(--ghs-unit) * 12);border-bottom-right-radius:calc(var(--ghs-unit) * 12);background-image:url(char-mat_modern.2238b82519930f08.png);background-blend-mode:hard-light;filter:none;overflow:hidden}.character.modern.dimmed[_ngcontent-%COMP%]{background-image:url(char-mat_modern.2238b82519930f08.png)}.character.modern[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 13.7)}.character.modern[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{top:0;left:0;width:calc(var(--ghs-unit) * 16);height:calc(var(--ghs-unit) * 16);margin:0}.character.modern[_ngcontent-%COMP%] .character-sheet-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:grayscale(1) brightness(.3)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 2.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -2.7 / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-bar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4.5);filter:grayscale(1) brightness(.3);margin-left:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 3.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .battlegoals-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .items-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .attack-modifier-button[_ngcontent-%COMP%], .character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .loot-cards-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 5.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .summon-dialog-button[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .hand-size[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 6.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 13.9);top:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-level[_ngcontent-%COMP%]:after{top:calc(var(--ghs-unit) * -.5)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 18);top:initial;bottom:0}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:before{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .character-traits[_ngcontent-%COMP%]:after{transform:rotate(180deg)}.character.modern[_ngcontent-%COMP%] .attack-modifierdeck-container[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 3 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * .5 / var(--ghs-text-factor) / var(--ghs-text-factor))}.character.modern[_ngcontent-%COMP%] .loot-cards[_ngcontent-%COMP%] .loot-card[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 15 * var(--ghs-text-factor))}',"[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;overflow:auto}.container[_ngcontent-%COMP%]{height:100%}.fullview[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center}.fullview[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1);position:relative;display:flex}.fullview[_ngcontent-%COMP%] ghs-character-image[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 15);height:calc(var(--ghs-unit) * 15);border-radius:calc(var(--ghs-unit) * 2)}.fullview[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{position:absolute;left:0;top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 15);z-index:5}.fullview[_ngcontent-%COMP%] ghs-pointer-input.drag-initiative[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 15);height:100%;z-index:4}.fullview[_ngcontent-%COMP%] ghs-pointer-input.drag-initiative.dragging[_ngcontent-%COMP%]{left:0;width:100%}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex;margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin:0}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -3 * var(--ghs-text-factor))}.fullview[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ghs-title;font-size:calc(var(--ghs-unit) * 1.8 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));text-shadow:none;transform:translate(-50%)}.fullview[_ngcontent-%COMP%] .sheet[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));background-color:var(--ghs-color-white)}.wip[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;color:var(--ghs-color-red);font-size:calc(var(--ghs-unit) * 4)}.wip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow);width:calc(var(--ghs-unit) * 4);height:auto;margin-right:calc(var(--ghs-unit) * 1)}.wip[_ngcontent-%COMP%]:hover{color:var(--ghs-color-black)}"]})),a})();const _V=["objectiveTitle"],pV=["objectiveName"];function fV(o,a){if(1&o&&t._UZ(0,"span",29),2&o){const n=t.oxw();t.Q6J("ghs-label","%game.mapMarker."+n.objective.marker+"%")}}function mV(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.hij(" ",n.objective.title,"")}}function vV(o,a){if(1&o&&t._UZ(0,"span",30),2&o){const n=t.oxw();t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function CV(o,a){1&o&&t._UZ(0,"img",31)}function MV(o,a){if(1&o&&(t.TgZ(0,"span",32),t._UZ(1,"img",28),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function OV(o,a){if(1&o&&(t.ynx(0),t._uU(1),t.ALo(2,"ghsMinZero"),t._UZ(3,"span",33),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.AsE(" ",t.lcZ(2,5,n.objective.health+n.health),"/",n.maxHealth()," "),t.xp6(2),t.Q6J("value-sign",n.health)("hideEmpty",!0)("container",!0)}}function PV(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function yV(o,a){if(1&o&&t._UZ(0,"img",39),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw();t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const bV=function(){return[]};function xV(o,a){if(1&o&&(t.ynx(0),t.YNc(1,yV,1,3,"img",38),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,bV),n.value-1))}}function wV(o,a){if(1&o&&(t.TgZ(0,"span",40),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function kV(o,a){if(1&o&&t._UZ(0,"span",41),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function TV(o,a){if(1&o&&t._UZ(0,"span",42),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}function ZV(o,a){if(1&o&&(t.TgZ(0,"span",34),t._UZ(1,"img",28),t.YNc(2,xV,3,5,"ng-container",15),t.YNc(3,wV,2,3,"span",35),t.YNc(4,kV,1,2,"span",36),t.YNc(5,TV,1,2,"span",37),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.xp6(1),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.objective.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}function AV(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",43),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t._UZ(1,"ghs-actions",44),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("actions",n.objectiveData.actions)("objective",n.objective)}}const SV=function(o,a,n){return{off:o,escort:a,denied:n}},EV=function(o){return{"active-border":o}},DV=function(o){return{"outer-denied":o}};let IV=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"objectiveName",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"health",0),(0,_.Z)(this,"objectiveData",void 0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"initiative",-1),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.objective&&this.objective.objectiveId&&(this.objectiveData=d.v.objectiveDataByScenarioObjectiveIdentifier(this.objective.objectiveId)),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.activeConditions=d.v.entityManager.activeConditions(this.objective),this.objective.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))})}exhausted(){d.v.stateManager.before(this.objective.exhausted?"unsetObjectiveExhausted":"setObjectiveExhausted",this.objective.title||this.objective.name),this.objective.exhausted=!this.objective.exhausted,this.objective.exhausted?(this.objective.off=!0,this.objective.active=!1):this.objective.off=!1,d.v.sortFigures(this.objective),d.v.stateManager.after()}maxHealth(){return(0,ae.j9)(this.objective.maxHealth)}toggleFigure(e){(d.v.game.state==ge.D2.draw||R.r.settings.initiativeRequired&&this.objective.initiative<=0)&&!this.objective.exhausted&&this.objective.health>0?this.openInitiativeDialog(e):(d.v.stateManager.before(this.objective.active?"unsetActive":"setActive",this.objective.title||this.objective.name),d.v.roundManager.toggleFigure(this.objective),d.v.stateManager.after())}openInitiativeDialog(e){this.dialog.open(zO,{panelClass:"dialog",data:this.objective,positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}dragInitiativeMove(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),-1==this.initiative&&(this.initiative=this.objective.initiative),this.objective.initiative=e}dragInitiativeEnd(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),this.objective.initiative!=this.initiative&&(this.objective.initiative=this.initiative,d.v.stateManager.before("setObjectiveInitiative",this.objective.title||this.objective.name,""+e),this.objective.initiative=e,this.initiative=-1,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.objective),d.v.stateManager.after())}dragHpMove(e){this.health=e,this.objective.health+this.health>(0,ae.j9)(this.objective.maxHealth)&&(this.health=(0,ae.j9)(this.objective.maxHealth)-this.objective.health)}dragHpEnd(e){0!=this.health&&(d.v.stateManager.before("changeObjectiveHP",this.objective.title||this.objective.name,(0,he.uZ)(this.health)),d.v.entityManager.changeHealth(this.objective,this.objective,this.health),(this.objective.health<=0||this.objective.exhausted&&this.health>=0&&this.objective.health>0)&&(this.objective.escort?this.exhausted():d.v.characterManager.removeObjective(this.objective)),this.health=0,d.v.stateManager.after())}dragHpCancel(e){this.health=0}openEntityMenu(e){this.dialog.open($c,{panelClass:"dialog",data:{entity:this.objective,figure:this.objective},positionStrategy:this.overlay.position().flexibleConnectedTo(this.objectiveName).withPositions((0,he.sm)())})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-objective"]],viewQuery:function(e,i){if(1&e&&(t.Gf(_V,5),t.Gf(pV,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first),t.iGM(s=t.CRH())&&(i.objectiveName=s.first)}},inputs:{objective:"objective"},decls:34,vars:28,consts:[[1,"objective",3,"ngClass"],[1,"image-container"],[1,"objective-marker",3,"ngClass"],["class","placeholder placeholder-marker",3,"ghs-label",4,"ngIf"],[3,"entity"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[3,"figure"],["initiativeElement",""],[1,"stats"],["ghs-pointer-input","",1,"entity-menu-container",3,"singleClick"],[1,"column","col-1"],["ghs-pointer-input","",1,"title-container",3,"singleClick"],[1,"title"],["objectiveName",""],[1,"icon",3,"src"],[4,"ngIf"],[3,"ghs-label",4,"ngIf"],["class","ghs-svg exhausted","src","./assets/images/status/exhausted.svg",4,"ngIf"],[1,"markers"],["class","marker",4,"ngFor","ngForOf"],[1,"status-bar"],["ghs-pointer-input","",1,"health",3,"relative","screenWidth","singleClick","dragMove","dragEnd","dragCancel"],["src","./assets/images/status/health.svg"],[1,"conditions"],["class","condition",4,"ngFor","ngForOf"],["class","actions",3,"click",4,"ngIf"],[1,"spacer",3,"click"],[1,"icon-container",3,"click"],[3,"src"],[1,"placeholder","placeholder-marker",3,"ghs-label"],[3,"ghs-label"],["src","./assets/images/status/exhausted.svg",1,"ghs-svg","exhausted"],[1,"marker"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"condition"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],[1,"actions",3,"click"],[3,"actions","objective"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"a",1)(2,"span",2),t._uU(3),t.qZA(),t.YNc(4,fV,1,1,"span",3),t._UZ(5,"ghs-healthbar",4),t.qZA(),t.TgZ(6,"ghs-pointer-input",5),t.NdJ("dragMove",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeMove(l)})("dragEnd",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeEnd(l)})("singleClick",function(l){return i.toggleFigure(l)})("doubleClick",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.openInitiativeDialog(l)}),t.qZA(),t._UZ(7,"ghs-character-initiative",6,7)(9,"ghs-highlight-conditions",4),t.TgZ(10,"div",8)(11,"div",9),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(12,"div",10)(13,"div",9),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(14,"div",11),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)}),t.TgZ(15,"div",12,13),t._UZ(17,"img",14),t.YNc(18,mV,2,1,"span",15),t.YNc(19,vV,1,1,"span",16),t.YNc(20,CV,1,0,"img",17),t.qZA(),t.TgZ(21,"div",18),t.YNc(22,MV,2,1,"span",19),t.qZA()(),t.TgZ(23,"div",20)(24,"div",21),t.NdJ("singleClick",function(l){return i.openEntityMenu(l)})("dragMove",function(l){return i.dragHpMove(l)})("dragEnd",function(l){return i.dragHpEnd(l)})("dragCancel",function(l){return i.dragHpCancel(l)}),t._UZ(25,"img",22),t.YNc(26,OV,4,7,"ng-container",15),t.YNc(27,PV,2,0,"span",15),t.qZA(),t.TgZ(28,"div",23),t.YNc(29,ZV,6,7,"span",24),t.qZA()()(),t.YNc(30,AV,2,2,"div",25),t.TgZ(31,"span",26),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(32,"div",27),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t._UZ(33,"img",28),t.qZA()()()),2&e&&(t.Q6J("ngClass",t.kEZ(20,SV,i.objective.off||i.objective.exhausted||i.objective.health<=0&&i.maxHealth()>0,i.objective.escort,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters)),t.xp6(2),t.Q6J("ngClass",t.VKq(24,EV,i.objective.active)),t.xp6(1),t.hij(" ",i.objective.id+1," "),t.xp6(1),t.Q6J("ngIf",i.objective.marker),t.xp6(1),t.Q6J("entity",i.objective),t.xp6(1),t.Q6J("ngClass",t.VKq(26,DV,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("figure",i.objective),t.xp6(2),t.Q6J("entity",i.objective),t.xp6(8),t.Q6J("src","./assets/images/objective/"+(i.objective.escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",i.objective.title),t.xp6(1),t.Q6J("ngIf",!i.objective.title),t.xp6(1),t.Q6J("ngIf",i.objective.exhausted),t.xp6(2),t.Q6J("ngForOf",i.objective.markers),t.xp6(2),t.Q6J("relative",!0)("screenWidth",!0),t.xp6(2),t.Q6J("ngIf",i.maxHealth()>0),t.xp6(1),t.Q6J("ngIf",0==i.maxHealth()),t.xp6(2),t.Q6J("ngForOf",i.activeConditions),t.xp6(1),t.Q6J("ngIf",i.objectiveData&&i.objectiveData.actions),t.xp6(3),t.Q6J("src","./assets/images/objective/"+(i.objective.escort?"escort":"objective")+".svg",t.LSH))},dependencies:[x.mk,x.sg,x.O5,s_,GO,VO,ag,ie,An,aa,Ii,sg],styles:[".objective[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-color-green);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;border-radius:calc(var(--ghs-unit) * .5);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.objective.escort[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}.objective[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{transition:filter .15s ease-in-out}.objective.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.objective.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{filter:grayscale(100%)}.objective[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1)}.objective[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5)}.objective[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.objective[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:0;left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:100%;z-index:4}.objective[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0;width:100%}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 28)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8);justify-content:space-evenly}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{pointer-events:none;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 5);width:auto;margin-left:calc(var(--ghs-unit) * -1);margin-right:calc(var(--ghs-unit) * .5)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.exhausted[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1);height:calc(var(--ghs-unit) * 4);width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{z-index:1000}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto}.objective[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 30);height:calc(var(--ghs-unit) * 11);margin:calc(var(--ghs-unit) * 1.5) 0;margin-left:calc(var(--ghs-unit) * 1);display:flex;font-size:calc(var(--ghs-unit) * 2.5);overflow:auto}.objective[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.objective[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);margin-left:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1);cursor:pointer;border-radius:calc(var(--ghs-unit) * 1);flex-shrink:0}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 3.8)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]:not(.active-border){box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-black)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .placeholder-marker[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * -1);right:calc(var(--ghs-unit) * -1);font-size:calc(var(--ghs-unit) * 3.5)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:0;width:calc(var(--ghs-unit) * 9);left:0}.objective.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}"]})),a})();const NV=["standee"];function JV(o,a){if(1&o&&(t.TgZ(0,"span",25),t._UZ(1,"img",23),t.TgZ(2,"span",7),t._uU(3),t.qZA()()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("src","./assets/images/"+(e.settingsManager.settings.fhStyle?"fh/":"")+"action/range.svg",t.LSH),t.xp6(2),t.Oqu(n.range)}}const FT=function(o){return{center:o}};function UV(o,a){if(1&o&&(t.TgZ(0,"span",21)(1,"span",22),t._UZ(2,"img",23),t.TgZ(3,"span",7),t._uU(4),t.qZA(),t.YNc(5,JV,4,2,"span",24),t.qZA()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(4,FT,i.actionHints.length%2==1&&e==i.actionHints.length-1)),t.xp6(2),t.Q6J("src","./assets/images/"+(i.settingsManager.settings.fhStyle?"fh/":"")+"action/"+n.type+".svg",t.LSH),t.xp6(2),t.Oqu(n.value),t.xp6(1),t.Q6J("ngIf",n.range)}}function LV(o,a){if(1&o&&t._UZ(0,"span",26),2&o){const n=t.oxw();t.Q6J("ghs-label","%game.mapMarker."+n.marker+"%")}}function QV(o,a){if(1&o&&(t.TgZ(0,"span",27),t._UZ(1,"img",23),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.MGl("src","./assets/images/character/icons/",n,".svg",t.LSH)}}function RV(o,a){if(1&o&&t._UZ(0,"img",34),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw();t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const FV=function(){return[]};function qV(o,a){if(1&o&&(t.ynx(0),t.YNc(1,RV,1,3,"img",33),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,FV),n.value-1))}}function HV(o,a){if(1&o&&(t.TgZ(0,"span",7),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function jV(o,a){if(1&o&&t._UZ(0,"span",35),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function BV(o,a){if(1&o&&t._UZ(0,"span",36),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}const zV=function(o,a){return{center:o,expired:a}};function GV(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",21)(1,"span",28),t.NdJ("doubleClick",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeCondition(s))}),t._UZ(2,"img",23),t.YNc(3,qV,3,5,"ng-container",29),t.YNc(4,HV,2,3,"span",30),t.YNc(5,jV,1,2,"span",31),t.YNc(6,BV,1,2,"span",32),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.WLB(8,zV,i.entity.summon==i.SummonState.false&&i.activeConditions.length%2==1&&i.activeConditions.length==e+1,n.expired)),t.xp6(2),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.entity.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}const VV=function(o,a){return{active:o,new:a}};function YV(o,a){if(1&o&&(t.TgZ(0,"span",37)(1,"span",38),t._UZ(2,"img",23),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(3,FT,n.entity.entityConditions.length%2==0)),t.xp6(1),t.Q6J("ngClass",t.WLB(5,VV,n.entity.summon==n.SummonState.true,n.entity.summon==n.SummonState.new)),t.xp6(1),t.MGl("src","./assets/images/summons/",n.figure.summonColor,".png",t.LSH)}}const KV=function(o,a,n,e,i,s,l,m,O,k){return{dead:o,off:a,dormant:n,revealed:e,active:i,"active-focus":s,denied:l,"action-hint-border":m,fh:O,modern:k}},$V=function(o){return{highlight:o}};let qT=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"standee",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"figure",void 0),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"Conditions",re.gP),(0,_.Z)(this,"AttackModifierType",Lt.kl),(0,_.Z)(this,"SummonState",Ee.HY),(0,_.Z)(this,"ConditionName",re.fT),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"health",0),(0,_.Z)(this,"maxHp",0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"actionHints",[]),(0,_.Z)(this,"activeIndex",-1),(0,_.Z)(this,"marker",""),(0,_.Z)(this,"EntityValueFunction",ae.j9),(0,_.Z)(this,"uiChangeSubscription",void 0),this.element=e,this.dialog=i,this.overlay=s}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}additionalType(){return this.entity instanceof In.g?this.entity.type:this.entity instanceof Ee.eU?this.entity.name:""}update(){if(this.activeConditions=d.v.entityManager.activeConditions(this.entity,!0),this.entity.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))}),this.actionHints=[],R.r.settings.standeeStats&&this.figure instanceof Ze.Q&&this.entity instanceof In.g&&(this.actionHints=d.v.monsterManager.calcActionHints(this.figure,this.entity)),this.entity.revealed){const e=d.v.game.figures.find(i=>i.active);if(e){const i=d.v.game.figures.indexOf(e);-1!=i&&(-1==this.activeIndex?this.activeIndex=i:this.activeIndex!=i&&this.entity.number>0&&(this.entity.revealed=!1))}}this.marker=this.entity.marker,this.figure instanceof Nn.k&&this.figure.entities.flatMap(e=>e.marker).every((e,i,s)=>0==s.indexOf(e))&&(this.marker="")}dragHpMove(e){(0,ae.j9)(this.entity.maxHealth)>0&&(!(this.figure instanceof Ze.Q)||!this.figure.immortal)&&(this.health=e,this.entity.health+this.health>(0,ae.j9)(this.entity.maxHealth)&&(this.health=(0,ae.j9)(this.entity.maxHealth)-this.entity.health))}dragHpEnd(e){if(0!=this.health&&(0,ae.j9)(this.entity.maxHealth)>0&&(!(this.figure instanceof Ze.Q)||!this.figure.immortal)){let i=this.figure.name;!i&&this.figure instanceof Nn.k&&(i=this.figure.title,i||(i=this.figure.escort?"%escort%":"%objective%")),d.v.stateManager.before(this.figure.type+"ChangeEntityHp",i,""+this.entity.number,""+this.health,this.additionalType()),d.v.entityManager.changeHealth(this.entity,this.figure,this.health),this.figure instanceof Ze.Q&&this.figure.entities.every(s=>s.dead)&&this.figure.active&&d.v.roundManager.toggleFigure(this.figure),d.v.stateManager.after()}this.health=0}dragHpCancel(e){this.health=0}removeCondition(e){d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.figure,"removeCondition"),e.name,this.entity instanceof In.g?"monster."+this.entity.type+" ":""),d.v.entityManager.removeCondition(this.entity,e,e.permanent),d.v.stateManager.after()}doubleClick(e){this.entity.revealed?this.entity.revealed=!1:R.r.settings.activeStandees&&(d.v.stateManager.before(this.figure.type+(this.entity.active?"UnsetEntityActive":"SetEntityActive"),this.figure.name,""+this.entity.number,this.additionalType()),d.v.entityManager.toggleActive(this.figure,this.entity),d.v.stateManager.after())}openEntityMenu(e){if(this.entity.number<0&&this.figure instanceof Ze.Q&&this.entity instanceof In.g){const i=d.v.monsterManager.monsterStandeeMax(this.figure);if(R.r.settings.randomStandees){let s=Math.floor(Math.random()*i)+1;for(;d.v.monsterManager.monsterStandeeUsed(this.figure,s);)s=Math.floor(Math.random()*i)+1;d.v.stateManager.before("addRandomStandee","data.monster."+this.figure.name,"monster."+this.entity.type,""+s),this.entity.number=s,d.v.stateManager.after()}else this.dialog.open(Gd,{panelClass:"dialog",data:{monster:this.figure,type:this.entity.type,range:[],entity:this.entity,entities:this.figure.entities},positionStrategy:this.overlay.position().flexibleConnectedTo(this.standee).withPositions((0,he.sm)())})}else this.dialog.open($c,{panelClass:"dialog",data:{entity:this.entity,figure:this.figure,positionElement:this.standee},positionStrategy:this.overlay.position().flexibleConnectedTo(this.standee).withPositions((0,he.sm)())}).closed.subscribe({next:()=>{(this.entity instanceof In.g||this.entity instanceof oa.W)&&this.entity.dead&&this.element.nativeElement.classList.add("dead")}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-standee"]],viewQuery:function(e,i){if(1&e&&t.Gf(NV,5),2&e){let s;t.iGM(s=t.CRH())&&(i.standee=s.first)}},inputs:{figure:"figure",entity:"entity"},decls:25,vars:40,consts:[[1,"entity-border",3,"ngClass","entityAnimation"],[1,"entity",3,"ngClass"],[1,"standee"],["standee",""],[1,"background-image-container"],[1,"background-image"],[1,"number",3,"ngClass"],[1,"value"],[1,"health",3,"ghs-label","ghs-label-attribute"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"conditions","actions"],["class","condition-container",3,"ngClass",4,"ngFor","ngForOf"],[1,"markers"],["class","placeholder placeholder-marker",3,"ghs-label",4,"ngIf"],["class","marker",4,"ngFor","ngForOf"],[3,"entity","figure"],[1,"conditions"],["class","summon-container",3,"ngClass",4,"ngIf"],[3,"entity","diff"],[3,"entity"],[1,"drag-hp",3,"relative","screenWidth","dragMove","dragEnd","dragCancel","singleClick","doubleClick"],[1,"condition-container",3,"ngClass"],[1,"condition"],[3,"src"],["class","range",4,"ngIf"],[1,"range"],[1,"placeholder","placeholder-marker",3,"ghs-label"],[1,"marker"],["ghs-pointer-input","",1,"condition",3,"doubleClick"],[4,"ngIf"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],[1,"summon-container",3,"ngClass"],[1,"summon",3,"ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"div",4),t._UZ(5,"div",5),t.qZA(),t.TgZ(6,"span",6)(7,"span",7),t._uU(8),t.qZA()(),t.TgZ(9,"span",8),t._uU(10),t.ALo(11,"ghsMinZero"),t._UZ(12,"span",9),t.qZA()(),t.TgZ(13,"div",10),t.YNc(14,UV,6,6,"span",11),t.qZA(),t.TgZ(15,"div",12),t.YNc(16,LV,1,1,"span",13),t.YNc(17,QV,2,1,"span",14),t.qZA(),t._UZ(18,"ghs-highlight-conditions",15),t.TgZ(19,"div",16),t.YNc(20,GV,7,11,"span",11),t.YNc(21,YV,3,8,"span",17),t.qZA(),t._UZ(22,"ghs-healthbar",18)(23,"ghs-entity-index-key",19),t.qZA(),t.TgZ(24,"ghs-pointer-input",20),t.NdJ("dragMove",function(l){return i.dragHpMove(l)})("dragEnd",function(l){return i.dragHpEnd(l)})("dragCancel",function(l){return i.dragHpCancel(l)})("singleClick",function(l){return i.openEntityMenu(l)})("doubleClick",function(l){return i.doubleClick(l)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.rFY(27,KV,[i.entity.dead,!i.entity.dormant&&i.entity.off,i.entity.dormant,!i.entity.dormant&&i.entity.revealed&&i.settingsManager.settings.scenarioRooms,!i.entity.dormant&&i.entity.active&&i.settingsManager.settings.activeStandees,!i.entity.dormant&&i.entity.active&&i.settingsManager.settings.activeStandees&&!i.figure.active,i.gameManager.isMonster(i.figure)&&!i.gameManager.stateManager.monsterPermissions[i.figure.name+"|"+i.figure.edition]||(i.gameManager.isObjective(i.figure)||i.gameManager.isObjectiveContainer(i.figure))&&i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters||i.gameManager.isCharacter(i.figure)&&!i.gameManager.stateManager.characterPermissions[i.figure.name+"|"+i.figure.edition],i.actionHints.length>0&&i.actionHints.length%2==1&&0==i.activeConditions.length&&i.entity.summon==i.SummonState.false,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme]))("entityAnimation",i.entity.dead),t.xp6(1),t.Q6J("ngClass",i.entity.type),t.xp6(4),t.Udp("background-image",i.figure.noThumbnail||i.settingsManager.settings.disableArtwork?"":"url("+i.gameManager.monsterManager.monsterThumbnail(i.figure)+")"),t.xp6(1),t.Q6J("ngClass",t.VKq(38,$V,i.entity.number<1&&!i.settingsManager.settings.disableAnimations)),t.xp6(2),t.Oqu(i.entity.number<0?"?":i.entity.number),t.xp6(1),t.Q6J("ghs-label","game.health")("ghs-label-attribute","title"),t.xp6(1),t.hij("",i.EntityValueFunction(i.entity.maxHealth)>0?t.lcZ(11,25,i.entity.health+i.health):"-"," "),t.xp6(2),t.Q6J("value-sign",i.health)("hideEmpty",!0)("container",!0),t.xp6(2),t.Q6J("ngForOf",i.actionHints),t.xp6(2),t.Q6J("ngIf",i.marker),t.xp6(1),t.Q6J("ngForOf",i.entity.markers),t.xp6(1),t.Q6J("entity",i.entity)("figure",i.figure),t.xp6(2),t.Q6J("ngForOf",i.activeConditions),t.xp6(1),t.Q6J("ngIf",i.entity.summon&&i.entity.summon!=i.SummonState.false),t.xp6(1),t.Q6J("entity",i.entity)("diff",i.health),t.xp6(1),t.Q6J("entity",i.entity),t.xp6(1),t.Q6J("relative",!0)("screenWidth",!0))},dependencies:[x.mk,x.sg,x.O5,s_,GO,Gu,im,ie,An,aa,Ii,sg],styles:['.entity-border[_ngcontent-%COMP%]{position:relative}.entity-border[_ngcontent-%COMP%]:hover{z-index:999}.entity-border[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;top:calc(var(--ghs-unit) * 1.6 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));bottom:calc(var(--ghs-unit) * 1.1 * var(--ghs-text-factor));right:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray);border-radius:calc(var(--ghs-unit) * .7)}.entity-border.action-hint-border[_ngcontent-%COMP%]:before{right:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%]:not(.dead){opacity:1;transform:translate(0)}.entity-border.dead[_ngcontent-%COMP%]{opacity:0;max-width:0;transform:translateY(100%)}@keyframes _ngcontent-%COMP%_monster-entity-active-focus{0%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-red)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .6) var(--ghs-color-red)}to{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-red)}}.entity-border.active.active-focus[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-active-focus 1s ease-in-out infinite}.entity-border.active[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .5) var(--ghs-color-red)}@keyframes _ngcontent-%COMP%_monster-entity-revealed{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-white)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-white)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-white)}}@keyframes _ngcontent-%COMP%_monster-entity-revealed-elite{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-yellow)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-yellow)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-yellow)}}@keyframes _ngcontent-%COMP%_monster-entity-revealed-boss{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-red)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-red)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-red)}}.entity-border.revealed[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-white);animation:_ngcontent-%COMP%_monster-entity-revealed 1s ease-in-out infinite}.entity-border.revealed[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-yellow);animation:_ngcontent-%COMP%_monster-entity-revealed-elite 1s ease-in-out infinite}.entity-border.revealed[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-red);animation:_ngcontent-%COMP%_monster-entity-revealed-boss 1s ease-in-out infinite}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]{position:relative;display:flex;cursor:pointer;height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));text-align:center;color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:100%;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .25 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{position:relative;display:flex;height:100%;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));border:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor)) solid var(--ghs-color-black);border-bottom-width:calc(var(--ghs-unit) * .35 * var(--ghs-text-factor));border-top-left-radius:25%;border-top-right-radius:25%;background-color:var(--ghs-color-black);filter:var(--ghs-filter-outline)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;border-top-left-radius:25%;border-top-right-radius:25%;overflow:hidden;z-index:0}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%] .background-image[_ngcontent-%COMP%]{position:absolute;top:-7%;left:0;width:100%;height:150%;background-color:var(--ghs-color-darkgray);background-size:calc(var(--ghs-unit) * 9.5 * var(--ghs-text-factor)) AUTO;background-repeat:no-repeat;filter:brightness(70%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .number[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));justify-content:center;align-items:center;font-family:ghs-normal;flex-shrink:0;z-index:1}@keyframes _ngcontent-%COMP%_number-pulse{0%{transform:scale(.9)}50%{transform:scale(1.1)}to{transform:scale(.9)}}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);background-color:var(--ghs-color-white);border-bottom-right-radius:50%;border-top-left-radius:35%;height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));text-shadow:none}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .number.highlight[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_number-pulse 2s ease-in-out infinite}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));position:relative;top:calc(var(--ghs-unit) * 1.2 * var(--ghs-text-factor));left:0;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]:before{content:" ";position:absolute;left:50%;top:calc(var(--ghs-unit) * -.9 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));background-image:url(health.8d6a842a197d29d3.svg);background-size:contain;background-repeat:no-repeat;transform:translate(-50%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * -4.5 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));z-index:1000}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;max-height:calc(var(--ghs-unit) * 7 * var(--ghs-text-factor));padding-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .placeholder-marker[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1.3 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 3.2 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] ghs-element-icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * 1.4 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));background-color:var(--ghs-color-darkgray);border-radius:100%;height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));margin-top:calc(var(--ghs-unit) * .8 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -1 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .4);border-style:solid;border-color:var(--ghs-color-gray)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .markers[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;bottom:0;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;height:calc(var(--ghs-unit) * 7.5 * var(--ghs-text-factor));margin-left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.expired[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.expired[_ngcontent-%COMP%]{opacity:.6}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon.condition-overlay[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{transform-origin:center center;z-index:999}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(2n) .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(2n) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(2n) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(-25%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%]:nth-child(odd) .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(odd) .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container[_ngcontent-%COMP%]:nth-child(odd) .summon[_ngcontent-%COMP%]:hover{transform:scale(2) translateY(25%)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%], .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.center[_ngcontent-%COMP%]{grid-row:span 2}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition-container.center[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.center[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover, .entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon-container.center[_ngcontent-%COMP%] .summon[_ngcontent-%COMP%]:hover{transform:scale(2)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:100%;transform:none;color:var(--ghs-color-white);font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));text-shadow:var(--ghs-outline-thin);filter:invert(1)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-outline)}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .range[_ngcontent-%COMP%]{position:relative;top:20%}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .range[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.3 * var(--ghs-text-factor));height:auto}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions.actions[_ngcontent-%COMP%] .condition-container[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .range[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 2.3 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * -.3 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * .3 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .summon.new[_ngcontent-%COMP%]:before{content:" ";display:block;position:absolute;width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));background-image:url(minus.97c98a810771fceb.svg);background-size:cover}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * .2 * var(--ghs-text-factor));left:calc(var(--ghs-unit) * .4 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 8.2 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * .75 * var(--ghs-text-factor));z-index:0;border-radius:15%;overflow:hidden}.entity-border[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * -3.5 * var(--ghs-text-factor))}.entity-border[_ngcontent-%COMP%] .entity.normal[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{background-color:var(--ghs-color-white)}.entity-border[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{background-color:var(--ghs-color-yellow)}.entity-border[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}.entity-border.dormant[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%]{filter:grayscale(.4)}.entity-border.dormant[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .background-image-container[_ngcontent-%COMP%], .entity-border.dormant[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] ghs-healthbar[_ngcontent-%COMP%]{filter:grayscale(.8)}.entity-border[_ngcontent-%COMP%] .drag-hp[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:calc(var(--ghs-unit) * 9 * var(--ghs-text-factor));height:100%;z-index:4}@keyframes _ngcontent-%COMP%_monster-entity-active-focus-fh{0%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-blue)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .6) var(--ghs-color-blue)}to{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .3) var(--ghs-color-blue)}}.entity-border.fh.active.active-focus[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-active-focus-fh 1s ease-in-out infinite}.entity-border.fh.active[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * 1) calc(var(--ghs-unit) * .5) var(--ghs-color-blue)}@keyframes _ngcontent-%COMP%_monster-entity-revealed-fh{0%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}40%,60%{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-darkgray)}to{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}}.entity-border.fh.revealed[_ngcontent-%COMP%] .entity[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{box-shadow:0 0 calc(var(--ghs-unit) * .6) calc(var(--ghs-unit) * .3) var(--ghs-color-darkgray);animation:_ngcontent-%COMP%_monster-entity-revealed-fh 1s ease-in-out infinite}.entity-border.fh.revealed[_ngcontent-%COMP%] .entity.elite[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-revealed-elite 1s ease-in-out infinite}.entity-border.fh.revealed[_ngcontent-%COMP%] .entity.boss[_ngcontent-%COMP%] .standee[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_monster-entity-revealed-boss 1s ease-in-out infinite}.entity-border.modern[_ngcontent-%COMP%]:not(.active) .standee[_ngcontent-%COMP%]{box-shadow:none;filter:none}']})),a})();const WV=["objectiveTitle"],XV=["objectiveName"],Vw=function(o){return{"active-border":o}};function tY(o,a){if(1&o&&(t.TgZ(0,"span",22),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,Vw,n.objective.active)),t.xp6(1),t.Oqu(n.entity.marker)}}function eY(o,a){if(1&o&&(t.ynx(0),t.YNc(1,tY,2,4,"span",3),t.TgZ(2,"span",21),t._uU(3),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.entity.marker),t.xp6(2),t.hij(" ",n.entity.number," ")}}function nY(o,a){if(1&o&&(t.TgZ(0,"span",22),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,Vw,n.objective.active)),t.xp6(1),t.Oqu(n.marker)}}function iY(o,a){if(1&o&&(t.TgZ(0,"span",23),t._UZ(1,"img",15),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,Vw,n.objective.active)),t.xp6(1),t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH)}}function oY(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"ghs-highlight-conditions",24),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("entity",n.entity)}}function aY(o,a){if(1&o&&t._UZ(0,"img",37),2&o){const n=t.oxw(2);t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH)}}function sY(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.objective.title,"")}}function rY(o,a){if(1&o&&t._UZ(0,"span",38),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function cY(o,a){if(1&o&&(t.ynx(0),t._uU(1),t.ALo(2,"ghsMinZero"),t._UZ(3,"span",39),t.BQk()),2&o){const n=t.oxw(2);t.xp6(1),t.AsE(" ",t.lcZ(2,5,n.entity.health+n.health),"/",n.entity.maxHealth," "),t.xp6(2),t.Q6J("value-sign",n.health)("hideEmpty",!0)("container",!0)}}function lY(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"-"),t.qZA())}function gY(o,a){if(1&o&&t._UZ(0,"img",45),2&o){const n=a.$implicit,e=t.oxw(2),i=e.index,s=e.$implicit,l=t.oxw(2);t.Udp("z-index",10*i+s.value-n-1),t.Q6J("src","./assets/images"+(l.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+s.name+".svg",t.LSH)}}const dY=function(){return[]};function hY(o,a){if(1&o&&(t.ynx(0),t.YNc(1,gY,1,3,"img",44),t.ALo(2,"ghsRange"),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",t.xi3(2,1,t.DdM(4,dY),n.value-1))}}function uY(o,a){if(1&o&&(t.TgZ(0,"span",46),t._uU(1),t.qZA()),2&o){const n=t.oxw(),i=n.$implicit;t.Udp("z-index",10*n.index+i.value+1),t.xp6(1),t.Oqu(i.value)}}function _Y(o,a){if(1&o&&t._UZ(0,"span",47),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+2)}}function pY(o,a){if(1&o&&t._UZ(0,"span",48),2&o){const n=t.oxw();t.Udp("z-index",10*n.index+n.$implicit.value+3)}}function fY(o,a){if(1&o&&(t.TgZ(0,"span",40),t._UZ(1,"img",15),t.YNc(2,hY,3,5,"ng-container",2),t.YNc(3,uY,2,3,"span",41),t.YNc(4,_Y,1,2,"span",42),t.YNc(5,pY,1,2,"span",43),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.Udp("z-index",10*e+n.value),t.Q6J("src","./assets/images"+(i.settingsManager.settings.fhStyle?"/fh":"")+"/condition/"+n.name+".svg",t.LSH),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=n.types.indexOf(i.ConditionType.value)&&-1==n.types.indexOf(i.ConditionType.stack)),t.xp6(1),t.Q6J("ngIf",-1!=i.entity.immunities.indexOf(n.name)),t.xp6(1),t.Q6J("ngIf",n.permanent)}}function mY(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",25),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.qZA(),t.TgZ(2,"div",26)(3,"div",25),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.qZA(),t.TgZ(4,"div",27),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t.TgZ(5,"div",28,29),t.YNc(7,aY,1,1,"img",30),t.YNc(8,sY,2,1,"span",2),t.YNc(9,rY,1,1,"span",31),t._UZ(10,"ghs-entity-index-key",24),t.qZA()(),t.TgZ(11,"div",32)(12,"div",33),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))})("dragMove",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpMove(i))})("dragEnd",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpEnd(i))})("dragCancel",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.dragHpCancel(i))}),t._UZ(13,"img",34),t.YNc(14,cY,4,7,"ng-container",2),t.YNc(15,lY,2,0,"span",2),t.qZA(),t.TgZ(16,"div",35),t.YNc(17,fY,6,7,"span",36),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(7),t.Q6J("ngIf",n.entity.marker),t.xp6(1),t.Q6J("ngIf",n.objective.title),t.xp6(1),t.Q6J("ngIf",!n.objective.title),t.xp6(1),t.Q6J("entity",n.entity),t.xp6(2),t.Q6J("relative",!0)("screenWidth",!0),t.xp6(2),t.Q6J("ngIf",n.entity.maxHealth>0),t.xp6(1),t.Q6J("ngIf",0==n.entity.maxHealth),t.xp6(2),t.Q6J("ngForOf",n.activeConditions)}}function vY(o,a){if(1&o&&t._UZ(0,"img",37),2&o){const n=t.oxw(2);t.Q6J("src","./assets/images/objective/"+(n.objective.escort?"escort":"objective")+".svg",t.LSH)}}function CY(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.objective.title,"")}}function MY(o,a){if(1&o&&t._UZ(0,"span",38),2&o){const n=t.oxw(2);t.Q6J("ghs-label",n.objective.name?"data.objective."+n.objective.name:n.objective.escort?"escort":"objective")}}function OY(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",26)(2,"div",49)(3,"div",28,29),t.YNc(5,vY,1,1,"img",30),t.YNc(6,CY,2,1,"span",2),t.YNc(7,MY,1,1,"span",31),t.qZA()()(),t.BQk()),2&o){const n=t.oxw();t.xp6(5),t.Q6J("ngIf",n.objective.marker),t.xp6(1),t.Q6J("ngIf",n.objective.title),t.xp6(1),t.Q6J("ngIf",!n.objective.title)}}function PY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openEntityMenu(i))}),t._UZ(1,"ghs-actions",51),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("actions",n.objectiveData.actions)}}function yY(o,a){if(1&o&&t._UZ(0,"ghs-standee",54),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("figure",e.objective)("entity",n)}}function bY(o,a){if(1&o&&(t.TgZ(0,"div",52),t.YNc(1,yY,1,2,"ghs-standee",53),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.objective.entities)}}const xY=function(o,a,n){return{off:o,escort:a,denied:n}},wY=function(o){return{entity:o}},kY=function(o){return{"outer-denied":o}},TY=function(o){return{empty:o}},ZY=function(o,a){return{empty:o,disabled:a}};let AY=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"titleInput",void 0),(0,_.Z)(this,"objectiveName",void 0),(0,_.Z)(this,"characterManager",d.v.characterManager),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"ConditionType",re.CP),(0,_.Z)(this,"objectiveData",void 0),(0,_.Z)(this,"entity",void 0),(0,_.Z)(this,"activeConditions",[]),(0,_.Z)(this,"initiative",-1),(0,_.Z)(this,"health",0),(0,_.Z)(this,"marker",""),(0,_.Z)(this,"nonDead",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.objective&&this.objective.objectiveId&&(this.objectiveData=d.v.objectiveDataByScenarioObjectiveIdentifier(this.objective.objectiveId)),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.nonDead=this.objective.entities.filter(e=>d.v.entityManager.isAlive(e)).length,this.activeConditions=[],this.entity=void 0,this.marker="",1==this.nonDead?(this.entity=this.objective.entities.find(e=>d.v.entityManager.isAlive(e)),this.entity&&(this.activeConditions=d.v.entityManager.activeConditions(this.entity),this.entity.immunities.forEach(e=>{this.activeConditions.find(i=>i.name==e)||this.activeConditions.push(new re.hT(e))}))):this.objective.entities.flatMap(e=>e.marker).every((e,i,s)=>0==s.indexOf(e))&&(this.marker=this.objective.entities.flatMap(e=>e.marker)[0])}toggleFigure(e){d.v.game.state==ge.D2.draw||R.r.settings.initiativeRequired&&this.objective.initiative<=0?this.openInitiativeDialog(e):(d.v.stateManager.before(this.objective.active?"unsetActive":"setActive",this.objective.title||this.objective.name),d.v.roundManager.toggleFigure(this.objective),d.v.stateManager.after())}openInitiativeDialog(e){this.dialog.open(zO,{panelClass:"dialog",data:this.objective,positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}dragInitiativeMove(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),-1==this.initiative&&(this.initiative=this.objective.initiative),this.objective.initiative=e}dragInitiativeEnd(e){e>99?e=99:e<0&&(e=0),0==e&&R.r.settings.initiativeRequired&&(e=1),this.objective.initiative!=this.initiative&&(this.objective.initiative=this.initiative,d.v.stateManager.before("setObjectiveInitiative",this.objective.title||this.objective.name,""+e),this.objective.initiative=e,this.initiative=-1,d.v.game.state==ge.D2.next&&d.v.sortFigures(this.objective),d.v.stateManager.after())}dragHpMove(e){this.health=e,this.entity&&this.entity.health+this.health>(0,ae.j9)(this.entity.maxHealth)&&(this.health=(0,ae.j9)(this.entity.maxHealth)-this.entity.health)}dragHpEnd(e){0!=this.health&&this.entity&&(d.v.stateManager.before("changeObjectiveEntityHP",this.objective.title||this.objective.name,(0,he.uZ)(this.health),""+this.entity.number),d.v.entityManager.changeHealth(this.entity,this.objective,this.health),this.entity.health<=0&&this.entity.maxHealth>0&&d.v.objectiveManager.removeObjective(this.objective),this.health=0,d.v.stateManager.after())}dragHpCancel(e){this.health=0}openEntityMenu(e){this.entity&&this.dialog.open($c,{panelClass:"dialog",data:{entity:this.entity,figure:this.objective},positionStrategy:this.overlay.position().flexibleConnectedTo(this.objectiveName).withPositions((0,he.sm)())})}openEntitiesMenu(e){this.dialog.open(Bw,{panelClass:"dialog",data:{objective:this.objective},positionStrategy:this.overlay.position().flexibleConnectedTo(e.target).withPositions((0,he.sm)())})}addEntity(){const e=this.objective.entities.filter(l=>d.v.entityManager.isAlive(l)).length;let i=e%12;if(this.objective.entities.find(l=>l.number==i)&&(i=e%12,e<12))for(;this.objective.entities.find(l=>l.number-1==i);)i++;let s=this.objective.name;s||(s=this.objective.title,s||(s=this.objective.escort?"%escort%":"%objective%")),d.v.stateManager.before("addObjective.entity",""+(i+1),s),d.v.objectiveManager.addObjectiveEntity(this.objective,i),d.v.stateManager.after()}removeCondition(e){this.entity&&(d.v.stateManager.before(...d.v.entityManager.undoInfos(this.entity,this.objective,"removeCondition"),e.name),d.v.entityManager.removeCondition(this.entity,e,e.permanent),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-objective-container"]],viewQuery:function(e,i){if(1&e&&(t.Gf(WV,5),t.Gf(XV,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.titleInput=s.first),t.iGM(s=t.CRH())&&(i.objectiveName=s.first)}},inputs:{objective:"objective"},decls:24,vars:31,consts:[[1,"objective",3,"ngClass"],[1,"image-container",3,"ngClass"],[4,"ngIf"],["class","map-marker",3,"ngClass",4,"ngIf"],["class","objective-icon",3,"ngClass",4,"ngIf"],[1,"drag-initiative",3,"ngClass","dragMove","dragEnd","singleClick","doubleClick"],[3,"figure"],["initiativeElement",""],[1,"stats"],["class","actions",3,"click",4,"ngIf"],[1,"spacer",3,"click"],[1,"add-entity"],["ghs-pointer-input","",1,"add-entity-button",3,"ghs-label","ghs-label-attribute","singleClick"],["src","./assets/images/plus.svg",1,"ghs-svg"],[1,"icon-container",3,"click"],[3,"src"],[1,"entities-container",3,"ngClass"],[1,"spacer"],[1,"entities-menu",3,"ngClass","entityAnimation","click"],["src","./assets/images/up.svg",1,"menu"],["class","entities",4,"ngIf"],[1,"objective-marker"],[1,"map-marker",3,"ngClass"],[1,"objective-icon",3,"ngClass"],[3,"entity"],["ghs-pointer-input","",1,"entity-menu-container",3,"singleClick"],[1,"column","col-1"],["ghs-pointer-input","",1,"title-container",3,"singleClick"],[1,"title"],["objectiveName",""],["class","icon",3,"src",4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"status-bar"],["ghs-pointer-input","",1,"health",3,"relative","screenWidth","singleClick","dragMove","dragEnd","dragCancel"],["src","./assets/images/status/health.svg"],[1,"conditions"],["class","condition",4,"ngFor","ngForOf"],[1,"icon",3,"src"],[3,"ghs-label"],[1,"value-overlay",3,"value-sign","hideEmpty","container"],[1,"condition"],["class","value",3,"z-index",4,"ngIf"],["class","condition immunity condition-overlay",3,"z-index",4,"ngIf"],["class","condition permanent condition-overlay",3,"z-index",4,"ngIf"],["class","stack",3,"z-index","src",4,"ngFor","ngForOf"],[1,"stack",3,"src"],[1,"value"],[1,"condition","immunity","condition-overlay"],[1,"condition","permanent","condition-overlay"],[1,"title-container"],[1,"actions",3,"click"],[3,"actions"],[1,"entities"],[3,"figure","entity",4,"ngFor","ngForOf"],[3,"figure","entity"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"a",1),t.YNc(2,eY,4,2,"ng-container",2),t.YNc(3,nY,2,4,"span",3),t.YNc(4,iY,2,4,"span",4),t.qZA(),t.TgZ(5,"ghs-pointer-input",5),t.NdJ("dragMove",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeMove(l)})("dragEnd",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.dragInitiativeEnd(l)})("singleClick",function(l){return i.toggleFigure(l)})("doubleClick",function(l){return(!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters)&&i.openInitiativeDialog(l)}),t.qZA(),t._UZ(6,"ghs-character-initiative",6,7),t.YNc(8,oY,2,1,"ng-container",2),t.TgZ(9,"div",8),t.YNc(10,mY,18,9,"ng-container",2),t.YNc(11,OY,8,3,"ng-container",2),t.YNc(12,PY,2,1,"div",9),t.TgZ(13,"span",10),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t.qZA(),t.TgZ(14,"div",11)(15,"a",12),t.NdJ("singleClick",function(){return i.addEntity()}),t._UZ(16,"img",13),t.qZA()(),t.TgZ(17,"div",14),t.NdJ("click",function(l){return i.openEntityMenu(l)}),t._UZ(18,"img",15),t.qZA()()(),t.TgZ(19,"div",16),t._UZ(20,"span",17),t.TgZ(21,"span",18),t.NdJ("click",function(l){return i.openEntitiesMenu(l)}),t._UZ(22,"img",19),t.qZA(),t.YNc(23,bY,2,1,"div",20),t.qZA()),2&e&&(t.Q6J("ngClass",t.kEZ(18,xY,i.objective.off,i.objective.escort,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters)),t.xp6(1),t.Q6J("ngClass",t.VKq(22,wY,i.entity)),t.xp6(1),t.Q6J("ngIf",i.entity),t.xp6(1),t.Q6J("ngIf",i.marker),t.xp6(1),t.Q6J("ngIf",!(i.marker||i.entity&&i.entity.marker)),t.xp6(1),t.Q6J("ngClass",t.VKq(24,kY,i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.round)),t.xp6(1),t.Q6J("figure",i.objective),t.xp6(2),t.Q6J("ngIf",i.entity),t.xp6(2),t.Q6J("ngIf",i.entity),t.xp6(1),t.Q6J("ngIf",!i.entity),t.xp6(1),t.Q6J("ngIf",i.objectiveData&&i.objectiveData.actions),t.xp6(3),t.Q6J("ghs-label","objective.addEntity")("ghs-label-attribute","title"),t.xp6(3),t.Q6J("src","./assets/images/objective/"+(i.objective.escort?"escort":"objective")+".svg",t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(26,TY,i.nonDead<2)),t.xp6(2),t.Q6J("ngClass",t.WLB(28,ZY,0==i.nonDead,i.nonDead<2))("entityAnimation",0==i.nonDead),t.xp6(2),t.Q6J("ngIf",i.nonDead>1))},dependencies:[x.mk,x.sg,x.O5,s_,VO,qT,ag,Gu,im,ie,An,aa,Ii,sg],styles:[".objective[_ngcontent-%COMP%]{position:relative;z-index:1;height:100%;width:calc(var(--ghs-unit) * 98);height:calc(var(--ghs-unit) * 14);background-color:var(--ghs-color-green);background-image:url(char-mat.5a0fee77df1ff44e.png),url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply,overlay;background-size:100% 100%;display:flex;border-radius:calc(var(--ghs-unit) * .5);transition:background-color .15s ease-in-out,background-image .15s ease-in-out,background-blend-mode .15s ease-in-out}.objective.escort[_ngcontent-%COMP%]{background-color:var(--ghs-color-red)}.objective[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{transition:filter .15s ease-in-out}.objective.off[_ngcontent-%COMP%]{background-color:var(--ghs-color-gray);background-image:url(char-mat.5a0fee77df1ff44e.png);background-blend-mode:multiply}.objective.off[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%], .objective.off[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{filter:grayscale(100%)}.objective[_ngcontent-%COMP%] ghs-character-initiative[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 1)}.objective[_ngcontent-%COMP%] ghs-highlight-conditions[_ngcontent-%COMP%]{z-index:5;position:absolute;left:calc(var(--ghs-unit) * 6);top:50%;transform:translateY(-50%);width:calc(var(--ghs-unit) * 9.5)}.objective[_ngcontent-%COMP%] .entity-menu-container[_ngcontent-%COMP%]{cursor:pointer;position:absolute;inset:0}.objective[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{position:absolute;top:0;left:calc(var(--ghs-unit) * 6);width:calc(var(--ghs-unit) * 9.5);height:100%;z-index:4}.objective[_ngcontent-%COMP%] .drag-initiative.dragging[_ngcontent-%COMP%]{left:0;width:100%}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{height:100%;display:flex;flex-basis:100%;cursor:pointer}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-1[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 24);overflow:visible}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .column.col-2[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8);justify-content:space-evenly}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:visible}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%] ghs-entity-index-key[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{pointer-events:none;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3.5);color:var(--ghs-color-white);text-shadow:var(--ghs-outline);display:flex;align-items:center;white-space:nowrap}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 5);width:auto;margin-left:calc(var(--ghs-unit) * -1);margin-right:calc(var(--ghs-unit) * .5)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{display:flex;align-items:center;z-index:2}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline);width:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));width:auto}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .health[_ngcontent-%COMP%] .value-overlay[_ngcontent-%COMP%]{z-index:1000}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{height:100%;width:calc(var(--ghs-unit) * 12);display:flex;justify-content:center;align-items:center;margin-right:calc(var(--ghs-unit) * 4)}.objective[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto}.objective[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 28);height:calc(var(--ghs-unit) * 11);margin:calc(var(--ghs-unit) * 1.5) 0;margin-left:calc(var(--ghs-unit) * 1);display:flex;justify-content:center;font-size:calc(var(--ghs-unit) * 2.5);overflow:auto}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);margin:calc(var(--ghs-unit) * 2.1) calc(var(--ghs-unit) * 3.4);margin-left:calc(var(--ghs-unit) * 6);margin-right:calc(var(--ghs-unit) * 1);cursor:pointer;border-radius:calc(var(--ghs-unit) * 1);flex-shrink:0}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 9.5);height:calc(var(--ghs-unit) * 9.5);border-radius:100%}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 8);width:auto}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .map-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 6.5)}.objective[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * -1);right:calc(var(--ghs-unit) * -1);font-size:calc(var(--ghs-unit) * 2.1);z-index:1}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%]{position:relative;display:flex}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;margin-right:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));overflow:visible}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));margin:0}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] img.stack[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * -2 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition.condition-overlay[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3.8 * var(--ghs-text-factor));top:0;left:0;pointer-events:none;z-index:2}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 1.5 * var(--ghs-text-factor));color:var(--ghs-color-white);position:absolute;top:calc(var(--ghs-unit) * 2.1 * var(--ghs-text-factor));left:50%;text-shadow:none;transform:translate(-50%)}.objective[_ngcontent-%COMP%] .conditions[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]:hover{transform:scale(2);transform-origin:center center;z-index:999}.objective[_ngcontent-%COMP%] .add-entity[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor))}.objective[_ngcontent-%COMP%] .add-entity-button[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 5 * var(--ghs-text-factor));cursor:pointer;font-size:calc(var(--ghs-unit) * 10 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray);stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 1.5)}.objective[_ngcontent-%COMP%] .add-entity-button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white);filter:var(--ghs-filter-white)}.objective.denied[_ngcontent-%COMP%] .drag-initiative[_ngcontent-%COMP%]{pointer-events:initial}.entities-container[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;transition:max-height 1s ease-out;max-height:100%;max-width:calc(var(--ghs-unit) * 96);margin-top:calc(var(--ghs-unit) * .25 * var(--ghs-text-factor))}.entities-container.empty[_ngcontent-%COMP%]{max-height:0}.entities-container[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:none;width:calc(var(--ghs-unit) * 17.5);min-height:100%}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:block;width:auto;height:calc(var(--ghs-unit) * 8.5);margin-right:calc(var(--ghs-unit) * 1)}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{position:absolute;top:50%;left:calc(var(--ghs-unit) * -4);transform:translateY(-50%);width:calc(var(--ghs-unit) * 3.7 * var(--ghs-text-factor));height:auto;filter:var(--ghs-filter-darkgray);opacity:.5}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:not(.empty){opacity:1;transform:translate(0)}.entities-container[_ngcontent-%COMP%] .entities-menu.empty[_ngcontent-%COMP%]{opacity:0;height:0;max-width:0;transform:translateY(100%)}.entities-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%]{cursor:initial;pointer-events:none}.entities-container[_ngcontent-%COMP%] .entities-menu.disabled[_ngcontent-%COMP%] img.menu[_ngcontent-%COMP%]{display:none}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.icon[_ngcontent-%COMP%]{opacity:.5}.entities-container[_ngcontent-%COMP%] .entities-menu[_ngcontent-%COMP%]:hover img.menu[_ngcontent-%COMP%]{opacity:1}.entities-container[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;max-width:calc(var(--ghs-unit) * 77.5)}.entities-container[_ngcontent-%COMP%] .entities[_ngcontent-%COMP%] ghs-standee[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);transition:all 1s ease-out}"]})),a})();const SY=function(o){return{"active-border":o}};function EY(o,a){if(1&o&&t._UZ(0,"img",3),2&o){const n=t.oxw();t.Q6J("ngClass",t.VKq(2,SY,n.monster.active))("src",n.gameManager.monsterManager.monsterThumbnail(n.monster),t.LSH)}}function DY(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Oqu(n[0])}}const IY=function(o,a){return{"active-border":o,off:a}};function NY(o,a){if(1&o&&(t.TgZ(0,"span",4)(1,"span",5),t.YNc(2,DY,2,1,"span",6),t.qZA(),t.TgZ(3,"span",7),t._UZ(4,"span",8),t.qZA()()),2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(3,IY,n.monster.active,n.monster.off)),t.xp6(2),t.Q6J("ngForOf",n.settingsManager.getLabel("data.monster."+n.monster.name).split(" ")),t.xp6(2),t.Q6J("ghs-label","data.monster."+n.monster.name)}}const JY=function(o,a,n){return{disabled:o,"full-ability":a,modern:n}},UY=function(o,a){return{closed:o,opened:a}};let LY=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),this.dialog=e}toggleFigure(){d.v.game.state==ge.D2.next&&d.v.monsterManager.monsterEntityCount(this.monster)?(d.v.stateManager.before(this.monster.active?"unsetActive":"setActive","data.monster."+this.monster.name),d.v.roundManager.toggleFigure(this.monster),d.v.stateManager.after()):this.imageDialog()}imageDialog(){R.r.settings.disableArtwork||this.dialog.open(QY,{data:this.monster})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-image"]],inputs:{monster:"monster"},decls:3,vars:10,consts:[["ghs-pointer-input","",1,"image",3,"onRelease","ngClass","ghs-label","ghs-label-attribute","singleClick","doubleClick"],[3,"ngClass","src",4,"ngIf"],["class","no-artwork",3,"ngClass",4,"ngIf"],[3,"ngClass","src"],[1,"no-artwork",3,"ngClass"],[1,"letter"],[4,"ngFor","ngForOf"],[1,"name"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.NdJ("singleClick",function(){return i.toggleFigure()})("doubleClick",function(){return i.imageDialog()}),t.YNc(1,EY,1,4,"img",1),t.YNc(2,NY,5,6,"span",2),t.qZA()),2&e&&(t.Q6J("onRelease",!0)("ngClass",t.kEZ(6,JY,i.gameManager.game.state==i.GameState.draw||0==i.monster.entities.length,i.settingsManager.settings.showFullAbilityCard,"modern"==i.settingsManager.settings.theme))("ghs-label",i.gameManager.game.state==i.GameState.next?i.monster.active?"game.figure.endTurn":"game.figure.startTurn":"")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ngIf",!i.monster.noThumbnail&&!i.settingsManager.settings.disableArtwork),t.xp6(1),t.Q6J("ngIf",i.monster.noThumbnail||i.settingsManager.settings.disableArtwork))},dependencies:[x.mk,x.sg,x.O5,ie,An],styles:[".image[_ngcontent-%COMP%]{position:relative;display:flex;width:calc(var(--ghs-unit) * 16);height:calc(var(--ghs-unit) * 16);flex-direction:column;justify-content:center;align-items:center;text-align:center;cursor:pointer}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto;border-radius:100%;transition:box-shadow .1s ease-in-out}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:not(.active-border){box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;font-family:var(--ghs-font-title);width:100%;height:100%;border-radius:100%;transition:box-shadow .1s ease-in-out;color:var(--ghs-color-white);background-color:var(--ghs-color-darkgray);border-color:var(--ghs-character-color)}.image[_ngcontent-%COMP%] .no-artwork.off[_ngcontent-%COMP%]{color:var(--ghs-color-gray)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%]:not(.active-border){box-shadow:0 0 calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * .1) var(--ghs-color-darkgray)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%] .letter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:calc(var(--ghs-unit) * 6)}.image[_ngcontent-%COMP%] .no-artwork[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * -1);font-size:calc(var(--ghs-unit) * 2)}.image.disabled[_ngcontent-%COMP%]{cursor:initial}.image.full-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 17.5);height:calc(var(--ghs-unit) * 17.5)}.image.modern[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:not(.active-border){box-shadow:none}"]})),a})(),QY=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"opened",!1),this.monster=e,this.dialogRef=i}ngOnInit(){this.opened=!0}close(){this.opened=!1,setTimeout(()=>{this.dialogRef.close()},400)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-image-dialog"]],decls:3,vars:5,consts:[[1,"monster-image-dialog",3,"ngClass"],[3,"src"],[1,"close-container",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"img",1),t.qZA(),t.TgZ(2,"div",2),t.NdJ("click",function(){return i.close()}),t.qZA()),2&e&&(t.Q6J("ngClass",t.WLB(2,UY,!i.opened,i.opened)),t.xp6(1),t.Q6J("src",i.gameManager.monsterManager.monsterArtwork(i.monster),t.LSH))},dependencies:[x.mk],styles:["[_nghost-%COMP%]{background-color:transparent;padding:0;margin:0;border:0}.monster-image-dialog[_ngcontent-%COMP%]{width:100vw;max-width:600px;height:100vw;max-height:600px;border-image:none;background:none;transition:transform .15s ease-in-out;transform:scale(0);display:flex;justify-content:center;align-items:center}.monster-image-dialog[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:80%;height:auto;border-radius:2%;filter:var(--ghs-filter-shadow)}.monster-image-dialog.opened[_ngcontent-%COMP%]{transform:scale(1)}.monster-image-dialog.closed[_ngcontent-%COMP%]{transform:scale(0);transition-delay:.1s}.close-container[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;inset:0}"]})),a})();const RY=["menu"];function FY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",3),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.draw())}),t._UZ(1,"span",4),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.drawAnother"))}function qY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",3),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.restoreDefault())}),t._UZ(1,"span",4),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.restore"))}function HY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",3),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.defaultSort())}),t._UZ(1,"span",4),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","game.cards.defaultSort"))}function jY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",5),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.toggleDrawExtra())}),t.qZA(),t._UZ(2,"span",4),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.monster.drawExtra),t.xp6(1),t.Q6J("ghs-label","game.cards.drawExtra")}}function BY(o,a){1&o&&t._UZ(0,"div",17)}function zY(o,a){1&o&&t._UZ(0,"div",22)}function GY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(i))}),t._UZ(1,"img",24),t.qZA()}}const HT=function(o,a){return{"expanded-ability":o,"bottom-actions":a}};function VY(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",18),t._UZ(2,"ghs-ability",19),t.YNc(3,zY,1,0,"div",20),t.YNc(4,GY,2,0,"a",21),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(7,HT,e.settingsManager.settings.showExpandedAbilityCard&&(2==e.reveal||n.revealed),e.gameManager.hasBottomAbility(n))),t.xp6(1),t.Q6J("ability",n)("monster",e.monster)("flipped",2==e.reveal)("reveal",!0),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}function YY(o,a){1&o&&t._UZ(0,"div",22)}function KY(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().index,s=t.oxw();return t.KtG(s.remove(i))}),t._UZ(1,"img",24),t.qZA()}}function $Y(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",18),t._UZ(2,"ghs-ability",25),t.YNc(3,YY,1,0,"div",20),t.YNc(4,KY,2,0,"a",21),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(6,HT,e.settingsManager.settings.showExpandedAbilityCard,e.gameManager.hasBottomAbility(n))),t.xp6(1),t.Q6J("ability",n)("monster",e.monster)("flipped",!0),t.xp6(1),t.Q6J("ngIf",e.edit),t.xp6(1),t.Q6J("ngIf",e.edit)}}const WY=function(o){return{edit:o}},XY=function(o){return{denied:o}};let tK=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"bottomActions",!1),this.monster=e,this.dialogRef=i}ngOnInit(){setTimeout(()=>{this.menuElement&&(this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)")},R.r.settings.disableAnimations?0:250),this.bottomActions=d.v.monsterManager.hasBottomActions(this.monster)}toggleEdit(){this.edit=!this.edit,setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}upcomingCards(){let e=this.monster.ability;return e>=0&&this.bottomActions&&e++,this.monster.abilities.filter((i,s)=>s>e).map(i=>d.v.abilities(this.monster)[i])}disgardedCards(){let e=this.monster.ability;return e>=0&&this.bottomActions&&e++,[...this.monster.abilities.filter((i,s)=>s<=e).map(i=>d.v.abilities(this.monster)[i]).reverse(),...this.monster.abilities.filter((i,s)=>s>e&&sd.v.abilities(this.monster)[i])]}abilityIndex(e){return d.v.abilities(this.monster).indexOf(e)}shuffle(){d.v.stateManager.before("shuffleAbilityDeck","data.monster."+this.monster.name),d.v.monsterManager.shuffleAbilities(this.monster),d.v.stateManager.after()}draw(){d.v.stateManager.before("drawAbility","data.monster."+this.monster.name),d.v.monsterManager.drawAbility(this.monster),d.v.stateManager.after()}toggleDrawExtra(){this.monster.drawExtra?(d.v.stateManager.before("unsetDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!1,d.v.monsterManager.applySameDeck(this.monster),d.v.stateManager.after()):d.v.monsterManager.applySameDeck(this.monster)&&(d.v.stateManager.before("setDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!0,d.v.game.state==ge.D2.next&&d.v.monsterManager.drawExtra(this.monster),d.v.stateManager.after())}dropUpcoming(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer){const s=this.monster.ability+1;Fn(this.monster.abilities,e.previousIndex+s,e.currentIndex+s)}else{const s=this.monster.ability;Fn(this.monster.abilities,s-e.previousIndex,e.currentIndex+s),this.monster.ability=this.monster.ability-1}const i=d.v.monsterManager.getSameDeckMonster(this.monster);i&&d.v.monsterManager.applySameDeck(i),d.v.stateManager.after()}dropDisgarded(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer)Fn(this.monster.abilities,this.monster.ability-e.previousIndex,this.monster.ability-e.currentIndex);else{this.monster.ability=this.monster.ability+1;const s=this.monster.ability;Fn(this.monster.abilities,e.previousIndex+s,s-e.currentIndex)}const i=d.v.monsterManager.getSameDeckMonster(this.monster);i&&d.v.monsterManager.applySameDeck(i),d.v.stateManager.after()}restoreDefault(){d.v.stateManager.before("restoreDefaultAbilities","data.monster."+this.monster.name);const e=d.v.abilities(this.monster);this.monster.abilities=e.filter(i=>!i.level||isNaN(+i.level)||(0,ae.j9)(i.level)<=this.monster.level).map((i,s)=>s),this.monster.ability=-1,d.v.stateManager.after()}remove(e){const i=d.v.abilities(this.monster)[this.monster.abilities[e+this.monster.ability+1]];d.v.stateManager.before("removeAbility","data.monster."+this.monster.name,this.abilityLabel(i)),this.monster.abilities.splice(e+this.monster.ability+1,1),d.v.stateManager.after()}abilityLabel(e){let i="data.monster."+this.monster.name;return e?.name?i="data.ability."+e.name:this.monster.deck!=this.monster.name&&(i="data.deck."+this.monster.deck,i.split(".")[i.split(".").length-1]===ja(R.r.getLabel(i))&&this.monster.deck&&(i="data.monster."+this.monster.deck)),ja(R.r.getLabel(i))}defaultSort(){this.monster.abilities=this.monster.abilities.sort((e,i)=>e-i)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-abilities-dialog"]],viewQuery:function(e,i){if(1&e&&t.Gf(RY,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},decls:25,vars:25,consts:[[1,"abilities-dialog",3,"ngClass"],[1,"menu",3,"ngClass"],["menu",""],[3,"click"],[3,"ghs-label"],["type","checkbox",3,"checked","click"],[1,"insert-menu"],[3,"click",4,"ngIf"],[4,"ngIf"],[1,"scroll-container"],[1,"abilities-container"],["cdkDropList","",1,"upcoming","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["upcomingList","cdkDropList"],["class","empty",4,"ngIf"],[4,"ngFor","ngForOf"],["cdkDropList","",1,"disgarded","drop-list",3,"cdkDropListDisabled","cdkDropListConnectedTo","cdkDropListAutoScrollStep","cdkDropListDropped"],["disgardedList","cdkDropList"],[1,"empty"],["cdkDrag","",1,"container","drag-hidden",3,"ngClass"],[3,"ability","monster","flipped","reveal"],["cdkDragHandle","","class","drag-handle",4,"ngIf"],["class","button-remove",3,"click",4,"ngIf"],["cdkDragHandle","",1,"drag-handle"],[1,"button-remove",3,"click"],["src","./assets/images/minus.svg",1,"ghs-svg"],[3,"ability","monster","flipped"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1,2)(3,"a",3),t.NdJ("click",function(){return i.reveal=(i.reveal+1)%3}),t._UZ(4,"span",4),t.qZA(),t.TgZ(5,"a",3),t.NdJ("click",function(){return i.shuffle()}),t._UZ(6,"span",4),t.qZA(),t.TgZ(7,"label")(8,"input",5),t.NdJ("click",function(){return i.toggleEdit()}),t.qZA(),t._UZ(9,"span",4),t.qZA(),t.TgZ(10,"div",6),t.YNc(11,FY,2,1,"a",7),t.YNc(12,qY,2,1,"a",7),t.YNc(13,HY,2,1,"a",7),t.YNc(14,jY,3,2,"label",8),t.qZA()(),t.TgZ(15,"div",9)(16,"div",10)(17,"div",11,12),t.NdJ("cdkDropListDropped",function(l){return i.dropUpcoming(l)}),t.YNc(19,BY,1,0,"div",13),t.YNc(20,VY,5,10,"ng-container",14),t.qZA(),t.TgZ(21,"div",15,16),t.NdJ("cdkDropListDropped",function(l){return i.dropDisgarded(l)}),t._UZ(23,"div",17),t.YNc(24,$Y,5,9,"ng-container",14),t.qZA()()()()),2&e){const s=t.MAs(18),l=t.MAs(22);t.Q6J("ngClass",t.VKq(21,WY,i.edit)),t.xp6(1),t.Q6J("ngClass",t.VKq(23,XY,i.monster&&i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.monsterPermissions[i.monster.name+"|"+i.monster.edition])),t.xp6(3),t.Q6J("ghs-label",2==i.reveal?"game.cards.coverAll":0==i.reveal?"game.cards.revealAll":"game.cards.revealAllConfirm"),t.xp6(2),t.Q6J("ghs-label","game.cards.shuffle"),t.xp6(2),t.Q6J("checked",i.edit),t.xp6(1),t.Q6J("ghs-label","game.cards.edit"),t.xp6(2),t.Q6J("ngIf",i.edit||i.bottomActions),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.edit),t.xp6(1),t.Q6J("ngIf",i.gameManager.monsterManager.getSameDeckMonster(i.monster)),t.xp6(2),t.Udp("max-height",i.maxHeight),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",l)("cdkDropListAutoScrollStep",20),t.xp6(2),t.Q6J("ngIf",0==i.upcomingCards().length),t.xp6(1),t.Q6J("ngForOf",i.upcomingCards()),t.xp6(1),t.Q6J("cdkDropListDisabled",!i.edit)("cdkDropListConnectedTo",s)("cdkDropListAutoScrollStep",20),t.xp6(3),t.Q6J("ngForOf",i.disgardedCards())}},dependencies:[x.mk,x.sg,x.O5,Bs,Ms,Zr,a_,ie],styles:['.abilities-dialog[_ngcontent-%COMP%]{position:relative}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-wrap:wrap}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--form-background);width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));border-width:calc(var(--ghs-unit) * .3);border-style:solid;display:grid;place-content:center;margin-right:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));color:var(--ghs-color-gray)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{left:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * -.5 * var(--ghs-text-factor));position:relative;content:" ";width:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:before{transform:scale(1)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover:before{background-color:var(--ghs-color-white)}.abilities-dialog[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .insert-menu[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-evenly;flex-basis:100%;flex-shrink:0}.abilities-dialog[_ngcontent-%COMP%] .drop-list[_ngcontent-%COMP%]{position:relative}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%]{display:flex;margin:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 80 * var(--ghs-text-factor));max-height:80vh}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;padding:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 40 * var(--ghs-text-factor))}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 37 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 23.7 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));flex-shrink:0;flex-grow:0}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container.expanded-ability[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container.expanded-ability[_ngcontent-%COMP%]{height:auto;min-height:calc(var(--ghs-unit) * 23.7 * var(--ghs-text-factor))}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container.bottom-actions[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container.bottom-actions[_ngcontent-%COMP%]{min-height:initial;height:calc(var(--ghs-unit) * 49.95 * var(--ghs-text-factor))}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{width:100%;height:100%}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;left:50%;top:50%;width:50%;height:70%;transform:translate(-50%,-50%)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]{z-index:1;position:absolute;display:flex;cursor:pointer;top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));right:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-filter-white) var(--ghs-filter-shadow)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .button-remove[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .upcoming[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%], .abilities-dialog[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .disgarded[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:absolute;left:calc(var(--ghs-unit) * .9 * var(--ghs-text-factor));display:block;margin:calc(var(--ghs-unit) * .7 * var(--ghs-text-factor));width:calc(var(--ghs-unit) * 36.6 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 23.3 * var(--ghs-text-factor));border-radius:calc(var(--ghs-unit) * 1);border-style:dashed;border-width:calc(var(--ghs-unit) * .2);border-color:var(--ghs-color-white)}.abilities-dialog[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.5}.abilities-dialog[_ngcontent-%COMP%] .cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.abilities-dialog[_ngcontent-%COMP%] .cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}']})),a})();const eK=["menu"];function nK(o,a){1&o&&t._UZ(0,"div",6)}function iK(o,a){1&o&&t._UZ(0,"div",7)}function oK(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"ghs-ability",3),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openAbilities(i))})("doubleClick",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.openAbility(i,!0))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ability",n.secondAbility)("monster",n.monster)("flipped",n.flipped)("highlightElements",n.settingsManager.settings.interactiveAbilities)}}function aK(o,a){if(1&o&&(t.TgZ(0,"span",8),t._uU(1),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.AsE(" ",n.monster.abilities.length-n.gameManager.monsterManager.drawnAbilities(n.monster)-(n.secondAbility?1:0),"/",n.monster.abilities.length,"\n")}}const sK=function(o,a,n,e,i,s,l){return{flipped:o,"full-ability":a,"expanded-ability":n,"bottom-actions":e,"second-ability":i,disabled:s,denied:l}};let rK=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"index",-1),(0,_.Z)(this,"menuElement",void 0),(0,_.Z)(this,"reveal",0),(0,_.Z)(this,"ability",void 0),(0,_.Z)(this,"secondAbility",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"edit",!1),(0,_.Z)(this,"cardPopup",!1),(0,_.Z)(this,"flipped",!1),(0,_.Z)(this,"maxHeight",""),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.flipped=this.calcFlipped()}calcFlipped(){if(!R.r.settings.abilities||(this.ability=-1==this.index?d.v.monsterManager.getAbility(this.monster):d.v.abilities(this.monster)[this.index],!this.ability&&d.v.monsterManager.hasBottomActions(this.monster)&&(this.ability=d.v.abilities(this.monster)[0],this.secondAbility=d.v.abilities(this.monster)[1]),!this.ability))return!1;d.v.hasBottomAbility(this.ability)&&(this.secondAbility=d.v.abilities(this.monster)[this.monster.abilities[this.monster.ability+(this.monster.abilitys.active&&l>m.indexOf(this.monster))||d.v.game.figures.every(s=>!s.active));return d.v.game.state==ge.D2.next&&i&&(e=e||d.v.game.state==ge.D2.next&&this.monster.lastDraw==d.v.game.round),e&&i}toggleEdit(){this.edit=!this.edit,setTimeout(()=>{this.maxHeight="calc(80vh - "+this.menuElement.nativeElement.offsetHeight+"px)"},0)}upcomingCards(){return this.monster.abilities.filter((e,i)=>i>this.monster.ability).map(e=>d.v.abilities(this.monster)[e])}disgardedCards(){return this.monster.abilities.filter((e,i)=>i<=this.monster.ability).map(e=>d.v.abilities(this.monster)[e]).reverse()}abilityIndex(e){return d.v.abilities(this.monster).indexOf(e)}shuffle(){d.v.stateManager.before("shuffleAbilityDeck","data.monster."+this.monster.name),d.v.monsterManager.shuffleAbilities(this.monster),d.v.stateManager.after()}draw(){d.v.stateManager.before("drawAbility","data.monster."+this.monster.name),d.v.monsterManager.drawAbility(this.monster),d.v.stateManager.after()}toggleDrawExtra(){this.monster.drawExtra?(d.v.stateManager.before("unsetDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!1,d.v.monsterManager.applySameDeck(this.monster),d.v.stateManager.after()):d.v.monsterManager.applySameDeck(this.monster)&&(d.v.stateManager.before("setDrawExtraAbility","data.monster."+this.monster.name),this.monster.drawExtra=!0,d.v.game.state==ge.D2.next&&d.v.monsterManager.drawExtra(this.monster),d.v.stateManager.after())}dropUpcoming(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer){const i=this.monster.ability+1;Fn(this.monster.abilities,e.previousIndex+i,e.currentIndex+i)}else{const i=this.monster.ability;Fn(this.monster.abilities,i-e.previousIndex,e.currentIndex+i),this.monster.ability=this.monster.ability-1}d.v.stateManager.after()}dropDisgarded(e){if(d.v.stateManager.before("reorderAbilities","data.monster."+this.monster.name),e.container==e.previousContainer)Fn(this.monster.abilities,this.monster.ability-e.previousIndex,this.monster.ability-e.currentIndex);else{this.monster.ability=this.monster.ability+1;const i=this.monster.ability;Fn(this.monster.abilities,e.previousIndex+i,i-e.currentIndex)}d.v.stateManager.after()}restoreDefault(){d.v.stateManager.before("restoreDefaultAbilities","data.monster."+this.monster.name);const e=d.v.abilities(this.monster);this.monster.abilities=e.filter(i=>!i.level||isNaN(+i.level)||"number"==typeof i.level&&i.level<=this.monster.level).map((i,s)=>s),this.monster.ability=-1,d.v.stateManager.after()}remove(e){const i=d.v.abilities(this.monster)[this.monster.abilities[e+this.monster.ability+1]];d.v.stateManager.before("removeAbility","data.monster."+this.monster.name,this.abilityLabel(i)),this.monster.abilities.splice(e+this.monster.ability+1,1),d.v.stateManager.after()}abilityLabel(e){let i="data.monster."+this.monster.name;return e?.name?i="data.ability."+e.name:this.monster.deck!=this.monster.name&&(i="data.deck."+this.monster.deck,i.split(".")[i.split(".").length-1]===ja(R.r.getLabel(i))&&this.monster.deck&&(i="data.monster."+this.monster.deck)),ja(R.r.getLabel(i))}defaultSort(){this.monster.abilities=this.monster.abilities.sort((e,i)=>e-i)}openAbilities(e){R.r.settings.abilities&&(!e.srcEvent||!e.srcEvent.defaultPrevented)&&this.dialog.open(tK,{panelClass:"dialog",data:this.monster})}openAbility(e,i=!1){R.r.settings.abilities&&(this.flipped?this.dialog.open(kT,{panelClass:"fullscreen-panel",data:{ability:i?this.secondAbility:this.ability,monster:this.monster}}):this.openAbilities(e))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-ability-card"]],viewQuery:function(e,i){if(1&e&&t.Gf(eK,5),2&e){let s;t.iGM(s=t.CRH())&&(i.menuElement=s.first)}},inputs:{monster:"monster",index:"index"},decls:6,vars:17,consts:[[1,"container",3,"ngClass"],["class","hover-effect initiative",4,"ngIf"],["class","hover-effect title",4,"ngIf"],["ghs-pointer-input","",3,"ability","monster","flipped","highlightElements","singleClick","doubleClick"],[4,"ngIf"],["class","left-abilities",4,"ngIf"],[1,"hover-effect","initiative"],[1,"hover-effect","title"],[1,"left-abilities"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,nK,1,0,"div",1),t.YNc(2,iK,1,0,"div",2),t.TgZ(3,"ghs-ability",3),t.NdJ("singleClick",function(l){return i.openAbilities(l)})("doubleClick",function(l){return i.openAbility(l)}),t.qZA(),t.YNc(4,oK,2,4,"ng-container",4),t.qZA(),t.YNc(5,aK,2,2,"span",5)),2&e&&(t.Q6J("ngClass",t.Hh0(9,sK,i.flipped,i.settingsManager.settings.showFullAbilityCard||i.settingsManager.settings.showExpandedAbilityCard,i.settingsManager.settings.showExpandedAbilityCard&&i.flipped,i.gameManager.monsterManager.hasBottomActions(i.monster),i.secondAbility,!i.settingsManager.settings.abilities,i.monster&&i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.monsterPermissions[i.monster.name+"|"+i.monster.edition])),t.xp6(1),t.Q6J("ngIf",!i.secondAbility&&!i.settingsManager.settings.showFullAbilityCard&&!i.settingsManager.settings.showExpandedAbilityCard),t.xp6(1),t.Q6J("ngIf",!i.secondAbility&&!i.settingsManager.settings.showFullAbilityCard&&!i.settingsManager.settings.showExpandedAbilityCard),t.xp6(1),t.Q6J("ability",i.ability)("monster",i.monster)("flipped",i.flipped)("highlightElements",i.settingsManager.settings.interactiveAbilities),t.xp6(1),t.Q6J("ngIf",i.secondAbility),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.abilities))},dependencies:[x.mk,x.O5,a_,An],styles:['[_nghost-%COMP%]{position:relative}.container[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 21.5);overflow:hidden;border-radius:calc(var(--ghs-unit) * 1);cursor:help}.container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{display:inline-block;position:relative;top:calc(var(--ghs-unit) * -3);left:0;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 25.5);transition:top .25s ease-in-out;z-index:3}.container[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:2}.container.disabled[_ngcontent-%COMP%]{pointer-events:none}.container.flipped[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * -4)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]{content:" ";display:block;position:absolute;top:0;left:0;z-index:4}.container.flipped[_ngcontent-%COMP%] .hover-effect.initiative[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 8.5);height:calc(var(--ghs-unit) * 5)}.container.flipped[_ngcontent-%COMP%] .hover-effect.title[_ngcontent-%COMP%]{width:100%;height:calc(var(--ghs-unit) * 1.5)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]:hover.initiative{height:calc(var(--ghs-unit) * 9)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]:hover.title{height:calc(var(--ghs-unit) * 4)}.container.flipped[_ngcontent-%COMP%] .hover-effect[_ngcontent-%COMP%]:hover ~ ghs-ability[_ngcontent-%COMP%]{top:0}.container.second-ability[_ngcontent-%COMP%]{display:flex}.container.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;width:calc(var(--ghs-unit) * 20);height:calc(var(--ghs-unit) * 10.75)}.container.second-ability[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]{position:absolute;inset:0 50% 0 0}.container.second-ability[_ngcontent-%COMP%] ghs-pointer-input[_ngcontent-%COMP%]:nth-of-type(2){left:50%;right:0}.container.bottom-actions[_ngcontent-%COMP%]{overflow-y:auto}.container.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;height:calc(var(--ghs-unit) * 54)}.container.bottom-actions.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 27)}.container.full-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 37);height:calc(var(--ghs-unit) * 24)}.container.full-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;width:calc(var(--ghs-unit) * 37);height:calc(var(--ghs-unit) * 24)}.container.full-ability.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18.5);height:calc(var(--ghs-unit) * 12)}.container.full-ability.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 38.2)}.container.full-ability.bottom-actions.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 25)}.container.expanded-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 37);height:auto;min-height:calc(var(--ghs-unit) * 24)}.container.expanded-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{top:0;width:calc(var(--ghs-unit) * 37);height:auto;min-height:calc(var(--ghs-unit) * 24)}.container.expanded-ability.bottom-actions[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 38.2)}.container.expanded-ability.bottom-actions[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 38.2)}.container.expanded-ability.bottom-actions.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 25)}.container.expanded-ability.second-ability[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 25)}.container.expanded-ability.second-ability[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 18.5);height:calc(var(--ghs-unit) * 12);min-height:initial}.left-abilities[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2);position:absolute;color:var(--ghs-color-gray);right:calc(var(--ghs-unit) * .5);bottom:calc(var(--ghs-unit) * 0);z-index:4}']})),a})();function cK(o,a){1&o&&t._UZ(0,"img",4)}function lK(o,a){1&o&&t._UZ(0,"img",5)}const gK=function(o){return{disabled:o}};let dK=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"elementRef",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"range",[]),(0,_.Z)(this,"nonDead",0),(0,_.Z)(this,"count",0),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"maxStandees",0),(0,_.Z)(this,"usedStandees",0),(0,_.Z)(this,"uiChangeSubscription",void 0),this.elementRef=e,this.dialog=i,this.overlay=s}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.maxStandees=d.v.monsterManager.monsterStandeeMax(this.monster),this.usedStandees=d.v.monsterManager.monsterStandeeCount(this.monster)}hasEntity(){return this.monster.entities.filter(e=>d.v.entityManager.isAlive(e)&&(!R.r.settings.hideStats||e.type==this.type)).length>0}open(){if(R.r.settings.disableStandees)this.hasEntity()?this.monster.entities=this.monster.entities.filter(e=>R.r.settings.hideStats&&e.type!=this.type):(this.monster.entities=this.monster.entities.filter(e=>R.r.settings.hideStats&&e.type!=this.type),R.r.settings.randomStandees?this.randomStandee():this.nextStandee());else if(!(this.nonDead>=this.count))if(this.maxStandees==this.count&&this.nonDead==this.count-1&&this.monster.entities.every(e=>e.number>0))for(let e=0;ed.v.entityManager.isAlive(i)&&i.number==e+1)||this.pickNumber(e+1);else R.r.settings.randomStandees?this.randomStandee():this.dialog.open(Gd,{panelClass:"dialog",data:{monster:this.monster,type:this.type,range:this.range},positionStrategy:this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions((0,he.sm)(this.type==ee.M.elite?"left":"right"))})}randomStandee(){let e=Math.floor(Math.random()*this.maxStandees)+1;for(;d.v.monsterManager.monsterStandeeUsed(this.monster,e);)e=Math.floor(Math.random()*this.maxStandees)+1;this.pickNumber(e,!0,!1)}nextStandee(){let e=1;for(;this.monster.entities.some(i=>i.number==e);)e+=1;this.pickNumber(e,!0,!0)}pickNumber(e,i=!1,s=!1){if(!d.v.monsterManager.monsterStandeeUsed(this.monster,e)&&this.type){let l="addStandee";i&&!s?l="addRandomStandee":i&&(l="addNextStandee"),d.v.stateManager.before(l,"data.monster."+this.monster.name,"monster."+this.type,""+e);const m=this.monster.entities.find(k=>k.number==e);m&&d.v.monsterManager.removeMonsterEntity(this.monster,m);const O=d.v.monsterManager.addMonsterEntity(this.monster,e,this.type,!1);d.v.game.state==ge.D2.next&&O&&(this.monster.active=!d.v.game.figures.some(k=>k.active),this.monster.active&&(d.v.sortFigures(this.monster),O.active=!0)),d.v.stateManager.after()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Te),t.Y36(ti.aV))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-numberpicker"]],inputs:{monster:"monster",type:"type",range:"range",nonDead:"nonDead",count:"count"},decls:4,vars:10,consts:[["ghs-pointer-input","",3,"ngClass","ghs-label","ghs-label-attribute","singleClick"],["button",""],["class","ghs-svg","src","./assets/images/plus.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/minus.svg",4,"ngIf"],["src","./assets/images/plus.svg",1,"ghs-svg"],["src","./assets/images/minus.svg",1,"ghs-svg"]],template:function(e,i){1&e&&(t.TgZ(0,"a",0,1),t.NdJ("singleClick",function(){return i.open()}),t.YNc(2,cK,1,0,"img",2),t.YNc(3,lK,1,0,"img",3),t.qZA()),2&e&&(t.Gre("button active-outline ",i.type,""),t.Q6J("ngClass",t.VKq(8,gK,!i.settingsManager.settings.disableStandees&&(i.nonDead>=i.count||i.usedStandees>=i.maxStandees)))("ghs-label","monster.addEntity."+i.type)("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngIf",!i.settingsManager.settings.disableStandees||!i.hasEntity()),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.disableStandees&&i.hasEntity()))},dependencies:[x.mk,x.O5,ie,An],styles:[".button[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;cursor:pointer;font-size:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor));line-height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));color:var(--ghs-color-gray);filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);text-shadow:var(--ghs-outline);font-weight:700;width:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));height:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));text-align:center;stroke:var(--ghs-color-black);stroke-width:calc(var(--ghs-unit) * 2)}.button[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:100%;height:auto}.button.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);filter:var(--ghs-filter-yellow) var(--ghs-filter-shadow)}.button.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red);filter:var(--ghs-filter-red) var(--ghs-filter-shadow)}.button[_ngcontent-%COMP%]:hover, .button.active-button[_ngcontent-%COMP%]{color:var(--ghs-color-white);filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-gray);filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);opacity:.5}.number-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)))}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.number-container[_ngcontent-%COMP%] .number-button.elite[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.number-container[_ngcontent-%COMP%] .number-button.boss[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.number-container[_ngcontent-%COMP%] .number-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .number-button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%] img.summon[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}.number-container[_ngcontent-%COMP%] .summon-button[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.number-container[_ngcontent-%COMP%] .summon-button.active[_ngcontent-%COMP%]{border:calc(var(--ghs-unit) / 5) var(--ghs-color-white) solid;border-radius:100%}"]})),a})();const Yw=function(o,a){return{disabled:o,denied:a}};function hK(o,a){if(1&o&&t._UZ(0,"ghs-monster-numberpicker",8),2&o){const n=t.oxw();t.Q6J("monster",n.monster)("type",n.MonsterType.normal)("nonDead",n.nonDead)("count",n.count)("ngClass",t.WLB(5,Yw,!n.settingsManager.settings.disableStandees&&n.nonDead>=n.count,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition]))}}function uK(o,a){if(1&o&&t._UZ(0,"ghs-monster-numberpicker",9),2&o){const n=t.oxw();t.Q6J("monster",n.monster)("type",n.MonsterType.elite)("nonDead",n.nonDead)("count",n.count)("ngClass",t.WLB(5,Yw,!n.settingsManager.settings.disableStandees&&n.nonDead>=n.count,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition]))}}function _K(o,a){if(1&o&&t._UZ(0,"ghs-monster-numberpicker",10),2&o){const n=t.oxw();t.Q6J("monster",n.monster)("type",n.MonsterType.boss)("nonDead",n.nonDead)("count",n.count)("ngClass",t.WLB(5,Yw,!n.settingsManager.settings.disableStandees&&n.nonDead>=n.count,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition]))}}function pK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",20),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entitiesMenu(i,s.MonsterType.boss))}),t._UZ(1,"img",14),t.qZA()}2&o&&t.Q6J("ghs-label","game.monster.selectStandees.boss")("ghs-label-attribute","title")}function fK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",21),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entitiesMenu(i,s.MonsterType.elite))}),t._UZ(1,"img",14),t.qZA()}2&o&&t.Q6J("ghs-label","game.monster.selectStandees.elite")("ghs-label-attribute","title")}function mK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",22),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entitiesMenu(i,s.MonsterType.normal))}),t._UZ(1,"img",14),t.qZA()}2&o&&t.Q6J("ghs-label","game.monster.selectStandees.normal")("ghs-label-attribute","title")}function vK(o,a){if(1&o&&t._UZ(0,"ghs-standee",23),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("figure",e.monster)("entity",n)}}const CK=function(o,a,n){return{empty:o,"full-ability":a,denied:n}},MK=function(o){return{disabled:o}};function OK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11)(1,"div",12)(2,"a",13),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.entitiesMenu(i))}),t._UZ(3,"img",14),t.qZA(),t.YNc(4,pK,2,2,"a",15),t.YNc(5,fK,2,2,"a",16),t.YNc(6,mK,2,2,"a",17),t.qZA(),t.TgZ(7,"div",18),t.YNc(8,vK,1,2,"ghs-standee",19),t.qZA()()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.kEZ(8,CK,0==n.nonDead,n.settingsManager.settings.showFullAbilityCard||n.settingsManager.settings.showExpandedAbilityCard,n.gameManager.stateManager.permissions&&!n.gameManager.stateManager.monsterPermissions[n.monster.name+"|"+n.monster.edition])),t.xp6(1),t.Q6J("ngClass",t.VKq(12,MK,n.nonDead<2)),t.xp6(1),t.Q6J("ghs-label","game.monster.selectStandees.all")("ghs-label-attribute","title"),t.xp6(2),t.Q6J("ngIf",n.entityTypeCount(n.MonsterType.boss)),t.xp6(1),t.Q6J("ngIf",n.entityTypeCount(n.MonsterType.elite)),t.xp6(1),t.Q6J("ngIf",n.entityTypeCount(n.MonsterType.normal)),t.xp6(2),t.Q6J("ngForOf",n.sortedEntites)}}const PK=function(o,a,n){return{off:o,"full-ability":a,modern:n}},yK=function(o){return{denied:o}},bK=function(o){return{"full-ability":o}};let xK=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"overlay",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"nonDead",0),(0,_.Z)(this,"count",0),(0,_.Z)(this,"sortedEntites",[]),(0,_.Z)(this,"uiChangeSubscription",void 0),this.dialog=e,this.overlay=i}ngOnInit(){this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>this.update()}),this.update()}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}update(){this.nonDead=d.v.monsterManager.monsterEntityCount(this.monster),this.count=(0,ae.j9)(this.monster.count,this.monster.level),this.sortedEntites=this.monster.entities.sort((e,i)=>{if(R.r.settings.eliteFirst){if(e.type==ee.M.elite&&i.type==ee.M.normal)return-1;if(e.type==ee.M.normal&&i.type==ee.M.elite)return 1}return e.summon==Ee.HY.new&&i.summon!=Ee.HY.new?1:e.summon!=Ee.HY.new&&i.summon==Ee.HY.new?-1:e.summon==Ee.HY.new&&i.summon==Ee.HY.new?0:e.number<0&&i.number>=0?1:i.number<0&&e.number>=0||e.numbere.type==ee.M.normal||e.type==ee.M.elite)}getEntities(e){return this.monster.entities.filter(i=>i.type==e).sort((i,s)=>i.number-s.number)}getEdition(){return d.v.getEdition(this.monster)}entityTypeCount(e){const i=this.monster.entities.filter(s=>s.type==e).length;return i>1&&i{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"footer",void 0),(0,_.Z)(this,"allowed",["undo","zoom"]),(0,_.Z)(this,"scrollTimeout",null),(0,_.Z)(this,"zoomInterval",null),(0,_.Z)(this,"currentZoom",0),(0,_.Z)(this,"dialogOpen",!1),(0,_.Z)(this,"keydown",void 0),(0,_.Z)(this,"keyup",void 0),(0,_.Z)(this,"timeout",void 0),this.dialog=e,this.dialog.afterOpened.subscribe({next:()=>this.dialogOpen=!0}),this.dialog.afterAllClosed.subscribe({next:()=>this.dialogOpen=!1})}applySelect(){const e=d.v.entityManager.getIndexedEntities();d.v.stateManager.keyboardSelect>0&&d.v.stateManager.keyboardSelect<=e.length&&(this.dialog.open($c,{panelClass:"dialog",data:{entity:e[d.v.stateManager.keyboardSelect-1].entity,figure:e[d.v.stateManager.keyboardSelect-1].figure,entityIndexKey:!0}}),d.v.stateManager.keyboardSelecting=!1),d.v.stateManager.keyboardSelect=-1}ngOnInit(){this.currentZoom=R.r.settings.zoom,d.v.uiChange.subscribe({next:()=>this.currentZoom=R.r.settings.zoom}),this.keydown=window.addEventListener("keydown",e=>{if(!e.altKey&&!e.metaKey&&(!window.document.activeElement||"INPUT"!=window.document.activeElement.tagName&&"SELECT"!=window.document.activeElement.tagName&&"TEXTAREA"!=window.document.activeElement.tagName))if(d.v.stateManager.keyboardSelecting){if("Escape"===e.key||"s"===e.key)d.v.stateManager.keyboardSelect=-1,d.v.stateManager.keyboardSelecting=!1;else if("Enter"===e.key)this.applySelect();else if(e.key in["0","1","2","3","4","5","6","7","8","9"]){const i=d.v.entityManager.getIndexedEntities(),s=+e.key;this.timeout?(clearTimeout(this.timeout),this.timeout=void 0,d.v.stateManager.keyboardSelect=10*d.v.stateManager.keyboardSelect+s,this.applySelect()):10*s{this.applySelect()},1e3)):(d.v.stateManager.keyboardSelect=s,this.applySelect())}e.preventDefault(),e.stopPropagation()}else if(this.dialogOpen&&-1==this.allowed.indexOf("undo")||!e.ctrlKey||e.shiftKey||"z"!==e.key.toLowerCase())if((!this.dialogOpen||-1!=this.allowed.indexOf("undo"))&&e.ctrlKey&&!e.shiftKey&&"y"===e.key||e.ctrlKey&&e.shiftKey&&"z"===e.key.toLowerCase())d.v.stateManager.redo(),e.preventDefault();else if(this.dialogOpen&&-1==this.allowed.indexOf("zoom")||e.ctrlKey||e.shiftKey||this.zoomInterval||"ArrowUp"!==e.key&&"+"!==e.key)if(this.dialogOpen&&-1==this.allowed.indexOf("zoom")||e.ctrlKey||e.shiftKey||this.zoomInterval||"ArrowDown"!==e.key&&"-"!==e.key)if(this.dialogOpen&&-1==this.allowed.indexOf("zoom")||!e.ctrlKey||e.shiftKey||this.zoomInterval||"r"!==e.key.toLowerCase())if(this.dialogOpen&&-1==this.allowed.indexOf("round")||!this.footer||e.ctrlKey||e.shiftKey||this.zoomInterval||"n"!==e.key.toLowerCase())if(this.dialogOpen&&-1==this.allowed.indexOf("am")||d.v.game.state!=ge.D2.next||e.ctrlKey||e.shiftKey||this.zoomInterval||"m"!==e.key.toLowerCase())if(!(this.dialogOpen&&-1==this.allowed.indexOf("loot")||d.v.game.state!=ge.D2.next||e.ctrlKey||e.shiftKey||this.zoomInterval||"l"!==e.key.toLowerCase())&&R.r.settings.lootDeck&&d.v.game.lootDeck.cards.length>0){d.v.stateManager.before("lootDeckDraw"),d.v.game.lootDeck.active=!0;const i=d.v.game.figures.find(s=>s instanceof oe.z&&s.active);d.v.lootManager.drawCard(d.v.game.lootDeck,!R.r.settings.alwaysLootApplyDialog&&i instanceof oe.z?i:void 0),d.v.stateManager.after(),e.preventDefault()}else if(this.dialogOpen&&-1==this.allowed.indexOf("active")||e.ctrlKey||d.v.game.state!=ge.D2.next||"Tab"!==e.key)if(this.dialogOpen&&-1==this.allowed.indexOf("element")||e.ctrlKey||e.shiftKey||-1==["1","2","3","4","5","6"].indexOf(e.key))this.dialogOpen&&-1==this.allowed.indexOf("absent")||e.ctrlKey||e.shiftKey||"h"!==e.key?this.dialogOpen&&-1==this.allowed.indexOf("select")||e.ctrlKey||e.shiftKey||"s"!==e.key||(d.v.stateManager.keyboardSelecting=!0):(R.r.setHideAbsent(!R.r.settings.hideAbsent),e.preventDefault());else{const s=d.v.game.elementBoard[+e.key-1],l=d.v.nextElementState(s,!1,!0);d.v.stateManager.before("updateElement","game.element."+s.type,"game.element.state."+l),s.state=l,d.v.stateManager.after(),e.preventDefault()}else this.toggleEntity(e.shiftKey),e.preventDefault();else{const i=d.v.game.figures.find(l=>l.active);let s;!i||i instanceof Ze.Q&&(!i.isAlly&&!i.isAllied||!d.v.fhRules()&&!R.r.settings.alwaysAllyAttackModifierDeck||!R.r.settings.allyAttackModifierDeck)?(d.v.stateManager.before("updateAttackModifierDeck.draw","monster"),s=d.v.game.monsterAttackModifierDeck):i instanceof Ze.Q?(d.v.stateManager.before("updateAttackModifierDeck.draw","ally"),s=d.v.game.allyAttackModifierDeck):i instanceof oe.z&&(R.r.settings.characterAttackModifierDeck?i.attackModifierDeckVisible?(d.v.stateManager.before("updateAttackModifierDeck.draw","data.character."+i.name),s=i.attackModifierDeck):i.attackModifierDeckVisible=!0:(d.v.stateManager.before("updateAttackModifierDeck.draw","monster"),s=d.v.game.monsterAttackModifierDeck)),s&&(s.active=!0,d.v.attackModifierManager.drawModifier(s),d.v.stateManager.after()),e.preventDefault()}else this.footer.disabled()||this.footer.next();else this.currentZoom=100,R.r.setZoom(this.currentZoom),document.body.style.setProperty("--ghs-factor",this.currentZoom+""),e.preventDefault();else this.zoom(1),this.zoomInterval=setInterval(()=>{this.zoom(1)},30),e.preventDefault();else this.zoom(-1),this.zoomInterval=setInterval(()=>{this.zoom(-1)},30),e.preventDefault();else d.v.stateManager.undo(),e.preventDefault()}),this.keyup=window.addEventListener("keyup",e=>{this.zoomInterval&&("ArrowUp"===e.key||"+"===e.key||"ArrowDown"===e.key||"-"===e.key)&&(clearInterval(this.zoomInterval),this.zoomInterval=null,R.r.settings.zoom!=this.currentZoom&&R.r.setZoom(this.currentZoom),e.preventDefault())})}ngOnDestroy(){window.removeEventListener("keydown",this.keydown),window.removeEventListener("keyup",this.keyup)}zoom(e){this.currentZoom+=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+"");const i=+window.getComputedStyle(document.body).getPropertyValue("min-width").replace("px","");e<0&&i>=window.innerWidth&&(this.currentZoom-=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+""))}toggleEntity(e){const i=d.v.game.figures.filter(l=>d.v.gameplayFigure(l));let s=i.find(l=>l.active);if(!s&&e)s=i[i.length-1];else if(s&&e&&i.indexOf(s)>0)if(s instanceof oe.z){const l=s.summons.filter(O=>d.v.entityManager.isAlive(O)&&O.state!=Ee.HY.new);let m=l.find(O=>O.active);(!m||m&&0==l.indexOf(m))&&(s.summons.forEach(O=>O.active=!1),s=i[i.indexOf(s)-1])}else s=i[i.indexOf(s)-1];if(s)if(s instanceof oe.z){const l=s.summons.find(m=>m.active);R.r.settings.activeSummons&&s.active&&l?d.v.stateManager.before("summonInactive","data.character."+s.name,"data.summon."+l.name):d.v.stateManager.before(s.active?"unsetActive":"setActive","data.character."+s.name),d.v.roundManager.toggleFigure(s),d.v.stateManager.after()}else if(s instanceof Ze.Q){let l=!0;const m=s.entities.filter(O=>d.v.entityManager.isAlive(O)&&O.summon!=Ee.HY.new);if(R.r.settings.activeStandees){let O=m.find(k=>k.active);!O&&m.length>0&&e&&s.active?(O=m[m.length-1],d.v.stateManager.before(O?"unsetEntityActive":"setEntityActive","data.monster."+s.name,"monster."+O.type,""+O.number),d.v.monsterManager.toggleActive(s,O),O.active=!0,l=!1,d.v.stateManager.after()):O&&!e&&(d.v.stateManager.before(O?"unsetEntityActive":"setEntityActive","data.monster."+s.name,"monster."+O.type,""+O.number),d.v.monsterManager.toggleActive(s,O),m.indexOf(O){d.v.entityManager.isAlive(O)&&(O.active=!0,O.off=!1)}),d.v.roundManager.toggleFigure(s),d.v.stateManager.after())}else(s instanceof qe.CH||s instanceof Nn.k)&&(d.v.stateManager.before(s.active?"unsetActive":"setActive",s.title||s.name),d.v.roundManager.toggleFigure(s),d.v.stateManager.after())}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275dir",t.lG2({type:o,selectors:[["","ghs-keyboard-shortcuts",""]],inputs:{footer:"footer",allowed:"allowed"}})),a})();const wK=["footer"],jT=function(o){return[o]};function kK(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"span",18),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","server.connectionTries")("ghs-label-args",t.VKq(2,jT,""+n.gameManager.stateManager.connectionTries))}}function TK(o,a){1&o&&(t.TgZ(0,"span",19),t._UZ(1,"span",10),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","server.connectionTries.hint"))}function ZK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",9),t._UZ(1,"span",10),t.TgZ(2,"div",11)(3,"a",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.forceUpdateState())}),t._UZ(4,"span",10),t.TgZ(5,"span",13),t._UZ(6,"span",10),t.qZA()(),t.TgZ(7,"a",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.connect())}),t._UZ(8,"span",10),t.YNc(9,kK,2,4,"span",15),t.YNc(10,TK,2,1,"span",16),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","server.blocked"),t.xp6(3),t.Q6J("ghs-label","server.force"),t.xp6(2),t.Q6J("ghs-label","server.forceHint"),t.xp6(2),t.Q6J("ghs-label","server.connect"),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.connectionTries>0),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.connectionTries>4)}}function AK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",26),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.gameManager.stateManager.install())}),t._UZ(1,"img",27)(2,"span",10),t.qZA()}2&o&&(t.xp6(2),t.Q6J("ghs-label","app.install"))}function SK(o,a){if(1&o&&t._UZ(0,"img",34),2&o){const n=t.oxw().$implicit;t.Q6J("src",n.logoUrl,t.LSH)("ghs-label","data.edition."+n.edition)("ghs-label-attribute","title")}}function EK(o,a){if(1&o&&(t.TgZ(0,"span",35),t._UZ(1,"span",10),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition)}}function DK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",31),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3);return t.KtG(l.startCampaign(s.edition))}),t.YNc(1,SK,1,3,"img",32),t.YNc(2,EK,2,1,"span",33),t.qZA()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.logoUrl),t.xp6(1),t.Q6J("ngIf",!n.logoUrl)}}function IK(o,a){if(1&o&&(t.TgZ(0,"div",28)(1,"p"),t._UZ(2,"span",10),t.qZA(),t.TgZ(3,"div",29),t.YNc(4,DK,3,2,"div",30),t.qZA()()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","welcome.chooseEdition"),t.xp6(2),t.Q6J("ngForOf",n.gameManager.editionsData())}}function NK(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",10),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","welcome.orChooseCharacters"))}function JK(o,a){1&o&&(t.TgZ(0,"p"),t._UZ(1,"span",10),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","welcome.chooseCharacters"))}function UK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",39),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.loading=!1)}),t._UZ(1,"span",10),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","app.loading.cancel"))}function LK(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span"),t._UZ(2,"span",10),t.qZA(),t.TgZ(3,"div",36),t._UZ(4,"div",37),t.qZA(),t.YNc(5,UK,2,1,"a",38),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","app.loading"),t.xp6(3),t.Q6J("ngIf",n.cancelLoading)}}const QK=function(o,a){return{fh:o,modern:a}};function RK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",20),t._UZ(1,"img",21),t.YNc(2,AK,3,1,"a",22),t.TgZ(3,"h2"),t._UZ(4,"span",10),t.qZA(),t.YNc(5,IK,5,2,"div",23),t.YNc(6,NK,2,1,"p",24),t.YNc(7,JK,2,1,"p",24),t.TgZ(8,"div",25),t.NdJ("click",function(i){t.CHM(n);const s=t.oxw(),l=t.MAs(1);return t.KtG(l.openMenu(i,s.SubMenu.character_add))}),t._UZ(9,"span",10),t.qZA(),t.YNc(10,LK,6,2,"ng-container",24),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(8,QK,"fh"==n.settingsManager.settings.theme,"modern"==n.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ngIf",n.gameManager.stateManager.installPrompt),t.xp6(2),t.Q6J("ghs-label","welcome"),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.edition),t.xp6(1),t.Q6J("ngIf",!n.gameManager.game.edition),t.xp6(1),t.Q6J("ngIf",n.gameManager.game.edition),t.xp6(2),t.Q6J("ghs-label","hints.addCharacters"),t.xp6(1),t.Q6J("ngIf",n.loading)}}const FK=function(o,a,n,e,i,s,l){return{character:o,monster:a,objective:n,"objective-container":e,"monster-full":i,"permanent-am":s,compact:l}};function qK(o,a){if(1&o&&t._UZ(0,"div",49),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("ngClass",t.Hh0(2,FK,e.gameManager.isCharacter(n),e.gameManager.isMonster(n),e.gameManager.isObjective(n),e.gameManager.isObjectiveContainer(n),e.settingsManager.settings.showFullAbilityCard,e.gameManager.isCharacter(n)&&e.gameManager.toCharacter(n).attackModifierDeckVisible&&e.settingsManager.settings.characterAttackModifierDeckPermanent,e.gameManager.isCharacter(n)&&e.settingsManager.settings.characterCompact))("clickBehind",!0)}}function HK(o,a){if(1&o&&t._UZ(0,"ghs-character",50),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("character",e.gameManager.toCharacter(n))}}function jK(o,a){if(1&o&&t._UZ(0,"ghs-monster",51),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("monster",e.gameManager.toMonster(n))}}function BK(o,a){if(1&o&&t._UZ(0,"ghs-objective",52),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("objective",e.gameManager.toObjective(n))}}function zK(o,a){if(1&o&&t._UZ(0,"ghs-objective-container",52),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("objective",e.gameManager.toObjectiveContainer(n))}}const GK=function(o,a,n,e,i,s){return{character:o,monster:a,objective:n,"monster-full":e,"permanent-am":i,compact:s}};function VK(o,a){if(1&o&&t._UZ(0,"div",53),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("ngClass",t.HTZ(2,GK,e.gameManager.isCharacter(n),e.gameManager.isMonster(n),e.gameManager.isObjective(n),e.settingsManager.settings.showFullAbilityCard,e.gameManager.isCharacter(n)&&e.gameManager.toCharacter(n).attackModifierDeckVisible&&e.settingsManager.settings.characterAttackModifierDeckPermanent,e.gameManager.isCharacter(n)&&e.settingsManager.settings.characterCompact))("clickBehind",!0)}}const YK=function(o,a,n,e){return{column:o,"column-left":a,"column-right":n,last:e}},KK=function(o){return{enabled:o}};function $K(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",42),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.drop(i))})("cdkDropListEntered",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.entered(i))})("cdkDropListExited",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.exited(i))}),t.TgZ(1,"div",43,44),t.NdJ("cdkDragStarted",function(i){t.CHM(n);const s=t.MAs(2),l=t.oxw(2);return t.KtG(l.startedDrag(i,s))})("cdkDragReleased",function(i){t.CHM(n);const s=t.MAs(2),l=t.oxw(2);return t.KtG(l.releasedDrag(i,s))}),t.YNc(3,qK,1,10,"div",45),t.YNc(4,HK,1,1,"ghs-character",7),t.YNc(5,jK,1,1,"ghs-monster",46),t.YNc(6,BK,1,1,"ghs-objective",47),t.YNc(7,zK,1,1,"ghs-objective-container",47),t.YNc(8,VK,1,9,"div",48),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.Q6J("figure-autoscroll",n)("block",e==i.lastScroll||e==i.lastScrollColumn?"end":"center")("cdkDropListData",e)("cdkDropListDisabled",i.settingsManager.settings.disableDragFigures||i.gameManager.stateManager.permissions&&!i.gameManager.stateManager.permissions.characters&&!i.gameManager.stateManager.permissions.monsters)("ngClass",t.l5B(13,YK,i.columns>1,i.columns>1&&e1&&e>=i.columnSize,e==i.columnSize-1||e==i.figures.length-1)),t.xp6(1),t.Q6J("cdkDragStartDelay",i.isTouch?450:0)("ngClass",t.VKq(18,KK,i.draggingEnabled)),t.xp6(2),t.Q6J("ngIf",!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters||i.gameManager.stateManager.permissions.monsters),t.xp6(1),t.Q6J("ngIf",i.gameManager.isCharacter(n)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isMonster(n)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjective(n)),t.xp6(1),t.Q6J("ngIf",i.gameManager.isObjectiveContainer(n)),t.xp6(1),t.Q6J("ngIf",!i.gameManager.stateManager.permissions||i.gameManager.stateManager.permissions.characters||i.gameManager.stateManager.permissions.monsters)}}const WK=function(o,a,n,e){return{"loot-deck":o,"ally-deck":a,"drag-disabled":n,"backup-hint-spacer":e}};function XK(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",40),t.NdJ("scroll",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.onFigureScroll(i))}),t.YNc(1,$K,9,20,"div",41),t.qZA()}if(2&o){const n=t.oxw(),e=t.MAs(10);t.Q6J("ngClass",t.l5B(2,WK,e.lootDeck||n.settingsManager.settings.alwaysLootDeck&&n.gameManager.game.lootDeck.active,e.hasAllyAttackModifierDeck,n.settingsManager.settings.disableDragFigures,n.showBackupHint)),t.xp6(1),t.Q6J("ngForOf",n.figures)}}function t$(o,a){if(1&o&&t._UZ(0,"p",18),2&o){const n=t.oxw(2);t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.error.status")("ghs-label-args",t.VKq(2,jT,""+n.gameManager.stateManager.backupError))}}function e$(o,a){1&o&&t._UZ(0,"p",10),2&o&&t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.error.unknown")}function n$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",54),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.gameManager.stateManager.backupError=0)}),t._UZ(1,"h2",10),t.YNc(2,t$,1,4,"p",55),t.YNc(3,e$,1,1,"p",56),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.auto.uploadUrl.error"),t.xp6(1),t.Q6J("ngIf",n.gameManager.stateManager.backupError>0),t.xp6(1),t.Q6J("ngIf",-1==n.gameManager.stateManager.backupError)}}function i$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57),t._UZ(1,"h2",10)(2,"p",58),t.TgZ(3,"a",59),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.exportDataDump())}),t._UZ(4,"img",60)(5,"span",10),t.qZA(),t.TgZ(6,"label")(7,"input",61),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.setAutoBackupFinish(!i.settingsManager.settings.autoBackupFinish))}),t.qZA(),t._UZ(8,"span",10),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ghs-label","datamanagement.backup"),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.download.hint")("ghs-tooltip","datamanagement.backup.download.hint.text")("originY","top")("overlayY","bottom"),t.xp6(3),t.Q6J("ghs-label","datamanagement.backup.download"),t.xp6(2),t.Q6J("checked",n.settingsManager.settings.autoBackupFinish),t.xp6(1),t.Q6J("ghs-label","datamanagement.backup.download.onFinish")}}function o$(o,a){if(1&o&&t._UZ(0,"ghs-character-fullview",50),2&o){const n=t.oxw();t.Q6J("character",n.fullviewChar)}}const a$=function(o,a){return{compact:o,modern:a}};let s$=(()=>{var o;class a{constructor(e,i,s,l){(0,_.Z)(this,"element",void 0),(0,_.Z)(this,"swUpdate",void 0),(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"pointerInputService",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"GameState",ge.D2),(0,_.Z)(this,"figures",[]),(0,_.Z)(this,"columnSize",3),(0,_.Z)(this,"columns",2),(0,_.Z)(this,"SubMenu",cg),(0,_.Z)(this,"initialized",!1),(0,_.Z)(this,"loading",!0),(0,_.Z)(this,"cancelLoading",!1),(0,_.Z)(this,"welcome",!1),(0,_.Z)(this,"fullviewChar",void 0),(0,_.Z)(this,"showBackupHint",!1),(0,_.Z)(this,"draggingEnabled",!1),(0,_.Z)(this,"draggingeTimeout",null),(0,_.Z)(this,"isTouch",!1),(0,_.Z)(this,"lastScroll",-1),(0,_.Z)(this,"lastScrollColumn",-1),(0,_.Z)(this,"currentZoom",0),(0,_.Z)(this,"zoomDiff",-1),(0,_.Z)(this,"standeeDialog",void 0),(0,_.Z)(this,"standeeDialogSubscription",void 0),(0,_.Z)(this,"footer",void 0),this.element=e,this.swUpdate=i,this.dialog=s,this.pointerInputService=l,d.v.uiChange.subscribe({next:()=>{if(this.figures=d.v.game.figures.filter(m=>(R.r.settings.monsters||!(m instanceof Ze.Q))&&(!(m instanceof oe.z)||!m.absent||!R.r.settings.hideAbsent)),this.initialized){const m=d.v.game.figures.find(O=>O instanceof oe.z&&O.fullview);m?(this.fullviewChar=m,this.welcome=!1):0==d.v.game.figures.length?this.welcome=!0:(this.fullviewChar=void 0,this.welcome=!1,this.calcColumns(),R.r.settings.automaticStandeesDialog&&R.r.settings.automaticStandees&&!R.r.settings.disableStandees&&!R.r.settings.randomStandees&&R.r.settings.scenarioRooms&&(this.standeeDialog&&"undo"==d.v.stateManager.lastAction&&this.standeeDialog.close(),0==this.dialog.openDialogs.length?this.automaticStandeeDialogs():this.standeeDialogSubscription||(this.standeeDialogSubscription=this.dialog.afterAllClosed.subscribe({next:()=>{this.automaticStandeeDialogs()}}))),this.showBackupHint=R.r.settings.backupHint&&!this.loading&&!d.v.game.scenario&&(d.v.game.party.scenarios.length>0||d.v.game.party.casualScenarios.length>0||d.v.game.parties.some(O=>O.casualScenarios.length>0)))}}}),this.swUpdate.versionUpdates.subscribe(m=>{this.loading=!1,"VERSION_READY"==m.type?d.v.stateManager.hasUpdate=!0:"VERSION_INSTALLATION_FAILED"==m.type&&console.error(`Failed to install version '${m.version.hash}': ${m.error}`)}),this.swUpdate.unrecoverable.subscribe(m=>{this.loading=!1}),this.swUpdate.isEnabled?(this.swUpdate.checkForUpdate(),setInterval(()=>{this.swUpdate.checkForUpdate()},3e4)):this.loading=!1,setInterval(()=>{this.cancelLoading=!0},1e4),window.addEventListener("beforeinstallprompt",m=>{m.preventDefault(),d.v.stateManager.installPrompt=m}),window.addEventListener("appinstalled",()=>{d.v.stateManager.installPrompt=null}),s.afterOpened.subscribe({next:m=>{m.overlayRef.backdropElement&&s.openDialogs.length>1&&(m.overlayRef.backdropElement.style.opacity="0");let O=document.createElement("img");O.src="./assets/images/close_dialog.svg";let k=document.createElement("a");k.classList.add("dialog-close-button"),k.appendChild(O),k.addEventListener("click",()=>m.close()),k.title=R.r.getLabel("close"),m.overlayRef.hostElement.appendChild(k)}})}onFigureScroll(e){this.pointerInputService.cancel()}ngOnInit(){var e=this;return(0,J.Z)(function*(){e.isTouch=window.matchMedia("(pointer: coarse)").matches,document.body.classList.add("no-select");try{yield Pt.j.init()}catch{}yield R.r.init(!1),e.initialized=!0,yield d.v.stateManager.init(),e.currentZoom=R.r.settings.zoom,document.body.style.setProperty("--ghs-factor",R.r.settings.zoom+""),document.body.style.setProperty("--ghs-barsize",R.r.settings.barsize+""),document.body.style.setProperty("--ghs-fontsize",R.r.settings.fontsize+""),document.body.style.setProperty("--ghs-global-fontsize",R.r.settings.globalFontsize+"");const i=e.figures.find(s=>s instanceof oe.z&&s.fullview);i?e.fullviewChar=i:(e.fullviewChar=void 0,e.calcColumns()),e.swUpdate.isEnabled&&document.body.addEventListener("click",s=>{R.r.settings.fullscreen&&e.swUpdate.isEnabled&&document.body.requestFullscreen()}),window.addEventListener("resize",s=>{e.fullviewChar||e.calcColumns()}),window.addEventListener("fullscreenchange",s=>{e.fullviewChar||e.calcColumns()}),window.addEventListener("focus",s=>{R.r.settings.serverAutoconnect&&d.v.stateManager.wsState()!=WebSocket.OPEN&&d.v.stateManager.connect()}),!R.r.settings.disableWakeLock&&"wakeLock"in navigator&&(d.v.stateManager.wakeLock=yield navigator.wakeLock.request("screen"),document.addEventListener("visibilitychange",(0,J.Z)(function*(){null!==d.v.stateManager.wakeLock&&"visible"===document.visibilityState&&(d.v.stateManager.wakeLock=yield navigator.wakeLock.request("screen"))})))})()}zoom(e){this.currentZoom+=e,document.body.style.setProperty("--ghs-factor",this.currentZoom+"")}touchmove(e){if(!R.r.settings.disablePinchZoom&&2===e.touches.length){const i=Math.abs(e.touches[0].clientX-e.touches[1].clientX);this.zoomDiff>0&&(i>this.zoomDiff&&this.zoom(-1),i-1&&(this.zoomDiff=-1,R.r.setZoom(this.currentZoom))}startCampaign(e){d.v.stateManager.before("startCampaign","data.edition."+e),d.v.game.edition=e,R.r.settings.automaticTheme&&R.r.setFhStyle("fh"==e),d.v.game.party.campaignMode=!0,d.v.stateManager.after()}calcColumns(e=void 0,i=!1){R.r.settings.disableColumns?(this.columns=1,this.columnSize=99,setTimeout(()=>{this.element.nativeElement.getElementsByClassName("figures")[0]&&this.translate(e,i)},1)):setTimeout(()=>{const s=this.element.nativeElement.getElementsByClassName("figures")[0];if(s){const l=Array.from(s.getElementsByClassName("figure")),m=this.figures;let O=s.clientWidth;if(l.length>0&&(O=l[0].firstChild.clientWidth),Os.clientHeight&&(W--,k-=l[W].clientHeight),Wct&&W--;let Ct=this.activeFigureSize(0,W,l),Ot=this.activeFigureSize(W,m.length,l),xt=this.activeFigureSize(0,W-1,l),Gt=this.activeFigureSize(W-1,m.length,l),se=this.activeFigureSize(0,W+1,l),De=this.activeFigureSize(W+1,m.length,l),un=Ct>Ot?Ct-Ot:Ot-Ct,vn=xt>Gt?xt-Gt:Gt-xt,Rn=se>De?se-De:De-se;for(;un>vn;)W--,Ct=this.activeFigureSize(0,W,l),Ot=this.activeFigureSize(W,m.length,l),xt=this.activeFigureSize(0,W-1,l),Gt=this.activeFigureSize(W-1,m.length,l),se=this.activeFigureSize(0,W+1,l),De=this.activeFigureSize(W+1,m.length,l),un=Ct>Ot?Ct-Ot:Ot-Ct,vn=xt>Gt?xt-Gt:Gt-xt,Rn=se>De?se-De:De-se;for(;un>Rn;)W++,Ct=this.activeFigureSize(0,W,l),Ot=this.activeFigureSize(W,m.length,l),xt=this.activeFigureSize(0,W-1,l),Gt=this.activeFigureSize(W-1,m.length,l),se=this.activeFigureSize(0,W+1,l),De=this.activeFigureSize(W+1,m.length,l),un=Ct>Ot?Ct-Ot:Ot-Ct,vn=xt>Gt?xt-Gt:Gt-xt,Rn=se>De?se-De:De-se;this.columnSize=W}else this.columns=1,this.columnSize=99}else this.columns=1,this.columnSize=99;this.lastScroll=this.lastActive(),this.lastScrollColumn=this.columns>1?this.columnSize-1:-1,this.translate(e,i)}},1)}figureSize(e,i,s){return s.slice(e,i).map(l=>l.firstChild.clientHeight).reduce((l,m)=>l+m,0)}activeFigureSize(e,i,s){let l=this.lastActive(e,i);return s.slice(e,i).filter((m,O)=>O<=l).map(m=>m.firstChild.clientHeight).reduce((m,O)=>m+O,0)}lastActive(e=void 0,i=void 0){let s=-1;return this.figures.slice(e,i).forEach((l,m)=>{m>s&&d.v.gameplayFigure(l)&&(s=m)}),s}translate(e=void 0,i=!1){setTimeout(()=>{const s=this.element.nativeElement.getElementsByClassName("figures")[0];if(s){i&&s.classList.add("no-animations");const l=s.getElementsByClassName("figure");for(let m=0;m1&&(m{e.scrollIntoView({behavior:R.r.settings.disableAnimations?"auto":"smooth",block:m==this.lastScroll||m==this.lastScrollColumn?"end":"center",inline:"center"}),i&&s.classList.remove("no-animations")},R.r.settings.disableAnimations||i?0:250):i&&setTimeout(()=>{s.classList.remove("no-animations")},R.r.settings.disableAnimations?0:250)}}},1)}startedDrag(e,i){this.pointerInputService.cancel(),this.draggingEnabled=!0,i.classList.add("dragging"),e.source.getPlaceholderElement().classList.add("dragging"),window.document.body.classList.add("dragging"),this.draggingeTimeout&&clearTimeout(this.draggingeTimeout)}releasedDrag(e,i){this.draggingEnabled=!1,i.classList.remove("dragging"),window.document.body.classList.remove("dragging"),e.source.getPlaceholderElement().classList.remove("dragging"),this.draggingeTimeout&&clearTimeout(this.draggingeTimeout)}drop(e){if(e.previousContainer!=e.container&&(0==e.currentIndex&&e.container.data!=e.previousContainer.data+1||0!=e.currentIndex&&e.container.data!=e.previousContainer.data-e.currentIndex)){let i=e.previousContainer.data,s=e.container.data;e.currentIndex>0&&e.previousContainer.data>e.container.data?s++:0==e.currentIndex&&e.previousContainer.datai instanceof Ze.Q&&i.entities.find(s=>s.number<1&&d.v.entityManager.isAlive(s)));if(e){const i=e;let s=i.entities.find(l=>l.number<1&&d.v.entityManager.isAlive(l)&&(R.r.settings.eliteFirst&&l.type==ee.M.elite||!R.r.settings.eliteFirst&&l.type==ee.M.normal));s||(s=i.entities.find(l=>l.number<1&&d.v.entityManager.isAlive(l))),this.standeeDialog=this.dialog.open(Gd,{panelClass:"dialog",disableClose:!0,data:{monster:i,type:s&&s.type,entity:s,range:[],entities:i.entities,automatic:!0}}),this.standeeDialog.closed.subscribe({next:l=>{l&&(d.v.stateManager.standeeDialogCanceled=!0),this.standeeDialog=void 0,this.standeeDialogSubscription&&(this.standeeDialogSubscription.unsubscribe(),this.standeeDialogSubscription=void 0),d.v.uiChange.emit()}})}}}exportDataDump(){return(0,J.Z)(function*(){try{let e=yield Pt.j.datadump(),i=document.createElement("a");i.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e))),i.setAttribute("download","ghs-data-dump.json"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}catch{console.warn("Could not read datadump")}})()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Gg),t.Y36(Te),t.Y36(iO))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-main"]],viewQuery:function(e,i){if(1&e&&t.Gf(wK,5),2&e){let s;t.iGM(s=t.CRH())&&(i.footer=s.first)}},decls:11,vars:11,consts:[["header",""],["ghs-keyboard-shortcuts","",3,"ngClass","footer"],["class","dialog blocked",4,"ngIf"],["class","welcome",3,"ngClass",4,"ngIf"],["class","figures","cdkDropListGroup","",3,"ngClass","scroll",4,"ngIf"],["class","dialog backup-error",3,"click",4,"ngIf"],["class","dialog backup-hint",4,"ngIf"],[3,"character",4,"ngIf"],["footer",""],[1,"dialog","blocked"],[3,"ghs-label"],[1,"buttons"],[1,"force",3,"click"],[1,"force-hint"],[1,"connect",3,"click"],["class","tries",4,"ngIf"],["class","tries-hint",4,"ngIf"],[1,"tries"],[3,"ghs-label","ghs-label-args"],[1,"tries-hint"],[1,"welcome",3,"ngClass"],["src","./assets/images/logo-transparent.svg",1,"ghs-logo"],["class","install",3,"click",4,"ngIf"],["class","choose-edition",4,"ngIf"],[4,"ngIf"],[1,"add-characters",3,"click"],[1,"install",3,"click"],["src","./assets/images/install.svg",1,"ghs-svg"],[1,"choose-edition"],[1,"editions"],["class","edition",3,"click",4,"ngFor","ngForOf"],[1,"edition",3,"click"],[3,"src","ghs-label","ghs-label-attribute",4,"ngIf"],["class","text",4,"ngIf"],[3,"src","ghs-label","ghs-label-attribute"],[1,"text"],[1,"loading-bar-container"],[1,"loading-bar"],["class","loading-cancel",3,"click",4,"ngIf"],[1,"loading-cancel",3,"click"],["cdkDropListGroup","",1,"figures",3,"ngClass","scroll"],["class","figure","cdkDropList","","cdkDropListAutoScrollStep","20",3,"figure-autoscroll","block","cdkDropListData","cdkDropListDisabled","ngClass","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"ngFor","ngForOf"],["cdkDropList","","cdkDropListAutoScrollStep","20",1,"figure",3,"figure-autoscroll","block","cdkDropListData","cdkDropListDisabled","ngClass","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["cdkDrag","",3,"cdkDragStartDelay","ngClass","cdkDragStarted","cdkDragReleased"],["figureDrag",""],["cdkDragHandle","","class","handle","ghs-pointer-input","",3,"ngClass","clickBehind",4,"ngIf"],[3,"monster",4,"ngIf"],[3,"objective",4,"ngIf"],["cdkDragHandle","","class","handle right","ghs-pointer-input","",3,"ngClass","clickBehind",4,"ngIf"],["cdkDragHandle","","ghs-pointer-input","",1,"handle",3,"ngClass","clickBehind"],[3,"character"],[3,"monster"],[3,"objective"],["cdkDragHandle","","ghs-pointer-input","",1,"handle","right",3,"ngClass","clickBehind"],[1,"dialog","backup-error",3,"click"],[3,"ghs-label","ghs-label-args",4,"ngIf"],[3,"ghs-label",4,"ngIf"],[1,"dialog","backup-hint"],[3,"ghs-label","ghs-tooltip","originY","overlayY"],[3,"click"],["src","./assets/images/export.svg",1,"ghs-svg"],["type","checkbox",3,"checked","change"]],template:function(e,i){if(1&e&&(t._UZ(0,"ghs-header",null,0),t.TgZ(2,"main",1),t.YNc(3,ZK,11,6,"div",2),t.YNc(4,RK,11,11,"div",3),t.YNc(5,XK,2,7,"div",4),t.YNc(6,n$,4,3,"div",5),t.YNc(7,i$,9,8,"div",6),t.YNc(8,o$,1,1,"ghs-character-fullview",7),t.qZA(),t._UZ(9,"ghs-footer",null,8)),2&e){const s=t.MAs(10);t.xp6(2),t.Q6J("ngClass",t.WLB(8,a$,s.compact,"modern"==i.settingsManager.settings.theme))("footer",s),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.updateBlocked&&i.settingsManager.settings.serverUrl&&i.settingsManager.settings.serverPort&&i.settingsManager.settings.serverPassword),t.xp6(1),t.Q6J("ngIf",!i.fullviewChar&&i.welcome),t.xp6(1),t.Q6J("ngIf",!i.fullviewChar&&!i.welcome),t.xp6(1),t.Q6J("ngIf",i.gameManager.stateManager.backupError),t.xp6(1),t.Q6J("ngIf",i.showBackupHint),t.xp6(1),t.Q6J("ngIf",i.fullviewChar)}},dependencies:[x.mk,x.sg,x.O5,Bs,H_,Ms,Zr,Yr,gj,UT,uV,IV,AY,xK,ie,An,Ge,Ba,Kw],styles:['[_nghost-%COMP%]{overflow:hidden}ghs-header[_ngcontent-%COMP%], ghs-footer[_ngcontent-%COMP%]{position:fixed;left:0;right:0;z-index:2;flex-shrink:0}ghs-header[_ngcontent-%COMP%]{top:0;height:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor) * var(--ghs-barsize))}ghs-footer[_ngcontent-%COMP%]{bottom:0;height:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize))}main[_ngcontent-%COMP%]{position:fixed;left:0;right:0;top:calc(var(--ghs-unit) * 8 * var(--ghs-text-factor) * var(--ghs-barsize));bottom:calc(var(--ghs-unit) * 11 * var(--ghs-text-factor) * var(--ghs-barsize));display:flex;flex-direction:column;align-items:center;z-index:1}.loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;overflow:auto;color:var(--ghs-color-darkgray);font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor))}.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;max-width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));border-radius:5px}.loading[_ngcontent-%COMP%] .ghs-logo[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));filter:var(--ghs-filter-outline)}.blocked[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999;font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));text-align:center;color:var(--ghs-color-white)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;margin-top:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));justify-content:space-evenly;align-items:flex-start}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;min-width:33%;display:flex;justify-content:center}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.6}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .connect[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--ghs-color-green)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .connect[_ngcontent-%COMP%] .tries[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .connect[_ngcontent-%COMP%] .tries-hint[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow-light)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .force[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--ghs-color-yellow)}.blocked[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .force[_ngcontent-%COMP%] .force-hint[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));color:var(--ghs-color-yellow-light)}.welcome[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;width:100%;height:100%;overflow:auto}.welcome[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;max-width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));border-radius:5px}.welcome[_ngcontent-%COMP%] .ghs-logo[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-text-factor));filter:var(--ghs-filter-outline)}.welcome[_ngcontent-%COMP%] .loading-bar-container[_ngcontent-%COMP%]{height:2px;width:100%;max-width:calc(var(--ghs-unit) * 30 * var(--ghs-text-factor));overflow:hidden;position:relative;background-color:var(--ghs-color-gray);border-radius:2px}.welcome[_ngcontent-%COMP%] .loading-bar-container[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]{height:100%;width:50%;background-color:var(--ghs-color-darkgray);position:absolute;left:-50%;animation:_ngcontent-%COMP%_loading 2s ease-in .5s infinite;border-radius:2px}@keyframes _ngcontent-%COMP%_loading{0%{transform:translate(0)}to{transform:translate(400%)}}.welcome[_ngcontent-%COMP%] .loading-cancel[_ngcontent-%COMP%]{cursor:pointer;margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));color:var(--ghs-color-darkgray);font-family:var(--ghs-font-text)}.welcome[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor));text-align:center}.welcome[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);font-family:var(--ghs-font-text);margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor));font-size:calc(var(--ghs-unit) * 3.5 * var(--ghs-text-factor));text-align:center}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;align-items:center}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]{cursor:pointer;margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-text-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline)}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]:hover{filter:brightness(.8) grayscale(.4)}.welcome[_ngcontent-%COMP%] .editions[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%]:hover .text[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.welcome[_ngcontent-%COMP%] .add-characters[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 4 * var(--ghs-text-factor));margin:calc(var(--ghs-unit) * .5 * var(--ghs-text-factor))}.welcome[_ngcontent-%COMP%] .add-characters[_ngcontent-%COMP%]:hover{opacity:.6}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--ghs-color-white);font-size:calc(var(--ghs-unit) * 4.5 * var(--ghs-text-factor) * var(--ghs-barsize));z-index:2}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:.9em;height:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray)}.welcome[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)}.welcome.fh[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .welcome.fh[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .welcome.fh[_ngcontent-%COMP%] .install[_ngcontent-%COMP%]{color:var(--ghs-color-black)}.welcome.fh[_ngcontent-%COMP%] .install[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-black)}.welcome.fh[_ngcontent-%COMP%] .edition[_ngcontent-%COMP%], .welcome.fh[_ngcontent-%COMP%] .add-characters[_ngcontent-%COMP%]{color:var(--ghs-color-darkgray);filter:none}.columns[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.columns[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.figures[_ngcontent-%COMP%]{display:flex;height:100%;max-height:100%;width:100%;max-width:100%;overflow:auto;transform:translateZ(0);scroll-behavior:smooth;transform-style:preserve-3d;scrollbar-width:none;-ms-overflow-style:none}.figures[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%]{position:absolute;width:100%;top:0;left:50%;transition:transform .25s ease-in-out,width .1s ease-in-out,height .25s ease-in-out;transform:scale(0);overflow:unset}.figures[_ngcontent-%COMP%] .figure.column[_ngcontent-%COMP%]{width:calc(50% - var(--ghs-unit) * 2)}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 98);margin:calc(var(--ghs-unit) * .8) auto}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(2){position:relative;display:block}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag.enabled[_ngcontent-%COMP%]{cursor:grabbing}.figures[_ngcontent-%COMP%] .figure[_ngcontent-%COMP%] .cdk-drag.dragging[_ngcontent-%COMP%]:before{content:" ";position:absolute;top:calc(var(--ghs-unit) * -1);left:calc(var(--ghs-unit) * -1);bottom:calc(var(--ghs-unit) * -1);right:calc(var(--ghs-unit) * -1);border-radius:calc(var(--ghs-unit) * 1);background-color:var(--ghs-color-darkgray);opacity:.5}.figures[_ngcontent-%COMP%] .figure.column-left[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{margin-left:auto;margin-right:calc(var(--ghs-unit) * 2)}.figures[_ngcontent-%COMP%] .figure.column-right[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{margin-right:auto;margin-left:calc(var(--ghs-unit) * 2)}.figures.ally-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 13.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.figures.loot-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 24.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.figures.backup-hint-spacer[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:50%!important}.figures.drag-disabled[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{display:none}.compact[_ngcontent-%COMP%] .figures[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 13.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.compact[_ngcontent-%COMP%] .figures.ally-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%], .compact[_ngcontent-%COMP%] .figures.loot-deck[_ngcontent-%COMP%] .figure.last[_ngcontent-%COMP%]{padding-bottom:calc(var(--ghs-unit) * 26.5 * var(--ghs-text-factor) * var(--ghs-barsize))}.handle[_ngcontent-%COMP%]{position:absolute;cursor:grab;top:0;left:calc(var(--ghs-unit) * (-2 + var(--ghs-text-factor)));width:calc(var(--ghs-unit) * 8);height:100%;z-index:2}.handle[_ngcontent-%COMP%]:hover:before{display:block;content:" ";position:absolute;left:calc(var(--ghs-unit) * -.5);width:calc(var(--ghs-unit) * 1);height:100%;background-color:var(--ghs-color-darkgray);opacity:.5;border-radius:calc(var(--ghs-unit) * 1)}.handle.enabled[_ngcontent-%COMP%]{cursor:grabbing}.handle.character[_ngcontent-%COMP%], .handle.objective[_ngcontent-%COMP%], .handle.objective-container[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 14)}.handle.character.character.permanent-am[_ngcontent-%COMP%], .handle.objective.character.permanent-am[_ngcontent-%COMP%], .handle.objective-container.character.permanent-am[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 26)}.handle.character.character.compact[_ngcontent-%COMP%], .handle.objective.character.compact[_ngcontent-%COMP%], .handle.objective-container.character.compact[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 10.25)}.handle.character.character.compact.character.permanent-am[_ngcontent-%COMP%], .handle.objective.character.compact.character.permanent-am[_ngcontent-%COMP%], .handle.objective-container.character.compact.character.permanent-am[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 22.25)}.handle.monster[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 21.5)}.handle.monster.monster-full[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 24)}.handle.right[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * (-2 + var(--ghs-text-factor)));left:auto}.handle.right[_ngcontent-%COMP%]:hover:before{right:calc(var(--ghs-unit) * -.5);left:auto}.modern[_ngcontent-%COMP%] .handle.character[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 16)}.modern[_ngcontent-%COMP%] .handle.character.character.permanent-am[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 28)}.cdk-drag-preview[_ngcontent-%COMP%]{padding:calc(var(--ghs-unit) * .5) calc(var(--ghs-unit) * 1)}.cdk-drag-preview[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.8;transform:initial;margin-bottom:calc(var(--ghs-unit) * .5)}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%], .cdk-drop-list-receiving[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{display:none}.cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.backup-error[_ngcontent-%COMP%]{cursor:zoom-out;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}.backup-error[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--ghs-color-yellow);font-size:2em;padding:0;margin:calc(var(--ghs-unit) * .5) 0}.backup-error[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--ghs-color-white);font-size:1.5em}.backup-hint[_ngcontent-%COMP%]{position:absolute;bottom:0;display:flex;flex-direction:column;align-items:center;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-text-factor));color:var(--ghs-color-white)}.backup-hint[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2em;padding:0;margin:calc(var(--ghs-unit) * .5) 0}.backup-hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1em;padding:0;margin:calc(var(--ghs-unit) * .5) 0}.backup-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:1.5em;color:var(--ghs-color-gray);margin:calc(var(--ghs-unit) * 1.5) 0}.backup-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{opacity:.7}.backup-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-gray)}.backup-hint[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.backup-hint[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{color:var(--ghs-color-gray);width:1.2em;height:1.2em;border-width:.1em;margin-right:.3em}.backup-hint[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before{color:var(--ghs-color-gray);background-color:var(--ghs-color-gray)}']})),a})();function r$(o,a){if(1&o&&(t.TgZ(0,"option",9),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function c$(o,a){if(1&o&&(t.TgZ(0,"option",9),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n.name),t.xp6(1),t.Q6J("ghs-label","data.character."+n.name)}}function l$(o,a){if(1&o&&t._UZ(0,"ghs-attackmodifier",13),2&o){const n=a.$implicit,e=t.oxw(2).$implicit,i=t.oxw();t.Q6J("attackModifier",n)("flipped",!0)("characterIcon","./assets/images/character/icons/"+e.edition+"-"+e.name+".svg")("newStyle",i.settingsManager.settings.fhStyle||i.gameManager.newAmStyle(e.edition))}}function g$(o,a){if(1&o&&(t.TgZ(0,"div",11)(1,"h1"),t._UZ(2,"span",3),t._uU(3),t.qZA(),t.YNc(4,l$,1,4,"ghs-attackmodifier",12),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ghs-label","data.character."+n.name),t.xp6(1),t.hij(" [",n.attackModifierDeck.cards.length,"] "),t.xp6(1),t.Q6J("ngForOf",n.attackModifierDeck.cards)}}function d$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,g$,5,3,"div",10),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n&&n.attackModifierDeck.cards.length>0)}}let h$=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterName",[]),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"filteredCharacters",[]),(0,_.Z)(this,"edition",void 0),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{let s=!1;i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),s=!0),i.characters&&(e.characterName="string"==typeof i.characters?[i.characters]:i.characters,s=!0),s&&e.update()}})})()}update(){this.characters=[],d.v.charactersData(this.edition).forEach(e=>{let i=new oe.z(e,0);i.attackModifierDeck.cards=[];let s=0;i.perks.forEach(l=>{l.cards&&l.cards.forEach((m,O)=>{if(l.type==n_.Ib.add||l.type==n_.Ib.replace){let k=Object.assign(new Lt.YY(m.attackModifier.type),m.attackModifier);if(k.id="perk"+s,(!d.v.attackModifierManager.findByAttackModifier(Lt.UO,k)||l.type==n_.Ib.add||O>0)&&(k.character=!0),k.character){d.v.attackModifierManager.findByAttackModifier(i.attackModifierDeck.cards,k)||s++;for(let W=0;We.edition!=i.edition?e.edition{const i=this.characters.find(s=>s.name==e);i&&this.filteredCharacters.push(i)})}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,characters:this.characterName||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-tool"]],decls:13,vars:8,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["multiple","",3,"ngModel","ngModelChange","change"],[1,"characters"],[4,"ngFor","ngForOf"],[3,"value"],["class","character",4,"ngIf"],[1,"character"],[3,"attackModifier","flipped","characterIcon","newStyle",4,"ngFor","ngForOf"],[3,"attackModifier","flipped","characterIcon","newStyle"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,r$,2,2,"option",5),t.qZA()(),t.TgZ(7,"label"),t._UZ(8,"span",3),t.TgZ(9,"select",6),t.NdJ("ngModelChange",function(l){return i.characterName=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(10,c$,2,2,"option",5),t.qZA()()(),t.TgZ(11,"div",7),t.YNc(12,d$,2,1,"ng-container",8),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.Q6J("ghs-label","settings.character"),t.xp6(1),t.Q6J("ngModel",i.characterName),t.xp6(1),t.Q6J("ngForOf",i.characters),t.xp6(2),t.Q6J("ngForOf",i.filteredCharacters))},dependencies:[x.sg,x.O5,wo,ko,Ca,Sl,yi,Si,Yr,JO,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.characters[_ngcontent-%COMP%]{display:flex;overflow:auto}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{display:flex;flex-direction:column}.characters[_ngcontent-%COMP%] .character[_ngcontent-%COMP%] ghs-attackmodifier[_ngcontent-%COMP%]{width:300px;min-width:300px;height:200px;min-height:200px;margin:10px}"]})),a})();function u$(o,a){if(1&o&&(t.TgZ(0,"option",10),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function _$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",7),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return i.settingsManager.setCalculateStats(!i.settingsManager.settings.calculateStats),t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.settingsManager.settings.calculateStats),t.xp6(1),t.Q6J("ghs-label","settings.calcStats")}}function p$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",6),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.entity=i)})("change",function(){t.CHM(n);const i=t.oxw();return i.update(),t.KtG(i.updateQueryParams())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.entity),t.xp6(1),t.Q6J("ghs-label","tools.decks.entity")}}function f$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",6),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.elite=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.elite),t.xp6(1),t.Q6J("ghs-label","tools.decks.elite")}}function m$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",11),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.level=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",3),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.level),t.xp6(1),t.Q6J("ghs-label","tools.decks.level")}}function v$(o,a){if(1&o&&(t.TgZ(0,"small"),t._UZ(1,"span",3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","data.deck."+e.deck(n).name)}}function C$(o,a){if(1&o&&t._UZ(0,"ghs-ability",15),2&o){const n=a.$implicit,e=t.oxw(),i=e.$implicit,s=e.index,l=t.oxw(2);t.Q6J("ability",n)("abilities",l.deck(i).abilities)("character",l.characters[s])("flipped",!0)}}function M$(o,a){if(1&o&&(t.TgZ(0,"div",13)(1,"h2"),t._UZ(2,"span",3),t.YNc(3,v$,2,1,"small",8),t.qZA(),t.YNc(4,C$,1,4,"ghs-ability",14),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.character."+n.name),t.xp6(1),t.Q6J("ngIf",n.name!=e.deck(n).name),t.xp6(1),t.Q6J("ngForOf",e.deck(n).abilities)}}function O$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,M$,5,3,"div",12),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.characters)}}function P$(o,a){if(1&o&&(t.TgZ(0,"small"),t._UZ(1,"span",3),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","data.deck."+e.deck(n).name)}}const y$=function(o){return{"bottom-actions":o}};function b$(o,a){if(1&o&&t._UZ(0,"ghs-ability",17),2&o){const n=a.$implicit,e=t.oxw(),i=e.$implicit,s=e.index,l=t.oxw(2);t.Q6J("ability",n)("abilities",l.deck(i).abilities)("monster",l.monsters[s])("flipped",!0)("ngClass",t.VKq(5,y$,n.bottomActions&&n.bottomActions.length>0))}}function x$(o,a){if(1&o&&(t.TgZ(0,"div",13)(1,"h2"),t._UZ(2,"span",3),t.YNc(3,P$,2,1,"small",8),t.qZA(),t.YNc(4,b$,1,7,"ghs-ability",16),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",n.name!=e.deck(n).name),t.xp6(1),t.Q6J("ngForOf",e.deck(n).abilities)}}function w$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,x$,5,3,"div",12),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.monsters)}}let k$=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"monsters",[]),(0,_.Z)(this,"characters",[]),(0,_.Z)(this,"character",!1),(0,_.Z)(this,"entity",!0),(0,_.Z)(this,"elite",!0),(0,_.Z)(this,"level",1),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),e.update())}})})()}update(){if(this.monsters=[],this.characters=[],this.character){const e=d.v.editionData.filter(i=>i.edition==this.edition).map(i=>i.characters).flat().filter(i=>d.v.decksData().some(s=>s.name==i.deck||s.name==i.name));this.characters=e.sort((i,s)=>i.name.toLowerCase()new oe.z(i,this.level))}else{const e=d.v.editionData.filter(i=>i.edition==this.edition).map(i=>i.monsters).flat().filter((i,s,l)=>i.replace||!i.replace&&!l.find(m=>m.replace&&m.name==i.name&&m.edition==i.edition));this.monsters=e.sort((i,s)=>i.name.toLowerCase(){let s=new Ze.Q(i,this.level);return s.boss&&this.entity&&d.v.monsterManager.addMonsterEntity(s,1,ee.M.boss),!s.boss&&this.elite&&d.v.monsterManager.addMonsterEntity(s,1,ee.M.elite),!s.boss&&this.entity&&d.v.monsterManager.addMonsterEntity(s,2,ee.M.normal),s})}d.v.uiChange.emit()}deck(e){return d.v.deckData(e)}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-decks-tool"]],decls:23,vars:16,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["type","checkbox",3,"ngModel","ngModelChange","change"],["type","checkbox",3,"checked","change"],[4,"ngIf"],[1,"decks"],[3,"value"],["type","number","min","0","max","7",3,"ngModel","ngModelChange","change"],["class","deck",4,"ngFor","ngForOf"],[1,"deck"],["class","bottom-actions",3,"ability","abilities","character","flipped",4,"ngFor","ngForOf"],[1,"bottom-actions",3,"ability","abilities","character","flipped"],[3,"ability","abilities","monster","flipped","ngClass",4,"ngFor","ngForOf"],[3,"ability","abilities","monster","flipped","ngClass"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,u$,2,2,"option",5),t.qZA()(),t.TgZ(7,"label")(8,"input",6),t.NdJ("ngModelChange",function(l){return i.character=l})("change",function(){return i.update()}),t.qZA(),t._UZ(9,"span",3),t.qZA(),t.TgZ(10,"label")(11,"input",7),t.NdJ("change",function(){return i.settingsManager.setCalculate(!i.settingsManager.settings.calculate),i.update()}),t.qZA(),t._UZ(12,"span",3),t.qZA(),t.YNc(13,_$,3,2,"label",8),t.YNc(14,p$,3,2,"label",8),t.YNc(15,f$,3,2,"label",8),t.YNc(16,m$,3,2,"label",8),t.TgZ(17,"label")(18,"input",7),t.NdJ("change",function(){return i.settingsManager.setFhStyle(!i.settingsManager.settings.fhStyle),i.gameManager.uiChange.emit()}),t.qZA(),t._UZ(19,"span",3),t.qZA()(),t.TgZ(20,"div",9),t.YNc(21,O$,2,1,"ng-container",8),t.YNc(22,w$,2,1,"ng-container",8),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.Q6J("ngModel",i.character),t.xp6(1),t.Q6J("ghs-label","tools.decks.character"),t.xp6(2),t.Q6J("checked",i.settingsManager.settings.calculate),t.xp6(1),t.Q6J("ghs-label","settings.calc"),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate&&!i.character),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate&&!i.character),t.xp6(1),t.Q6J("ngIf",i.settingsManager.settings.calculate),t.xp6(2),t.Q6J("checked",i.settingsManager.settings.fhStyle),t.xp6(1),t.Q6J("ghs-label","settings.fhStyle"),t.xp6(2),t.Q6J("ngIf",i.characters.length>0),t.xp6(1),t.Q6J("ngIf",i.monsters.length>0))},dependencies:[x.mk,x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Jc,id,Si,Yr,a_,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.menu[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.menu[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex}.decks[_ngcontent-%COMP%]{flex:1 1 auto;width:100%;overflow:auto;display:flex;margin-top:20px}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%]{display:flex;flex-direction:column}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{text-align:center;margin:0}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{flex-shrink:0;width:400px;height:255px;margin:10px}.decks[_ngcontent-%COMP%] .deck[_ngcontent-%COMP%] ghs-ability.bottom-actions[_ngcontent-%COMP%]{height:540px}"]})),a})();var YO=E(2736),l_=E(3788);class KO{constructor(a=void 0,n=void 0,e=0,i=[],s=!1,l=[],m=0,O=void 0){(0,_.Z)(this,"cardId",void 0),(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"initiative",void 0),(0,_.Z)(this,"level",0),(0,_.Z)(this,"shuffle",void 0),(0,_.Z)(this,"actions",void 0),(0,_.Z)(this,"lost",!1),(0,_.Z)(this,"bottomActions",void 0),(0,_.Z)(this,"bottomLost",!1),(0,_.Z)(this,"bottomShuffle",!1),(0,_.Z)(this,"hint",void 0),(0,_.Z)(this,"revealed",!1),this.cardId=a,this.name=n,this.initiative=e,this.actions=i,this.shuffle=s,this.bottomActions=l,this.level=m,this.hint=O}}var $w=E(2113);class BT{constructor(a,n,e,i,s,l,m,O,k=void 0,W=void 0,ct=void 0,Ct=!1,Ot=1,xt=!1,Gt=void 0,se=!1){(0,_.Z)(this,"name",void 0),(0,_.Z)(this,"cardId",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"health",void 0),(0,_.Z)(this,"attack",void 0),(0,_.Z)(this,"movement",void 0),(0,_.Z)(this,"range",void 0),(0,_.Z)(this,"flying",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"additionalAction",void 0),(0,_.Z)(this,"level",void 0),(0,_.Z)(this,"special",void 0),(0,_.Z)(this,"count",void 0),(0,_.Z)(this,"thumbnail",void 0),(0,_.Z)(this,"thumbnailUrl",void 0),(0,_.Z)(this,"noThumbnail",!1),this.name=a,this.cardId=n,this.edition=e,this.health=i,this.attack=s,this.movement=l,this.range=m,this.flying=O,this.action=k,this.additionalAction=W,this.level=ct,this.special=Ct,this.count=Ot,this.thumbnail=xt,this.thumbnail=xt,this.thumbnailUrl=Gt,this.noThumbnail=se}}class T${constructor(a){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"count",""),(0,_.Z)(this,"marker",""),(0,_.Z)(this,"summon",!1),(0,_.Z)(this,"manual",!1),(0,_.Z)(this,"manualMin",0),(0,_.Z)(this,"manualMax",0),this.monster=a}}const Z$=function(o,a,n,e){return[o,a,n,e]};function A$(o,a){if(1&o&&t._UZ(0,"span",10),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Akn(e.style),t.Q6J("ghs-label",n.marker?"game.summon.spawnTypeMarker":"game.summon.spawnType")("ghs-label-args",t.l5B(4,Z$,n.monster.name,n.monster.type,n.count?""+n.count:"",n.marker))}}const S$=function(o,a,n){return[o,a,n]};function E$(o,a){if(1&o&&t._UZ(0,"span",10),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.Akn(e.style),t.Q6J("ghs-label",n.marker?"game.summon.spawnMarker":"game.summon.spawn")("ghs-label-args",t.kEZ(4,S$,n.monster.name,n.count?""+n.count:"",n.marker))}}function D$(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1," ("),t._UZ(2,"span",11),t._uU(3,"\xa0"),t._UZ(4,"span",4),t._uU(5,")\xa0 "),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(2);t.xp6(2),t.Q6J("value-calc",n.monster.health),t.xp6(2),t.Akn(e.style),t.Q6J("ghs-label","game.hp")}}function I$(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t._UZ(2,"span",4),t._uU(3,"\xa0"),t.qZA()),2&o){const n=t.oxw(4);t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label","and")}}const N$=function(o,a){return{"spawn-highlight":o,"spawn-objective-highlight":a}};function J$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",7),t.NdJ("singleClick",function(i){t.CHM(n);const s=t.oxw(),l=s.$implicit,m=s.index,O=t.oxw(2);return t.KtG(O.spawnSummons(i,l,m))}),t.YNc(1,A$,1,9,"span",8),t.YNc(2,E$,1,8,"span",8),t.YNc(3,D$,6,4,"span",9),t.YNc(4,I$,4,3,"span",9),t.qZA()}if(2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw(2);t.Q6J("ngClass",t.WLB(6,N$,s.spawnHighlight(e,i)&&!s.settingsManager.settings.disableAnimations,s.objective))("clickBehind",!s.spawnHighlight(e,i)),t.xp6(1),t.Q6J("ngIf",e.monster.type!=s.MonsterType.boss),t.xp6(1),t.Q6J("ngIf",e.monster.type==s.MonsterType.boss),t.xp6(1),t.Q6J("ngIf",e.monster.health),t.xp6(1),t.Q6J("ngIf",i1)}}function U$(o,a){if(1&o&&(t.ynx(0),t.YNc(1,J$,5,9,"span",6),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngIf",n.monster.type)}}const L$=function(o,a){return{"text-white":o,small:a}};function Q$(o,a){if(1&o&&(t.TgZ(0,"span",2)(1,"span",3),t._UZ(2,"span",4),t._uU(3,"\xa0"),t.qZA(),t.YNc(4,U$,2,1,"ng-container",5),t.qZA()),2&o){const n=t.oxw();t.Q6J("ngClass",t.WLB(5,L$,!n.right,n.action.small)),t.xp6(2),t.Akn(n.style),t.Q6J("ghs-label",n.isSpawn?"game.action.spawn":"game.action.summon"),t.xp6(2),t.Q6J("ngForOf",n.monsters)}}function R$(o,a){if(1&o&&t._UZ(0,"ghs-summon-sheet",12),2&o){const n=t.oxw();t.Akn(n.style),t.Q6J("summon",n.getSummon())("action",!0)("additional",n.additional)("right",n.right)("item","summonDataItem"==n.action.value)}}let zT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"monsterType",void 0),(0,_.Z)(this,"objective",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"right",!1),(0,_.Z)(this,"isSpawn",!1),(0,_.Z)(this,"additional",!1),(0,_.Z)(this,"highlight",!0),(0,_.Z)(this,"actionIndex",""),(0,_.Z)(this,"style",!1),(0,_.Z)(this,"spawners",[]),(0,_.Z)(this,"monsters",[]),(0,_.Z)(this,"type",void 0),(0,_.Z)(this,"summonData",void 0),(0,_.Z)(this,"count",void 0),(0,_.Z)(this,"tags",[]),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"uiChangeSubscription",void 0),this.uiChangeSubscription=d.v.uiChange.subscribe({next:()=>{this.update()}})}ngOnDestroy(){this.uiChangeSubscription&&this.uiChangeSubscription.unsubscribe()}ngOnChanges(e){this.update()}update(){if(this.summonData=void 0,this.spawners=[],this.monster?this.spawners=d.v.entityManager.entities(this.monster,!0).map(e=>e).filter(e=>!this.monsterType||e.type==this.monsterType):this.objective instanceof qe.CH?this.spawners=[this.objective]:this.objective instanceof Nn.k&&(this.spawners=d.v.entityManager.entities(this.objective,!0).map(e=>e)),this.monsters=[],this.tags=[],this.count=void 0,this.type=void 0,"summonData"==this.action.value||"summonDataItem"==this.action.value)this.summonData=this.action.valueObject;else if("monsterStandee"==this.action.value){this.monsters=JSON.parse(JSON.stringify(this.action.valueObject));const e=Math.max(2,d.v.characterManager.characterCount());this.monsters=this.monsters.filter(i=>!!(i.monster.type||e<3&&i.monster.player2||3==e&&i.monster.player3||e>3&&i.monster.player4)||!R.r.settings.calculate),this.monsters.forEach(i=>{i.monster.type||(e<3&&i.monster.player2?i.monster.type=i.monster.player2:3==e&&i.monster.player3?i.monster.type=i.monster.player3:e>3&&i.monster.player4&&(i.monster.type=i.monster.player4))})}else(""+this.action.value).split("|").forEach(e=>{const i=e.split(":");let s=new yn.Qw(i[0]);s.type=ee.M.normal;let l=new T$(s);i.length>1&&(isNaN(+i[1])?s.type=i[1]:l.count=+i[1]),i.length>2&&i[2]&&(l.count=i[2]),i.length>3&&i[3]&&(s.health=i[3]),this.monsters.push(l)});(this.monster||this.objective)&&d.v.game.figures.forEach(e=>{e instanceof Ze.Q&&e.entities.forEach(i=>{i.tags&&i.tags.forEach(s=>{this.monster&&s.startsWith("roundAction-summon-"+this.monster.name+"-"+(this.actionIndex?this.actionIndex+"-":"")+this.getSpawnId())&&this.tags.push(s)})})})}getSummonLabel(e){const i="string"==typeof e.monster.health&&-1!=e.monster.health.indexOf("H")?e.monster.health:e.monster.health?(0,ae.j9)(e.monster.health):"";return e.monster.player2==e.monster.player3&&e.monster.player3==e.monster.player4?R.r.getLabel("game.summon.playerAll",[""+e.monster.type])+(i?"("+i+" "+R.r.getLabel("game.hp")+")":""):e.monster.player2==e.monster.player3?R.r.getLabel("game.summon.player2-3",[""+e.monster.player2,""+e.monster.player4])+(i?"("+i+" "+R.r.getLabel("game.hp")+")":""):e.monster.player3==e.monster.player4?R.r.getLabel("game.summon.player3-4",[""+e.monster.player2,""+e.monster.player4])+(i?"("+i+" "+R.r.getLabel("game.hp")+")":""):(console.warn("Incorrect summon data",e),"")}getSummon(){return this.summonData?new Ee.eU("",this.summonData.name,this.summonData.cardId,this.summonData.level||0,this.summonData.count,Ee.mp.custom,this.summonData):new Ee.eU("","","",0,0,Ee.mp.custom)}getSpawnId(){if(this.monster){const e=d.v.monsterManager.getAbility(this.monster);if(e)return e.cardId||d.v.deckData(this.monster).abilities.indexOf(e)}return-1}getTag(e,i=!1){return this.monster?(i?"roundAction-spawner-":"roundAction-summon-")+this.monster.name+"-"+(this.actionIndex?this.actionIndex+"-":"")+this.getSpawnId()+"-"+e:this.objective instanceof qe.CH?(i?"roundAction-spawner-":"roundAction-summon-")+this.objective.id+"-"+(this.actionIndex?this.actionIndex+"-":"")+e:this.objective instanceof Nn.k?(i?"roundAction-spawner-":"roundAction-summon-")+this.objective.uuid+"-"+(this.actionIndex?this.actionIndex+"-":"")+e:""}spawnHighlight(e,i){if(this.monster){const s=d.v.game.figures.find(m=>m instanceof Ze.Q&&m.name==e.monster.name),l=s&&d.v.monsterManager.monsterEntityCountAll(s)||0;return this.highlight&&(this.spawners.length>0&&this.monster.active&&this.tags.filter(m=>m==this.getTag(i)).lengthO instanceof qe.CH||O instanceof oa.W||-1==O.tags.indexOf(l)).filter((O,k)=>R.r.settings.combineSummonAction||0==k);if(i.monster&&i.monster.type){const O=(0,ae.j9)(i.count||1);d.v.stateManager.before("summonAction","data.monster."+i.monster.name,"game.monsterType."+i.monster.type,""+O*m.length),m.forEach(k=>{if(i.monster&&i.monster.type){const W=d.v.monsterManager.addMonsterByName(i.monster.name,this.monster&&this.monster.edition||d.v.currentEdition());if(W){for(let ct=0;ctCt.maxHealth&&(Ct.health=Ct.maxHealth)}(Ct.marker||Ct.tags.length>0)&&d.v.addEntityCount(W,Ct)}}k.tags.push(l)}}}),this.update(),d.v.stateManager.after()}e.stopPropagation(),e.preventDefault()}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-action-summon"]],inputs:{monster:"monster",monsterType:"monsterType",objective:"objective",action:"action",right:"right",isSpawn:["spawn","isSpawn"],additional:"additional",highlight:"highlight",actionIndex:["index","actionIndex"],style:"style"},features:[t.TTD],decls:2,vars:2,consts:[["class","summon-value",3,"ngClass",4,"ngIf"],[3,"summon","action","additional","right","item","style",4,"ngIf"],[1,"summon-value",3,"ngClass"],[1,"summon-label"],[3,"ghs-label"],[4,"ngFor","ngForOf"],["ghs-pointer-input","",3,"ngClass","clickBehind","singleClick",4,"ngIf"],["ghs-pointer-input","",3,"ngClass","clickBehind","singleClick"],[3,"ghs-label","ghs-label-args","style",4,"ngIf"],[4,"ngIf"],[3,"ghs-label","ghs-label-args"],[3,"value-calc"],[3,"summon","action","additional","right","item"]],template:function(e,i){1&e&&(t.YNc(0,Q$,5,8,"span",0),t.YNc(1,R$,1,7,"ghs-summon-sheet",1)),2&e&&(t.Q6J("ngIf",!i.summonData),t.xp6(1),t.Q6J("ngIf",i.summonData))},dependencies:[x.mk,x.sg,x.O5,DT,ie,ng,An],styles:[".summon-value[_ngcontent-%COMP%]{font-family:var(--ghs-font-text)}.summon-value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow)}.summon-value.small[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{filter:var(--ghs-filter-shadow-thin)}@keyframes _ngcontent-%COMP%_spawn-pulse{0%{transform:scale(.9)}50%{transform:scale(1)}to{transform:scale(.9)}}.summon-value[_ngcontent-%COMP%] .spawn-highlight[_ngcontent-%COMP%]{display:inline-block;cursor:pointer;animation:_ngcontent-%COMP%_spawn-pulse 2s ease-in-out infinite}.summon-value[_ngcontent-%COMP%] .spawn-highlight[_ngcontent-%COMP%]:hover{transform:scale(1);opacity:.8;animation:none}.summon-value[_ngcontent-%COMP%] .spawn-objective-highlight[_ngcontent-%COMP%]{display:inline-block;cursor:pointer;transform:scale(.9);font-style:italic}.summon-value[_ngcontent-%COMP%] .spawn-objective-highlight[_ngcontent-%COMP%]:hover{transform:scale(1);opacity:.8}.summon-value[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{vertical-align:initial}"]})),a})();function F$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.action."+n)}}function q$(o,a){1&o&&(t.TgZ(0,"label"),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","editor.action.value"))}const Ww=function(){return["X"]};function H$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",18),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.specialTarget."+n)("ghs-label-args",t.DdM(3,Ww))}}function j$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",19),t._uU(1," X: "),t.TgZ(2,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.subValue=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSpecialTarget())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngModel",n.subValue)}}function B$(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeSpecialTarget())}),t.YNc(2,H$,2,4,"option",5),t.qZA(),t.YNc(3,j$,3,1,"label",17),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.value),t.xp6(1),t.Q6J("ngForOf",n.ActionSpecialTarget),t.xp6(1),t.Q6J("ngIf",n.subValue)}}function z$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",21),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.value=s.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngModel",n.action.value)}}function G$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",22)(1,"div",23)(2,"ghs-action-hex",24),t.NdJ("clickCallback",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.toggleHex(i))})("doubleclickCallback",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.removeHex(i))}),t.qZA()(),t.TgZ(3,"textarea",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.hexAction.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeHex())}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("action",n.hexAction)("value",""+n.hexAction.value),t.xp6(1),t.Q6J("ngModel",n.hexAction.value)}}function V$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.monster."+n)}}function Y$(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","monster."+n)}}function K$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",31)(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.monster=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummonMonster())}),t.YNc(2,V$,2,2,"option",5),t.qZA(),t.TgZ(3,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.monsterType=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummonMonster())}),t._UZ(4,"option"),t.YNc(5,Y$,2,2,"option",5),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngModel",n.monster),t.xp6(1),t.Q6J("ngForOf",n.monsters),t.xp6(1),t.Q6J("ngModel",n.monsterType),t.xp6(2),t.Q6J("ngForOf",n.MonsterTypes)}}function $$(o,a){1&o&&(t.TgZ(0,"span"),t._UZ(1,"span",2),t.qZA()),2&o&&(t.xp6(1),t.Q6J("ghs-label","editor.action.add"))}function W$(o,a){1&o&&t._UZ(0,"span",2),2&o&&t.Q6J("ghs-label","editor.action.add")}function X$(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",32),t._UZ(1,"ghs-action-summon",33),t.TgZ(2,"input",34),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.name=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA(),t.TgZ(3,"div",35)(4,"span",36)(5,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.health=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(6,"span",36)(7,"input",38),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.movement=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(8,"a",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.editSummonAction())}),t.YNc(9,$$,2,1,"span",6),t.qZA(),t.TgZ(10,"span",36)(11,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.attack=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(12,"span",36)(13,"input",40),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.summon.range=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeSummon())}),t.qZA()(),t.TgZ(14,"a",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.editSummonAdditionalAction())}),t.YNc(15,W$,1,1,"span",41),t.qZA()()()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("action",n.action)("additional",!0),t.xp6(1),t.Q6J("ngModel",n.summon.name),t.xp6(3),t.Q6J("ngModel",n.summon.health),t.xp6(2),t.Q6J("ngModel",n.summon.movement),t.xp6(2),t.Q6J("ngIf",!n.summon.action),t.xp6(2),t.Q6J("ngModel",n.summon.attack),t.xp6(2),t.Q6J("ngModel",n.summon.range),t.xp6(2),t.Q6J("ngIf",!n.summon.additionalAction)}}function tW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",25)(1,"div",26)(2,"label")(3,"input",27),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeSummonType(i))}),t.qZA(),t._UZ(4,"span",2),t.qZA(),t.TgZ(5,"label")(6,"input",28),t.NdJ("change",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.changeSummonType(i))}),t.qZA(),t._UZ(7,"span",2),t.qZA()(),t.YNc(8,K$,6,4,"div",29),t.YNc(9,X$,16,9,"div",30),t.qZA()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("checked",!n.summon),t.xp6(1),t.Q6J("ghs-label","editor.action.summon.type.monster"),t.xp6(2),t.Q6J("checked",n.summon),t.xp6(1),t.Q6J("ghs-label","editor.action.summon.type.summon"),t.xp6(1),t.Q6J("ngIf",!n.summon),t.xp6(1),t.Q6J("ngIf",n.summon)}}function eW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",18),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.condition."+n)("ghs-label-args",t.DdM(3,Ww))}}function nW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",19),t._uU(1," X: "),t.TgZ(2,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.subValue=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCondition())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngModel",n.subValue)}}function iW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCondition())}),t.YNc(2,eW,2,4,"option",5),t.qZA(),t.YNc(3,nW,3,1,"label",17),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.value),t.xp6(1),t.Q6J("ngForOf",n.ConditionNames),t.xp6(1),t.Q6J("ngIf",n.subValue)}}function oW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",18),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.card."+n)("ghs-label-args",t.DdM(3,Ww))}}function aW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label",19),t._uU(1," X: "),t.TgZ(2,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.subValue=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.changeCard())}),t.qZA()()}if(2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("ngModel",n.subValue)}}function sW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.changeCard())}),t.YNc(2,oW,2,4,"option",5),t.qZA(),t.YNc(3,aW,3,1,"label",17),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngModel",n.value),t.xp6(1),t.Q6J("ngForOf",n.ActionCardTypes),t.xp6(1),t.Q6J("ngIf",n.subValue)}}function rW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.element."+n)}}function cW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.YNc(1,rW,2,2,"option",5),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngModel",n.action.value),t.xp6(1),t.Q6J("ngForOf",n.Elements)}}function lW(o,a){if(1&o&&(t.TgZ(0,"option",15),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.monster."+n)}}function gW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"select",16),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.value=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.YNc(1,lW,2,2,"option",5),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("ngModel",n.action.value),t.xp6(1),t.Q6J("ngForOf",n.MonsterTypes)}}function dW(o,a){if(1&o&&(t.TgZ(0,"option",44),t._UZ(1,"span",2),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.Q6J("value",n)("selected",e.action.valueType==n||!e.action.valueType&&n==e.ActionValueType.fixed),t.xp6(1),t.Q6J("ghs-label","editor.action.valueType."+n)}}function hW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"span",2),t.qZA(),t.TgZ(3,"select",42),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.action.valueType=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.change())}),t.YNc(4,dW,2,3,"option",43),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","editor.action.valueType"),t.xp6(1),t.Q6J("ngModel",n.action.valueType),t.xp6(1),t.Q6J("ngForOf",n.ActionValueTypes)}}function uW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",45)(1,"span",46),t._UZ(2,"img",47),t.qZA(),t.TgZ(3,"ghs-editor-action",48),t.NdJ("actionChange",function(i){const l=t.CHM(n).index,m=t.oxw();return t.KtG(m.action.subActions[l]=i)}),t.qZA(),t.TgZ(4,"a",12),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeSubAction(s))}),t._UZ(5,"img",49)(6,"span",2),t.qZA()()}if(2&o){const n=a.index,e=t.oxw();t.xp6(3),t.Q6J("action",e.action.subActions[n]),t.xp6(3),t.Q6J("ghs-label","editor.action.removeSubAction")}}const _W=function(o){return[o]},pW=function(o,a,n,e,i,s,l,m){return[o,a,n,e,i,s,l,m]},fW=function(o,a,n,e,i,s,l,m,O,k,W,ct){return[o,a,n,e,i,s,l,m,O,k,W,ct]};function mW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"ghs-action",6),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.relative=!i.relative)}),t.qZA()}if(2&o){const n=t.oxw();t.Q6J("action",n.data.action)("relative",n.relative)}}let vW=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"action",void 0),(0,_.Z)(this,"actionChange",new t.vpe),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionTypes",Object.values(vt.Us)),(0,_.Z)(this,"ActionSpecialTarget",Object.values(vt.q2)),(0,_.Z)(this,"ConditionNames",Object.values(re.fT)),(0,_.Z)(this,"Elements",Object.values(Gn.W_)),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"ActionValueTypes",Object.values(vt.EF)),(0,_.Z)(this,"ActionCardTypes",Object.values(vt.TE)),(0,_.Z)(this,"MonsterTypes",Object.values(ee.M)),(0,_.Z)(this,"hexAction",new vt.aU(vt.Us.area,"(0,0,invisible)")),(0,_.Z)(this,"value",""),(0,_.Z)(this,"subValue",""),(0,_.Z)(this,"summon",void 0),(0,_.Z)(this,"monster",""),(0,_.Z)(this,"monsterType",void 0),(0,_.Z)(this,"monsters",[]),this.dialog=e}ngOnInit(){if(this.monsters=d.v.monstersData().map(e=>e.name),this.action&&this.action.type==vt.Us.area){this.hexAction.value=""+this.action.value;let e=[];this.hexAction.value.split("|").forEach(i=>{const s=Fi.fromString(i);null!=s&&e.push(s)}),e.forEach(i=>this.fillHexes(i,e)),this.hexAction.value=e.map(i=>Fi.toString(i)).join("|"),this.change()}else if(this.action.type==vt.Us.condition||this.action.type==vt.Us.specialTarget||this.action.type==vt.Us.card)-1!=(""+this.action.value).indexOf(":")?(this.value=(""+this.action.value).split(":")[0],this.subValue=(""+this.action.value).split(":")[1]):this.value=""+this.action.value;else if(this.action.type==vt.Us.summon&&this.action.value)try{let e=JSON.parse(this.action.value+"");if("string"==typeof e)throw Error("fallback");this.summon=new BT(e.name,e.health,e.attack,e.movement,e.range,e.flying,e.action,e.additionalAction)}catch{this.summon=void 0;const i=(this.action.value+"").split(":");this.monster=i[0],i.length>1&&(this.monsterType=i[1])}}valueChange(e){return isNaN(+e)?e||"":+e}addSubAction(){this.action.subActions||(this.action.subActions=[]),this.action.subActions.push(new vt.aU(vt.Us.attack)),this.change()}removeSubAction(e){this.action.subActions.splice(e,1),this.change()}changeType(){this.action.valueType=vt.EF.fixed,this.action.type==vt.Us.area?this.hexAction.value="(0,0,invisible)":this.action.type==vt.Us.condition?(this.value=this.ConditionNames[0],this.changeCondition()):this.action.type==vt.Us.element?this.action.value=this.Elements[0]:this.action.type==vt.Us.card&&(this.value=this.ActionCardTypes[0],this.changeCard()),this.change()}change(){d.v.uiChange.emit()}toggleHex(e){switch(e.type){case ci.target:e.type=ci.active;break;case ci.active:e.type=ci.blank;break;case ci.blank:e.type=ci.ally;break;case ci.ally:e.type=ci.conditional;break;case ci.conditional:e.type=ci.invisible;break;case ci.invisible:e.type=ci.target}let i=[];(""+this.hexAction.value).split("|").forEach(l=>{const m=Fi.fromString(l);null!=m&&i.push(m)});const s=i.find(l=>e.x==l.x&&e.y==l.y);s?i.splice(i.indexOf(s),1,e):i.push(e),this.fillHexes(e,i),this.hexAction.value=i.map(l=>Fi.toString(l)).join("|"),this.action.value=i.filter(l=>l.type!=ci.invisible).map(l=>Fi.toString(l)).join("|"),this.change()}changeHex(){let e=[];(""+this.hexAction.value).split("|").forEach(i=>{const s=Fi.fromString(i);null!=s&&e.push(s)}),this.hexAction.value=e.map(i=>Fi.toString(i)).join("|"),this.action.value=e.filter(i=>i.type!=ci.invisible).map(i=>Fi.toString(i)).join("|"),this.change()}removeHex(e){let i=[];(""+this.hexAction.value).split("|").forEach(l=>{const m=Fi.fromString(l);null!=m&&i.push(m)});const s=i.find(l=>e.x==l.x&&e.y==l.y);if(s){0==s.x&&0==s.y?s.type=ci.invisible:i.splice(i.indexOf(s),1);for(let l=-1;l<2;l++)for(let m=-1;m<2;m++)if((e.x+l!=e.x||e.y+m!=e.y)&&e.x+l>=0&&e.y+m>=0){let O=i.find(k=>e.x+l==k.x&&e.y+m==k.y&&k.type==ci.invisible);O&&(0!=O.x||0!=O.y)&&i.splice(i.indexOf(O),1)}}i.filter(l=>l.type!=ci.invisible).forEach(l=>this.fillHexes(l,i)),this.hexAction.value=i.map(l=>Fi.toString(l)).join("|"),this.action.value=i.filter(l=>l.type!=ci.invisible).map(l=>Fi.toString(l)).join("|"),this.change()}fillHexes(e,i){for(let s=-1;s<2;s++)for(let l=-1;l<2;l++)(e.x+s!=e.x||e.y+l!=e.y)&&e.x+s>=0&&e.y+l>=0&&(i.find(m=>e.x+s==m.x&&e.y+l==m.y)||i.push(new Fi(e.x+s,e.y+l,ci.invisible,"")))}changeSpecialTarget(){-1!=R.r.getLabel("game.specialTarget."+this.value).indexOf("{0}")?(this.subValue||(this.subValue="1"),this.action.value=this.value+":"+this.subValue):(this.action.value=this.value,this.subValue=""),this.change()}changeCondition(){-1!=new re.gP(this.value).types.indexOf(re.CP.value)?(this.subValue||(this.subValue="1"),this.action.value=this.value+":"+this.subValue):(this.action.value=this.value,this.subValue=""),this.change()}changeCard(){this.value==vt.TE.experience||this.value==vt.TE.slotXp?(this.subValue||(this.subValue="1"),this.action.value=this.value+":"+this.subValue):(this.action.value=this.value,this.subValue=""),this.change()}dropSubAction(e){Fn(this.action.subActions,e.previousIndex,e.currentIndex),d.v.uiChange.emit()}changeSummonType(e){this.monster="",this.monsterType=void 0,"monster"==e.target.value?(this.summon=void 0,this.changeSummonMonster()):"summon"==e.target.value&&(this.summon=new BT("","","",0,0,0,0,!1),this.action.value=JSON.stringify(this.summon))}changeSummonMonster(){this.action.value=this.monster+(this.monsterType?":"+this.monsterType:""),d.v.uiChange.emit()}changeSummon(){this.summon&&(this.action.value=JSON.stringify(this.summon)),d.v.uiChange.emit()}editSummonAction(){this.summon&&(this.summon.action||(this.summon.action=new vt.aU(vt.Us.attack)),this.dialog.open(Kr,{panelClass:"dialog",data:{action:this.summon.action}}).closed.subscribe({next:i=>{0==i&&this.summon&&(this.summon.action=void 0),this.changeSummon()}}))}editSummonAdditionalAction(){this.summon&&(this.summon.additionalAction||(this.summon.additionalAction=new vt.aU(vt.Us.attack)),this.dialog.open(Kr,{panelClass:"dialog",data:{action:this.summon.additionalAction}}).closed.subscribe({next:i=>{0==i&&this.summon&&(this.summon.additionalAction=void 0),this.changeSummon()}}))}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-editor-action"]],inputs:{action:"action"},outputs:{actionChange:"actionChange"},decls:24,vars:41,consts:[[1,"action"],[1,"type"],[3,"ghs-label"],["type","checkbox",3,"ngModel","ngModelChange","change"],["placeholder","type",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["type","text",3,"ngModel","ngModelChange","change",4,"ngIf"],["class","area-container",4,"ngIf"],["class","summon",4,"ngIf"],[3,"ngModel","ngModelChange","change",4,"ngIf"],["cdkDropList","",1,"subactions",3,"cdkDropListDropped"],[3,"click"],["src","./assets/images/plus.svg",1,"ghs-icon"],["class","subaction","cdkDrag","",4,"ngFor","ngForOf"],[3,"value"],[3,"ngModel","ngModelChange","change"],["class","inline",4,"ngIf"],[3,"ghs-label","ghs-label-args"],[1,"inline"],["min","1","type","number",3,"ngModel","ngModelChange","change"],["type","text",3,"ngModel","ngModelChange","change"],[1,"area-container"],[1,"hexes"],[3,"action","value","clickCallback","doubleclickCallback"],[1,"summon"],[1,"summon-type"],["type","radio","name","summonType","value","monster",3,"checked","change"],["type","radio","name","summonType","value","summon",3,"checked","change"],["class","summon-monster",4,"ngIf"],["class","summon-form",4,"ngIf"],[1,"summon-monster"],[1,"summon-form"],[3,"action","additional"],[1,"summon-name",3,"ngModel","ngModelChange","change"],[1,"grid"],[1,"item"],[1,"summon-health",3,"ngModel","ngModelChange","change"],[1,"summon-movement",3,"ngModel","ngModelChange","change"],[1,"summon-attack",3,"ngModel","ngModelChange","change"],[1,"summon-range",3,"ngModel","ngModelChange","change"],[3,"ghs-label",4,"ngIf"],["placeholder","valueType",3,"ngModel","ngModelChange","change"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"value","selected"],["cdkDrag","",1,"subaction"],["cdkDragHandle","",1,"handle"],["src","./assets/images/menu.svg",1,"ghs-icon"],[3,"action","actionChange"],["src","./assets/images/minus.svg",1,"ghs-icon"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"label",1),t._UZ(2,"span",2),t.TgZ(3,"input",3),t.NdJ("ngModelChange",function(l){return i.action.small=l})("change",function(){return i.change()}),t.qZA(),t._UZ(4,"span",2),t.qZA(),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.action.type=l})("change",function(){return i.changeType()}),t.YNc(6,F$,2,2,"option",5),t.qZA(),t.YNc(7,q$,2,1,"label",6),t.YNc(8,B$,4,3,"ng-container",6),t.YNc(9,z$,1,1,"input",7),t.YNc(10,G$,4,3,"div",8),t.YNc(11,tW,10,6,"div",9),t.YNc(12,iW,4,3,"ng-container",6),t.YNc(13,sW,4,3,"ng-container",6),t.YNc(14,cW,2,2,"select",10),t.YNc(15,gW,2,2,"select",10),t.YNc(16,hW,5,3,"ng-container",6),t.TgZ(17,"div",11),t.NdJ("cdkDropListDropped",function(l){return i.dropSubAction(l)}),t.TgZ(18,"label"),t._uU(19,"SubActions"),t.qZA(),t.TgZ(20,"a",12),t.NdJ("click",function(){return i.addSubAction()}),t._UZ(21,"img",13)(22,"span",2),t.qZA(),t.YNc(23,uW,7,2,"div",14),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ghs-label","editor.action.type"),t.xp6(1),t.Q6J("ngModel",i.action.small),t.xp6(1),t.Q6J("ghs-label","editor.action.small"),t.xp6(1),t.Q6J("ngModel",i.action.type),t.xp6(1),t.Q6J("ngForOf",i.ActionTypes),t.xp6(1),t.Q6J("ngIf",-1==t.VKq(17,_W,i.ActionType.jump).indexOf(i.action.type)),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.specialTarget),t.xp6(1),t.Q6J("ngIf",-1==t.qlk(19,pW,i.ActionType.area,i.ActionType.card,i.ActionType.condition,i.ActionType.element,i.ActionType.jump,i.ActionType.monsterType,i.ActionType.specialTarget,i.ActionType.summon).indexOf(i.action.type)),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.area),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.summon),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.condition),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.card),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.element),t.xp6(1),t.Q6J("ngIf",i.action.type==i.ActionType.monsterType),t.xp6(1),t.Q6J("ngIf",-1==t.rFY(28,fW,[i.ActionType.area,i.ActionType.card,i.ActionType.condition,i.ActionType.concatenation,i.ActionType.custom,i.ActionType.grant,i.ActionType.grid,i.ActionType.jump,i.ActionType.monsterType,i.ActionType.specialTarget,i.ActionType.summon,i.ActionType.trigger]).indexOf(i.action.type)),t.xp6(6),t.Q6J("ghs-label","editor.action.addSubAction"),t.xp6(1),t.Q6J("ngForOf",i.action.subActions))},dependencies:[x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Jc,Si,Bs,Ms,Zr,Sf,zT,ie,o],styles:[".action[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--ghs-color-white)}.action[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{display:flex;align-items:center}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%]{display:flex;flex-direction:column}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] .subaction[_ngcontent-%COMP%]{position:relative;margin-left:calc(var(--ghs-unit) * 2)}.action[_ngcontent-%COMP%] .subactions[_ngcontent-%COMP%] .subaction[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{position:absolute;right:0;top:0}.action[_ngcontent-%COMP%] .area-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.action[_ngcontent-%COMP%] .area-container[_ngcontent-%COMP%] .hexes[_ngcontent-%COMP%]{width:0}label.inline[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * .5);display:flex}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-white);background-color:transparent;border:1px solid var(--ghs-color-gray);font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize))}input[type=text][_ngcontent-%COMP%]:hover, input[type=number][_ngcontent-%COMP%]:hover, select[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}input[type=text][_ngcontent-%COMP%] option[_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%] option[_ngcontent-%COMP%], select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{color:var(--ghs-color-black)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{display:flex;align-items:center}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}a[_ngcontent-%COMP%], ghs-action-hex[_ngcontent-%COMP%]{cursor:pointer}.summon[_ngcontent-%COMP%] .summon-type[_ngcontent-%COMP%], .summon[_ngcontent-%COMP%] .summon-type[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .summon[_ngcontent-%COMP%] .summon-monster[_ngcontent-%COMP%]{display:flex}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%]{position:relative;padding-top:38%;background-color:var(--ghs-color-darkgray)}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] ghs-action-summon[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .summon-name[_ngcontent-%COMP%]{position:absolute;top:5%;left:50%;width:65%;height:20%;transform:translate(-50%)}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:32% 32% 36%;grid-template-rows:1fr 1fr;position:absolute;justify-items:stretch;top:36%;left:13%;width:87%;height:56%}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;justify-content:center}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:100%;width:30%;margin-left:40%}.summon[_ngcontent-%COMP%] .summon-form[_ngcontent-%COMP%] .grid[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background-color:var(--ghs-color-black);opacity:.7}"]})),a})(),Kr=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"data",void 0),(0,_.Z)(this,"dialogRef",void 0),(0,_.Z)(this,"relative",!0),(0,_.Z)(this,"noPreview",[]),this.data=e,this.dialogRef=i}deleteAction(){this.dialogRef.close(!1)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36($e),t.Y36(He))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-editor-action-dialog"]],decls:6,vars:3,consts:[[1,"scroll-container"],[3,"action","relative","click",4,"ngIf"],[3,"action","actionChange"],[3,"click"],["src","./assets/images/minus.svg",1,"ghs-icon"],[3,"ghs-label"],[3,"action","relative","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,mW,1,2,"ghs-action",1),t.TgZ(2,"ghs-editor-action",2),t.NdJ("actionChange",function(l){return i.data.action=l}),t.qZA(),t.TgZ(3,"a",3),t.NdJ("click",function(){return i.deleteAction()}),t._UZ(4,"img",4)(5,"span",5),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngIf",-1==i.noPreview.indexOf(i.data.action.type)),t.xp6(1),t.Q6J("action",i.data.action),t.xp6(3),t.Q6J("ghs-label","editor.action.remove"))},dependencies:[x.O5,Gr,ie,vW],styles:["[_nghost-%COMP%]{display:block;font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize));width:500px}ghs-action[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize))}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}"]})),a})();const CW=["inputDeckData"];function MW(o,a){1&o&&t._UZ(0,"ghs-header",21),2&o&&t.Q6J("standalone",!0)}function OW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"label"),t._UZ(2,"span",5),t.qZA(),t.TgZ(3,"input",22),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw();return t.KtG(s.deckData.character=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deckDataToJson())}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label","editor.deck.character"),t.xp6(1),t.Q6J("ngModel",n.deckData.character)}}function PW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",44),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw();return t.KtG(s.level=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.deckDataToJson())}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("ngModel",n.level)}}const $O=function(o){return{enabled:o}};function yW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",45),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return i.bottomShuffle=!i.bottomShuffle,t.KtG(s.deckDataToJson())}),t._UZ(2,"img",32),t.qZA(),t.BQk()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(1,$O,n.bottomShuffle))}}function bW(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return i.lost=!i.lost,t.KtG(s.deckDataToJson())}),t._UZ(2,"img",47)(3,"img",48),t.qZA(),t.TgZ(4,"a",49),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw();return i.bottomLost=!i.bottomLost,t.KtG(s.deckDataToJson())}),t._UZ(5,"img",47)(6,"img",48),t.qZA(),t.BQk()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(2,$O,n.lost)),t.xp6(3),t.Q6J("ngClass",t.VKq(4,$O,n.bottomLost))}}function xW(o,a){1&o&&t._UZ(0,"div",55)}function wW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",50),t.YNc(1,xW,1,0,"div",51),t.TgZ(2,"span",52),t._UZ(3,"img",53),t.qZA(),t.TgZ(4,"ghs-action",54),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw().$implicit,m=t.oxw();return t.KtG(m.editAbilityAction(l,s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw().$implicit,s=t.oxw();t.xp6(1),t.Q6J("ngIf",s.divider(i.actions,e)),t.xp6(3),t.Q6J("action",n)("relative",!0)}}function kW(o,a){1&o&&t._UZ(0,"div",55)}function TW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",50),t.YNc(1,kW,1,0,"div",51),t.TgZ(2,"span",52),t._UZ(3,"img",53),t.qZA(),t.TgZ(4,"ghs-action",54),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(2).$implicit,m=t.oxw();return t.KtG(m.editAbilityActionBottom(l,s))}),t.qZA()()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(2).$implicit,s=t.oxw();t.xp6(1),t.Q6J("ngIf",s.divider(i.bottomActions,e)),t.xp6(3),t.Q6J("action",n)("relative",!0)}}function ZW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",56)(1,"div",34),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw().$implicit,l=t.oxw();return t.KtG(l.dropAction(s.bottomActions,i))}),t.YNc(2,TW,5,3,"div",35),t.qZA()()}if(2&o){const n=t.oxw().$implicit;t.xp6(2),t.Q6J("ngForOf",n.bottomActions)}}const AW=function(o,a){return{"bottom-actions":o,"character-actions":a}},GT=function(o){return{"bottom-actions":o}};function SW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"div",24)(2,"div",25,26)(4,"input",27),t.NdJ("ngModelChange",function(i){const l=t.CHM(n).$implicit;return t.KtG(l.name=i)})("change",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deckDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.deckDataToJson())}),t.qZA(),t.TgZ(5,"span",28),t.YNc(6,PW,1,1,"input",29),t.qZA(),t.TgZ(7,"input",30),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.changeInitiative(i,l))}),t.qZA(),t.TgZ(8,"a",31),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return s.shuffle=!s.shuffle,t.KtG(l.deckDataToJson())}),t._UZ(9,"img",32),t.qZA(),t.YNc(10,yW,3,3,"ng-container",8),t.YNc(11,bW,7,6,"ng-container",8),t.TgZ(12,"div",33)(13,"div",34),t.NdJ("cdkDropListDropped",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.dropAction(l.actions,i))}),t.YNc(14,wW,5,3,"div",35),t.qZA()(),t.YNc(15,ZW,3,1,"div",36),t.TgZ(16,"input",37),t.NdJ("change",function(i){const l=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.changeCardId(i,l))}),t.qZA(),t.TgZ(17,"a",38),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.removeAbility(s))}),t._UZ(18,"img",39),t.qZA()(),t.TgZ(19,"div",40)(20,"a",41),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addAbilityAction(s))}),t._UZ(21,"img",11)(22,"span",5),t.qZA(),t.TgZ(23,"a",42),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.addAbilityActionBottom(s))}),t._UZ(24,"img",11)(25,"span",5),t.qZA()()(),t._UZ(26,"ghs-ability",43),t.qZA()}if(2&o){const n=a.$implicit,e=t.MAs(3),i=t.oxw();let s;t.xp6(2),t.Udp("font-size",.04*e.offsetWidth+"px")("--ghs-ability-color",i.getCharacter()&&(null==(s=i.getCharacter())?null:s.color)),t.Q6J("ngClass",t.WLB(28,AW,i.deckData.character||n.bottomActions&&n.bottomActions.length>0,i.deckData.character)),t.xp6(2),t.Q6J("ngModel",n.name)("ghs-label",n.name||"editor.deck.abilityName")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ngIf",i.deckData.character||n.bottomActions&&n.bottomActions.length>0),t.xp6(1),t.Q6J("value",n.initiative&&(n.initiative<10?"0":"")+n.initiative),t.xp6(1),t.Q6J("ngClass",t.VKq(31,$O,n.shuffle)),t.xp6(2),t.Q6J("ngIf",!i.deckData.character&&n.bottomActions&&n.bottomActions.length>0),t.xp6(1),t.Q6J("ngIf",i.deckData.character||n.bottomActions&&n.bottomActions.length>0),t.xp6(3),t.Q6J("ngForOf",n.actions),t.xp6(1),t.Q6J("ngIf",i.deckData.character||n.bottomActions&&n.bottomActions.length>0),t.xp6(1),t.Q6J("value",n.cardId&&(n.cardId<100?"0":"")+(n.cardId<10?"0":"")+n.cardId),t.xp6(3),t.Q6J("ngClass",t.VKq(33,GT,i.deckData.character||n.bottomActions&&n.bottomActions.length>0)),t.xp6(3),t.Q6J("ghs-label","editor.action.add"),t.xp6(3),t.Q6J("ghs-label","editor.action.addBottom"),t.xp6(1),t.Q6J("ngClass",t.VKq(35,GT,i.deckData.character||n.bottomActions&&n.bottomActions.length>0))("ability",n)("abilities",i.deckData.abilities)("character",i.getCharacter())("monster",i.monster)("relative",!0)("flipped",!0)("reveal",!0)("statsCalculation",!1)}}function EW(o,a){if(1&o&&(t.TgZ(0,"option",57),t._uU(1),t._UZ(2,"span",5),t._uU(3,") "),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("value",e)("selected",n.edition==i.deckData.edition&&n.name==i.deckData.name),t.xp6(1),t.hij(" ",n.name," ("),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition)}}function DW(o,a){if(1&o&&(t.TgZ(0,"option",14),t._UZ(1,"span",5),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function tl(o){if(o.valueType&&o.valueType==vt.EF.fixed&&(o.valueType=void 0),o.subActions&&0==o.subActions.length?o.subActions=void 0:o.subActions&&o.subActions.forEach(a=>{tl(a)}),o.type==vt.Us.summon)try{let a=JSON.parse(o.value);"string"!=typeof a&&(Object.keys(a).forEach(n=>{(!a[n]||0==a[n])&&(a[n]=void 0)}),a.action&&tl(a.action),a.additionalAction&&tl(a.additionalAction)),o.value=JSON.stringify(a)}catch{}!o.value&&0!=o.value&&(o.value=void 0),o.small||(o.small=void 0)}let Xw=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"inputDeckData",void 0),(0,_.Z)(this,"character",void 0),(0,_.Z)(this,"monster",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"standalone",!0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"deckData",void 0),(0,_.Z)(this,"deckError",void 0),this.dialog=e,this.route=i,this.router=s,this.deckData=new $w.x("",[],""),this.deckData.abilities.push(new KO)}ngOnInit(){var e=this;return(0,J.Z)(function*(){e.standalone&&(yield R.r.init(!1)),e.character&&(e.deckData.character=!0),e.deckDataToJson(),e.inputDeckData.nativeElement.addEventListener("change",i=>{e.deckDataFromJson()}),e.route.queryParams.subscribe({next:i=>{if(i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition)),i.deck){const s=e.decksData().find(l=>l.name==i.deck);s&&(e.deckData=s,e.deckDataToJson())}!e.deckData.edition&&e.edition&&(e.deckData.edition=e.edition)}})})()}updateQueryParams(){!this.deckData.edition&&this.edition&&(this.deckData.edition=this.edition),this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,monster:this.monster&&this.monster.name||void 0,character:this.character&&this.character.name||void 0,deck:this.deckData.name||void 0},queryParamsHandling:"merge"})}decksData(){return d.v.decksData(this.edition).filter(e=>this.character?e.character:!this.monster||!e.character)}deckDataToJson(){let e=JSON.parse(JSON.stringify(this.deckData));Object.keys(e).forEach(i=>{(!e[i]||0==e[i])&&(e[i]=void 0)}),e.abilities&&e.abilities.forEach(i=>{Object.keys(i).forEach(s=>{(!i[s]&&0!=i[s]||"boolean"==typeof i[s]&&0==i[s])&&(i[s]=void 0),i.revealed=void 0,"level"==s&&0==i[s]&&(i[s]=void 0),i.actions&&0==i.actions.length?i.actions=void 0:i.actions&&i.actions.forEach(l=>{tl(l)}),i.bottomActions&&0==i.bottomActions.length?i.bottomActions=void 0:i.bottomActions&&i.bottomActions.forEach(l=>{tl(l)})})}),this.inputDeckData.nativeElement.value=JSON.stringify(e,null,2)}deckDataFromJson(){if(this.deckError="",this.inputDeckData.nativeElement.value)try{return void(this.deckData=JSON.parse(this.inputDeckData.nativeElement.value))}catch(e){this.deckData=new $w.x("",[],""),this.deckData.abilities.push(new KO),this.deckError=e}}valueChange(e){return e&&!isNaN(+e)?+e:e}changeInitiative(e,i){i.initiative=e.target.value?+e.target.value:0,e.target.value=(i.initiative<10?"0":"")+i.initiative,this.deckDataToJson()}changeCardId(e,i){e.target.value?(i.cardId=+e.target.value,e.target.value=(i.cardId<100?"0":"")+(i.cardId<10?"0":"")+i.cardId):i.cardId=void 0,this.deckDataToJson()}addAbility(){this.deckData.abilities.push(new KO),this.deckDataToJson()}removeAbility(e){this.deckData.abilities.splice(this.deckData.abilities.indexOf(e),1),this.deckDataToJson()}addAbilityAction(e){let i=new vt.aU(vt.Us.attack);e.actions||(e.actions=[]),e.actions.push(i),this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.actions.splice(e.actions.indexOf(i),1),this.deckDataToJson()}})}editAbilityAction(e,i){this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.actions.splice(e.actions.indexOf(i),1),this.deckDataToJson()}})}dropAction(e,i){Fn(e,i.previousIndex,i.currentIndex),d.v.uiChange.emit()}addAbilityActionBottom(e){let i=new vt.aU(vt.Us.move);e.bottomActions||(e.bottomActions=[]),e.bottomActions.push(i),this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.bottomActions.splice(e.bottomActions.indexOf(i),1),this.deckDataToJson()}})}editAbilityActionBottom(e,i){this.dialog.open(Kr,{panelClass:"dialog",data:{action:i}}).closed.subscribe({next:l=>{0==l&&e.bottomActions.splice(e.actions.indexOf(i),1),this.deckDataToJson()}})}divider(e,i){if(i<1)return!1;const s=e[i];return!(!s||(s.type==vt.Us.element||s.type==vt.Us.elementHalf)&&s.valueType!=vt.EF.minus||s.type==vt.Us.card||e[i-1].type==vt.Us.box||s.type==vt.Us.concatenation&&s.subActions.every(l=>l.type==vt.Us.card||l.type==vt.Us.element||l.type==vt.Us.elementHalf))}getCharacter(){if(this.character)return this.character;if(this.deckData.character){const e=new l_.x3;e.iconUrl="./assets/images/warning.svg";for(let i=0;i<9;i++)e.stats.push(new YO.a(i,i));return new oe.z(e,1)}}loadDeckData(e){const i=+e.target.value;-1==i?(this.deckData=new $w.x("",[],""),this.deckData.abilities.push(new KO),this.character&&(this.deckData.character=!0)):this.deckData=this.decksData()[i],this.deckDataToJson(),this.updateQueryParams()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-deck-editor"]],viewQuery:function(e,i){if(1&e&&t.Gf(CW,7),2&e){let s;t.iGM(s=t.CRH())&&(i.inputDeckData=s.first)}},inputs:{character:"character",monster:"monster",edition:"edition",standalone:"standalone"},decls:38,vars:23,consts:[[1,"container"],[3,"standalone",4,"ngIf"],[1,"columns"],[1,"input"],[1,"deck"],[3,"ghs-label"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[4,"ngIf"],["class","abilities-container",4,"ngFor","ngForOf"],[1,"button",3,"click"],["src","./assets/images/plus.svg",1,"ghs-icon"],[1,"output"],[3,"change"],[3,"value"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["inputDeckData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"standalone"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"abilities-container"],[1,"ability-input"],[1,"ability",3,"ngClass"],["card",""],[1,"name",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[1,"level"],["class","text",3,"ngModel","ngModelChange","change",4,"ngIf"],["min","0","max","100","type","number",1,"initiative",3,"value","change"],[1,"shuffle",3,"ngClass","click"],["src","./assets/images/shuffle.svg"],[1,"actions-container"],["cdkDropList","",1,"actions",3,"cdkDropListDropped"],["class","action-container","cdkDrag","",4,"ngFor","ngForOf"],["class","actions-container bottom",4,"ngIf"],["type","number",1,"card-id",3,"value","change"],[1,"remove",3,"click"],["src","./assets/images/minus.svg",1,"ghs-icon"],[1,"buttons",3,"ngClass"],[1,"button","add",3,"click"],[1,"button","add","bottom",3,"click"],[3,"ngClass","ability","abilities","character","monster","relative","flipped","reveal","statsCalculation"],[1,"text",3,"ngModel","ngModelChange","change"],[1,"bottom","shuffle",3,"ngClass","click"],[1,"lost",3,"ngClass","click"],["src","./assets/images/action/card/lost.svg"],["src","./assets/images/action/card/overlay/lost.svg",1,"overlay"],[1,"lost","bottom",3,"ngClass","click"],["cdkDrag","",1,"action-container"],["class","divider",4,"ngIf"],["cdkDragHandle","",1,"handle"],["src","./assets/images/menu.svg",1,"ghs-icon"],[3,"action","relative","click"],[1,"divider"],[1,"actions-container","bottom"],[3,"value","selected"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t.YNc(1,MW,1,1,"ghs-header",1),t.TgZ(2,"div",2)(3,"div",3)(4,"div",4)(5,"h2"),t._UZ(6,"span",5),t.qZA(),t.TgZ(7,"div",6)(8,"label"),t._UZ(9,"span",5),t.qZA(),t.TgZ(10,"input",7),t.NdJ("ngModelChange",function(l){return i.deckData.name=l})("change",function(){return i.deckDataToJson()})("keyup",function(){return i.deckDataToJson()}),t.qZA(),t.TgZ(11,"label"),t._UZ(12,"span",5),t.qZA(),t.TgZ(13,"input",7),t.NdJ("ngModelChange",function(l){return i.deckData.edition=l})("change",function(){return i.deckDataToJson()})("keyup",function(){return i.deckDataToJson()}),t.qZA(),t.YNc(14,OW,4,2,"ng-container",8),t.qZA(),t.YNc(15,SW,27,37,"div",9),t.TgZ(16,"a",10),t.NdJ("click",function(){return i.addAbility()}),t._UZ(17,"img",11)(18,"span",5),t.qZA()()(),t.TgZ(19,"div",12)(20,"h2"),t._UZ(21,"span",5),t.TgZ(22,"select",13),t.NdJ("change",function(l){return i.loadDeckData(l)}),t.TgZ(23,"option",14),t._uU(24,"<"),t._UZ(25,"span",5),t._uU(26,">"),t.qZA(),t.YNc(27,EW,4,4,"option",15),t.qZA(),t.TgZ(28,"select",16),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.updateQueryParams()}),t._UZ(29,"option"),t.YNc(30,DW,2,2,"option",17),t.qZA()(),t.TgZ(31,"div"),t._uU(32),t.qZA(),t._UZ(33,"textarea",null,18),t.TgZ(35,"a",19),t._UZ(36,"img",20)(37,"span",5),t.qZA()()()()),2&e){const s=t.MAs(34);t.xp6(1),t.Q6J("ngIf",i.standalone),t.xp6(5),t.Q6J("ghs-label","editor.deck"),t.xp6(3),t.Q6J("ghs-label","editor.deck.name"),t.xp6(1),t.Q6J("ngModel",i.deckData.name)("ghs-label","editor.deck.name")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.deck.edition"),t.xp6(1),t.Q6J("ngModel",i.deckData.edition)("ghs-label","editor.deck.edition")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",!i.character&&!i.monster),t.xp6(1),t.Q6J("ngForOf",i.deckData.abilities),t.xp6(3),t.Q6J("ghs-label","editor.deck.addAbility"),t.xp6(3),t.Q6J("ghs-label","editor.deck.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.deck.new"),t.xp6(2),t.Q6J("ngForOf",i.decksData()),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.hij(" ",i.deckError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.encodeURIComponent(s.value),t.LSH)("download",i.deckData.name+".json"),t.xp6(2),t.Q6J("ghs-label","editor.deck.json.download")}},dependencies:[x.mk,x.sg,x.O5,wo,ko,Ho,va,Ca,yi,Si,Bs,Ms,Zr,Yr,a_,Gr,ie],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.deck[_ngcontent-%COMP%]{display:flex;flex-direction:column}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-around;align-items:flex-start;margin-top:calc(var(--ghs-unit) * 3);min-width:calc(var(--ghs-unit) * 82)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] ghs-ability[_ngcontent-%COMP%]{display:block;width:calc(var(--ghs-unit) * 40);min-height:calc(var(--ghs-unit) * 25.5)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] ghs-ability.bottom-actions[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 54)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%]{position:relative}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{position:relative;margin-top:calc(var(--ghs-unit) * -2);display:flex;justify-content:space-evenly}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2);color:var(--ghs-color-black);background-color:var(--ghs-color-gray);border-color:var(--ghs-color-darkgray);z-index:2}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:none}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]:hover{color:var(--ghs-color-darkgray)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add.bottom[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 1.5);padding:calc(var(--ghs-unit) * .1);margin:calc(var(--ghs-unit) * 2) auto;opacity:.7}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .add.bottom[_ngcontent-%COMP%]:hover{opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons.bottom-actions[_ngcontent-%COMP%]{position:absolute;left:-3%;top:49%;z-index:2;flex-direction:column;align-items:flex-start}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons.bottom-actions[_ngcontent-%COMP%] .add[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .buttons.bottom-actions[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2);padding:calc(var(--ghs-unit) * .2);margin:calc(var(--ghs-unit) * .5) 0;opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;text-align:center;background-position:center;background-size:100% auto;background-repeat:no-repeat;border-radius:3.5%;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 25.5);background-image:url(monster-ability-front.6630d6e4791f6c50.png);z-index:1;--ghs-ability-color: var(--ghs-color-red)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * .5);right:calc(var(--ghs-unit) * 1);width:calc(var(--ghs-unit) * 3)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow);width:100%;height:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);position:absolute;font-size:1.7em;top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 26);color:var(--ghs-color-white);background-color:transparent;border:1px solid var(--ghs-color-gray);z-index:2;text-align:center}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);position:absolute;font-size:2.4em;top:calc(var(--ghs-unit) * 4.5);left:calc(var(--ghs-unit) * 2);width:calc(var(--ghs-unit) * 6);color:var(--ghs-color-white);background-color:transparent;border:none;z-index:3}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]:hover{border:none}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;font-family:var(--ghs-font-normal);font-size:1em;filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));bottom:calc(var(--ghs-unit) * 1);left:calc(var(--ghs-unit) * 2);width:calc(var(--ghs-unit) * 6);color:var(--ghs-color-white);background-color:transparent;border:none;z-index:3}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]:hover{border:none}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%]{position:absolute;bottom:calc(var(--ghs-unit) * .5);right:calc(var(--ghs-unit) * .5);width:calc(var(--ghs-unit) * 3);height:calc(var(--ghs-unit) * 3);z-index:3;cursor:pointer}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;width:calc(var(--ghs-unit) * 3);height:calc(var(--ghs-unit) * 3);margin:0}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:before{width:calc(var(--ghs-unit) * 3);height:calc(var(--ghs-unit) * 3)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow);width:100%;height:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .shuffle.enabled[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 4.5);height:calc(var(--ghs-unit) * 21);width:100%;z-index:1;overflow:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:100%;font-size:calc(1.7em * var(--ghs-fontsize))}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{width:100%;display:inline-flex;cursor:pointer}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:15%;border-top:.11em var(--ghs-color-white) dotted;margin:.2em}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{position:absolute;left:-3%;top:0;z-index:2;cursor:grab;opacity:.7}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]:hover{opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%]{background-image:url(monster-ability-front-bottom.43963667f697d866.png);background-position:top;background-attachment:local;height:calc(var(--ghs-unit) * 54)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions.character-actions[_ngcontent-%COMP%]{background-color:var(--ghs-ability-color);background-image:url(character-ability-front.78d3032ed2ab477f.png),url(character-ability-front-blend.7ab7f92ad3df07cf.png);background-blend-mode:screen,luminosity;overflow-x:unset;overflow-y:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{top:4.5%;left:calc(var(--ghs-unit) * 7)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .initiative[_ngcontent-%COMP%]{top:49%;left:52.5%;transform:translate(-50%);width:calc(var(--ghs-unit) * 6)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{left:calc(var(--ghs-unit) * 23);bottom:calc(var(--ghs-unit) * 3.5)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%]{top:17%;left:10.6%;width:78.3%;height:30%;min-height:30%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .actions-container.bottom[_ngcontent-%COMP%]{top:59%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]{position:absolute;bottom:50%;right:15%;height:6%;z-index:3;filter:grayscale(1);opacity:.5}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%]:hover{filter:grayscale(0)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.enabled[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.enabled[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.enabled[_ngcontent-%COMP%]{filter:grayscale(0);opacity:1}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.enabled[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.enabled[_ngcontent-%COMP%]:hover, .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.enabled[_ngcontent-%COMP%]:hover{filter:grayscale(1);opacity:.5}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;top:0;left:0;height:100%;width:auto}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(1){filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2), .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:nth-child(2){position:absolute}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.bottom[_ngcontent-%COMP%]{right:19%;bottom:9%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.shuffle[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.shuffle[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.shuffle[_ngcontent-%COMP%]{right:27%;height:5.5%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .lost.shuffle.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .shuffle.shuffle.bottom[_ngcontent-%COMP%], .deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .bottom-shuffle.shuffle.bottom[_ngcontent-%COMP%]{right:32%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{position:absolute;top:11%;left:45%;width:10%;height:6%;font-size:1.2em;font-family:ghs-title;display:flex;justify-content:center;align-items:center;background-color:var(--ghs-ability-color);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-image:url(level.38e1f58a07dc5898.svg);-webkit-mask-image:url(level.38e1f58a07dc5898.svg);mask-size:115% 170%;-webkit-mask-size:115% 170%;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:60% 66%;-webkit-mask-position:60% 66%}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{background:inherit;-webkit-background-clip:text;background-clip:text;color:transparent;filter:invert(1) grayscale(1) contrast(100);font-family:var(--ghs-font-title);text-align:center;font-size:1em}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .level[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:hover{border:none!important}.deck[_ngcontent-%COMP%] .abilities-container[_ngcontent-%COMP%] .ability-input[_ngcontent-%COMP%] .ability.bottom-actions[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{left:58%}"]})),a})();const IW=["inputCharacterData"];function NW(o,a){if(1&o&&(t.TgZ(0,"option",25),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.Q6J("value",n)("selected",e.characterData.characterClass==n),t.xp6(1),t.Q6J("ghs-label","character.class."+n)}}function JW(o,a){if(1&o&&(t.TgZ(0,"option",19),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n-1),t.xp6(1),t.Q6J("ghs-label","editor.character.data.hp."+(n-1))}}function UW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",28),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit;return t.KtG(s.health=i)}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("ngModel",n.health)}}function LW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"input",29),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw().$implicit;return t.KtG(s.health=i)}),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.Q6J("ngModel",n.health)}}function QW(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span"),t._uU(2),t.qZA(),t.YNc(3,UW,1,1,"input",26),t.YNc(4,LW,1,1,"input",27),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(2),t.Oqu(n.level),t.xp6(1),t.Q6J("ngIf",-1!=e.hpIndex),t.xp6(1),t.Q6J("ngIf",-1==e.hpIndex)}}function RW(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw().$implicit;t.Q6J("ghs-label","data.character."+n.name)}}function FW(o,a){if(1&o&&(t.TgZ(0,"option",25),t.YNc(1,RW,1,1,"span",30),t._uU(2),t._UZ(3,"span",3),t._uU(4),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("value",e)("selected",n.edition==i.characterData.edition&&n.name==i.characterData.name),t.xp6(1),t.Q6J("ngIf",i.isSpoiled(n)),t.xp6(1),t.hij(" ",n.name," ("),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(") [",n.name,"] ")}}function qW(o,a){if(1&o&&(t.TgZ(0,"option",19),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function HW(o,a){if(1&o&&t._UZ(0,"ghs-deck-editor",31),2&o){const n=t.oxw();t.Q6J("character",n.getCharacter())("standalone",!1)("edition",n.edition)}}const jW=function(){return[]};let BW=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"inputCharacterData",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"isSpoiled",he.NB),(0,_.Z)(this,"characterData",void 0),(0,_.Z)(this,"characterError",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"init",!1),(0,_.Z)(this,"hpIndex",0),(0,_.Z)(this,"CharacterClasses",Object.values(l_.NU)),(0,_.Z)(this,"hpValues",[[6,7,8,9,10,11,12,13,14],[8,9,11,12,14,15,17,18,20],[10,12,14,16,18,20,22,24,26]]),this.route=e,this.router=i,this.characterData=new l_.x3,this.characterData.iconUrl="./assets/images/warning.svg";for(let s=0;s<9;s++)this.characterData.stats.push(new YO.a(s+1,s+6))}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),e.characterDataToJson(),e.inputCharacterData.nativeElement.addEventListener("change",i=>{e.characterDataFromJson()}),e.route.queryParams.subscribe({next:i=>{if(i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition)),i.character){const s=d.v.charactersData(e.edition).find(l=>l.name==i.character);s&&(e.characterData=s,e.characterDataToJson())}!e.characterData.edition&&e.edition&&(e.characterData.edition=e.edition)}}),e.init=!0})()}getCharacter(){return new oe.z(this.characterData,1)}changeHpIndex(){(this.hpIndex<-1||this.hpIndex>2)&&(this.hpIndex=-1),-1!=this.hpIndex&&this.characterData.stats.forEach(e=>{e.health=this.hpValues[this.hpIndex][e.level-1]}),this.characterDataToJson()}characterDataToJson(){this.characterData.stats.sort((i,s)=>i.level-s.level);let e=JSON.parse(JSON.stringify(this.characterData));this.inputCharacterData.nativeElement.value=JSON.stringify(e,null,2)}characterDataFromJson(){if(this.characterError="",this.inputCharacterData.nativeElement.value)try{return void(this.characterData=JSON.parse(this.inputCharacterData.nativeElement.value))}catch(e){this.characterData=new l_.x3,this.characterData.iconUrl="./assets/images/warning.svg";for(let i=0;i<9;i++)this.characterData.stats.push(new YO.a(i,i));this.characterError=e}}loadCharacterData(e){const i=+e.target.value;if(-1!=i)this.characterData=d.v.charactersData(this.edition)[i];else{this.characterData=new l_.x3,this.characterData.iconUrl="./assets/images/warning.svg";for(let s=0;s<9;s++)this.characterData.stats.push(new YO.a(s+1,s+6))}this.hpIndex=-1,this.hpValues.forEach((s,l)=>{s.every((m,O)=>this.characterData.stats.find(k=>k.level==O+1&&k.health==m))&&(this.hpIndex=l)}),this.characterDataToJson(),this.updateQueryParams()}updateQueryParams(){!this.characterData.edition&&this.edition&&(this.characterData.edition=this.edition),this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,character:this.characterData&&this.characterData.name||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-editor"]],viewQuery:function(e,i){if(1&e&&t.Gf(IW,7),2&e){let s;t.iGM(s=t.CRH())&&(i.inputCharacterData=s.first)}},decls:61,vars:44,consts:[[1,"container"],[3,"standalone"],[1,"character-editor"],[3,"ghs-label"],[1,"columns"],[1,"input"],[1,"character-data"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["type","color",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["type","checkbox",3,"ngModel","ngModelChange","change"],[3,"ngModel","ngModelChange","change"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"hp-container"],[3,"value",4,"ngFor","ngForOf"],[1,"hp-grid"],[4,"ngFor","ngForOf"],[1,"output"],[3,"change"],[3,"value"],[3,"ngModel","ngModelChange"],["inputCharacterData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"character","standalone","edition",4,"ngIf"],[3,"value","selected"],["disabled","",3,"ngModel","ngModelChange",4,"ngIf"],["type","number",3,"ngModel","ngModelChange",4,"ngIf"],["disabled","",3,"ngModel","ngModelChange"],["type","number",3,"ngModel","ngModelChange"],[3,"ghs-label",4,"ngIf"],[3,"character","standalone","edition"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"h1"),t._UZ(4,"span",3),t._uU(5," ("),t._UZ(6,"span",3),t._uU(7,")"),t.qZA(),t.TgZ(8,"div",4)(9,"div",5)(10,"div",6)(11,"h2"),t._UZ(12,"span",3),t.qZA(),t.TgZ(13,"div",7)(14,"label"),t._UZ(15,"span",3),t.qZA(),t.TgZ(16,"input",8),t.NdJ("ngModelChange",function(l){return i.characterData.name=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(17,"label"),t._UZ(18,"span",3),t.qZA(),t.TgZ(19,"input",8),t.NdJ("ngModelChange",function(l){return i.characterData.edition=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(20,"label"),t._UZ(21,"span",3),t.qZA(),t.TgZ(22,"input",9),t.NdJ("ngModelChange",function(l){return i.characterData.color=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(23,"label"),t._UZ(24,"span",3),t.qZA(),t.TgZ(25,"input",10),t.NdJ("ngModelChange",function(l){return i.characterData.spoiler=l})("change",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(26,"label"),t._UZ(27,"span",3),t.qZA(),t.TgZ(28,"input",8),t.NdJ("ngModelChange",function(l){return i.characterData.deck=l})("change",function(){return i.characterDataToJson()})("keyup",function(){return i.characterDataToJson()}),t.qZA(),t.TgZ(29,"label"),t._UZ(30,"span",3),t.qZA(),t.TgZ(31,"select",11),t.NdJ("ngModelChange",function(l){return i.characterData.characterClass=l})("change",function(){return i.characterDataToJson()}),t.YNc(32,NW,2,3,"option",12),t.qZA(),t.TgZ(33,"label"),t._UZ(34,"span",3),t.qZA(),t.TgZ(35,"div",13)(36,"select",11),t.NdJ("ngModelChange",function(l){return i.hpIndex=l})("change",function(){return i.changeHpIndex()}),t.YNc(37,JW,2,2,"option",14),t.ALo(38,"ghsRange"),t.qZA(),t.TgZ(39,"div",15),t.YNc(40,QW,5,3,"ng-container",16),t.qZA()()()()(),t.TgZ(41,"div",17)(42,"h2"),t._UZ(43,"span",3),t.TgZ(44,"select",18),t.NdJ("change",function(l){return i.loadCharacterData(l)}),t.TgZ(45,"option",19),t._uU(46,"<"),t._UZ(47,"span",3),t._uU(48,">"),t.qZA(),t.YNc(49,FW,5,6,"option",12),t.qZA(),t.TgZ(50,"select",20),t.NdJ("ngModelChange",function(l){return i.edition=l}),t._UZ(51,"option"),t.YNc(52,qW,2,2,"option",14),t.qZA()(),t.TgZ(53,"div"),t._uU(54),t.qZA(),t._UZ(55,"textarea",null,21),t.TgZ(57,"a",22),t._UZ(58,"img",23)(59,"span",3),t.qZA()()(),t.YNc(60,HW,1,3,"ghs-deck-editor",24),t.qZA()()),2&e){const s=t.MAs(56);t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","editor.character"),t.xp6(2),t.Q6J("ghs-label","wip"),t.xp6(6),t.Q6J("ghs-label","editor.character.data"),t.xp6(3),t.Q6J("ghs-label","editor.character.data.name"),t.xp6(1),t.Q6J("ngModel",i.characterData.name)("ghs-label","editor.character.data.name")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","edition"),t.xp6(1),t.Q6J("ngModel",i.characterData.edition)("ghs-label","edition")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.color"),t.xp6(1),t.Q6J("ngModel",i.characterData.color)("ghs-label","editor.character.data.color")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.spoiler"),t.xp6(1),t.Q6J("ngModel",i.characterData.spoiler),t.xp6(2),t.Q6J("ghs-label","editor.character.data.deck"),t.xp6(1),t.Q6J("ngModel",i.characterData.deck)("ghs-label","editor.character.data.deck")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.class"),t.xp6(1),t.Q6J("ngModel",i.characterData.characterClass),t.xp6(1),t.Q6J("ngForOf",i.CharacterClasses),t.xp6(2),t.Q6J("ghs-label","editor.character.data.hp"),t.xp6(2),t.Q6J("ngModel",i.hpIndex),t.xp6(1),t.Q6J("ngForOf",t.xi3(38,40,t.DdM(43,jW),4)),t.xp6(3),t.Q6J("ngForOf",i.characterData.stats),t.xp6(3),t.Q6J("ghs-label","editor.character.data.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.character.new"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.charactersData(i.edition)),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.hij(" ",i.characterError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.encodeURIComponent(s.value),t.LSH)("download",i.characterData.name+".json"),t.xp6(2),t.Q6J("ghs-label","editor.character.data.json.download"),t.xp6(1),t.Q6J("ngIf",i.init)}},dependencies:[x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Si,Yr,ie,Xw,Ii],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.character-editor[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 2)}.character-data[_ngcontent-%COMP%]{display:flex;flex-direction:column}.character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%]{max-width:600px;display:grid;grid-auto-flow:column;grid-template-rows:1fr 1fr}.character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center}.character-data[_ngcontent-%COMP%] .hp-grid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:transparent;border:1px solid var(--ghs-color-red);color:var(--ghs-color-red);min-width:40px;font-size:1em}"]})),a})();const zW=["inputEditionData"];function GW(o,a){if(1&o&&(t.TgZ(0,"option",21),t._UZ(1,"span",1),t._uU(2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n.edition),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(" [",n.edition,"] ")}}const VW=function(){return["X"]};function YW(o,a){if(1&o&&(t.TgZ(0,"option",21),t._UZ(1,"span",25),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.condition."+n)("ghs-label-args",t.DdM(3,VW))}}function KW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeCharacter(s))}),t._UZ(1,"span",1),t._uU(2),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-label","editor.edition.character.remove")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","data.character."+n.name),t.xp6(1),t.hij(" [",n.name,"]")}}function $W(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeMonster(s))}),t._UZ(1,"span",1),t._uU(2),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-label","editor.edition.monster.remove")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.hij(" [",n.name,"]")}}function WW(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw();return t.KtG(l.removeDeck(s))}),t._UZ(1,"span",1),t._uU(2),t.qZA()}if(2&o){const n=a.$implicit;t.Q6J("ghs-label","editor.edition.decks.remove")("ghs-label-attribute","title"),t.xp6(1),t.Q6J("ghs-label","data.deck."+n.name),t.xp6(1),t.hij(" [",n.name,"]")}}function XW(o,a){if(1&o&&(t.TgZ(0,"option",21),t._UZ(1,"span",1),t._uU(2),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",a.index),t.xp6(1),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(" [",n.edition,"] ")}}let tX=(()=>{var o;class a{constructor(){(0,_.Z)(this,"inputEditionData",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"Conditions",Object.values(re.fT).filter(e=>e!=re.fT.bless&&e!=re.fT.curse)),(0,_.Z)(this,"editionData",void 0),(0,_.Z)(this,"editionError",void 0),this.editionData=new Wu._S("",[],[],[],[],[],[])}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),e.editionDataToJson()})()}editionDataToJson(){let e=JSON.parse(JSON.stringify(this.editionData));Object.keys(e).forEach(i=>{e[i]||(e[i]=void 0)}),this.inputEditionData.nativeElement.value=JSON.stringify(e,null,2)}jsonDownload(){let e=JSON.parse(JSON.stringify(this.editionData));return Object.keys(e).forEach(i=>{e[i]||(e[i]=void 0)}),this.encodeURIComponent(JSON.stringify(e))}loadEditionData(e){const i=+e.target.value;this.editionData=-1!=i?d.v.editionData[i]:new Wu._S("",[],[],[],[],[],[]),this.editionDataToJson()}toggleAllConditions(e){this.editionData.conditions.length==this.Conditions.length?(this.editionData.conditions=[],e.blur()):(this.editionData.conditions=JSON.parse(JSON.stringify(this.Conditions)),e.focus()),this.editionDataToJson()}addCharacterJson(e){if(e.target.files)for(let i=0;i{try{let l=JSON.parse(s.result);return void(l&&(this.editionData.characters.find(m=>l.name==m.name&&l.edition==m.edition)||(this.editionData.characters.push(new l_.x3(l)),this.editionDataToJson())))}catch(l){console.error(l)}},s.readAsText(e.target.files[i])}e.target.value=""}removeCharacter(e){this.editionData.characters.splice(e,1),this.editionDataToJson()}addMonsterJson(e){if(e.target.files)for(let i=0;i{try{const l=JSON.parse(s.result);return void(l&&(this.editionData.monsters.find(m=>l.name==m.name&&l.edition==m.edition)||(this.editionData.monsters.push(new ot.A(l)),this.editionDataToJson())))}catch(l){console.error(l)}},s.readAsText(e.target.files[i])}e.target.value=""}removeMonster(e){this.editionData.monsters.splice(e,1),this.editionDataToJson()}addDeckJson(e){if(e.target.files)for(let i=0;i{try{const l=JSON.parse(s.result);return void(l&&(this.editionData.decks.find(m=>l.name==m.name&&l.edition==m.edition)||(this.editionData.decks.push(l),this.editionDataToJson())))}catch(l){console.error(l)}},s.readAsText(e.target.files[i])}e.target.value=""}removeDeck(e){this.editionData.decks.splice(e,1),this.editionDataToJson()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-edition-editor"]],viewQuery:function(e,i){if(1&e&&t.Gf(zW,7),2&e){let s;t.iGM(s=t.CRH())&&(i.inputEditionData=s.first)}},decls:63,vars:30,consts:[[1,"back",3,"routerLink"],[3,"ghs-label"],[1,"edition-editor"],[1,"columns"],[1,"input"],[1,"edition-base"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["multiple","",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[1,"conditions"],[3,"click"],["conditionSelect",""],[1,"files"],[1,"file-list","characters"],["class","file",3,"ghs-label","ghs-label-attribute","click",4,"ngFor","ngForOf"],["type","file","multiple","","accept","application/json",3,"change"],[1,"file-list","monsters"],[1,"file-list","decks"],[1,"output"],[3,"change"],[3,"value"],["inputEditionData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"ghs-label","ghs-label-args"],[1,"file",3,"ghs-label","ghs-label-attribute","click"]],template:function(e,i){if(1&e){const s=t.EpF();t.TgZ(0,"a",0),t._UZ(1,"span",1),t.qZA(),t.TgZ(2,"div",2)(3,"h1"),t._UZ(4,"span",1),t._uU(5," ("),t._UZ(6,"span",1),t._uU(7,")"),t.qZA(),t.TgZ(8,"div",3)(9,"div",4)(10,"div",5)(11,"h2"),t._UZ(12,"span",1),t.qZA(),t.TgZ(13,"div",6)(14,"label"),t._UZ(15,"span",1),t.qZA(),t.TgZ(16,"input",7),t.NdJ("ngModelChange",function(m){return i.editionData.edition=m})("change",function(){return i.editionDataToJson()})("keyup",function(){return i.editionDataToJson()}),t.qZA(),t.TgZ(17,"label"),t._UZ(18,"span",1),t.qZA(),t.TgZ(19,"select",8),t.NdJ("ngModelChange",function(m){return i.editionData.extensions=m})("change",function(){return i.editionDataToJson()}),t.YNc(20,GW,3,3,"option",9),t.qZA(),t.TgZ(21,"label"),t._UZ(22,"span",1),t.qZA(),t.TgZ(23,"div",10)(24,"a",11),t.NdJ("click",function(){t.CHM(s);const m=t.MAs(27);return t.KtG(i.toggleAllConditions(m))}),t._UZ(25,"span",1),t.qZA(),t.TgZ(26,"select",8,12),t.NdJ("ngModelChange",function(m){return i.editionData.conditions=m})("change",function(){return i.editionDataToJson()}),t.YNc(28,YW,2,4,"option",9),t.qZA()()()(),t.TgZ(29,"div",13)(30,"h2"),t._UZ(31,"span",1),t.qZA(),t.TgZ(32,"div",14),t.YNc(33,KW,3,4,"span",15),t.qZA(),t.TgZ(34,"input",16),t.NdJ("change",function(m){return i.addCharacterJson(m)}),t.qZA()(),t.TgZ(35,"div",13)(36,"h2"),t._UZ(37,"span",1),t.qZA(),t.TgZ(38,"div",17),t.YNc(39,$W,3,4,"span",15),t.qZA(),t.TgZ(40,"input",16),t.NdJ("change",function(m){return i.addMonsterJson(m)}),t.qZA()(),t.TgZ(41,"div",13)(42,"h2"),t._UZ(43,"span",1),t.qZA(),t.TgZ(44,"div",18),t.YNc(45,WW,3,4,"span",15),t.qZA(),t.TgZ(46,"input",16),t.NdJ("change",function(m){return i.addDeckJson(m)}),t.qZA()()(),t.TgZ(47,"div",19)(48,"h2"),t._UZ(49,"span",1),t.TgZ(50,"select",20),t.NdJ("change",function(m){return i.loadEditionData(m)}),t.TgZ(51,"option",21),t._uU(52,"<"),t._UZ(53,"span",1),t._uU(54,">"),t.qZA(),t.YNc(55,XW,3,3,"option",9),t.qZA()(),t.TgZ(56,"div"),t._uU(57),t.qZA(),t._UZ(58,"textarea",null,22),t.TgZ(60,"a",23),t._UZ(61,"img",24)(62,"span",1),t.qZA()()()()}2&e&&(t.Q6J("routerLink","/"),t.xp6(1),t.Q6J("ghs-label","tools.backToGhs"),t.xp6(3),t.Q6J("ghs-label","editor.edition"),t.xp6(2),t.Q6J("ghs-label","wip"),t.xp6(6),t.Q6J("ghs-label","editor.edition.base"),t.xp6(3),t.Q6J("ghs-label","editor.edition.edition"),t.xp6(1),t.Q6J("ngModel",i.editionData.edition)("ghs-label","editor.edition.edition")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.edition.extensions"),t.xp6(1),t.Q6J("ngModel",i.editionData.extensions),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editionData),t.xp6(2),t.Q6J("ghs-label","editor.edition.conditions"),t.xp6(3),t.Q6J("ghs-label",i.editionData.conditions.length!=i.Conditions.length?"editor.edition.conditions.allSelected":"editor.edition.conditions.allHint"),t.xp6(1),t.Q6J("ngModel",i.editionData.conditions),t.xp6(2),t.Q6J("ngForOf",i.Conditions),t.xp6(3),t.Q6J("ghs-label","editor.edition.character"),t.xp6(2),t.Q6J("ngForOf",i.editionData.characters),t.xp6(4),t.Q6J("ghs-label","editor.edition.monster"),t.xp6(2),t.Q6J("ngForOf",i.editionData.monsters),t.xp6(4),t.Q6J("ghs-label","editor.edition.decks"),t.xp6(2),t.Q6J("ngForOf",i.editionData.decks),t.xp6(4),t.Q6J("ghs-label","editor.edition.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.edition.new"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editionData),t.xp6(2),t.hij(" ",i.editionError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.jsonDownload(),t.LSH)("download",i.editionData.edition+".json"),t.xp6(2),t.Q6J("ghs-label","editor.edition.json.download"))},dependencies:[x.sg,Vc,wo,ko,Ho,Sl,yi,Si,ie],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".files[_ngcontent-%COMP%] .file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.files[_ngcontent-%COMP%] .file-list[_ngcontent-%COMP%] .file[_ngcontent-%COMP%]{font-size:1.5em;cursor:pointer}.files[_ngcontent-%COMP%] .file-list[_ngcontent-%COMP%] .file[_ngcontent-%COMP%]:hover{text-decoration:line-through}.conditions[_ngcontent-%COMP%]{display:flex;flex-direction:column}.conditions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:.7em}"]})),a})();const eX=["inputMonsterData"],nX=["monsterStats"],iX=["deckEditor"],VT=function(o){return{current:o}};function oX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",14),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return l.level=s,t.KtG(l.updateQueryParams())}),t._uU(1),t.qZA()}if(2&o){const n=a.$implicit,e=t.oxw();t.Q6J("ngClass",t.VKq(2,VT,e.level==n)),t.xp6(1),t.hij(" ",n,"")}}function aX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",36)(1,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).health=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(2,"input",38),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).health=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(3,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).movement=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(4,"input",40),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).movement=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(5,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).attack=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(6,"input",38),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).attack=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(7,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.normal,s).range=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(8,"input",40),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.elite,s).range=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA()()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).health),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).health),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).movement),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).movement),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).attack),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).attack),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.normal,n).range),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.elite,n).range)}}function sX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",41)(1,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).health=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(2,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).movement=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(3,"input",37),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).attack=l.valueChange(i))})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.TgZ(4,"input",39),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.statsForType(l.MonsterType.boss,s).range=i)})("change",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.monsterDataToJson())}),t.qZA()()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).health),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).movement),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).attack),t.xp6(1),t.Q6J("ngModel",e.statsForType(e.MonsterType.boss,n).range)}}function rX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"span",50),t._UZ(2,"img",51),t.qZA(),t.TgZ(3,"ghs-action",52),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.editMonsterAction(m.MonsterType.normal,s,l))}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(3),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("right",!0)("hexSize",.5)("relative",!0)}}function cX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"ghs-action",53),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.editMonsterAction(m.MonsterType.elite,s,l))}),t.qZA(),t.TgZ(2,"span",50),t._UZ(3,"img",51),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(1),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("hexSize",.5)("relative",!0)}}function lX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",42),t._UZ(2,"div",43),t.TgZ(3,"div",44),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.dropMonsterAction(l.MonsterType.normal,s,i))}),t.YNc(4,rX,4,6,"div",45),t.TgZ(5,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addMonsterAction(s.MonsterType.normal,i))}),t._UZ(6,"img",47)(7,"span",3),t.qZA()()(),t.TgZ(8,"div",48),t._UZ(9,"div",43),t.TgZ(10,"div",44),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.dropMonsterAction(l.MonsterType.elite,s,i))}),t.YNc(11,cX,4,5,"div",45),t.TgZ(12,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addMonsterAction(s.MonsterType.elite,i))}),t._UZ(13,"img",47)(14,"span",3),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label",e.statsForType(e.MonsterType.normal,n).note),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.normal,n).actions),t.xp6(3),t.Q6J("ghs-label","editor.action.add"),t.xp6(2),t.Q6J("ghs-label",e.statsForType(e.MonsterType.elite,n).note),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.elite,n).actions),t.xp6(3),t.Q6J("ghs-label","editor.action.add")}}function gX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",49)(1,"ghs-action",53),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.editMonsterAction(m.MonsterType.boss,s,l))}),t.qZA(),t.TgZ(2,"span",50),t._UZ(3,"img",51),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(1),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("hexSize",.5)("relative",!0)}}function dX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"ghs-action",53),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw().index,m=t.oxw(3).$implicit,O=t.oxw();return t.KtG(O.editSpecialAction(O.MonsterType.boss,l,s,m))}),t.qZA(),t.BQk()}if(2&o){const n=a.$implicit,e=t.oxw(4).$implicit,i=t.oxw();t.xp6(1),t.Q6J("action",n)("monster",i.getMonsterForLevel(e))("inline",!0)("hexSize",.5)("relative",!0)}}function hX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",57)(1,"span",58),t._uU(2),t.qZA(),t.TgZ(3,"div",59),t.YNc(4,dX,2,5,"ng-container",60),t.TgZ(5,"a",46),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(3).$implicit,m=t.oxw();return t.KtG(m.addSpecialAction(m.MonsterType.boss,s,l))}),t._UZ(6,"img",47)(7,"span",3),t.qZA()()()}if(2&o){const n=a.index,e=t.oxw(3).$implicit,i=t.oxw();t.xp6(2),t.hij("",n+1,":"),t.xp6(2),t.Q6J("ngForOf",i.statsForType(i.MonsterType.boss,e).special[n]),t.xp6(3),t.Q6J("ghs-label","editor.action.add")}}function uX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",54),t._UZ(2,"div",43),t.TgZ(3,"div",44),t.NdJ("cdkDropListDropped",function(i){t.CHM(n);const s=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.dropMonsterAction(l.MonsterType.boss,s,i))}),t.YNc(4,gX,4,5,"div",45),t.TgZ(5,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addMonsterAction(s.MonsterType.boss,i))}),t._UZ(6,"img",47)(7,"span",3),t.qZA()(),t.TgZ(8,"div",55),t.YNc(9,hX,8,3,"div",56),t.TgZ(10,"a",46),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.addSpecialAction(s.MonsterType.boss,s.statsForType(s.MonsterType.boss,i).special.length,i))}),t._UZ(11,"img",47)(12,"span",3),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(2),t.Q6J("ghs-label",e.statsForType(e.MonsterType.boss,n).note),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.boss,n).actions),t.xp6(3),t.Q6J("ghs-label","editor.action.add"),t.xp6(2),t.Q6J("ngForOf",e.statsForType(e.MonsterType.boss,n).special),t.xp6(3),t.Q6J("ghs-label","editor.monster.stats.addSpecial")}}function _X(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",30),t._UZ(1,"ghs-monster-stats",31),t.TgZ(2,"input",32),t.NdJ("ngModelChange",function(i){t.CHM(n);const s=t.oxw(2);return t.KtG(s.monsterData.name=i)})("change",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.monsterDataToJson())})("keyup",function(){t.CHM(n);const i=t.oxw(2);return t.KtG(i.monsterDataToJson())}),t.qZA(),t.YNc(3,aX,9,8,"div",33),t.YNc(4,sX,5,4,"div",34),t.YNc(5,lX,15,6,"ng-container",35),t.YNc(6,uX,13,5,"ng-container",35),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("monster",e.getMonsterForLevel(n))("noClick",!0),t.xp6(1),t.Q6J("ngModel",e.monsterData.name),t.xp6(1),t.Q6J("ngIf",!e.monsterData.boss),t.xp6(1),t.Q6J("ngIf",e.monsterData.boss),t.xp6(1),t.Q6J("ngIf",!e.monsterData.boss),t.xp6(1),t.Q6J("ngIf",e.monsterData.boss)}}function pX(o,a){if(1&o&&(t.TgZ(0,"div",27),t.YNc(1,_X,7,7,"div",28),t._UZ(2,"ghs-monster-stats",29),t.qZA()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",-1!=n),t.xp6(1),t.Q6J("monster",e.getMonsterForLevel(n))("forceStats",!0)("relative",!0)("noClick",!0)}}function fX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",61),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.applyToAllLevel(i.level))}),t._UZ(1,"span",3),t.qZA()}2&o&&(t.xp6(1),t.Q6J("ghs-label","editor.monster.stats.applyAll"))}function mX(o,a){if(1&o&&(t.TgZ(0,"option",62),t._UZ(1,"span",3),t._uU(2," ("),t._UZ(3,"span",3),t._uU(4),t.qZA()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("value",e)("selected",n.edition==i.monsterData.edition&&n.name==i.monsterData.name),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(2),t.Q6J("ghs-label","data.edition."+n.edition),t.xp6(1),t.hij(") [",n.name,"] ")}}function vX(o,a){if(1&o&&(t.TgZ(0,"option",19),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function CX(o,a){if(1&o&&t._UZ(0,"ghs-deck-editor",63,64),2&o){const n=t.oxw();t.Q6J("monster",n.getMonsterForLevel(n.level))("standalone",!1)("edition",n.edition)}}const YT=function(){return[]},MX=function(o){return[o]},t2='{"name": "new-monster", "thumbnail" : "", "edition": "", "deck": "", "boss": false, "flying" : false, "hidden":false, "count": 10, "baseStat" : {}, "stats": []}';let OX=(()=>{var o;class a{constructor(e,i,s){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"inputMonsterData",void 0),(0,_.Z)(this,"monsterStats",void 0),(0,_.Z)(this,"deckEditor",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"MonsterType",ee.M),(0,_.Z)(this,"monsterData",void 0),(0,_.Z)(this,"ActionType",vt.Us),(0,_.Z)(this,"ActionValueType",vt.EF),(0,_.Z)(this,"encodeURIComponent",encodeURIComponent),(0,_.Z)(this,"levels",[0,1,2,3,4,5,6,7]),(0,_.Z)(this,"level",-1),(0,_.Z)(this,"monsterError",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"init",!1),this.dialog=e,this.route=i,this.router=s,this.monsterData=JSON.parse(t2),this.updateType(!1)}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),e.monsterDataToJson(),e.inputMonsterData.nativeElement.addEventListener("change",i=>{e.monsterDataFromJson()}),e.route.queryParams.subscribe({next:i=>{if(i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition)),i.monster){const s=d.v.monstersData(e.edition).find(l=>l.name==i.monster);s&&(e.monsterData=s,e.monsterDataToJson())}i.level&&(e.level=+i.level,-1!=e.level&&-1==e.levels.indexOf(e.level)&&(e.level=1)),!e.monsterData.edition&&e.edition&&(e.monsterData.edition=e.edition)}}),e.init=!0})()}monsterDataToJson(){this.monsterData.stats.sort((i,s)=>i.level-s.level!=0?i.level-s.level:i.type==ee.M.normal&&s.type==ee.M.elite?-1:1);let e=JSON.parse(JSON.stringify(this.monsterData));if(e.baseStat.actions=e.baseStat.actions||void 0,e.baseStat.immunities=e.baseStat.immunities||void 0,e.baseStat.special=e.baseStat.special||void 0,Object.keys(e.stats[0]).forEach(i=>{e.stats.every(s=>JSON.stringify(s[i])==JSON.stringify(e.stats[0][i]))&&(e.baseStat[i]=e.stats[0][i],e.stats.forEach(s=>{s[i]=void 0}))}),!e.boss){e.baseStat.type="normal",e.stats.filter(m=>"normal"==m.type).forEach(m=>{m.type=void 0});let i=[];const s=e.stats.filter(m=>!m.type)[0];s&&Object.keys(s).forEach(m=>{s[m]&&e.stats.filter(O=>!O.type).every(O=>JSON.stringify(O[m])==JSON.stringify(s[m]))&&"type"!=m&&(e.baseStat[m]=s[m],i.push(m),e.stats.filter(O=>!O.type).forEach(O=>{O[m]=void 0}))});const l=e.stats.filter(m=>"elite"==m.type)[0];l&&Object.keys(l).forEach(m=>{l[m]&&e.stats.filter(O=>"elite"==O.type).every(O=>JSON.stringify(O[m])==JSON.stringify(l[m]))&&-1==i.indexOf(m)&&"type"!=m&&(e.baseStat[m]=l[m],e.stats.filter(O=>"elite"==O.type).forEach(O=>{O[m]=void 0}))})}Object.keys(e).forEach(i=>{e[i]||(e[i]=void 0)}),e.stats.forEach(i=>{Object.keys(i).forEach(s=>{!i[s]&&"level"!=s&&(i[s]=void 0)}),i.immunities&&0==i.immunities.length&&(i.immunities=void 0),i.actions&&0==i.actions.length?i.actions=void 0:i.actions&&i.actions.forEach(s=>tl(s)),i.special&&0==i.special.length?i.special=void 0:i.special&&i.special.forEach(s=>{s.forEach(l=>tl(l))})}),Object.keys(e.baseStat).forEach(i=>{e.baseStat[i]||(e.baseStat[i]=void 0)}),e.baseStat.actions&&0==e.baseStat.actions.length?e.baseStat.actions=void 0:e.baseStat.actions&&e.baseStat.actions.forEach(i=>tl(i)),e.baseStat.special&&e.baseStat.special.forEach(i=>{i.forEach(s=>tl(s))}),this.inputMonsterData.nativeElement.value=JSON.stringify(e,null,2)}monsterDataFromJson(){if(this.monsterError="",this.inputMonsterData.nativeElement.value)try{return this.monsterData=JSON.parse(this.inputMonsterData.nativeElement.value),void(this.monsterData&&this.updateType(!1))}catch(e){this.monsterData=JSON.parse(t2),this.monsterError=e}}valueChange(e){return e&&!isNaN(+e)?+e:e}statsForType(e,i){let s=this.monsterData.stats.find(l=>this.monsterData&&l.level==i&&l.type==e);return s||(this.monsterData.errors=this.monsterData.errors||[],!this.monsterData.errors.find(l=>l.type==ug.r.unknown)&&!this.monsterData.errors.find(l=>l.type==ug.r.stat)&&(console.error("Could not find '"+e+"' stats for monster: "+this.monsterData.name+" level: "+i),this.monsterData.errors.push(new ug.o(ug.r.stat,"monster",this.monsterData.name,this.monsterData.edition,e,""+i))),s=new zr.c(e,i,0,0,0,0),this.monsterData.stats.push(s)),s}setLevel(e){this.monsterStats.setLevel(e)}getMonsterForLevel(e){let i=new Ze.Q(this.monsterData);return i.level=-1!=e?e:1,i}applyToAllLevel(e){this.monsterData.stats=this.monsterData.stats.filter(i=>i.level==e);for(let i of this.levels)if(i!=e)if(this.monsterData.boss){let s=JSON.parse(JSON.stringify(this.statsForType(ee.M.boss,e)));s.level=i,this.monsterData.stats.push(s)}else{let s=JSON.parse(JSON.stringify(this.statsForType(ee.M.normal,e)));s.level=i,this.monsterData.stats.push(s),s=JSON.parse(JSON.stringify(this.statsForType(ee.M.elite,e))),s.level=i,this.monsterData.stats.push(s)}this.monsterDataToJson()}updateType(e=!0){if(this.monsterData)if(this.monsterData.boss){this.monsterData.stats=this.monsterData.stats.filter(i=>!i.type||i.type==ee.M.boss);for(let i of this.levels)this.monsterData.stats.some(s=>s.level==i)||this.monsterData.stats.push(new zr.c(ee.M.boss,i,0,0,0,0))}else{this.monsterData.stats=this.monsterData.stats.filter(i=>i.type!=ee.M.boss);for(let i of this.levels)this.monsterData.stats.some(s=>s.level==i&&(!s.type||s.type==ee.M.normal))||this.monsterData.stats.push(new zr.c(ee.M.normal,i,0,0,0,0)),this.monsterData.stats.some(s=>s.level==i&&s.type==ee.M.elite)||this.monsterData.stats.push(new zr.c(ee.M.elite,i,0,0,0,0))}e&&this.monsterDataToJson()}toggleBoss(){this.monsterData.count=this.monsterData.boss?1:10,this.updateType()}addMonsterAction(e,i){let s=new vt.aU(vt.Us.attack);const l=this.statsForType(e,i);l.actions.push(s),this.dialog.open(Kr,{panelClass:"dialog",data:{action:s,monster:this.getMonsterForLevel(i)}}).closed.subscribe({next:O=>{0==O&&l.actions.splice(l.actions.indexOf(s),1),this.monsterDataToJson()}})}editMonsterAction(e,i,s){this.dialog.open(Kr,{panelClass:"dialog",data:{action:i,monster:this.getMonsterForLevel(s)}}).closed.subscribe({next:m=>{if(0==m){const O=this.statsForType(e,s);O.actions.splice(O.actions.indexOf(i),1)}this.monsterDataToJson()}})}dropMonsterAction(e,i,s){Fn(this.statsForType(e,i).actions,s.previousIndex,s.currentIndex),d.v.uiChange.emit(),this.monsterDataToJson()}addSpecialAction(e,i,s){let l=new vt.aU(vt.Us.attack);const m=this.statsForType(e,s);m.special||(m.special=[]),m.special.length<=i&&(m.special[i]=[]),m.special[i].push(l),this.dialog.open(Kr,{panelClass:"dialog",data:{action:l,monster:this.getMonsterForLevel(s)}}).closed.subscribe({next:k=>{0==k&&(m.special[i].splice(m.special[i].indexOf(l),1),0==m.special[i].length&&m.special.splice(i,1)),this.monsterDataToJson()}})}editSpecialAction(e,i,s,l){this.dialog.open(Kr,{panelClass:"dialog",data:{action:s,monster:this.getMonsterForLevel(l)}}).closed.subscribe({next:O=>{if(0==O){const k=this.statsForType(e,l);k.special||(k.special=[]),k.special.length<=i&&(k.special[i]=[]),k.special[i].splice(k.special[i].indexOf(s),1),0==k.special[i].length&&k.special.splice(i,1)}this.monsterDataToJson()}})}loadMonsterData(e){const i=+e.target.value;this.monsterData=-1!=i?d.v.monstersData(this.edition)[i]:JSON.parse(t2),this.updateType(),this.monsterDataToJson(),this.updateQueryParams()}updateQueryParams(){!this.monsterData.edition&&this.edition&&(this.monsterData.edition=this.edition),this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,monster:this.monsterData&&this.monsterData.name||void 0,level:1!=this.level?this.level:void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te),t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-editor"]],viewQuery:function(e,i){if(1&e&&(t.Gf(eX,7),t.Gf(nX,5),t.Gf(iX,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.inputMonsterData=s.first),t.iGM(s=t.CRH())&&(i.monsterStats=s.first),t.iGM(s=t.CRH())&&(i.deckEditor=s.first)}},decls:63,vars:51,consts:[[1,"container"],[3,"standalone"],[1,"monster-editor"],[3,"ghs-label"],[1,"columns"],[1,"input"],[1,"monster-stats"],[1,"base-data","dialog"],[3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],["type","checkbox",3,"ngModel","ngModelChange","change"],["type","number","min","1","max","10",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[1,"level-select"],[1,"select"],["class","level",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"level",3,"ngClass","click"],["class","stats-container",4,"ngFor","ngForOf"],["class","button",3,"click",4,"ngIf"],[1,"output"],[3,"change"],[3,"value"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["inputMonsterData",""],[1,"button",3,"href","download"],["src","./assets/images/export.svg",1,"ghs-icon"],[3,"monster","standalone","edition",4,"ngIf"],[1,"stats-container"],["class","stats-input",4,"ngIf"],[1,"stats-preview",3,"monster","forceStats","relative","noClick"],[1,"stats-input"],[1,"stats-editor",3,"monster","noClick"],[1,"name",3,"ngModel","ngModelChange","change","keyup"],["class","stats",4,"ngIf"],["class","stats boss",4,"ngIf"],[4,"ngIf"],[1,"stats"],[1,"stat","end",3,"ngModel","ngModelChange","change","keyup"],[1,"stat","start",3,"ngModel","ngModelChange","change","keyup"],["type","number",1,"stat","end",3,"ngModel","ngModelChange","change","keyup"],["type","number",1,"stat","start",3,"ngModel","ngModelChange","change","keyup"],[1,"stats","boss"],[1,"extra","normal"],[1,"notes",3,"ghs-label"],["cdkDropList","",1,"additional",3,"cdkDropListDropped"],["class","monster-action","cdkDrag","",4,"ngFor","ngForOf"],[3,"click"],["src","./assets/images/plus.svg",1,"ghs-icon"],[1,"extra","elite"],["cdkDrag","",1,"monster-action"],["cdkDragHandle","",1,"handle"],["src","./assets/images/menu.svg",1,"ghs-icon"],[3,"action","monster","inline","right","hexSize","relative","click"],[3,"action","monster","inline","hexSize","relative","click"],[1,"extra","boss"],[1,"specials"],["class","special",4,"ngFor","ngForOf"],[1,"special"],[1,"index"],[1,"actions"],[4,"ngFor","ngForOf"],[1,"button",3,"click"],[3,"value","selected"],[3,"monster","standalone","edition"],["deckEditor",""]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"h1"),t._UZ(4,"span",3),t._uU(5," ("),t._UZ(6,"span",3),t._uU(7,")"),t.qZA(),t.TgZ(8,"div",4)(9,"div",5)(10,"div",6)(11,"h2"),t._UZ(12,"span",3),t.qZA(),t.TgZ(13,"div",7)(14,"label"),t._UZ(15,"span",3),t.qZA(),t.TgZ(16,"input",8),t.NdJ("ngModelChange",function(l){return i.monsterData.edition=l})("change",function(){return i.monsterDataToJson()})("keyup",function(){return i.monsterDataToJson()}),t.qZA(),t.TgZ(17,"label"),t._UZ(18,"span",3),t.qZA(),t.TgZ(19,"input",8),t.NdJ("ngModelChange",function(l){return i.monsterData.deck=l})("change",function(){return i.monsterDataToJson()})("keyup",function(){return i.monsterDataToJson()}),t.qZA(),t.TgZ(20,"label"),t._UZ(21,"span",3),t.qZA(),t.TgZ(22,"input",9),t.NdJ("ngModelChange",function(l){return i.monsterData.boss=l})("change",function(){return i.toggleBoss()}),t.qZA(),t.TgZ(23,"label"),t._UZ(24,"span",3),t.qZA(),t.TgZ(25,"input",9),t.NdJ("ngModelChange",function(l){return i.monsterData.flying=l})("change",function(){return i.updateType()}),t.qZA(),t.TgZ(26,"label"),t._UZ(27,"span",3),t.qZA(),t.TgZ(28,"input",9),t.NdJ("ngModelChange",function(l){return i.monsterData.hidden=l})("change",function(){return i.updateType()}),t.qZA(),t.TgZ(29,"label"),t._UZ(30,"span",3),t.qZA(),t.TgZ(31,"input",10),t.NdJ("ngModelChange",function(l){return i.monsterData.count=l})("change",function(){return i.monsterDataToJson()})("keyup",function(){return i.monsterDataToJson()}),t.qZA()(),t.TgZ(32,"div",11)(33,"span",12),t._UZ(34,"span",3),t._uU(35,":"),t.qZA(),t.YNc(36,oX,2,4,"div",13),t.ALo(37,"ghsRange"),t.TgZ(38,"div",14),t.NdJ("click",function(){return i.level=-1,i.updateQueryParams()}),t._UZ(39,"span",3),t.qZA()(),t.YNc(40,pX,3,5,"div",15),t.ALo(41,"ghsRange"),t.YNc(42,fX,2,1,"a",16),t.qZA()(),t.TgZ(43,"div",17)(44,"h2"),t._UZ(45,"span",3),t.TgZ(46,"select",18),t.NdJ("change",function(l){return i.loadMonsterData(l)}),t.TgZ(47,"option",19),t._uU(48,"<"),t._UZ(49,"span",3),t._uU(50,">"),t.qZA(),t.YNc(51,mX,5,5,"option",20),t.qZA(),t.TgZ(52,"select",21),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.updateQueryParams()}),t._UZ(53,"option"),t.YNc(54,vX,2,2,"option",22),t.qZA()(),t.TgZ(55,"div"),t._uU(56),t.qZA(),t._UZ(57,"textarea",null,23),t.TgZ(59,"a",24),t._UZ(60,"img",25)(61,"span",3),t.qZA()()(),t.YNc(62,CX,2,3,"ghs-deck-editor",26),t.qZA()()),2&e){const s=t.MAs(58);t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","editor.monster"),t.xp6(2),t.Q6J("ghs-label","wip"),t.xp6(6),t.Q6J("ghs-label","editor.monster.stats"),t.xp6(3),t.Q6J("ghs-label","edition"),t.xp6(1),t.Q6J("ngModel",i.monsterData.edition)("ghs-label","edition")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.deck"),t.xp6(1),t.Q6J("ngModel",i.monsterData.deck)("ghs-label","editor.monster.stats.deck")("ghs-label-attribute","placeholder"),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.boss"),t.xp6(1),t.Q6J("ngModel",i.monsterData.boss),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.flying"),t.xp6(1),t.Q6J("ngModel",i.monsterData.flying),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.hidden"),t.xp6(1),t.Q6J("ngModel",i.monsterData.hidden),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.count"),t.xp6(1),t.Q6J("ngModel",i.monsterData.count)("ghs-label","editor.monster.count")("ghs-label-attribute","placeholder"),t.xp6(3),t.Q6J("ghs-label","editor.monster.stats.levelSelect"),t.xp6(2),t.Q6J("ngForOf",t.xi3(37,39,t.DdM(45,YT),8)),t.xp6(2),t.Q6J("ngClass",t.VKq(46,VT,-1==i.level)),t.xp6(1),t.Q6J("ghs-label","editor.monster.stats.allLevel"),t.xp6(1),t.Q6J("ngForOf",-1==i.level?t.xi3(41,42,t.DdM(48,YT),8):t.VKq(49,MX,i.level)),t.xp6(2),t.Q6J("ngIf",-1!=i.level),t.xp6(3),t.Q6J("ghs-label","editor.monster.stats.json"),t.xp6(2),t.Q6J("value",-1),t.xp6(2),t.Q6J("ghs-label","editor.monster.new"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.monstersData(i.edition)),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(2),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.hij(" ",i.monsterError," "),t.xp6(3),t.Q6J("href","data:application/json;charset=utf-8,"+i.encodeURIComponent(s.value),t.LSH)("download",i.monsterData.name+".json"),t.xp6(2),t.Q6J("ghs-label","editor.monster.stats.json.download"),t.xp6(1),t.Q6J("ngIf",i.init)}},dependencies:[x.mk,x.sg,x.O5,wo,ko,Ho,Ir,va,Ca,yi,Jc,id,Si,Bs,Ms,Zr,Yr,T,Gr,ie,Xw,Ii],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{text-align:center;margin-top:calc(var(--ghs-unit) * .7);margin-bottom:calc(var(--ghs-unit) * .2)}input[_ngcontent-%COMP%]:not([type=checkbox]), textarea[_ngcontent-%COMP%]{width:100%;min-width:initial;color:var(--ghs-color-black);background-color:var(--ghs-color-white);border:1px solid var(--ghs-color-gray)}input[_ngcontent-%COMP%]:not([type=checkbox]):hover, textarea[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}select[_ngcontent-%COMP%]{max-width:100%}textarea[_ngcontent-%COMP%]{width:100%;min-width:calc(var(--ghs-unit) * 20);min-height:calc(var(--ghs-unit) * 50)}.ghs-icon[_ngcontent-%COMP%]{height:1em;width:auto;filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center}a[_ngcontent-%COMP%]:hover{opacity:.7}a.button[_ngcontent-%COMP%]{justify-content:center;font-family:ghs-normal;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-white);padding:calc(var(--ghs-unit) * 1);margin:calc(var(--ghs-unit) * 1) auto;border:1px solid var(--ghs-color-gray);background-color:var(--ghs-color-darkgray);text-decoration:none}a.button[_ngcontent-%COMP%]:hover{opacity:1;color:var(--ghs-color-gray)}a.button[_ngcontent-%COMP%]:hover .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)}a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]:nth-child(1){margin-right:.2em}.base-data[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2.5);color:var(--ghs-color-white);width:70%;min-width:300px;display:grid;grid-template-columns:auto auto;grid-gap:calc(var(--ghs-unit) * 2);margin:calc(var(--ghs-unit) * 1) auto;flex-shrink:1;overflow:auto}.columns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;max-width:100%;justify-content:space-evenly}.output[_ngcontent-%COMP%]{max-width:100%}.input[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * 2)}",".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.monster-editor[_ngcontent-%COMP%]{margin:calc(var(--ghs-unit) * 2)}.monster-stats[_ngcontent-%COMP%]{display:flex;flex-direction:column}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%]{display:flex;grid-gap:calc(var(--ghs-unit) * 2);margin:0 auto;margin-top:calc(var(--ghs-unit) * 3)}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{font-family:ghs-title;font-size:calc(var(--ghs-unit) * 3);text-shadow:var(--ghs-outline);color:var(--ghs-color-gray);cursor:pointer}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%] .level.current[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-darkgray)}.monster-stats[_ngcontent-%COMP%] .level-select[_ngcontent-%COMP%] .select[_ngcontent-%COMP%]{pointer-events:none;font-size:calc(var(--ghs-unit) * 3);color:var(--ghs-color-black)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-around;align-items:center;margin-top:calc(var(--ghs-unit) * 3);min-width:calc(var(--ghs-unit) * 82)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] ghs-monster-stats[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 21.5)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%]{position:relative;width:calc(var(--ghs-unit) * 40);height:calc(var(--ghs-unit) * 21.5)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 6.2);left:calc(var(--ghs-unit) * 15);width:calc(var(--ghs-unit) * 9.5);display:grid;grid-template-columns:1fr 1fr;column-gap:calc(var(--ghs-unit) * 2);filter:drop-shadow(calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) calc(var(--ghs-unit) * .1) var(--ghs-color-black));z-index:1}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-fontsize));padding:0;width:calc(var(--ghs-unit) * 4 * var(--ghs-fontsize));min-width:auto;color:var(--ghs-color-black);background-color:var(--ghs-color-white);height:calc(var(--ghs-unit) * 2.9 * var(--ghs-fontsize));border:none;margin:calc(var(--ghs-unit) * .2 * var(--ghs-fontsize)) 0}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.end[_ngcontent-%COMP%]{justify-self:end}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%] .stat.start[_ngcontent-%COMP%]{justify-self:start;text-align:left}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats.boss[_ngcontent-%COMP%]{top:calc(var(--ghs-unit) * 6.5);left:calc(var(--ghs-unit) * 4.5);grid-template-columns:1fr}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .stats.boss[_ngcontent-%COMP%] .stat[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 6 * var(--ghs-fontsize))}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%]{position:absolute;top:calc(var(--ghs-unit) * 6.5);width:calc(var(--ghs-unit) * 14);height:calc(100% - var(--ghs-unit) * 6.5);overflow-y:auto;display:flex;flex-direction:column;font-size:calc(var(--ghs-unit) * 2 * var(--ghs-fontsize))}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .monster-action[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .monster-action[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{cursor:grab}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{cursor:pointer}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]:hover{opacity:.7}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--ghs-color-white)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * 25.5);text-align:right}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{justify-content:end}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--ghs-color-black);justify-content:flex-end}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.normal[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .ghs-icon[_ngcontent-%COMP%]{filter:none}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.elite[_ngcontent-%COMP%]{right:calc(var(--ghs-unit) * .5);color:var(--ghs-color-white)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra.boss[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 21);right:calc(var(--ghs-unit) * .5);color:var(--ghs-color-white)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%]{display:flex;align-items:baseline}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;flex-direction:column}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] ghs-action[_ngcontent-%COMP%]:first-child{margin-top:calc(var(--ghs-unit) * .5)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .extra[_ngcontent-%COMP%] .special[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:calc(var(--ghs-unit) * .2)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:var(--ghs-font-title);position:absolute;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-text-factor));top:calc(var(--ghs-unit) * .5);left:calc(var(--ghs-unit) * 7);width:calc(var(--ghs-unit) * 26);color:var(--ghs-color-white);background-color:transparent;border:1px solid var(--ghs-color-gray)}.monster-stats[_ngcontent-%COMP%] .stats-container[_ngcontent-%COMP%] .stats-input[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]:hover{border:1px solid var(--ghs-color-gray)}"]})),a})();const PX=function(o){return{vertical:o}};let yX=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v)}ngOnInit(){return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),d.v.game.figures.forEach(e=>e.active=!1),d.v.uiChange.emit(),d.v.game.state!=ge.D2.next&&d.v.roundManager.nextGameState(!0)})()}vertical(){return window.innerWidth<800}beforeMonsterAttackModifierDeck(e){d.v.stateManager.before("updateAttackModifierDeck."+e.type,"monster",...e.values)}afterMonsterAttackModifierDeck(e){d.v.game.monsterAttackModifierDeck=e.deck,d.v.stateManager.after()}next(){d.v.stateManager.before("draw"),d.v.game.state==ge.D2.next&&d.v.roundManager.nextGameState(!0),d.v.roundManager.nextGameState(!0),d.v.game.figures.forEach(e=>e.active=!1),d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-attackmodifier-standalone"]],decls:5,vars:9,consts:[["ghs-keyboard-shortcuts","",1,"attackmodifier-standalone",3,"ngClass"],[3,"standalone"],["numeration","m",3,"deck","standalone","fullscreen","vertical","before","after"],[1,"next",3,"click"],[3,"ghs-label"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"ghs-attackmodifier-deck",2),t.NdJ("before",function(l){return i.beforeMonsterAttackModifierDeck(l)})("after",function(l){return i.afterMonsterAttackModifierDeck(l)}),t.qZA(),t.TgZ(3,"a",3),t.NdJ("click",function(){return i.next()}),t._UZ(4,"span",4),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(7,PX,i.vertical())),t.xp6(1),t.Q6J("standalone",!0),t.xp6(1),t.Q6J("deck",i.gameManager.game.monsterAttackModifierDeck)("standalone",!0)("fullscreen",!1)("vertical",i.vertical()),t.xp6(2),t.Q6J("ghs-label","game.round.next"))},dependencies:[x.mk,Yr,Kf,ie,Kw],styles:[".attackmodifier-standalone[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100vw;height:100vh}.attackmodifier-standalone[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.attackmodifier-standalone[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:800px;height:25.5vw;max-height:213px;z-index:1;margin-top:2em;margin-left:1%}.attackmodifier-standalone[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]{cursor:pointer;font-family:var(--ghs-font-title);font-size:3em;margin:1em}.attackmodifier-standalone.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden}.attackmodifier-standalone.vertical[_ngcontent-%COMP%] ghs-attackmodifier-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:calc(100% - var(--ghs-unit) * 10 * var(--ghs-text-factor));max-height:initial;transform:none}"]})),a})();const bX=function(o){return{vertical:o}};let xX=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"configuration",!1)}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),d.v.uiChange.emit(),d.v.game.state!=ge.D2.next&&d.v.roundManager.nextGameState(!0),0==d.v.game.lootDeck.cards.length&&(e.configuration=!0)})()}vertical(){return window.innerWidth<800}beforeLootDeck(e){d.v.stateManager.before(e.type,...e.values)}afterLootDeck(e){d.v.game.lootDeck=e.deck,d.v.stateManager.after()}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-loot-deck-standalone"]],decls:3,vars:9,consts:[["ghs-keyboard-shortcuts","",1,"loot-deck-standalone",3,"ngClass"],[3,"standalone"],[3,"deck","fullscreen","standalone","vertical","characters","before","after"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"ghs-loot-deck",2),t.NdJ("before",function(l){return i.beforeLootDeck(l)})("after",function(l){return i.afterLootDeck(l)}),t.qZA()()),2&e&&(t.Q6J("ngClass",t.VKq(7,bX,i.vertical())),t.xp6(1),t.Q6J("standalone",!0),t.xp6(1),t.Q6J("deck",i.gameManager.game.lootDeck)("fullscreen",!1)("standalone",!0)("vertical",i.vertical())("characters",!1))},dependencies:[x.mk,Yr,Fw,Kw],styles:[".loot-deck-standalone[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100vw;height:100vh}.loot-deck-standalone[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2;width:100%}.loot-deck-standalone[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{display:flex;width:99vw;max-width:600px;height:100vw;max-height:420px;z-index:1;margin-top:2em}.loot-deck-standalone.vertical[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden}.loot-deck-standalone.vertical[_ngcontent-%COMP%] ghs-loot-deck[_ngcontent-%COMP%]{width:98vw;margin-right:1%;height:132vw;max-height:800px;transform:none}"]})),a})();function wX(o,a){if(1&o&&(t.TgZ(0,"option",7),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function kX(o,a){if(1&o&&(t.TgZ(0,"div",10)(1,"span",11),t._uU(2),t.qZA(),t._UZ(3,"ghs-treasure-label",12),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(2);t.xp6(2),t.Oqu(n.index),t.xp6(1),t.Q6J("treasure",n)("edition",e.edition)}}function TX(o,a){if(1&o&&(t.TgZ(0,"div",8),t.YNc(1,kX,4,3,"div",9),t.qZA()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.treasures)}}let ZX=(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"treasures",[]),(0,_.Z)(this,"edition",void 0),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),e.update())}})})()}update(){this.treasures=[];const e=d.v.editionData.find(i=>i.edition==this.edition);e&&e.treasures&&e.treasures.forEach((i,s)=>{this.treasures.push(new yn.KI(i,s+1+(e.treasureOffset||0)))})}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-treasures-tool"]],decls:8,vars:5,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["class","treasures",4,"ngIf"],[3,"value"],[1,"treasures"],["class","treasure",4,"ngFor","ngForOf"],[1,"treasure"],[1,"index"],[1,"placeholder","text-white",3,"treasure","edition"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,wX,2,2,"option",5),t.qZA()()(),t.YNc(7,TX,2,1,"div",6),t.qZA()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(1),t.Q6J("ngIf",i.edition))},dependencies:[x.sg,x.O5,wo,ko,Ca,yi,Si,Yr,$f,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.treasures[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;overflow:auto}.treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%]{display:flex;margin:10px;padding:10px;background-color:var(--ghs-color-darkgray);color:var(--ghs-color-white);font-size:2em}.treasures[_ngcontent-%COMP%] .treasure[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{margin-right:5px}"]})),a})();var Yn=function(o){return o.additionalGold="additionalGold",o.event="event",o.collectiveGold="collectiveGold",o.collectiveItem="collectiveItem",o.consumeItem="consumeItem",o.consumeCollectiveItem="consumeCollectiveItem",o.custom="costum",o.discard="discard",o.experience="experience",o.globalAchievement="globalAchievement",o.gold="gold",o.itemDesign="itemDesign",o.loseBattleGoal="loseBattleGoal",o.loseCollectiveGold="loseCollectiveGold",o.loseGold="loseGold",o.loseReputation="loseReputation",o.noEffect="noEffect",o.outcome="outcome",o.randomItemDesign="randomItemDesign",o.reputation="reputation",o.partyAchievement="partyAchievement",o.prosperity="prosperity",o.scenario="scenario",o.scenarioCondition="scenarioCondition",o.scenarioDamage="scenarioDamage",o.scenarioSingleMinus1="scenarioSingleMinus1",o}(Yn||{}),g_=function(o){return o.otherwise="otherwise",o.payCollectiveGold="payCollectiveGold",o.payCollectiveGoldConditional="payCollectiveGoldConditional",o.reputationGT="reputationGT",o.reputationLT="reputationLT",o}(g_||{});function AX(o,a){if(1&o&&t._UZ(0,"span",1),2&o){const n=t.oxw();t.Q6J("ghs-label",n.conditionLabel[0])("ghs-label-args",n.conditionLabel.slice(1))}}let KT=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"condition",void 0),(0,_.Z)(this,"conditionLabel",[]),(0,_.Z)(this,"conditionPrefix","game.events.conditions.")}ngOnInit(){this.conditionLabel=this.calcConditionLabel(this.condition)}calcConditionLabel(e){if(e){const i=""+(e.value||"");switch(e.type){case g_.otherwise:case g_.payCollectiveGold:case g_.reputationGT:case g_.reputationLT:return[this.conditionPrefix+e.type,i];case g_.payCollectiveGoldConditional:let s=[this.conditionPrefix+e.type];return i.split("|").forEach(m=>{const O=m.split("-")[0];let k="";if(2==m.split("-").length){const W=m.split("-")[1];k=R.r.getLabel(this.conditionPrefix+W.split(":")[0],W.split(":").slice(1))}s.push(O,k)}),s}}return[]}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-condition-label"]],inputs:{condition:"condition"},decls:1,vars:1,consts:[["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"text-white",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&t.YNc(0,AX,1,2,"span",0),2&e&&t.Q6J("ngIf",i.conditionLabel.length>0)},dependencies:[x.O5,ie],encapsulation:2})),a})();function SX(o,a){if(1&o&&t._UZ(0,"ghs-event-condition-label",2),2&o){const n=t.oxw();t.Q6J("condition",n.reward.condition)}}function EX(o,a){if(1&o&&t._UZ(0,"span",3),2&o){const n=t.oxw();t.Q6J("ghs-label",n.rewardLabel[0])("ghs-label-args",n.rewardLabel.slice(1))}}let DX=(()=>{var o;class a{constructor(e){(0,_.Z)(this,"dialog",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"reward",void 0),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"itemCards",!1),(0,_.Z)(this,"rewardLabel",[]),(0,_.Z)(this,"items",[]),(0,_.Z)(this,"rewardPrefix","game.events.rewards."),this.dialog=e}ngOnInit(){if(this.rewardLabel=this.calcRewardLabel(),this.itemCards&&-1!=[Yn.collectiveItem,Yn.itemDesign].indexOf(this.reward.type)){const e=(""+this.reward.value).split(":")[0];let i=this.edition,s=-1;isNaN(+e)?(s=+e.split("-")[0],i=e.split("-")[1]):s=+e;const l=d.v.itemManager.getItem(s,i,!0);l&&this.items.push(l)}}calcRewardLabel(){if(this.reward.type==Yn.custom)return[""+this.reward.value];const e=""+(this.reward.value||"");switch(this.reward.type){case Yn.additionalGold:case Yn.collectiveGold:case Yn.discard:case Yn.experience:case Yn.globalAchievement:case Yn.gold:case Yn.loseBattleGoal:case Yn.loseCollectiveGold:case Yn.loseGold:case Yn.loseReputation:case Yn.noEffect:case Yn.outcome:case Yn.randomItemDesign:case Yn.reputation:case Yn.partyAchievement:case Yn.prosperity:case Yn.scenarioCondition:case Yn.scenarioDamage:case Yn.scenarioSingleMinus1:return[this.rewardPrefix+this.reward.type,e];case Yn.collectiveItem:case Yn.itemDesign:const i=(""+this.reward.value).split(":")[0],s=(""+this.reward.value).split(":")[1];let l=this.edition,m=-1;return isNaN(+i)?(m=+i.split("-")[0],l=i.split("-")[1]):m=+i,[this.rewardPrefix+this.reward.type,""+m,l,s];case Yn.scenario:const O=d.v.scenarioManager.getScenario(e,this.edition,void 0);return O?[this.rewardPrefix+this.reward.type,O.index,"data.scenario."+O.name]:(console.warn("Invalid Scenario '"+e+"' on event reward "+this.reward+"' for Edition "+this.edition),[this.rewardPrefix+this.reward.type,e,' %scenario%']);case Yn.consumeItem:case Yn.consumeCollectiveItem:case Yn.event:case Yn.event:const k=e.split("-")[0],W=e.split("-")[1];return[this.rewardPrefix+this.reward.type,k,W]}return[]}openItemDialog(e){this.dialog.open(gg,{data:{item:e}})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(Te))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-reward-label"]],inputs:{reward:"reward",edition:"edition",itemCards:"itemCards"},decls:2,vars:2,consts:[["class","condition",3,"condition",4,"ngIf"],["class","text-white",3,"ghs-label","ghs-label-args",4,"ngIf"],[1,"condition",3,"condition"],[1,"text-white",3,"ghs-label","ghs-label-args"]],template:function(e,i){1&e&&(t.YNc(0,SX,1,1,"ghs-event-condition-label",0),t.YNc(1,EX,1,2,"span",1)),2&e&&(t.Q6J("ngIf",i.reward.condition),t.xp6(1),t.Q6J("ngIf",i.rewardLabel.length>0))},dependencies:[x.O5,KT,ie],styles:[".condition{margin-right:.2em}\n"],encapsulation:2})),a})();const IX=function(o){return[o]};function NX(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.selectOption(s))}),t._UZ(1,"span",12)(2,"span",13),t.qZA()}if(2&o){const n=a.index,e=t.oxw(2);t.xp6(1),t.Q6J("ghs-label","game.events.option")("ghs-label-args",t.VKq(3,IX,"game.events.option."+(n+1))),t.xp6(1),t.Q6J("ghs-label",e.label+".options."+(n+1)+".choice")}}function JX(o,a){1&o&&(t.TgZ(0,"span"),t._uU(1,"0"),t.qZA())}function UX(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",6),t._UZ(2,"p",7),t.qZA(),t.TgZ(3,"div",8),t.YNc(4,NX,3,5,"div",9),t.qZA(),t.TgZ(5,"div",10),t.YNc(6,JX,2,0,"span",4),t._uU(7),t.qZA(),t.BQk()),2&o){const n=t.oxw();t.xp6(2),t.Q6J("ghs-label",n.label+".text"),t.xp6(2),t.Q6J("ngForOf",n.event.options),t.xp6(2),t.Q6J("ngIf",n.event.cardId<10),t.xp6(1),t.hij("",n.event.cardId," ")}}function LX(o,a){if(1&o&&t._UZ(0,"span",22),2&o){const n=t.oxw().index,e=t.oxw(2);t.Q6J("ghs-label",e.label+".options."+(n+1)+".outcome")}}function QX(o,a){if(1&o&&(t.TgZ(0,"div",27),t._uU(1),t.qZA()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij("TODO: ",n.rule,"")}}function RX(o,a){if(1&o&&t._UZ(0,"ghs-event-condition-label",30),2&o){const n=t.oxw(2).$implicit;t.Q6J("condition",n.condition)}}function FX(o,a){if(1&o&&(t.TgZ(0,"div",6),t.YNc(1,RX,1,1,"ghs-event-condition-label",28),t._UZ(2,"span",29),t.qZA()),2&o){const n=t.oxw(),e=n.$implicit,i=n.index,s=t.oxw().index,l=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.condition),t.xp6(1),t.Q6J("ghs-label",l.label+".options."+(s+1)+".effects."+(s+1)+"."+(i+1))}}function qX(o,a){1&o&&t._UZ(0,"span",36),2&o&&t.Q6J("ghs-label","or")}const HX=function(o){return{"selected-reward":o}};function jX(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"span",33),t.NdJ("click",function(){const s=t.CHM(n).index,l=t.oxw().index,m=t.oxw().index,O=t.oxw(3);return t.KtG(O.selectReward(m,l,s))}),t._UZ(2,"ghs-event-reward-label",34),t.qZA(),t.YNc(3,qX,1,1,"span",35),t.BQk()}if(2&o){const n=a.$implicit,e=a.index,i=t.oxw(),s=i.index,l=i.$implicit,m=t.oxw().index,O=t.oxw().index,k=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(4,HX,O==k.selected&&m==k.selectedEffect&&k.getRewardSelection(m,s).index==e)),t.xp6(1),t.Q6J("reward",n)("edition",k.event.edition),t.xp6(1),t.Q6J("ngIf",l.length>1&&e{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"event",void 0),(0,_.Z)(this,"identifier",void 0),(0,_.Z)(this,"select",-1),(0,_.Z)(this,"disabled",!1),(0,_.Z)(this,"label",""),(0,_.Z)(this,"selected",-1),(0,_.Z)(this,"selectedEffect",-1),(0,_.Z)(this,"rewardSelection",[])}ngOnInit(){this.event&&(this.label="data.events."+this.event.edition+"."+this.event.type+"."+this.event.cardId)}ngOnChanges(e){e.identifier&&e.identifier.previousValue!=e.identifier.currentValue?!this.event&&this.identifier&&(this.event=void 0):e.select&&e.select.previousValue!=e.select.currentValue&&this.selectOption(this.select)}selectOption(e){this.event&&!this.disabled&&this.selected!=e&&(this.selected=e,this.rewardSelection=[],-1!=this.selected&&(this.event.options[e].effects.length&&(this.selectedEffect=0),this.event.options[e].effects.forEach((i,s)=>{i.rewards&&i.rewards.forEach((l,m)=>{this.rewardSelection.push(l.length?{effectIndex:s,rewardIndex:m,index:0}:{effectIndex:s,rewardIndex:m,index:-1})})})))}selectEffect(e){this.selectedEffect=this.selectedEffect==e?-1:e}selectReward(e,i,s){if(this.event&&!this.disabled){let l=this.rewardSelection.find(m=>m.effectIndex==e&&m.rewardIndex==i);l?l.index=s:(l={effectIndex:e,rewardIndex:i,index:s},this.rewardSelection.push(l))}}getRewardSelection(e,i){return this.rewardSelection.find(l=>l.effectIndex==e&&l.rewardIndex==i)||{effectIndex:e,rewardIndex:i,index:-1}}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-card"]],inputs:{event:"event",identifier:"identifier",select:"select",disabled:"disabled"},features:[t.TTD],decls:7,vars:10,consts:[[1,"event-card-container"],["container",""],[1,"card","vertical","reverse","event",3,"ngClass"],[1,"card-back",3,"ngClass"],[4,"ngIf"],[1,"card-front",3,"ngClass"],[1,"text"],[1,"placeholder",3,"ghs-label"],[1,"options"],["class","option",3,"click",4,"ngFor","ngForOf"],[1,"card-id"],[1,"option",3,"click"],[1,"title",3,"ghs-label","ghs-label-args"],[1,"choice",3,"ghs-label"],["class","option",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"option",3,"ngClass","click"],["class","text",3,"ghs-label",4,"ngIf"],[1,"effects"],["class","effect",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"card-action"],["class","ghs-svg","src","./assets/images/eventcards/return.svg",4,"ngIf"],["class","ghs-svg","src","./assets/images/eventcards/remove.svg",4,"ngIf"],[1,"text",3,"ghs-label"],[1,"effect",3,"ngClass","click"],["class","rule",4,"ngIf"],["class","text",4,"ngIf"],["class","rewards",4,"ngFor","ngForOf"],[1,"rule"],["class","condition",3,"condition",4,"ngIf"],[3,"ghs-label"],[1,"condition",3,"condition"],[1,"rewards"],[4,"ngFor","ngForOf"],[1,"reward",3,"ngClass","click"],[3,"reward","edition"],["class","separator",3,"ghs-label",4,"ngIf"],[1,"separator",3,"ghs-label"],["src","./assets/images/eventcards/return.svg",1,"ghs-svg"],["src","./assets/images/eventcards/remove.svg",1,"ghs-svg"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0,1)(2,"div",2)(3,"div",3),t.YNc(4,UX,8,4,"ng-container",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,ttt,3,1,"ng-container",4),t.qZA()()()),2&e){const s=t.MAs(1);t.xp6(2),t.Udp("font-size",.072*s.offsetWidth+"px"),t.Q6J("ngClass",t.WLB(7,ett,-1!=i.selected,i.disabled)),t.xp6(1),t.Q6J("ngClass",i.event?i.event.type:""),t.xp6(1),t.Q6J("ngIf",i.event),t.xp6(1),t.Q6J("ngClass",i.event?i.event.type:""),t.xp6(1),t.Q6J("ngIf",i.event)}},dependencies:[x.mk,x.sg,x.O5,KT,DX,ie],styles:['.event-card-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-bottom:147%}.event[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border:.2em solid transparent;border-radius:.5em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%]{background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.event[_ngcontent-%COMP%] .card-front.city[_ngcontent-%COMP%]{background-image:url(city-front.446be7156765ae21.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-front.road[_ngcontent-%COMP%]{background-image:url(road-front.3bc5c71940cbeabd.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-rows:repeat(2,50%);width:100%;height:100%}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;font-size:.6em;line-height:1em;padding-top:1.5em;padding-left:4em;padding-right:2em;filter:grayscale(.7);opacity:.3;overflow:auto}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:first-child{padding-top:2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-style:italic;margin-bottom:.5em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%]{position:absolute;bottom:1em;right:1em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:2em;height:auto;filter:var(--ghs-filter-white)}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-top:.3em;margin-bottom:.3em;width:100%}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{margin-bottom:.2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .condition[_ngcontent-%COMP%]{text-transform:uppercase;margin-right:.2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%]{font-family:var(--ghs-font-text);font-size:1.2em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{margin:0 .1em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%] .card-action[_ngcontent-%COMP%]{bottom:-.5em;right:-1em}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%]{filter:none;opacity:1}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect[_ngcontent-%COMP%]{cursor:pointer;opacity:.6}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%]{opacity:1}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{opacity:.8}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .reward[_ngcontent-%COMP%]{cursor:pointer;opacity:.6}.event[_ngcontent-%COMP%] .card-front[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option.selected[_ngcontent-%COMP%] .effects[_ngcontent-%COMP%] .effect.selected-effect[_ngcontent-%COMP%] .rewards[_ngcontent-%COMP%] .reward.selected-reward[_ngcontent-%COMP%]{opacity:1}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%]{background-size:100% 100%;background-position:center center;background-repeat:no-repeat;border-radius:.5em}.event[_ngcontent-%COMP%] .card-back.city[_ngcontent-%COMP%]{background-image:url(city-back.6833a16b28926dd8.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-back.road[_ngcontent-%COMP%]{background-image:url(road-back.41656a4c3b0c3423.png);color:var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{position:absolute;top:10%;width:100%;height:60%;margin:0;font-family:var(--ghs-font-text);font-size:.6em;line-height:.8em;font-style:italic}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:before{content:" ";float:left;height:100%;width:50%;shape-outside:polygon(98.99% 12.78%,99.5% 4.97%,0% 5%,0% 100%,22.05% 100%,24.62% 45%,30.13% 28.66%,43.84% 17.5%,57.95% 11.71%);shape-margin:3%}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0;text-align:justify;width:100%;height:100%}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:before{content:" ";float:right;height:100%;width:50%;shape-outside:polygon(.5% .87%,100% 0%,100% 100%,75.9% 100%,75.39% 48.17%,73.46% 37.6%,65.89% 26.63%,57.57% 17.79%,38.47% 11.36%,-1.51% 12.82%);shape-margin:3%}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%]{position:absolute;top:72%;left:13%;width:74%;display:flex;flex-direction:column;border-top:.1em solid var(--ghs-color-white)}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]{cursor:pointer;margin-top:.4em;margin-bottom:.4em;font-family:var(--ghs-font-text);font-size:.6em}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;margin-right:.3em}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover{opacity:.7}.event[_ngcontent-%COMP%] .card-back[_ngcontent-%COMP%] .card-id[_ngcontent-%COMP%]{position:absolute;top:89%;left:50%;width:60%;height:10%;display:flex;justify-content:center;align-items:center;text-align:center;text-transform:uppercase;transform:translate(-50%);font-family:var(--ghs-font-title);font-size:.6em;padding-top:.1em;color:var(--ghs-color-white)}.event.disabled[_ngcontent-%COMP%]{cursor:initial}']})),a})();function itt(o,a){if(1&o&&(t.TgZ(0,"option",6),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","data.edition."+n)}}function ott(o,a){if(1&o&&(t.TgZ(0,"option",6),t._UZ(1,"span",3),t.qZA()),2&o){const n=a.$implicit;t.Q6J("value",n),t.xp6(1),t.Q6J("ghs-label","game.events.type."+n)}}function att(o,a){if(1&o&&t._UZ(0,"ghs-event-card",9),2&o){const n=a.$implicit,e=t.oxw();t.Q6J("event",n)("select",e.selected)}}const stt=function(){return["city","road"]},rtt=[{path:"editor/edition",component:tX},{path:"editor/deck",component:Xw},{path:"editor/monster",component:OX},{path:"editor/character",component:BW},{path:"tools/attackmodifier",component:h$},{path:"tools/decks",component:k$},{path:"tools/events",component:(()=>{var o;class a{constructor(e,i){(0,_.Z)(this,"route",void 0),(0,_.Z)(this,"router",void 0),(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"events",[]),(0,_.Z)(this,"edition",void 0),(0,_.Z)(this,"type",""),(0,_.Z)(this,"selected",-1),this.route=e,this.router=i}ngOnInit(){var e=this;return(0,J.Z)(function*(){yield R.r.init(!1),d.v.stateManager.init(!0),e.edition=d.v.editions(!0)[0],e.update(),e.route.queryParams.subscribe({next:i=>{let s=!1;i.edition&&(e.edition=i.edition,e.edition&&d.v.editions(!0).indexOf(e.edition),s=!0),i.type&&(e.type="string"==typeof i.type?[i.type]:i.type,s=!0),i.selected&&(e.selected="string"==typeof i.selected?[i.selected]:i.selected),s&&e.update()}})})()}update(){this.events=[],this.edition&&(this.events=d.v.eventCardManager.getEventCardsForEdition(this.type,this.edition))}updateQueryParams(){this.router.navigate([],{relativeTo:this.route,queryParams:{edition:this.edition||void 0,type:this.type||void 0,selected:this.selected||void 0},queryParamsHandling:"merge"})}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)(t.Y36(ri),t.Y36(Di))}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-event-cards-tool"]],decls:22,vars:14,consts:[[1,"container"],[3,"standalone"],[1,"menu"],[3,"ghs-label"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"events"],[3,"event","select",4,"ngFor","ngForOf"],[3,"event","select"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"ghs-header",1),t.TgZ(2,"div",2)(3,"label"),t._UZ(4,"span",3),t.TgZ(5,"select",4),t.NdJ("ngModelChange",function(l){return i.edition=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(6,itt,2,2,"option",5),t.qZA()(),t.TgZ(7,"label"),t._UZ(8,"span",3),t.TgZ(9,"select",4),t.NdJ("ngModelChange",function(l){return i.type=l})("change",function(){return i.update(),i.updateQueryParams()}),t.YNc(10,ott,2,2,"option",5),t.qZA()(),t.TgZ(11,"label"),t._UZ(12,"span",3),t.TgZ(13,"select",4),t.NdJ("ngModelChange",function(l){return i.selected=l})("change",function(){return i.updateQueryParams()}),t.TgZ(14,"option",6),t._uU(15,"none"),t.qZA(),t.TgZ(16,"option",6),t._uU(17,"0"),t.qZA(),t.TgZ(18,"option",6),t._uU(19,"1"),t.qZA()()()(),t.TgZ(20,"div",7),t.YNc(21,att,1,2,"ghs-event-card",8),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("standalone",!0),t.xp6(3),t.Q6J("ghs-label","settings.edition"),t.xp6(1),t.Q6J("ngModel",i.edition),t.xp6(1),t.Q6J("ngForOf",i.gameManager.editions(!0)),t.xp6(2),t.Q6J("ghs-label","game.events.type"),t.xp6(1),t.Q6J("ngModel",i.type),t.xp6(1),t.Q6J("ngForOf",t.DdM(13,stt)),t.xp6(2),t.Q6J("ghs-label","game.events.select"),t.xp6(1),t.Q6J("ngModel",i.selected),t.xp6(1),t.Q6J("value",-1),t.xp6(2),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(3),t.Q6J("ngForOf",i.events))},dependencies:[x.sg,wo,ko,Ca,yi,Si,Yr,ntt,ie],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] ghs-header[_ngcontent-%COMP%]{z-index:2}.events[_ngcontent-%COMP%]{display:flex;overflow:auto}.events[_ngcontent-%COMP%] ghs-event-card[_ngcontent-%COMP%]{width:400px;min-width:400px;height:600px;min-height:600px;margin:10px}"]})),a})()},{path:"tools/treasures",component:ZX},{path:"loot",component:xX},{path:"am",component:yX},{path:"**",component:s$}];let ctt=(()=>{var o;class a{}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275mod",t.oAB({type:o})),(0,_.Z)(a,"\u0275inj",t.cJS({imports:[jM.forRoot(rtt,{}),jM]})),a})(),ltt=(()=>{var o;class a{constructor(){(0,_.Z)(this,"settingsManager",R.r)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-debug-menu"]],decls:37,vars:19,consts:[[1,"menu-container","debug"],[1,"line"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],[1,"line","title","span"],[3,"routerLink"],[1,"separator"],[3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"label")(3,"input",2),t.NdJ("change",function(){return i.settingsManager.setDebugRightClick(!i.settingsManager.settings.debugRightClick)}),t.qZA(),t._UZ(4,"span",3),t.qZA()(),t.TgZ(5,"div",4)(6,"label"),t._UZ(7,"span",3),t.qZA()(),t.TgZ(8,"div",1)(9,"a",5),t._UZ(10,"span",3),t.qZA()(),t.TgZ(11,"div",1)(12,"a",5),t._UZ(13,"span",3),t.qZA()(),t.TgZ(14,"div",1)(15,"a",5),t._UZ(16,"span",3),t.qZA()(),t.TgZ(17,"div",1)(18,"a",5),t._UZ(19,"span",3),t.qZA()(),t.TgZ(20,"div",4)(21,"label"),t._UZ(22,"span",3),t.qZA()(),t.TgZ(23,"div",1)(24,"a",5),t._UZ(25,"span",3),t.qZA()(),t.TgZ(26,"div",1)(27,"a",5),t._UZ(28,"span",3),t.qZA()(),t._UZ(29,"div",6),t.TgZ(30,"div",1)(31,"a",7),t.NdJ("click",function(){return i.settingsManager.validateEditionData()}),t._UZ(32,"span",3),t.qZA()(),t._UZ(33,"div",6),t.TgZ(34,"div",1)(35,"a",5),t._UZ(36,"span",3),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("checked",i.settingsManager.settings.debugRightClick),t.xp6(1),t.Q6J("ghs-label","settings.debug.rightClick"),t.xp6(3),t.Q6J("ghs-label","editor"),t.xp6(2),t.Q6J("routerLink","/editor/monster"),t.xp6(1),t.Q6J("ghs-label","editor.monster"),t.xp6(2),t.Q6J("routerLink","/editor/character"),t.xp6(1),t.Q6J("ghs-label","editor.character"),t.xp6(2),t.Q6J("routerLink","/editor/deck"),t.xp6(1),t.Q6J("ghs-label","editor.deck"),t.xp6(2),t.Q6J("routerLink","/editor/edition"),t.xp6(1),t.Q6J("ghs-label","editor.edition"),t.xp6(3),t.Q6J("ghs-label","tools"),t.xp6(2),t.Q6J("routerLink","/tools/decks"),t.xp6(1),t.Q6J("ghs-label","tools.decks"),t.xp6(2),t.Q6J("routerLink","/tools/attackmodifier"),t.xp6(1),t.Q6J("ghs-label","tools.attackModifier"),t.xp6(4),t.Q6J("ghs-label","tools.validateEditionData"),t.xp6(3),t.Q6J("routerLink","/"),t.xp6(1),t.Q6J("ghs-label","tools.backToGhs"))},dependencies:[Vc,ie],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}']})),a})();const gtt=function(o){return{active:o}};function dtt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",2)(1,"a",11),t.NdJ("click",function(){const s=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.characterLevel=s+1)}),t._uU(2),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,gtt,n+1==e.characterLevel)),t.xp6(1),t.Oqu(n+1)}}function htt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"label")(1,"input",12),t.NdJ("change",function(){t.CHM(n);const i=t.oxw();return i.allEditions=!i.allEditions,t.KtG(i.update())}),t.qZA(),t._UZ(2,"span",13),t.qZA()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("checked",n.allEditions),t.xp6(1),t.Q6J("ghs-label","character.filter.allEditions")}}const $T=function(o){return{confirm:o}};function utt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",19)(1,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.unlockAll(i))})("mouseleave",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.cancelConfirm())}),t._UZ(2,"span",13),t.qZA()()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(2,$T,e.confirm=="confirm-all-"+n)),t.xp6(1),t.Q6J("ghs-label",e.confirm=="confirm-all-"+n?"character.unlockAll.confirm":"character.unlockAll")}}function _tt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",24),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.addCharacter(i))}),t._UZ(1,"img",25)(2,"span",13),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(1),t.Q6J("ghs-label","data.character."+n.name)}}function ptt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.unlock(i))})("mouseleave",function(){t.CHM(n);const i=t.oxw(4);return t.KtG(i.cancelConfirm())}),t._UZ(1,"img",26),t.TgZ(2,"span",27),t._UZ(3,"span",13),t.qZA(),t._UZ(4,"span",28),t.qZA()}if(2&o){const n=t.oxw().$implicit,e=t.oxw(3);t.Q6J("ngClass",t.VKq(4,$T,e.confirm==n.name)),t.xp6(1),t.Q6J("src",n.iconUrl,t.LSH),t.xp6(2),t.Q6J("ghs-label","spoiler.placeholder"),t.xp6(1),t.Q6J("ghs-label",e.confirm==n.name?"character.unlock.confirm":"character.unlock")}}const ftt=function(o,a){return{disabled:o,spoiler:a}};function mtt(o,a){if(1&o&&(t.TgZ(0,"div",21),t.YNc(1,_tt,3,2,"a",22),t.YNc(2,ptt,5,6,"a",23),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.WLB(3,ftt,e.hasCharacter(n)&&e.unlocked(n),n.spoiler)),t.xp6(1),t.Q6J("ngIf",e.unlocked(n)),t.xp6(1),t.Q6J("ngIf",!e.unlocked(n))}}const WT=function(o,a){return{fh:o,modern:a}},XT=function(){return[]};function vtt(o,a){if(1&o&&(t.TgZ(0,"div",15)(1,"div",16)(2,"label"),t._UZ(3,"span",13),t.qZA()(),t.YNc(4,utt,3,4,"div",17),t.YNc(5,mtt,3,6,"div",18),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(4,WT,"fh"==e.settingsManager.settings.theme,"modern"==e.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","data.edition."+n),t.xp6(1),t.Q6J("ngIf",e.locked(n)),t.xp6(1),t.Q6J("ngForOf",e.characterData[n]||t.DdM(7,XT))}}function Ctt(o,a){if(1&o&&(t.ynx(0),t.YNc(1,vtt,6,8,"div",14),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.characterData[n]&&e.characterData[n].length>0)}}function Mtt(o,a){1&o&&(t.TgZ(0,"div",29)(1,"div",30)(2,"label"),t._UZ(3,"span",13),t.qZA()()()),2&o&&(t.xp6(3),t.Q6J("ghs-label","character.filter.noResult"))}let Ott=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"characterLevel",1),(0,_.Z)(this,"filter",""),(0,_.Z)(this,"allEditions",!1),(0,_.Z)(this,"newUnlocks",[]),(0,_.Z)(this,"confirm",""),(0,_.Z)(this,"characterData",{})}ngOnInit(){this.update()}update(){this.characterData={},(this.allEditions?d.v.editions(!0,!0):d.v.currentEditions(!0)).forEach(e=>{this.characterData[e]=this.getCharacterData(this.filter,e)})}getCharacterData(e,i){return d.v.charactersData(i).filter(s=>(!s.locked||this.unlocked(s))&&((0,he.eL)(s.name,e)||this.unlocked(s)&&(0,he.eL)(R.r.getLabel("data.character."+s.name),e))||s.locked&&(0,he.eL)(R.r.getLabel("data.character."+s.name),e,!0)).sort((s,l)=>{const m=R.r.getLabel("data.character."+s.name).toLowerCase(),O=R.r.getLabel("data.character."+l.name).toLowerCase();if(s.spoiler&&!l.spoiler)return 1;if(!s.spoiler&&l.spoiler)return-1;if(s.spoiler&&l.spoiler){if(!this.unlocked(s)&&this.unlocked(l)&&-1==this.newUnlocks.indexOf(l.name))return 1;if(this.unlocked(s)&&-1==this.newUnlocks.indexOf(s.name)&&!this.unlocked(l))return-1;if(this.unlocked(s)&&-1!=this.newUnlocks.indexOf(s.name)&&this.unlocked(l)&&-1==this.newUnlocks.indexOf(l.name))return 1;if(this.unlocked(s)&&-1==this.newUnlocks.indexOf(s.name)&&this.unlocked(l)&&-1!=this.newUnlocks.indexOf(s.name))return-1}return m>O?1:mi.spoiler&&!this.unlocked(i))}unlock(e){-1==d.v.game.unlockedCharacters.indexOf(e.name)&&(this.confirm==e.name?(d.v.stateManager.before("unlockChar","data.character."+e.name),d.v.game.unlockedCharacters.push(e.name),this.newUnlocks.push(e.name),d.v.stateManager.after()):this.confirm=e.name)}cancelConfirm(){this.confirm=""}unlockAll(e){const i=d.v.charactersData(e).filter(s=>s.spoiler&&!this.unlocked(s)).map(s=>s.name);i.length>0&&(this.confirm=="confirm-all-"+e?(d.v.stateManager.before("unlockAllCharacters","data.edition."+e),d.v.game.unlockedCharacters.push(...i),d.v.stateManager.after()):this.confirm="confirm-all-"+e)}noResults(){return(this.allEditions?d.v.editions(!0,!0):d.v.currentEditions(!0)).every(i=>!this.characterData[i]||0==this.characterData[i].length)}addCharacter(e){d.v.stateManager.before("addChar","data.character."+e.name),d.v.characterManager.addCharacter(e,this.characterLevel),d.v.stateManager.after()}hasCharacter(e){return d.v.game.figures.some(i=>i instanceof oe.z&&e.name==i.name&&e.edition==i.edition)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-character-menu"]],decls:12,vars:15,consts:[[1,"menu-container","character-add"],[1,"level-container",3,"ngClass"],[1,"item"],["src","./assets/images/status/level.svg"],["class","item",4,"ngFor","ngForOf"],[1,"line","search"],["type","text",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange","change","keyup"],[4,"ngIf"],[1,"columns"],[4,"ngFor","ngForOf"],["class","column",4,"ngIf"],[1,"level",3,"ngClass","click"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],["class","column spoilers",4,"ngIf"],[1,"column","spoilers"],[1,"line","title","sticky",3,"ngClass"],["class","line separator reveal-all",4,"ngIf"],["class","line",3,"ngClass",4,"ngFor","ngForOf"],[1,"line","separator","reveal-all"],[3,"ngClass","click","mouseleave"],[1,"line",3,"ngClass"],[3,"click",4,"ngIf"],[3,"ngClass","click","mouseleave",4,"ngIf"],[3,"click"],[1,"icon",3,"src"],[1,"icon","spoiler",3,"src"],[1,"name"],[1,"add",3,"ghs-label"],[1,"column"],[1,"line"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span",2),t._UZ(3,"img",3),t.qZA(),t.YNc(4,dtt,3,4,"span",4),t.ALo(5,"ghsRange"),t.TgZ(6,"div",5)(7,"input",6),t.NdJ("ngModelChange",function(l){return i.filter=l})("change",function(){return i.update()})("keyup",function(){return i.update()}),t.qZA(),t.YNc(8,htt,3,2,"label",7),t.qZA()(),t.TgZ(9,"div",8),t.YNc(10,Ctt,2,1,"ng-container",9),t.YNc(11,Mtt,4,1,"div",10),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.WLB(11,WT,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(3),t.Q6J("ngForOf",t.xi3(5,8,t.DdM(14,XT),9)),t.xp6(3),t.Q6J("ngModel",i.filter)("ghs-label","character.filter")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngIf",i.gameManager.game.edition),t.xp6(2),t.Q6J("ngForOf",i.allEditions?i.gameManager.editions(!0,!0):i.gameManager.currentEditions(!0)),t.xp6(1),t.Q6J("ngIf",i.filter&&i.noResults()))},dependencies:[x.mk,x.sg,x.O5,Ho,yi,Si,ie,Ii],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".character-add[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 45 * var(--ghs-dialog-factor))}.level-container[_ngcontent-%COMP%]{position:fixed;top:0;display:grid;grid-template-columns:repeat(5,calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor)));margin:calc(var(--ghs-unit) * .6 * var(--ghs-dialog-factor)) calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:2}.level-container.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.level-container.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.level-container[_ngcontent-%COMP%] span.item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor))}.level-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:calc(var(--ghs-unit) * 4 * var(--ghs-dialog-factor));width:auto}.level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 7 * var(--ghs-dialog-factor));cursor:pointer;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-white);text-shadow:var(--ghs-outline)}.level-container[_ngcontent-%COMP%] .level[_ngcontent-%COMP%]:hover{border:calc(var(--ghs-unit) / 5) var(--ghs-color-gray) solid;border-radius:100%}.level-container[_ngcontent-%COMP%] .level.active[_ngcontent-%COMP%]{pointer-events:none;border:calc(var(--ghs-unit) / 4) var(--ghs-color-white) solid;border-radius:100%}.level-container[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{grid-column:5 span}.level-container[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%], .level-container[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:not(sticky):first-child{padding-top:calc(var(--ghs-unit) * 20.5 * var(--ghs-dialog-factor))}.reveal-all[_ngcontent-%COMP%]{position:absolute;bottom:0;border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)!important;width:auto!important}.spoilers[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:nth-child(2), .spoilers[_ngcontent-%COMP%] .reveal-all[_ngcontent-%COMP%] + .line[_ngcontent-%COMP%]{border-top:none!important}.spoilers[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:last-child{margin-bottom:calc(var(--ghs-unit) * 6 * var(--ghs-dialog-factor))}"]})),a})();const tZ=function(o,a){return{fh:o,modern:a}};function Ptt(o,a){if(1&o&&(t.TgZ(0,"div",14)(1,"label"),t._UZ(2,"span",5),t.qZA()()),2&o){const n=t.oxw(2).$implicit,e=t.oxw();t.Q6J("ngClass",t.WLB(2,tZ,"fh"==e.settingsManager.settings.theme,"modern"==e.settingsManager.settings.theme)),t.xp6(2),t.Q6J("ghs-label","data.edition."+n)}}function ytt(o,a){1&o&&(t.TgZ(0,"span",20),t._UZ(1,"img",21),t.qZA())}function btt(o,a){1&o&&t._UZ(0,"img",22)}function xtt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.addMonster(i))}),t.YNc(1,ytt,2,0,"span",18),t._UZ(2,"span",5),t.YNc(3,btt,1,0,"img",19),t.qZA()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",n.boss),t.xp6(1),t.Q6J("ghs-label","data.monster."+n.name),t.xp6(1),t.Q6J("ngIf",n.hidden)}}function wtt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.settingsManager.addSpoiler(i.name))}),t.TgZ(1,"span",23),t._UZ(2,"span",5),t.qZA(),t.TgZ(3,"span",24),t._UZ(4,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","spoiler.placeholder"),t.xp6(2),t.Q6J("ghs-label","spoiler.add"))}const ktt=function(o,a,n,e){return{disabled:o,spoiler:a,boss:n,"hidden-monster":e}};function Ttt(o,a){if(1&o&&(t.TgZ(0,"div",15),t.YNc(1,xtt,4,3,"a",16),t.YNc(2,wtt,5,2,"a",16),t.qZA()),2&o){const n=a.$implicit,e=t.oxw(3);t.Q6J("ngClass",t.l5B(3,ktt,e.hasMonster(n),n.spoiler,n.boss,n.hidden)),t.xp6(1),t.Q6J("ngIf",e.isSpoiled(n)),t.xp6(1),t.Q6J("ngIf",!e.isSpoiled(n))}}function Ztt(o,a){if(1&o&&(t.TgZ(0,"div",11),t.YNc(1,Ptt,3,5,"div",12),t.YNc(2,Ttt,3,8,"div",13),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.gameManager.currentEditions().length>1),t.xp6(1),t.Q6J("ngForOf",e.monsterData(n,e.filter))}}function Att(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Ztt,3,2,"div",10),t.BQk()),2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.monsterData(n,e.filter).length>0)}}function Stt(o,a){1&o&&(t.TgZ(0,"div",25)(1,"div",26)(2,"label"),t._UZ(3,"span",5),t.qZA()()()),2&o&&(t.xp6(3),t.Q6J("ghs-label","monster.filter.noResult"))}function Ett(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",26)(1,"a",17),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.settingsManager.addSpoilers(i.notSpoiled(i.monsterData())))}),t._UZ(2,"span",5),t.qZA()()}2&o&&(t.xp6(2),t.Q6J("ghs-label","spoiler.all"))}const eZ=function(o){return{disabled:o}};let Dtt=(()=>{var o;class a{constructor(){(0,_.Z)(this,"gameManager",d.v),(0,_.Z)(this,"settingsManager",R.r),(0,_.Z)(this,"hasSpoilers",he.Ul),(0,_.Z)(this,"isSpoiled",he.NB),(0,_.Z)(this,"notSpoiled",he.q_),(0,_.Z)(this,"filter","")}hasMonster(e){return d.v.game.figures.some(i=>i instanceof Ze.Q&&e.name==i.name&&e.edition==i.edition)}hasBossMonster(){return d.v.currentEditions().some(e=>d.v.monstersData(e).some(i=>i.boss))}hasHiddenMonster(){return d.v.currentEditions().some(e=>d.v.monstersData(e).some(i=>i.hidden))}monsterData(e=void 0,i=""){return d.v.monstersData(e).filter(s=>(!s.boss||s.boss==R.r.settings.showBossMonster)&&(!s.hidden||s.hidden==R.r.settings.showHiddenMonster)&&(!i||(0,he.eL)(s.name,i)||(0,he.eL)(R.r.getLabel("data.monster."+s.name),i))).sort((s,l)=>{const m=R.r.getLabel("data.monster."+s.name).toLowerCase(),O=R.r.getLabel("data.monster."+l.name).toLowerCase();if(s.spoiler&&!l.spoiler)return 1;if(!s.spoiler&&l.spoiler)return-1;if(s.boss&&!l.boss)return 1;if(!s.boss&&l.boss)return-1;if(s.hidden&&!l.hidden)return 1;if(!s.hidden&&l.hidden)return-1;if(s.spoiler&&l.spoiler){if(!this.isSpoiled(s)&&this.isSpoiled(l))return 1;if(this.isSpoiled(s)&&!this.isSpoiled(l))return-1}return m>O?1:m0==this.monsterData(e,this.filter).length)}}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275cmp",t.Xpm({type:o,selectors:[["ghs-monster-menu"]],decls:13,vars:20,consts:[[1,"menu-container","monster-add"],[1,"line","filter-monster-menu",3,"ngClass"],["type","text",3,"ngModel","ghs-label","ghs-label-attribute","ngModelChange"],[3,"ngClass"],["type","checkbox",3,"checked","change"],[3,"ghs-label"],[1,"columns"],[4,"ngFor","ngForOf"],["class","column",4,"ngIf"],["class","line",4,"ngIf"],["class","column spoilers bosses",4,"ngIf"],[1,"column","spoilers","bosses"],["class","line title sticky",3,"ngClass",4,"ngIf"],["class","line",3,"ngClass",4,"ngFor","ngForOf"],[1,"line","title","sticky",3,"ngClass"],[1,"line",3,"ngClass"],[3,"click",4,"ngIf"],[3,"click"],["class","boss-icon",4,"ngIf"],["class","ghs-svg hidden-icon","src","./assets/images/hidden.svg",4,"ngIf"],[1,"boss-icon"],["src","./assets/images/monster/enemy.png"],["src","./assets/images/hidden.svg",1,"ghs-svg","hidden-icon"],[1,"name"],[1,"add"],[1,"column"],[1,"line"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"input",2),t.NdJ("ngModelChange",function(l){return i.filter=l}),t.qZA(),t.TgZ(3,"label",3)(4,"input",4),t.NdJ("change",function(){return i.settingsManager.setShowBossMonster(!i.settingsManager.settings.showBossMonster)}),t.qZA(),t._UZ(5,"span",5),t.qZA(),t.TgZ(6,"label",3)(7,"input",4),t.NdJ("change",function(){return i.settingsManager.setShowHiddenMonster(!i.settingsManager.settings.showHiddenMonster)}),t.qZA(),t._UZ(8,"span",5),t.qZA()(),t.TgZ(9,"div",6),t.YNc(10,Att,2,1,"ng-container",7),t.YNc(11,Stt,4,1,"div",8),t.qZA(),t.YNc(12,Ett,3,1,"div",9),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngClass",t.WLB(13,tZ,"fh"==i.settingsManager.settings.theme,"modern"==i.settingsManager.settings.theme)),t.xp6(1),t.Q6J("ngModel",i.filter)("ghs-label","monster.filter")("ghs-label-attribute","placeholder"),t.xp6(1),t.Q6J("ngClass",t.VKq(16,eZ,!i.hasBossMonster())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.showBossMonster),t.xp6(1),t.Q6J("ghs-label","monster.showBoss"),t.xp6(1),t.Q6J("ngClass",t.VKq(18,eZ,!i.hasHiddenMonster())),t.xp6(1),t.Q6J("checked",i.settingsManager.settings.showHiddenMonster),t.xp6(1),t.Q6J("ghs-label","monster.showHidden"),t.xp6(2),t.Q6J("ngForOf",i.gameManager.currentEditions()),t.xp6(1),t.Q6J("ngIf",i.filter&&i.noResults()),t.xp6(1),t.Q6J("ngIf",i.hasSpoilers(i.monsterData())))},dependencies:[x.mk,x.sg,x.O5,Ho,yi,Si,ie],styles:['[_nghost-%COMP%]{position:relative;z-index:9999}.hint-container[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{white-space:break-spaces}.back[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:calc(var(--ghs-unit) * 2);left:0;width:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));z-index:2}.back[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-gray) var(--ghs-filter-shadow)!important}.back[_ngcontent-%COMP%]:hover .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white) var(--ghs-filter-shadow)!important}.back.disabled[_ngcontent-%COMP%]{pointer-events:none}.back.disabled[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray) var(--ghs-filter-shadow)!important}.scroll-container[_ngcontent-%COMP%]{z-index:1}.menu-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;margin-left:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));padding-bottom:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));z-index:1}.menu-container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;column-gap:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container.two-column[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%], .menu-container.two-column[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]{display:flex}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%;padding-right:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));flex-grow:1}.menu-container[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%] .column.no-grow[_ngcontent-%COMP%]{flex-grow:0}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.hidden[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0 calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor));font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);word-wrap:break-word;white-space:wrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] p[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline;font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .ghs-svg[_ngcontent-%COMP%]{width:1em;height:auto;filter:var(--ghs-filter-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;box-shadow:none;outline:none;background-color:transparent}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .hint-container[_ngcontent-%COMP%]{width:100%}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{flex-wrap:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex-basis:0;flex-grow:1}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;font-family:var(--ghs-font-title);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));color:var(--ghs-color-gray);text-shadow:var(--ghs-outline);white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:hover, .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 5 * var(--ghs-dialog-factor));margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));height:auto}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img.icon.spoiler[_ngcontent-%COMP%]{filter:brightness(0) var(--ghs-filter-gray)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.disabled[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm[_ngcontent-%COMP%]{color:var(--ghs-color-yellow)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label.confirm-delete[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button.confirm-delete[_ngcontent-%COMP%]{color:var(--ghs-color-red)}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] a[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] label[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ input[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] button[_ngcontent-%COMP%] ~ select[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%]{align-items:flex-start}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.undo[_ngcontent-%COMP%] .undo-text[_ngcontent-%COMP%]{display:flex;align-items:center}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.redo[_ngcontent-%COMP%]{align-items:flex-end}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .state.disabled[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;font-family:var(--ghs-font-normal);font-size:calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor));color:var(--ghs-color-red);cursor:zoom-out}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:var(--ghs-filter-red);height:.8em;width:auto;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]:hover{opacity:.7}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 calc(var(--ghs-unit) * 2.5 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 3.5 * var(--ghs-dialog-factor));height:auto;filter:var(--ghs-filter-gray)!important;opacity:.8}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover{cursor:pointer}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog[_ngcontent-%COMP%]:hover img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-white)!important;opacity:1}.menu-container[_ngcontent-%COMP%] .line.state-container[_ngcontent-%COMP%] .undo-dialog.disabled[_ngcontent-%COMP%] img.ghs-svg[_ngcontent-%COMP%]{filter:var(--ghs-filter-darkgray)!important}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%]{cursor:initial;border-bottom:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray);margin-bottom:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));white-space:nowrap}.menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .line.title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:initial;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%]{position:sticky;top:0;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:1}.menu-container[_ngcontent-%COMP%] .line.sticky.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.menu-container[_ngcontent-%COMP%] .line.sticky.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none;color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:before, .menu-container[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:before{background-color:var(--ghs-color-disabled)!important}.menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%] .denied[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] .objective-marker[_ngcontent-%COMP%]{font-size:calc(var(--ghs-unit) * 2 * var(--ghs-dialog-factor))}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]{margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1) solid var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .name[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%]:hover .add[_ngcontent-%COMP%]{display:inherit}.menu-container[_ngcontent-%COMP%] .spoilers[_ngcontent-%COMP%] > .spoiler[_ngcontent-%COMP%] ~ .spoiler[_ngcontent-%COMP%]{margin-top:0;border-top:none}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%]{display:flex;cursor:pointer}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:after{content:" ";position:relative;display:block;left:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));top:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor));width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));clip-path:polygon(0 35%,35% 35%,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%);background-color:var(--ghs-color-gray)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]:hover:after{background-color:var(--ghs-color-white)}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.menu-container[_ngcontent-%COMP%] .input-button[_ngcontent-%COMP%] .add-button.disabled[_ngcontent-%COMP%]:after{background-color:var(--ghs-color-disabled)}.menu-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 8 * var(--ghs-dialog-factor));margin:0;color:var(--ghs-color-white);background-color:var(--form-background);border-width:calc(var(--ghs-unit) * .1);border-style:solid;border-color:var(--ghs-color-gray);user-select:auto;-webkit-user-select:auto;font-family:var(--ghs-font-text);font-size:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor))}@media (max-width: 600px),(orientation: portrait){.menu-container.two-column[_ngcontent-%COMP%] .span-xs[_ngcontent-%COMP%]{grid-column:2 span}.menu-container[_ngcontent-%COMP%] .columns.columns-break[_ngcontent-%COMP%]{flex-wrap:wrap}}',".monster-add[_ngcontent-%COMP%]{min-width:calc(var(--ghs-unit) * 70 * var(--ghs-dialog-factor))}.monster-add[_ngcontent-%COMP%] .filter-monster-menu[_ngcontent-%COMP%]{position:fixed;background-image:url(dialog_background.fa4ff388462f6a00.png);z-index:2;width:inherit;display:flex;flex-direction:column;align-items:flex-start}.monster-add[_ngcontent-%COMP%] .filter-monster-menu.fh[_ngcontent-%COMP%]{background-image:url(dialog_background_fh.4617186f03975edf.png)}.monster-add[_ngcontent-%COMP%] .filter-monster-menu.modern[_ngcontent-%COMP%]{background-image:url(dialog_background_modern.c233015926c13e5e.png)}.monster-add[_ngcontent-%COMP%] .filter-monster-menu[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line.sticky[_ngcontent-%COMP%], .monster-add[_ngcontent-%COMP%] .filter-monster-menu[_ngcontent-%COMP%] + .columns[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]:not(sticky):first-child{padding-top:calc(var(--ghs-unit) * 14 * var(--ghs-dialog-factor))}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] > .boss[_ngcontent-%COMP%]:not(:nth-child(2)){margin-top:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));border-top:calc(var(--ghs-unit) * .1 * var(--ghs-dialog-factor)) solid var(--ghs-color-gray)}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] > .boss[_ngcontent-%COMP%] ~ .boss[_ngcontent-%COMP%]{margin-top:0;border-top:none}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] .boss-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));height:calc(var(--ghs-unit) * 3 * var(--ghs-dialog-factor));background-color:var(--ghs-color-darkred);border:2px solid var(--ghs-color-gray);border-radius:100%;margin-right:calc(var(--ghs-unit) * .5 * var(--ghs-dialog-factor))}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] .boss-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(var(--ghs-unit) * 1.5 * var(--ghs-dialog-factor));height:auto}.monster-add[_ngcontent-%COMP%] .bosses[_ngcontent-%COMP%] .hidden-icon[_ngcontent-%COMP%]{margin-left:calc(var(--ghs-unit) * 1 * var(--ghs-dialog-factor));filter:var(--ghs-filter-gray)}.monster-add[_ngcontent-%COMP%] .hidden-monster[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-style:italic;font-size:calc(var(--ghs-unit) * 2.7 * var(--ghs-dialog-factor))}"]})),a})(),Itt=(()=>{var o;class a extends t.qLn{handleError(e){d.v.stateManager.errorLog.push(e),super.handleError(e)}}return o=a,(0,_.Z)(a,"\u0275fac",function(){let n;return function(i){return(n||(n=t.n5z(o)))(i||o)}}()),(0,_.Z)(a,"\u0275prov",t.Yz7({token:o,factory:o.\u0275fac})),a})(),Ntt=(()=>{var o;class a{}return o=a,(0,_.Z)(a,"\u0275fac",function(e){return new(e||o)}),(0,_.Z)(a,"\u0275mod",t.oAB({type:o,bootstrap:[VM]})),(0,_.Z)(a,"\u0275inj",t.cJS({providers:[{provide:iv,useValue:{autoFocus:"dialog",hasBackdrop:!0}},{provide:t.qLn,useClass:Itt}],imports:[Me,C_,ctt,zv,ny,Bg,vC,lv.register("ngsw-worker.js",{enabled:true,registrationStrategy:"registerImmediately"})]})),a})();t.B6R(z6,function(){return[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,Vc,Ott,Dtt,W3,UR,sF,jF,IF,ltt,OR,ie]},function(){return[x.OU]}),t.B6R(yT,function(){return[x.mk,Fw]},[]),t.B6R(Pw,function(){return[x.mk,x.O5,Kf,ie]},[]),t.B6R(IO,function(){return[RT]},[]),t.B6R(Wd,function(){return[x.mk,T]},[]),t.B6R(zf,function(){return[x.sg,x.O5,T,ie]},[]),t.B6R(Gr,function(){return[x.mk,x.sg,x.O5,x.RF,x.n9,x.ED,ag,Gr,Sf,zT,ie,ng,An]},function(){return[x.OU]}),(0,t.G48)(),Ft().bootstrapModule(Ntt).catch(o=>console.error(o))},1028:function(q){q.exports=function(){"use strict";return function nt(E){var t=document,x=E.container||t.createElement("div"),G=E.preventSubmit||0;x.id=x.id||"autocomplete-"+Jt();var gt,Q,tt=x.style,at=E.debounceWaitMs||0,it=E.disableAutoSelect||!1,K=x.parentElement,dt=[],X="",et=2,st=E.showOnFocus,I=0,lt=!1,_t=!1;if(void 0!==E.minLength&&(et=E.minLength),!E.input)throw new Error("input undefined");var H=E.input;function Jt(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}function bt(){var Ft=x.parentNode;Ft&&Ft.removeChild(x)}function Tt(){Q&&window.clearTimeout(Q)}function Dt(){return!!x.parentNode}function Ht(){I++,dt=[],X="",gt=void 0,H.setAttribute("aria-activedescendant",""),H.setAttribute("aria-expanded","false"),bt()}function wt(){x.innerHTML="",H.setAttribute("aria-activedescendant","");var Ft=function(Y,on,p){var P=t.createElement("div");return P.textContent=Y.label||"",P};E.render&&(Ft=E.render);var Oe=function(Y,on){var p=t.createElement("div");return p.textContent=Y,p};E.renderGroup&&(Oe=E.renderGroup);var rn=t.createDocumentFragment(),kn=Jt();if(dt.forEach(function(Y,on){if(Y.group&&Y.group!==kn){kn=Y.group;var p=Oe(Y.group,X);p&&(p.className+=" group",rn.appendChild(p))}var P=Ft(Y,X,on);P&&(P.id=x.id+"_"+on,P.setAttribute("role","option"),P.addEventListener("click",function(M){_t=!0;try{E.onSelect(Y,H)}finally{_t=!1}Ht(),M.preventDefault(),M.stopPropagation()}),Y===gt&&(P.className+=" selected",P.setAttribute("aria-selected","true"),H.setAttribute("aria-activedescendant",P.id)),rn.appendChild(P))}),x.appendChild(rn),dt.length<1){if(!E.emptyMsg)return void Ht();var Me=t.createElement("div");Me.id=x.id+"_"+Jt(),Me.className="empty",Me.textContent=E.emptyMsg,x.appendChild(Me),H.setAttribute("aria-activedescendant",Me.id)}(function Rt(){x.parentNode||(K||t.body).appendChild(x)})(),function jt(){if(Dt()){H.setAttribute("aria-expanded","true"),tt.height="auto",tt.width=H.offsetWidth+"px";var Oe,Ft=0;rn(),rn(),E.customize&&Oe&&E.customize(H,Oe,x,Ft)}function rn(){var kn=t.documentElement,Me=kn.clientTop||t.body.clientTop||0,Y=kn.clientLeft||t.body.clientLeft||0,on=window.pageYOffset||kn.scrollTop,p=window.pageXOffset||kn.scrollLeft,P=(Oe=H.getBoundingClientRect()).top+H.offsetHeight+on-Me,M=Oe.left+p-Y;tt.top=P+"px",tt.left=M+"px",(Ft=window.innerHeight-(Oe.top+H.offsetHeight))<0&&(Ft=0),tt.top=P+"px",tt.bottom="",tt.left=M+"px",tt.maxHeight=Ft+"px"}}(),ue()}function Zt(){Dt()&&wt()}function qt(){Zt()}function Wt(Ft){Ft.target!==x?Zt():Ft.preventDefault()}function Ie(){_t||Et(0)}function ue(){var Ft=x.getElementsByClassName("selected");if(Ft.length>0){var Oe=Ft[0],rn=Oe.previousElementSibling;if(rn&&-1!==rn.className.indexOf("group")&&!rn.previousElementSibling&&(Oe=rn),Oe.offsetTopMe&&(x.scrollTop+=kn-Me)}}}function _n(Ft){dt.length>0&&(function en(Ft){var Oe=t.getElementById(x.id+"_"+Ft);Oe&&(Oe.classList.remove("selected"),Oe.removeAttribute("aria-selected"),H.removeAttribute("aria-activedescendant"))}(Ft),function be(Ft){var Oe=t.getElementById(x.id+"_"+Ft);Oe&&(Oe.classList.add("selected"),Oe.setAttribute("aria-selected","true"),H.setAttribute("aria-activedescendant",Oe.id))}(dt.indexOf(gt)),ue())}function St(Ft,Oe){var rn=Dt();if("Escape"===Oe)Ht();else{if(!rn||dt.length<1)return;"ArrowUp"===Oe?function We(){var Ft=dt.indexOf(gt);gt=-1===Ft?void 0:dt[(Ft+dt.length-1)%dt.length],_n(Ft)}():function ve(){var Ft=dt.indexOf(gt);gt=dt.length<1?void 0:-1===Ft?dt[0]:dt[(Ft+1)%dt.length],_n(Ft)}()}Ft.preventDefault(),rn&&Ft.stopPropagation()}function It(Ft){var Oe=Ft.key;switch(Oe){case"ArrowUp":case"ArrowDown":case"Escape":St(Ft,Oe);break;case"Enter":!function kt(Ft){if(gt){2===G&&Ft.preventDefault(),_t=!0;try{E.onSelect(gt,H)}finally{_t=!1}Ht()}1===G&&Ft.preventDefault()}(Ft)}}function Ut(){st&&Et(1)}function Et(Ft){H.value.length>=et||1===Ft?(Tt(),Q=window.setTimeout(function(){return Yt(H.value,Ft,H.selectionStart||0)},0===Ft||2===Ft?at:0)):Ht()}function Yt(Ft,Oe,rn){if(!lt){var kn=++I;E.fetch(Ft,function(Me){I===kn&&Me&&(X=Ft,gt=(dt=Me).length<1||it?void 0:dt[0],wt())},Oe,rn)}}function Ce(Ft){E.keyup?E.keyup({event:Ft,fetch:function(){return Et(0)}}):!Dt()&&"ArrowDown"===Ft.key&&Et(0)}function me(Ft){E.click&&E.click({event:Ft,fetch:function(){return Et(2)}})}function wn(){setTimeout(function(){t.activeElement!==H&&Ht()},200)}return x.className="autocomplete "+(E.className||""),x.setAttribute("role","listbox"),H.setAttribute("role","combobox"),H.setAttribute("aria-expanded","false"),H.setAttribute("aria-autocomplete","list"),H.setAttribute("aria-controls",x.id),H.setAttribute("aria-owns",x.id),H.setAttribute("aria-activedescendant",""),H.setAttribute("aria-haspopup","listbox"),tt.position="absolute",x.addEventListener("mousedown",function(Ft){Ft.stopPropagation(),Ft.preventDefault()}),x.addEventListener("focus",function(){return H.focus()}),bt(),H.addEventListener("keyup",Ce),H.addEventListener("click",me),H.addEventListener("keydown",It),H.addEventListener("input",Ie),H.addEventListener("blur",wn),H.addEventListener("focus",Ut),window.addEventListener("resize",qt),t.addEventListener("scroll",Wt,!0),{destroy:function ke(){H.removeEventListener("focus",Ut),H.removeEventListener("keyup",Ce),H.removeEventListener("click",me),H.removeEventListener("keydown",It),H.removeEventListener("input",Ie),H.removeEventListener("blur",wn),window.removeEventListener("resize",qt),t.removeEventListener("scroll",Wt,!0),H.removeAttribute("role"),H.removeAttribute("aria-expanded"),H.removeAttribute("aria-autocomplete"),H.removeAttribute("aria-controls"),H.removeAttribute("aria-activedescendant"),H.removeAttribute("aria-owns"),H.removeAttribute("aria-haspopup"),Tt(),Ht(),lt=!0},fetch:function xe(){Yt(H.value,3,H.selectionStart||0)}}}}()},8433:function(q,nt){ /* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade diff --git a/ngsw.json b/ngsw.json index 40cddc020..cd803d92d 100644 --- a/ngsw.json +++ b/ngsw.json @@ -1,8 +1,8 @@ { "configVersion": 1, - "timestamp": 1698691871620, + "timestamp": 1698846486856, "appData": { - "version": "0.80.1" + "version": "0.80.2" }, "index": "gloomhavensecretariat/index.html", "assetGroups": [ @@ -16,7 +16,7 @@ "urls": [ "gloomhavensecretariat/favicon.ico", "gloomhavensecretariat/index.html", - "gloomhavensecretariat/main.db01b5319d34538c.js", + "gloomhavensecretariat/main.482ce573e36f81fa.js", "gloomhavensecretariat/manifest.webmanifest", "gloomhavensecretariat/polyfills.bed2a72d06ede870.js", "gloomhavensecretariat/runtime.c63e010387befb5b.js", @@ -2634,7 +2634,7 @@ "gloomhavensecretariat/icon.5a11343c46ebf913.png": "53e79fd7b007e043eefe1e474f511ff2654a8ae1", "gloomhavensecretariat/immune.3638b2264dfc0cf4.svg": "683fda2b898292506e4a8f0984c5057c0e877509", "gloomhavensecretariat/immunity.5d026de2db8a1d8f.svg": "ad20fc18e93269c79312170674c6008615438f9b", - "gloomhavensecretariat/index.html": "17ac69314a84a24462ab35e326c76f37c3c24394", + "gloomhavensecretariat/index.html": "49f33334177792614220bf27a76950213a710bf9", "gloomhavensecretariat/initiative.a7663b57012bb669.svg": "85c1e0fe11ba2111c2dc55370ff84796c86eb556", "gloomhavensecretariat/inner-mask.f2d18d4a7559b09e.svg": "a0c4d9bcd2afcc66f402053f2bf680546215d16b", "gloomhavensecretariat/item-back-fh.e293bb7bd25a2ea5.png": "6887a5deedb532c38ab40bde42a8b2c01121ca5f", @@ -2655,7 +2655,7 @@ "gloomhavensecretariat/layers.ef6db8722c2c3f9a.png": "c9e7528e491a39232ba24a2706c6c739d6fb0f06", "gloomhavensecretariat/level.38e1f58a07dc5898.svg": "004f02ea9f24d4ecbfef70b7d0c9cbd5e731827e", "gloomhavensecretariat/loot-back.b3962872f80142fe.png": "a10c9bcc106f820ba1ce8e9a9a9cc47fdbc734d1", - "gloomhavensecretariat/main.db01b5319d34538c.js": "d1a6f9e9e7bded31a59bdcee29233788b5421358", + "gloomhavensecretariat/main.482ce573e36f81fa.js": "c29a238f0a13d470df9dfa0335d50af7026a1edf", "gloomhavensecretariat/majallab.00c7b4c865792c45.ttf": "cd2e9e61aca39d2b987b66e4c2a0a3ea13c3be48", "gloomhavensecretariat/majallab.3bc19f63b5b1d474.svg": "68458a0f79e0e45258f0948d48f2a65c125b4322", "gloomhavensecretariat/majallab.4ef31693f35ab4df.woff": "5f4a605494c5e4adbe49e3b23bfdcf1f7f8a92b6",