1import{h as j}from"./chunk-RYT6C367.js";import"./chunk-SNZM6YGS.js";import"./chunk-3PGMBZAP.js";import"./chunk-VT7CJSCD.js";import"./chunk-65I45D2I.js";import"./chunk-GZL4NBTB.js";import"./chunk-OMIAKVTT.js";import"./chunk-3XCK7DOC.js";import"./chunk-PJWNDC7A.js";import"./chunk-QDFFLVTB.js";import"./chunk-S43ITSQ5.js";import{e as k,k as h}from"./chunk-5FWAKVG3.js";import{j as P,k as M,z as S}from"./chunk-KAXBUATZ.js";import{Cc as d,Cd as F,Dc as r,Ec as n,Fa as p,Fc as E,Jb as o,Jc as I,Kc as b,Pd as x,Wb as g,Xc as u,bc as _,cc as m,fd as y,gc as c,gd as f,jd as s,kd as v,ld as w}from"./chunk-XW6AEKHB.js";import{l as C}from"./chunk-6G35VSEK.js";var B=()=>["default","image"];function K(e,a){if(e&1&&(r(0,"div",9)(1,"div",10)(2,"div",11),s(3),n(),r(4,"div",12),s(5),n()(),r(6,"div",13),E(7,"div",14),n()()),e&2){let t=a.$implicit;o(3),v(t.answer),o(2),w("",t.percent,"%"),o(2),f("width",t.percent+"%")}}function A(e,a){if(e&1&&(r(0,"div",6)(1,"h1",7),s(2),n(),c(3,K,8,4,"div",8),n()),e&2){let t=u(2);o(2),v(t.poll==null?null:t.poll.question),o(),d("ngForOf",t.poll==null?null:t.poll.answersSummary)}}function D(e,a){if(e&1&&(I(0),c(1,A,4,2,"div",5),b()),e&2){let t=u();o(),d("ngIf",t.poll)}}function L(e,a){e&1&&(r(0,"div",15),s(1,"Either poll is inactive or not found."),n())}var O=(()=>{class e{constructor(t,i){this.route=t,this.api=i,this.isLoading=!0,this.setting="default",this.bgImage="",this.bgColor=null,this.textColor="#FFFFFF"}ngOnInit(){this.route.params.subscribe(t=>{this.sessionPK=t.sessionPK,this.event=t.event}),this.interval=setInterval(()=>{this.load()},2e3)}ngOnDestroy(){clearInterval(this.interval)}load(){return C(this,null,function*(){if(!this.sessionPK)return;let t=yield this.api.get(`polls/${this.sessionPK}/public`);t.success&&(this.poll=t.data,this.setting=this.poll.previewBackgroundSetting||"default",this.setting==="image"&&typeof this.poll.previewBackgroundImage=="string"?this.bgImage="url("+this.poll.previewBackgroundImage+")":this.setting==="color"&&this.poll.previewBackgroundColor?this.bgColor=this.poll.previewBackgroundColor:this.bgImage="url(https://assets.canapii.com/hp-slmslk-2021/images/poll-bg.png)",this.textColor=this.poll?.previewTextColor||"#FFFFFF"),this.isLoading=!1})}static{this.\u0275fac=function(i){return new(i||e)(g(k),g(j))}}static{this.\u0275cmp=_({type:e,selectors:[["ng-component"]],decls:6,vars:9,consts:[["notFound",""],[1,"poll-wrapper"],[1,"container","h-100"],[1,"d-flex","align-items-center","h-100"],[4,"ngIf","ngIfElse"],["class","w-100","style","position: relative",4,"ngIf"],[1,"w-100",2,"position","relative"],[1,"mb-5"],["class","my-5",4,"ngFor","ngForOf"],[1,"my-5"],[1,"row"],[1,"col"],[1,"col-auto"],[1,"progress"],["role","progressbar","aria-valuenow","25","aria-valuemin","0","aria-valuemax","100",1,"progress-bar"],[1,"alert","alert-warning","w-100"]],template:function(i,l){if(i&1&&(r(0,"div",1)(1,"div",2)(2,"div",3),c(3,D,2,1,"ng-container",4)(4,L,2,0,"ng-template",null,0,x),n()()()),i&2){let T=y(5);f("background-image",F(8,B).includes(l.setting)?l.bgImage:"")("background-color",l.setting==="color"?l.bgColor:"")("color",l.textColor),o(3),d("ngIf",l.poll||l.isLoading)("ngIfElse",T)}},dependencies:[M,P],styles:['*[_ngcontent-%COMP%]{font-family:Nunito,Roboto,-apple-system,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.poll-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;background-size:cover;background-position:center;position:absolute;font-size:1.2rem}.percent-bg[_ngcontent-%COMP%]{position:absolute;background:#eee;height:40px}']})}}return e})();var z=[{path:"",component:O}],R=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=m({type:e})}static{this.\u0275inj=p({imports:[h.forChild(z),h]})}}return e})();var ee=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=m({type:e})}static{this.\u0275inj=p({imports:[S,R]})}}return e})();export{ee as EventPollModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.